diff --git a/docs/assets/index-9950d0aa.js b/docs/assets/index-9950d0aa.js deleted file mode 100644 index 2bca299..0000000 --- a/docs/assets/index-9950d0aa.js +++ /dev/null @@ -1,40 +0,0 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function Ah(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var bc={exports:{}},Mo={},ef={exports:{}},F={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var rl=Symbol.for("react.element"),$h=Symbol.for("react.portal"),Vh=Symbol.for("react.fragment"),Uh=Symbol.for("react.strict_mode"),Bh=Symbol.for("react.profiler"),Hh=Symbol.for("react.provider"),Qh=Symbol.for("react.context"),Gh=Symbol.for("react.forward_ref"),Kh=Symbol.for("react.suspense"),Yh=Symbol.for("react.memo"),Xh=Symbol.for("react.lazy"),Ca=Symbol.iterator;function Jh(t){return t===null||typeof t!="object"?null:(t=Ca&&t[Ca]||t["@@iterator"],typeof t=="function"?t:null)}var tf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nf=Object.assign,rf={};function Qr(t,e,n){this.props=t,this.context=e,this.refs=rf,this.updater=n||tf}Qr.prototype.isReactComponent={};Qr.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Qr.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function lf(){}lf.prototype=Qr.prototype;function ku(t,e,n){this.props=t,this.context=e,this.refs=rf,this.updater=n||tf}var xu=ku.prototype=new lf;xu.constructor=ku;nf(xu,Qr.prototype);xu.isPureReactComponent=!0;var Ma=Array.isArray,of=Object.prototype.hasOwnProperty,Tu={current:null},sf={key:!0,ref:!0,__self:!0,__source:!0};function uf(t,e,n){var r,i={},l=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(l=""+e.key),e)of.call(e,r)&&!sf.hasOwnProperty(r)&&(i[r]=e[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,G=x[H];if(0>>1;Hi(Kn,j))Ai(q,Kn)?(x[H]=q,x[A]=j,H=A):(x[H]=Kn,x[ct]=j,H=ct);else if(Ai(q,j))x[H]=q,x[A]=j,H=A;else break e}}return z}function i(x,z){var j=x.sortIndex-z.sortIndex;return j!==0?j:x.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var u=[],a=[],h=1,m=null,p=3,y=!1,w=!1,S=!1,O=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(x){for(var z=n(a);z!==null;){if(z.callback===null)r(a);else if(z.startTime<=x)r(a),z.sortIndex=z.expirationTime,e(u,z);else break;z=n(a)}}function v(x){if(S=!1,d(x),!w)if(n(u)!==null)w=!0,vn(k);else{var z=n(a);z!==null&&$t(v,z.startTime-x)}}function k(x,z){w=!1,S&&(S=!1,f(C),C=-1),y=!0;var j=p;try{for(d(z),m=n(u);m!==null&&(!(m.expirationTime>z)||x&&!je());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var G=H(m.expirationTime<=z);z=t.unstable_now(),typeof G=="function"?m.callback=G:m===n(u)&&r(u),d(z)}else r(u);m=n(u)}if(m!==null)var Vt=!0;else{var ct=n(a);ct!==null&&$t(v,ct.startTime-z),Vt=!1}return Vt}finally{m=null,p=j,y=!1}}var E=!1,P=null,C=-1,W=5,N=-1;function je(){return!(t.unstable_now()-Nx||125H?(x.sortIndex=j,e(a,x),n(u)===null&&x===n(a)&&(S?(f(C),C=-1):S=!0,$t(v,j-H))):(x.sortIndex=G,e(u,x),w||y||(w=!0,vn(k))),x},t.unstable_shouldYield=je,t.unstable_wrapCallback=function(x){var z=p;return function(){var j=p;p=z;try{return x.apply(this,arguments)}finally{p=j}}}})(hf);df.exports=hf;var sp=df.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var pf=Se,Le=sp;function g(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ts=Object.prototype.hasOwnProperty,up=/^[: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]*$/,Na={},ja={};function ap(t){return Ts.call(ja,t)?!0:Ts.call(Na,t)?!1:up.test(t)?ja[t]=!0:(Na[t]=!0,!1)}function cp(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function fp(t,e,n,r){if(e===null||typeof e>"u"||cp(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Te(t,e,n,r,i,l,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=l,this.removeEmptyString=o}var de={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){de[t]=new Te(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];de[e]=new Te(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){de[t]=new Te(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){de[t]=new Te(t,2,!1,t,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(t){de[t]=new Te(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){de[t]=new Te(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){de[t]=new Te(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){de[t]=new Te(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){de[t]=new Te(t,5,!1,t.toLowerCase(),null,!1,!1)});var Pu=/[\-:]([a-z])/g;function Cu(t){return t[1].toUpperCase()}"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(t){var e=t.replace(Pu,Cu);de[e]=new Te(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Pu,Cu);de[e]=new Te(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Pu,Cu);de[e]=new Te(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){de[t]=new Te(t,1,!1,t.toLowerCase(),null,!1,!1)});de.xlinkHref=new Te("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){de[t]=new Te(t,1,!1,t.toLowerCase(),null,!0,!0)});function Mu(t,e,n,r){var i=de.hasOwnProperty(e)?de[e]:null;(i!==null?i.type!==0:r||!(2s||i[o]!==l[s]){var u=` -`+i[o].replace(" at new "," at ");return t.displayName&&u.includes("")&&(u=u.replace("",t.displayName)),u}while(1<=o&&0<=s);break}}}finally{Xo=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?oi(t):""}function dp(t){switch(t.tag){case 5:return oi(t.type);case 16:return oi("Lazy");case 13:return oi("Suspense");case 19:return oi("SuspenseList");case 0:case 2:case 15:return t=Jo(t.type,!1),t;case 11:return t=Jo(t.type.render,!1),t;case 1:return t=Jo(t.type,!0),t;default:return""}}function Ms(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case vr:return"Fragment";case mr:return"Portal";case Es:return"Profiler";case zu:return"StrictMode";case Ps:return"Suspense";case Cs:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case gf:return(t.displayName||"Context")+".Consumer";case vf:return(t._context.displayName||"Context")+".Provider";case Nu:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ju:return e=t.displayName||null,e!==null?e:Ms(t.type)||"Memo";case Kt:e=t._payload,t=t._init;try{return Ms(t(e))}catch{}}return null}function hp(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ms(e);case 8:return e===zu?"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(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function cn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function wf(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function pp(t){var e=wf(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,l.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function dl(t){t._valueTracker||(t._valueTracker=pp(t))}function _f(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=wf(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function eo(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function zs(t,e){var n=e.checked;return X({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Ra(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=cn(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Sf(t,e){e=e.checked,e!=null&&Mu(t,"checked",e,!1)}function Ns(t,e){Sf(t,e);var n=cn(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?js(t,e.type,n):e.hasOwnProperty("defaultValue")&&js(t,e.type,cn(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Oa(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function js(t,e,n){(e!=="number"||eo(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var si=Array.isArray;function jr(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=hl.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Vi(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Ci={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},mp=["Webkit","ms","Moz","O"];Object.keys(Ci).forEach(function(t){mp.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Ci[e]=Ci[t]})});function Ef(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Ci.hasOwnProperty(t)&&Ci[t]?(""+e).trim():e+"px"}function Pf(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Ef(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var vp=X({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Os(t,e){if(e){if(vp[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(g(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(g(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(g(61))}if(e.style!=null&&typeof e.style!="object")throw Error(g(62))}}function Ds(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ls=null;function Fu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Is=null,Fr=null,Rr=null;function Ia(t){if(t=ol(t)){if(typeof Is!="function")throw Error(g(280));var e=t.stateNode;e&&(e=Ro(e),Is(t.stateNode,t.type,e))}}function Cf(t){Fr?Rr?Rr.push(t):Rr=[t]:Fr=t}function Mf(){if(Fr){var t=Fr,e=Rr;if(Rr=Fr=null,Ia(t),e)for(t=0;t>>=0,t===0?32:31-(Cp(t)/Mp|0)|0}var pl=64,ml=4194304;function ui(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function io(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,l=t.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=ui(s):(l&=o,l!==0&&(r=ui(l)))}else o=n&~i,o!==0?r=ui(o):l!==0&&(r=ui(l));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,l=e&-e,i>=l||i===16&&(l&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function il(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ot(e),t[e]=n}function Fp(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=zi),Ga=String.fromCharCode(32),Ka=!1;function Yf(t,e){switch(t){case"keyup":return om.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xf(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var gr=!1;function um(t,e){switch(t){case"compositionend":return Xf(e);case"keypress":return e.which!==32?null:(Ka=!0,Ga);case"textInput":return t=e.data,t===Ga&&Ka?null:t;default:return null}}function am(t,e){if(gr)return t==="compositionend"||!$u&&Yf(t,e)?(t=Gf(),Ol=Iu=qt=null,gr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Za(n)}}function bf(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?bf(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function ed(){for(var t=window,e=eo();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=eo(t.document)}return e}function Vu(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function ym(t){var e=ed(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&bf(n.ownerDocument.documentElement,n)){if(r!==null&&Vu(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!t.extend&&l>r&&(i=r,r=l,l=i),i=qa(n,l);var o=qa(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),l>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,yr=null,Bs=null,ji=null,Hs=!1;function ba(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hs||yr==null||yr!==eo(r)||(r=yr,"selectionStart"in r&&Vu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ji&&Ki(ji,r)||(ji=r,r=so(Bs,"onSelect"),0Sr||(t.current=Js[Sr],Js[Sr]=null,Sr--)}function $(t,e){Sr++,Js[Sr]=t.current,t.current=e}var fn={},ye=hn(fn),Me=hn(!1),$n=fn;function Wr(t,e){var n=t.type.contextTypes;if(!n)return fn;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=e[l];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function ze(t){return t=t.childContextTypes,t!=null}function ao(){B(Me),B(ye)}function oc(t,e,n){if(ye.current!==fn)throw Error(g(168));$(ye,e),$(Me,n)}function ad(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(g(108,hp(t)||"Unknown",i));return X({},n,r)}function co(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||fn,$n=ye.current,$(ye,t),$(Me,Me.current),!0}function sc(t,e,n){var r=t.stateNode;if(!r)throw Error(g(169));n?(t=ad(t,e,$n),r.__reactInternalMemoizedMergedChildContext=t,B(Me),B(ye),$(ye,t)):B(Me),$(Me,n)}var zt=null,Oo=!1,cs=!1;function cd(t){zt===null?zt=[t]:zt.push(t)}function Nm(t){Oo=!0,cd(t)}function pn(){if(!cs&&zt!==null){cs=!0;var t=0,e=L;try{var n=zt;for(L=1;t>=o,i-=o,Ft=1<<32-ot(e)+i|n<C?(W=P,P=null):W=P.sibling;var N=p(f,P,d[C],v);if(N===null){P===null&&(P=W);break}t&&P&&N.alternate===null&&e(f,P),c=l(N,c,C),E===null?k=N:E.sibling=N,E=N,P=W}if(C===d.length)return n(f,P),Q&&wn(f,C),k;if(P===null){for(;CC?(W=P,P=null):W=P.sibling;var je=p(f,P,N.value,v);if(je===null){P===null&&(P=W);break}t&&P&&je.alternate===null&&e(f,P),c=l(je,c,C),E===null?k=je:E.sibling=je,E=je,P=W}if(N.done)return n(f,P),Q&&wn(f,C),k;if(P===null){for(;!N.done;C++,N=d.next())N=m(f,N.value,v),N!==null&&(c=l(N,c,C),E===null?k=N:E.sibling=N,E=N);return Q&&wn(f,C),k}for(P=r(f,P);!N.done;C++,N=d.next())N=y(P,f,C,N.value,v),N!==null&&(t&&N.alternate!==null&&P.delete(N.key===null?C:N.key),c=l(N,c,C),E===null?k=N:E.sibling=N,E=N);return t&&P.forEach(function(at){return e(f,at)}),Q&&wn(f,C),k}function O(f,c,d,v){if(typeof d=="object"&&d!==null&&d.type===vr&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case fl:e:{for(var k=d.key,E=c;E!==null;){if(E.key===k){if(k=d.type,k===vr){if(E.tag===7){n(f,E.sibling),c=i(E,d.props.children),c.return=f,f=c;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Kt&&pc(k)===E.type){n(f,E.sibling),c=i(E,d.props),c.ref=ti(f,E,d),c.return=f,f=c;break e}n(f,E);break}else e(f,E);E=E.sibling}d.type===vr?(c=An(d.props.children,f.mode,v,d.key),c.return=f,f=c):(v=Ul(d.type,d.key,d.props,null,f.mode,v),v.ref=ti(f,c,d),v.return=f,f=v)}return o(f);case mr:e:{for(E=d.key;c!==null;){if(c.key===E)if(c.tag===4&&c.stateNode.containerInfo===d.containerInfo&&c.stateNode.implementation===d.implementation){n(f,c.sibling),c=i(c,d.children||[]),c.return=f,f=c;break e}else{n(f,c);break}else e(f,c);c=c.sibling}c=ys(d,f.mode,v),c.return=f,f=c}return o(f);case Kt:return E=d._init,O(f,c,E(d._payload),v)}if(si(d))return w(f,c,d,v);if(Jr(d))return S(f,c,d,v);kl(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,c!==null&&c.tag===6?(n(f,c.sibling),c=i(c,d),c.return=f,f=c):(n(f,c),c=gs(d,f.mode,v),c.return=f,f=c),o(f)):n(f,c)}return O}var $r=yd(!0),wd=yd(!1),sl={},_t=hn(sl),Zi=hn(sl),qi=hn(sl);function Ln(t){if(t===sl)throw Error(g(174));return t}function Ju(t,e){switch($(qi,e),$(Zi,t),$(_t,sl),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Rs(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Rs(e,t)}B(_t),$(_t,e)}function Vr(){B(_t),B(Zi),B(qi)}function _d(t){Ln(qi.current);var e=Ln(_t.current),n=Rs(e,t.type);e!==n&&($(Zi,t),$(_t,n))}function Zu(t){Zi.current===t&&(B(_t),B(Zi))}var K=hn(0);function go(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var fs=[];function qu(){for(var t=0;tn?n:4,t(!0);var r=ds.transition;ds.transition={};try{t(!1),e()}finally{L=n,ds.transition=r}}function Ld(){return qe().memoizedState}function Om(t,e,n){var r=sn(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Id(t))Wd(e,n);else if(n=pd(t,e,n,r),n!==null){var i=ke();st(n,t,r,i),Ad(n,e,r)}}function Dm(t,e,n){var r=sn(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Id(t))Wd(e,i);else{var l=t.alternate;if(t.lanes===0&&(l===null||l.lanes===0)&&(l=e.lastRenderedReducer,l!==null))try{var o=e.lastRenderedState,s=l(o,n);if(i.hasEagerState=!0,i.eagerState=s,ut(s,o)){var u=e.interleaved;u===null?(i.next=i,Yu(e)):(i.next=u.next,u.next=i),e.interleaved=i;return}}catch{}finally{}n=pd(t,e,i,r),n!==null&&(i=ke(),st(n,t,r,i),Ad(n,e,r))}}function Id(t){var e=t.alternate;return t===Y||e!==null&&e===Y}function Wd(t,e){Fi=yo=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Ad(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Ou(t,n)}}var wo={readContext:Ze,useCallback:he,useContext:he,useEffect:he,useImperativeHandle:he,useInsertionEffect:he,useLayoutEffect:he,useMemo:he,useReducer:he,useRef:he,useState:he,useDebugValue:he,useDeferredValue:he,useTransition:he,useMutableSource:he,useSyncExternalStore:he,useId:he,unstable_isNewReconciler:!1},Lm={readContext:Ze,useCallback:function(t,e){return vt().memoizedState=[t,e===void 0?null:e],t},useContext:Ze,useEffect:vc,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Wl(4194308,4,jd.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Wl(4194308,4,t,e)},useInsertionEffect:function(t,e){return Wl(4,2,t,e)},useMemo:function(t,e){var n=vt();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=vt();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=Om.bind(null,Y,t),[r.memoizedState,t]},useRef:function(t){var e=vt();return t={current:t},e.memoizedState=t},useState:mc,useDebugValue:ra,useDeferredValue:function(t){return vt().memoizedState=t},useTransition:function(){var t=mc(!1),e=t[0];return t=Rm.bind(null,t[1]),vt().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Y,i=vt();if(Q){if(n===void 0)throw Error(g(407));n=n()}else{if(n=e(),ue===null)throw Error(g(349));Un&30||xd(r,e,n)}i.memoizedState=n;var l={value:n,getSnapshot:e};return i.queue=l,vc(Ed.bind(null,r,l,t),[t]),r.flags|=2048,tl(9,Td.bind(null,r,l,n,e),void 0,null),n},useId:function(){var t=vt(),e=ue.identifierPrefix;if(Q){var n=Rt,r=Ft;n=(r&~(1<<32-ot(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=bi++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[yt]=e,t[Ji]=r,Yd(t,e,!1,!1),e.stateNode=t;e:{switch(o=Ds(n,r),n){case"dialog":V("cancel",t),V("close",t),i=r;break;case"iframe":case"object":case"embed":V("load",t),i=r;break;case"video":case"audio":for(i=0;iBr&&(e.flags|=128,r=!0,ni(l,!1),e.lanes=4194304)}else{if(!r)if(t=go(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),ni(l,!0),l.tail===null&&l.tailMode==="hidden"&&!o.alternate&&!Q)return pe(e),null}else 2*b()-l.renderingStartTime>Br&&n!==1073741824&&(e.flags|=128,r=!0,ni(l,!1),e.lanes=4194304);l.isBackwards?(o.sibling=e.child,e.child=o):(n=l.last,n!==null?n.sibling=o:e.child=o,l.last=o)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=b(),e.sibling=null,n=K.current,$(K,r?n&1|2:n&1),e):(pe(e),null);case 22:case 23:return aa(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Re&1073741824&&(pe(e),e.subtreeFlags&6&&(e.flags|=8192)):pe(e),null;case 24:return null;case 25:return null}throw Error(g(156,e.tag))}function Hm(t,e){switch(Bu(e),e.tag){case 1:return ze(e.type)&&ao(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Vr(),B(Me),B(ye),qu(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Zu(e),null;case 13:if(B(K),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(g(340));Ar()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return B(K),null;case 4:return Vr(),null;case 10:return Ku(e.type._context),null;case 22:case 23:return aa(),null;case 24:return null;default:return null}}var Tl=!1,ve=!1,Qm=typeof WeakSet=="function"?WeakSet:Set,T=null;function Er(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Z(t,e,r)}else n.current=null}function uu(t,e,n){try{n()}catch(r){Z(t,e,r)}}var Ec=!1;function Gm(t,e){if(Qs=lo,t=ed(),Vu(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var o=0,s=-1,u=-1,a=0,h=0,m=t,p=null;t:for(;;){for(var y;m!==n||i!==0&&m.nodeType!==3||(s=o+i),m!==l||r!==0&&m.nodeType!==3||(u=o+r),m.nodeType===3&&(o+=m.nodeValue.length),(y=m.firstChild)!==null;)p=m,m=y;for(;;){if(m===t)break t;if(p===n&&++a===i&&(s=o),p===l&&++h===r&&(u=o),(y=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=y}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gs={focusedElem:t,selectionRange:n},lo=!1,T=e;T!==null;)if(e=T,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,T=t;else for(;T!==null;){e=T;try{var w=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,O=w.memoizedState,f=e.stateNode,c=f.getSnapshotBeforeUpdate(e.elementType===e.type?S:rt(e.type,S),O);f.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var d=e.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(g(163))}}catch(v){Z(e,e.return,v)}if(t=e.sibling,t!==null){t.return=e.return,T=t;break}T=e.return}return w=Ec,Ec=!1,w}function Ri(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var l=i.destroy;i.destroy=void 0,l!==void 0&&uu(e,n,l)}i=i.next}while(i!==r)}}function Io(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function au(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function Zd(t){var e=t.alternate;e!==null&&(t.alternate=null,Zd(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[yt],delete e[Ji],delete e[Xs],delete e[Mm],delete e[zm])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function qd(t){return t.tag===5||t.tag===3||t.tag===4}function Pc(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||qd(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function cu(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=uo));else if(r!==4&&(t=t.child,t!==null))for(cu(t,e,n),t=t.sibling;t!==null;)cu(t,e,n),t=t.sibling}function fu(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(fu(t,e,n),t=t.sibling;t!==null;)fu(t,e,n),t=t.sibling}var ce=null,it=!1;function Ut(t,e,n){for(n=n.child;n!==null;)bd(t,e,n),n=n.sibling}function bd(t,e,n){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(zo,n)}catch{}switch(n.tag){case 5:ve||Er(n,e);case 6:var r=ce,i=it;ce=null,Ut(t,e,n),ce=r,it=i,ce!==null&&(it?(t=ce,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):ce.removeChild(n.stateNode));break;case 18:ce!==null&&(it?(t=ce,n=n.stateNode,t.nodeType===8?as(t.parentNode,n):t.nodeType===1&&as(t,n),Qi(t)):as(ce,n.stateNode));break;case 4:r=ce,i=it,ce=n.stateNode.containerInfo,it=!0,Ut(t,e,n),ce=r,it=i;break;case 0:case 11:case 14:case 15:if(!ve&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,o=l.destroy;l=l.tag,o!==void 0&&(l&2||l&4)&&uu(n,e,o),i=i.next}while(i!==r)}Ut(t,e,n);break;case 1:if(!ve&&(Er(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Z(n,e,s)}Ut(t,e,n);break;case 21:Ut(t,e,n);break;case 22:n.mode&1?(ve=(r=ve)||n.memoizedState!==null,Ut(t,e,n),ve=r):Ut(t,e,n);break;default:Ut(t,e,n)}}function Cc(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new Qm),e.forEach(function(r){var i=tv.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function et(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~l}if(r=i,r=b()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ym(r/1960))-r,10t?16:t,bt===null)var r=!1;else{if(t=bt,bt=null,ko=0,R&6)throw Error(g(331));var i=R;for(R|=4,T=t.current;T!==null;){var l=T,o=l.child;if(T.flags&16){var s=l.deletions;if(s!==null){for(var u=0;ub()-sa?Wn(t,0):oa|=n),Ne(t,e)}function sh(t,e){e===0&&(t.mode&1?(e=ml,ml<<=1,!(ml&130023424)&&(ml=4194304)):e=1);var n=ke();t=It(t,e),t!==null&&(il(t,e,n),Ne(t,n))}function ev(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),sh(t,n)}function tv(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(g(314))}r!==null&&r.delete(e),sh(t,n)}var uh;uh=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Me.current)Ce=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Ce=!1,Um(t,e,n);Ce=!!(t.flags&131072)}else Ce=!1,Q&&e.flags&1048576&&fd(e,ho,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Al(t,e),t=e.pendingProps;var i=Wr(e,ye.current);Dr(e,n),i=ea(null,e,r,t,i,n);var l=ta();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,ze(r)?(l=!0,co(e)):l=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Xu(e),i.updater=Do,e.stateNode=i,i._reactInternals=e,tu(e,r,t,n),e=iu(null,e,r,!0,l,n)):(e.tag=0,Q&&l&&Uu(e),we(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Al(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=rv(r),t=rt(r,t),i){case 0:e=ru(null,e,r,t,n);break e;case 1:e=kc(null,e,r,t,n);break e;case 11:e=_c(null,e,r,t,n);break e;case 14:e=Sc(null,e,r,rt(r.type,t),n);break e}throw Error(g(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:rt(r,i),ru(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:rt(r,i),kc(t,e,r,i,n);case 3:e:{if(Qd(e),t===null)throw Error(g(387));r=e.pendingProps,l=e.memoizedState,i=l.element,md(t,e),vo(e,r,null,n);var o=e.memoizedState;if(r=o.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=l,e.memoizedState=l,e.flags&256){i=Ur(Error(g(423)),e),e=xc(t,e,r,n,i);break e}else if(r!==i){i=Ur(Error(g(424)),e),e=xc(t,e,r,n,i);break e}else for(Oe=rn(e.stateNode.containerInfo.firstChild),De=e,Q=!0,lt=null,n=wd(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ar(),r===i){e=Wt(t,e,n);break e}we(t,e,r,n)}e=e.child}return e;case 5:return _d(e),t===null&&qs(e),r=e.type,i=e.pendingProps,l=t!==null?t.memoizedProps:null,o=i.children,Ks(r,i)?o=null:l!==null&&Ks(r,l)&&(e.flags|=32),Hd(t,e),we(t,e,o,n),e.child;case 6:return t===null&&qs(e),null;case 13:return Gd(t,e,n);case 4:return Ju(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=$r(e,null,r,n):we(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:rt(r,i),_c(t,e,r,i,n);case 7:return we(t,e,e.pendingProps,n),e.child;case 8:return we(t,e,e.pendingProps.children,n),e.child;case 12:return we(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,l=e.memoizedProps,o=i.value,$(po,r._currentValue),r._currentValue=o,l!==null)if(ut(l.value,o)){if(l.children===i.children&&!Me.current){e=Wt(t,e,n);break e}}else for(l=e.child,l!==null&&(l.return=e);l!==null;){var s=l.dependencies;if(s!==null){o=l.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=Ot(-1,n&-n),u.tag=2;var a=l.updateQueue;if(a!==null){a=a.shared;var h=a.pending;h===null?u.next=u:(u.next=h.next,h.next=u),a.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),bs(l.return,n,e),s.lanes|=n;break}u=u.next}}else if(l.tag===10)o=l.type===e.type?null:l.child;else if(l.tag===18){if(o=l.return,o===null)throw Error(g(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),bs(o,n,e),o=l.sibling}else o=l.child;if(o!==null)o.return=l;else for(o=l;o!==null;){if(o===e){o=null;break}if(l=o.sibling,l!==null){l.return=o.return,o=l;break}o=o.return}l=o}we(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Dr(e,n),i=Ze(i),r=r(i),e.flags|=1,we(t,e,r,n),e.child;case 14:return r=e.type,i=rt(r,e.pendingProps),i=rt(r.type,i),Sc(t,e,r,i,n);case 15:return Ud(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:rt(r,i),Al(t,e),e.tag=1,ze(r)?(t=!0,co(e)):t=!1,Dr(e,n),gd(e,r,i),tu(e,r,i,n),iu(null,e,r,!0,t,n);case 19:return Kd(t,e,n);case 22:return Bd(t,e,n)}throw Error(g(156,e.tag))};function ah(t,e){return Df(t,e)}function nv(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xe(t,e,n,r){return new nv(t,e,n,r)}function fa(t){return t=t.prototype,!(!t||!t.isReactComponent)}function rv(t){if(typeof t=="function")return fa(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Nu)return 11;if(t===ju)return 14}return 2}function un(t,e){var n=t.alternate;return n===null?(n=Xe(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Ul(t,e,n,r,i,l){var o=2;if(r=t,typeof t=="function")fa(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case vr:return An(n.children,i,l,e);case zu:o=8,i|=8;break;case Es:return t=Xe(12,n,e,i|2),t.elementType=Es,t.lanes=l,t;case Ps:return t=Xe(13,n,e,i),t.elementType=Ps,t.lanes=l,t;case Cs:return t=Xe(19,n,e,i),t.elementType=Cs,t.lanes=l,t;case yf:return Ao(n,i,l,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case vf:o=10;break e;case gf:o=9;break e;case Nu:o=11;break e;case ju:o=14;break e;case Kt:o=16,r=null;break e}throw Error(g(130,t==null?t:typeof t,""))}return e=Xe(o,n,e,i),e.elementType=t,e.type=r,e.lanes=l,e}function An(t,e,n,r){return t=Xe(7,t,r,e),t.lanes=n,t}function Ao(t,e,n,r){return t=Xe(22,t,r,e),t.elementType=yf,t.lanes=n,t.stateNode={isHidden:!1},t}function gs(t,e,n){return t=Xe(6,t,null,e),t.lanes=n,t}function ys(t,e,n){return e=Xe(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function iv(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qo(0),this.expirationTimes=qo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qo(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function da(t,e,n,r,i,l,o,s,u){return t=new iv(t,e,n,s,u),e===1?(e=1,l===!0&&(e|=8)):e=0,l=Xe(3,null,null,e),t.current=l,l.stateNode=t,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xu(l),t}function lv(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hh)}catch(t){console.error(t)}}hh(),ff.exports=Ie;var cv=ff.exports,Dc=cv;xs.createRoot=Dc.createRoot,xs.hydrateRoot=Dc.hydrateRoot;let Lc=1;const va=["John","Jane","Sam","Anna","Michael","Sarah","Chris","Jessica"],ga=["Website Redesign","App Development","Marketing Strategy","Customer Outreach"],fv=["frontend","backend","ux","research","design","bug","feature"],dv=["low","medium","high"],hv=["todo","in-progress","done"];function*pv(t){const e=["Implement","Develop","Design","Test","Review","Refactor","Redesign","Enhance","Optimize","Fix"],n=["the login mechanism","the user dashboard","the settings page","database queries","UI/UX components","API endpoints","the checkout process","responsive layouts","error handling logic","the navigation menu"],r=["to improve user experience","to speed up load times","to enhance security","to prepare for the next release","following the latest design mockups","to address reported issues","for better mobile responsiveness","to comply with new regulations","to reflect customer feedback","to keep up with platform changes"],i=["Based on the latest UX research","To ensure seamless user experience","To cater to increasing user demands","Keeping scalability in mind","As outlined in the last meeting","Following the latest design specifications","To adhere to the updated requirements","While ensuring backward compatibility","To improve overall performance","And ensure proper error feedback to the user"],l=u=>u[Math.floor(Math.random()*u.length)],o=u=>{const a=Math.floor(Math.random()*u.length);return u.sort(()=>.5-Math.random()).slice(0,a)},s=()=>{const u=l(e),a=l(n),h=l(r),m=l(i);return[`${u} ${a}`,`${u} ${a} ${h}. ${m}.`]};for(let u=0;ut()),[i,l]=Se.useState(n.value);return Se.useEffect(()=>{const o=t();return r(o),l(o.value),o.on(s=>{l(s)})},e),[n,i]}const ws=Symbol("tag");let vv=0;function vu(t){return t[ws]===void 0&&Object.defineProperty(t,ws,{value:++vv,writable:!1,enumerable:!1}),t[ws]}const ph=Symbol("tupleSymbol"),mh=Symbol("joinResultSymbol");function gu(t){return Array.isArray(t)&&t[ph]===!0}function gv(t){return Object.defineProperty(t,ph,{value:!0,writable:!1,enumerable:!1}),Object.defineProperty(t,mh,{value:!0,writable:!1,enumerable:!1}),t}function Ic(t){return Array.isArray(t)&&t[mh]===!0}var yv=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},dt=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Fe,vh;class ya{constructor(){Fe.set(this,void 0),this[vh]="TuplableMap",yv(this,Fe,new Map,"f")}get size(){return dt(this,Fe,"f").size}clear(){dt(this,Fe,"f").clear()}delete(e){return dt(this,Fe,"f").delete(nr(e))}*entries(){for(const[e,n]of dt(this,Fe,"f").entries())yield n}*[(Fe=new WeakMap,Symbol.iterator)](){for(const[e,n]of dt(this,Fe,"f"))yield n}forEach(e,n){for(const[r,i]of this)e.call(n,i,r,this)}get(e){const n=dt(this,Fe,"f").get(nr(e));return n==null?void 0:n[1]}getWithDefault(e,n){const r=nr(e),i=dt(this,Fe,"f").get(r);return i===void 0&&dt(this,Fe,"f").set(r,[e,n]),i==null?n:i[1]}has(e){return dt(this,Fe,"f").has(nr(e))}*keys(){for(const[e,n]of this)yield e}set(e,n){return dt(this,Fe,"f").set(nr(e),[e,n]),this}*values(){for(const[e,n]of this)yield n}}vh=Symbol.toStringTag;function nr(t){return gu(t)?t.map(nr).join(""):typeof t=="object"?""+vu(t):t===null?"":t===void 0?"":t.toString()}var Wc=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},gn=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},ci,Bt,Bl;class te{constructor(e,n){ci.add(this),Bt.set(this,void 0),Wc(this,Bt,e,"f"),this.eventMetadata=n}get entries(){return gn(this,Bt,"f")}difference(e){return new te([...this.entries,...e.negate().entries],this.eventMetadata)}differenceAndConsolidate(e){return this.difference(e).consolidate()}concat(e){return new te([...this.entries,...e.entries],this.eventMetadata)}negate(){return new te(Ac(this.entries,([e,n])=>[e,-n]),this.eventMetadata)}consolidate(){return new te([...gn(this,ci,"m",Bl).call(this)],this.eventMetadata)}map(e){return new te(Ac(this.entries,([n,r])=>[e(n),r]),this.eventMetadata)}filter(e){return new te(wv(this.entries,([n,r])=>e(n)),this.eventMetadata)}iterate(e){let n=this,r=e(n);for(;!n.equals(r);)n=r,r=e(n)}equals(e){const n=gn(this,ci,"m",Bl).call(this),r=gn(e,ci,"m",Bl).call(e);if(n.size!==r.size)return!1;for(const[i,l]of n){const o=r.get(i);if(o===void 0||o!==l)return!1}return!0}toString(){return this.entries.toString()}_extend(e){Array.isArray(gn(this,Bt,"f"))||Wc(this,Bt,[...gn(this,Bt,"f")],"f");for(const n of e.entries)gn(this,Bt,"f").push(n)}}Bt=new WeakMap,ci=new WeakSet,Bl=function(){const e=new ya;for(const[n,r]of this.entries){if(r==0)continue;const i=e.get(n);if(i===void 0)e.set(n,r);else{const l=i+r;l===0?e.delete(n):e.set(n,l)}}return e};function Ac(t,e){function*n(){for(const r of t)yield e(r)}return{*[Symbol.iterator](){yield*n()}}}function wv(t,e){function*n(){for(const r of t)e(r)&&(yield r)}return{*[Symbol.iterator](){yield*n()}}}function gh(t){var e,n;return((e=t.eventMetadata)===null||e===void 0?void 0:e.cause)==="full_recompute"||((n=t.eventMetadata)===null||n===void 0?void 0:n.cause)==="partial_recompute"}var _s=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Xn=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},fi,rr,Hl;class yh{constructor(e,n){fi.set(this,void 0),rr.set(this,void 0),Hl.set(this,-1),this.queue=n,_s(this,fi,e,"f")}destroy(){Xn(this,fi,"f").removeReader(this),this.queue.clear()}setOperator(e){if(Xn(this,rr,"f")!=null)throw new Error("Operator already set!");_s(this,rr,e,"f")}notify(e){_s(this,Hl,e,"f"),Xn(this,rr,"f").run(e)}notifyCommitted(e){e===Xn(this,Hl,"f")&&Xn(this,rr,"f").notifyCommitted(e)}drain(e){const n=[];for(;;){const r=this.queue.peek();if(r==null||r.data[0]>e)break;n.push(r.data[1]),this.queue.dequeue()}return n}pull(e){this.queue.prepareForRecompute(),Xn(this,fi,"f").pull(e)}isEmpty(){return this.queue.isEmpty()}}fi=new WeakMap,rr=new WeakMap,Hl=new WeakMap;class _v extends yh{drain(e){return this.queue.isEmpty()?[new te([],null)]:super.drain(e)}}var ht=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},kt=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Ql,di,Ve,ir;class wh{constructor(){Ql.set(this,-1),di.set(this,!1),Ve.set(this,null),ir.set(this,null)}enqueue(e){if(e[0]<=ht(this,Ql,"f")){console.warn("enqueueing old data");return}if(gh(e[1]))if(ht(this,di,"f"))kt(this,di,!1,"f");else return;kt(this,Ql,e[0],"f");const n={data:e,next:null};ht(this,Ve,"f")==null?kt(this,Ve,n,"f"):ht(this,ir,"f").next=n,kt(this,ir,n,"f")}prepareForRecompute(){kt(this,di,!0,"f")}peek(){return ht(this,Ve,"f")}dequeue(){if(ht(this,Ve,"f")==null)return null;const e=ht(this,Ve,"f").data;return kt(this,Ve,ht(this,Ve,"f").next,"f"),ht(this,Ve,"f")==null&&kt(this,ir,null,"f"),e}isEmpty(){return ht(this,Ve,"f")==null}clear(){kt(this,Ve,null,"f"),kt(this,ir,null,"f")}}Ql=new WeakMap,di=new WeakMap,Ve=new WeakMap,ir=new WeakMap;var Eo=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Sv=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Po,_h,hi;class Sh{constructor(){Po.add(this),this.queues=[],this.readers=[],this.operator=null}setOperator(e){if(this.operator!=null)throw new Error("Operator already set!");this.operator=e}queueData(e){for(const n of this.queues)n.enqueue(e)}sendData(e,n){this.queueData([e,n]),this.notify(e)}pull(e){var n;(n=this.operator)===null||n===void 0||n.pull(e)}notify(e){for(const n of this.readers)n.notify(e)}notifyCommitted(e){for(const n of this.readers)n.notifyCommitted(e)}newReader(){const e=new wh;this.queues.push(e);const n=new yh(this,e);return this.readers.push(n),n}removeReader(e,n={autoCleanup:!0}){const r=this.readers.indexOf(e);r!==-1&&(this.readers.splice(r,1),this.queues.splice(r,1)),Eo(this,Po,"m",_h).call(this,n.autoCleanup||!1)}destroy(){var e;this.readers.length=0,(e=this.operator)===null||e===void 0||e.destroy()}}Po=new WeakSet,_h=function t(e,n=!1){if(e&&!n){setTimeout(()=>{Eo(this,Po,"m",t).call(this,e,!0)},0);return}e&&this.readers.length===0&&this.destroy()};class kh extends Sh{}class kv extends Sh{constructor(e){super(),hi.set(this,void 0),Sv(this,hi,e,"f")}pull(e){super.pull(e),Eo(this,hi,"f")._state==="stateful"&&Eo(this,hi,"f").resendAll(e)}newReader(){const e=new wh;this.queues.push(e);const n=new _v(this,e);return this.readers.push(n),n}}hi=new WeakMap;var xv=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Tv=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Gl;class xh{constructor(e,n,r){this.inputs=e,this.output=n,Gl.set(this,void 0),this._pendingWork=!1,xv(this,Gl,r,"f");for(const i of e)i.setOperator(this);this.output.setOperator(this)}run(e){Tv(this,Gl,"f").call(this,e)}notifyCommitted(e){this.output.notifyCommitted(e)}pendingWork(){if(this._pendingWork)return!0;for(const e of this.inputs)if(!e.isEmpty())return!0;return!1}pull(e){for(const n of this.inputs)n.pull(e)}destroy(){for(const e of this.inputs)e.destroy()}}Gl=new WeakMap;class wa extends xh{constructor(e,n,r){super([e],n,r)}inputMessages(e){var n,r;return(r=(n=this.inputs[0])===null||n===void 0?void 0:n.drain(e))!==null&&r!==void 0?r:[]}}class Yr extends wa{constructor(e,n,r){const i=l=>{for(const o of this.inputMessages(l))this.output.sendData(l,r(o))};super(e,n,i)}}class Ev extends Yr{constructor(e,n,r){const i=l=>l.map(r);super(e,n,i)}}class Pv extends Yr{constructor(e,n,r){const i=l=>l.filter(r);super(e,n,i)}}class Cv extends Yr{constructor(e,n){const r=i=>i.negate();super(e,n,r)}}class Th extends xh{constructor(e,n,r,i){super([e,n],r,i)}inputAMessages(e){var n,r;return(r=(n=this.inputs[0])===null||n===void 0?void 0:n.drain(e))!==null&&r!==void 0?r:[]}inputBMessages(e){var n,r;return(r=(n=this.inputs[1])===null||n===void 0?void 0:n.drain(e))!==null&&r!==void 0?r:[]}}var Jn=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},pi,mi;class Mv extends Th{constructor(e,n,r){const i=l=>{for(const o of this.inputAMessages(l))Jn(this,pi,"f").push(o);for(const o of this.inputBMessages(l))Jn(this,mi,"f").push(o);for(;Jn(this,pi,"f").length>0&&Jn(this,mi,"f").length>0;){const o=Jn(this,pi,"f").shift(),s=Jn(this,mi,"f").shift();this.output.sendData(l,o.concat(s))}};super(e,n,r,i),pi.set(this,[]),mi.set(this,[])}}pi=new WeakMap,mi=new WeakMap;class Cr{constructor(){this.index=new Map}add(e,n){let r=this.index.get(e);r===void 0&&(r=[],this.index.set(e,r)),r.push(n)}extend(e){for(const[n,r]of e.index)for(const i of r)this.add(n,i)}get(e){var n;return(n=this.index.get(e))!==null&&n!==void 0?n:[]}join(e){const n=[];for(const[r,i]of this.index){const l=e.index.get(r);if(l!==void 0)for(const[o,s]of i)for(const[u,a]of l){let h;Array.isArray(o)&&Ic(o)?h=o.concat(u):Array.isArray(u)&&Ic(u)?h=u.concat(o):h=[o,u],n.push([gv(h),s*a])}}return new te(n,null)}compact(e=[]){function n(i){const l=new ya;for(const[o,s]of i){if(s===0)continue;const u=l.get(o);if(u===void 0)l.set(o,s);else{const a=u+s;a===0?l.delete(o):l.set(o,a)}}return[...l.entries()]}const r=e.length!=0?e:[...this.index.keys()];for(const i of r){const l=this.index.get(i);if(l===void 0)continue;this.index.delete(i);const o=n(l);o.length!=0&&this.index.set(i,o)}}}var Ae=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},vi,gi,yi,wi;class zv extends Th{constructor(e,n,r,i,l){const o=s=>{for(const u of this.inputAMessages(s)){const a=new Cr;for(const[h,m]of u.entries)a.add(i(h),[h,m]);Ae(this,yi,"f").push(a)}for(const u of this.inputBMessages(s)){const a=new Cr;for(const[h,m]of u.entries)a.add(l(h),[h,m]);Ae(this,wi,"f").push(a)}for(;Ae(this,yi,"f").length>0&&Ae(this,wi,"f").length>0;){const u=new te([],null),a=Ae(this,yi,"f").shift(),h=Ae(this,wi,"f").shift();u._extend(a.join(Ae(this,gi,"f"))),Ae(this,vi,"f").extend(a),u._extend(Ae(this,vi,"f").join(h)),Ae(this,gi,"f").extend(h),this.output.sendData(s,u.consolidate()),Ae(this,vi,"f").compact(),Ae(this,gi,"f").compact()}};super(e,n,r,o),vi.set(this,new Cr),gi.set(this,new Cr),yi.set(this,[]),wi.set(this,[])}}vi=new WeakMap,gi=new WeakMap,yi=new WeakMap,wi=new WeakMap;var Zn=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},_i,Si;class Eh extends wa{constructor(e,n,r,i){const l=(s,u)=>{const a=new ya;for(const[h,m]of s){const p=(a.get(h)||0)+m;p===0?a.delete(h):a.set(h,p)}for(const[h,m]of u){const p=(a.get(h)||0)-m;p===0?a.delete(h):a.set(h,p)}return a.entries()},o=s=>{for(const u of this.inputMessages(s)){const a=new Set,h=[];for(const[p,y]of u.entries){const w=r(p);Zn(this,_i,"f").add(w,[p,y]),a.add(w)}for(const p of a){const y=Zn(this,_i,"f").get(p),w=Zn(this,Si,"f").get(p),S=i(y),O=l(S,w);for(const[f,c]of O)h.push([f,c]),Zn(this,Si,"f").add(p,[f,c])}this.output.sendData(s,new te(h,null));const m=[...a.values()];Zn(this,_i,"f").compact(m),Zn(this,Si,"f").compact(m)}};super(e,n,o),_i.set(this,new Cr),Si.set(this,new Cr)}}_i=new WeakMap,Si=new WeakMap;var $c=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Vc=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},lr;class Nv extends Eh{constructor(e,n,r){const i=l=>{let o=0;for(const[s,u]of l)o+=u;return[[o,1]]};super(e,n,r,i)}}class jv extends Yr{constructor(e,n){const r=i=>{var l;((l=i.eventMetadata)===null||l===void 0?void 0:l.cause)==="full_recompute"&&$c(this,lr,0,"f");for(const o of i.entries)$c(this,lr,Vc(this,lr,"f")+o[1],"f");return new te([[Vc(this,lr,"f"),1]],i.eventMetadata)};super(e,n,r),lr.set(this,0)}}lr=new WeakMap;var Uc=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Ss=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Kl,ki;class Fv extends wa{constructor(e,n,r){const i=l=>{Uc(this,ki,[],"f");for(const o of this.inputMessages(l))Ss(this,ki,"f").push(o),this.output.sendData(l,o)};super(e,n,i),Kl.set(this,void 0),ki.set(this,[]),Uc(this,Kl,r,"f")}notifyCommitted(e){for(const n of Ss(this,ki,"f"))for(const[r,i]of n.entries)i>0&&Ss(this,Kl,"f").call(this,r);this.output.notifyCommitted(e)}}Kl=new WeakMap,ki=new WeakMap;class Ph extends Yr{constructor(e,n,r,i){const l=o=>o.filter(s=>i(s,r)>=0);super(e,n,l)}}class xi{constructor(e,n,r=null,i=null){this.value=e,this.priority=n,this.left=r,this.right=i,this.size=1}getChild(e){return e?this.right:this.left}}class Rv extends Error{}var Cl=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},xt=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Ml,qn,zl,ii,Nl,yu;class Ho{constructor(e,n=!0,r=[],i=null){Ml.add(this),qn.set(this,void 0),zl.set(this,void 0),ii.set(this,void 0),Nl.set(this,!0),Cl(this,qn,e,"f"),this.ancestors=r,this.cursor=i,Cl(this,zl,e.version,"f"),Cl(this,ii,n,"f")}get data(){return this.cursor!==null?this.cursor.value:null}[(qn=new WeakMap,zl=new WeakMap,ii=new WeakMap,Nl=new WeakMap,Ml=new WeakSet,Symbol.iterator)](){return new Ho(xt(this,qn,"f"),xt(this,ii,"f"),[...this.ancestors],this.cursor)}next(){if(xt(this,qn,"f").version!==xt(this,zl,"f"))throw new Rv("Tree modified during iteration which is not allowed.");if(xt(this,ii,"f")&&xt(this,Nl,"f"))return Cl(this,Nl,!1,"f"),{done:!1,value:this.cursor!==null?this.cursor.value:null};if(this.cursor===null){const e=xt(this,qn,"f")._root;e!==null&&xt(this,Ml,"m",yu).call(this,e)}else if(this.cursor.right==null){let e;do if(e=this.cursor,this.ancestors.length)this.cursor=this.ancestors.pop();else{this.cursor=null;break}while(this.cursor.right===e)}else this.ancestors.push(this.cursor),xt(this,Ml,"m",yu).call(this,this.cursor.right);return{done:this.cursor===null,value:this.cursor!==null?this.cursor.value:null}}}yu=function(e){for(;e.left!==null;)this.ancestors.push(e),e=e.left;this.cursor=e};class _a{get version(){return this._version}constructor(e){this.root=null,this.comparator=e,this._version=0}static empty(){return Ov}get size(){var e,n;return(n=(e=this.root)===null||e===void 0?void 0:e.size)!==null&&n!==void 0?n:0}get _root(){return this.root}iteratorAfter(e){const n=this.lowerBound(e);for(;n.data!==null&&this.comparator(n.data,e)===0;)n.next();return n}lowerBound(e){let n=this.root;const r=new Ho(this);for(;n!==null;){const i=this.comparator(e,n.value);if(i===0)return r.cursor=n,r;r.ancestors.push(n),n=n.getChild(i>0)}for(let i=r.ancestors.length-1;i>=0;--i)if(n=r.ancestors[i],this.comparator(e,n.value)<0)return r.cursor=n,r.ancestors.length=i,r;return r.ancestors.length=0,r}add(e){this._version++;const n=Math.random();return this.root=this._insert(this.root,e,n),this}delete(e){return this.root=this._remove(this.root,e),this._version++,this}clear(){return this.root=null,this._version++,this}map(e){const n=[];for(const r of li(this.root))n.push(e(r));return n}filter(e){const n=[];for(const r of li(this.root))e(r)&&n.push(r);return n}reduce(e,n){let r=n;for(const i of li(this.root))r=e(r,i);return r}contains(e){return this._contains(this.root,e)}toArray(){const e=[];for(const n of li(this.root))e.push(n);return e}at(e){return this._getByIndex(this.root,e)}get(e){let n=this.root;for(;n;){const r=this.comparator(e,n.value);if(r===0)return n.value;r<0?n=n.left:n=n.right}return null}getMin(){return this.root?this._findMin(this.root).value:null}getMax(){if(!this.root)return null;let e=this.root;for(;e.right;)e=e.right;return e.value}_getByIndex(e,n){if(!e)return null;const r=e.left?e.left.size:0;return n===r?e.value:n0?a.right=this._insert(a.right,n,r):a.value=n,a.size=((l=(i=a.left)===null||i===void 0?void 0:i.size)!==null&&l!==void 0?l:0)+((s=(o=a.right)===null||o===void 0?void 0:o.size)!==null&&s!==void 0?s:0)+1,this._balance(a)}_remove(e,n){if(!e)return null;let r=e;const i=this.comparator(n,r.value);if(i<0)r.left=this._remove(r.left,n);else if(i>0)r.right=this._remove(r.right,n);else{if(!r.left)return r.right;if(!r.right)return r.left;const l=this._findMin(r.right);r.value=l.value,r.right=this._removeMin(r.right)}return r.size=1+(r.left?r.left.size:0)+(r.right?r.right.size:0),this._balance(r)}_removeMin(e){if(!e.left)return e.right;const n=e;return n.size=e.size-1,n.left=this._removeMin(e.left),n.right=e.right,n.size=1+(n.left?n.left.size:0)+(n.right?n.right.size:0),this._balance(n)}_findMin(e){for(;e.left;)e=e.left;return e}_balance(e){return e.right&&e.right.priority0||n;){for(;n;)e.push(n),n=n.left;n=e.pop(),yield n.value,n=n.right}}const Ov=new _a((t,e)=>0);var M=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Ge=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Mr,Qe,Nn,gt,tt,or,re,Ch,Bc,Hc,Qc;class Dv extends Yr{constructor(e,n,r,i){super(e,n,l=>M(this,Mr,"m",Ch).call(this,l)),Mr.add(this),Qe.set(this,void 0),Nn.set(this,void 0),gt.set(this,void 0),tt.set(this,void 0),or.set(this,void 0),re.set(this,void 0),Ge(this,Qe,new _a((l,o)=>i(l[0],o[0])),"f"),Ge(this,Nn,i,"f"),Ge(this,gt,r,"f")}}Qe=new WeakMap,Nn=new WeakMap,gt=new WeakMap,tt=new WeakMap,or=new WeakMap,re=new WeakMap,Mr=new WeakSet,Ch=function(e){if(M(this,gt,"f")===0)return new te([],e.eventMetadata);const n=[];for(const[r,i]of e.entries)if(i!==0){if(M(this,re,"f")>=M(this,gt,"f")&&gh(e))return new te(n,e.eventMetadata);i<0?M(this,Mr,"m",Bc).call(this,r,i,n):M(this,Mr,"m",Hc).call(this,r,i,n)}return new te(n,e.eventMetadata)},Bc=function(e,n,r){const i=M(this,or,"f"),l=M(this,tt,"f");if(i===void 0||l===void 0||M(this,Mr,"m",Qc).call(this,e,i,l))return;const o=M(this,Qe,"f").get([e,0]);if(o!=null){const[s,u]=o;u+n<=0?(Ge(this,re,M(this,re,"f")-u,"f"),M(this,Qe,"f").delete([e,0])):(Ge(this,re,M(this,re,"f")+n,"f"),M(this,Qe,"f").add([e,u+n])),r.push([e,n])}},Hc=function(e,n,r){if(M(this,or,"f")===void 0||M(this,tt,"f")===void 0){Ge(this,or,[e,n],"f"),Ge(this,tt,[e,n],"f"),Ge(this,re,M(this,re,"f")+n,"f"),M(this,Qe,"f").add([e,n]),r.push([e,n]);return}const i=M(this,Nn,"f").call(this,e,M(this,or,"f")[0])<0,l=M(this,Nn,"f").call(this,e,M(this,tt,"f")[0])>0;if(M(this,Qe,"f").size>=M(this,gt,"f")){if(i||l)return;Ge(this,re,M(this,re,"f")-M(this,tt,"f")[1],"f"),M(this,Qe,"f").delete(M(this,tt,"f")),r.push([M(this,tt,"f")[0],-M(this,tt,"f")[1]]),Ge(this,re,M(this,re,"f")+n,"f"),M(this,Qe,"f").add([e,n]),r.push([e,n]),Ge(this,tt,M(this,Qe,"f").getMax(),"f");return}if(M(this,re,"f")0&&M(this,re,"f")===M(this,gt,"f")};class an{constructor(e,n=0){this.root=null,this.comparator=e,this.version=n}static empty(){return Lv}get size(){var e,n;return(n=(e=this.root)===null||e===void 0?void 0:e.size)!==null&&n!==void 0?n:0}get _root(){return this.root}iteratorAfter(e){const n=this.lowerBound(e);for(;n.data!==null&&this.comparator(n.data,e)===0;)n.next();return n}lowerBound(e){let n=this.root;const r=new Ho(this);for(;n!==null;){const i=this.comparator(e,n.value);if(i===0)return r.cursor=n,r;r.ancestors.push(n),n=n.getChild(i>0)}for(let i=r.ancestors.length-1;i>=0;--i)if(n=r.ancestors[i],this.comparator(e,n.value)<0)return r.cursor=n,r.ancestors.length=i,r;return r.ancestors.length=0,r}add(e){const n=Math.random(),r=this._insert(this.root,e,n),i=new an(this.comparator,this.version+1);return i.root=r,i}delete(e){const n=this._remove(this.root,e),r=new an(this.comparator,this.version+1);return r.root=n,r}clear(){const e=new an(this.comparator,this.version+1);return e.root=null,e}map(e){const n=[];for(const r of bn(this.root))n.push(e(r));return n}filter(e){const n=[];for(const r of bn(this.root))e(r)&&n.push(r);return n}findIndex(e){let n=0;for(const r of bn(this.root)){if(e(r))return n;n+=1}return-1}reduce(e,n){let r=n;for(const i of bn(this.root))r=e(r,i);return r}contains(e){return this._contains(this.root,e)}toArray(){const e=[];for(const n of bn(this.root))e.push(n);return e}at(e){return this._getByIndex(this.root,e)}get(e){let n=this.root;for(;n;){const r=this.comparator(e,n.value);if(r===0)return n.value;r<0?n=n.left:n=n.right}return null}getMin(){return this.root?this._findMin(this.root).value:null}getMax(){if(!this.root)return null;let e=this.root;for(;e.right;)e=e.right;return e.value}_getByIndex(e,n){if(!e)return null;const r=e.left?e.left.size:0;return n===r?e.value:n0?a.right=this._insert(a.right,n,r):a.value=n,a.size=((l=(i=a.left)===null||i===void 0?void 0:i.size)!==null&&l!==void 0?l:0)+((s=(o=a.right)===null||o===void 0?void 0:o.size)!==null&&s!==void 0?s:0)+1,this._balance(a)}_remove(e,n){if(!e)return null;let r=new xi(e.value,e.priority,e.left,e.right);const i=this.comparator(n,r.value);if(i<0)r.left=this._remove(r.left,n);else if(i>0)r.right=this._remove(r.right,n);else{if(!r.left)return r.right;if(!r.right)return r.left;const l=this._findMin(r.right);r.value=l.value,r.right=this._removeMin(r.right)}return r.size=1+(r.left?r.left.size:0)+(r.right?r.right.size:0),this._balance(r)}_removeMin(e){if(!e.left)return e.right;const n=new xi(e.value,e.priority);return n.size=e.size-1,n.left=this._removeMin(e.left),n.right=e.right,n.size=1+(n.left?n.left.size:0)+(n.right?n.right.size:0),this._balance(n)}_findMin(e){for(;e.left;)e=e.left;return e}_balance(e){return e.right&&e.right.priority0||n;){for(;n;)e.push(n),n=n.left;n=e.pop(),yield n.value,n=n.right}}const Lv=new an((t,e)=>0);function Mh(t,e){if(gu(t)&&gu(e)){if(t.length>e.length)return 1;if(t.lengthr?1:0}return typeof t=="object"?1:typeof e=="object"||te?1:0}var Iv=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},ae=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Li,Sn,jn,Fn,wu;class Qo{constructor(e,n,r=Mh){Li.add(this),Sn.set(this,void 0),this.notifiedListenersVersion=-1,jn.set(this,new Set),Fn.set(this,new Set),this.materialite=e,Iv(this,Sn,n,"f"),this.comparator=r,this.reader=ae(this,Sn,"f").newReader();const i=this;this.reader.setOperator({run(l){i.run(l)},pull(){return null},notifyCommitted(l){i.notifyCommitted(i.value,l)},destroy(){ae(i,Sn,"f").removeReader(i.reader)}})}get stream(){return ae(this,Sn,"f")}pipe(e){return this.materialite.compute(e,this)}pull(){this.materialite.tx(()=>{this.reader.pull({expressions:[]})})}notify(e,n){for(const r of ae(this,Fn,"f"))r.onSignalChanged(e,n)}notifyCommitted(e,n){if(this.notifiedListenersVersion!==n){this.notifiedListenersVersion=n;for(const r of ae(this,jn,"f"))r(e,n)}}_derive(e){return ae(this,Fn,"f").add(e),()=>{ae(this,Fn,"f").delete(e),ae(this,Li,"m",wu).call(this,!0)}}on(e){return ae(this,jn,"f").add(e),()=>{this.off(e)}}off(e,n={autoCleanup:!0}){ae(this,jn,"f").delete(e),ae(this,Li,"m",wu).call(this,n.autoCleanup||!1)}destroy(){ae(this,jn,"f").clear(),ae(this,Fn,"f").clear(),ae(this,Sn,"f").removeReader(this.reader)}}Sn=new WeakMap,jn=new WeakMap,Fn=new WeakMap,Li=new WeakSet,wu=function t(e,n=!1){if(e&&!n){setTimeout(()=>{ae(this,Li,"m",t).call(this,e,!0)},0);return}e&&ae(this,jn,"f").size===0&&ae(this,Fn,"f").size===0&&this.destroy()};var _e=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},U=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},zr,kn,Nr,nt,Ee,Ii,Wi,zh,Nh,jh,Gc;class Sa extends Qo{constructor(e,n,r,i){super(e,n,r),zr.add(this),kn.set(this,new an(this.comparator)),Nr.set(this,void 0),nt.set(this,void 0),Ee.set(this,void 0),Ii.set(this,void 0),Wi.set(this,void 0),_e(this,Nr,i,"f"),i!==void 0?(_e(this,Ii,U(this,zr,"m",Nh),"f"),_e(this,Wi,U(this,zr,"m",jh),"f")):(_e(this,Ii,Wv,"f"),_e(this,Wi,Av,"f"))}rematerialize(e){const n=new Sa(this.materialite,this.stream,this.comparator,e);return _e(n,kn,U(this,kn,"f"),"f"),U(this,Ee,"f")!==void 0?this.materialite.tx(()=>{n.reader.pull({expressions:[{_tag:"after",comparator:this.comparator,cursor:U(this,Ee,"f")}]})}):this.materialite.tx(()=>{n.reader.pull({expressions:[]})}),n}get value(){return U(this,kn,"f")}run(e){var n;const r=this.reader.drain(e);let i=!1,l=U(this,kn,"f");for(const o of r)((n=o.eventMetadata)===null||n===void 0?void 0:n.cause)==="full_recompute"&&(l=new an(this.comparator),i=!0),[i,l]=U(this,zr,"m",zh).call(this,o,l)||i;_e(this,kn,l,"f"),i&&this.notify(l,e)}}kn=new WeakMap,Nr=new WeakMap,nt=new WeakMap,Ee=new WeakMap,Ii=new WeakMap,Wi=new WeakMap,zr=new WeakSet,zh=function(e,n){var r,i;let l=!1,o=!0;const s=e.entries[Symbol.iterator]();let u,a;(((r=e.eventMetadata)===null||r===void 0?void 0:r.cause)==="full_recompute"||((i=e.eventMetadata)===null||i===void 0?void 0:i.cause)==="partial_recompute")&&(a=e.eventMetadata.comparator);const h=(m,p)=>{p>0?(l=!0,n=U(this,Ii,"f").call(this,n,m)):p<0&&(l=!0,n=U(this,Wi,"f").call(this,n,m))};for(;!(u=s.next()).done&&!(a&&a===this.comparator&&U(this,Nr,"f")!==void 0&&n.size>=U(this,Nr,"f"));){o=!1;const[m,p]=u.value;let y=s.next();if(!y.done){const[w,S]=y.value;if(Math.abs(p)===1&&p===-S&&this.comparator(w,m)==0){l=!0,n=n.add(S>0?w:m);continue}}if(h(m,p),!y.done){const[w,S]=y.value;h(w,S)}}return[l||o,n]},Nh=function(e,n){const r=U(this,Nr,"f")||0;if(e.sizer)throw new Error(`Data size exceeded limit! ${e.size} | ${r}`);return this.comparator(n,U(this,Ee,"f"))>0||(e=e.add(n),e=e.delete(U(this,Ee,"f")),_e(this,Ee,e.getMax()||void 0,"f"),this.comparator(n,U(this,nt,"f"))<=0&&_e(this,nt,n,"f")),e},jh=function(e,n){const r=U(this,nt,"f")&&this.comparator(n,U(this,nt,"f")),i=U(this,Ee,"f")&&this.comparator(n,U(this,Ee,"f"));return r&&r<0||i&&i>0||(e=e.delete(n),r&&r===0&&_e(this,nt,n,"f"),i&&i===0&&_e(this,Ee,n,"f")),e},Gc=function(e){if(U(this,nt,"f")===void 0||U(this,Ee,"f")===void 0){_e(this,Ee,_e(this,nt,e,"f"),"f");return}if(this.comparator(e,U(this,nt,"f"))<=0){_e(this,nt,e,"f");return}if(this.comparator(e,U(this,Ee,"f"))>=0){_e(this,Ee,e,"f");return}};function Wv(t,e){return t=t.add(e),t}function Av(t,e){return t=t.delete(e),t}var Kc=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Yc=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},sr;class $v extends Qo{constructor(e,n,r){super(e,n),sr.set(this,void 0),Kc(this,sr,r,"f")}get value(){return Yc(this,sr,"f")}run(e){const n=this.reader.drain(e);if(n.length===0)return;const r=n[n.length-1];let i;for(const[o,s]of r.entries)s>0&&(i=o);if(i===void 0)return;const l=i;l!==Yc(this,sr,"f")?(Kc(this,sr,l,"f"),this.notify(l,e)):this.notifiedListenersVersion=e}}sr=new WeakMap;function Vv(t,e,n){let r=0,i=t.length-1;for(;r<=i;){let l=i+r>>1,o=n(e,t[l]);if(o>0)r=l+1;else if(o<0)i=l-1;else return l}return~r}function Fh(t,e,n){let r=!1;for(const i of t.entries){let[l,o]=i;const s=Vv(e,l,n);o>0?(r=!0,Uv(e,l,o,s)):o<0&&s!==-1&&(r=!0,Bv(e,l,Math.abs(o),s,n))}return r}function Uv(t,e,n,r){for(;n>0;)r===-1?t.push(e):t.splice(r,0,e),n-=1}function Bv(t,e,n,r,i){for(;n>0;){const l=t[r];if(l===void 0||i(l,e)!==0)break;t.splice(r,1),n-=1}}class Hv extends Qo{constructor(){super(...arguments),this.value=[]}run(e){let n=!1;this.reader.drain(e).forEach(r=>{var i;((i=r.eventMetadata)===null||i===void 0?void 0:i.cause)==="full_recompute"&&(n=this.value.length>0,this.value.length=0),n=Fh(r,this.value,this.comparator)||n}),n&&this.notify(this.value,e)}}var ks=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Qv=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},ur;class Gv extends Qo{constructor(){super(...arguments),ur.set(this,[])}get value(){return ks(this,ur,"f")}run(e){const n=this.reader.drain(e);if(n.length===0)return;let r,i=!1;r=[...ks(this,ur,"f")],n.forEach(l=>{var o;((o=l.eventMetadata)===null||o===void 0?void 0:o.cause)==="full_recompute"&&(i=ks(this,ur,"f").length>0,r=[]),i=Fh(l,r,this.comparator)||i}),Qv(this,ur,r,"f"),i&&this.notify(r,e)}}ur=new WeakMap;class Rh{constructor(e,n){this.materialite=e,this.writer=n}pull(e){this.writer.pull(e)}after(e,n){const r=this.newStream();return new Ph(this.writer.newReader(),r.writer,e,n),r}take(e,n){const r=this.newStream();return new Dv(this.writer.newReader(),r.writer,e,n),r}map(e){const n=this.newStream();return new Ev(this.writer.newReader(),n.writer,e),n}filter(e){const n=this.newStream();return new Pv(this.writer.newReader(),n.writer,e),n}negate(){const e=this.newStream();return new Cv(this.writer.newReader(),e.writer),e}concat(e){const n=this.newStream();return new Mv(this.writer.newReader(),e.writer.newReader(),n.writer),n}join(e,n,r){const i=this.newStream();return new zv(this.writer.newReader(),e.writer.newReader(),i.writer,n,r),i}reduce(e,n){const r=this.newStream();return new Eh(this.writer.newReader(),r.writer,n,e),r}count(e){const n=this.newStream();return new Nv(this.writer.newReader(),n.writer,e),n}size(){const e=this.newStream();return new jv(this.writer.newReader(),e.writer),e}materializeInto(e,n={wantInitialData:!0}){const r=e(this);return n.wantInitialData&&r.pull(),r}materialize(e,n={wantInitialData:!0}){return this.materializeInto(r=>new Sa(this.materialite,r,e,n.limit),n)}materializeArray(e,n={wantInitialData:!0}){return this.materializeInto(r=>new Hv(this.materialite,r,e),n)}materializeCopyOnWriteArray(e,n={wantInitialData:!0}){return this.materializeInto(r=>new Gv(this.materialite,r,e),n)}materializeValue(e,n={wantInitialData:!0}){return this.materializeInto(r=>new $v(this.materialite,r,e),n)}effect(e,n={wantInitialData:!0}){const r=this.newStream();return new Fv(this.writer.newReader(),r.writer,e),n.wantInitialData&&r.pull({expressions:[]}),r}queueData(e){this.writer.queueData(e)}notify(e){this.writer.notify(e)}notifyCommitted(e){this.writer.notifyCommitted(e)}newReader(){return this.writer.newReader()}removeReader(e,n={autoCleanup:!0}){this.writer.removeReader(e,n)}destroy(){this.writer.destroy()}}var Xc=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Jc=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Yl,Xl;class Kv extends Ph{constructor(e,n,r,i){super(e,n,r,i),Yl.set(this,void 0),Xl.set(this,void 0),Xc(this,Yl,i,"f"),Xc(this,Xl,r,"f")}pull(e){const n={_tag:"after",cursor:Jc(this,Xl,"f"),comparator:Jc(this,Yl,"f")};e.expressions.push(n),super.pull(e)}}Yl=new WeakMap,Xl=new WeakMap;class ka extends Rh{constructor(e){super(e,new kh)}pull(e){this.writer.pull(e)}newStream(){return new ka(this.materialite)}}class xa extends Rh{newStream(){return new ka(this.materialite)}after(e,n){const r=new xa(this.materialite,new kh);return new Kv(this.writer.newReader(),r.writer,e,n),r}}class Hr extends xa{constructor(e,n){super(e,new kv(n))}}var pt=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},D=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},ar,xn,cr,mt,Ue,fr,Tt;class Yv{constructor(e,n){this._state="stateful",this._sort="unsorted",ar.set(this,void 0),xn.set(this,void 0),cr.set(this,new Set),mt.set(this,void 0),Ue.set(this,[]),fr.set(this,!1),Tt.set(this,void 0),pt(this,xn,e,"f"),pt(this,mt,new Hr(e.materialite,this),"f"),pt(this,Tt,new Map,"f"),this.keyFn=n;const r=this;pt(this,ar,{onCommitPhase1(i){for(let l=0;l0?u:o),l+=1;continue}}s<0?D(r,Tt,"f").delete(n(o)):s>0&&D(r,Tt,"f").set(n(o),o)}D(r,fr,"f")?(pt(r,Ue,[],"f"),D(r,mt,"f").queueData([i,new te(Xv(D(r,Tt,"f")),{cause:"full_recompute"})])):(D(r,mt,"f").queueData([i,new te(D(r,Ue,"f"),null)]),pt(r,Ue,[],"f"))},onCommitPhase2(i){D(r,fr,"f")&&pt(r,fr,!1,"f"),D(r,mt,"f").notify(i);for(const l of D(r,cr,"f"))l(D(r,Tt,"f"))},onCommitted(i){D(r,mt,"f").notifyCommitted(i)},onRollback(){pt(r,Ue,[],"f")}},"f")}get stream(){return D(this,mt,"f")}get value(){return D(this,Tt,"f")}detachPipelines(){pt(this,mt,new Hr(D(this,xn,"f").materialite,this),"f")}destroy(){this.detachPipelines(),D(this,cr,"f").clear()}onChange(e){return D(this,cr,"f").add(e),()=>D(this,cr,"f").delete(e)}add(e){return D(this,Ue,"f").push([e,1]),D(this,xn,"f").addDirtySource(D(this,ar,"f")),this}delete(e){return D(this,Ue,"f").push([e,-1]),D(this,xn,"f").addDirtySource(D(this,ar,"f")),this}resendAll(e){return pt(this,fr,!0,"f"),D(this,xn,"f").addDirtySource(D(this,ar,"f")),this}}ar=new WeakMap,xn=new WeakMap,cr=new WeakMap,mt=new WeakMap,Ue=new WeakMap,fr=new WeakMap,Tt=new WeakMap;function Xv(t){function*e(){for(const n of t.values())yield[n,1]}return{*[Symbol.iterator](){yield*e()}}}var er=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},oe=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Ht,Tn,Qt,Et;class Jv{constructor(e){this._state="stateless",this._sort="unsorted",this.keyFn=r=>r,Ht.set(this,void 0),Tn.set(this,void 0),Qt.set(this,void 0),Et.set(this,[]),er(this,Qt,e,"f"),er(this,Ht,new Hr(e.materialite,this),"f");const n=this;er(this,Tn,{onCommitPhase1(r){oe(n,Ht,"f").queueData([r,new te(oe(n,Et,"f"),null)]),er(n,Et,[],"f")},onCommitPhase2(r){oe(n,Ht,"f").notify(r)},onCommitted(r){oe(n,Ht,"f").notifyCommitted(r)},onRollback(){er(n,Et,[],"f")}},"f")}get stream(){return oe(this,Ht,"f")}detachPipelines(){er(this,Ht,new Hr(oe(this,Qt,"f").materialite,this),"f")}destroy(){this.detachPipelines()}addAll(e){for(const n of e)oe(this,Et,"f").push([n,1]);return oe(this,Qt,"f").addDirtySource(oe(this,Tn,"f")),this}add(e){return oe(this,Et,"f").push([e,1]),oe(this,Qt,"f").addDirtySource(oe(this,Tn,"f")),this}delete(e){oe(this,Et,"f").push([e,-1]),oe(this,Qt,"f").addDirtySource(oe(this,Tn,"f"))}deleteAll(e){for(const n of e)oe(this,Et,"f").push([n,-1]);oe(this,Qt,"f").addDirtySource(oe(this,Tn,"f"))}}Ht=new WeakMap,Tn=new WeakMap,Qt=new WeakMap,Et=new WeakMap;var $e=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},I=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Pt,dr,hr,Be,En,He;class Oh{constructor(e,n,r){this._state="stateful",this._sort="sorted",Pt.set(this,void 0),dr.set(this,void 0),hr.set(this,new Set),Be.set(this,[]),En.set(this,null),He.set(this,void 0),this.materialite=e,$e(this,Pt,new Hr(e.materialite,this),"f"),$e(this,He,r(n),"f"),this.comparator=n;const i=this;$e(this,dr,{onCommitPhase1(l){for(let o=0;o0?a:s),"f"),o+=1;continue}}u<0?$e(i,He,I(i,He,"f").delete(s),"f"):u>0&&$e(i,He,I(i,He,"f").add(s),"f")}I(i,En,"f")?($e(i,Be,[],"f"),I(i,Pt,"f").queueData([l,new te(Zv(I(i,He,"f"),i.comparator,I(i,En,"f")),{cause:I(i,En,"f").expressions.length>0?"partial_recompute":"full_recompute",comparator:n})]),$e(i,En,null,"f")):(I(i,Pt,"f").queueData([l,new te(I(i,Be,"f"),null)]),$e(i,Be,[],"f"))},onCommitPhase2(l){I(i,Pt,"f").notify(l)},onCommitted(l){const o=I(i,He,"f");for(const s of I(i,hr,"f"))s(o);I(i,Pt,"f").notifyCommitted(l)},onRollback(){$e(i,Be,[],"f")}},"f")}get stream(){return I(this,Pt,"f")}get value(){return I(this,He,"f")}detachPipelines(){$e(this,Pt,new Hr(this.materialite.materialite,this),"f")}destroy(){this.detachPipelines(),I(this,hr,"f").clear()}onChange(e){return I(this,hr,"f").add(e),()=>I(this,hr,"f").delete(e)}add(e){return I(this,Be,"f").push([e,1]),this.materialite.addDirtySource(I(this,dr,"f")),this}delete(e){return I(this,Be,"f").push([e,-1]),this.materialite.addDirtySource(I(this,dr,"f")),this}resendAll(e){return $e(this,En,e,"f"),this.materialite.addDirtySource(I(this,dr,"f")),this}}Pt=new WeakMap,dr=new WeakMap,hr=new WeakMap,Be=new WeakMap,En=new WeakMap,He=new WeakMap;function Zv(t,e,n){const r=n.expressions.filter(i=>i._tag==="after")[0];return r&&r.comparator===e?{[Symbol.iterator](){return Zc(t.iteratorAfter(r.cursor))}}:{[Symbol.iterator](){return Zc(t)}}}function*Zc(t){for(const e of t)yield[e,1]}class Ta extends Oh{constructor(e,n){super(e,n,r=>new an(r))}withNewOrdering(e){const n=new Ta(this.materialite,e);return this.materialite.materialite.tx(()=>{for(const r of this.value)n.add(r)}),n}}class Ea extends Oh{constructor(e,n){super(e,n,r=>new _a(r))}withNewOrdering(e){const n=new Ea(this.materialite,e);return this.materialite.materialite.tx(()=>{for(const r of this.value)n.add(r)}),n}}var me=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},tr=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Rn,Jl,Ai,Pn,Zl,Ti,ql,Dh,qc,Lh,_u;class Co{constructor(e,...n){Rn.add(this),this.f=e,this.listeners=new Set,this.derivations=new Set,this.lastValue=void 0,Jl.set(this,-1),Ai.set(this,[]),Pn.set(this,0),Zl.set(this,-1),Ti.set(this,-1),ql.set(this,[]),this.signals=n,me(this,Ai,"f");const r=this;for(let i=0;ii.value))}get value(){return this.lastValue}pipe(e){return new Co(n=>e(n),this)}combine(e,...n){return new Co(e,this,...n)}_derive(e){return this.derivations.add(e),()=>{this.derivations.delete(e),me(this,Rn,"m",_u).call(this,!0)}}on(e){return this.listeners.add(e),()=>{this.off(e)}}off(e,n={autoCleanup:!0}){this.listeners.delete(e),me(this,Rn,"m",_u).call(this,n.autoCleanup||!1)}destroy(){for(const e of me(this,ql,"f"))e()}}Jl=new WeakMap,Ai=new WeakMap,Pn=new WeakMap,Zl=new WeakMap,Ti=new WeakMap,ql=new WeakMap,Rn=new WeakSet,Dh=function(e,n,r){var i;if(r<=me(this,Jl,"f")){console.warn("received stale data");return}if(me(this,Pn,"f")===0)tr(this,Zl,r,"f");else if(me(this,Zl,"f")!==r){console.warn("received data from different versions for the same tick");return}if(me(this,Ai,"f")[e]=n,tr(this,Pn,(i=me(this,Pn,"f"),i++,i),"f"),me(this,Pn,"f")===this.signals.length){tr(this,Jl,r,"f"),tr(this,Pn,0,"f");const l=this.f(...me(this,Ai,"f"));l!==this.lastValue?(this.lastValue=l,me(this,Rn,"m",qc).call(this,l,r)):tr(this,Ti,r,"f")}},qc=function(e,n){for(const r of this.derivations)r.onSignalChanged(e,n)},Lh=function(e,n){if(n!==me(this,Ti,"f")){tr(this,Ti,n,"f");for(const r of this.listeners)r(this.value,n);for(const r of this.derivations)r.onCommitted(this.value,n)}},_u=function(e){e&&this.listeners.size===0&&this.derivations.size===0&&this.destroy()};var yn=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},ee=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Cn,Ct,bl,Ei,Mn,zn;class qv{constructor(e,n){Cn.set(this,void 0),Ct.set(this,void 0),bl.set(this,void 0),Ei.set(this,void 0),Mn.set(this,new Set),zn.set(this,new Set),yn(this,Ct,n,"f"),yn(this,Ei,e,"f");const r=this;yn(this,bl,{onCommitPhase1(i){ee(r,Cn,"f")!==void 0&&(yn(r,Ct,ee(r,Cn,"f"),"f"),yn(r,Cn,void 0,"f"))},onCommitPhase2(i){for(const l of ee(r,zn,"f"))l.onSignalChanged(ee(r,Ct,"f"),i)},onCommitted(i){for(const l of ee(r,Mn,"f"))l(ee(r,Ct,"f"),i);for(const l of ee(r,zn,"f"))l.onCommitted(ee(r,Ct,"f"),i)},onRollback(){yn(r,Cn,void 0,"f")}},"f")}pipe(e){return ee(this,Ei,"f").materialite.compute(e,this)}_derive(e){return ee(this,zn,"f").add(e),()=>{ee(this,zn,"f").delete(e)}}on(e){return ee(this,Mn,"f").add(e),()=>{ee(this,Mn,"f").delete(e)}}off(e){ee(this,Mn,"f").delete(e)}destroy(){ee(this,Mn,"f").clear(),ee(this,zn,"f").clear()}get value(){return ee(this,Ct,"f")}set value(e){e!==ee(this,Ct,"f")&&(yn(this,Cn,e,"f"),ee(this,Ei,"f").addDirtySource(ee(this,bl,"f")))}}Cn=new WeakMap,Ct=new WeakMap,bl=new WeakMap,Ei=new WeakMap,Mn=new WeakMap,zn=new WeakMap;var In=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},J=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Pi,Nt,Zt,jt,Gt,Ih,Su;class bv{constructor(){Pi.add(this),Nt.set(this,void 0),Zt.set(this,new Set),jt.set(this,null),Gt.set(this,void 0),In(this,Nt,0,"f");const e=this;In(this,Gt,{materialite:this,addDirtySource(n){J(e,Zt,"f").add(n),J(e,jt,"f")===null&&(In(e,jt,J(e,Nt,"f")+1,"f"),J(e,Pi,"m",Su).call(e))}},"f")}newStatelessSet(){return new Jv(J(this,Gt,"f"))}newAtom(e){return new qv(J(this,Gt,"f"),e)}newImmutableSortedSet(e){return new Ta(J(this,Gt,"f"),e)}newSortedSet(e){return new Ea(J(this,Gt,"f"),e)}newUnorderedSet(e){return new Yv(J(this,Gt,"f"),e)}compute(e,...n){return new Co(e,...n)}tx(e){if(J(this,jt,"f")===null)In(this,jt,J(this,Nt,"f")+1,"f");else{e();return}try{e(),J(this,Pi,"m",Su).call(this)}catch(n){throw J(this,Pi,"m",Ih).call(this),n}finally{J(this,Zt,"f").clear()}}}Nt=new WeakMap,Zt=new WeakMap,jt=new WeakMap,Gt=new WeakMap,Pi=new WeakSet,Ih=function(){In(this,jt,null,"f");for(const e of J(this,Zt,"f"))e.onRollback()},Su=function(){In(this,Nt,J(this,jt,"f"),"f"),In(this,jt,null,"f");for(const e of J(this,Zt,"f"))e.onCommitPhase1(J(this,Nt,"f"));for(const e of J(this,Zt,"f"))e.onCommitPhase2(J(this,Nt,"f"));for(const e of J(this,Zt,"f"))e.onCommitted(J(this,Nt,"f"))};const pr=new bv,Wh=(t,e)=>t.id-e.id,e0=(t,e)=>{let n=t.taskId-e.taskId;return n!==0||(n=t.created-e.created,n!==0)?n:t.id-e.id},Pa=(t,e)=>{let n=t._tag.localeCompare(e._tag);if(n!==0)return n;switch(t._tag){case"filter":return t.key.localeCompare(e.key);case"selected":return t.id-e.id}},ge={tasks:pr.newSortedSet(Wh),appState:pr.newSortedSet(Pa),comments:pr.newSortedSet(e0),tx:pr.tx.bind(pr)};function t0(){pr.tx(()=>{for(const t of pv(1e6))ge.tasks.add(t)})}t0();const n0=({taskId:t})=>{function e(r,i){ge.tx(()=>{ge.tasks.delete(r),ge.tasks.add(i)})}const[,n]=ul(()=>ge.tasks.stream.filter(r=>r.id===t).materializeValue(null),[t]);return n==null?null:_.jsxs("div",{children:[_.jsx("h1",{className:"text-xl font-semibold mb-4",children:_.jsx("input",{type:"text",className:"w-full",onChange:r=>{e(n,{...n,title:r.target.value})},value:n.title})}),_.jsxs("div",{className:"mb-4",children:[_.jsx("label",{className:"block mb-2 font-medium",children:"Assignee:"}),_.jsx("select",{className:"border rounded w-full py-2 px-3",value:n.assignee,onChange:r=>e(n,{...n,assignee:r.target.value}),children:va.map(r=>_.jsx("option",{value:r,children:r},r))})]}),_.jsxs("div",{className:"mb-4",children:[_.jsx("label",{className:"block mb-2 font-medium",children:"Description:"}),_.jsx("textarea",{className:"border rounded w-full py-2 px-3",rows:5,value:n.description,onChange:r=>e(n,{...n,description:r.target.value})})]}),_.jsxs("div",{className:"mb-4",children:[_.jsx("label",{className:"block mb-2 font-medium",children:"Due Date:"}),_.jsx("input",{type:"date",className:"border rounded w-full py-2 px-3",value:n.dueDate.toISOString().split("T")[0],onChange:r=>e(n,{...n,dueDate:new Date(r.target.value)})})]}),_.jsxs("div",{className:"mb-4",children:[_.jsx("label",{className:"block mb-2 font-medium",children:"Status:"}),_.jsxs("select",{className:"border rounded w-full py-2 px-3",value:n.status,onChange:r=>e(n,{...n,status:r.target.value}),children:[_.jsx("option",{value:"todo",children:"To Do"}),_.jsx("option",{value:"in-progress",children:"In Progress"}),_.jsx("option",{value:"done",children:"Done"})]})]}),_.jsxs("div",{className:"mb-4",children:[_.jsx("label",{className:"block mb-2 font-medium",children:"Priority:"}),_.jsxs("select",{className:"border rounded w-full py-2 px-3",value:n.priority,onChange:r=>e(n,{...n,priority:r.target.value}),children:[_.jsx("option",{value:"low",children:"Low"}),_.jsx("option",{value:"medium",children:"Medium"}),_.jsx("option",{value:"high",children:"High"})]})]}),_.jsxs("div",{className:"mb-4",children:[_.jsx("label",{className:"block mb-2 font-medium",children:"Project:"}),_.jsx("select",{className:"border rounded w-full py-2 px-3",value:n.project,onChange:r=>e(n,{...n,project:r.target.value}),children:ga.map(r=>_.jsx("option",{value:r,children:r},r))})]})]})},r0=()=>{const[,t]=ul(()=>ge.appState.stream.filter(i=>i._tag==="filter").materialize(Pa),[]),e=t.reduce((i,l)=>(i[l.key]=l.value,i),{});function n(i,l){l!=null?ge.appState.add({_tag:"filter",key:i,value:l}):ge.appState.delete({_tag:"filter",key:i})}function r(i){return _.jsx("option",{value:i,children:i},i)}return _.jsx("div",{className:"fixed top-0 left-0 w-3/4 bg-white p-4 z-10",style:{boxShadow:"0 2px 2px -2px rgb(0 0 0 / 0.1)"},children:_.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[_.jsxs("div",{children:[_.jsx("label",{className:"m-2 inline-block w-24",children:"Assignee"}),_.jsxs("select",{className:"bg-green-100 p-2 rounded-md shadow-sm focus:ring focus:ring-blue-200 focus:outline-none w-64",value:e.assignee||"",onChange:i=>{n("assignee",i.target.value||void 0)},children:[_.jsx("option",{value:"",children:"Any"}),va.map(r)]})]}),_.jsxs("div",{children:[_.jsx("label",{className:"m-2 inline-block w-24",children:"Priority"}),_.jsxs("select",{className:"bg-green-100 p-2 rounded-md shadow-sm focus:ring focus:ring-blue-200 focus:outline-none w-64",value:e.priority||"",onChange:i=>{n("priority",i.target.value||void 0)},children:[_.jsx("option",{value:"",children:"Any"}),dv.map(r)]})]}),_.jsxs("div",{children:[_.jsx("label",{className:"m-2 inline-block w-24",children:"Project"}),_.jsxs("select",{className:"bg-green-100 p-2 rounded-md shadow-sm focus:ring focus:ring-blue-200 focus:outline-none w-64",value:e.project||"",onChange:i=>{n("project",i.target.value||void 0)},children:[_.jsx("option",{value:"",children:"Any"}),ga.map(r)]})]}),_.jsxs("div",{children:[_.jsx("label",{className:"m-2 inline-block w-24",children:"Status"}),_.jsxs("select",{className:"bg-green-100 p-2 rounded-md shadow-sm focus:ring focus:ring-blue-200 focus:outline-none w-64",value:e.status||"",onChange:i=>{n("status",i.target.value||void 0)},children:[_.jsx("option",{value:"",children:"Any"}),hv.map(r)]})]})]})})},i0="_container_1j1pj_1",l0={container:i0};function o0({header:t,footer:e,rowRenderer:n,width:r,height:i,rowHeight:l,dataStream:o,className:s,comparator:u}){var Kn;const a=af.useRef(null),h=Math.ceil(i/l),[m,p]=Se.useState(h*2),y=A=>{const q=A.target,be=q.scrollTop;z(be),Math.abs(be-vn)>C?w():S(),q.scrollHeight-q.scrollTop<=q.clientHeight+i&&f.size>=m&&p(m+h)};function w(){const A=a.current;if(!A)return;const q=A.scrollTop,be=Math.floor(q*((v-C)/(k-C))*(1/E));St(be),Xr(Math.round(be*N)),$t(q)}function S(){const A=a.current;if(!A)return;const q=A.scrollTop;if(q+mn>(at+1)*E){const be=at+1,al=Math.round(be*N),Go=q-N;A.scrollTop=vn,St(be),Xr(al),$t(Go)}else if(q+mn{let A;return O.current!=null&&o===O.current.stream?(A=O.current.rematerialize(m),O.current.destroy()):(p(h*2),A=o.materialize(u,{wantInitialData:!0,limit:h*2})),O.current=A,A},[o,m]),v=f.size*l,k=33554400,E=k/100,P=Math.ceil(v/E),C=i,W=l,N=(v-k)/(P-1)>0?(v-k)/(P-1):1,je=k>v?v:k,[at,St]=Se.useState(0),[mn,Xr]=Se.useState(0),[vn,$t]=Se.useState(0),[x,z]=Se.useState(((Kn=a.current)==null?void 0:Kn.scrollTop)||0),j=C,H=x+mn;let G=Math.floor((H-j)/W),Vt=Math.ceil((H+C+j)/W);G=Math.max(0,G),Vt=Math.min(v/W,Vt);const ct=[];for(let A=G;A<=Vt;++A){const q=f.at(A);if(!q)break;ct.push(n(q,{height:W}))}return _.jsx("div",{className:`${l0.container} ${s}`,onScroll:y,ref:a,style:{width:r,height:i},children:_.jsx("div",{style:{height:je,position:"relative",overflow:"hidden"},children:_.jsxs("table",{style:{width:"100%",position:"absolute",top:G*W-mn},className:"table",children:[t,_.jsx("tbody",{style:{position:"relative"},children:ct}),e]})})})}const s0=Se.memo(o0);function u0(t,e){let n=e;for(const{key:r,value:i}of t)i&&(n=n.filter(l=>l[r]===i));return n}const a0=({onTaskClick:t,selectedTask:e})=>{const n=window.innerHeight-160,r=50,[i,l]=af.useState(null),[o,s]=Se.useState(ge.tasks.stream),[,u]=ul(()=>ge.appState.stream.filter(h=>h._tag==="filter").materialize(Pa),[]);u!==i&&(l(u),o!==ge.tasks.stream&&o.destroy(),s(u0(u,ge.tasks.stream)));const a=Se.useCallback((h,m)=>_.jsx(c0,{row:h,style:m,selectedTask:e,onClick:()=>{t(h)}},h.id),[e]);return _.jsx("div",{className:"bg-gray-100 task-table",style:{marginTop:160,paddingTop:0,paddingLeft:30},children:_.jsx(s0,{className:"bg-white rounded-xl",width:"calc(100% - 30px)",height:n,dataStream:o,rowHeight:r,comparator:Wh,header:_.jsx("thead",{children:_.jsxs("tr",{children:[_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"ID"}),_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"Title"}),_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"Assignee"}),_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"Due Date"}),_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"Status"}),_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"Priority"}),_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"Project"}),_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"Labels"})]})}),rowRenderer:a})})};function c0({row:t,onClick:e,style:n,selectedTask:r}){return _.jsxs("tr",{style:n,className:`border-t cursor-pointer ${t.id===r?"bg-blue-200":"hover:bg-blue-100"}`,onClick:e,children:[_.jsx("td",{className:"py-2 px-3",children:t.id.toLocaleString()}),_.jsx("td",{className:"py-2 px-3",children:t.title}),_.jsx("td",{className:"py-2 px-3",children:t.assignee}),_.jsx("td",{className:"py-2 px-3",children:t.dueDate.toISOString().split("T")[0]}),_.jsx("td",{className:"py-2 px-3",children:t.status}),_.jsx("td",{className:"py-2 px-3",children:t.priority}),_.jsx("td",{className:"py-2 px-3",children:t.project}),_.jsx("td",{className:"py-2 px-3",children:t.labels.join(", ")})]})}function f0(){const[,t]=ul(()=>ge.appState.stream.filter(n=>n._tag==="selected").materializeValue(null),[]);function e(n){ge.tx(()=>{t&&ge.appState.delete({_tag:"selected",id:t.id}),ge.appState.add({_tag:"selected",id:n.id})})}return _.jsxs("div",{className:"flex h-screen",children:[_.jsxs("div",{className:"w-3/4 bg-gray-100 overflow-y-auto",children:[_.jsx(r0,{}),_.jsx(a0,{onTaskClick:e,selectedTask:(t==null?void 0:t.id)||null})]}),_.jsx("div",{className:"w-1/4 bg-white overflow-y-auto p-6",children:t?_.jsx(n0,{taskId:t.id}):_.jsx("div",{children:"Select a task to view details"})})]})}xs.createRoot(document.getElementById("root")).render(_.jsx(f0,{})); diff --git a/docs/assets/index-b3e0a08f.js b/docs/assets/index-b3e0a08f.js new file mode 100644 index 0000000..42634c8 --- /dev/null +++ b/docs/assets/index-b3e0a08f.js @@ -0,0 +1,40 @@ +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function Vh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var tf={exports:{}},No={},nf={exports:{}},F={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ll=Symbol.for("react.element"),Uh=Symbol.for("react.portal"),Bh=Symbol.for("react.fragment"),Hh=Symbol.for("react.strict_mode"),Qh=Symbol.for("react.profiler"),Gh=Symbol.for("react.provider"),Kh=Symbol.for("react.context"),Yh=Symbol.for("react.forward_ref"),Xh=Symbol.for("react.suspense"),Jh=Symbol.for("react.memo"),Zh=Symbol.for("react.lazy"),za=Symbol.iterator;function qh(t){return t===null||typeof t!="object"?null:(t=za&&t[za]||t["@@iterator"],typeof t=="function"?t:null)}var rf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lf=Object.assign,of={};function Kr(t,e,n){this.props=t,this.context=e,this.refs=of,this.updater=n||rf}Kr.prototype.isReactComponent={};Kr.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Kr.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function sf(){}sf.prototype=Kr.prototype;function Tu(t,e,n){this.props=t,this.context=e,this.refs=of,this.updater=n||rf}var Eu=Tu.prototype=new sf;Eu.constructor=Tu;lf(Eu,Kr.prototype);Eu.isPureReactComponent=!0;var Na=Array.isArray,uf=Object.prototype.hasOwnProperty,Pu={current:null},af={key:!0,ref:!0,__self:!0,__source:!0};function cf(t,e,n){var r,i={},l=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(l=""+e.key),e)uf.call(e,r)&&!af.hasOwnProperty(r)&&(i[r]=e[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,J=k[H];if(0>>1;Hi(yn,j))fti(wn,yn)?(k[H]=wn,k[ft]=j,H=ft):(k[H]=yn,k[$e]=j,H=$e);else if(fti(wn,j))k[H]=wn,k[ft]=j,H=ft;else break e}}return M}function i(k,M){var j=k.sortIndex-M.sortIndex;return j!==0?j:k.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var u=[],a=[],h=1,m=null,p=3,y=!1,w=!1,S=!1,D=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(k){for(var M=n(a);M!==null;){if(M.callback===null)r(a);else if(M.startTime<=k)r(a),M.sortIndex=M.expirationTime,e(u,M);else break;M=n(a)}}function v(k){if(S=!1,d(k),!w)if(n(u)!==null)w=!0,$t(T);else{var M=n(a);M!==null&&vn(v,M.startTime-k)}}function T(k,M){w=!1,S&&(S=!1,f(C),C=-1),y=!0;var j=p;try{for(d(M),m=n(u);m!==null&&(!(m.expirationTime>M)||k&&!ue());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var J=H(m.expirationTime<=M);M=t.unstable_now(),typeof J=="function"?m.callback=J:m===n(u)&&r(u),d(M)}else r(u);m=n(u)}if(m!==null)var gn=!0;else{var $e=n(a);$e!==null&&vn(v,$e.startTime-M),gn=!1}return gn}finally{m=null,p=j,y=!1}}var E=!1,P=null,C=-1,U=5,N=-1;function ue(){return!(t.unstable_now()-Nk||125H?(k.sortIndex=j,e(a,k),n(u)===null&&k===n(a)&&(S?(f(C),C=-1):S=!0,vn(v,j-H))):(k.sortIndex=J,e(u,k),w||y||(w=!0,$t(T))),k},t.unstable_shouldYield=ue,t.unstable_wrapCallback=function(k){var M=p;return function(){var j=p;p=M;try{return k.apply(this,arguments)}finally{p=j}}}})(mf);pf.exports=mf;var ap=pf.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var vf=we,Ie=ap;function g(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ps=Object.prototype.hasOwnProperty,cp=/^[: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]*$/,Fa={},Ra={};function fp(t){return Ps.call(Ra,t)?!0:Ps.call(Fa,t)?!1:cp.test(t)?Ra[t]=!0:(Fa[t]=!0,!1)}function dp(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function hp(t,e,n,r){if(e===null||typeof e>"u"||dp(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Pe(t,e,n,r,i,l,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=l,this.removeEmptyString=o}var he={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){he[t]=new Pe(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];he[e]=new Pe(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){he[t]=new Pe(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){he[t]=new Pe(t,2,!1,t,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(t){he[t]=new Pe(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){he[t]=new Pe(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){he[t]=new Pe(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){he[t]=new Pe(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){he[t]=new Pe(t,5,!1,t.toLowerCase(),null,!1,!1)});var Mu=/[\-:]([a-z])/g;function zu(t){return t[1].toUpperCase()}"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(t){var e=t.replace(Mu,zu);he[e]=new Pe(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Mu,zu);he[e]=new Pe(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Mu,zu);he[e]=new Pe(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){he[t]=new Pe(t,1,!1,t.toLowerCase(),null,!1,!1)});he.xlinkHref=new Pe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){he[t]=new Pe(t,1,!1,t.toLowerCase(),null,!0,!0)});function Nu(t,e,n,r){var i=he.hasOwnProperty(e)?he[e]:null;(i!==null?i.type!==0:r||!(2s||i[o]!==l[s]){var u=` +`+i[o].replace(" at new "," at ");return t.displayName&&u.includes("")&&(u=u.replace("",t.displayName)),u}while(1<=o&&0<=s);break}}}finally{Zo=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?ui(t):""}function pp(t){switch(t.tag){case 5:return ui(t.type);case 16:return ui("Lazy");case 13:return ui("Suspense");case 19:return ui("SuspenseList");case 0:case 2:case 15:return t=qo(t.type,!1),t;case 11:return t=qo(t.type.render,!1),t;case 1:return t=qo(t.type,!0),t;default:return""}}function Ns(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case yr:return"Fragment";case gr:return"Portal";case Cs:return"Profiler";case ju:return"StrictMode";case Ms:return"Suspense";case zs:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case wf:return(t.displayName||"Context")+".Consumer";case yf:return(t._context.displayName||"Context")+".Provider";case Fu:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Ru:return e=t.displayName||null,e!==null?e:Ns(t.type)||"Memo";case Gt:e=t._payload,t=t._init;try{return Ns(t(e))}catch{}}return null}function mp(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ns(e);case 8:return e===ju?"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(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function an(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Sf(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function vp(t){var e=Sf(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,l.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function pl(t){t._valueTracker||(t._valueTracker=vp(t))}function kf(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Sf(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function no(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function js(t,e){var n=e.checked;return K({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Da(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=an(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function xf(t,e){e=e.checked,e!=null&&Nu(t,"checked",e,!1)}function Fs(t,e){xf(t,e);var n=an(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Rs(t,e.type,n):e.hasOwnProperty("defaultValue")&&Rs(t,e.type,an(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function La(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Rs(t,e,n){(e!=="number"||no(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var ai=Array.isArray;function Rr(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=ml.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Bi(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var zi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},gp=["Webkit","ms","Moz","O"];Object.keys(zi).forEach(function(t){gp.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),zi[e]=zi[t]})});function Cf(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||zi.hasOwnProperty(t)&&zi[t]?(""+e).trim():e+"px"}function Mf(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Cf(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var yp=K({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ls(t,e){if(e){if(yp[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(g(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(g(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(g(61))}if(e.style!=null&&typeof e.style!="object")throw Error(g(62))}}function Is(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ws=null;function Ou(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var As=null,Or=null,Dr=null;function Aa(t){if(t=ul(t)){if(typeof As!="function")throw Error(g(280));var e=t.stateNode;e&&(e=Do(e),As(t.stateNode,t.type,e))}}function zf(t){Or?Dr?Dr.push(t):Dr=[t]:Or=t}function Nf(){if(Or){var t=Or,e=Dr;if(Dr=Or=null,Aa(t),e)for(t=0;t>>=0,t===0?32:31-(zp(t)/Np|0)|0}var vl=64,gl=4194304;function ci(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function oo(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,l=t.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=ci(s):(l&=o,l!==0&&(r=ci(l)))}else o=n&~i,o!==0?r=ci(o):l!==0&&(r=ci(l));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,l=e&-e,i>=l||i===16&&(l&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function ol(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ut(e),t[e]=n}function Op(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=ji),Ya=String.fromCharCode(32),Xa=!1;function Jf(t,e){switch(t){case"keyup":return um.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zf(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var wr=!1;function cm(t,e){switch(t){case"compositionend":return Zf(e);case"keypress":return e.which!==32?null:(Xa=!0,Ya);case"textInput":return t=e.data,t===Ya&&Xa?null:t;default:return null}}function fm(t,e){if(wr)return t==="compositionend"||!Uu&&Jf(t,e)?(t=Yf(),Ll=Au=Zt=null,wr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ba(n)}}function td(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?td(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function nd(){for(var t=window,e=no();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=no(t.document)}return e}function Bu(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function _m(t){var e=nd(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&td(n.ownerDocument.documentElement,n)){if(r!==null&&Bu(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!t.extend&&l>r&&(i=r,r=l,l=i),i=ec(n,l);var o=ec(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),l>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,_r=null,Qs=null,Ri=null,Gs=!1;function tc(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Gs||_r==null||_r!==no(r)||(r=_r,"selectionStart"in r&&Bu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ri&&Xi(Ri,r)||(Ri=r,r=ao(Qs,"onSelect"),0xr||(t.current=qs[xr],qs[xr]=null,xr--)}function A(t,e){xr++,qs[xr]=t.current,t.current=e}var cn={},ke=dn(cn),ze=dn(!1),Bn=cn;function $r(t,e){var n=t.type.contextTypes;if(!n)return cn;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=e[l];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Ne(t){return t=t.childContextTypes,t!=null}function fo(){V(ze),V(ke)}function uc(t,e,n){if(ke.current!==cn)throw Error(g(168));A(ke,e),A(ze,n)}function fd(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(g(108,mp(t)||"Unknown",i));return K({},n,r)}function ho(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||cn,Bn=ke.current,A(ke,t),A(ze,ze.current),!0}function ac(t,e,n){var r=t.stateNode;if(!r)throw Error(g(169));n?(t=fd(t,e,Bn),r.__reactInternalMemoizedMergedChildContext=t,V(ze),V(ke),A(ke,t)):V(ze),A(ze,n)}var zt=null,Lo=!1,ds=!1;function dd(t){zt===null?zt=[t]:zt.push(t)}function Fm(t){Lo=!0,dd(t)}function hn(){if(!ds&&zt!==null){ds=!0;var t=0,e=L;try{var n=zt;for(L=1;t>=o,i-=o,Ft=1<<32-ut(e)+i|n<C?(U=P,P=null):U=P.sibling;var N=p(f,P,d[C],v);if(N===null){P===null&&(P=U);break}t&&P&&N.alternate===null&&e(f,P),c=l(N,c,C),E===null?T=N:E.sibling=N,E=N,P=U}if(C===d.length)return n(f,P),B&&kn(f,C),T;if(P===null){for(;CC?(U=P,P=null):U=P.sibling;var ue=p(f,P,N.value,v);if(ue===null){P===null&&(P=U);break}t&&P&&ue.alternate===null&&e(f,P),c=l(ue,c,C),E===null?T=ue:E.sibling=ue,E=ue,P=U}if(N.done)return n(f,P),B&&kn(f,C),T;if(P===null){for(;!N.done;C++,N=d.next())N=m(f,N.value,v),N!==null&&(c=l(N,c,C),E===null?T=N:E.sibling=N,E=N);return B&&kn(f,C),T}for(P=r(f,P);!N.done;C++,N=d.next())N=y(P,f,C,N.value,v),N!==null&&(t&&N.alternate!==null&&P.delete(N.key===null?C:N.key),c=l(N,c,C),E===null?T=N:E.sibling=N,E=N);return t&&P.forEach(function(tt){return e(f,tt)}),B&&kn(f,C),T}function D(f,c,d,v){if(typeof d=="object"&&d!==null&&d.type===yr&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case hl:e:{for(var T=d.key,E=c;E!==null;){if(E.key===T){if(T=d.type,T===yr){if(E.tag===7){n(f,E.sibling),c=i(E,d.props.children),c.return=f,f=c;break e}}else if(E.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Gt&&vc(T)===E.type){n(f,E.sibling),c=i(E,d.props),c.ref=ri(f,E,d),c.return=f,f=c;break e}n(f,E);break}else e(f,E);E=E.sibling}d.type===yr?(c=Un(d.props.children,f.mode,v,d.key),c.return=f,f=c):(v=Hl(d.type,d.key,d.props,null,f.mode,v),v.ref=ri(f,c,d),v.return=f,f=v)}return o(f);case gr:e:{for(E=d.key;c!==null;){if(c.key===E)if(c.tag===4&&c.stateNode.containerInfo===d.containerInfo&&c.stateNode.implementation===d.implementation){n(f,c.sibling),c=i(c,d.children||[]),c.return=f,f=c;break e}else{n(f,c);break}else e(f,c);c=c.sibling}c=_s(d,f.mode,v),c.return=f,f=c}return o(f);case Gt:return E=d._init,D(f,c,E(d._payload),v)}if(ai(d))return w(f,c,d,v);if(qr(d))return S(f,c,d,v);Tl(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,c!==null&&c.tag===6?(n(f,c.sibling),c=i(c,d),c.return=f,f=c):(n(f,c),c=ws(d,f.mode,v),c.return=f,f=c),o(f)):n(f,c)}return D}var Ur=_d(!0),Sd=_d(!1),al={},St=dn(al),bi=dn(al),el=dn(al);function An(t){if(t===al)throw Error(g(174));return t}function qu(t,e){switch(A(el,e),A(bi,t),A(St,al),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ds(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Ds(e,t)}V(St),A(St,e)}function Br(){V(St),V(bi),V(el)}function kd(t){An(el.current);var e=An(St.current),n=Ds(e,t.type);e!==n&&(A(bi,t),A(St,n))}function bu(t){bi.current===t&&(V(St),V(bi))}var Q=dn(0);function wo(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var hs=[];function ea(){for(var t=0;tn?n:4,t(!0);var r=ps.transition;ps.transition={};try{t(!1),e()}finally{L=n,ps.transition=r}}function Wd(){return et().memoizedState}function Lm(t,e,n){var r=on(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ad(t))$d(e,n);else if(n=vd(t,e,n,r),n!==null){var i=Te();at(n,t,r,i),Vd(n,e,r)}}function Im(t,e,n){var r=on(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ad(t))$d(e,i);else{var l=t.alternate;if(t.lanes===0&&(l===null||l.lanes===0)&&(l=e.lastRenderedReducer,l!==null))try{var o=e.lastRenderedState,s=l(o,n);if(i.hasEagerState=!0,i.eagerState=s,ct(s,o)){var u=e.interleaved;u===null?(i.next=i,Ju(e)):(i.next=u.next,u.next=i),e.interleaved=i;return}}catch{}finally{}n=vd(t,e,i,r),n!==null&&(i=Te(),at(n,t,r,i),Vd(n,e,r))}}function Ad(t){var e=t.alternate;return t===G||e!==null&&e===G}function $d(t,e){Oi=_o=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Vd(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,Lu(t,n)}}var So={readContext:be,useCallback:me,useContext:me,useEffect:me,useImperativeHandle:me,useInsertionEffect:me,useLayoutEffect:me,useMemo:me,useReducer:me,useRef:me,useState:me,useDebugValue:me,useDeferredValue:me,useTransition:me,useMutableSource:me,useSyncExternalStore:me,useId:me,unstable_isNewReconciler:!1},Wm={readContext:be,useCallback:function(t,e){return gt().memoizedState=[t,e===void 0?null:e],t},useContext:be,useEffect:yc,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,$l(4194308,4,Rd.bind(null,e,t),n)},useLayoutEffect:function(t,e){return $l(4194308,4,t,e)},useInsertionEffect:function(t,e){return $l(4,2,t,e)},useMemo:function(t,e){var n=gt();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=gt();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=Lm.bind(null,G,t),[r.memoizedState,t]},useRef:function(t){var e=gt();return t={current:t},e.memoizedState=t},useState:gc,useDebugValue:la,useDeferredValue:function(t){return gt().memoizedState=t},useTransition:function(){var t=gc(!1),e=t[0];return t=Dm.bind(null,t[1]),gt().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=G,i=gt();if(B){if(n===void 0)throw Error(g(407));n=n()}else{if(n=e(),se===null)throw Error(g(349));Qn&30||Ed(r,e,n)}i.memoizedState=n;var l={value:n,getSnapshot:e};return i.queue=l,yc(Cd.bind(null,r,l,t),[t]),r.flags|=2048,rl(9,Pd.bind(null,r,l,n,e),void 0,null),n},useId:function(){var t=gt(),e=se.identifierPrefix;if(B){var n=Rt,r=Ft;n=(r&~(1<<32-ut(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=tl++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[wt]=e,t[qi]=r,Jd(t,e,!1,!1),e.stateNode=t;e:{switch(o=Is(n,r),n){case"dialog":$("cancel",t),$("close",t),i=r;break;case"iframe":case"object":case"embed":$("load",t),i=r;break;case"video":case"audio":for(i=0;iQr&&(e.flags|=128,r=!0,ii(l,!1),e.lanes=4194304)}else{if(!r)if(t=wo(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),ii(l,!0),l.tail===null&&l.tailMode==="hidden"&&!o.alternate&&!B)return ve(e),null}else 2*Z()-l.renderingStartTime>Qr&&n!==1073741824&&(e.flags|=128,r=!0,ii(l,!1),e.lanes=4194304);l.isBackwards?(o.sibling=e.child,e.child=o):(n=l.last,n!==null?n.sibling=o:e.child=o,l.last=o)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Z(),e.sibling=null,n=Q.current,A(Q,r?n&1|2:n&1),e):(ve(e),null);case 22:case 23:return fa(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Oe&1073741824&&(ve(e),e.subtreeFlags&6&&(e.flags|=8192)):ve(e),null;case 24:return null;case 25:return null}throw Error(g(156,e.tag))}function Gm(t,e){switch(Qu(e),e.tag){case 1:return Ne(e.type)&&fo(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Br(),V(ze),V(ke),ea(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return bu(e),null;case 13:if(V(Q),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(g(340));Vr()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return V(Q),null;case 4:return Br(),null;case 10:return Xu(e.type._context),null;case 22:case 23:return fa(),null;case 24:return null;default:return null}}var Pl=!1,_e=!1,Km=typeof WeakSet=="function"?WeakSet:Set,x=null;function Cr(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){X(t,e,r)}else n.current=null}function cu(t,e,n){try{n()}catch(r){X(t,e,r)}}var Cc=!1;function Ym(t,e){if(Ks=so,t=nd(),Bu(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var o=0,s=-1,u=-1,a=0,h=0,m=t,p=null;t:for(;;){for(var y;m!==n||i!==0&&m.nodeType!==3||(s=o+i),m!==l||r!==0&&m.nodeType!==3||(u=o+r),m.nodeType===3&&(o+=m.nodeValue.length),(y=m.firstChild)!==null;)p=m,m=y;for(;;){if(m===t)break t;if(p===n&&++a===i&&(s=o),p===l&&++h===r&&(u=o),(y=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=y}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ys={focusedElem:t,selectionRange:n},so=!1,x=e;x!==null;)if(e=x,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,x=t;else for(;x!==null;){e=x;try{var w=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,D=w.memoizedState,f=e.stateNode,c=f.getSnapshotBeforeUpdate(e.elementType===e.type?S:lt(e.type,S),D);f.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var d=e.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(g(163))}}catch(v){X(e,e.return,v)}if(t=e.sibling,t!==null){t.return=e.return,x=t;break}x=e.return}return w=Cc,Cc=!1,w}function Di(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var l=i.destroy;i.destroy=void 0,l!==void 0&&cu(e,n,l)}i=i.next}while(i!==r)}}function Ao(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function fu(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function bd(t){var e=t.alternate;e!==null&&(t.alternate=null,bd(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[wt],delete e[qi],delete e[Zs],delete e[Nm],delete e[jm])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function eh(t){return t.tag===5||t.tag===3||t.tag===4}function Mc(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||eh(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function du(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=co));else if(r!==4&&(t=t.child,t!==null))for(du(t,e,n),t=t.sibling;t!==null;)du(t,e,n),t=t.sibling}function hu(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(hu(t,e,n),t=t.sibling;t!==null;)hu(t,e,n),t=t.sibling}var ce=null,ot=!1;function Vt(t,e,n){for(n=n.child;n!==null;)th(t,e,n),n=n.sibling}function th(t,e,n){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(jo,n)}catch{}switch(n.tag){case 5:_e||Cr(n,e);case 6:var r=ce,i=ot;ce=null,Vt(t,e,n),ce=r,ot=i,ce!==null&&(ot?(t=ce,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):ce.removeChild(n.stateNode));break;case 18:ce!==null&&(ot?(t=ce,n=n.stateNode,t.nodeType===8?fs(t.parentNode,n):t.nodeType===1&&fs(t,n),Ki(t)):fs(ce,n.stateNode));break;case 4:r=ce,i=ot,ce=n.stateNode.containerInfo,ot=!0,Vt(t,e,n),ce=r,ot=i;break;case 0:case 11:case 14:case 15:if(!_e&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,o=l.destroy;l=l.tag,o!==void 0&&(l&2||l&4)&&cu(n,e,o),i=i.next}while(i!==r)}Vt(t,e,n);break;case 1:if(!_e&&(Cr(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){X(n,e,s)}Vt(t,e,n);break;case 21:Vt(t,e,n);break;case 22:n.mode&1?(_e=(r=_e)||n.memoizedState!==null,Vt(t,e,n),_e=r):Vt(t,e,n);break;default:Vt(t,e,n)}}function zc(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new Km),e.forEach(function(r){var i=rv.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function rt(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~l}if(r=i,r=Z()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Jm(r/1960))-r,10t?16:t,qt===null)var r=!1;else{if(t=qt,qt=null,To=0,R&6)throw Error(g(331));var i=R;for(R|=4,x=t.current;x!==null;){var l=x,o=l.child;if(x.flags&16){var s=l.deletions;if(s!==null){for(var u=0;uZ()-aa?Vn(t,0):ua|=n),je(t,e)}function ah(t,e){e===0&&(t.mode&1?(e=gl,gl<<=1,!(gl&130023424)&&(gl=4194304)):e=1);var n=Te();t=It(t,e),t!==null&&(ol(t,e,n),je(t,n))}function nv(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),ah(t,n)}function rv(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(g(314))}r!==null&&r.delete(e),ah(t,n)}var ch;ch=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||ze.current)Me=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Me=!1,Hm(t,e,n);Me=!!(t.flags&131072)}else Me=!1,B&&e.flags&1048576&&hd(e,mo,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Vl(t,e),t=e.pendingProps;var i=$r(e,ke.current);Ir(e,n),i=na(null,e,r,t,i,n);var l=ra();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ne(r)?(l=!0,ho(e)):l=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Zu(e),i.updater=Io,e.stateNode=i,i._reactInternals=e,ru(e,r,t,n),e=ou(null,e,r,!0,l,n)):(e.tag=0,B&&l&&Hu(e),xe(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Vl(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=lv(r),t=lt(r,t),i){case 0:e=lu(null,e,r,t,n);break e;case 1:e=Tc(null,e,r,t,n);break e;case 11:e=kc(null,e,r,t,n);break e;case 14:e=xc(null,e,r,lt(r.type,t),n);break e}throw Error(g(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:lt(r,i),lu(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:lt(r,i),Tc(t,e,r,i,n);case 3:e:{if(Kd(e),t===null)throw Error(g(387));r=e.pendingProps,l=e.memoizedState,i=l.element,gd(t,e),yo(e,r,null,n);var o=e.memoizedState;if(r=o.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=l,e.memoizedState=l,e.flags&256){i=Hr(Error(g(423)),e),e=Ec(t,e,r,n,i);break e}else if(r!==i){i=Hr(Error(g(424)),e),e=Ec(t,e,r,n,i);break e}else for(De=nn(e.stateNode.containerInfo.firstChild),Le=e,B=!0,st=null,n=Sd(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vr(),r===i){e=Wt(t,e,n);break e}xe(t,e,r,n)}e=e.child}return e;case 5:return kd(e),t===null&&eu(e),r=e.type,i=e.pendingProps,l=t!==null?t.memoizedProps:null,o=i.children,Xs(r,i)?o=null:l!==null&&Xs(r,l)&&(e.flags|=32),Gd(t,e),xe(t,e,o,n),e.child;case 6:return t===null&&eu(e),null;case 13:return Yd(t,e,n);case 4:return qu(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Ur(e,null,r,n):xe(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:lt(r,i),kc(t,e,r,i,n);case 7:return xe(t,e,e.pendingProps,n),e.child;case 8:return xe(t,e,e.pendingProps.children,n),e.child;case 12:return xe(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,l=e.memoizedProps,o=i.value,A(vo,r._currentValue),r._currentValue=o,l!==null)if(ct(l.value,o)){if(l.children===i.children&&!ze.current){e=Wt(t,e,n);break e}}else for(l=e.child,l!==null&&(l.return=e);l!==null;){var s=l.dependencies;if(s!==null){o=l.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=Ot(-1,n&-n),u.tag=2;var a=l.updateQueue;if(a!==null){a=a.shared;var h=a.pending;h===null?u.next=u:(u.next=h.next,h.next=u),a.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),tu(l.return,n,e),s.lanes|=n;break}u=u.next}}else if(l.tag===10)o=l.type===e.type?null:l.child;else if(l.tag===18){if(o=l.return,o===null)throw Error(g(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),tu(o,n,e),o=l.sibling}else o=l.child;if(o!==null)o.return=l;else for(o=l;o!==null;){if(o===e){o=null;break}if(l=o.sibling,l!==null){l.return=o.return,o=l;break}o=o.return}l=o}xe(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Ir(e,n),i=be(i),r=r(i),e.flags|=1,xe(t,e,r,n),e.child;case 14:return r=e.type,i=lt(r,e.pendingProps),i=lt(r.type,i),xc(t,e,r,i,n);case 15:return Hd(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:lt(r,i),Vl(t,e),e.tag=1,Ne(r)?(t=!0,ho(e)):t=!1,Ir(e,n),wd(e,r,i),ru(e,r,i,n),ou(null,e,r,!0,t,n);case 19:return Xd(t,e,n);case 22:return Qd(t,e,n)}throw Error(g(156,e.tag))};function fh(t,e){return If(t,e)}function iv(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ze(t,e,n,r){return new iv(t,e,n,r)}function ha(t){return t=t.prototype,!(!t||!t.isReactComponent)}function lv(t){if(typeof t=="function")return ha(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Fu)return 11;if(t===Ru)return 14}return 2}function sn(t,e){var n=t.alternate;return n===null?(n=Ze(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Hl(t,e,n,r,i,l){var o=2;if(r=t,typeof t=="function")ha(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case yr:return Un(n.children,i,l,e);case ju:o=8,i|=8;break;case Cs:return t=Ze(12,n,e,i|2),t.elementType=Cs,t.lanes=l,t;case Ms:return t=Ze(13,n,e,i),t.elementType=Ms,t.lanes=l,t;case zs:return t=Ze(19,n,e,i),t.elementType=zs,t.lanes=l,t;case _f:return Vo(n,i,l,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case yf:o=10;break e;case wf:o=9;break e;case Fu:o=11;break e;case Ru:o=14;break e;case Gt:o=16,r=null;break e}throw Error(g(130,t==null?t:typeof t,""))}return e=Ze(o,n,e,i),e.elementType=t,e.type=r,e.lanes=l,e}function Un(t,e,n,r){return t=Ze(7,t,r,e),t.lanes=n,t}function Vo(t,e,n,r){return t=Ze(22,t,r,e),t.elementType=_f,t.lanes=n,t.stateNode={isHidden:!1},t}function ws(t,e,n){return t=Ze(6,t,null,e),t.lanes=n,t}function _s(t,e,n){return e=Ze(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function ov(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=es(0),this.expirationTimes=es(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=es(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function pa(t,e,n,r,i,l,o,s,u){return t=new ov(t,e,n,s,u),e===1?(e=1,l===!0&&(e|=8)):e=0,l=Ze(3,null,null,e),t.current=l,l.stateNode=t,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zu(l),t}function sv(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mh)}catch(t){console.error(t)}}mh(),hf.exports=We;var dv=hf.exports,Ic=dv;Es.createRoot=Ic.createRoot,Es.hydrateRoot=Ic.hydrateRoot;let Wc=1;const ya=["John","Jane","Sam","Anna","Michael","Sarah","Chris","Jessica"],wa=["Website Redesign","App Development","Marketing Strategy","Customer Outreach"],hv=["frontend","backend","ux","research","design","bug","feature"],pv=["low","medium","high"],mv=["todo","in-progress","done"];function*vv(t){const e=["Implement","Develop","Design","Test","Review","Refactor","Redesign","Enhance","Optimize","Fix"],n=["the login mechanism","the user dashboard","the settings page","database queries","UI/UX components","API endpoints","the checkout process","responsive layouts","error handling logic","the navigation menu"],r=["to improve user experience","to speed up load times","to enhance security","to prepare for the next release","following the latest design mockups","to address reported issues","for better mobile responsiveness","to comply with new regulations","to reflect customer feedback","to keep up with platform changes"],i=["Based on the latest UX research","To ensure seamless user experience","To cater to increasing user demands","Keeping scalability in mind","As outlined in the last meeting","Following the latest design specifications","To adhere to the updated requirements","While ensuring backward compatibility","To improve overall performance","And ensure proper error feedback to the user"],l=u=>u[Math.floor(Math.random()*u.length)],o=u=>{const a=Math.floor(Math.random()*u.length);return u.sort(()=>.5-Math.random()).slice(0,a)},s=()=>{const u=l(e),a=l(n),h=l(r),m=l(i);return[`${u} ${a}`,`${u} ${a} ${h}. ${m}.`]};for(let u=0;ut()),[i,l]=we.useState(n.value);return we.useEffect(()=>{const o=t();return r(o),l(o.value),o.on(s=>{l(s)})},e),[n,i]}const Ss=Symbol("tag");let yv=0;function yu(t){return t[Ss]===void 0&&Object.defineProperty(t,Ss,{value:++yv,writable:!1,enumerable:!1}),t[Ss]}const vh=Symbol("tupleSymbol"),gh=Symbol("joinResultSymbol");function wu(t){return Array.isArray(t)&&t[vh]===!0}function wv(t){return Object.defineProperty(t,vh,{value:!0,writable:!1,enumerable:!1}),Object.defineProperty(t,gh,{value:!0,writable:!1,enumerable:!1}),t}function Ac(t){return Array.isArray(t)&&t[gh]===!0}var _v=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},ht=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Fe,yh;class _a{constructor(){Fe.set(this,void 0),this[yh]="TuplableMap",_v(this,Fe,new Map,"f")}get size(){return ht(this,Fe,"f").size}clear(){ht(this,Fe,"f").clear()}delete(e){return ht(this,Fe,"f").delete(ir(e))}*entries(){for(const[e,n]of ht(this,Fe,"f").entries())yield n}*[(Fe=new WeakMap,Symbol.iterator)](){for(const[e,n]of ht(this,Fe,"f"))yield n}forEach(e,n){for(const[r,i]of this)e.call(n,i,r,this)}get(e){const n=ht(this,Fe,"f").get(ir(e));return n==null?void 0:n[1]}getWithDefault(e,n){const r=ir(e),i=ht(this,Fe,"f").get(r);return i===void 0&&ht(this,Fe,"f").set(r,[e,n]),i==null?n:i[1]}has(e){return ht(this,Fe,"f").has(ir(e))}*keys(){for(const[e,n]of this)yield e}set(e,n){return ht(this,Fe,"f").set(ir(e),[e,n]),this}*values(){for(const[e,n]of this)yield n}}yh=Symbol.toStringTag;function ir(t){return wu(t)?t.map(ir).join(""):typeof t=="object"?""+yu(t):t===null?"":t===void 0?"":t.toString()}var $c=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},_n=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},di,Ut,Ql;class b{constructor(e,n){di.add(this),Ut.set(this,void 0),$c(this,Ut,e,"f"),this.eventMetadata=n}get entries(){return _n(this,Ut,"f")}difference(e){return new b([...this.entries,...e.negate().entries],this.eventMetadata)}differenceAndConsolidate(e){return this.difference(e).consolidate()}concat(e){return new b([...this.entries,...e.entries],this.eventMetadata)}negate(){return new b(Vc(this.entries,([e,n])=>[e,-n]),this.eventMetadata)}consolidate(){return new b([..._n(this,di,"m",Ql).call(this)],this.eventMetadata)}map(e){return new b(Vc(this.entries,([n,r])=>[e(n),r]),this.eventMetadata)}filter(e){return new b(Sv(this.entries,([n,r])=>e(n)),this.eventMetadata)}iterate(e){let n=this,r=e(n);for(;!n.equals(r);)n=r,r=e(n)}equals(e){const n=_n(this,di,"m",Ql).call(this),r=_n(e,di,"m",Ql).call(e);if(n.size!==r.size)return!1;for(const[i,l]of n){const o=r.get(i);if(o===void 0||o!==l)return!1}return!0}toString(){return this.entries.toString()}_extend(e){Array.isArray(_n(this,Ut,"f"))||$c(this,Ut,[..._n(this,Ut,"f")],"f");for(const n of e.entries)_n(this,Ut,"f").push(n)}}Ut=new WeakMap,di=new WeakSet,Ql=function(){const e=new _a;for(const[n,r]of this.entries){if(r==0)continue;const i=e.get(n);if(i===void 0)e.set(n,r);else{const l=i+r;l===0?e.delete(n):e.set(n,l)}}return e};function Vc(t,e){function*n(){for(const r of t)yield e(r)}return{*[Symbol.iterator](){yield*n()}}}function Sv(t,e){function*n(){for(const r of t)e(r)&&(yield r)}return{*[Symbol.iterator](){yield*n()}}}function wh(t){var e,n;return((e=t.eventMetadata)===null||e===void 0?void 0:e.cause)==="full_recompute"||((n=t.eventMetadata)===null||n===void 0?void 0:n.cause)==="partial_recompute"}var ks=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Zn=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},hi,lr,Gl;class _h{constructor(e,n){hi.set(this,void 0),lr.set(this,void 0),Gl.set(this,-1),this.queue=n,ks(this,hi,e,"f")}destroy(){Zn(this,hi,"f").removeReader(this),this.queue.clear()}setOperator(e){if(Zn(this,lr,"f")!=null)throw new Error("Operator already set!");ks(this,lr,e,"f")}notify(e){ks(this,Gl,e,"f"),Zn(this,lr,"f").run(e)}notifyCommitted(e){e===Zn(this,Gl,"f")&&Zn(this,lr,"f").notifyCommitted(e)}drain(e){const n=[];for(;;){const r=this.queue.peek();if(r==null||r.data[0]>e)break;n.push(r.data[1]),this.queue.dequeue()}return n}pull(e){this.queue.prepareForRecompute(),Zn(this,hi,"f").pull(e)}isEmpty(){return this.queue.isEmpty()}}hi=new WeakMap,lr=new WeakMap,Gl=new WeakMap;class kv extends _h{drain(e){return this.queue.isEmpty()?[new b([],null)]:super.drain(e)}}var pt=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},kt=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Kl,pi,Be,or;class Sh{constructor(){Kl.set(this,-1),pi.set(this,!1),Be.set(this,null),or.set(this,null)}enqueue(e){if(e[0]<=pt(this,Kl,"f")){console.warn("enqueueing old data");return}if(wh(e[1]))if(pt(this,pi,"f"))kt(this,pi,!1,"f");else return;kt(this,Kl,e[0],"f");const n={data:e,next:null};pt(this,Be,"f")==null?kt(this,Be,n,"f"):pt(this,or,"f").next=n,kt(this,or,n,"f")}prepareForRecompute(){kt(this,pi,!0,"f")}peek(){return pt(this,Be,"f")}dequeue(){if(pt(this,Be,"f")==null)return null;const e=pt(this,Be,"f").data;return kt(this,Be,pt(this,Be,"f").next,"f"),pt(this,Be,"f")==null&&kt(this,or,null,"f"),e}isEmpty(){return pt(this,Be,"f")==null}clear(){kt(this,Be,null,"f"),kt(this,or,null,"f")}}Kl=new WeakMap,pi=new WeakMap,Be=new WeakMap,or=new WeakMap;var Co=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},xv=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Mo,kh,mi;class xh{constructor(){Mo.add(this),this.queues=[],this.readers=[],this.operator=null}setOperator(e){if(this.operator!=null)throw new Error("Operator already set!");this.operator=e}queueData(e){for(const n of this.queues)n.enqueue(e)}sendData(e,n){this.queueData([e,n]),this.notify(e)}pull(e){var n;(n=this.operator)===null||n===void 0||n.pull(e)}notify(e){for(const n of this.readers)n.notify(e)}notifyCommitted(e){for(const n of this.readers)n.notifyCommitted(e)}newReader(){const e=new Sh;this.queues.push(e);const n=new _h(this,e);return this.readers.push(n),n}removeReader(e,n={autoCleanup:!0}){const r=this.readers.indexOf(e);r!==-1&&(this.readers.splice(r,1),this.queues.splice(r,1)),Co(this,Mo,"m",kh).call(this,n.autoCleanup||!1)}destroy(){var e;this.readers.length=0,(e=this.operator)===null||e===void 0||e.destroy()}}Mo=new WeakSet,kh=function t(e,n=!1){if(e&&!n){setTimeout(()=>{Co(this,Mo,"m",t).call(this,e,!0)},0);return}e&&this.readers.length===0&&this.destroy()};class Th extends xh{}class Tv extends xh{constructor(e){super(),mi.set(this,void 0),xv(this,mi,e,"f")}pull(e){super.pull(e),Co(this,mi,"f")._state==="stateful"&&Co(this,mi,"f").resendAll(e)}newReader(){const e=new Sh;this.queues.push(e);const n=new kv(this,e);return this.readers.push(n),n}}mi=new WeakMap;var Ev=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Pv=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Yl;class Eh{constructor(e,n,r){this.inputs=e,this.output=n,Yl.set(this,void 0),this._pendingWork=!1,Ev(this,Yl,r,"f");for(const i of e)i.setOperator(this);this.output.setOperator(this)}run(e){Pv(this,Yl,"f").call(this,e)}notifyCommitted(e){this.output.notifyCommitted(e)}pendingWork(){if(this._pendingWork)return!0;for(const e of this.inputs)if(!e.isEmpty())return!0;return!1}pull(e){for(const n of this.inputs)n.pull(e)}destroy(){for(const e of this.inputs)e.destroy()}}Yl=new WeakMap;class Sa extends Eh{constructor(e,n,r){super([e],n,r)}inputMessages(e){var n,r;return(r=(n=this.inputs[0])===null||n===void 0?void 0:n.drain(e))!==null&&r!==void 0?r:[]}}class Jr extends Sa{constructor(e,n,r){const i=l=>{for(const o of this.inputMessages(l))this.output.sendData(l,r(o))};super(e,n,i)}}class Cv extends Jr{constructor(e,n,r){const i=l=>l.map(r);super(e,n,i)}}class Mv extends Jr{constructor(e,n,r){const i=l=>l.filter(r);super(e,n,i)}}class zv extends Jr{constructor(e,n){const r=i=>i.negate();super(e,n,r)}}class Ph extends Eh{constructor(e,n,r,i){super([e,n],r,i)}inputAMessages(e){var n,r;return(r=(n=this.inputs[0])===null||n===void 0?void 0:n.drain(e))!==null&&r!==void 0?r:[]}inputBMessages(e){var n,r;return(r=(n=this.inputs[1])===null||n===void 0?void 0:n.drain(e))!==null&&r!==void 0?r:[]}}var qn=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},vi,gi;class Nv extends Ph{constructor(e,n,r){const i=l=>{for(const o of this.inputAMessages(l))qn(this,vi,"f").push(o);for(const o of this.inputBMessages(l))qn(this,gi,"f").push(o);for(;qn(this,vi,"f").length>0&&qn(this,gi,"f").length>0;){const o=qn(this,vi,"f").shift(),s=qn(this,gi,"f").shift();this.output.sendData(l,o.concat(s))}};super(e,n,r,i),vi.set(this,[]),gi.set(this,[])}}vi=new WeakMap,gi=new WeakMap;class zr{constructor(){this.index=new Map}add(e,n){let r=this.index.get(e);r===void 0&&(r=[],this.index.set(e,r)),r.push(n)}extend(e){for(const[n,r]of e.index)for(const i of r)this.add(n,i)}get(e){var n;return(n=this.index.get(e))!==null&&n!==void 0?n:[]}join(e){const n=[];for(const[r,i]of this.index){const l=e.index.get(r);if(l!==void 0)for(const[o,s]of i)for(const[u,a]of l){let h;Array.isArray(o)&&Ac(o)?h=o.concat(u):Array.isArray(u)&&Ac(u)?h=u.concat(o):h=[o,u],n.push([wv(h),s*a])}}return new b(n,null)}compact(e=[]){function n(i){const l=new _a;for(const[o,s]of i){if(s===0)continue;const u=l.get(o);if(u===void 0)l.set(o,s);else{const a=u+s;a===0?l.delete(o):l.set(o,a)}}return[...l.entries()]}const r=e.length!=0?e:[...this.index.keys()];for(const i of r){const l=this.index.get(i);if(l===void 0)continue;this.index.delete(i);const o=n(l);o.length!=0&&this.index.set(i,o)}}}var Ve=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},yi,wi,_i,Si;class jv extends Ph{constructor(e,n,r,i,l){const o=s=>{for(const u of this.inputAMessages(s)){const a=new zr;for(const[h,m]of u.entries)a.add(i(h),[h,m]);Ve(this,_i,"f").push(a)}for(const u of this.inputBMessages(s)){const a=new zr;for(const[h,m]of u.entries)a.add(l(h),[h,m]);Ve(this,Si,"f").push(a)}for(;Ve(this,_i,"f").length>0&&Ve(this,Si,"f").length>0;){const u=new b([],null),a=Ve(this,_i,"f").shift(),h=Ve(this,Si,"f").shift();u._extend(a.join(Ve(this,wi,"f"))),Ve(this,yi,"f").extend(a),u._extend(Ve(this,yi,"f").join(h)),Ve(this,wi,"f").extend(h),this.output.sendData(s,u.consolidate()),Ve(this,yi,"f").compact(),Ve(this,wi,"f").compact()}};super(e,n,r,o),yi.set(this,new zr),wi.set(this,new zr),_i.set(this,[]),Si.set(this,[])}}yi=new WeakMap,wi=new WeakMap,_i=new WeakMap,Si=new WeakMap;var bn=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},ki,xi;class Ch extends Sa{constructor(e,n,r,i){const l=(s,u)=>{const a=new _a;for(const[h,m]of s){const p=(a.get(h)||0)+m;p===0?a.delete(h):a.set(h,p)}for(const[h,m]of u){const p=(a.get(h)||0)-m;p===0?a.delete(h):a.set(h,p)}return a.entries()},o=s=>{for(const u of this.inputMessages(s)){const a=new Set,h=[];for(const[p,y]of u.entries){const w=r(p);bn(this,ki,"f").add(w,[p,y]),a.add(w)}for(const p of a){const y=bn(this,ki,"f").get(p),w=bn(this,xi,"f").get(p),S=i(y),D=l(S,w);for(const[f,c]of D)h.push([f,c]),bn(this,xi,"f").add(p,[f,c])}this.output.sendData(s,new b(h,null));const m=[...a.values()];bn(this,ki,"f").compact(m),bn(this,xi,"f").compact(m)}};super(e,n,o),ki.set(this,new zr),xi.set(this,new zr)}}ki=new WeakMap,xi=new WeakMap;var Uc=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Bc=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},sr;class Fv extends Ch{constructor(e,n,r){const i=l=>{let o=0;for(const[s,u]of l)o+=u;return[[o,1]]};super(e,n,r,i)}}class Rv extends Jr{constructor(e,n){const r=i=>{var l;((l=i.eventMetadata)===null||l===void 0?void 0:l.cause)==="full_recompute"&&Uc(this,sr,0,"f");for(const o of i.entries)Uc(this,sr,Bc(this,sr,"f")+o[1],"f");return new b([[Bc(this,sr,"f"),1]],i.eventMetadata)};super(e,n,r),sr.set(this,0)}}sr=new WeakMap;var Hc=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},xs=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Xl,Ti;class Ov extends Sa{constructor(e,n,r){const i=l=>{Hc(this,Ti,[],"f");for(const o of this.inputMessages(l))xs(this,Ti,"f").push(o),this.output.sendData(l,o)};super(e,n,i),Xl.set(this,void 0),Ti.set(this,[]),Hc(this,Xl,r,"f")}notifyCommitted(e){for(const n of xs(this,Ti,"f"))for(const[r,i]of n.entries)i>0&&xs(this,Xl,"f").call(this,r);this.output.notifyCommitted(e)}}Xl=new WeakMap,Ti=new WeakMap;class Mh extends Jr{constructor(e,n,r,i){const l=o=>o.filter(s=>i(s,r)>=0);super(e,n,l)}}class Ei{constructor(e,n,r=null,i=null){this.value=e,this.priority=n,this.left=r,this.right=i,this.size=1}getChild(e){return e?this.right:this.left}}class Dv extends Error{}var zl=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},xt=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Nl,er,jl,oi,Fl,_u;class Go{constructor(e,n=!0,r=[],i=null){Nl.add(this),er.set(this,void 0),jl.set(this,void 0),oi.set(this,void 0),Fl.set(this,!0),zl(this,er,e,"f"),this.ancestors=r,this.cursor=i,zl(this,jl,e.version,"f"),zl(this,oi,n,"f")}get data(){return this.cursor!==null?this.cursor.value:null}[(er=new WeakMap,jl=new WeakMap,oi=new WeakMap,Fl=new WeakMap,Nl=new WeakSet,Symbol.iterator)](){return new Go(xt(this,er,"f"),xt(this,oi,"f"),[...this.ancestors],this.cursor)}next(){if(xt(this,er,"f").version!==xt(this,jl,"f"))throw new Dv("Tree modified during iteration which is not allowed.");if(xt(this,oi,"f")&&xt(this,Fl,"f"))return zl(this,Fl,!1,"f"),{done:this.cursor===null,value:this.cursor!==null?this.cursor.value:null};if(this.cursor===null){const e=xt(this,er,"f")._root;e!==null&&xt(this,Nl,"m",_u).call(this,e)}else if(this.cursor.right==null){let e;do if(e=this.cursor,this.ancestors.length)this.cursor=this.ancestors.pop();else{this.cursor=null;break}while(this.cursor.right===e)}else this.ancestors.push(this.cursor),xt(this,Nl,"m",_u).call(this,this.cursor.right);return{done:this.cursor===null,value:this.cursor!==null?this.cursor.value:null}}}_u=function(e){for(;e.left!==null;)this.ancestors.push(e),e=e.left;this.cursor=e};class ka{get version(){return this._version}constructor(e){this.root=null,this.comparator=e,this._version=0}static empty(){return Lv}get size(){var e,n;return(n=(e=this.root)===null||e===void 0?void 0:e.size)!==null&&n!==void 0?n:0}get _root(){return this.root}iteratorAfter(e){const n=this.lowerBound(e);for(;n.data!==null&&this.comparator(n.data,e)===0;)n.next();return n}lowerBound(e){let n=this.root;const r=new Go(this);for(;n!==null;){const i=this.comparator(e,n.value);if(i===0)return r.cursor=n,r;r.ancestors.push(n),n=n.getChild(i>0)}for(let i=r.ancestors.length-1;i>=0;--i)if(n=r.ancestors[i],this.comparator(e,n.value)<0)return r.cursor=n,r.ancestors.length=i,r;return r.ancestors.length=0,r}add(e){this._version++;const n=Math.random();return this.root=this._insert(this.root,e,n),this}delete(e){return this.root=this._remove(this.root,e),this._version++,this}clear(){return this.root=null,this._version++,this}map(e){const n=[];for(const r of si(this.root))n.push(e(r));return n}filter(e){const n=[];for(const r of si(this.root))e(r)&&n.push(r);return n}reduce(e,n){let r=n;for(const i of si(this.root))r=e(r,i);return r}contains(e){return this._contains(this.root,e)}toArray(){const e=[];for(const n of si(this.root))e.push(n);return e}at(e){return this._getByIndex(this.root,e)}get(e){let n=this.root;for(;n;){const r=this.comparator(e,n.value);if(r===0)return n.value;r<0?n=n.left:n=n.right}return null}getMin(){return this.root?this._findMin(this.root).value:null}getMax(){if(!this.root)return null;let e=this.root;for(;e.right;)e=e.right;return e.value}_getByIndex(e,n){if(!e)return null;const r=e.left?e.left.size:0;return n===r?e.value:n0?a.right=this._insert(a.right,n,r):a.value=n,a.size=((l=(i=a.left)===null||i===void 0?void 0:i.size)!==null&&l!==void 0?l:0)+((s=(o=a.right)===null||o===void 0?void 0:o.size)!==null&&s!==void 0?s:0)+1,this._balance(a)}_remove(e,n){if(!e)return null;let r=e;const i=this.comparator(n,r.value);if(i<0)r.left=this._remove(r.left,n);else if(i>0)r.right=this._remove(r.right,n);else{if(!r.left)return r.right;if(!r.right)return r.left;const l=this._findMin(r.right);r.value=l.value,r.right=this._removeMin(r.right)}return r.size=1+(r.left?r.left.size:0)+(r.right?r.right.size:0),this._balance(r)}_removeMin(e){if(!e.left)return e.right;const n=e;return n.size=e.size-1,n.left=this._removeMin(e.left),n.right=e.right,n.size=1+(n.left?n.left.size:0)+(n.right?n.right.size:0),this._balance(n)}_findMin(e){for(;e.left;)e=e.left;return e}_balance(e){return e.right&&e.right.priority0||n;){for(;n;)e.push(n),n=n.left;n=e.pop(),yield n.value,n=n.right}}const Lv=new ka((t,e)=>0);var z=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Ye=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Nr,Ke,Rn,yt,it,ur,te,zh,Qc,Gc,Kc;class Iv extends Jr{constructor(e,n,r,i){super(e,n,l=>z(this,Nr,"m",zh).call(this,l)),Nr.add(this),Ke.set(this,void 0),Rn.set(this,void 0),yt.set(this,void 0),it.set(this,void 0),ur.set(this,void 0),te.set(this,void 0),Ye(this,Ke,new ka((l,o)=>i(l[0],o[0])),"f"),Ye(this,Rn,i,"f"),Ye(this,yt,r,"f")}}Ke=new WeakMap,Rn=new WeakMap,yt=new WeakMap,it=new WeakMap,ur=new WeakMap,te=new WeakMap,Nr=new WeakSet,zh=function(e){if(z(this,yt,"f")===0)return new b([],e.eventMetadata);const n=[];for(const[r,i]of e.entries)if(i!==0){if(z(this,te,"f")>=z(this,yt,"f")&&wh(e))return new b(n,e.eventMetadata);i<0?z(this,Nr,"m",Qc).call(this,r,i,n):z(this,Nr,"m",Gc).call(this,r,i,n)}return new b(n,e.eventMetadata)},Qc=function(e,n,r){const i=z(this,ur,"f"),l=z(this,it,"f");if(i===void 0||l===void 0||z(this,Nr,"m",Kc).call(this,e,i,l))return;const o=z(this,Ke,"f").get([e,0]);if(o!=null){const[s,u]=o;u+n<=0?(Ye(this,te,z(this,te,"f")-u,"f"),z(this,Ke,"f").delete([e,0])):(Ye(this,te,z(this,te,"f")+n,"f"),z(this,Ke,"f").add([e,u+n])),r.push([e,n])}},Gc=function(e,n,r){if(z(this,ur,"f")===void 0||z(this,it,"f")===void 0){Ye(this,ur,[e,n],"f"),Ye(this,it,[e,n],"f"),Ye(this,te,z(this,te,"f")+n,"f"),z(this,Ke,"f").add([e,n]),r.push([e,n]);return}const i=z(this,Rn,"f").call(this,e,z(this,ur,"f")[0])<0,l=z(this,Rn,"f").call(this,e,z(this,it,"f")[0])>0;if(z(this,Ke,"f").size>=z(this,yt,"f")){if(i||l)return;Ye(this,te,z(this,te,"f")-z(this,it,"f")[1],"f"),z(this,Ke,"f").delete(z(this,it,"f")),r.push([z(this,it,"f")[0],-z(this,it,"f")[1]]),Ye(this,te,z(this,te,"f")+n,"f"),z(this,Ke,"f").add([e,n]),r.push([e,n]),Ye(this,it,z(this,Ke,"f").getMax(),"f");return}if(z(this,te,"f")0&&z(this,te,"f")===z(this,yt,"f")};class un{constructor(e,n=0){this.root=null,this.comparator=e,this.version=n}static empty(){return Wv}get size(){var e,n;return(n=(e=this.root)===null||e===void 0?void 0:e.size)!==null&&n!==void 0?n:0}get _root(){return this.root}iteratorAfter(e){const n=this.lowerBound(e);for(;n.data!==null&&this.comparator(n.data,e)===0;)n.next();return n}lowerBound(e){let n=this.root;const r=new Go(this);for(;n!==null;){const i=this.comparator(e,n.value);if(i===0)return r.cursor=n,r;r.ancestors.push(n),n=n.getChild(i>0)}for(let i=r.ancestors.length-1;i>=0;--i)if(n=r.ancestors[i],this.comparator(e,n.value)<0)return r.cursor=n,r.ancestors.length=i,r;return r.ancestors.length=0,r}add(e){const n=Math.random(),r=this._insert(this.root,e,n),i=new un(this.comparator,this.version+1);return i.root=r,i}delete(e){const n=this._remove(this.root,e),r=new un(this.comparator,this.version+1);return r.root=n,r}clear(){const e=new un(this.comparator,this.version+1);return e.root=null,e}map(e){const n=[];for(const r of tr(this.root))n.push(e(r));return n}filter(e){const n=[];for(const r of tr(this.root))e(r)&&n.push(r);return n}findIndex(e){let n=0;for(const r of tr(this.root)){if(e(r))return n;n+=1}return-1}reduce(e,n){let r=n;for(const i of tr(this.root))r=e(r,i);return r}contains(e){return this._contains(this.root,e)}toArray(){const e=[];for(const n of tr(this.root))e.push(n);return e}at(e){return this._getByIndex(this.root,e)}get(e){let n=this.root;for(;n;){const r=this.comparator(e,n.value);if(r===0)return n.value;r<0?n=n.left:n=n.right}return null}getMin(){return this.root?this._findMin(this.root).value:null}getMax(){if(!this.root)return null;let e=this.root;for(;e.right;)e=e.right;return e.value}_getByIndex(e,n){if(!e)return null;const r=e.left?e.left.size:0;return n===r?e.value:n0?a.right=this._insert(a.right,n,r):a.value=n,a.size=((l=(i=a.left)===null||i===void 0?void 0:i.size)!==null&&l!==void 0?l:0)+((s=(o=a.right)===null||o===void 0?void 0:o.size)!==null&&s!==void 0?s:0)+1,this._balance(a)}_remove(e,n){if(!e)return null;let r=new Ei(e.value,e.priority,e.left,e.right);const i=this.comparator(n,r.value);if(i<0)r.left=this._remove(r.left,n);else if(i>0)r.right=this._remove(r.right,n);else{if(!r.left)return r.right;if(!r.right)return r.left;const l=this._findMin(r.right);r.value=l.value,r.right=this._removeMin(r.right)}return r.size=1+(r.left?r.left.size:0)+(r.right?r.right.size:0),this._balance(r)}_removeMin(e){if(!e.left)return e.right;const n=new Ei(e.value,e.priority);return n.size=e.size-1,n.left=this._removeMin(e.left),n.right=e.right,n.size=1+(n.left?n.left.size:0)+(n.right?n.right.size:0),this._balance(n)}_findMin(e){for(;e.left;)e=e.left;return e}_balance(e){return e.right&&e.right.priority0||n;){for(;n;)e.push(n),n=n.left;n=e.pop(),yield n.value,n=n.right}}const Wv=new un((t,e)=>0);function Nh(t,e){if(wu(t)&&wu(e)){if(t.length>e.length)return 1;if(t.lengthr?1:0}return typeof t=="object"?1:typeof e=="object"||te?1:0}var Av=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},ae=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Wi,Tn,On,Dn,Su;class Ko{constructor(e,n,r=Nh){Wi.add(this),Tn.set(this,void 0),this.notifiedListenersVersion=-1,On.set(this,new Set),Dn.set(this,new Set),this.materialite=e,Av(this,Tn,n,"f"),this.comparator=r,this.reader=ae(this,Tn,"f").newReader();const i=this;this.reader.setOperator({run(l){i.run(l)},pull(){return null},notifyCommitted(l){i.notifyCommitted(i.value,l)},destroy(){ae(i,Tn,"f").removeReader(i.reader)}})}get stream(){return ae(this,Tn,"f")}pipe(e){return this.materialite.compute(e,this)}pull(){this.materialite.tx(()=>{this.reader.pull({expressions:[]})})}notify(e,n){for(const r of ae(this,Dn,"f"))r.onSignalChanged(e,n)}notifyCommitted(e,n){if(this.notifiedListenersVersion!==n){this.notifiedListenersVersion=n;for(const r of ae(this,On,"f"))r(e,n)}}_derive(e){return ae(this,Dn,"f").add(e),()=>{ae(this,Dn,"f").delete(e),ae(this,Wi,"m",Su).call(this,!0)}}on(e){return ae(this,On,"f").add(e),()=>{this.off(e)}}off(e,n={autoCleanup:!0}){ae(this,On,"f").delete(e),ae(this,Wi,"m",Su).call(this,n.autoCleanup||!1)}destroy(){ae(this,On,"f").clear(),ae(this,Dn,"f").clear(),ae(this,Tn,"f").removeReader(this.reader)}}Tn=new WeakMap,On=new WeakMap,Dn=new WeakMap,Wi=new WeakSet,Su=function t(e,n=!1){if(e&&!n){setTimeout(()=>{ae(this,Wi,"m",t).call(this,e,!0)},0);return}e&&ae(this,On,"f").size===0&&ae(this,Dn,"f").size===0&&this.destroy()};var fe=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},W=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},jr,En,Fr,Re,ge,Ai,$i,jh,Fh,Rh,Yc;class xa extends Ko{constructor(e,n,r,i){super(e,n,r),jr.add(this),En.set(this,new un(this.comparator)),Fr.set(this,void 0),Re.set(this,void 0),ge.set(this,void 0),Ai.set(this,void 0),$i.set(this,void 0),fe(this,Fr,i,"f"),i!==void 0?(fe(this,Ai,W(this,jr,"m",Fh),"f"),fe(this,$i,W(this,jr,"m",Rh),"f")):(fe(this,Ai,$v,"f"),fe(this,$i,Vv,"f"))}rematerialize(e){const n=new xa(this.materialite,this.stream,this.comparator,e);return fe(n,Re,W(this,Re,"f"),"f"),fe(n,ge,W(this,ge,"f"),"f"),fe(n,En,W(this,En,"f"),"f"),W(this,ge,"f")!==void 0?this.materialite.tx(()=>{n.reader.pull({expressions:[{_tag:"after",comparator:this.comparator,cursor:W(this,ge,"f")}]})}):this.materialite.tx(()=>{n.reader.pull({expressions:[]})}),this.destroy(),n}get value(){return W(this,En,"f")}run(e){var n;const r=this.reader.drain(e);let i=!1,l=W(this,En,"f");for(const o of r)((n=o.eventMetadata)===null||n===void 0?void 0:n.cause)==="full_recompute"&&(l=new un(this.comparator),i=!0),[i,l]=W(this,jr,"m",jh).call(this,o,l)||i;fe(this,En,l,"f"),i&&this.notify(l,e)}}En=new WeakMap,Fr=new WeakMap,Re=new WeakMap,ge=new WeakMap,Ai=new WeakMap,$i=new WeakMap,jr=new WeakSet,jh=function(e,n){var r,i;let l=!1,o=!0;const s=e.entries[Symbol.iterator]();let u,a;(((r=e.eventMetadata)===null||r===void 0?void 0:r.cause)==="full_recompute"||((i=e.eventMetadata)===null||i===void 0?void 0:i.cause)==="partial_recompute")&&(a=e.eventMetadata.comparator);const h=(m,p)=>{p>0?(l=!0,n=W(this,Ai,"f").call(this,n,m)):p<0&&(l=!0,n=W(this,$i,"f").call(this,n,m))};for(;!(u=s.next()).done;){const[m,p]=u.value;if(a&&a===this.comparator&&W(this,Fr,"f")!==void 0&&n.size>=W(this,Fr,"f")&&p>0)break;o=!1;let y=s.next();if(!y.done){const[w,S]=y.value;if(Math.abs(p)===1&&p===-S&&this.comparator(w,m)==0){l=!0,n=n.add(S>0?w:m);continue}}if(h(m,p),!y.done){const[w,S]=y.value;h(w,S)}}return[l||o,n]},Fh=function(e,n){const r=W(this,Fr,"f")||0;if(e.sizer)throw new Error(`Data size exceeded limit! ${e.size} | ${r}`);return this.comparator(n,W(this,ge,"f"))>0||(e=e.add(n),e=e.delete(W(this,ge,"f")),fe(this,ge,e.getMax()||void 0,"f"),this.comparator(n,W(this,Re,"f"))<=0&&fe(this,Re,n,"f")),e},Rh=function(e,n){const r=W(this,Re,"f")&&this.comparator(n,W(this,Re,"f")),i=W(this,ge,"f")&&this.comparator(n,W(this,ge,"f"));return r&&r<0||i&&i>0||(e=e.delete(n),r&&r===0&&fe(this,Re,n,"f"),i&&i===0&&fe(this,ge,n,"f")),e},Yc=function(e){if(W(this,Re,"f")===void 0||W(this,ge,"f")===void 0){fe(this,ge,fe(this,Re,e,"f"),"f");return}if(this.comparator(e,W(this,Re,"f"))<=0){fe(this,Re,e,"f");return}if(this.comparator(e,W(this,ge,"f"))>=0){fe(this,ge,e,"f");return}};function $v(t,e){return t=t.add(e),t}function Vv(t,e){return t=t.delete(e),t}var Xc=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Jc=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},ar;class Uv extends Ko{constructor(e,n,r){super(e,n),ar.set(this,void 0),Xc(this,ar,r,"f")}get value(){return Jc(this,ar,"f")}run(e){const n=this.reader.drain(e);if(n.length===0)return;const r=n[n.length-1];let i;for(const[o,s]of r.entries)s>0&&(i=o);if(i===void 0)return;const l=i;l!==Jc(this,ar,"f")?(Xc(this,ar,l,"f"),this.notify(l,e)):this.notifiedListenersVersion=e}}ar=new WeakMap;function Bv(t,e,n){let r=0,i=t.length-1;for(;r<=i;){let l=i+r>>1,o=n(e,t[l]);if(o>0)r=l+1;else if(o<0)i=l-1;else return l}return~r}function Oh(t,e,n){let r=!1;for(const i of t.entries){let[l,o]=i;const s=Bv(e,l,n);o>0?(r=!0,Hv(e,l,o,s)):o<0&&s!==-1&&(r=!0,Qv(e,l,Math.abs(o),s,n))}return r}function Hv(t,e,n,r){for(;n>0;)r===-1?t.push(e):t.splice(r,0,e),n-=1}function Qv(t,e,n,r,i){for(;n>0;){const l=t[r];if(l===void 0||i(l,e)!==0)break;t.splice(r,1),n-=1}}class Gv extends Ko{constructor(){super(...arguments),this.value=[]}run(e){let n=!1;this.reader.drain(e).forEach(r=>{var i;((i=r.eventMetadata)===null||i===void 0?void 0:i.cause)==="full_recompute"&&(n=this.value.length>0,this.value.length=0),n=Oh(r,this.value,this.comparator)||n}),n&&this.notify(this.value,e)}}var Ts=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Kv=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},cr;class Yv extends Ko{constructor(){super(...arguments),cr.set(this,[])}get value(){return Ts(this,cr,"f")}run(e){const n=this.reader.drain(e);if(n.length===0)return;let r,i=!1;r=[...Ts(this,cr,"f")],n.forEach(l=>{var o;((o=l.eventMetadata)===null||o===void 0?void 0:o.cause)==="full_recompute"&&(i=Ts(this,cr,"f").length>0,r=[]),i=Oh(l,r,this.comparator)||i}),Kv(this,cr,r,"f"),i&&this.notify(r,e)}}cr=new WeakMap;class Dh{constructor(e,n){this.materialite=e,this.writer=n}pull(e){this.writer.pull(e)}after(e,n){const r=this.newStream();return new Mh(this.writer.newReader(),r.writer,e,n),r}take(e,n){const r=this.newStream();return new Iv(this.writer.newReader(),r.writer,e,n),r}map(e){const n=this.newStream();return new Cv(this.writer.newReader(),n.writer,e),n}filter(e){const n=this.newStream();return new Mv(this.writer.newReader(),n.writer,e),n}negate(){const e=this.newStream();return new zv(this.writer.newReader(),e.writer),e}concat(e){const n=this.newStream();return new Nv(this.writer.newReader(),e.writer.newReader(),n.writer),n}join(e,n,r){const i=this.newStream();return new jv(this.writer.newReader(),e.writer.newReader(),i.writer,n,r),i}reduce(e,n){const r=this.newStream();return new Ch(this.writer.newReader(),r.writer,n,e),r}count(e){const n=this.newStream();return new Fv(this.writer.newReader(),n.writer,e),n}size(){const e=this.newStream();return new Rv(this.writer.newReader(),e.writer),e}materializeInto(e,n={wantInitialData:!0}){const r=e(this);return n.wantInitialData&&r.pull(),r}materialize(e,n={wantInitialData:!0}){return this.materializeInto(r=>new xa(this.materialite,r,e,n.limit),n)}materializeArray(e,n={wantInitialData:!0}){return this.materializeInto(r=>new Gv(this.materialite,r,e),n)}materializeCopyOnWriteArray(e,n={wantInitialData:!0}){return this.materializeInto(r=>new Yv(this.materialite,r,e),n)}materializeValue(e,n={wantInitialData:!0}){return this.materializeInto(r=>new Uv(this.materialite,r,e),n)}effect(e,n={wantInitialData:!0}){const r=this.newStream();return new Ov(this.writer.newReader(),r.writer,e),n.wantInitialData&&r.pull({expressions:[]}),r}queueData(e){this.writer.queueData(e)}notify(e){this.writer.notify(e)}notifyCommitted(e){this.writer.notifyCommitted(e)}newReader(){return this.writer.newReader()}removeReader(e,n={autoCleanup:!0}){this.writer.removeReader(e,n)}destroy(){this.writer.destroy()}}var Zc=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},qc=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Jl,Zl;class Xv extends Mh{constructor(e,n,r,i){super(e,n,r,i),Jl.set(this,void 0),Zl.set(this,void 0),Zc(this,Jl,i,"f"),Zc(this,Zl,r,"f")}pull(e){const n={_tag:"after",cursor:qc(this,Zl,"f"),comparator:qc(this,Jl,"f")};e.expressions.push(n),super.pull(e)}}Jl=new WeakMap,Zl=new WeakMap;class Ta extends Dh{constructor(e){super(e,new Th)}pull(e){this.writer.pull(e)}newStream(){return new Ta(this.materialite)}}class Ea extends Dh{newStream(){return new Ta(this.materialite)}after(e,n){const r=new Ea(this.materialite,new Th);return new Xv(this.writer.newReader(),r.writer,e,n),r}}class Gr extends Ea{constructor(e,n){super(e,new Tv(n))}}var mt=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},O=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},fr,Pn,dr,vt,He,hr,Tt;class Jv{constructor(e,n){this._state="stateful",this._sort="unsorted",fr.set(this,void 0),Pn.set(this,void 0),dr.set(this,new Set),vt.set(this,void 0),He.set(this,[]),hr.set(this,!1),Tt.set(this,void 0),mt(this,Pn,e,"f"),mt(this,vt,new Gr(e.materialite,this),"f"),mt(this,Tt,new Map,"f"),this.keyFn=n;const r=this;mt(this,fr,{onCommitPhase1(i){for(let l=0;l0?u:o),l+=1;continue}}s<0?O(r,Tt,"f").delete(n(o)):s>0&&O(r,Tt,"f").set(n(o),o)}O(r,hr,"f")?(mt(r,He,[],"f"),O(r,vt,"f").queueData([i,new b(Zv(O(r,Tt,"f")),{cause:"full_recompute"})])):(O(r,vt,"f").queueData([i,new b(O(r,He,"f"),null)]),mt(r,He,[],"f"))},onCommitPhase2(i){O(r,hr,"f")&&mt(r,hr,!1,"f"),O(r,vt,"f").notify(i);for(const l of O(r,dr,"f"))l(O(r,Tt,"f"))},onCommitted(i){O(r,vt,"f").notifyCommitted(i)},onRollback(){mt(r,He,[],"f")}},"f")}get stream(){return O(this,vt,"f")}get value(){return O(this,Tt,"f")}detachPipelines(){mt(this,vt,new Gr(O(this,Pn,"f").materialite,this),"f")}destroy(){this.detachPipelines(),O(this,dr,"f").clear()}onChange(e){return O(this,dr,"f").add(e),()=>O(this,dr,"f").delete(e)}add(e){return O(this,He,"f").push([e,1]),O(this,Pn,"f").addDirtySource(O(this,fr,"f")),this}delete(e){return O(this,He,"f").push([e,-1]),O(this,Pn,"f").addDirtySource(O(this,fr,"f")),this}resendAll(e){return mt(this,hr,!0,"f"),O(this,Pn,"f").addDirtySource(O(this,fr,"f")),this}}fr=new WeakMap,Pn=new WeakMap,dr=new WeakMap,vt=new WeakMap,He=new WeakMap,hr=new WeakMap,Tt=new WeakMap;function Zv(t){function*e(){for(const n of t.values())yield[n,1]}return{*[Symbol.iterator](){yield*e()}}}var nr=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},le=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Bt,Cn,Ht,Et;class qv{constructor(e){this._state="stateless",this._sort="unsorted",this.keyFn=r=>r,Bt.set(this,void 0),Cn.set(this,void 0),Ht.set(this,void 0),Et.set(this,[]),nr(this,Ht,e,"f"),nr(this,Bt,new Gr(e.materialite,this),"f");const n=this;nr(this,Cn,{onCommitPhase1(r){le(n,Bt,"f").queueData([r,new b(le(n,Et,"f"),null)]),nr(n,Et,[],"f")},onCommitPhase2(r){le(n,Bt,"f").notify(r)},onCommitted(r){le(n,Bt,"f").notifyCommitted(r)},onRollback(){nr(n,Et,[],"f")}},"f")}get stream(){return le(this,Bt,"f")}detachPipelines(){nr(this,Bt,new Gr(le(this,Ht,"f").materialite,this),"f")}destroy(){this.detachPipelines()}addAll(e){for(const n of e)le(this,Et,"f").push([n,1]);return le(this,Ht,"f").addDirtySource(le(this,Cn,"f")),this}add(e){return le(this,Et,"f").push([e,1]),le(this,Ht,"f").addDirtySource(le(this,Cn,"f")),this}delete(e){le(this,Et,"f").push([e,-1]),le(this,Ht,"f").addDirtySource(le(this,Cn,"f"))}deleteAll(e){for(const n of e)le(this,Et,"f").push([n,-1]);le(this,Ht,"f").addDirtySource(le(this,Cn,"f"))}}Bt=new WeakMap,Cn=new WeakMap,Ht=new WeakMap,Et=new WeakMap;var Ue=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},I=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Pt,pr,mr,Qe,Mn,Ge;class Lh{constructor(e,n,r){this._state="stateful",this._sort="sorted",Pt.set(this,void 0),pr.set(this,void 0),mr.set(this,new Set),Qe.set(this,[]),Mn.set(this,null),Ge.set(this,void 0),this.materialite=e,Ue(this,Pt,new Gr(e.materialite,this),"f"),Ue(this,Ge,r(n),"f"),this.comparator=n;const i=this;Ue(this,pr,{onCommitPhase1(l){for(let o=0;o0?a:s),"f"),o+=1;continue}}u<0?Ue(i,Ge,I(i,Ge,"f").delete(s),"f"):u>0&&Ue(i,Ge,I(i,Ge,"f").add(s),"f")}I(i,Mn,"f")?(Ue(i,Qe,[],"f"),I(i,Pt,"f").queueData([l,new b(bv(I(i,Ge,"f"),i.comparator,I(i,Mn,"f")),{cause:I(i,Mn,"f").expressions.length>0?"partial_recompute":"full_recompute",comparator:n})]),Ue(i,Mn,null,"f")):(I(i,Pt,"f").queueData([l,new b(I(i,Qe,"f"),null)]),Ue(i,Qe,[],"f"))},onCommitPhase2(l){I(i,Pt,"f").notify(l)},onCommitted(l){const o=I(i,Ge,"f");for(const s of I(i,mr,"f"))s(o);I(i,Pt,"f").notifyCommitted(l)},onRollback(){Ue(i,Qe,[],"f")}},"f")}get stream(){return I(this,Pt,"f")}get value(){return I(this,Ge,"f")}detachPipelines(){Ue(this,Pt,new Gr(this.materialite.materialite,this),"f")}destroy(){this.detachPipelines(),I(this,mr,"f").clear()}onChange(e){return I(this,mr,"f").add(e),()=>I(this,mr,"f").delete(e)}add(e){return I(this,Qe,"f").push([e,1]),this.materialite.addDirtySource(I(this,pr,"f")),this}delete(e){return I(this,Qe,"f").push([e,-1]),this.materialite.addDirtySource(I(this,pr,"f")),this}resendAll(e){return Ue(this,Mn,e,"f"),this.materialite.addDirtySource(I(this,pr,"f")),this}}Pt=new WeakMap,pr=new WeakMap,mr=new WeakMap,Qe=new WeakMap,Mn=new WeakMap,Ge=new WeakMap;function bv(t,e,n){const r=n.expressions.filter(i=>i._tag==="after")[0];return r&&r.comparator===e?{[Symbol.iterator](){return bc(t.iteratorAfter(r.cursor))}}:{[Symbol.iterator](){return bc(t)}}}function*bc(t){for(const e of t)yield[e,1]}class Pa extends Lh{constructor(e,n){super(e,n,r=>new un(r))}withNewOrdering(e){const n=new Pa(this.materialite,e);return this.materialite.materialite.tx(()=>{for(const r of this.value)n.add(r)}),n}}class Ca extends Lh{constructor(e,n){super(e,n,r=>new ka(r))}withNewOrdering(e){const n=new Ca(this.materialite,e);return this.materialite.materialite.tx(()=>{for(const r of this.value)n.add(r)}),n}}var ye=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},rr=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Ln,ql,Vi,zn,bl,Pi,eo,Ih,ef,Wh,ku;class zo{constructor(e,...n){Ln.add(this),this.f=e,this.listeners=new Set,this.derivations=new Set,this.lastValue=void 0,ql.set(this,-1),Vi.set(this,[]),zn.set(this,0),bl.set(this,-1),Pi.set(this,-1),eo.set(this,[]),this.signals=n,ye(this,Vi,"f");const r=this;for(let i=0;ii.value))}get value(){return this.lastValue}pipe(e){return new zo(n=>e(n),this)}combine(e,...n){return new zo(e,this,...n)}_derive(e){return this.derivations.add(e),()=>{this.derivations.delete(e),ye(this,Ln,"m",ku).call(this,!0)}}on(e){return this.listeners.add(e),()=>{this.off(e)}}off(e,n={autoCleanup:!0}){this.listeners.delete(e),ye(this,Ln,"m",ku).call(this,n.autoCleanup||!1)}destroy(){for(const e of ye(this,eo,"f"))e()}}ql=new WeakMap,Vi=new WeakMap,zn=new WeakMap,bl=new WeakMap,Pi=new WeakMap,eo=new WeakMap,Ln=new WeakSet,Ih=function(e,n,r){var i;if(r<=ye(this,ql,"f")){console.warn("received stale data");return}if(ye(this,zn,"f")===0)rr(this,bl,r,"f");else if(ye(this,bl,"f")!==r){console.warn("received data from different versions for the same tick");return}if(ye(this,Vi,"f")[e]=n,rr(this,zn,(i=ye(this,zn,"f"),i++,i),"f"),ye(this,zn,"f")===this.signals.length){rr(this,ql,r,"f"),rr(this,zn,0,"f");const l=this.f(...ye(this,Vi,"f"));l!==this.lastValue?(this.lastValue=l,ye(this,Ln,"m",ef).call(this,l,r)):rr(this,Pi,r,"f")}},ef=function(e,n){for(const r of this.derivations)r.onSignalChanged(e,n)},Wh=function(e,n){if(n!==ye(this,Pi,"f")){rr(this,Pi,n,"f");for(const r of this.listeners)r(this.value,n);for(const r of this.derivations)r.onCommitted(this.value,n)}},ku=function(e){e&&this.listeners.size===0&&this.derivations.size===0&&this.destroy()};var Sn=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},q=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Nn,Ct,to,Ci,jn,Fn;class e0{constructor(e,n){Nn.set(this,void 0),Ct.set(this,void 0),to.set(this,void 0),Ci.set(this,void 0),jn.set(this,new Set),Fn.set(this,new Set),Sn(this,Ct,n,"f"),Sn(this,Ci,e,"f");const r=this;Sn(this,to,{onCommitPhase1(i){q(r,Nn,"f")!==void 0&&(Sn(r,Ct,q(r,Nn,"f"),"f"),Sn(r,Nn,void 0,"f"))},onCommitPhase2(i){for(const l of q(r,Fn,"f"))l.onSignalChanged(q(r,Ct,"f"),i)},onCommitted(i){for(const l of q(r,jn,"f"))l(q(r,Ct,"f"),i);for(const l of q(r,Fn,"f"))l.onCommitted(q(r,Ct,"f"),i)},onRollback(){Sn(r,Nn,void 0,"f")}},"f")}pipe(e){return q(this,Ci,"f").materialite.compute(e,this)}_derive(e){return q(this,Fn,"f").add(e),()=>{q(this,Fn,"f").delete(e)}}on(e){return q(this,jn,"f").add(e),()=>{q(this,jn,"f").delete(e)}}off(e){q(this,jn,"f").delete(e)}destroy(){q(this,jn,"f").clear(),q(this,Fn,"f").clear()}get value(){return q(this,Ct,"f")}set value(e){e!==q(this,Ct,"f")&&(Sn(this,Nn,e,"f"),q(this,Ci,"f").addDirtySource(q(this,to,"f")))}}Nn=new WeakMap,Ct=new WeakMap,to=new WeakMap,Ci=new WeakMap,jn=new WeakMap,Fn=new WeakMap;var $n=globalThis&&globalThis.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Y=globalThis&&globalThis.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},Mi,Nt,Jt,jt,Qt,Ah,xu;class t0{constructor(){Mi.add(this),Nt.set(this,void 0),Jt.set(this,new Set),jt.set(this,null),Qt.set(this,void 0),$n(this,Nt,0,"f");const e=this;$n(this,Qt,{materialite:this,addDirtySource(n){Y(e,Jt,"f").add(n),Y(e,jt,"f")===null&&($n(e,jt,Y(e,Nt,"f")+1,"f"),Y(e,Mi,"m",xu).call(e))}},"f")}newStatelessSet(){return new qv(Y(this,Qt,"f"))}newAtom(e){return new e0(Y(this,Qt,"f"),e)}newImmutableSortedSet(e){return new Pa(Y(this,Qt,"f"),e)}newSortedSet(e){return new Ca(Y(this,Qt,"f"),e)}newUnorderedSet(e){return new Jv(Y(this,Qt,"f"),e)}compute(e,...n){return new zo(e,...n)}tx(e){if(Y(this,jt,"f")===null)$n(this,jt,Y(this,Nt,"f")+1,"f");else{e();return}try{e(),Y(this,Mi,"m",xu).call(this)}catch(n){throw Y(this,Mi,"m",Ah).call(this),n}finally{Y(this,Jt,"f").clear()}}}Nt=new WeakMap,Jt=new WeakMap,jt=new WeakMap,Qt=new WeakMap,Mi=new WeakSet,Ah=function(){$n(this,jt,null,"f");for(const e of Y(this,Jt,"f"))e.onRollback()},xu=function(){$n(this,Nt,Y(this,jt,"f"),"f"),$n(this,jt,null,"f");for(const e of Y(this,Jt,"f"))e.onCommitPhase1(Y(this,Nt,"f"));for(const e of Y(this,Jt,"f"))e.onCommitPhase2(Y(this,Nt,"f"));for(const e of Y(this,Jt,"f"))e.onCommitted(Y(this,Nt,"f"))};const vr=new t0,$h=(t,e)=>t.id-e.id,n0=(t,e)=>{let n=t.taskId-e.taskId;return n!==0||(n=t.created-e.created,n!==0)?n:t.id-e.id},Ma=(t,e)=>{let n=t._tag.localeCompare(e._tag);if(n!==0)return n;switch(t._tag){case"filter":return t.key.localeCompare(e.key);case"selected":return t.id-e.id}},Se={tasks:vr.newSortedSet($h),appState:vr.newSortedSet(Ma),comments:vr.newSortedSet(n0),tx:vr.tx.bind(vr)};function r0(){vr.tx(()=>{for(const t of vv(1e6))Se.tasks.add(t)})}r0();const i0=({taskId:t})=>{function e(r,i){Se.tx(()=>{Se.tasks.delete(r),Se.tasks.add(i)})}const[,n]=cl(()=>Se.tasks.stream.filter(r=>r.id===t).materializeValue(null),[t]);return n==null?null:_.jsxs("div",{children:[_.jsx("h1",{className:"text-xl font-semibold mb-4",children:_.jsx("input",{type:"text",className:"w-full",onChange:r=>{e(n,{...n,title:r.target.value})},value:n.title})}),_.jsxs("div",{className:"mb-4",children:[_.jsx("label",{className:"block mb-2 font-medium",children:"Assignee:"}),_.jsx("select",{className:"border rounded w-full py-2 px-3",value:n.assignee,onChange:r=>e(n,{...n,assignee:r.target.value}),children:ya.map(r=>_.jsx("option",{value:r,children:r},r))})]}),_.jsxs("div",{className:"mb-4",children:[_.jsx("label",{className:"block mb-2 font-medium",children:"Description:"}),_.jsx("textarea",{className:"border rounded w-full py-2 px-3",rows:5,value:n.description,onChange:r=>e(n,{...n,description:r.target.value})})]}),_.jsxs("div",{className:"mb-4",children:[_.jsx("label",{className:"block mb-2 font-medium",children:"Due Date:"}),_.jsx("input",{type:"date",className:"border rounded w-full py-2 px-3",value:n.dueDate.toISOString().split("T")[0],onChange:r=>e(n,{...n,dueDate:new Date(r.target.value)})})]}),_.jsxs("div",{className:"mb-4",children:[_.jsx("label",{className:"block mb-2 font-medium",children:"Status:"}),_.jsxs("select",{className:"border rounded w-full py-2 px-3",value:n.status,onChange:r=>e(n,{...n,status:r.target.value}),children:[_.jsx("option",{value:"todo",children:"To Do"}),_.jsx("option",{value:"in-progress",children:"In Progress"}),_.jsx("option",{value:"done",children:"Done"})]})]}),_.jsxs("div",{className:"mb-4",children:[_.jsx("label",{className:"block mb-2 font-medium",children:"Priority:"}),_.jsxs("select",{className:"border rounded w-full py-2 px-3",value:n.priority,onChange:r=>e(n,{...n,priority:r.target.value}),children:[_.jsx("option",{value:"low",children:"Low"}),_.jsx("option",{value:"medium",children:"Medium"}),_.jsx("option",{value:"high",children:"High"})]})]}),_.jsxs("div",{className:"mb-4",children:[_.jsx("label",{className:"block mb-2 font-medium",children:"Project:"}),_.jsx("select",{className:"border rounded w-full py-2 px-3",value:n.project,onChange:r=>e(n,{...n,project:r.target.value}),children:wa.map(r=>_.jsx("option",{value:r,children:r},r))})]})]})},l0=()=>{const[,t]=cl(()=>Se.appState.stream.filter(i=>i._tag==="filter").materialize(Ma),[]),e=t.reduce((i,l)=>(i[l.key]=l.value,i),{});function n(i,l){l!=null?Se.appState.add({_tag:"filter",key:i,value:l}):Se.appState.delete({_tag:"filter",key:i})}function r(i){return _.jsx("option",{value:i,children:i},i)}return _.jsx("div",{className:"fixed top-0 left-0 w-3/4 bg-white p-4 z-10",style:{boxShadow:"0 2px 2px -2px rgb(0 0 0 / 0.1)"},children:_.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[_.jsxs("div",{children:[_.jsx("label",{className:"m-2 inline-block w-24",children:"Assignee"}),_.jsxs("select",{className:"bg-green-100 p-2 rounded-md shadow-sm focus:ring focus:ring-blue-200 focus:outline-none w-64",value:e.assignee||"",onChange:i=>{n("assignee",i.target.value||void 0)},children:[_.jsx("option",{value:"",children:"Any"}),ya.map(r)]})]}),_.jsxs("div",{children:[_.jsx("label",{className:"m-2 inline-block w-24",children:"Priority"}),_.jsxs("select",{className:"bg-green-100 p-2 rounded-md shadow-sm focus:ring focus:ring-blue-200 focus:outline-none w-64",value:e.priority||"",onChange:i=>{n("priority",i.target.value||void 0)},children:[_.jsx("option",{value:"",children:"Any"}),pv.map(r)]})]}),_.jsxs("div",{children:[_.jsx("label",{className:"m-2 inline-block w-24",children:"Project"}),_.jsxs("select",{className:"bg-green-100 p-2 rounded-md shadow-sm focus:ring focus:ring-blue-200 focus:outline-none w-64",value:e.project||"",onChange:i=>{n("project",i.target.value||void 0)},children:[_.jsx("option",{value:"",children:"Any"}),wa.map(r)]})]}),_.jsxs("div",{children:[_.jsx("label",{className:"m-2 inline-block w-24",children:"Status"}),_.jsxs("select",{className:"bg-green-100 p-2 rounded-md shadow-sm focus:ring focus:ring-blue-200 focus:outline-none w-64",value:e.status||"",onChange:i=>{n("status",i.target.value||void 0)},children:[_.jsx("option",{value:"",children:"Any"}),mv.map(r)]})]})]})})},o0="_container_1j1pj_1",s0={container:o0};function u0({header:t,footer:e,rowRenderer:n,width:r,height:i,rowHeight:l,dataStream:o,className:s,comparator:u}){var wn;const a=ff.useRef(null),h=Math.ceil(i/l),[m,p]=we.useState(h*2),y=ie=>{const pe=ie.target,nt=pe.scrollTop;H(nt),Math.abs(nt-k)>N?w():S(),pe.scrollHeight-pe.scrollTop<=pe.clientHeight+i&&(f.size>=m||c!==f.size)&&(d(f.size),p(m+h))};function w(){const ie=a.current;if(!ie)return;const pe=ie.scrollTop,nt=Math.floor(pe*((E-N)/(P-N))*(1/C));Zr(nt),vn(Math.round(nt*tt)),M(pe)}function S(){const ie=a.current;if(!ie)return;const pe=ie.scrollTop;if(pe+$t>(mn+1)*C){const nt=mn+1,fl=Math.round(nt*tt),Yo=pe-tt;ie.scrollTop=k,Zr(nt),vn(fl),M(Yo)}else if(pe+$t{let ie;return D.current!=null&&o===D.current.stream?ie=D.current.rematerialize(m):(p(h*2),ie=o.materialize(u,{wantInitialData:!0,limit:h*2})),D.current=ie,ie},[o,m]),[c,d]=we.useState(f.size),E=f.size*l,P=33554400,C=P/100,U=Math.ceil(E/C),N=i,ue=l,tt=(E-P)/(U-1)>0?(E-P)/(U-1):1,pn=P>E?E:P,[mn,Zr]=we.useState(0),[$t,vn]=we.useState(0),[k,M]=we.useState(0),[j,H]=we.useState(((wn=a.current)==null?void 0:wn.scrollTop)||0),J=N,gn=j+$t;let $e=Math.floor((gn-J)/ue),yn=Math.ceil((gn+N+J)/ue);$e=Math.max(0,$e),yn=Math.min(E/ue,yn);const ft=[];for(let ie=$e;ie<=yn;++ie){const pe=f.at(ie);if(!pe)break;ft.push(n(pe,{height:ue}))}return _.jsx("div",{className:`${s0.container} ${s}`,onScroll:y,ref:a,style:{width:r,height:i},children:_.jsx("div",{style:{height:pn+50,position:"relative",overflow:"hidden"},children:_.jsxs("table",{style:{width:"100%",position:"absolute",top:$e*ue-$t},className:"table",children:[t,_.jsx("tbody",{style:{position:"relative"},children:ft}),e]})})})}const a0=we.memo(u0);function c0(t,e){let n=e;for(const{key:r,value:i}of t)i&&(n=n.filter(l=>l[r]===i));return n}const f0=({onTaskClick:t,selectedTask:e})=>{const n=window.innerHeight-160,r=50,[i,l]=ff.useState(null),[o,s]=we.useState(Se.tasks.stream),[,u]=cl(()=>Se.appState.stream.filter(h=>h._tag==="filter").materialize(Ma),[]);u!==i&&(l(u),o!==Se.tasks.stream&&o.destroy(),s(c0(u,Se.tasks.stream)));const a=we.useCallback((h,m)=>_.jsx(d0,{row:h,style:m,selectedTask:e,onClick:()=>{t(h)}},h.id),[e]);return _.jsx("div",{className:"bg-gray-100 task-table",style:{marginTop:160,paddingTop:0,paddingLeft:30},children:_.jsx(a0,{className:"bg-white rounded-xl",width:"calc(100% - 30px)",height:n,dataStream:o,rowHeight:r,comparator:$h,header:_.jsx("thead",{children:_.jsxs("tr",{children:[_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"ID"}),_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"Title"}),_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"Assignee"}),_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"Due Date"}),_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"Status"}),_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"Priority"}),_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"Project"}),_.jsx("th",{className:"text-left py-2 px-3 font-semibold",children:"Labels"})]})}),rowRenderer:a})})};function d0({row:t,onClick:e,style:n,selectedTask:r}){return _.jsxs("tr",{style:n,className:`border-t cursor-pointer ${t.id===r?"bg-blue-200":"hover:bg-blue-100"}`,onClick:e,children:[_.jsx("td",{className:"py-2 px-3",children:t.id.toLocaleString()}),_.jsx("td",{className:"py-2 px-3",children:t.title}),_.jsx("td",{className:"py-2 px-3",children:t.assignee}),_.jsx("td",{className:"py-2 px-3",children:t.dueDate.toISOString().split("T")[0]}),_.jsx("td",{className:"py-2 px-3",children:t.status}),_.jsx("td",{className:"py-2 px-3",children:t.priority}),_.jsx("td",{className:"py-2 px-3",children:t.project}),_.jsx("td",{className:"py-2 px-3",children:t.labels.join(", ")})]})}function h0(){const[,t]=cl(()=>Se.appState.stream.filter(n=>n._tag==="selected").materializeValue(null),[]);function e(n){Se.tx(()=>{t&&Se.appState.delete({_tag:"selected",id:t.id}),Se.appState.add({_tag:"selected",id:n.id})})}return _.jsxs("div",{className:"flex h-screen",children:[_.jsxs("div",{className:"w-3/4 bg-gray-100 overflow-y-auto",children:[_.jsx(l0,{}),_.jsx(f0,{onTaskClick:e,selectedTask:(t==null?void 0:t.id)||null})]}),_.jsx("div",{className:"w-1/4 bg-white overflow-y-auto p-6",children:t?_.jsx(i0,{taskId:t.id}):_.jsx("div",{children:"Select a task to view details"})})]})}Es.createRoot(document.getElementById("root")).render(_.jsx(h0,{})); diff --git a/docs/index.html b/docs/index.html index d8a0a61..95dac21 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,11 +3,11 @@ - + Vite + React + TS - - + +