@netnodeag/kraftwerk 0.28.0 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,145 @@
1
+ (function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const p of h.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&r(p)}).observe(document,{childList:!0,subtree:!0});function o(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function r(f){if(f.ep)return;f.ep=!0;const h=o(f);fetch(f.href,h)}})();var Ir={exports:{}},oi={};var um;function xx(){if(um)return oi;um=1;var u=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function o(r,f,h){var p=null;if(h!==void 0&&(p=""+h),f.key!==void 0&&(p=""+f.key),"key"in f){h={};for(var x in f)x!=="key"&&(h[x]=f[x])}else h=f;return f=h.ref,{$$typeof:u,type:r,key:p,ref:f!==void 0?f:null,props:h}}return oi.Fragment=c,oi.jsx=o,oi.jsxs=o,oi}var rm;function vx(){return rm||(rm=1,Ir.exports=xx()),Ir.exports}var n=vx(),Fr={exports:{}},me={};var om;function yx(){if(om)return me;om=1;var u=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),p=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),k=Symbol.iterator;function L(N){return N===null||typeof N!="object"?null:(N=k&&N[k]||N["@@iterator"],typeof N=="function"?N:null)}var Y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F=Object.assign,Z={};function z(N,H,J){this.props=N,this.context=H,this.refs=Z,this.updater=J||Y}z.prototype.isReactComponent={},z.prototype.setState=function(N,H){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,H,"setState")},z.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function de(){}de.prototype=z.prototype;function fe(N,H,J){this.props=N,this.context=H,this.refs=Z,this.updater=J||Y}var te=fe.prototype=new de;te.constructor=fe,F(te,z.prototype),te.isPureReactComponent=!0;var W=Array.isArray;function $(){}var V={H:null,A:null,T:null,S:null},le=Object.prototype.hasOwnProperty;function ae(N,H,J){var Q=J.ref;return{$$typeof:u,type:N,key:H,ref:Q!==void 0?Q:null,props:J}}function je(N,H){return ae(N.type,H,N.props)}function be(N){return typeof N=="object"&&N!==null&&N.$$typeof===u}function P(N){var H={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(J){return H[J]})}var ve=/\/+/g;function Je(N,H){return typeof N=="object"&&N!==null&&N.key!=null?P(""+N.key):H.toString(36)}function at(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then($,$):(N.status="pending",N.then(function(H){N.status==="pending"&&(N.status="fulfilled",N.value=H)},function(H){N.status==="pending"&&(N.status="rejected",N.reason=H)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function D(N,H,J,Q,he){var pe=typeof N;(pe==="undefined"||pe==="boolean")&&(N=null);var Ee=!1;if(N===null)Ee=!0;else switch(pe){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(N.$$typeof){case u:case c:Ee=!0;break;case S:return Ee=N._init,D(Ee(N._payload),H,J,Q,he)}}if(Ee)return he=he(N),Ee=Q===""?"."+Je(N,0):Q,W(he)?(J="",Ee!=null&&(J=Ee.replace(ve,"$&/")+"/"),D(he,H,J,"",function(Re){return Re})):he!=null&&(be(he)&&(he=je(he,J+(he.key==null||N&&N.key===he.key?"":(""+he.key).replace(ve,"$&/")+"/")+Ee)),H.push(he)),1;Ee=0;var mt=Q===""?".":Q+":";if(W(N))for(var B=0;B<N.length;B++)Q=N[B],pe=mt+Je(Q,B),Ee+=D(Q,H,J,pe,he);else if(B=L(N),typeof B=="function")for(N=B.call(N),B=0;!(Q=N.next()).done;)Q=Q.value,pe=mt+Je(Q,B++),Ee+=D(Q,H,J,pe,he);else if(pe==="object"){if(typeof N.then=="function")return D(at(N),H,J,Q,he);throw H=String(N),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function K(N,H,J){if(N==null)return N;var Q=[],he=0;return D(N,Q,"","",function(pe){return H.call(J,pe,he++)}),Q}function ce(N){if(N._status===-1){var H=N._result;H=H(),H.then(function(J){(N._status===0||N._status===-1)&&(N._status=1,N._result=J)},function(J){(N._status===0||N._status===-1)&&(N._status=2,N._result=J)}),N._status===-1&&(N._status=0,N._result=H)}if(N._status===1)return N._result.default;throw N._result}var _e=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},ye={map:K,forEach:function(N,H,J){K(N,function(){H.apply(this,arguments)},J)},count:function(N){var H=0;return K(N,function(){H++}),H},toArray:function(N){return K(N,function(H){return H})||[]},only:function(N){if(!be(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return me.Activity=E,me.Children=ye,me.Component=z,me.Fragment=o,me.Profiler=f,me.PureComponent=fe,me.StrictMode=r,me.Suspense=y,me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,me.__COMPILER_RUNTIME={__proto__:null,c:function(N){return V.H.useMemoCache(N)}},me.cache=function(N){return function(){return N.apply(null,arguments)}},me.cacheSignal=function(){return null},me.cloneElement=function(N,H,J){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var Q=F({},N.props),he=N.key;if(H!=null)for(pe in H.key!==void 0&&(he=""+H.key),H)!le.call(H,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&H.ref===void 0||(Q[pe]=H[pe]);var pe=arguments.length-2;if(pe===1)Q.children=J;else if(1<pe){for(var Ee=Array(pe),mt=0;mt<pe;mt++)Ee[mt]=arguments[mt+2];Q.children=Ee}return ae(N.type,he,Q)},me.createContext=function(N){return N={$$typeof:p,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:h,_context:N},N},me.createElement=function(N,H,J){var Q,he={},pe=null;if(H!=null)for(Q in H.key!==void 0&&(pe=""+H.key),H)le.call(H,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(he[Q]=H[Q]);var Ee=arguments.length-2;if(Ee===1)he.children=J;else if(1<Ee){for(var mt=Array(Ee),B=0;B<Ee;B++)mt[B]=arguments[B+2];he.children=mt}if(N&&N.defaultProps)for(Q in Ee=N.defaultProps,Ee)he[Q]===void 0&&(he[Q]=Ee[Q]);return ae(N,pe,he)},me.createRef=function(){return{current:null}},me.forwardRef=function(N){return{$$typeof:x,render:N}},me.isValidElement=be,me.lazy=function(N){return{$$typeof:S,_payload:{_status:-1,_result:N},_init:ce}},me.memo=function(N,H){return{$$typeof:v,type:N,compare:H===void 0?null:H}},me.startTransition=function(N){var H=V.T,J={};V.T=J;try{var Q=N(),he=V.S;he!==null&&he(J,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then($,_e)}catch(pe){_e(pe)}finally{H!==null&&J.types!==null&&(H.types=J.types),V.T=H}},me.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},me.use=function(N){return V.H.use(N)},me.useActionState=function(N,H,J){return V.H.useActionState(N,H,J)},me.useCallback=function(N,H){return V.H.useCallback(N,H)},me.useContext=function(N){return V.H.useContext(N)},me.useDebugValue=function(){},me.useDeferredValue=function(N,H){return V.H.useDeferredValue(N,H)},me.useEffect=function(N,H){return V.H.useEffect(N,H)},me.useEffectEvent=function(N){return V.H.useEffectEvent(N)},me.useId=function(){return V.H.useId()},me.useImperativeHandle=function(N,H,J){return V.H.useImperativeHandle(N,H,J)},me.useInsertionEffect=function(N,H){return V.H.useInsertionEffect(N,H)},me.useLayoutEffect=function(N,H){return V.H.useLayoutEffect(N,H)},me.useMemo=function(N,H){return V.H.useMemo(N,H)},me.useOptimistic=function(N,H){return V.H.useOptimistic(N,H)},me.useReducer=function(N,H,J){return V.H.useReducer(N,H,J)},me.useRef=function(N){return V.H.useRef(N)},me.useState=function(N){return V.H.useState(N)},me.useSyncExternalStore=function(N,H,J){return V.H.useSyncExternalStore(N,H,J)},me.useTransition=function(){return V.H.useTransition()},me.version="19.2.8",me}var fm;function vo(){return fm||(fm=1,Fr.exports=yx()),Fr.exports}var C=vo(),Wr={exports:{}},fi={},Pr={exports:{}},eo={};var dm;function bx(){return dm||(dm=1,(function(u){function c(D,K){var ce=D.length;D.push(K);e:for(;0<ce;){var _e=ce-1>>>1,ye=D[_e];if(0<f(ye,K))D[_e]=K,D[ce]=ye,ce=_e;else break e}}function o(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var K=D[0],ce=D.pop();if(ce!==K){D[0]=ce;e:for(var _e=0,ye=D.length,N=ye>>>1;_e<N;){var H=2*(_e+1)-1,J=D[H],Q=H+1,he=D[Q];if(0>f(J,ce))Q<ye&&0>f(he,J)?(D[_e]=he,D[Q]=ce,_e=Q):(D[_e]=J,D[H]=ce,_e=H);else if(Q<ye&&0>f(he,ce))D[_e]=he,D[Q]=ce,_e=Q;else break e}}return K}function f(D,K){var ce=D.sortIndex-K.sortIndex;return ce!==0?ce:D.id-K.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;u.unstable_now=function(){return h.now()}}else{var p=Date,x=p.now();u.unstable_now=function(){return p.now()-x}}var y=[],v=[],S=1,E=null,k=3,L=!1,Y=!1,F=!1,Z=!1,z=typeof setTimeout=="function"?setTimeout:null,de=typeof clearTimeout=="function"?clearTimeout:null,fe=typeof setImmediate<"u"?setImmediate:null;function te(D){for(var K=o(v);K!==null;){if(K.callback===null)r(v);else if(K.startTime<=D)r(v),K.sortIndex=K.expirationTime,c(y,K);else break;K=o(v)}}function W(D){if(F=!1,te(D),!Y)if(o(y)!==null)Y=!0,$||($=!0,P());else{var K=o(v);K!==null&&at(W,K.startTime-D)}}var $=!1,V=-1,le=5,ae=-1;function je(){return Z?!0:!(u.unstable_now()-ae<le)}function be(){if(Z=!1,$){var D=u.unstable_now();ae=D;var K=!0;try{e:{Y=!1,F&&(F=!1,de(V),V=-1),L=!0;var ce=k;try{t:{for(te(D),E=o(y);E!==null&&!(E.expirationTime>D&&je());){var _e=E.callback;if(typeof _e=="function"){E.callback=null,k=E.priorityLevel;var ye=_e(E.expirationTime<=D);if(D=u.unstable_now(),typeof ye=="function"){E.callback=ye,te(D),K=!0;break t}E===o(y)&&r(y),te(D)}else r(y);E=o(y)}if(E!==null)K=!0;else{var N=o(v);N!==null&&at(W,N.startTime-D),K=!1}}break e}finally{E=null,k=ce,L=!1}K=void 0}}finally{K?P():$=!1}}}var P;if(typeof fe=="function")P=function(){fe(be)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,Je=ve.port2;ve.port1.onmessage=be,P=function(){Je.postMessage(null)}}else P=function(){z(be,0)};function at(D,K){V=z(function(){D(u.unstable_now())},K)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(D){D.callback=null},u.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<D?Math.floor(1e3/D):5},u.unstable_getCurrentPriorityLevel=function(){return k},u.unstable_next=function(D){switch(k){case 1:case 2:case 3:var K=3;break;default:K=k}var ce=k;k=K;try{return D()}finally{k=ce}},u.unstable_requestPaint=function(){Z=!0},u.unstable_runWithPriority=function(D,K){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ce=k;k=D;try{return K()}finally{k=ce}},u.unstable_scheduleCallback=function(D,K,ce){var _e=u.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?_e+ce:_e):ce=_e,D){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=ce+ye,D={id:S++,callback:K,priorityLevel:D,startTime:ce,expirationTime:ye,sortIndex:-1},ce>_e?(D.sortIndex=ce,c(v,D),o(y)===null&&D===o(v)&&(F?(de(V),V=-1):F=!0,at(W,ce-_e))):(D.sortIndex=ye,c(y,D),Y||L||(Y=!0,$||($=!0,P()))),D},u.unstable_shouldYield=je,u.unstable_wrapCallback=function(D){var K=k;return function(){var ce=k;k=K;try{return D.apply(this,arguments)}finally{k=ce}}}})(eo)),eo}var hm;function jx(){return hm||(hm=1,Pr.exports=bx()),Pr.exports}var to={exports:{}},zt={};var mm;function Nx(){if(mm)return zt;mm=1;var u=vo();function c(y){var v="https://react.dev/errors/"+y;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)v+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+y+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var r={d:{f:o,r:function(){throw Error(c(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(y,v,S){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:E==null?null:""+E,children:y,containerInfo:v,implementation:S}}var p=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(y,v){if(y==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,zt.createPortal=function(y,v){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(c(299));return h(y,v,null,S)},zt.flushSync=function(y){var v=p.T,S=r.p;try{if(p.T=null,r.p=2,y)return y()}finally{p.T=v,r.p=S,r.d.f()}},zt.preconnect=function(y,v){typeof y=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,r.d.C(y,v))},zt.prefetchDNS=function(y){typeof y=="string"&&r.d.D(y)},zt.preinit=function(y,v){if(typeof y=="string"&&v&&typeof v.as=="string"){var S=v.as,E=x(S,v.crossOrigin),k=typeof v.integrity=="string"?v.integrity:void 0,L=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;S==="style"?r.d.S(y,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:E,integrity:k,fetchPriority:L}):S==="script"&&r.d.X(y,{crossOrigin:E,integrity:k,fetchPriority:L,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},zt.preinitModule=function(y,v){if(typeof y=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var S=x(v.as,v.crossOrigin);r.d.M(y,{crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&r.d.M(y)},zt.preload=function(y,v){if(typeof y=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var S=v.as,E=x(S,v.crossOrigin);r.d.L(y,S,{crossOrigin:E,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},zt.preloadModule=function(y,v){if(typeof y=="string")if(v){var S=x(v.as,v.crossOrigin);r.d.m(y,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else r.d.m(y)},zt.requestFormReset=function(y){r.d.r(y)},zt.unstable_batchedUpdates=function(y,v){return y(v)},zt.useFormState=function(y,v,S){return p.H.useFormState(y,v,S)},zt.useFormStatus=function(){return p.H.useHostTransitionStatus()},zt.version="19.2.8",zt}var pm;function Sx(){if(pm)return to.exports;pm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(c){console.error(c)}}return u(),to.exports=Nx(),to.exports}var gm;function wx(){if(gm)return fi;gm=1;var u=jx(),c=vo(),o=Sx();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function p(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function x(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(h(e)!==e)throw Error(r(188))}function v(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var s=l.return;if(s===null)break;var i=s.alternate;if(i===null){if(a=s.return,a!==null){l=a;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===l)return y(s),e;if(i===a)return y(s),t;i=i.sibling}throw Error(r(188))}if(l.return!==a.return)l=s,a=i;else{for(var d=!1,m=s.child;m;){if(m===l){d=!0,l=s,a=i;break}if(m===a){d=!0,a=s,l=i;break}m=m.sibling}if(!d){for(m=i.child;m;){if(m===l){d=!0,l=i,a=s;break}if(m===a){d=!0,a=i,l=s;break}m=m.sibling}if(!d)throw Error(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var E=Object.assign,k=Symbol.for("react.element"),L=Symbol.for("react.transitional.element"),Y=Symbol.for("react.portal"),F=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),de=Symbol.for("react.consumer"),fe=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),je=Symbol.for("react.memo_cache_sentinel"),be=Symbol.iterator;function P(e){return e===null||typeof e!="object"?null:(e=be&&e[be]||e["@@iterator"],typeof e=="function"?e:null)}var ve=Symbol.for("react.client.reference");function Je(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ve?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case F:return"Fragment";case z:return"Profiler";case Z:return"StrictMode";case W:return"Suspense";case $:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Y:return"Portal";case fe:return e.displayName||"Context";case de:return(e._context.displayName||"Context")+".Consumer";case te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return t=e.displayName||null,t!==null?t:Je(e.type)||"Memo";case le:t=e._payload,e=e._init;try{return Je(e(t))}catch{}}return null}var at=Array.isArray,D=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},_e=[],ye=-1;function N(e){return{current:e}}function H(e){0>ye||(e.current=_e[ye],_e[ye]=null,ye--)}function J(e,t){ye++,_e[ye]=e.current,e.current=t}var Q=N(null),he=N(null),pe=N(null),Ee=N(null);function mt(e,t){switch(J(pe,t),J(he,e),J(Q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?zh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=zh(t),e=Ch(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(Q),J(Q,e)}function B(){H(Q),H(he),H(pe)}function Re(e){e.memoizedState!==null&&J(Ee,e);var t=Q.current,l=Ch(t,e.type);t!==l&&(J(he,e),J(Q,l))}function Ye(e){he.current===e&&(H(Q),H(he)),Ee.current===e&&(H(Ee),ii._currentValue=ce)}var We,tl;function ze(e){if(We===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);We=t&&t[1]||"",tl=-1<l.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+We+e+tl}var Ya=!1;function $e(e,t){if(!e||Ya)return"";Ya=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(O){var R=O}Reflect.construct(e,[],q)}else{try{q.call()}catch(O){R=O}e.call(q.prototype)}}else{try{throw Error()}catch(O){R=O}(q=e())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(O){if(O&&R&&typeof O.stack=="string")return[O.stack,R.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),d=i[0],m=i[1];if(d&&m){var b=d.split(`
4
+ `),_=m.split(`
5
+ `);for(s=a=0;a<b.length&&!b[a].includes("DetermineComponentFrameRoot");)a++;for(;s<_.length&&!_[s].includes("DetermineComponentFrameRoot");)s++;if(a===b.length||s===_.length)for(a=b.length-1,s=_.length-1;1<=a&&0<=s&&b[a]!==_[s];)s--;for(;1<=a&&0<=s;a--,s--)if(b[a]!==_[s]){if(a!==1||s!==1)do if(a--,s--,0>s||b[a]!==_[s]){var M=`
6
+ `+b[a].replace(" at new "," at ");return e.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",e.displayName)),M}while(1<=a&&0<=s);break}}}finally{Ya=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?ze(l):""}function os(e,t){switch(e.tag){case 26:case 27:case 5:return ze(e.type);case 16:return ze("Lazy");case 13:return e.child!==t&&t!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return $e(e.type,!1);case 11:return $e(e.type.render,!1);case 1:return $e(e.type,!0);case 31:return ze("Activity");default:return""}}function $t(e){try{var t="",l=null;do t+=os(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var Hl=Object.prototype.hasOwnProperty,yn=u.unstable_scheduleCallback,ll=u.unstable_cancelCallback,ji=u.unstable_shouldYield,fs=u.unstable_requestPaint,_t=u.unstable_now,Ni=u.unstable_getCurrentPriorityLevel,xl=u.unstable_ImmediatePriority,Al=u.unstable_UserBlockingPriority,al=u.unstable_NormalPriority,ds=u.unstable_LowPriority,$a=u.unstable_IdlePriority,bn=u.log,hs=u.unstable_setDisableYieldValue,nl=null,yt=null;function Xt(e){if(typeof bn=="function"&&hs(e),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(nl,e)}catch{}}var Rt=Math.clz32?Math.clz32:ms,Si=Math.log,wi=Math.LN2;function ms(e){return e>>>=0,e===0?32:31-(Si(e)/wi|0)|0}var ca=256,vl=262144,yl=4194304;function _l(e){var t=e&42;if(t!==0)return t;switch(e&-e){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Xa(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var s=0,i=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var m=a&134217727;return m!==0?(a=m&~i,a!==0?s=_l(a):(d&=m,d!==0?s=_l(d):l||(l=m&~e,l!==0&&(s=_l(l))))):(m=a&~i,m!==0?s=_l(m):d!==0?s=_l(d):l||(l=a&~e,l!==0&&(s=_l(l)))),s===0?0:t!==0&&t!==s&&(t&i)===0&&(i=s&-s,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:s}function ua(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ki(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ps(){var e=yl;return yl<<=1,(yl&62914560)===0&&(yl=4194304),e}function ra(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Rl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function sl(e,t,l,a,s,i){var d=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var m=e.entanglements,b=e.expirationTimes,_=e.hiddenUpdates;for(l=d&~l;0<l;){var M=31-Rt(l),q=1<<M;m[M]=0,b[M]=-1;var R=_[M];if(R!==null)for(_[M]=null,M=0;M<R.length;M++){var O=R[M];O!==null&&(O.lane&=-536870913)}l&=~q}a!==0&&Bl(e,a,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(d&~t))}function Bl(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Rt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function jn(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-Rt(l),s=1<<a;s&t|e[a]&t&&(e[a]|=t),l&=~s}}function Nn(e,t){var l=t&-t;return l=(l&42)!==0?1:gs(l),(l&(e.suspendedLanes|t))!==0?0:l}function gs(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Sn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function wn(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:tm(e.type))}function xs(e,t){var l=K.p;try{return K.p=e,t()}finally{K.p=l}}var il=Math.random().toString(36).slice(2),pt="__reactFiber$"+il,it="__reactProps$"+il,oa="__reactContainer$"+il,vs="__reactEvents$"+il,et="__reactListeners$"+il,fa="__reactHandles$"+il,Ti="__reactResources$"+il,da="__reactMarker$"+il;function Qa(e){delete e[pt],delete e[it],delete e[vs],delete e[et],delete e[fa]}function ql(e){var t=e[pt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[oa]||l[pt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Bh(e);e!==null;){if(l=e[pt])return l;e=Bh(e)}return t}e=l,l=e.parentNode}return null}function Gl(e){if(e=e[pt]||e[oa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Za(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function ha(e){var t=e[Ti];return t||(t=e[Ti]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ct(e){e[da]=!0}var Ei=new Set,bl={};function zl(e,t){jl(e,t),jl(e+"Capture",t)}function jl(e,t){for(bl[e]=t,e=0;e<t.length;e++)Ei.add(t[e])}var Yl=RegExp("^[: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]*$"),Ai={},Va={};function _i(e){return Hl.call(Va,e)?!0:Hl.call(Ai,e)?!1:Yl.test(e)?Va[e]=!0:(Ai[e]=!0,!1)}function kn(e,t,l){if(_i(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Ka(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function cl(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function Nt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Tn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function En(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var s=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(d){l=""+d,i.call(this,d)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(d){l=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Cl(e){if(!e._valueTracker){var t=Tn(e)?"checked":"value";e._valueTracker=En(e,t,""+e[t])}}function ma(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Tn(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Dt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Jc=/[\n"\\]/g;function St(e){return e.replace(Jc,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ys(e,t,l,a,s,i,d,m){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Nt(t)):e.value!==""+Nt(t)&&(e.value=""+Nt(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?An(e,d,Nt(t)):l!=null?An(e,d,Nt(l)):a!=null&&e.removeAttribute("value"),s==null&&i!=null&&(e.defaultChecked=!!i),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Nt(m):e.removeAttribute("name")}function bs(e,t,l,a,s,i,d,m){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Cl(e);return}l=l!=null?""+Nt(l):"",t=t!=null?""+Nt(t):l,m||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=m?e.checked:!!a,e.defaultChecked=!!a,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Cl(e)}function An(e,t,l){t==="number"&&Dt(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function $l(e,t,l,a){if(e=e.options,t){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=t.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Nt(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function js(e,t,l){if(t!=null&&(t=""+Nt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Nt(l):""}function Ri(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(at(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Nt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Cl(e)}function Xl(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Ic=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function zi(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Ic.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Ns(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&l[s]!==a&&zi(e,s,a)}else for(var i in t)t.hasOwnProperty(i)&&zi(e,i,t[i])}function pa(e){if(e.indexOf("-")===-1)return!1;switch(e){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 Ss=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),X=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function g(e){return X.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function w(){}var G=null;function ee(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ne=null,re=null;function He(e){var t=Gl(e);if(t&&(e=t.stateNode)){var l=e[it]||null;e:switch(e=t.stateNode,t.type){case"input":if(ys(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+St(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var s=a[it]||null;if(!s)throw Error(r(90));ys(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&ma(a)}break e;case"textarea":js(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&$l(e,!!l.multiple,t,!1)}}}var Ve=!1;function wt(e,t,l){if(Ve)return e(t,l);Ve=!0;try{var a=e(t);return a}finally{if(Ve=!1,(ne!==null||re!==null)&&(vc(),ne&&(t=ne,e=re,re=ne=null,He(t),e)))for(t=0;t<e.length;t++)He(e[t])}}function ut(e,t){var l=e.stateNode;if(l===null)return null;var a=l[it]||null;if(a===null)return null;l=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var Qt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gt=!1;if(Qt)try{var ws={};Object.defineProperty(ws,"passive",{get:function(){gt=!0}}),window.addEventListener("test",ws,ws),window.removeEventListener("test",ws,ws)}catch{gt=!1}var ga=null,Fc=null,Ci=null;function zo(){if(Ci)return Ci;var e,t=Fc,l=t.length,a,s="value"in ga?ga.value:ga.textContent,i=s.length;for(e=0;e<l&&t[e]===s[e];e++);var d=l-e;for(a=1;a<=d&&t[l-a]===s[i-a];a++);return Ci=s.slice(e,1<a?1-a:void 0)}function Oi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Di(){return!0}function Co(){return!1}function Ut(e){function t(l,a,s,i,d){this._reactName=l,this._targetInst=s,this.type=a,this.nativeEvent=i,this.target=d,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(l=e[m],this[m]=l?l(i):i[m]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Di:Co,this.isPropagationStopped=Co,this}return E(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Di)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Di)},persist:function(){},isPersistent:Di}),t}var Ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mi=Ut(Ja),ks=E({},Ja,{view:0,detail:0}),pp=Ut(ks),Wc,Pc,Ts,Ui=E({},ks,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ts&&(Ts&&e.type==="mousemove"?(Wc=e.screenX-Ts.screenX,Pc=e.screenY-Ts.screenY):Pc=Wc=0,Ts=e),Wc)},movementY:function(e){return"movementY"in e?e.movementY:Pc}}),Oo=Ut(Ui),gp=E({},Ui,{dataTransfer:0}),xp=Ut(gp),vp=E({},ks,{relatedTarget:0}),eu=Ut(vp),yp=E({},Ja,{animationName:0,elapsedTime:0,pseudoElement:0}),bp=Ut(yp),jp=E({},Ja,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Np=Ut(jp),Sp=E({},Ja,{data:0}),Do=Ut(Sp),wp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kp={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Tp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ep(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Tp[e])?!!t[e]:!1}function tu(){return Ep}var Ap=E({},ks,{key:function(e){if(e.key){var t=wp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Oi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?kp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tu,charCode:function(e){return e.type==="keypress"?Oi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Oi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_p=Ut(Ap),Rp=E({},Ui,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mo=Ut(Rp),zp=E({},ks,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tu}),Cp=Ut(zp),Op=E({},Ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),Dp=Ut(Op),Mp=E({},Ui,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Up=Ut(Mp),Lp=E({},Ja,{newState:0,oldState:0}),Hp=Ut(Lp),Bp=[9,13,27,32],lu=Qt&&"CompositionEvent"in window,Es=null;Qt&&"documentMode"in document&&(Es=document.documentMode);var qp=Qt&&"TextEvent"in window&&!Es,Uo=Qt&&(!lu||Es&&8<Es&&11>=Es),Lo=" ",Ho=!1;function Bo(e,t){switch(e){case"keyup":return Bp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _n=!1;function Gp(e,t){switch(e){case"compositionend":return qo(t);case"keypress":return t.which!==32?null:(Ho=!0,Lo);case"textInput":return e=t.data,e===Lo&&Ho?null:e;default:return null}}function Yp(e,t){if(_n)return e==="compositionend"||!lu&&Bo(e,t)?(e=zo(),Ci=Fc=ga=null,_n=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Uo&&t.locale!=="ko"?null:t.data;default:return null}}var $p={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Go(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$p[e.type]:t==="textarea"}function Yo(e,t,l,a){ne?re?re.push(a):re=[a]:ne=a,t=kc(t,"onChange"),0<t.length&&(l=new Mi("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var As=null,_s=null;function Xp(e){kh(e,0)}function Li(e){var t=Za(e);if(ma(t))return e}function $o(e,t){if(e==="change")return t}var Xo=!1;if(Qt){var au;if(Qt){var nu="oninput"in document;if(!nu){var Qo=document.createElement("div");Qo.setAttribute("oninput","return;"),nu=typeof Qo.oninput=="function"}au=nu}else au=!1;Xo=au&&(!document.documentMode||9<document.documentMode)}function Zo(){As&&(As.detachEvent("onpropertychange",Vo),_s=As=null)}function Vo(e){if(e.propertyName==="value"&&Li(_s)){var t=[];Yo(t,_s,e,ee(e)),wt(Xp,t)}}function Qp(e,t,l){e==="focusin"?(Zo(),As=t,_s=l,As.attachEvent("onpropertychange",Vo)):e==="focusout"&&Zo()}function Zp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Li(_s)}function Vp(e,t){if(e==="click")return Li(t)}function Kp(e,t){if(e==="input"||e==="change")return Li(t)}function Jp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zt=typeof Object.is=="function"?Object.is:Jp;function Rs(e,t){if(Zt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var s=l[a];if(!Hl.call(t,s)||!Zt(e[s],t[s]))return!1}return!0}function Ko(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jo(e,t){var l=Ko(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ko(l)}}function Io(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Io(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Dt(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Dt(e.document)}return t}function su(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Ip=Qt&&"documentMode"in document&&11>=document.documentMode,Rn=null,iu=null,zs=null,cu=!1;function Wo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;cu||Rn==null||Rn!==Dt(a)||(a=Rn,"selectionStart"in a&&su(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),zs&&Rs(zs,a)||(zs=a,a=kc(iu,"onSelect"),0<a.length&&(t=new Mi("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Rn)))}function Ia(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var zn={animationend:Ia("Animation","AnimationEnd"),animationiteration:Ia("Animation","AnimationIteration"),animationstart:Ia("Animation","AnimationStart"),transitionrun:Ia("Transition","TransitionRun"),transitionstart:Ia("Transition","TransitionStart"),transitioncancel:Ia("Transition","TransitionCancel"),transitionend:Ia("Transition","TransitionEnd")},uu={},Po={};Qt&&(Po=document.createElement("div").style,"AnimationEvent"in window||(delete zn.animationend.animation,delete zn.animationiteration.animation,delete zn.animationstart.animation),"TransitionEvent"in window||delete zn.transitionend.transition);function Fa(e){if(uu[e])return uu[e];if(!zn[e])return e;var t=zn[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Po)return uu[e]=t[l];return e}var ef=Fa("animationend"),tf=Fa("animationiteration"),lf=Fa("animationstart"),Fp=Fa("transitionrun"),Wp=Fa("transitionstart"),Pp=Fa("transitioncancel"),af=Fa("transitionend"),nf=new Map,ru="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ru.push("scrollEnd");function Nl(e,t){nf.set(e,t),zl(t,[e])}var Hi=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},ul=[],Cn=0,ou=0;function Bi(){for(var e=Cn,t=ou=Cn=0;t<e;){var l=ul[t];ul[t++]=null;var a=ul[t];ul[t++]=null;var s=ul[t];ul[t++]=null;var i=ul[t];if(ul[t++]=null,a!==null&&s!==null){var d=a.pending;d===null?s.next=s:(s.next=d.next,d.next=s),a.pending=s}i!==0&&sf(l,s,i)}}function qi(e,t,l,a){ul[Cn++]=e,ul[Cn++]=t,ul[Cn++]=l,ul[Cn++]=a,ou|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function fu(e,t,l,a){return qi(e,t,l,a),Gi(e)}function Wa(e,t){return qi(e,null,null,t),Gi(e)}function sf(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var s=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(s=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,s&&t!==null&&(s=31-Rt(l),e=i.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=l|536870912),i):null}function Gi(e){if(50<Ps)throw Ps=0,br=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var On={};function eg(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(e,t,l,a){return new eg(e,t,l,a)}function du(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ql(e,t){var l=e.alternate;return l===null?(l=Vt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function cf(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Yi(e,t,l,a,s,i){var d=0;if(a=e,typeof e=="function")du(e)&&(d=1);else if(typeof e=="string")d=sx(e,l,Q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=Vt(31,l,t,s),e.elementType=ae,e.lanes=i,e;case F:return Pa(l.children,s,i,t);case Z:d=8,s|=24;break;case z:return e=Vt(12,l,t,s|2),e.elementType=z,e.lanes=i,e;case W:return e=Vt(13,l,t,s),e.elementType=W,e.lanes=i,e;case $:return e=Vt(19,l,t,s),e.elementType=$,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fe:d=10;break e;case de:d=9;break e;case te:d=11;break e;case V:d=14;break e;case le:d=16,a=null;break e}d=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=Vt(d,l,t,s),t.elementType=e,t.type=a,t.lanes=i,t}function Pa(e,t,l,a){return e=Vt(7,e,a,t),e.lanes=l,e}function hu(e,t,l){return e=Vt(6,e,null,t),e.lanes=l,e}function uf(e){var t=Vt(18,null,null,0);return t.stateNode=e,t}function mu(e,t,l){return t=Vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var rf=new WeakMap;function rl(e,t){if(typeof e=="object"&&e!==null){var l=rf.get(e);return l!==void 0?l:(t={value:e,source:t,stack:$t(t)},rf.set(e,t),t)}return{value:e,source:t,stack:$t(t)}}var Dn=[],Mn=0,$i=null,Cs=0,ol=[],fl=0,xa=null,Ol=1,Dl="";function Zl(e,t){Dn[Mn++]=Cs,Dn[Mn++]=$i,$i=e,Cs=t}function of(e,t,l){ol[fl++]=Ol,ol[fl++]=Dl,ol[fl++]=xa,xa=e;var a=Ol;e=Dl;var s=32-Rt(a)-1;a&=~(1<<s),l+=1;var i=32-Rt(t)+s;if(30<i){var d=s-s%5;i=(a&(1<<d)-1).toString(32),a>>=d,s-=d,Ol=1<<32-Rt(t)+s|l<<s|a,Dl=i+e}else Ol=1<<i|l<<s|a,Dl=e}function pu(e){e.return!==null&&(Zl(e,1),of(e,1,0))}function gu(e){for(;e===$i;)$i=Dn[--Mn],Dn[Mn]=null,Cs=Dn[--Mn],Dn[Mn]=null;for(;e===xa;)xa=ol[--fl],ol[fl]=null,Dl=ol[--fl],ol[fl]=null,Ol=ol[--fl],ol[fl]=null}function ff(e,t){ol[fl++]=Ol,ol[fl++]=Dl,ol[fl++]=xa,Ol=t.id,Dl=t.overflow,xa=e}var kt=null,Ie=null,Ae=!1,va=null,dl=!1,xu=Error(r(519));function ya(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Os(rl(t,e)),xu}function df(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[pt]=e,t[it]=a,l){case"dialog":Se("cancel",t),Se("close",t);break;case"iframe":case"object":case"embed":Se("load",t);break;case"video":case"audio":for(l=0;l<ti.length;l++)Se(ti[l],t);break;case"source":Se("error",t);break;case"img":case"image":case"link":Se("error",t),Se("load",t);break;case"details":Se("toggle",t);break;case"input":Se("invalid",t),bs(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Se("invalid",t);break;case"textarea":Se("invalid",t),Ri(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||_h(t.textContent,l)?(a.popover!=null&&(Se("beforetoggle",t),Se("toggle",t)),a.onScroll!=null&&Se("scroll",t),a.onScrollEnd!=null&&Se("scrollend",t),a.onClick!=null&&(t.onclick=w),t=!0):t=!1,t||ya(e,!0)}function hf(e){for(kt=e.return;kt;)switch(kt.tag){case 5:case 31:case 13:dl=!1;return;case 27:case 3:dl=!0;return;default:kt=kt.return}}function Un(e){if(e!==kt)return!1;if(!Ae)return hf(e),Ae=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Mr(e.type,e.memoizedProps)),l=!l),l&&Ie&&ya(e),hf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ie=Hh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ie=Hh(e)}else t===27?(t=Ie,Oa(e.type)?(e=qr,qr=null,Ie=e):Ie=t):Ie=kt?ml(e.stateNode.nextSibling):null;return!0}function en(){Ie=kt=null,Ae=!1}function vu(){var e=va;return e!==null&&(qt===null?qt=e:qt.push.apply(qt,e),va=null),e}function Os(e){va===null?va=[e]:va.push(e)}var yu=N(null),tn=null,Vl=null;function ba(e,t,l){J(yu,t._currentValue),t._currentValue=l}function Kl(e){e._currentValue=yu.current,H(yu)}function bu(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function ju(e,t,l,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var d=s.child;i=i.firstContext;e:for(;i!==null;){var m=i;i=s;for(var b=0;b<t.length;b++)if(m.context===t[b]){i.lanes|=l,m=i.alternate,m!==null&&(m.lanes|=l),bu(i.return,l,e),a||(d=null);break e}i=m.next}}else if(s.tag===18){if(d=s.return,d===null)throw Error(r(341));d.lanes|=l,i=d.alternate,i!==null&&(i.lanes|=l),bu(d,l,e),d=null}else d=s.child;if(d!==null)d.return=s;else for(d=s;d!==null;){if(d===e){d=null;break}if(s=d.sibling,s!==null){s.return=d.return,d=s;break}d=d.return}s=d}}function Ln(e,t,l,a){e=null;for(var s=t,i=!1;s!==null;){if(!i){if((s.flags&524288)!==0)i=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var d=s.alternate;if(d===null)throw Error(r(387));if(d=d.memoizedProps,d!==null){var m=s.type;Zt(s.pendingProps.value,d.value)||(e!==null?e.push(m):e=[m])}}else if(s===Ee.current){if(d=s.alternate,d===null)throw Error(r(387));d.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(ii):e=[ii])}s=s.return}e!==null&&ju(t,e,l,a),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!Zt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ln(e){tn=e,Vl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Tt(e){return mf(tn,e)}function Qi(e,t){return tn===null&&ln(e),mf(e,t)}function mf(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Vl===null){if(e===null)throw Error(r(308));Vl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Vl=Vl.next=t;return l}var tg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},lg=u.unstable_scheduleCallback,ag=u.unstable_NormalPriority,rt={$$typeof:fe,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nu(){return{controller:new tg,data:new Map,refCount:0}}function Ds(e){e.refCount--,e.refCount===0&&lg(ag,function(){e.controller.abort()})}var Ms=null,Su=0,Hn=0,Bn=null;function ng(e,t){if(Ms===null){var l=Ms=[];Su=0,Hn=Tr(),Bn={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Su++,t.then(pf,pf),t}function pf(){if(--Su===0&&Ms!==null){Bn!==null&&(Bn.status="fulfilled");var e=Ms;Ms=null,Hn=0,Bn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function sg(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),a}var gf=D.S;D.S=function(e,t){Pd=_t(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ng(e,t),gf!==null&&gf(e,t)};var an=N(null);function wu(){var e=an.current;return e!==null?e:Ke.pooledCache}function Zi(e,t){t===null?J(an,an.current):J(an,t.pool)}function xf(){var e=wu();return e===null?null:{parent:rt._currentValue,pool:e}}var qn=Error(r(460)),ku=Error(r(474)),Vi=Error(r(542)),Ki={then:function(){}};function vf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function yf(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(w,w),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,jf(e),e;default:if(typeof t.status=="string")t.then(w,w);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,jf(e),e}throw sn=t,qn}}function nn(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(sn=l,qn):l}}var sn=null;function bf(){if(sn===null)throw Error(r(459));var e=sn;return sn=null,e}function jf(e){if(e===qn||e===Vi)throw Error(r(483))}var Gn=null,Us=0;function Ji(e){var t=Us;return Us+=1,Gn===null&&(Gn=[]),yf(Gn,e,t)}function Ls(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ii(e,t){throw t.$$typeof===k?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Nf(e){function t(T,j){if(e){var A=T.deletions;A===null?(T.deletions=[j],T.flags|=16):A.push(j)}}function l(T,j){if(!e)return null;for(;j!==null;)t(T,j),j=j.sibling;return null}function a(T){for(var j=new Map;T!==null;)T.key!==null?j.set(T.key,T):j.set(T.index,T),T=T.sibling;return j}function s(T,j){return T=Ql(T,j),T.index=0,T.sibling=null,T}function i(T,j,A){return T.index=A,e?(A=T.alternate,A!==null?(A=A.index,A<j?(T.flags|=67108866,j):A):(T.flags|=67108866,j)):(T.flags|=1048576,j)}function d(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function m(T,j,A,U){return j===null||j.tag!==6?(j=hu(A,T.mode,U),j.return=T,j):(j=s(j,A),j.return=T,j)}function b(T,j,A,U){var ue=A.type;return ue===F?M(T,j,A.props.children,U,A.key):j!==null&&(j.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===le&&nn(ue)===j.type)?(j=s(j,A.props),Ls(j,A),j.return=T,j):(j=Yi(A.type,A.key,A.props,null,T.mode,U),Ls(j,A),j.return=T,j)}function _(T,j,A,U){return j===null||j.tag!==4||j.stateNode.containerInfo!==A.containerInfo||j.stateNode.implementation!==A.implementation?(j=mu(A,T.mode,U),j.return=T,j):(j=s(j,A.children||[]),j.return=T,j)}function M(T,j,A,U,ue){return j===null||j.tag!==7?(j=Pa(A,T.mode,U,ue),j.return=T,j):(j=s(j,A),j.return=T,j)}function q(T,j,A){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=hu(""+j,T.mode,A),j.return=T,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case L:return A=Yi(j.type,j.key,j.props,null,T.mode,A),Ls(A,j),A.return=T,A;case Y:return j=mu(j,T.mode,A),j.return=T,j;case le:return j=nn(j),q(T,j,A)}if(at(j)||P(j))return j=Pa(j,T.mode,A,null),j.return=T,j;if(typeof j.then=="function")return q(T,Ji(j),A);if(j.$$typeof===fe)return q(T,Qi(T,j),A);Ii(T,j)}return null}function R(T,j,A,U){var ue=j!==null?j.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ue!==null?null:m(T,j,""+A,U);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case L:return A.key===ue?b(T,j,A,U):null;case Y:return A.key===ue?_(T,j,A,U):null;case le:return A=nn(A),R(T,j,A,U)}if(at(A)||P(A))return ue!==null?null:M(T,j,A,U,null);if(typeof A.then=="function")return R(T,j,Ji(A),U);if(A.$$typeof===fe)return R(T,j,Qi(T,A),U);Ii(T,A)}return null}function O(T,j,A,U,ue){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return T=T.get(A)||null,m(j,T,""+U,ue);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case L:return T=T.get(U.key===null?A:U.key)||null,b(j,T,U,ue);case Y:return T=T.get(U.key===null?A:U.key)||null,_(j,T,U,ue);case le:return U=nn(U),O(T,j,A,U,ue)}if(at(U)||P(U))return T=T.get(A)||null,M(j,T,U,ue,null);if(typeof U.then=="function")return O(T,j,A,Ji(U),ue);if(U.$$typeof===fe)return O(T,j,A,Qi(j,U),ue);Ii(j,U)}return null}function se(T,j,A,U){for(var ue=null,De=null,ie=j,xe=j=0,Te=null;ie!==null&&xe<A.length;xe++){ie.index>xe?(Te=ie,ie=null):Te=ie.sibling;var Me=R(T,ie,A[xe],U);if(Me===null){ie===null&&(ie=Te);break}e&&ie&&Me.alternate===null&&t(T,ie),j=i(Me,j,xe),De===null?ue=Me:De.sibling=Me,De=Me,ie=Te}if(xe===A.length)return l(T,ie),Ae&&Zl(T,xe),ue;if(ie===null){for(;xe<A.length;xe++)ie=q(T,A[xe],U),ie!==null&&(j=i(ie,j,xe),De===null?ue=ie:De.sibling=ie,De=ie);return Ae&&Zl(T,xe),ue}for(ie=a(ie);xe<A.length;xe++)Te=O(ie,T,xe,A[xe],U),Te!==null&&(e&&Te.alternate!==null&&ie.delete(Te.key===null?xe:Te.key),j=i(Te,j,xe),De===null?ue=Te:De.sibling=Te,De=Te);return e&&ie.forEach(function(Ha){return t(T,Ha)}),Ae&&Zl(T,xe),ue}function oe(T,j,A,U){if(A==null)throw Error(r(151));for(var ue=null,De=null,ie=j,xe=j=0,Te=null,Me=A.next();ie!==null&&!Me.done;xe++,Me=A.next()){ie.index>xe?(Te=ie,ie=null):Te=ie.sibling;var Ha=R(T,ie,Me.value,U);if(Ha===null){ie===null&&(ie=Te);break}e&&ie&&Ha.alternate===null&&t(T,ie),j=i(Ha,j,xe),De===null?ue=Ha:De.sibling=Ha,De=Ha,ie=Te}if(Me.done)return l(T,ie),Ae&&Zl(T,xe),ue;if(ie===null){for(;!Me.done;xe++,Me=A.next())Me=q(T,Me.value,U),Me!==null&&(j=i(Me,j,xe),De===null?ue=Me:De.sibling=Me,De=Me);return Ae&&Zl(T,xe),ue}for(ie=a(ie);!Me.done;xe++,Me=A.next())Me=O(ie,T,xe,Me.value,U),Me!==null&&(e&&Me.alternate!==null&&ie.delete(Me.key===null?xe:Me.key),j=i(Me,j,xe),De===null?ue=Me:De.sibling=Me,De=Me);return e&&ie.forEach(function(gx){return t(T,gx)}),Ae&&Zl(T,xe),ue}function Ze(T,j,A,U){if(typeof A=="object"&&A!==null&&A.type===F&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case L:e:{for(var ue=A.key;j!==null;){if(j.key===ue){if(ue=A.type,ue===F){if(j.tag===7){l(T,j.sibling),U=s(j,A.props.children),U.return=T,T=U;break e}}else if(j.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===le&&nn(ue)===j.type){l(T,j.sibling),U=s(j,A.props),Ls(U,A),U.return=T,T=U;break e}l(T,j);break}else t(T,j);j=j.sibling}A.type===F?(U=Pa(A.props.children,T.mode,U,A.key),U.return=T,T=U):(U=Yi(A.type,A.key,A.props,null,T.mode,U),Ls(U,A),U.return=T,T=U)}return d(T);case Y:e:{for(ue=A.key;j!==null;){if(j.key===ue)if(j.tag===4&&j.stateNode.containerInfo===A.containerInfo&&j.stateNode.implementation===A.implementation){l(T,j.sibling),U=s(j,A.children||[]),U.return=T,T=U;break e}else{l(T,j);break}else t(T,j);j=j.sibling}U=mu(A,T.mode,U),U.return=T,T=U}return d(T);case le:return A=nn(A),Ze(T,j,A,U)}if(at(A))return se(T,j,A,U);if(P(A)){if(ue=P(A),typeof ue!="function")throw Error(r(150));return A=ue.call(A),oe(T,j,A,U)}if(typeof A.then=="function")return Ze(T,j,Ji(A),U);if(A.$$typeof===fe)return Ze(T,j,Qi(T,A),U);Ii(T,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,j!==null&&j.tag===6?(l(T,j.sibling),U=s(j,A),U.return=T,T=U):(l(T,j),U=hu(A,T.mode,U),U.return=T,T=U),d(T)):l(T,j)}return function(T,j,A,U){try{Us=0;var ue=Ze(T,j,A,U);return Gn=null,ue}catch(ie){if(ie===qn||ie===Vi)throw ie;var De=Vt(29,ie,null,T.mode);return De.lanes=U,De.return=T,De}}}var cn=Nf(!0),Sf=Nf(!1),ja=!1;function Tu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Eu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sa(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Le&2)!==0){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=Gi(e),sf(e,null,l),t}return qi(e,a,t,l),Gi(e)}function Hs(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,jn(e,l)}}function Au(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var s=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var d={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?s=i=d:i=i.next=d,l=l.next}while(l!==null);i===null?s=i=t:i=i.next=t}else s=i=t;l={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var _u=!1;function Bs(){if(_u){var e=Bn;if(e!==null)throw e}}function qs(e,t,l,a){_u=!1;var s=e.updateQueue;ja=!1;var i=s.firstBaseUpdate,d=s.lastBaseUpdate,m=s.shared.pending;if(m!==null){s.shared.pending=null;var b=m,_=b.next;b.next=null,d===null?i=_:d.next=_,d=b;var M=e.alternate;M!==null&&(M=M.updateQueue,m=M.lastBaseUpdate,m!==d&&(m===null?M.firstBaseUpdate=_:m.next=_,M.lastBaseUpdate=b))}if(i!==null){var q=s.baseState;d=0,M=_=b=null,m=i;do{var R=m.lane&-536870913,O=R!==m.lane;if(O?(ke&R)===R:(a&R)===R){R!==0&&R===Hn&&(_u=!0),M!==null&&(M=M.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var se=e,oe=m;R=t;var Ze=l;switch(oe.tag){case 1:if(se=oe.payload,typeof se=="function"){q=se.call(Ze,q,R);break e}q=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=oe.payload,R=typeof se=="function"?se.call(Ze,q,R):se,R==null)break e;q=E({},q,R);break e;case 2:ja=!0}}R=m.callback,R!==null&&(e.flags|=64,O&&(e.flags|=8192),O=s.callbacks,O===null?s.callbacks=[R]:O.push(R))}else O={lane:R,tag:m.tag,payload:m.payload,callback:m.callback,next:null},M===null?(_=M=O,b=q):M=M.next=O,d|=R;if(m=m.next,m===null){if(m=s.shared.pending,m===null)break;O=m,m=O.next,O.next=null,s.lastBaseUpdate=O,s.shared.pending=null}}while(!0);M===null&&(b=q),s.baseState=b,s.firstBaseUpdate=_,s.lastBaseUpdate=M,i===null&&(s.shared.lanes=0),Aa|=d,e.lanes=d,e.memoizedState=q}}function wf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function kf(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)wf(l[e],t)}var Yn=N(null),Fi=N(0);function Tf(e,t){e=aa,J(Fi,e),J(Yn,t),aa=e|t.baseLanes}function Ru(){J(Fi,aa),J(Yn,Yn.current)}function zu(){aa=Fi.current,H(Yn),H(Fi)}var Kt=N(null),hl=null;function wa(e){var t=e.alternate;J(nt,nt.current&1),J(Kt,e),hl===null&&(t===null||Yn.current!==null||t.memoizedState!==null)&&(hl=e)}function Cu(e){J(nt,nt.current),J(Kt,e),hl===null&&(hl=e)}function Ef(e){e.tag===22?(J(nt,nt.current),J(Kt,e),hl===null&&(hl=e)):ka()}function ka(){J(nt,nt.current),J(Kt,Kt.current)}function Jt(e){H(Kt),hl===e&&(hl=null),H(nt)}var nt=N(0);function Wi(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Hr(l)||Br(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Jl=0,ge=null,Xe=null,ot=null,Pi=!1,$n=!1,un=!1,ec=0,Gs=0,Xn=null,ig=0;function tt(){throw Error(r(321))}function Ou(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Zt(e[l],t[l]))return!1;return!0}function Du(e,t,l,a,s,i){return Jl=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?od:Ju,un=!1,i=l(a,s),un=!1,$n&&(i=_f(t,l,a,s)),Af(e),i}function Af(e){D.H=Xs;var t=Xe!==null&&Xe.next!==null;if(Jl=0,ot=Xe=ge=null,Pi=!1,Gs=0,Xn=null,t)throw Error(r(300));e===null||ft||(e=e.dependencies,e!==null&&Xi(e)&&(ft=!0))}function _f(e,t,l,a){ge=e;var s=0;do{if($n&&(Xn=null),Gs=0,$n=!1,25<=s)throw Error(r(301));if(s+=1,ot=Xe=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}D.H=fd,i=t(l,a)}while($n);return i}function cg(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?Ys(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(ge.flags|=1024),t}function Mu(){var e=ec!==0;return ec=0,e}function Uu(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Lu(e){if(Pi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pi=!1}Jl=0,ot=Xe=ge=null,$n=!1,Gs=ec=0,Xn=null}function Mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?ge.memoizedState=ot=e:ot=ot.next=e,ot}function st(){if(Xe===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ot===null?ge.memoizedState:ot.next;if(t!==null)ot=t,Xe=e;else{if(e===null)throw ge.alternate===null?Error(r(467)):Error(r(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ot===null?ge.memoizedState=ot=e:ot=ot.next=e}return ot}function tc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ys(e){var t=Gs;return Gs+=1,Xn===null&&(Xn=[]),e=yf(Xn,e,t),t=ge,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?od:Ju),e}function lc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ys(e);if(e.$$typeof===fe)return Tt(e)}throw Error(r(438,String(e)))}function Hu(e){var t=null,l=ge.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=ge.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=tc(),ge.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=je;return t.index++,l}function Il(e,t){return typeof t=="function"?t(e):t}function ac(e){var t=st();return Bu(t,Xe,e)}function Bu(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var s=e.baseQueue,i=a.pending;if(i!==null){if(s!==null){var d=s.next;s.next=i.next,i.next=d}t.baseQueue=s=i,a.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var m=d=null,b=null,_=t,M=!1;do{var q=_.lane&-536870913;if(q!==_.lane?(ke&q)===q:(Jl&q)===q){var R=_.revertLane;if(R===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),q===Hn&&(M=!0);else if((Jl&R)===R){_=_.next,R===Hn&&(M=!0);continue}else q={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},b===null?(m=b=q,d=i):b=b.next=q,ge.lanes|=R,Aa|=R;q=_.action,un&&l(i,q),i=_.hasEagerState?_.eagerState:l(i,q)}else R={lane:q,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},b===null?(m=b=R,d=i):b=b.next=R,ge.lanes|=q,Aa|=q;_=_.next}while(_!==null&&_!==t);if(b===null?d=i:b.next=m,!Zt(i,e.memoizedState)&&(ft=!0,M&&(l=Bn,l!==null)))throw l;e.memoizedState=i,e.baseState=d,e.baseQueue=b,a.lastRenderedState=i}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function qu(e){var t=st(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,s=l.pending,i=t.memoizedState;if(s!==null){l.pending=null;var d=s=s.next;do i=e(i,d.action),d=d.next;while(d!==s);Zt(i,t.memoizedState)||(ft=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function Rf(e,t,l){var a=ge,s=st(),i=Ae;if(i){if(l===void 0)throw Error(r(407));l=l()}else l=t();var d=!Zt((Xe||s).memoizedState,l);if(d&&(s.memoizedState=l,ft=!0),s=s.queue,$u(Of.bind(null,a,s,e),[e]),s.getSnapshot!==t||d||ot!==null&&ot.memoizedState.tag&1){if(a.flags|=2048,Qn(9,{destroy:void 0},Cf.bind(null,a,s,l,t),null),Ke===null)throw Error(r(349));i||(Jl&127)!==0||zf(a,t,l)}return l}function zf(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ge.updateQueue,t===null?(t=tc(),ge.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Cf(e,t,l,a){t.value=l,t.getSnapshot=a,Df(t)&&Mf(e)}function Of(e,t,l){return l(function(){Df(t)&&Mf(e)})}function Df(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Zt(e,l)}catch{return!0}}function Mf(e){var t=Wa(e,2);t!==null&&Gt(t,e,2)}function Gu(e){var t=Mt();if(typeof e=="function"){var l=e;if(e=l(),un){Xt(!0);try{l()}finally{Xt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Il,lastRenderedState:e},t}function Uf(e,t,l,a){return e.baseState=l,Bu(e,Xe,typeof a=="function"?a:Il)}function ug(e,t,l,a,s){if(ic(e))throw Error(r(485));if(e=t.action,e!==null){var i={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){i.listeners.push(d)}};D.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,Lf(t,i)):(i.next=l.next,t.pending=l.next=i)}}function Lf(e,t){var l=t.action,a=t.payload,s=e.state;if(t.isTransition){var i=D.T,d={};D.T=d;try{var m=l(s,a),b=D.S;b!==null&&b(d,m),Hf(e,t,m)}catch(_){Yu(e,t,_)}finally{i!==null&&d.types!==null&&(i.types=d.types),D.T=i}}else try{i=l(s,a),Hf(e,t,i)}catch(_){Yu(e,t,_)}}function Hf(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){Bf(e,t,a)},function(a){return Yu(e,t,a)}):Bf(e,t,l)}function Bf(e,t,l){t.status="fulfilled",t.value=l,qf(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Lf(e,l)))}function Yu(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,qf(t),t=t.next;while(t!==a)}e.action=null}function qf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Gf(e,t){return t}function Yf(e,t){if(Ae){var l=Ke.formState;if(l!==null){e:{var a=ge;if(Ae){if(Ie){t:{for(var s=Ie,i=dl;s.nodeType!==8;){if(!i){s=null;break t}if(s=ml(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){Ie=ml(s.nextSibling),a=s.data==="F!";break e}}ya(a)}a=!1}a&&(t=l[0])}}return l=Mt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gf,lastRenderedState:t},l.queue=a,l=cd.bind(null,ge,a),a.dispatch=l,a=Gu(!1),i=Ku.bind(null,ge,!1,a.queue),a=Mt(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,l=ug.bind(null,ge,s,i,l),s.dispatch=l,a.memoizedState=e,[t,l,!1]}function $f(e){var t=st();return Xf(t,Xe,e)}function Xf(e,t,l){if(t=Bu(e,t,Gf)[0],e=ac(Il)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Ys(t)}catch(d){throw d===qn?Vi:d}else a=t;t=st();var s=t.queue,i=s.dispatch;return l!==t.memoizedState&&(ge.flags|=2048,Qn(9,{destroy:void 0},rg.bind(null,s,l),null)),[a,i,e]}function rg(e,t){e.action=t}function Qf(e){var t=st(),l=Xe;if(l!==null)return Xf(t,l,e);st(),t=t.memoizedState,l=st();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Qn(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=ge.updateQueue,t===null&&(t=tc(),ge.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function Zf(){return st().memoizedState}function nc(e,t,l,a){var s=Mt();ge.flags|=e,s.memoizedState=Qn(1|t,{destroy:void 0},l,a===void 0?null:a)}function sc(e,t,l,a){var s=st();a=a===void 0?null:a;var i=s.memoizedState.inst;Xe!==null&&a!==null&&Ou(a,Xe.memoizedState.deps)?s.memoizedState=Qn(t,i,l,a):(ge.flags|=e,s.memoizedState=Qn(1|t,i,l,a))}function Vf(e,t){nc(8390656,8,e,t)}function $u(e,t){sc(2048,8,e,t)}function og(e){ge.flags|=4;var t=ge.updateQueue;if(t===null)t=tc(),ge.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Kf(e){var t=st().memoizedState;return og({ref:t,nextImpl:e}),function(){if((Le&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Jf(e,t){return sc(4,2,e,t)}function If(e,t){return sc(4,4,e,t)}function Ff(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Wf(e,t,l){l=l!=null?l.concat([e]):null,sc(4,4,Ff.bind(null,t,e),l)}function Xu(){}function Pf(e,t){var l=st();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Ou(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function ed(e,t){var l=st();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Ou(t,a[1]))return a[0];if(a=e(),un){Xt(!0);try{e()}finally{Xt(!1)}}return l.memoizedState=[a,t],a}function Qu(e,t,l){return l===void 0||(Jl&1073741824)!==0&&(ke&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=th(),ge.lanes|=e,Aa|=e,l)}function td(e,t,l,a){return Zt(l,t)?l:Yn.current!==null?(e=Qu(e,l,a),Zt(e,t)||(ft=!0),e):(Jl&42)===0||(Jl&1073741824)!==0&&(ke&261930)===0?(ft=!0,e.memoizedState=l):(e=th(),ge.lanes|=e,Aa|=e,t)}function ld(e,t,l,a,s){var i=K.p;K.p=i!==0&&8>i?i:8;var d=D.T,m={};D.T=m,Ku(e,!1,t,l);try{var b=s(),_=D.S;if(_!==null&&_(m,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var M=sg(b,a);$s(e,t,M,Wt(e))}else $s(e,t,a,Wt(e))}catch(q){$s(e,t,{then:function(){},status:"rejected",reason:q},Wt())}finally{K.p=i,d!==null&&m.types!==null&&(d.types=m.types),D.T=d}}function fg(){}function Zu(e,t,l,a){if(e.tag!==5)throw Error(r(476));var s=ad(e).queue;ld(e,s,t,ce,l===null?fg:function(){return nd(e),l(a)})}function ad(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Il,lastRenderedState:ce},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Il,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function nd(e){var t=ad(e);t.next===null&&(t=e.alternate.memoizedState),$s(e,t.next.queue,{},Wt())}function Vu(){return Tt(ii)}function sd(){return st().memoizedState}function id(){return st().memoizedState}function dg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Wt();e=Na(l);var a=Sa(t,e,l);a!==null&&(Gt(a,t,l),Hs(a,t,l)),t={cache:Nu()},e.payload=t;return}t=t.return}}function hg(e,t,l){var a=Wt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ic(e)?ud(t,l):(l=fu(e,t,l,a),l!==null&&(Gt(l,e,a),rd(l,t,a)))}function cd(e,t,l){var a=Wt();$s(e,t,l,a)}function $s(e,t,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ic(e))ud(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var d=t.lastRenderedState,m=i(d,l);if(s.hasEagerState=!0,s.eagerState=m,Zt(m,d))return qi(e,t,s,0),Ke===null&&Bi(),!1}catch{}if(l=fu(e,t,s,a),l!==null)return Gt(l,e,a),rd(l,t,a),!0}return!1}function Ku(e,t,l,a){if(a={lane:2,revertLane:Tr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ic(e)){if(t)throw Error(r(479))}else t=fu(e,l,a,2),t!==null&&Gt(t,e,2)}function ic(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function ud(e,t){$n=Pi=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function rd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,jn(e,l)}}var Xs={readContext:Tt,use:lc,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Xs.useEffectEvent=tt;var od={readContext:Tt,use:lc,useCallback:function(e,t){return Mt().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:Vf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,nc(4194308,4,Ff.bind(null,t,e),l)},useLayoutEffect:function(e,t){return nc(4194308,4,e,t)},useInsertionEffect:function(e,t){nc(4,2,e,t)},useMemo:function(e,t){var l=Mt();t=t===void 0?null:t;var a=e();if(un){Xt(!0);try{e()}finally{Xt(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Mt();if(l!==void 0){var s=l(t);if(un){Xt(!0);try{l(t)}finally{Xt(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=hg.bind(null,ge,e),[a.memoizedState,e]},useRef:function(e){var t=Mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Gu(e);var t=e.queue,l=cd.bind(null,ge,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Xu,useDeferredValue:function(e,t){var l=Mt();return Qu(l,e,t)},useTransition:function(){var e=Gu(!1);return e=ld.bind(null,ge,e.queue,!0,!1),Mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=ge,s=Mt();if(Ae){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),Ke===null)throw Error(r(349));(ke&127)!==0||zf(a,t,l)}s.memoizedState=l;var i={value:l,getSnapshot:t};return s.queue=i,Vf(Of.bind(null,a,i,e),[e]),a.flags|=2048,Qn(9,{destroy:void 0},Cf.bind(null,a,i,l,t),null),l},useId:function(){var e=Mt(),t=Ke.identifierPrefix;if(Ae){var l=Dl,a=Ol;l=(a&~(1<<32-Rt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=ec++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=ig++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Vu,useFormState:Yf,useActionState:Yf,useOptimistic:function(e){var t=Mt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Ku.bind(null,ge,!0,l),l.dispatch=t,[e,t]},useMemoCache:Hu,useCacheRefresh:function(){return Mt().memoizedState=dg.bind(null,ge)},useEffectEvent:function(e){var t=Mt(),l={impl:e};return t.memoizedState=l,function(){if((Le&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Ju={readContext:Tt,use:lc,useCallback:Pf,useContext:Tt,useEffect:$u,useImperativeHandle:Wf,useInsertionEffect:Jf,useLayoutEffect:If,useMemo:ed,useReducer:ac,useRef:Zf,useState:function(){return ac(Il)},useDebugValue:Xu,useDeferredValue:function(e,t){var l=st();return td(l,Xe.memoizedState,e,t)},useTransition:function(){var e=ac(Il)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Ys(e),t]},useSyncExternalStore:Rf,useId:sd,useHostTransitionStatus:Vu,useFormState:$f,useActionState:$f,useOptimistic:function(e,t){var l=st();return Uf(l,Xe,e,t)},useMemoCache:Hu,useCacheRefresh:id};Ju.useEffectEvent=Kf;var fd={readContext:Tt,use:lc,useCallback:Pf,useContext:Tt,useEffect:$u,useImperativeHandle:Wf,useInsertionEffect:Jf,useLayoutEffect:If,useMemo:ed,useReducer:qu,useRef:Zf,useState:function(){return qu(Il)},useDebugValue:Xu,useDeferredValue:function(e,t){var l=st();return Xe===null?Qu(l,e,t):td(l,Xe.memoizedState,e,t)},useTransition:function(){var e=qu(Il)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Ys(e),t]},useSyncExternalStore:Rf,useId:sd,useHostTransitionStatus:Vu,useFormState:Qf,useActionState:Qf,useOptimistic:function(e,t){var l=st();return Xe!==null?Uf(l,Xe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Hu,useCacheRefresh:id};fd.useEffectEvent=Kf;function Iu(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:E({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Fu={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Wt(),s=Na(a);s.payload=t,l!=null&&(s.callback=l),t=Sa(e,s,a),t!==null&&(Gt(t,e,a),Hs(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Wt(),s=Na(a);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=Sa(e,s,a),t!==null&&(Gt(t,e,a),Hs(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Wt(),a=Na(l);a.tag=2,t!=null&&(a.callback=t),t=Sa(e,a,l),t!==null&&(Gt(t,e,l),Hs(t,e,l))}};function dd(e,t,l,a,s,i,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,d):t.prototype&&t.prototype.isPureReactComponent?!Rs(l,a)||!Rs(s,i):!0}function hd(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&Fu.enqueueReplaceState(t,t.state,null)}function rn(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=E({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function md(e){Hi(e)}function pd(e){console.error(e)}function gd(e){Hi(e)}function cc(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function xd(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Wu(e,t,l){return l=Na(l),l.tag=3,l.payload={element:null},l.callback=function(){cc(e,t)},l}function vd(e){return e=Na(e),e.tag=3,e}function yd(e,t,l,a){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var i=a.value;e.payload=function(){return s(i)},e.callback=function(){xd(t,l,a)}}var d=l.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){xd(t,l,a),typeof s!="function"&&(_a===null?_a=new Set([this]):_a.add(this));var m=a.stack;this.componentDidCatch(a.value,{componentStack:m!==null?m:""})})}function mg(e,t,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Ln(t,l,s,!0),l=Kt.current,l!==null){switch(l.tag){case 31:case 13:return hl===null?yc():l.alternate===null&&lt===0&&(lt=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===Ki?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Sr(e,a,s)),!1;case 22:return l.flags|=65536,a===Ki?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Sr(e,a,s)),!1}throw Error(r(435,l.tag))}return Sr(e,a,s),yc(),!1}if(Ae)return t=Kt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==xu&&(e=Error(r(422),{cause:a}),Os(rl(e,l)))):(a!==xu&&(t=Error(r(423),{cause:a}),Os(rl(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=rl(a,l),s=Wu(e.stateNode,a,s),Au(e,s),lt!==4&&(lt=2)),!1;var i=Error(r(520),{cause:a});if(i=rl(i,l),Ws===null?Ws=[i]:Ws.push(i),lt!==4&&(lt=2),t===null)return!0;a=rl(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=Wu(l.stateNode,a,e),Au(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(_a===null||!_a.has(i))))return l.flags|=65536,s&=-s,l.lanes|=s,s=vd(s),yd(s,e,l,a),Au(l,s),!1}l=l.return}while(l!==null);return!1}var Pu=Error(r(461)),ft=!1;function Et(e,t,l,a){t.child=e===null?Sf(t,null,l,a):cn(t,e.child,l,a)}function bd(e,t,l,a,s){l=l.render;var i=t.ref;if("ref"in a){var d={};for(var m in a)m!=="ref"&&(d[m]=a[m])}else d=a;return ln(t),a=Du(e,t,l,d,i,s),m=Mu(),e!==null&&!ft?(Uu(e,t,s),Fl(e,t,s)):(Ae&&m&&pu(t),t.flags|=1,Et(e,t,a,s),t.child)}function jd(e,t,l,a,s){if(e===null){var i=l.type;return typeof i=="function"&&!du(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,Nd(e,t,i,a,s)):(e=Yi(l.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!cr(e,s)){var d=i.memoizedProps;if(l=l.compare,l=l!==null?l:Rs,l(d,a)&&e.ref===t.ref)return Fl(e,t,s)}return t.flags|=1,e=Ql(i,a),e.ref=t.ref,e.return=t,t.child=e}function Nd(e,t,l,a,s){if(e!==null){var i=e.memoizedProps;if(Rs(i,a)&&e.ref===t.ref)if(ft=!1,t.pendingProps=a=i,cr(e,s))(e.flags&131072)!==0&&(ft=!0);else return t.lanes=e.lanes,Fl(e,t,s)}return er(e,t,l,a,s)}function Sd(e,t,l,a){var s=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~i}else a=0,t.child=null;return wd(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Zi(t,i!==null?i.cachePool:null),i!==null?Tf(t,i):Ru(),Ef(t);else return a=t.lanes=536870912,wd(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(Zi(t,i.cachePool),Tf(t,i),ka(),t.memoizedState=null):(e!==null&&Zi(t,null),Ru(),ka());return Et(e,t,s,l),t.child}function Qs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function wd(e,t,l,a,s){var i=wu();return i=i===null?null:{parent:rt._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&Zi(t,null),Ru(),Ef(t),e!==null&&Ln(e,t,a,!0),t.childLanes=s,null}function uc(e,t){return t=oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function kd(e,t,l){return cn(t,e.child,null,l),e=uc(t,t.pendingProps),e.flags|=2,Jt(t),t.memoizedState=null,e}function pg(e,t,l){var a=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ae){if(a.mode==="hidden")return e=uc(t,a),t.lanes=536870912,Qs(null,e);if(Cu(t),(e=Ie)?(e=Lh(e,dl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:Ol,overflow:Dl}:null,retryLane:536870912,hydrationErrors:null},l=uf(e),l.return=t,t.child=l,kt=t,Ie=null)):e=null,e===null)throw ya(t);return t.lanes=536870912,null}return uc(t,a)}var i=e.memoizedState;if(i!==null){var d=i.dehydrated;if(Cu(t),s)if(t.flags&256)t.flags&=-257,t=kd(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(ft||Ln(e,t,l,!1),s=(l&e.childLanes)!==0,ft||s){if(a=Ke,a!==null&&(d=Nn(a,l),d!==0&&d!==i.retryLane))throw i.retryLane=d,Wa(e,d),Gt(a,e,d),Pu;yc(),t=kd(e,t,l)}else e=i.treeContext,Ie=ml(d.nextSibling),kt=t,Ae=!0,va=null,dl=!1,e!==null&&ff(t,e),t=uc(t,a),t.flags|=4096;return t}return e=Ql(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function rc(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function er(e,t,l,a,s){return ln(t),l=Du(e,t,l,a,void 0,s),a=Mu(),e!==null&&!ft?(Uu(e,t,s),Fl(e,t,s)):(Ae&&a&&pu(t),t.flags|=1,Et(e,t,l,s),t.child)}function Td(e,t,l,a,s,i){return ln(t),t.updateQueue=null,l=_f(t,a,l,s),Af(e),a=Mu(),e!==null&&!ft?(Uu(e,t,i),Fl(e,t,i)):(Ae&&a&&pu(t),t.flags|=1,Et(e,t,l,i),t.child)}function Ed(e,t,l,a,s){if(ln(t),t.stateNode===null){var i=On,d=l.contextType;typeof d=="object"&&d!==null&&(i=Tt(d)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Fu,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},Tu(t),d=l.contextType,i.context=typeof d=="object"&&d!==null?Tt(d):On,i.state=t.memoizedState,d=l.getDerivedStateFromProps,typeof d=="function"&&(Iu(t,l,d,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(d=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),d!==i.state&&Fu.enqueueReplaceState(i,i.state,null),qs(t,a,i,s),Bs(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var m=t.memoizedProps,b=rn(l,m);i.props=b;var _=i.context,M=l.contextType;d=On,typeof M=="object"&&M!==null&&(d=Tt(M));var q=l.getDerivedStateFromProps;M=typeof q=="function"||typeof i.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,M||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(m||_!==d)&&hd(t,i,a,d),ja=!1;var R=t.memoizedState;i.state=R,qs(t,a,i,s),Bs(),_=t.memoizedState,m||R!==_||ja?(typeof q=="function"&&(Iu(t,l,q,a),_=t.memoizedState),(b=ja||dd(t,l,b,a,R,_,d))?(M||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=_),i.props=a,i.state=_,i.context=d,a=b):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Eu(e,t),d=t.memoizedProps,M=rn(l,d),i.props=M,q=t.pendingProps,R=i.context,_=l.contextType,b=On,typeof _=="object"&&_!==null&&(b=Tt(_)),m=l.getDerivedStateFromProps,(_=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(d!==q||R!==b)&&hd(t,i,a,b),ja=!1,R=t.memoizedState,i.state=R,qs(t,a,i,s),Bs();var O=t.memoizedState;d!==q||R!==O||ja||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof m=="function"&&(Iu(t,l,m,a),O=t.memoizedState),(M=ja||dd(t,l,M,a,R,O,b)||e!==null&&e.dependencies!==null&&Xi(e.dependencies))?(_||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,O,b),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,O,b)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),i.props=a,i.state=O,i.context=b,a=M):(typeof i.componentDidUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,rc(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=cn(t,e.child,null,s),t.child=cn(t,null,l,s)):Et(e,t,l,s),t.memoizedState=i.state,e=t.child):e=Fl(e,t,s),e}function Ad(e,t,l,a){return en(),t.flags|=256,Et(e,t,l,a),t.child}var tr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lr(e){return{baseLanes:e,cachePool:xf()}}function ar(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ft),e}function _d(e,t,l){var a=t.pendingProps,s=!1,i=(t.flags&128)!==0,d;if((d=i)||(d=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),d&&(s=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ae){if(s?wa(t):ka(),(e=Ie)?(e=Lh(e,dl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:Ol,overflow:Dl}:null,retryLane:536870912,hydrationErrors:null},l=uf(e),l.return=t,t.child=l,kt=t,Ie=null)):e=null,e===null)throw ya(t);return Br(e)?t.lanes=32:t.lanes=536870912,null}var m=a.children;return a=a.fallback,s?(ka(),s=t.mode,m=oc({mode:"hidden",children:m},s),a=Pa(a,s,l,null),m.return=t,a.return=t,m.sibling=a,t.child=m,a=t.child,a.memoizedState=lr(l),a.childLanes=ar(e,d,l),t.memoizedState=tr,Qs(null,a)):(wa(t),nr(t,m))}var b=e.memoizedState;if(b!==null&&(m=b.dehydrated,m!==null)){if(i)t.flags&256?(wa(t),t.flags&=-257,t=sr(e,t,l)):t.memoizedState!==null?(ka(),t.child=e.child,t.flags|=128,t=null):(ka(),m=a.fallback,s=t.mode,a=oc({mode:"visible",children:a.children},s),m=Pa(m,s,l,null),m.flags|=2,a.return=t,m.return=t,a.sibling=m,t.child=a,cn(t,e.child,null,l),a=t.child,a.memoizedState=lr(l),a.childLanes=ar(e,d,l),t.memoizedState=tr,t=Qs(null,a));else if(wa(t),Br(m)){if(d=m.nextSibling&&m.nextSibling.dataset,d)var _=d.dgst;d=_,a=Error(r(419)),a.stack="",a.digest=d,Os({value:a,source:null,stack:null}),t=sr(e,t,l)}else if(ft||Ln(e,t,l,!1),d=(l&e.childLanes)!==0,ft||d){if(d=Ke,d!==null&&(a=Nn(d,l),a!==0&&a!==b.retryLane))throw b.retryLane=a,Wa(e,a),Gt(d,e,a),Pu;Hr(m)||yc(),t=sr(e,t,l)}else Hr(m)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Ie=ml(m.nextSibling),kt=t,Ae=!0,va=null,dl=!1,e!==null&&ff(t,e),t=nr(t,a.children),t.flags|=4096);return t}return s?(ka(),m=a.fallback,s=t.mode,b=e.child,_=b.sibling,a=Ql(b,{mode:"hidden",children:a.children}),a.subtreeFlags=b.subtreeFlags&65011712,_!==null?m=Ql(_,m):(m=Pa(m,s,l,null),m.flags|=2),m.return=t,a.return=t,a.sibling=m,t.child=a,Qs(null,a),a=t.child,m=e.child.memoizedState,m===null?m=lr(l):(s=m.cachePool,s!==null?(b=rt._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=xf(),m={baseLanes:m.baseLanes|l,cachePool:s}),a.memoizedState=m,a.childLanes=ar(e,d,l),t.memoizedState=tr,Qs(e.child,a)):(wa(t),l=e.child,e=l.sibling,l=Ql(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=l,t.memoizedState=null,l)}function nr(e,t){return t=oc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function oc(e,t){return e=Vt(22,e,null,t),e.lanes=0,e}function sr(e,t,l){return cn(t,e.child,null,l),e=nr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Rd(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),bu(e.return,t,l)}function ir(e,t,l,a,s,i){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:s,treeForkCount:i}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=a,d.tail=l,d.tailMode=s,d.treeForkCount=i)}function zd(e,t,l){var a=t.pendingProps,s=a.revealOrder,i=a.tail;a=a.children;var d=nt.current,m=(d&2)!==0;if(m?(d=d&1|2,t.flags|=128):d&=1,J(nt,d),Et(e,t,a,l),a=Ae?Cs:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rd(e,l,t);else if(e.tag===19)Rd(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(l=t.child,s=null;l!==null;)e=l.alternate,e!==null&&Wi(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),ir(t,!1,s,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Wi(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}ir(t,!0,l,null,i,a);break;case"together":ir(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Fl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Aa|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ln(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=Ql(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Ql(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function cr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Xi(e)))}function gg(e,t,l){switch(t.tag){case 3:mt(t,t.stateNode.containerInfo),ba(t,rt,e.memoizedState.cache),en();break;case 27:case 5:Re(t);break;case 4:mt(t,t.stateNode.containerInfo);break;case 10:ba(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Cu(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(wa(t),t.flags|=128,null):(l&t.child.childLanes)!==0?_d(e,t,l):(wa(t),e=Fl(e,t,l),e!==null?e.sibling:null);wa(t);break;case 19:var s=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(Ln(e,t,l,!1),a=(l&t.childLanes)!==0),s){if(a)return zd(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),J(nt,nt.current),a)break;return null;case 22:return t.lanes=0,Sd(e,t,l,t.pendingProps);case 24:ba(t,rt,e.memoizedState.cache)}return Fl(e,t,l)}function Cd(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)ft=!0;else{if(!cr(e,l)&&(t.flags&128)===0)return ft=!1,gg(e,t,l);ft=(e.flags&131072)!==0}else ft=!1,Ae&&(t.flags&1048576)!==0&&of(t,Cs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=nn(t.elementType),t.type=e,typeof e=="function")du(e)?(a=rn(e,a),t.tag=1,t=Ed(null,t,e,a,l)):(t.tag=0,t=er(null,t,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===te){t.tag=11,t=bd(null,t,e,a,l);break e}else if(s===V){t.tag=14,t=jd(null,t,e,a,l);break e}}throw t=Je(e)||e,Error(r(306,t,""))}}return t;case 0:return er(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,s=rn(a,t.pendingProps),Ed(e,t,a,s,l);case 3:e:{if(mt(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var i=t.memoizedState;s=i.element,Eu(e,t),qs(t,a,null,l);var d=t.memoizedState;if(a=d.cache,ba(t,rt,a),a!==i.cache&&ju(t,[rt],l,!0),Bs(),a=d.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Ad(e,t,a,l);break e}else if(a!==s){s=rl(Error(r(424)),t),Os(s),t=Ad(e,t,a,l);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ie=ml(e.firstChild),kt=t,Ae=!0,va=null,dl=!0,l=Sf(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(en(),a===s){t=Fl(e,t,l);break e}Et(e,t,a,l)}t=t.child}return t;case 26:return rc(e,t),e===null?(l=$h(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ae||(l=t.type,e=t.pendingProps,a=Tc(pe.current).createElement(l),a[pt]=t,a[it]=e,At(a,l,e),ct(a),t.stateNode=a):t.memoizedState=$h(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Re(t),e===null&&Ae&&(a=t.stateNode=qh(t.type,t.pendingProps,pe.current),kt=t,dl=!0,s=Ie,Oa(t.type)?(qr=s,Ie=ml(a.firstChild)):Ie=s),Et(e,t,t.pendingProps.children,l),rc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ae&&((s=a=Ie)&&(a=Zg(a,t.type,t.pendingProps,dl),a!==null?(t.stateNode=a,kt=t,Ie=ml(a.firstChild),dl=!1,s=!0):s=!1),s||ya(t)),Re(t),s=t.type,i=t.pendingProps,d=e!==null?e.memoizedProps:null,a=i.children,Mr(s,i)?a=null:d!==null&&Mr(s,d)&&(t.flags|=32),t.memoizedState!==null&&(s=Du(e,t,cg,null,null,l),ii._currentValue=s),rc(e,t),Et(e,t,a,l),t.child;case 6:return e===null&&Ae&&((e=l=Ie)&&(l=Vg(l,t.pendingProps,dl),l!==null?(t.stateNode=l,kt=t,Ie=null,e=!0):e=!1),e||ya(t)),null;case 13:return _d(e,t,l);case 4:return mt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=cn(t,null,a,l):Et(e,t,a,l),t.child;case 11:return bd(e,t,t.type,t.pendingProps,l);case 7:return Et(e,t,t.pendingProps,l),t.child;case 8:return Et(e,t,t.pendingProps.children,l),t.child;case 12:return Et(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,ba(t,t.type,a.value),Et(e,t,a.children,l),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,ln(t),s=Tt(s),a=a(s),t.flags|=1,Et(e,t,a,l),t.child;case 14:return jd(e,t,t.type,t.pendingProps,l);case 15:return Nd(e,t,t.type,t.pendingProps,l);case 19:return zd(e,t,l);case 31:return pg(e,t,l);case 22:return Sd(e,t,l,t.pendingProps);case 24:return ln(t),a=Tt(rt),e===null?(s=wu(),s===null&&(s=Ke,i=Nu(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=l),s=i),t.memoizedState={parent:a,cache:s},Tu(t),ba(t,rt,s)):((e.lanes&l)!==0&&(Eu(e,t),qs(t,null,null,l),Bs()),s=e.memoizedState,i=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),ba(t,rt,a)):(a=i.cache,ba(t,rt,a),a!==s.cache&&ju(t,[rt],l,!0))),Et(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Wl(e){e.flags|=4}function ur(e,t,l,a,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(sh())e.flags|=8192;else throw sn=Ki,ku}else e.flags&=-16777217}function Od(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Kh(t))if(sh())e.flags|=8192;else throw sn=Ki,ku}function fc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ps():536870912,e.lanes|=t,Jn|=t)}function Zs(e,t){if(!Ae)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function xg(e,t,l){var a=t.pendingProps;switch(gu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(t),null;case 1:return Fe(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Kl(rt),B(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Un(t)?Wl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vu())),Fe(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(Wl(t),i!==null?(Fe(t),Od(t,i)):(Fe(t),ur(t,s,null,a,l))):i?i!==e.memoizedState?(Wl(t),Fe(t),Od(t,i)):(Fe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Wl(t),Fe(t),ur(t,s,e,a,l)),null;case 27:if(Ye(t),l=pe.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Wl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Fe(t),null}e=Q.current,Un(t)?df(t):(e=qh(s,a,l),t.stateNode=e,Wl(t))}return Fe(t),null;case 5:if(Ye(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Wl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Fe(t),null}if(i=Q.current,Un(t))df(t);else{var d=Tc(pe.current);switch(i){case 1:i=d.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:i=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":i=d.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":i=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":i=d.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?d.createElement("select",{is:a.is}):d.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?d.createElement(s,{is:a.is}):d.createElement(s)}}i[pt]=t,i[it]=a;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)i.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=i;e:switch(At(i,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Wl(t)}}return Fe(t),ur(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Wl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=pe.current,Un(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,s=kt,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[pt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||_h(e.nodeValue,l)),e||ya(t,!0)}else e=Tc(e).createTextNode(a),e[pt]=t,t.stateNode=e}return Fe(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Un(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[pt]=t}else en(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),e=!1}else l=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Jt(t),t):(Jt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Fe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Un(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));s[pt]=t}else en(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),s=!1}else s=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(Jt(t),t):(Jt(t),null)}return Jt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==s&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),fc(t,t.updateQueue),Fe(t),null);case 4:return B(),e===null&&Rr(t.stateNode.containerInfo),Fe(t),null;case 10:return Kl(t.type),Fe(t),null;case 19:if(H(nt),a=t.memoizedState,a===null)return Fe(t),null;if(s=(t.flags&128)!==0,i=a.rendering,i===null)if(s)Zs(a,!1);else{if(lt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Wi(e),i!==null){for(t.flags|=128,Zs(a,!1),e=i.updateQueue,t.updateQueue=e,fc(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)cf(l,e),l=l.sibling;return J(nt,nt.current&1|2),Ae&&Zl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&_t()>gc&&(t.flags|=128,s=!0,Zs(a,!1),t.lanes=4194304)}else{if(!s)if(e=Wi(i),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,fc(t,e),Zs(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Ae)return Fe(t),null}else 2*_t()-a.renderingStartTime>gc&&l!==536870912&&(t.flags|=128,s=!0,Zs(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=_t(),e.sibling=null,l=nt.current,J(nt,s?l&1|2:l&1),Ae&&Zl(t,a.treeForkCount),e):(Fe(t),null);case 22:case 23:return Jt(t),zu(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),l=t.updateQueue,l!==null&&fc(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&H(an),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Kl(rt),Fe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function vg(e,t){switch(gu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kl(rt),B(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ye(t),null;case 31:if(t.memoizedState!==null){if(Jt(t),t.alternate===null)throw Error(r(340));en()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));en()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(nt),null;case 4:return B(),null;case 10:return Kl(t.type),null;case 22:case 23:return Jt(t),zu(),e!==null&&H(an),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Kl(rt),null;case 25:return null;default:return null}}function Dd(e,t){switch(gu(t),t.tag){case 3:Kl(rt),B();break;case 26:case 27:case 5:Ye(t);break;case 4:B();break;case 31:t.memoizedState!==null&&Jt(t);break;case 13:Jt(t);break;case 19:H(nt);break;case 10:Kl(t.type);break;case 22:case 23:Jt(t),zu(),e!==null&&H(an);break;case 24:Kl(rt)}}function Vs(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){a=void 0;var i=l.create,d=l.inst;a=i(),d.destroy=a}l=l.next}while(l!==s)}}catch(m){qe(t,t.return,m)}}function Ta(e,t,l){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var i=s.next;a=i;do{if((a.tag&e)===e){var d=a.inst,m=d.destroy;if(m!==void 0){d.destroy=void 0,s=t;var b=l,_=m;try{_()}catch(M){qe(s,b,M)}}}a=a.next}while(a!==i)}}catch(M){qe(t,t.return,M)}}function Md(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{kf(t,l)}catch(a){qe(e,e.return,a)}}}function Ud(e,t,l){l.props=rn(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){qe(e,t,a)}}function Ks(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(s){qe(e,t,s)}}function Ml(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){qe(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){qe(e,t,s)}else l.current=null}function Ld(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(s){qe(e,e.return,s)}}function rr(e,t,l){try{var a=e.stateNode;qg(a,e.type,l,t),a[it]=t}catch(s){qe(e,e.return,s)}}function Hd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Oa(e.type)||e.tag===4}function or(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Oa(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fr(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=w));else if(a!==4&&(a===27&&Oa(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(fr(e,t,l),e=e.sibling;e!==null;)fr(e,t,l),e=e.sibling}function dc(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Oa(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(dc(e,t,l),e=e.sibling;e!==null;)dc(e,t,l),e=e.sibling}function Bd(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);At(t,a,l),t[pt]=e,t[it]=l}catch(i){qe(e,e.return,i)}}var Pl=!1,dt=!1,dr=!1,qd=typeof WeakSet=="function"?WeakSet:Set,bt=null;function yg(e,t){if(e=e.containerInfo,Or=Oc,e=Fo(e),su(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var s=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var d=0,m=-1,b=-1,_=0,M=0,q=e,R=null;t:for(;;){for(var O;q!==l||s!==0&&q.nodeType!==3||(m=d+s),q!==i||a!==0&&q.nodeType!==3||(b=d+a),q.nodeType===3&&(d+=q.nodeValue.length),(O=q.firstChild)!==null;)R=q,q=O;for(;;){if(q===e)break t;if(R===l&&++_===s&&(m=d),R===i&&++M===a&&(b=d),(O=q.nextSibling)!==null)break;q=R,R=q.parentNode}q=O}l=m===-1||b===-1?null:{start:m,end:b}}else l=null}l=l||{start:0,end:0}}else l=null;for(Dr={focusedElem:e,selectionRange:l},Oc=!1,bt=t;bt!==null;)if(t=bt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,bt=e;else for(;bt!==null;){switch(t=bt,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,l=t,s=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var se=rn(l.type,s);e=a.getSnapshotBeforeUpdate(se,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(oe){qe(l,l.return,oe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Lr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Lr(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,bt=e;break}bt=t.return}}function Gd(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:ta(e,l),a&4&&Vs(5,l);break;case 1:if(ta(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(d){qe(l,l.return,d)}else{var s=rn(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){qe(l,l.return,d)}}a&64&&Md(l),a&512&&Ks(l,l.return);break;case 3:if(ta(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{kf(e,t)}catch(d){qe(l,l.return,d)}}break;case 27:t===null&&a&4&&Bd(l);case 26:case 5:ta(e,l),t===null&&a&4&&Ld(l),a&512&&Ks(l,l.return);break;case 12:ta(e,l);break;case 31:ta(e,l),a&4&&Xd(e,l);break;case 13:ta(e,l),a&4&&Qd(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Ag.bind(null,l),Kg(e,l))));break;case 22:if(a=l.memoizedState!==null||Pl,!a){t=t!==null&&t.memoizedState!==null||dt,s=Pl;var i=dt;Pl=a,(dt=t)&&!i?la(e,l,(l.subtreeFlags&8772)!==0):ta(e,l),Pl=s,dt=i}break;case 30:break;default:ta(e,l)}}function Yd(e){var t=e.alternate;t!==null&&(e.alternate=null,Yd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Qa(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Pe=null,Lt=!1;function ea(e,t,l){for(l=l.child;l!==null;)$d(e,t,l),l=l.sibling}function $d(e,t,l){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(nl,l)}catch{}switch(l.tag){case 26:dt||Ml(l,t),ea(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:dt||Ml(l,t);var a=Pe,s=Lt;Oa(l.type)&&(Pe=l.stateNode,Lt=!1),ea(e,t,l),ai(l.stateNode),Pe=a,Lt=s;break;case 5:dt||Ml(l,t);case 6:if(a=Pe,s=Lt,Pe=null,ea(e,t,l),Pe=a,Lt=s,Pe!==null)if(Lt)try{(Pe.nodeType===9?Pe.body:Pe.nodeName==="HTML"?Pe.ownerDocument.body:Pe).removeChild(l.stateNode)}catch(i){qe(l,t,i)}else try{Pe.removeChild(l.stateNode)}catch(i){qe(l,t,i)}break;case 18:Pe!==null&&(Lt?(e=Pe,Mh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),as(e)):Mh(Pe,l.stateNode));break;case 4:a=Pe,s=Lt,Pe=l.stateNode.containerInfo,Lt=!0,ea(e,t,l),Pe=a,Lt=s;break;case 0:case 11:case 14:case 15:Ta(2,l,t),dt||Ta(4,l,t),ea(e,t,l);break;case 1:dt||(Ml(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Ud(l,t,a)),ea(e,t,l);break;case 21:ea(e,t,l);break;case 22:dt=(a=dt)||l.memoizedState!==null,ea(e,t,l),dt=a;break;default:ea(e,t,l)}}function Xd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{as(e)}catch(l){qe(t,t.return,l)}}}function Qd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{as(e)}catch(l){qe(t,t.return,l)}}function bg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new qd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new qd),t;default:throw Error(r(435,e.tag))}}function hc(e,t){var l=bg(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var s=_g.bind(null,e,a);a.then(s,s)}})}function Ht(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],i=e,d=t,m=d;e:for(;m!==null;){switch(m.tag){case 27:if(Oa(m.type)){Pe=m.stateNode,Lt=!1;break e}break;case 5:Pe=m.stateNode,Lt=!1;break e;case 3:case 4:Pe=m.stateNode.containerInfo,Lt=!0;break e}m=m.return}if(Pe===null)throw Error(r(160));$d(i,d,s),Pe=null,Lt=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Zd(t,e),t=t.sibling}var Sl=null;function Zd(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ht(t,e),Bt(e),a&4&&(Ta(3,e,e.return),Vs(3,e),Ta(5,e,e.return));break;case 1:Ht(t,e),Bt(e),a&512&&(dt||l===null||Ml(l,l.return)),a&64&&Pl&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var s=Sl;if(Ht(t,e),Bt(e),a&512&&(dt||l===null||Ml(l,l.return)),a&4){var i=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":i=s.getElementsByTagName("title")[0],(!i||i[da]||i[pt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(a),s.head.insertBefore(i,s.querySelector("head > title"))),At(i,a,l),i[pt]=e,ct(i),a=i;break e;case"link":var d=Zh("link","href",s).get(a+(l.href||""));if(d){for(var m=0;m<d.length;m++)if(i=d[m],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){d.splice(m,1);break t}}i=s.createElement(a),At(i,a,l),s.head.appendChild(i);break;case"meta":if(d=Zh("meta","content",s).get(a+(l.content||""))){for(m=0;m<d.length;m++)if(i=d[m],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){d.splice(m,1);break t}}i=s.createElement(a),At(i,a,l),s.head.appendChild(i);break;default:throw Error(r(468,a))}i[pt]=e,ct(i),a=i}e.stateNode=a}else Vh(s,e.type,e.stateNode);else e.stateNode=Qh(s,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?Vh(s,e.type,e.stateNode):Qh(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&rr(e,e.memoizedProps,l.memoizedProps)}break;case 27:Ht(t,e),Bt(e),a&512&&(dt||l===null||Ml(l,l.return)),l!==null&&a&4&&rr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Ht(t,e),Bt(e),a&512&&(dt||l===null||Ml(l,l.return)),e.flags&32){s=e.stateNode;try{Xl(s,"")}catch(se){qe(e,e.return,se)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,rr(e,s,l!==null?l.memoizedProps:s)),a&1024&&(dr=!0);break;case 6:if(Ht(t,e),Bt(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(se){qe(e,e.return,se)}}break;case 3:if(_c=null,s=Sl,Sl=Ec(t.containerInfo),Ht(t,e),Sl=s,Bt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{as(t.containerInfo)}catch(se){qe(e,e.return,se)}dr&&(dr=!1,Vd(e));break;case 4:a=Sl,Sl=Ec(e.stateNode.containerInfo),Ht(t,e),Bt(e),Sl=a;break;case 12:Ht(t,e),Bt(e);break;case 31:Ht(t,e),Bt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,hc(e,a)));break;case 13:Ht(t,e),Bt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(pc=_t()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,hc(e,a)));break;case 22:s=e.memoizedState!==null;var b=l!==null&&l.memoizedState!==null,_=Pl,M=dt;if(Pl=_||s,dt=M||b,Ht(t,e),dt=M,Pl=_,Bt(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||b||Pl||dt||on(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){b=l=t;try{if(i=b.stateNode,s)d=i.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{m=b.stateNode;var q=b.memoizedProps.style,R=q!=null&&q.hasOwnProperty("display")?q.display:null;m.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(se){qe(b,b.return,se)}}}else if(t.tag===6){if(l===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(se){qe(b,b.return,se)}}}else if(t.tag===18){if(l===null){b=t;try{var O=b.stateNode;s?Uh(O,!0):Uh(b.stateNode,!1)}catch(se){qe(b,b.return,se)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,hc(e,l))));break;case 19:Ht(t,e),Bt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,hc(e,a)));break;case 30:break;case 21:break;default:Ht(t,e),Bt(e)}}function Bt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(Hd(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var s=l.stateNode,i=or(e);dc(e,i,s);break;case 5:var d=l.stateNode;l.flags&32&&(Xl(d,""),l.flags&=-33);var m=or(e);dc(e,m,d);break;case 3:case 4:var b=l.stateNode.containerInfo,_=or(e);fr(e,_,b);break;default:throw Error(r(161))}}catch(M){qe(e,e.return,M)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Vd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ta(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Gd(e,t.alternate,t),t=t.sibling}function on(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ta(4,t,t.return),on(t);break;case 1:Ml(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Ud(t,t.return,l),on(t);break;case 27:ai(t.stateNode);case 26:case 5:Ml(t,t.return),on(t);break;case 22:t.memoizedState===null&&on(t);break;case 30:on(t);break;default:on(t)}e=e.sibling}}function la(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,i=t,d=i.flags;switch(i.tag){case 0:case 11:case 15:la(s,i,l),Vs(4,i);break;case 1:if(la(s,i,l),a=i,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(_){qe(a,a.return,_)}if(a=i,s=a.updateQueue,s!==null){var m=a.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)wf(b[s],m)}catch(_){qe(a,a.return,_)}}l&&d&64&&Md(i),Ks(i,i.return);break;case 27:Bd(i);case 26:case 5:la(s,i,l),l&&a===null&&d&4&&Ld(i),Ks(i,i.return);break;case 12:la(s,i,l);break;case 31:la(s,i,l),l&&d&4&&Xd(s,i);break;case 13:la(s,i,l),l&&d&4&&Qd(s,i);break;case 22:i.memoizedState===null&&la(s,i,l),Ks(i,i.return);break;case 30:break;default:la(s,i,l)}t=t.sibling}}function hr(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Ds(l))}function mr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ds(e))}function wl(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Kd(e,t,l,a),t=t.sibling}function Kd(e,t,l,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:wl(e,t,l,a),s&2048&&Vs(9,t);break;case 1:wl(e,t,l,a);break;case 3:wl(e,t,l,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ds(e)));break;case 12:if(s&2048){wl(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,d=i.id,m=i.onPostCommit;typeof m=="function"&&m(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){qe(t,t.return,b)}}else wl(e,t,l,a);break;case 31:wl(e,t,l,a);break;case 13:wl(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,d=t.alternate,t.memoizedState!==null?i._visibility&2?wl(e,t,l,a):Js(e,t):i._visibility&2?wl(e,t,l,a):(i._visibility|=2,Zn(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&hr(d,t);break;case 24:wl(e,t,l,a),s&2048&&mr(t.alternate,t);break;default:wl(e,t,l,a)}}function Zn(e,t,l,a,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,d=t,m=l,b=a,_=d.flags;switch(d.tag){case 0:case 11:case 15:Zn(i,d,m,b,s),Vs(8,d);break;case 23:break;case 22:var M=d.stateNode;d.memoizedState!==null?M._visibility&2?Zn(i,d,m,b,s):Js(i,d):(M._visibility|=2,Zn(i,d,m,b,s)),s&&_&2048&&hr(d.alternate,d);break;case 24:Zn(i,d,m,b,s),s&&_&2048&&mr(d.alternate,d);break;default:Zn(i,d,m,b,s)}t=t.sibling}}function Js(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,s=a.flags;switch(a.tag){case 22:Js(l,a),s&2048&&hr(a.alternate,a);break;case 24:Js(l,a),s&2048&&mr(a.alternate,a);break;default:Js(l,a)}t=t.sibling}}var Is=8192;function Vn(e,t,l){if(e.subtreeFlags&Is)for(e=e.child;e!==null;)Jd(e,t,l),e=e.sibling}function Jd(e,t,l){switch(e.tag){case 26:Vn(e,t,l),e.flags&Is&&e.memoizedState!==null&&ix(l,Sl,e.memoizedState,e.memoizedProps);break;case 5:Vn(e,t,l);break;case 3:case 4:var a=Sl;Sl=Ec(e.stateNode.containerInfo),Vn(e,t,l),Sl=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Is,Is=16777216,Vn(e,t,l),Is=a):Vn(e,t,l));break;default:Vn(e,t,l)}}function Id(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Fs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];bt=a,Wd(a,e)}Id(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fd(e),e=e.sibling}function Fd(e){switch(e.tag){case 0:case 11:case 15:Fs(e),e.flags&2048&&Ta(9,e,e.return);break;case 3:Fs(e);break;case 12:Fs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,mc(e)):Fs(e);break;default:Fs(e)}}function mc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];bt=a,Wd(a,e)}Id(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ta(8,t,t.return),mc(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,mc(t));break;default:mc(t)}e=e.sibling}}function Wd(e,t){for(;bt!==null;){var l=bt;switch(l.tag){case 0:case 11:case 15:Ta(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Ds(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,bt=a;else e:for(l=e;bt!==null;){a=bt;var s=a.sibling,i=a.return;if(Yd(a),a===l){bt=null;break e}if(s!==null){s.return=i,bt=s;break e}bt=i}}}var jg={getCacheForType:function(e){var t=Tt(rt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Tt(rt).controller.signal}},Ng=typeof WeakMap=="function"?WeakMap:Map,Le=0,Ke=null,Ne=null,ke=0,Be=0,It=null,Ea=!1,Kn=!1,pr=!1,aa=0,lt=0,Aa=0,fn=0,gr=0,Ft=0,Jn=0,Ws=null,qt=null,xr=!1,pc=0,Pd=0,gc=1/0,xc=null,_a=null,xt=0,Ra=null,In=null,na=0,vr=0,yr=null,eh=null,Ps=0,br=null;function Wt(){return(Le&2)!==0&&ke!==0?ke&-ke:D.T!==null?Tr():wn()}function th(){if(Ft===0)if((ke&536870912)===0||Ae){var e=vl;vl<<=1,(vl&3932160)===0&&(vl=262144),Ft=e}else Ft=536870912;return e=Kt.current,e!==null&&(e.flags|=32),Ft}function Gt(e,t,l){(e===Ke&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(Fn(e,0),za(e,ke,Ft,!1)),Rl(e,l),((Le&2)===0||e!==Ke)&&(e===Ke&&((Le&2)===0&&(fn|=l),lt===4&&za(e,ke,Ft,!1)),Ul(e))}function lh(e,t,l){if((Le&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||ua(e,t),s=a?kg(e,t):Nr(e,t,!0),i=a;do{if(s===0){Kn&&!a&&za(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Sg(l)){s=Nr(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var m=e;s=Ws;var b=m.current.memoizedState.isDehydrated;if(b&&(Fn(m,d).flags|=256),d=Nr(m,d,!1),d!==2){if(pr&&!b){m.errorRecoveryDisabledLanes|=i,fn|=i,s=4;break e}i=qt,qt=s,i!==null&&(qt===null?qt=i:qt.push.apply(qt,i))}s=d}if(i=!1,s!==2)continue}}if(s===1){Fn(e,0),za(e,t,0,!0);break}e:{switch(a=e,i=s,i){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:za(a,t,Ft,!Ea);break e;case 2:qt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(s=pc+300-_t(),10<s)){if(za(a,t,Ft,!Ea),Xa(a,0,!0)!==0)break e;na=t,a.timeoutHandle=Oh(ah.bind(null,a,l,qt,xc,xr,t,Ft,fn,Jn,Ea,i,"Throttled",-0,0),s);break e}ah(a,l,qt,xc,xr,t,Ft,fn,Jn,Ea,i,null,-0,0)}}break}while(!0);Ul(e)}function ah(e,t,l,a,s,i,d,m,b,_,M,q,R,O){if(e.timeoutHandle=-1,q=t.subtreeFlags,q&8192||(q&16785408)===16785408){q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:w},Jd(t,i,q);var se=(i&62914560)===i?pc-_t():(i&4194048)===i?Pd-_t():0;if(se=cx(q,se),se!==null){na=i,e.cancelPendingCommit=se(fh.bind(null,e,t,i,l,a,s,d,m,b,M,q,null,R,O)),za(e,i,d,!_);return}}fh(e,t,i,l,a,s,d,m,b)}function Sg(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var s=l[a],i=s.getSnapshot;s=s.value;try{if(!Zt(i(),s))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function za(e,t,l,a){t&=~gr,t&=~fn,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var i=31-Rt(s),d=1<<i;a[i]=-1,s&=~d}l!==0&&Bl(e,l,t)}function vc(){return(Le&6)===0?(ei(0),!1):!0}function jr(){if(Ne!==null){if(Be===0)var e=Ne.return;else e=Ne,Vl=tn=null,Lu(e),Gn=null,Us=0,e=Ne;for(;e!==null;)Dd(e.alternate,e),e=e.return;Ne=null}}function Fn(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,$g(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),na=0,jr(),Ke=e,Ne=l=Ql(e.current,null),ke=t,Be=0,It=null,Ea=!1,Kn=ua(e,t),pr=!1,Jn=Ft=gr=fn=Aa=lt=0,qt=Ws=null,xr=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-Rt(a),i=1<<s;t|=e[s],a&=~i}return aa=t,Bi(),l}function nh(e,t){ge=null,D.H=Xs,t===qn||t===Vi?(t=bf(),Be=3):t===ku?(t=bf(),Be=4):Be=t===Pu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,It=t,Ne===null&&(lt=1,cc(e,rl(t,e.current)))}function sh(){var e=Kt.current;return e===null?!0:(ke&4194048)===ke?hl===null:(ke&62914560)===ke||(ke&536870912)!==0?e===hl:!1}function ih(){var e=D.H;return D.H=Xs,e===null?Xs:e}function ch(){var e=D.A;return D.A=jg,e}function yc(){lt=4,Ea||(ke&4194048)!==ke&&Kt.current!==null||(Kn=!0),(Aa&134217727)===0&&(fn&134217727)===0||Ke===null||za(Ke,ke,Ft,!1)}function Nr(e,t,l){var a=Le;Le|=2;var s=ih(),i=ch();(Ke!==e||ke!==t)&&(xc=null,Fn(e,t)),t=!1;var d=lt;e:do try{if(Be!==0&&Ne!==null){var m=Ne,b=It;switch(Be){case 8:jr(),d=6;break e;case 3:case 2:case 9:case 6:Kt.current===null&&(t=!0);var _=Be;if(Be=0,It=null,Wn(e,m,b,_),l&&Kn){d=0;break e}break;default:_=Be,Be=0,It=null,Wn(e,m,b,_)}}wg(),d=lt;break}catch(M){nh(e,M)}while(!0);return t&&e.shellSuspendCounter++,Vl=tn=null,Le=a,D.H=s,D.A=i,Ne===null&&(Ke=null,ke=0,Bi()),d}function wg(){for(;Ne!==null;)uh(Ne)}function kg(e,t){var l=Le;Le|=2;var a=ih(),s=ch();Ke!==e||ke!==t?(xc=null,gc=_t()+500,Fn(e,t)):Kn=ua(e,t);e:do try{if(Be!==0&&Ne!==null){t=Ne;var i=It;t:switch(Be){case 1:Be=0,It=null,Wn(e,t,i,1);break;case 2:case 9:if(vf(i)){Be=0,It=null,rh(t);break}t=function(){Be!==2&&Be!==9||Ke!==e||(Be=7),Ul(e)},i.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:vf(i)?(Be=0,It=null,rh(t)):(Be=0,It=null,Wn(e,t,i,7));break;case 5:var d=null;switch(Ne.tag){case 26:d=Ne.memoizedState;case 5:case 27:var m=Ne;if(d?Kh(d):m.stateNode.complete){Be=0,It=null;var b=m.sibling;if(b!==null)Ne=b;else{var _=m.return;_!==null?(Ne=_,bc(_)):Ne=null}break t}}Be=0,It=null,Wn(e,t,i,5);break;case 6:Be=0,It=null,Wn(e,t,i,6);break;case 8:jr(),lt=6;break e;default:throw Error(r(462))}}Tg();break}catch(M){nh(e,M)}while(!0);return Vl=tn=null,D.H=a,D.A=s,Le=l,Ne!==null?0:(Ke=null,ke=0,Bi(),lt)}function Tg(){for(;Ne!==null&&!ji();)uh(Ne)}function uh(e){var t=Cd(e.alternate,e,aa);e.memoizedProps=e.pendingProps,t===null?bc(e):Ne=t}function rh(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Td(l,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=Td(l,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:Lu(t);default:Dd(l,t),t=Ne=cf(t,aa),t=Cd(l,t,aa)}e.memoizedProps=e.pendingProps,t===null?bc(e):Ne=t}function Wn(e,t,l,a){Vl=tn=null,Lu(t),Gn=null,Us=0;var s=t.return;try{if(mg(e,s,t,l,ke)){lt=1,cc(e,rl(l,e.current)),Ne=null;return}}catch(i){if(s!==null)throw Ne=s,i;lt=1,cc(e,rl(l,e.current)),Ne=null;return}t.flags&32768?(Ae||a===1?e=!0:Kn||(ke&536870912)!==0?e=!1:(Ea=e=!0,(a===2||a===9||a===3||a===6)&&(a=Kt.current,a!==null&&a.tag===13&&(a.flags|=16384))),oh(t,e)):bc(t)}function bc(e){var t=e;do{if((t.flags&32768)!==0){oh(t,Ea);return}e=t.return;var l=xg(t.alternate,t,aa);if(l!==null){Ne=l;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);lt===0&&(lt=5)}function oh(e,t){do{var l=vg(e.alternate,e);if(l!==null){l.flags&=32767,Ne=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=l}while(e!==null);lt=6,Ne=null}function fh(e,t,l,a,s,i,d,m,b){e.cancelPendingCommit=null;do jc();while(xt!==0);if((Le&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=ou,sl(e,l,i,d,m,b),e===Ke&&(Ne=Ke=null,ke=0),In=t,Ra=e,na=l,vr=i,yr=s,eh=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Rg(al,function(){return gh(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null,s=K.p,K.p=2,d=Le,Le|=4;try{yg(e,t,l)}finally{Le=d,K.p=s,D.T=a}}xt=1,dh(),hh(),mh()}}function dh(){if(xt===1){xt=0;var e=Ra,t=In,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var a=K.p;K.p=2;var s=Le;Le|=4;try{Zd(t,e);var i=Dr,d=Fo(e.containerInfo),m=i.focusedElem,b=i.selectionRange;if(d!==m&&m&&m.ownerDocument&&Io(m.ownerDocument.documentElement,m)){if(b!==null&&su(m)){var _=b.start,M=b.end;if(M===void 0&&(M=_),"selectionStart"in m)m.selectionStart=_,m.selectionEnd=Math.min(M,m.value.length);else{var q=m.ownerDocument||document,R=q&&q.defaultView||window;if(R.getSelection){var O=R.getSelection(),se=m.textContent.length,oe=Math.min(b.start,se),Ze=b.end===void 0?oe:Math.min(b.end,se);!O.extend&&oe>Ze&&(d=Ze,Ze=oe,oe=d);var T=Jo(m,oe),j=Jo(m,Ze);if(T&&j&&(O.rangeCount!==1||O.anchorNode!==T.node||O.anchorOffset!==T.offset||O.focusNode!==j.node||O.focusOffset!==j.offset)){var A=q.createRange();A.setStart(T.node,T.offset),O.removeAllRanges(),oe>Ze?(O.addRange(A),O.extend(j.node,j.offset)):(A.setEnd(j.node,j.offset),O.addRange(A))}}}}for(q=[],O=m;O=O.parentNode;)O.nodeType===1&&q.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<q.length;m++){var U=q[m];U.element.scrollLeft=U.left,U.element.scrollTop=U.top}}Oc=!!Or,Dr=Or=null}finally{Le=s,K.p=a,D.T=l}}e.current=t,xt=2}}function hh(){if(xt===2){xt=0;var e=Ra,t=In,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var a=K.p;K.p=2;var s=Le;Le|=4;try{Gd(e,t.alternate,t)}finally{Le=s,K.p=a,D.T=l}}xt=3}}function mh(){if(xt===4||xt===3){xt=0,fs();var e=Ra,t=In,l=na,a=eh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?xt=5:(xt=0,In=Ra=null,ph(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(_a=null),Sn(l),t=t.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(nl,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=D.T,s=K.p,K.p=2,D.T=null;try{for(var i=e.onRecoverableError,d=0;d<a.length;d++){var m=a[d];i(m.value,{componentStack:m.stack})}}finally{D.T=t,K.p=s}}(na&3)!==0&&jc(),Ul(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===br?Ps++:(Ps=0,br=e):Ps=0,ei(0)}}function ph(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ds(t)))}function jc(){return dh(),hh(),mh(),gh()}function gh(){if(xt!==5)return!1;var e=Ra,t=vr;vr=0;var l=Sn(na),a=D.T,s=K.p;try{K.p=32>l?32:l,D.T=null,l=yr,yr=null;var i=Ra,d=na;if(xt=0,In=Ra=null,na=0,(Le&6)!==0)throw Error(r(331));var m=Le;if(Le|=4,Fd(i.current),Kd(i,i.current,d,l),Le=m,ei(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(nl,i)}catch{}return!0}finally{K.p=s,D.T=a,ph(e,t)}}function xh(e,t,l){t=rl(l,t),t=Wu(e.stateNode,t,2),e=Sa(e,t,2),e!==null&&(Rl(e,2),Ul(e))}function qe(e,t,l){if(e.tag===3)xh(e,e,l);else for(;t!==null;){if(t.tag===3){xh(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(_a===null||!_a.has(a))){e=rl(l,e),l=vd(2),a=Sa(t,l,2),a!==null&&(yd(l,a,t,e),Rl(a,2),Ul(a));break}}t=t.return}}function Sr(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Ng;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(l)||(pr=!0,s.add(l),e=Eg.bind(null,e,t,l),t.then(e,e))}function Eg(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ke===e&&(ke&l)===l&&(lt===4||lt===3&&(ke&62914560)===ke&&300>_t()-pc?(Le&2)===0&&Fn(e,0):gr|=l,Jn===ke&&(Jn=0)),Ul(e)}function vh(e,t){t===0&&(t=ps()),e=Wa(e,t),e!==null&&(Rl(e,t),Ul(e))}function Ag(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),vh(e,l)}function _g(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),vh(e,l)}function Rg(e,t){return yn(e,t)}var Nc=null,Pn=null,wr=!1,Sc=!1,kr=!1,Ca=0;function Ul(e){e!==Pn&&e.next===null&&(Pn===null?Nc=Pn=e:Pn=Pn.next=e),Sc=!0,wr||(wr=!0,Cg())}function ei(e,t){if(!kr&&Sc){kr=!0;do for(var l=!1,a=Nc;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var i=0;else{var d=a.suspendedLanes,m=a.pingedLanes;i=(1<<31-Rt(42|e)+1)-1,i&=s&~(d&~m),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,Nh(a,i))}else i=ke,i=Xa(a,a===Ke?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||ua(a,i)||(l=!0,Nh(a,i));a=a.next}while(l);kr=!1}}function zg(){yh()}function yh(){Sc=wr=!1;var e=0;Ca!==0&&Yg()&&(e=Ca);for(var t=_t(),l=null,a=Nc;a!==null;){var s=a.next,i=bh(a,t);i===0?(a.next=null,l===null?Nc=s:l.next=s,s===null&&(Pn=l)):(l=a,(e!==0||(i&3)!==0)&&(Sc=!0)),a=s}xt!==0&&xt!==5||ei(e),Ca!==0&&(Ca=0)}function bh(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var d=31-Rt(i),m=1<<d,b=s[d];b===-1?((m&l)===0||(m&a)!==0)&&(s[d]=ki(m,t)):b<=t&&(e.expiredLanes|=m),i&=~m}if(t=Ke,l=ke,l=Xa(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&ll(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||ua(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&ll(a),Sn(l)){case 2:case 8:l=Al;break;case 32:l=al;break;case 268435456:l=$a;break;default:l=al}return a=jh.bind(null,e),l=yn(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&ll(a),e.callbackPriority=2,e.callbackNode=null,2}function jh(e,t){if(xt!==0&&xt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(jc()&&e.callbackNode!==l)return null;var a=ke;return a=Xa(e,e===Ke?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(lh(e,a,t),bh(e,_t()),e.callbackNode!=null&&e.callbackNode===l?jh.bind(null,e):null)}function Nh(e,t){if(jc())return null;lh(e,t,!0)}function Cg(){Xg(function(){(Le&6)!==0?yn(xl,zg):yh()})}function Tr(){if(Ca===0){var e=Hn;e===0&&(e=ca,ca<<=1,(ca&261888)===0&&(ca=256)),Ca=e}return Ca}function Sh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:g(""+e)}function wh(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function Og(e,t,l,a,s){if(t==="submit"&&l&&l.stateNode===s){var i=Sh((s[it]||null).action),d=a.submitter;d&&(t=(t=d[it]||null)?Sh(t.formAction):d.getAttribute("formAction"),t!==null&&(i=t,d=null));var m=new Mi("action","action",null,a,s);e.push({event:m,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ca!==0){var b=d?wh(s,d):new FormData(s);Zu(l,{pending:!0,data:b,method:s.method,action:i},null,b)}}else typeof i=="function"&&(m.preventDefault(),b=d?wh(s,d):new FormData(s),Zu(l,{pending:!0,data:b,method:s.method,action:i},i,b))},currentTarget:s}]})}}for(var Er=0;Er<ru.length;Er++){var Ar=ru[Er],Dg=Ar.toLowerCase(),Mg=Ar[0].toUpperCase()+Ar.slice(1);Nl(Dg,"on"+Mg)}Nl(ef,"onAnimationEnd"),Nl(tf,"onAnimationIteration"),Nl(lf,"onAnimationStart"),Nl("dblclick","onDoubleClick"),Nl("focusin","onFocus"),Nl("focusout","onBlur"),Nl(Fp,"onTransitionRun"),Nl(Wp,"onTransitionStart"),Nl(Pp,"onTransitionCancel"),Nl(af,"onTransitionEnd"),jl("onMouseEnter",["mouseout","mouseover"]),jl("onMouseLeave",["mouseout","mouseover"]),jl("onPointerEnter",["pointerout","pointerover"]),jl("onPointerLeave",["pointerout","pointerover"]),zl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),zl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),zl("onBeforeInput",["compositionend","keypress","textInput","paste"]),zl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),zl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),zl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ti="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ug=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ti));function kh(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],s=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var d=a.length-1;0<=d;d--){var m=a[d],b=m.instance,_=m.currentTarget;if(m=m.listener,b!==i&&s.isPropagationStopped())break e;i=m,s.currentTarget=_;try{i(s)}catch(M){Hi(M)}s.currentTarget=null,i=b}else for(d=0;d<a.length;d++){if(m=a[d],b=m.instance,_=m.currentTarget,m=m.listener,b!==i&&s.isPropagationStopped())break e;i=m,s.currentTarget=_;try{i(s)}catch(M){Hi(M)}s.currentTarget=null,i=b}}}}function Se(e,t){var l=t[vs];l===void 0&&(l=t[vs]=new Set);var a=e+"__bubble";l.has(a)||(Th(t,e,2,!1),l.add(a))}function _r(e,t,l){var a=0;t&&(a|=4),Th(l,e,a,t)}var wc="_reactListening"+Math.random().toString(36).slice(2);function Rr(e){if(!e[wc]){e[wc]=!0,Ei.forEach(function(l){l!=="selectionchange"&&(Ug.has(l)||_r(l,!1,e),_r(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wc]||(t[wc]=!0,_r("selectionchange",!1,t))}}function Th(e,t,l,a){switch(tm(t)){case 2:var s=ox;break;case 8:s=fx;break;default:s=Qr}l=s.bind(null,t,l,e),s=void 0,!gt||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,l,{capture:!0,passive:s}):e.addEventListener(t,l,!0):s!==void 0?e.addEventListener(t,l,{passive:s}):e.addEventListener(t,l,!1)}function zr(e,t,l,a,s){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var d=a.tag;if(d===3||d===4){var m=a.stateNode.containerInfo;if(m===s)break;if(d===4)for(d=a.return;d!==null;){var b=d.tag;if((b===3||b===4)&&d.stateNode.containerInfo===s)return;d=d.return}for(;m!==null;){if(d=ql(m),d===null)return;if(b=d.tag,b===5||b===6||b===26||b===27){a=i=d;continue e}m=m.parentNode}}a=a.return}wt(function(){var _=i,M=ee(l),q=[];e:{var R=nf.get(e);if(R!==void 0){var O=Mi,se=e;switch(e){case"keypress":if(Oi(l)===0)break e;case"keydown":case"keyup":O=_p;break;case"focusin":se="focus",O=eu;break;case"focusout":se="blur",O=eu;break;case"beforeblur":case"afterblur":O=eu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=Oo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=xp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=Cp;break;case ef:case tf:case lf:O=bp;break;case af:O=Dp;break;case"scroll":case"scrollend":O=pp;break;case"wheel":O=Up;break;case"copy":case"cut":case"paste":O=Np;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Mo;break;case"toggle":case"beforetoggle":O=Hp}var oe=(t&4)!==0,Ze=!oe&&(e==="scroll"||e==="scrollend"),T=oe?R!==null?R+"Capture":null:R;oe=[];for(var j=_,A;j!==null;){var U=j;if(A=U.stateNode,U=U.tag,U!==5&&U!==26&&U!==27||A===null||T===null||(U=ut(j,T),U!=null&&oe.push(li(j,U,A))),Ze)break;j=j.return}0<oe.length&&(R=new O(R,se,null,l,M),q.push({event:R,listeners:oe}))}}if((t&7)===0){e:{if(R=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",R&&l!==G&&(se=l.relatedTarget||l.fromElement)&&(ql(se)||se[oa]))break e;if((O||R)&&(R=M.window===M?M:(R=M.ownerDocument)?R.defaultView||R.parentWindow:window,O?(se=l.relatedTarget||l.toElement,O=_,se=se?ql(se):null,se!==null&&(Ze=h(se),oe=se.tag,se!==Ze||oe!==5&&oe!==27&&oe!==6)&&(se=null)):(O=null,se=_),O!==se)){if(oe=Oo,U="onMouseLeave",T="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(oe=Mo,U="onPointerLeave",T="onPointerEnter",j="pointer"),Ze=O==null?R:Za(O),A=se==null?R:Za(se),R=new oe(U,j+"leave",O,l,M),R.target=Ze,R.relatedTarget=A,U=null,ql(M)===_&&(oe=new oe(T,j+"enter",se,l,M),oe.target=A,oe.relatedTarget=Ze,U=oe),Ze=U,O&&se)t:{for(oe=Lg,T=O,j=se,A=0,U=T;U;U=oe(U))A++;U=0;for(var ue=j;ue;ue=oe(ue))U++;for(;0<A-U;)T=oe(T),A--;for(;0<U-A;)j=oe(j),U--;for(;A--;){if(T===j||j!==null&&T===j.alternate){oe=T;break t}T=oe(T),j=oe(j)}oe=null}else oe=null;O!==null&&Eh(q,R,O,oe,!1),se!==null&&Ze!==null&&Eh(q,Ze,se,oe,!0)}}e:{if(R=_?Za(_):window,O=R.nodeName&&R.nodeName.toLowerCase(),O==="select"||O==="input"&&R.type==="file")var De=$o;else if(Go(R))if(Xo)De=Kp;else{De=Zp;var ie=Qp}else O=R.nodeName,!O||O.toLowerCase()!=="input"||R.type!=="checkbox"&&R.type!=="radio"?_&&pa(_.elementType)&&(De=$o):De=Vp;if(De&&(De=De(e,_))){Yo(q,De,l,M);break e}ie&&ie(e,R,_),e==="focusout"&&_&&R.type==="number"&&_.memoizedProps.value!=null&&An(R,"number",R.value)}switch(ie=_?Za(_):window,e){case"focusin":(Go(ie)||ie.contentEditable==="true")&&(Rn=ie,iu=_,zs=null);break;case"focusout":zs=iu=Rn=null;break;case"mousedown":cu=!0;break;case"contextmenu":case"mouseup":case"dragend":cu=!1,Wo(q,l,M);break;case"selectionchange":if(Ip)break;case"keydown":case"keyup":Wo(q,l,M)}var xe;if(lu)e:{switch(e){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else _n?Bo(e,l)&&(Te="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Te="onCompositionStart");Te&&(Uo&&l.locale!=="ko"&&(_n||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&_n&&(xe=zo()):(ga=M,Fc="value"in ga?ga.value:ga.textContent,_n=!0)),ie=kc(_,Te),0<ie.length&&(Te=new Do(Te,e,null,l,M),q.push({event:Te,listeners:ie}),xe?Te.data=xe:(xe=qo(l),xe!==null&&(Te.data=xe)))),(xe=qp?Gp(e,l):Yp(e,l))&&(Te=kc(_,"onBeforeInput"),0<Te.length&&(ie=new Do("onBeforeInput","beforeinput",null,l,M),q.push({event:ie,listeners:Te}),ie.data=xe)),Og(q,e,_,l,M)}kh(q,t)})}function li(e,t,l){return{instance:e,listener:t,currentTarget:l}}function kc(e,t){for(var l=t+"Capture",a=[];e!==null;){var s=e,i=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||i===null||(s=ut(e,l),s!=null&&a.unshift(li(e,s,i)),s=ut(e,t),s!=null&&a.push(li(e,s,i))),e.tag===3)return a;e=e.return}return[]}function Lg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Eh(e,t,l,a,s){for(var i=t._reactName,d=[];l!==null&&l!==a;){var m=l,b=m.alternate,_=m.stateNode;if(m=m.tag,b!==null&&b===a)break;m!==5&&m!==26&&m!==27||_===null||(b=_,s?(_=ut(l,i),_!=null&&d.unshift(li(l,_,b))):s||(_=ut(l,i),_!=null&&d.push(li(l,_,b)))),l=l.return}d.length!==0&&e.push({event:t,listeners:d})}var Hg=/\r\n?/g,Bg=/\u0000|\uFFFD/g;function Ah(e){return(typeof e=="string"?e:""+e).replace(Hg,`
9
+ `).replace(Bg,"")}function _h(e,t){return t=Ah(t),Ah(e)===t}function Qe(e,t,l,a,s,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Xl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Xl(e,""+a);break;case"className":Ka(e,"class",a);break;case"tabIndex":Ka(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Ka(e,l,a);break;case"style":Ns(e,a,i);break;case"data":if(t!=="object"){Ka(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=g(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(l==="formAction"?(t!=="input"&&Qe(e,t,"name",s.name,s,null),Qe(e,t,"formEncType",s.formEncType,s,null),Qe(e,t,"formMethod",s.formMethod,s,null),Qe(e,t,"formTarget",s.formTarget,s,null)):(Qe(e,t,"encType",s.encType,s,null),Qe(e,t,"method",s.method,s,null),Qe(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=g(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=w);break;case"onScroll":a!=null&&Se("scroll",e);break;case"onScrollEnd":a!=null&&Se("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=g(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":Se("beforetoggle",e),Se("toggle",e),kn(e,"popover",a);break;case"xlinkActuate":cl(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":cl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":cl(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":cl(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":cl(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":cl(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":cl(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":cl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":cl(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":kn(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Ss.get(l)||l,kn(e,l,a))}}function Cr(e,t,l,a,s,i){switch(l){case"style":Ns(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof a=="string"?Xl(e,a):(typeof a=="number"||typeof a=="bigint")&&Xl(e,""+a);break;case"onScroll":a!=null&&Se("scroll",e);break;case"onScrollEnd":a!=null&&Se("scrollend",e);break;case"onClick":a!=null&&(e.onclick=w);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bl.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),t=l.slice(2,s?l.length-7:void 0),i=e[it]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,s),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,s);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):kn(e,l,a)}}}function At(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Se("error",e),Se("load",e);var a=!1,s=!1,i;for(i in l)if(l.hasOwnProperty(i)){var d=l[i];if(d!=null)switch(i){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Qe(e,t,i,d,l,null)}}s&&Qe(e,t,"srcSet",l.srcSet,l,null),a&&Qe(e,t,"src",l.src,l,null);return;case"input":Se("invalid",e);var m=i=d=s=null,b=null,_=null;for(a in l)if(l.hasOwnProperty(a)){var M=l[a];if(M!=null)switch(a){case"name":s=M;break;case"type":d=M;break;case"checked":b=M;break;case"defaultChecked":_=M;break;case"value":i=M;break;case"defaultValue":m=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,t));break;default:Qe(e,t,a,M,l,null)}}bs(e,i,m,b,_,d,s,!1);return;case"select":Se("invalid",e),a=d=i=null;for(s in l)if(l.hasOwnProperty(s)&&(m=l[s],m!=null))switch(s){case"value":i=m;break;case"defaultValue":d=m;break;case"multiple":a=m;default:Qe(e,t,s,m,l,null)}t=i,l=d,e.multiple=!!a,t!=null?$l(e,!!a,t,!1):l!=null&&$l(e,!!a,l,!0);return;case"textarea":Se("invalid",e),i=s=a=null;for(d in l)if(l.hasOwnProperty(d)&&(m=l[d],m!=null))switch(d){case"value":a=m;break;case"defaultValue":s=m;break;case"children":i=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(r(91));break;default:Qe(e,t,d,m,l,null)}Ri(e,a,s,i);return;case"option":for(b in l)l.hasOwnProperty(b)&&(a=l[b],a!=null)&&(b==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Qe(e,t,b,a,l,null));return;case"dialog":Se("beforetoggle",e),Se("toggle",e),Se("cancel",e),Se("close",e);break;case"iframe":case"object":Se("load",e);break;case"video":case"audio":for(a=0;a<ti.length;a++)Se(ti[a],e);break;case"image":Se("error",e),Se("load",e);break;case"details":Se("toggle",e);break;case"embed":case"source":case"link":Se("error",e),Se("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(_ in l)if(l.hasOwnProperty(_)&&(a=l[_],a!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Qe(e,t,_,a,l,null)}return;default:if(pa(t)){for(M in l)l.hasOwnProperty(M)&&(a=l[M],a!==void 0&&Cr(e,t,M,a,l,void 0));return}}for(m in l)l.hasOwnProperty(m)&&(a=l[m],a!=null&&Qe(e,t,m,a,l,null))}function qg(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,i=null,d=null,m=null,b=null,_=null,M=null;for(O in l){var q=l[O];if(l.hasOwnProperty(O)&&q!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":b=q;default:a.hasOwnProperty(O)||Qe(e,t,O,null,a,q)}}for(var R in a){var O=a[R];if(q=l[R],a.hasOwnProperty(R)&&(O!=null||q!=null))switch(R){case"type":i=O;break;case"name":s=O;break;case"checked":_=O;break;case"defaultChecked":M=O;break;case"value":d=O;break;case"defaultValue":m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:O!==q&&Qe(e,t,R,O,a,q)}}ys(e,d,m,b,_,M,i,s);return;case"select":O=d=m=R=null;for(i in l)if(b=l[i],l.hasOwnProperty(i)&&b!=null)switch(i){case"value":break;case"multiple":O=b;default:a.hasOwnProperty(i)||Qe(e,t,i,null,a,b)}for(s in a)if(i=a[s],b=l[s],a.hasOwnProperty(s)&&(i!=null||b!=null))switch(s){case"value":R=i;break;case"defaultValue":m=i;break;case"multiple":d=i;default:i!==b&&Qe(e,t,s,i,a,b)}t=m,l=d,a=O,R!=null?$l(e,!!l,R,!1):!!a!=!!l&&(t!=null?$l(e,!!l,t,!0):$l(e,!!l,l?[]:"",!1));return;case"textarea":O=R=null;for(m in l)if(s=l[m],l.hasOwnProperty(m)&&s!=null&&!a.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Qe(e,t,m,null,a,s)}for(d in a)if(s=a[d],i=l[d],a.hasOwnProperty(d)&&(s!=null||i!=null))switch(d){case"value":R=s;break;case"defaultValue":O=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(r(91));break;default:s!==i&&Qe(e,t,d,s,a,i)}js(e,R,O);return;case"option":for(var se in l)R=l[se],l.hasOwnProperty(se)&&R!=null&&!a.hasOwnProperty(se)&&(se==="selected"?e.selected=!1:Qe(e,t,se,null,a,R));for(b in a)R=a[b],O=l[b],a.hasOwnProperty(b)&&R!==O&&(R!=null||O!=null)&&(b==="selected"?e.selected=R&&typeof R!="function"&&typeof R!="symbol":Qe(e,t,b,R,a,O));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var oe in l)R=l[oe],l.hasOwnProperty(oe)&&R!=null&&!a.hasOwnProperty(oe)&&Qe(e,t,oe,null,a,R);for(_ in a)if(R=a[_],O=l[_],a.hasOwnProperty(_)&&R!==O&&(R!=null||O!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(137,t));break;default:Qe(e,t,_,R,a,O)}return;default:if(pa(t)){for(var Ze in l)R=l[Ze],l.hasOwnProperty(Ze)&&R!==void 0&&!a.hasOwnProperty(Ze)&&Cr(e,t,Ze,void 0,a,R);for(M in a)R=a[M],O=l[M],!a.hasOwnProperty(M)||R===O||R===void 0&&O===void 0||Cr(e,t,M,R,a,O);return}}for(var T in l)R=l[T],l.hasOwnProperty(T)&&R!=null&&!a.hasOwnProperty(T)&&Qe(e,t,T,null,a,R);for(q in a)R=a[q],O=l[q],!a.hasOwnProperty(q)||R===O||R==null&&O==null||Qe(e,t,q,R,a,O)}function Rh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Gg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var s=l[a],i=s.transferSize,d=s.initiatorType,m=s.duration;if(i&&m&&Rh(d)){for(d=0,m=s.responseEnd,a+=1;a<l.length;a++){var b=l[a],_=b.startTime;if(_>m)break;var M=b.transferSize,q=b.initiatorType;M&&Rh(q)&&(b=b.responseEnd,d+=M*(b<m?1:(m-_)/(b-_)))}if(--a,t+=8*(i+d)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Or=null,Dr=null;function Tc(e){return e.nodeType===9?e:e.ownerDocument}function zh(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ch(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Mr(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ur=null;function Yg(){var e=window.event;return e&&e.type==="popstate"?e===Ur?!1:(Ur=e,!0):(Ur=null,!1)}var Oh=typeof setTimeout=="function"?setTimeout:void 0,$g=typeof clearTimeout=="function"?clearTimeout:void 0,Dh=typeof Promise=="function"?Promise:void 0,Xg=typeof queueMicrotask=="function"?queueMicrotask:typeof Dh<"u"?function(e){return Dh.resolve(null).then(e).catch(Qg)}:Oh;function Qg(e){setTimeout(function(){throw e})}function Oa(e){return e==="head"}function Mh(e,t){var l=t,a=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(s),as(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")ai(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,ai(l);for(var i=l.firstChild;i;){var d=i.nextSibling,m=i.nodeName;i[da]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=d}}else l==="body"&&ai(e.ownerDocument.body);l=s}while(l);as(t)}function Uh(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Lr(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Lr(l),Qa(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Zg(e,t,l,a){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[da])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=ml(e.nextSibling),e===null)break}return null}function Vg(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=ml(e.nextSibling),e===null))return null;return e}function Lh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ml(e.nextSibling),e===null))return null;return e}function Hr(e){return e.data==="$?"||e.data==="$~"}function Br(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Kg(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function ml(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var qr=null;function Hh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return ml(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Bh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function qh(e,t,l){switch(t=Tc(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function ai(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Qa(e)}var pl=new Map,Gh=new Set;function Ec(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var sa=K.d;K.d={f:Jg,r:Ig,D:Fg,C:Wg,L:Pg,m:ex,X:lx,S:tx,M:ax};function Jg(){var e=sa.f(),t=vc();return e||t}function Ig(e){var t=Gl(e);t!==null&&t.tag===5&&t.type==="form"?nd(t):sa.r(e)}var es=typeof document>"u"?null:document;function Yh(e,t,l){var a=es;if(a&&typeof t=="string"&&t){var s=St(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),Gh.has(s)||(Gh.add(s),e={rel:e,crossOrigin:l,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),At(t,"link",e),ct(t),a.head.appendChild(t)))}}function Fg(e){sa.D(e),Yh("dns-prefetch",e,null)}function Wg(e,t){sa.C(e,t),Yh("preconnect",e,t)}function Pg(e,t,l){sa.L(e,t,l);var a=es;if(a&&e&&t){var s='link[rel="preload"][as="'+St(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+St(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+St(l.imageSizes)+'"]')):s+='[href="'+St(e)+'"]';var i=s;switch(t){case"style":i=ts(e);break;case"script":i=ls(e)}pl.has(i)||(e=E({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),pl.set(i,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(ni(i))||t==="script"&&a.querySelector(si(i))||(t=a.createElement("link"),At(t,"link",e),ct(t),a.head.appendChild(t)))}}function ex(e,t){sa.m(e,t);var l=es;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+St(a)+'"][href="'+St(e)+'"]',i=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=ls(e)}if(!pl.has(i)&&(e=E({rel:"modulepreload",href:e},t),pl.set(i,e),l.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(si(i)))return}a=l.createElement("link"),At(a,"link",e),ct(a),l.head.appendChild(a)}}}function tx(e,t,l){sa.S(e,t,l);var a=es;if(a&&e){var s=ha(a).hoistableStyles,i=ts(e);t=t||"default";var d=s.get(i);if(!d){var m={loading:0,preload:null};if(d=a.querySelector(ni(i)))m.loading=5;else{e=E({rel:"stylesheet",href:e,"data-precedence":t},l),(l=pl.get(i))&&Gr(e,l);var b=d=a.createElement("link");ct(b),At(b,"link",e),b._p=new Promise(function(_,M){b.onload=_,b.onerror=M}),b.addEventListener("load",function(){m.loading|=1}),b.addEventListener("error",function(){m.loading|=2}),m.loading|=4,Ac(d,t,a)}d={type:"stylesheet",instance:d,count:1,state:m},s.set(i,d)}}}function lx(e,t){sa.X(e,t);var l=es;if(l&&e){var a=ha(l).hoistableScripts,s=ls(e),i=a.get(s);i||(i=l.querySelector(si(s)),i||(e=E({src:e,async:!0},t),(t=pl.get(s))&&Yr(e,t),i=l.createElement("script"),ct(i),At(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function ax(e,t){sa.M(e,t);var l=es;if(l&&e){var a=ha(l).hoistableScripts,s=ls(e),i=a.get(s);i||(i=l.querySelector(si(s)),i||(e=E({src:e,async:!0,type:"module"},t),(t=pl.get(s))&&Yr(e,t),i=l.createElement("script"),ct(i),At(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function $h(e,t,l,a){var s=(s=pe.current)?Ec(s):null;if(!s)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=ts(l.href),l=ha(s).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=ts(l.href);var i=ha(s).hoistableStyles,d=i.get(e);if(d||(s=s.ownerDocument||s,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,d),(i=s.querySelector(ni(e)))&&!i._p&&(d.instance=i,d.state.loading=5),pl.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},pl.set(e,l),i||nx(s,e,l,d.state))),t&&a===null)throw Error(r(528,""));return d}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ls(l),l=ha(s).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ts(e){return'href="'+St(e)+'"'}function ni(e){return'link[rel="stylesheet"]['+e+"]"}function Xh(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function nx(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),At(t,"link",l),ct(t),e.head.appendChild(t))}function ls(e){return'[src="'+St(e)+'"]'}function si(e){return"script[async]"+e}function Qh(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+St(l.href)+'"]');if(a)return t.instance=a,ct(a),a;var s=E({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ct(a),At(a,"style",s),Ac(a,l.precedence,e),t.instance=a;case"stylesheet":s=ts(l.href);var i=e.querySelector(ni(s));if(i)return t.state.loading|=4,t.instance=i,ct(i),i;a=Xh(l),(s=pl.get(s))&&Gr(a,s),i=(e.ownerDocument||e).createElement("link"),ct(i);var d=i;return d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),At(i,"link",a),t.state.loading|=4,Ac(i,l.precedence,e),t.instance=i;case"script":return i=ls(l.src),(s=e.querySelector(si(i)))?(t.instance=s,ct(s),s):(a=l,(s=pl.get(i))&&(a=E({},l),Yr(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),ct(s),At(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Ac(a,l.precedence,e));return t.instance}function Ac(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,i=s,d=0;d<a.length;d++){var m=a[d];if(m.dataset.precedence===t)i=m;else if(i!==s)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Gr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Yr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var _c=null;function Zh(e,t,l){if(_c===null){var a=new Map,s=_c=new Map;s.set(l,a)}else s=_c,a=s.get(l),a||(a=new Map,s.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var i=l[s];if(!(i[da]||i[pt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var d=i.getAttribute(t)||"";d=e+d;var m=a.get(d);m?m.push(i):a.set(d,[i])}}return a}function Vh(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function sx(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Kh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ix(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=ts(a.href),i=t.querySelector(ni(s));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Rc.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,ct(i);return}i=t.ownerDocument||t,a=Xh(a),(s=pl.get(s))&&Gr(a,s),i=i.createElement("link"),ct(i);var d=i;d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),At(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Rc.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var $r=0;function cx(e,t){return e.stylesheets&&e.count===0&&Cc(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Cc(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&$r===0&&($r=62500*Gg());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cc(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>$r?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function Rc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zc=null;function Cc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zc=new Map,t.forEach(ux,e),zc=null,Rc.call(e))}function ux(e,t){if(!(t.state.loading&4)){var l=zc.get(e);if(l)var a=l.get(null);else{l=new Map,zc.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var d=s[i];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(l.set(d.dataset.precedence,d),a=d)}a&&l.set(null,a)}s=t.instance,d=s.getAttribute("data-precedence"),i=l.get(d)||a,i===a&&l.set(null,s),l.set(d,s),this.count++,a=Rc.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),i?i.parentNode.insertBefore(s,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var ii={$$typeof:fe,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function rx(e,t,l,a,s,i,d,m,b){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ra(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ra(0),this.hiddenUpdates=ra(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=i,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Jh(e,t,l,a,s,i,d,m,b,_,M,q){return e=new rx(e,t,l,d,b,_,M,q,m),t=1,i===!0&&(t|=24),i=Vt(3,null,null,t),e.current=i,i.stateNode=e,t=Nu(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},Tu(i),e}function Ih(e){return e?(e=On,e):On}function Fh(e,t,l,a,s,i){s=Ih(s),a.context===null?a.context=s:a.pendingContext=s,a=Na(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=Sa(e,a,t),l!==null&&(Gt(l,e,t),Hs(l,e,t))}function Wh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Xr(e,t){Wh(e,t),(e=e.alternate)&&Wh(e,t)}function Ph(e){if(e.tag===13||e.tag===31){var t=Wa(e,67108864);t!==null&&Gt(t,e,67108864),Xr(e,67108864)}}function em(e){if(e.tag===13||e.tag===31){var t=Wt();t=gs(t);var l=Wa(e,t);l!==null&&Gt(l,e,t),Xr(e,t)}}var Oc=!0;function ox(e,t,l,a){var s=D.T;D.T=null;var i=K.p;try{K.p=2,Qr(e,t,l,a)}finally{K.p=i,D.T=s}}function fx(e,t,l,a){var s=D.T;D.T=null;var i=K.p;try{K.p=8,Qr(e,t,l,a)}finally{K.p=i,D.T=s}}function Qr(e,t,l,a){if(Oc){var s=Zr(a);if(s===null)zr(e,t,a,Dc,l),lm(e,a);else if(hx(s,e,t,l,a))a.stopPropagation();else if(lm(e,a),t&4&&-1<dx.indexOf(e)){for(;s!==null;){var i=Gl(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var d=_l(i.pendingLanes);if(d!==0){var m=i;for(m.pendingLanes|=2,m.entangledLanes|=2;d;){var b=1<<31-Rt(d);m.entanglements[1]|=b,d&=~b}Ul(i),(Le&6)===0&&(gc=_t()+500,ei(0))}}break;case 31:case 13:m=Wa(i,2),m!==null&&Gt(m,i,2),vc(),Xr(i,2)}if(i=Zr(a),i===null&&zr(e,t,a,Dc,l),i===s)break;s=i}s!==null&&a.stopPropagation()}else zr(e,t,a,null,l)}}function Zr(e){return e=ee(e),Vr(e)}var Dc=null;function Vr(e){if(Dc=null,e=ql(e),e!==null){var t=h(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=p(t),e!==null)return e;e=null}else if(l===31){if(e=x(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Dc=e,null}function tm(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ni()){case xl:return 2;case Al:return 8;case al:case ds:return 32;case $a:return 268435456;default:return 32}default:return 32}}var Kr=!1,Da=null,Ma=null,Ua=null,ci=new Map,ui=new Map,La=[],dx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function lm(e,t){switch(e){case"focusin":case"focusout":Da=null;break;case"dragenter":case"dragleave":Ma=null;break;case"mouseover":case"mouseout":Ua=null;break;case"pointerover":case"pointerout":ci.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ui.delete(t.pointerId)}}function ri(e,t,l,a,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Gl(t),t!==null&&Ph(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function hx(e,t,l,a,s){switch(t){case"focusin":return Da=ri(Da,e,t,l,a,s),!0;case"dragenter":return Ma=ri(Ma,e,t,l,a,s),!0;case"mouseover":return Ua=ri(Ua,e,t,l,a,s),!0;case"pointerover":var i=s.pointerId;return ci.set(i,ri(ci.get(i)||null,e,t,l,a,s)),!0;case"gotpointercapture":return i=s.pointerId,ui.set(i,ri(ui.get(i)||null,e,t,l,a,s)),!0}return!1}function am(e){var t=ql(e.target);if(t!==null){var l=h(t);if(l!==null){if(t=l.tag,t===13){if(t=p(l),t!==null){e.blockedOn=t,xs(e.priority,function(){em(l)});return}}else if(t===31){if(t=x(l),t!==null){e.blockedOn=t,xs(e.priority,function(){em(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Zr(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);G=a,l.target.dispatchEvent(a),G=null}else return t=Gl(l),t!==null&&Ph(t),e.blockedOn=l,!1;t.shift()}return!0}function nm(e,t,l){Mc(e)&&l.delete(t)}function mx(){Kr=!1,Da!==null&&Mc(Da)&&(Da=null),Ma!==null&&Mc(Ma)&&(Ma=null),Ua!==null&&Mc(Ua)&&(Ua=null),ci.forEach(nm),ui.forEach(nm)}function Uc(e,t){e.blockedOn===t&&(e.blockedOn=null,Kr||(Kr=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,mx)))}var Lc=null;function sm(e){Lc!==e&&(Lc=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){Lc===e&&(Lc=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(Vr(a||l)===null)continue;break}var i=Gl(l);i!==null&&(e.splice(t,3),t-=3,Zu(i,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function as(e){function t(b){return Uc(b,e)}Da!==null&&Uc(Da,e),Ma!==null&&Uc(Ma,e),Ua!==null&&Uc(Ua,e),ci.forEach(t),ui.forEach(t);for(var l=0;l<La.length;l++){var a=La[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<La.length&&(l=La[0],l.blockedOn===null);)am(l),l.blockedOn===null&&La.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var s=l[a],i=l[a+1],d=s[it]||null;if(typeof i=="function")d||sm(l);else if(d){var m=null;if(i&&i.hasAttribute("formAction")){if(s=i,d=i[it]||null)m=d.formAction;else if(Vr(s)!==null)continue}else m=d.action;typeof m=="function"?l[a+1]=m:(l.splice(a,3),a-=3),sm(l)}}}function im(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(d){return s=d})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Jr(e){this._internalRoot=e}Hc.prototype.render=Jr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=Wt();Fh(l,a,e,t,null,null)},Hc.prototype.unmount=Jr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fh(e.current,2,null,e,null,null),vc(),t[oa]=null}};function Hc(e){this._internalRoot=e}Hc.prototype.unstable_scheduleHydration=function(e){if(e){var t=wn();e={blockedOn:null,target:e,priority:t};for(var l=0;l<La.length&&t!==0&&t<La[l].priority;l++);La.splice(l,0,e),l===0&&am(e)}};var cm=c.version;if(cm!=="19.2.8")throw Error(r(527,cm,"19.2.8"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=v(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var px={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bc.isDisabled&&Bc.supportsFiber)try{nl=Bc.inject(px),yt=Bc}catch{}}return fi.createRoot=function(e,t){if(!f(e))throw Error(r(299));var l=!1,a="",s=md,i=pd,d=gd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=Jh(e,1,!1,null,null,l,a,null,s,i,d,im),e[oa]=t.current,Rr(e),new Jr(t)},fi.hydrateRoot=function(e,t,l){if(!f(e))throw Error(r(299));var a=!1,s="",i=md,d=pd,m=gd,b=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(d=l.onCaughtError),l.onRecoverableError!==void 0&&(m=l.onRecoverableError),l.formState!==void 0&&(b=l.formState)),t=Jh(e,1,!0,t,l??null,a,s,b,i,d,m,im),t.context=Ih(null),l=t.current,a=Wt(),a=gs(a),s=Na(a),s.callback=null,Sa(l,s,a),l=a,t.current.lanes=l,Rl(t,l),Ul(t),e[oa]=t.current,Rr(e),new Hc(t)},fi.version="19.2.8",fi}var xm;function kx(){if(xm)return Wr.exports;xm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(c){console.error(c)}}return u(),Wr.exports=wx(),Wr.exports}var Tx=kx();function I({name:u,fill:c,className:o}){return n.jsx("span",{className:`ms material-symbols-rounded${c?" ms-fill":""}${o?` ${o}`:""}`,"aria-hidden":!0,children:u})}function Ex(){const[u,c]=C.useState(()=>window.location.hash.slice(1)||"/");return C.useEffect(()=>{const o=()=>c(window.location.hash.slice(1)||"/");return window.addEventListener("hashchange",o),()=>window.removeEventListener("hashchange",o)},[]),u}let uo="kraftwerk inspector",ro="";function Jm(){document.title=ro?`${ro} — ${uo}`:uo}function Ax(u){uo=u,Jm()}function vm(u){ro=u,Jm()}function gl(u,c){c?.replace?window.location.replace(`#${u}`):window.location.hash=u}function Ue({href:u,...c}){return n.jsx("a",{href:`#${u}`,...c})}const Im="kw-expert";let yo=(()=>{try{return localStorage.getItem(Im)!=="off"}catch{return!0}})();const oo=new Set;document.documentElement.dataset.expert=yo?"on":"off";function _x(u){yo=u,document.documentElement.dataset.expert=u?"on":"off";try{localStorage.setItem(Im,u?"on":"off")}catch{}oo.forEach(c=>c())}function Ga(){return C.useSyncExternalStore(u=>(oo.add(u),()=>oo.delete(u)),()=>yo)}function Ge(u,c){const[o,r]=C.useState(null),f=C.useRef(u);return f.current=u,C.useEffect(()=>{let h=!0,p;const x=async()=>{try{const y=await fetch(f.current,{cache:"no-store"});y.ok&&h&&r(await y.json())}catch{}h&&(p=setTimeout(x,c?1500:6e3))};return x(),()=>{h=!1,clearTimeout(p)}},[u,c]),o}function vi(u){if(u==null)return"—";const c=Math.round(u/1e3);return c<60?`${c}s`:`${Math.floor(c/60)}m${String(c%60).padStart(2,"0")}s`}function bo(u){return u==null?"—":`$${u.toFixed(2)}`}function Yc(u){return u?u>=1e3?`${(u/1e3).toFixed(1)}k`:String(u):"0"}function jo(u){return u<1024?`${u} B`:u<1024*1024?`${(u/1024).toFixed(1)} K`:`${(u/1024/1024).toFixed(1)} M`}function pn(u){if(!u)return"—";const c=new Date(u),o=new Date,r=c.toDateString()===o.toDateString(),f=c.toTimeString().slice(0,5);return r?f:`${c.toISOString().slice(5,10)} ${f}`}function Rx(u){if(!u)return"—";const c=Date.now()-Date.parse(u);if(c<6e4)return"just now";const o=Math.floor(c/6e4);if(o<60)return`${o}m ago`;const r=Math.floor(o/60);if(r<24)return`${r}h ago`;const f=Math.floor(r/24);return f<7?`${f}d ago`:new Date(u).toISOString().slice(5,10)}function No({since:u}){const[,c]=C.useState(0);return C.useEffect(()=>{const o=setInterval(()=>c(r=>r+1),1e3);return()=>clearInterval(o)},[]),u?n.jsx("span",{className:"num",children:vi(Date.now()-Date.parse(u))}):null}function Vc({status:u}){return n.jsx("span",{className:`lamp ${u}`})}function zx({status:u}){return n.jsx("span",{className:`status-word ${u}`,children:u})}function So(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var xn=So();function Fm(u){xn=u}var mn={exec:()=>null};function ns(u){let c=[];return o=>{let r=Math.max(0,Math.min(3,o-1)),f=c[r];return f||(f=u(r),c[r]=f),f}}function we(u,c=""){let o=typeof u=="string"?u:u.source,r={replace:(f,h)=>{let p=typeof h=="string"?h:h.source;return p=p.replace(Ot.caret,"$1"),o=o.replace(f,p),r},getRegex:()=>new RegExp(o,c)};return r}var Cx=((u="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+u)}catch{return!1}})(),Ot={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:u=>new RegExp(`^( {0,3}${u})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:ns(u=>new RegExp(`^ {0,${u}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:ns(u=>new RegExp(`^ {0,${u}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:ns(u=>new RegExp(`^ {0,${u}}(?:\`\`\`|~~~)`)),headingBeginRegex:ns(u=>new RegExp(`^ {0,${u}}#`)),htmlBeginRegex:ns(u=>new RegExp(`^ {0,${u}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:ns(u=>new RegExp(`^ {0,${u}}>`))},Ox=/^(?:[ \t]*(?:\n|$))+/,Dx=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Mx=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,yi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ux=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,wo=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Wm=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Pm=we(Wm).replace(/bull/g,wo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Lx=we(Wm).replace(/bull/g,wo).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ko=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Hx=/^[^\n]+/,To=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Bx=we(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",To).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),qx=we(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,wo).getRegex(),Kc="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Eo=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Gx=we("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Eo).replace("tag",Kc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ep=u=>we(ko).replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",u).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kc).getRegex(),Yx=ep(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),$x=ep(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Xx=we(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",$x).getRegex(),Ao={blockquote:Xx,code:Dx,def:Bx,fences:Mx,heading:Ux,hr:yi,html:Gx,lheading:Pm,list:qx,newline:Ox,paragraph:Yx,table:mn,text:Hx},ym=we("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kc).getRegex(),Qx={...Ao,lheading:Lx,table:ym,paragraph:we(ko).replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ym).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kc).getRegex()},Zx={...Ao,html:we(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Eo).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:mn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:we(ko).replace("hr",yi).replace("heading",` *#{1,6} *[^
10
+ ]`).replace("lheading",Pm).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Vx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Kx=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,tp=/^( {2,}|\\)\n(?!\s*$)/,Jx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ia=/[\p{P}\p{S}]/u,us=/[\s\p{P}\p{S}]/u,bi=/[^\s\p{P}\p{S}]/u,Ix=we(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,us).getRegex(),Fx=/[\p{Pi}\p{Ps}"']/u,lp=/(?!~)[\p{P}\p{S}]/u,Wx=/(?!~)[\s\p{P}\p{S}]/u,Px=/(?:[^\s\p{P}\p{S}]|~)/u,ev=we(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Cx?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ap=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,tv=we(ap,"u").replace(/punct/g,ia).getRegex(),lv=we(ap,"u").replace(/punct/g,lp).getRegex(),av=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,nv=we(av,"u").replace(/openQuote/g,Fx).replace(/punct/g,ia).getRegex(),np="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",sv=we(np,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,us).replace(/punct/g,ia).getRegex(),iv=we(np,"gu").replace(/notPunctSpace/g,Px).replace(/punctSpace/g,Wx).replace(/punct/g,lp).getRegex(),cv="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",uv=we(cv,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,us).replace(/punct/g,ia).getRegex(),rv=we("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,us).replace(/punct/g,ia).getRegex(),ov="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",fv=we(ov,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,us).replace(/punct/g,ia).getRegex(),dv=we(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ia).getRegex(),hv="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",mv=we(hv,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,us).replace(/punct/g,ia).getRegex(),pv=we(/\\(punct)/,"gu").replace(/punct/g,ia).getRegex(),gv=we(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),xv=we(Eo).replace("(?:-->|$)","-->").getRegex(),vv=we("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",xv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$c=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,yv=we(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",$c).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),sp=we(/^!?\[(label)\]\[(ref)\]/).replace("label",$c).replace("ref",To).getRegex(),ip=we(/^!?\[(ref)\](?:\[\])?/).replace("ref",To).getRegex(),bv=we("reflink|nolink(?!\\()","g").replace("reflink",sp).replace("nolink",ip).getRegex(),bm=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,_o={_backpedal:mn,anyPunctuation:pv,autolink:gv,blockSkip:ev,br:tp,code:Kx,del:mn,delLDelim:mn,delRDelim:mn,emStrongLDelim:tv,emStrongRDelimAst:sv,emStrongRDelimUnd:rv,escape:Vx,link:yv,nolink:ip,punctuation:Ix,reflink:sp,reflinkSearch:bv,tag:vv,text:Jx,url:mn},jv={..._o,emStrongLDelim:nv,emStrongRDelimAst:uv,emStrongRDelimUnd:fv,link:we(/^!?\[(label)\]\((.*?)\)/).replace("label",$c).getRegex(),reflink:we(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$c).getRegex()},fo={..._o,emStrongRDelimAst:iv,emStrongLDelim:lv,delLDelim:dv,delRDelim:mv,url:we(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",bm).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:we(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",bm).getRegex()},Nv={...fo,br:we(tp).replace("{2,}","*").getRegex(),text:we(fo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qc={normal:Ao,gfm:Qx,pedantic:Zx},di={normal:_o,gfm:fo,breaks:Nv,pedantic:jv},Sv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},jm=u=>Sv[u];function Ll(u,c){if(c){if(Ot.escapeTest.test(u))return u.replace(Ot.escapeReplace,jm)}else if(Ot.escapeTestNoEncode.test(u))return u.replace(Ot.escapeReplaceNoEncode,jm);return u}function Nm(u){try{u=encodeURI(u).replace(Ot.percentDecode,"%")}catch{return null}return u}function Sm(u,c){let o=u.replace(Ot.findPipe,(h,p,x)=>{let y=!1,v=p;for(;--v>=0&&x[v]==="\\";)y=!y;return y?"|":" |"}),r=o.split(Ot.splitPipe),f=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),c)if(r.length>c)r.splice(c);else for(;r.length<c;)r.push("");for(;f<r.length;f++)r[f]=r[f].trim().replace(Ot.slashPipe,"|");return r}function Ba(u,c,o){let r=u.length;if(r===0)return"";let f=0;for(;f<r&&u.charAt(r-f-1)===c;)f++;return u.slice(0,r-f)}function wm(u){let c=u.split(`
11
+ `),o=c.length-1;for(;o>=0&&Ot.blankLine.test(c[o]);)o--;return c.length-o<=2?u:c.slice(0,o+1).join(`
12
+ `)}function wv(u,c){if(u.indexOf(c[1])===-1)return-1;let o=0;for(let r=0;r<u.length;r++)if(u[r]==="\\")r++;else if(u[r]===c[0])o++;else if(u[r]===c[1]&&(o--,o<0))return r;return o>0?-2:-1}function kv(u,c=0){let o=c,r="";for(let f of u)if(f===" "){let h=4-o%4;r+=" ".repeat(h),o+=h}else r+=f,o++;return r}function km(u,c,o,r,f){let h=c.href,p=c.title||null,x=u[1].replace(f.other.outputLinkReplace,"$1"),y=u[0].charAt(0)==="!";r.state.inLink=!0;let v=r.state.linkEmitted,S=r.state.inRawBlock;r.state.linkEmitted=!1;let E=r.inlineTokens(x),k=r.state.linkEmitted;if(r.state.linkEmitted=v,r.state.inLink=!1,!y){if(k){r.state.inRawBlock=S;return}r.state.linkEmitted=!0}return{type:y?"image":"link",raw:o,href:h,title:p,text:x,tokens:E}}function Tv(u,c,o){let r=u.match(o.other.indentCodeCompensation);if(r===null)return c;let f=r[1];return c.split(`
13
+ `).map(h=>{let p=h.match(o.other.beginningSpace);if(p===null)return h;let[x]=p;return x.length>=f.length?h.slice(f.length):h}).join(`
14
+ `)}var Xc=class{options;rules;lexer;constructor(u){this.options=u||xn}space(u){let c=this.rules.block.newline.exec(u);if(c&&c[0].length>0)return{type:"space",raw:c[0]}}code(u){let c=this.rules.block.code.exec(u);if(c){let o=this.options.pedantic?c[0]:wm(c[0]),r=o.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:o,codeBlockStyle:"indented",text:r}}}fences(u){let c=this.rules.block.fences.exec(u);if(c){let o=c[0],r=Tv(o,c[3]||"",this.rules);return{type:"code",raw:o,lang:c[2]?c[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):c[2],text:r}}}heading(u){let c=this.rules.block.heading.exec(u);if(c){let o=c[2].trim();if(this.rules.other.endingHash.test(o)){let r=Ba(o,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(o=r.trim())}return{type:"heading",raw:Ba(c[0],`
15
+ `),depth:c[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(u){let c=this.rules.block.hr.exec(u);if(c)return{type:"hr",raw:Ba(c[0],`
16
+ `)}}blockquote(u){let c=this.rules.block.blockquote.exec(u);if(c){let o=Ba(c[0],`
17
+ `).split(`
18
+ `),r="",f="",h=[];for(;o.length>0;){let p=!1,x=[],y;for(y=0;y<o.length;y++)if(this.rules.other.blockquoteStart.test(o[y]))x.push(o[y]),p=!0;else if(!p)x.push(o[y]);else break;o=o.slice(y);let v=x.join(`
19
+ `),S=v.replace(this.rules.other.blockquoteSetextReplace,`
20
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
21
+ ${v}`:v,f=f?`${f}
22
+ ${S}`:S;let E=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(S,h,!0),this.lexer.state.top=E,o.length===0)break;let k=h.at(-1);if(k?.type==="code")break;if(k?.type==="blockquote"){let L=k,Y=o.join(`
23
+ `),F=L.raw+`
24
+ `+Y.replace(this.rules.other.blockquoteSetextReplace2,""),Z=this.blockquote(F);h[h.length-1]=Z,r=`${r}
25
+ ${Y}`,f=f.substring(0,f.length-L.text.length)+Z.text;break}else if(k?.type==="list"){let L=k,Y=L.raw+`
26
+ `+o.join(`
27
+ `),F=this.list(Y);h[h.length-1]=F,r=r.substring(0,r.length-k.raw.length)+F.raw,f=f.substring(0,f.length-L.raw.length)+F.raw,o=Y.substring(h.at(-1).raw.length).split(`
28
+ `);continue}}return{type:"blockquote",raw:r,tokens:h,text:f}}}list(u){let c=this.rules.block.list.exec(u);if(c){let o=c[1].trim(),r=o.length>1,f={type:"list",raw:"",ordered:r,start:r?+o.slice(0,-1):"",loose:!1,items:[]};o=r?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=r?o:"[*+-]");let h=this.rules.other.listItemRegex(o),p=!1;for(;u;){let y=!1,v="",S="";if(!(c=h.exec(u))||this.rules.block.hr.test(u))break;v=c[0],u=u.substring(v.length);let E=kv(c[2].split(`
29
+ `,1)[0],c[1].length),k=u.split(`
30
+ `,1)[0],L=!E.trim(),Y=0;if(this.options.pedantic?(Y=2,S=E.trimStart()):L?Y=c[1].length+1:(Y=E.search(this.rules.other.nonSpaceChar),Y=Y>4?1:Y,S=E.slice(Y),Y+=c[1].length),L&&this.rules.other.blankLine.test(k)&&(v+=k+`
31
+ `,u=u.substring(k.length+1),y=!0),!y){let F=this.rules.other.nextBulletRegex(Y),Z=this.rules.other.hrRegex(Y),z=this.rules.other.fencesBeginRegex(Y),de=this.rules.other.headingBeginRegex(Y),fe=this.rules.other.htmlBeginRegex(Y),te=this.rules.other.blockquoteBeginRegex(Y);for(;u;){let W=u.split(`
32
+ `,1)[0],$;if(k=W,this.options.pedantic?(k=k.replace(this.rules.other.listReplaceNesting," "),$=k):$=k.replace(this.rules.other.tabCharGlobal," "),z.test(k)||de.test(k)||fe.test(k)||te.test(k)||F.test(k)||Z.test(k))break;if($.search(this.rules.other.nonSpaceChar)>=Y||!k.trim())S+=`
33
+ `+$.slice(Y);else{if(L||E.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||z.test(E)||de.test(E)||Z.test(E))break;S+=`
34
+ `+k}L=!k.trim(),v+=W+`
35
+ `,u=u.substring(W.length+1),E=$.slice(Y)}}f.loose||(p?f.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(p=!0)),f.items.push({type:"list_item",raw:v,task:!!this.options.gfm&&this.rules.other.listIsTask.test(S),loose:!1,text:S,tokens:[]}),f.raw+=v}let x=f.items.at(-1);if(x)x.raw=x.raw.trimEnd(),x.text=x.text.trimEnd();else return;f.raw=f.raw.trimEnd();for(let y of f.items)if(this.lexer.state.top=!1,y.tokens=this.lexer.blockTokens(y.text,[]),!f.loose){let v=y.tokens.filter(E=>E.type==="space"),S=v.length>0&&v.some(E=>this.rules.other.anyLine.test(E.raw));f.loose=S}for(let y of f.items){let v=y.tokens[0];if(y.task&&(v?.type==="text"||v?.type==="paragraph")){y.text=y.text.replace(this.rules.other.listReplaceTask,""),v.raw=v.raw.replace(this.rules.other.listReplaceTask,""),v.text=v.text.replace(this.rules.other.listReplaceTask,"");for(let E=this.lexer.inlineQueue.length-1;E>=0;E--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[E].src)){this.lexer.inlineQueue[E].src=this.lexer.inlineQueue[E].src.replace(this.rules.other.listReplaceTask,"");break}let S=this.rules.other.listTaskCheckbox.exec(y.raw);if(S){let E={type:"checkbox",raw:S[0]+" ",checked:S[0]!=="[ ]"};y.checked=E.checked,f.loose?y.tokens[0]&&["paragraph","text"].includes(y.tokens[0].type)&&"tokens"in y.tokens[0]&&y.tokens[0].tokens?(y.tokens[0].raw=E.raw+y.tokens[0].raw,y.tokens[0].text=E.raw+y.tokens[0].text,y.tokens[0].tokens.unshift(E)):y.tokens.unshift({type:"paragraph",raw:E.raw,text:E.raw,tokens:[E]}):y.tokens.unshift(E)}}else y.task&&(y.task=!1)}if(f.loose)for(let y of f.items){y.loose=!0;for(let v of y.tokens)v.type==="text"&&(v.type="paragraph")}return f}}html(u){let c=this.rules.block.html.exec(u);if(c){let o=wm(c[0]);return{type:"html",block:!0,raw:o,pre:c[1]==="pre"||c[1]==="script"||c[1]==="style",text:o}}}def(u){let c=this.rules.block.def.exec(u);if(c){let o=c[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=c[2]?c[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",f=c[3]?c[3].substring(1,c[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):c[3];return{type:"def",tag:o,raw:Ba(c[0],`
36
+ `),href:r,title:f}}}table(u){let c=this.rules.block.table.exec(u);if(!c||!this.rules.other.tableDelimiter.test(c[2]))return;let o=Sm(c[1]),r=c[2].replace(this.rules.other.tableAlignChars,"").split("|"),f=c[3]?.trim()?c[3].replace(this.rules.other.tableRowBlankLine,"").split(`
37
+ `):[],h={type:"table",raw:Ba(c[0],`
38
+ `),header:[],align:[],rows:[]};if(o.length===r.length){for(let p of r)this.rules.other.tableAlignRight.test(p)?h.align.push("right"):this.rules.other.tableAlignCenter.test(p)?h.align.push("center"):this.rules.other.tableAlignLeft.test(p)?h.align.push("left"):h.align.push(null);for(let p=0;p<o.length;p++)h.header.push({text:o[p],tokens:this.lexer.inline(o[p]),header:!0,align:h.align[p]});for(let p of f)h.rows.push(Sm(p,h.header.length).map((x,y)=>({text:x,tokens:this.lexer.inline(x),header:!1,align:h.align[y]})));return h}}lheading(u){let c=this.rules.block.lheading.exec(u);if(c){let o=c[1].trim();return{type:"heading",raw:Ba(c[0],`
39
+ `),depth:c[2].charAt(0)==="="?1:2,text:o,tokens:this.lexer.inline(o)}}}paragraph(u){let c=this.rules.block.paragraph.exec(u);if(c){let o=c[1].charAt(c[1].length-1)===`
40
+ `?c[1].slice(0,-1):c[1];return{type:"paragraph",raw:c[0],text:o,tokens:this.lexer.inline(o)}}}text(u){let c=this.rules.block.text.exec(u);if(c)return{type:"text",raw:c[0],text:c[0],tokens:this.lexer.inline(c[0])}}escape(u){let c=this.rules.inline.escape.exec(u);if(c)return{type:"escape",raw:c[0],text:c[1]}}tag(u){let c=this.rules.inline.tag.exec(u);if(c)return!this.lexer.state.inLink&&this.rules.other.startATag.test(c[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(c[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(c[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(c[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:c[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:c[0]}}link(u){let c=this.rules.inline.link.exec(u);if(c){let o=c[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(o)){if(!this.rules.other.endAngleBracket.test(o))return;let h=Ba(o.slice(0,-1),"\\");if((o.length-h.length)%2===0)return}else{let h=wv(c[2],"()");if(h===-2)return;if(h>-1){let p=(c[0].indexOf("!")===0?5:4)+c[1].length+h;c[2]=c[2].substring(0,h),c[0]=c[0].substring(0,p).trim(),c[3]=""}}let r=c[2],f="";if(this.options.pedantic){let h=this.rules.other.pedanticHrefTitle.exec(r);h&&(r=h[1],f=h[3])}else f=c[3]?c[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(o)?r=r.slice(1):r=r.slice(1,-1)),km(c,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:f&&f.replace(this.rules.inline.anyPunctuation,"$1")},c[0],this.lexer,this.rules)}}reflink(u,c){let o;if((o=this.rules.inline.reflink.exec(u))||(o=this.rules.inline.nolink.exec(u))){let r=(o[2]||o[1]).replace(this.rules.other.multipleSpaceGlobal," "),f=c[r.toLowerCase()];if(!f){let h=o[0].charAt(0);return{type:"text",raw:h,text:h}}return km(o,f,o[0],this.lexer,this.rules)}}emStrong(u,c,o=""){let r=this.rules.inline.emStrongLDelim.exec(u);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&o.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!o||this.rules.inline.punctuation.exec(o))){let f=[...r[0]].length-1,h,p,x=f,y=0,v=r[0][0],S=o===v,E=v==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(E.lastIndex=0,c=c.slice(-1*u.length+f);(r=E.exec(c))!==null;){if(h=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!h)continue;if(p=[...h].length,r[3]||r[4]){x+=p;continue}else if(r[5]||r[6]){if(f%3&&!((f+p)%3)){y+=p;continue}if(S)break}if(x-=p,x>0)continue;p=Math.min(p,p+x+y);let k=[...r[0]][0].length,L=u.slice(0,f+r.index+k+p);if(Math.min(f,p)%2){let F=L.slice(1,-1);return{type:"em",raw:L,text:F,tokens:this.lexer.inlineTokens(F)}}let Y=L.slice(2,-2);return{type:"strong",raw:L,text:Y,tokens:this.lexer.inlineTokens(Y)}}}}codespan(u){let c=this.rules.inline.code.exec(u);if(c){let o=c[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(o),f=this.rules.other.startingSpaceChar.test(o)&&this.rules.other.endingSpaceChar.test(o);return r&&f&&(o=o.substring(1,o.length-1)),{type:"codespan",raw:c[0],text:o}}}br(u){let c=this.rules.inline.br.exec(u);if(c)return{type:"br",raw:c[0]}}del(u,c,o=""){let r=this.rules.inline.delLDelim.exec(u);if(r&&(!r[1]||!o||this.rules.inline.punctuation.exec(o))){let f=[...r[0]].length-1,h,p,x=f,y=this.rules.inline.delRDelim;for(y.lastIndex=0,c=c.slice(-1*u.length+f);(r=y.exec(c))!==null;){if(h=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!h||(p=[...h].length,p!==f))continue;if(r[3]||r[4]){x+=p;continue}if(x-=p,x>0)continue;p=Math.min(p,p+x);let v=[...r[0]][0].length,S=u.slice(0,f+r.index+v+p),E=S.slice(f,-f);return{type:"del",raw:S,text:E,tokens:this.lexer.inlineTokens(E)}}}}autolink(u){let c=this.rules.inline.autolink.exec(u);if(c){let o,r;return c[2]==="@"?(o=c[1],r="mailto:"+o):(o=c[1],r=o),{type:"link",raw:c[0],text:o,href:r,tokens:[{type:"text",raw:o,text:o}]}}}url(u){let c;if(c=this.rules.inline.url.exec(u)){let o,r;if(c[2]==="@")o=c[0],r="mailto:"+o;else{let f;do f=c[0],c[0]=this.rules.inline._backpedal.exec(c[0])?.[0]??"";while(f!==c[0]);o=c[0],c[1]==="www."?r="http://"+c[0]:r=c[0]}return{type:"link",raw:c[0],text:o,href:r,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(u){let c=this.rules.inline.text.exec(u);if(c){let o=this.lexer.state.inRawBlock;return{type:"text",raw:c[0],text:c[0],escaped:o}}}},Tl=class ho{tokens;options;state;inlineQueue;tokenizer;constructor(c){this.tokens=[],this.tokens.links=Object.create(null),this.options=c||xn,this.options.tokenizer=this.options.tokenizer||new Xc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let o={other:Ot,block:qc.normal,inline:di.normal};this.options.pedantic?(o.block=qc.pedantic,o.inline=di.pedantic):this.options.gfm&&(o.block=qc.gfm,this.options.breaks?o.inline=di.breaks:o.inline=di.gfm),this.tokenizer.rules=o}static get rules(){return{block:qc,inline:di}}static lex(c,o){return new ho(o).lex(c)}static lexInline(c,o){return new ho(o).inlineTokens(c)}lex(c){c=c.replace(Ot.carriageReturn,`
41
+ `),this.blockTokens(c,this.tokens);for(let o=0;o<this.inlineQueue.length;o++){let r=this.inlineQueue[o];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(c,o=[],r=!1){this.tokenizer.lexer=this,this.options.pedantic&&(c=c.replace(Ot.tabCharGlobal," ").replace(Ot.spaceLine,""));let f=1/0;for(;c;){if(c.length<f)f=c.length;else{this.infiniteLoopError(c.charCodeAt(0));break}let h;if(this.options.extensions?.block?.some(x=>(h=x.call({lexer:this},c,o))?(c=c.substring(h.raw.length),o.push(h),!0):!1))continue;if(h=this.tokenizer.space(c)){c=c.substring(h.raw.length);let x=o.at(-1);h.raw.length===1&&x!==void 0?x.raw+=`
42
+ `:o.push(h);continue}if(h=this.tokenizer.code(c)){c=c.substring(h.raw.length);let x=o.at(-1);x?.type==="paragraph"||x?.type==="text"?(x.raw+=(x.raw.endsWith(`
43
+ `)?"":`
44
+ `)+h.raw,x.text+=`
45
+ `+h.text,this.inlineQueue.at(-1).src=x.text):o.push(h);continue}if(h=this.tokenizer.fences(c)){c=c.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.heading(c)){c=c.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.hr(c)){c=c.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.blockquote(c)){c=c.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.list(c)){c=c.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.html(c)){c=c.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.def(c)){c=c.substring(h.raw.length);let x=o.at(-1);x?.type==="paragraph"||x?.type==="text"?(x.raw+=(x.raw.endsWith(`
46
+ `)?"":`
47
+ `)+h.raw,x.text+=`
48
+ `+h.raw,this.inlineQueue.at(-1).src=x.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title},o.push(h));continue}if(h=this.tokenizer.table(c)){c=c.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.lheading(c)){c=c.substring(h.raw.length),o.push(h);continue}let p=c;if(this.options.extensions?.startBlock){let x=1/0,y=c.slice(1),v;this.options.extensions.startBlock.forEach(S=>{v=S.call({lexer:this},y),typeof v=="number"&&v>=0&&(x=Math.min(x,v))}),x<1/0&&x>=0&&(p=c.substring(0,x+1))}if(this.state.top&&(h=this.tokenizer.paragraph(p))){let x=o.at(-1);r&&x?.type==="paragraph"?(x.raw+=(x.raw.endsWith(`
49
+ `)?"":`
50
+ `)+h.raw,x.text+=`
51
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.text):o.push(h),r=p.length!==c.length,c=c.substring(h.raw.length);continue}if(h=this.tokenizer.text(c)){c=c.substring(h.raw.length);let x=o.at(-1);x?.type==="text"?(x.raw+=(x.raw.endsWith(`
52
+ `)?"":`
53
+ `)+h.raw,x.text+=`
54
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.text):o.push(h);continue}if(c){this.infiniteLoopError(c.charCodeAt(0));break}}return this.state.top=!0,o}inline(c,o=[]){return this.inlineQueue.push({src:c,tokens:o}),o}linkInText(c){if(!c.includes("["))return!1;let o=this.tokenizer.rules.inline.link;for(let r of c.matchAll(this.tokenizer.rules.inline.blockSkip))if(o.test(r[0])&&c.charAt(r.index-1)!=="!")return!0;for(let r of c.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let f=r[0],h=f.lastIndexOf("[");if(!(f.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,f.slice(h+1,-1)))&&!(h>1&&this.linkInText(f.slice(1,h-1))))return!0}return!1}inlineTokens(c,o=[]){this.tokenizer.lexer=this;let r=c;if(this.tokens.links&&c.includes("[")){let x=this.tokenizer.rules.inline.reflinkSearch,y=v=>{let S=v.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,v.slice(S+1,-1)))return v;if(S>1&&v.charAt(0)!=="!"){let E=v.slice(1,S-1);if(this.linkInText(E))return"["+E.replace(x,y)+"]["+"a".repeat(v.length-S-2)+"]"}return"["+"a".repeat(v.length-2)+"]"};r=r.replace(x,y)}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,x=>"+".repeat(x.length)),r=r.replace(this.tokenizer.rules.inline.blockSkip,(x,y,v)=>{let S=v?v.length:0;return x.slice(0,S)+"["+"a".repeat(x.length-S-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let f=!1,h="",p=1/0;for(;c;){if(c.length<p)p=c.length;else{this.infiniteLoopError(c.charCodeAt(0));break}f||(h=""),f=!1;let x;if(this.options.extensions?.inline?.some(v=>(x=v.call({lexer:this},c,o))?(c=c.substring(x.raw.length),o.push(x),!0):!1))continue;if(x=this.tokenizer.escape(c)){c=c.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.tag(c)){c=c.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.link(c)){c=c.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.reflink(c,this.tokens.links)){c=c.substring(x.raw.length);let v=o.at(-1);x.type==="text"&&v?.type==="text"?(v.raw+=x.raw,v.text+=x.text):o.push(x);continue}if(x=this.tokenizer.emStrong(c,r,h)){c=c.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.codespan(c)){c=c.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.br(c)){c=c.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.del(c,r,h)){c=c.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.autolink(c)){c=c.substring(x.raw.length),o.push(x);continue}if(!this.state.inLink&&(x=this.tokenizer.url(c))){c=c.substring(x.raw.length),o.push(x);continue}let y=c;if(this.options.extensions?.startInline){let v=1/0,S=c.slice(1),E;this.options.extensions.startInline.forEach(k=>{E=k.call({lexer:this},S),typeof E=="number"&&E>=0&&(v=Math.min(v,E))}),v<1/0&&v>=0&&(y=c.substring(0,v+1))}if(x=this.tokenizer.inlineText(y)){c=c.substring(x.raw.length),x.raw.slice(-1)!=="_"&&(h=x.raw.slice(-1)),f=!0;let v=o.at(-1);v?.type==="text"?(v.raw+=x.raw,v.text+=x.text):o.push(x);continue}if(c){this.infiniteLoopError(c.charCodeAt(0));break}}return o}infiniteLoopError(c){let o="Infinite loop on byte: "+c;if(this.options.silent)console.error(o);else throw new Error(o)}},Qc=class{options;parser;constructor(u){this.options=u||xn}space(u){return""}code({text:u,lang:c,escaped:o}){let r=(c||"").match(Ot.notSpaceStart)?.[0],f=u.replace(Ot.endingNewline,"")+`
55
+ `;return r?'<pre><code class="language-'+Ll(r)+'">'+(o?f:Ll(f,!0))+`</code></pre>
56
+ `:"<pre><code>"+(o?f:Ll(f,!0))+`</code></pre>
57
+ `}blockquote({tokens:u}){return`<blockquote>
58
+ ${this.parser.parse(u)}</blockquote>
59
+ `}html({text:u}){return u}def(u){return""}heading({tokens:u,depth:c}){return`<h${c}>${this.parser.parseInline(u)}</h${c}>
60
+ `}hr(u){return`<hr>
61
+ `}list(u){let c=u.ordered,o=u.start,r="";for(let p=0;p<u.items.length;p++){let x=u.items[p];r+=this.listitem(x)}let f=c?"ol":"ul",h=c&&o!==1?' start="'+o+'"':"";return"<"+f+h+`>
62
+ `+r+"</"+f+`>
63
+ `}listitem(u){return`<li>${this.parser.parse(u.tokens)}</li>
64
+ `}checkbox({checked:u}){return"<input "+(u?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:u}){return`<p>${this.parser.parseInline(u)}</p>
65
+ `}table(u){let c="",o="";for(let f=0;f<u.header.length;f++)o+=this.tablecell(u.header[f]);c+=this.tablerow({text:o});let r="";for(let f=0;f<u.rows.length;f++){let h=u.rows[f];o="";for(let p=0;p<h.length;p++)o+=this.tablecell(h[p]);r+=this.tablerow({text:o})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
66
+ <thead>
67
+ `+c+`</thead>
68
+ `+r+`</table>
69
+ `}tablerow({text:u}){return`<tr>
70
+ ${u}</tr>
71
+ `}tablecell(u){let c=this.parser.parseInline(u.tokens),o=u.header?"th":"td";return(u.align?`<${o} align="${u.align}">`:`<${o}>`)+c+`</${o}>
72
+ `}strong({tokens:u}){return`<strong>${this.parser.parseInline(u)}</strong>`}em({tokens:u}){return`<em>${this.parser.parseInline(u)}</em>`}codespan({text:u}){return`<code>${Ll(u,!0)}</code>`}br(u){return"<br>"}del({tokens:u}){return`<del>${this.parser.parseInline(u)}</del>`}link({href:u,title:c,tokens:o}){let r=this.parser.parseInline(o),f=Nm(u);if(f===null)return r;u=f;let h='<a href="'+u+'"';return c&&(h+=' title="'+Ll(c)+'"'),h+=">"+r+"</a>",h}image({href:u,title:c,text:o,tokens:r}){r&&(o=this.parser.parseInline(r,this.parser.textRenderer));let f=Nm(u);if(f===null)return Ll(o);u=f;let h=`<img src="${u}" alt="${Ll(o)}"`;return c&&(h+=` title="${Ll(c)}"`),h+=">",h}text(u){return"tokens"in u&&u.tokens?this.parser.parseInline(u.tokens):"escaped"in u&&u.escaped?u.text:Ll(u.text)}},Ro=class{strong({text:u}){return u}em({text:u}){return u}codespan({text:u}){return u}del({text:u}){return u}html({text:u}){return u}text({text:u}){return u}link({text:u}){return""+u}image({text:u}){return""+u}br(){return""}checkbox({raw:u}){return u}},El=class mo{options;renderer;textRenderer;constructor(c){this.options=c||xn,this.options.renderer=this.options.renderer||new Qc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ro}static parse(c,o){return new mo(o).parse(c)}static parseInline(c,o){return new mo(o).parseInline(c)}parse(c){this.renderer.parser=this;let o="";for(let r=0;r<c.length;r++){let f=c[r];if(this.options.extensions?.renderers?.[f.type]){let p=f,x=this.options.extensions.renderers[p.type].call({parser:this},p);if(x!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(p.type)){o+=x||"";continue}}let h=f;switch(h.type){case"space":{o+=this.renderer.space(h);break}case"hr":{o+=this.renderer.hr(h);break}case"heading":{o+=this.renderer.heading(h);break}case"code":{o+=this.renderer.code(h);break}case"table":{o+=this.renderer.table(h);break}case"blockquote":{o+=this.renderer.blockquote(h);break}case"list":{o+=this.renderer.list(h);break}case"checkbox":{o+=this.renderer.checkbox(h);break}case"html":{o+=this.renderer.html(h);break}case"def":{o+=this.renderer.def(h);break}case"paragraph":{o+=this.renderer.paragraph(h);break}case"text":{o+=this.renderer.text(h);break}default:{let p='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(p),"";throw new Error(p)}}}return o}parseInline(c,o=this.renderer){this.renderer.parser=this;let r="";for(let f=0;f<c.length;f++){let h=c[f];if(this.options.extensions?.renderers?.[h.type]){let x=this.options.extensions.renderers[h.type].call({parser:this},h);if(x!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(h.type)){r+=x||"";continue}}let p=h;switch(p.type){case"escape":{r+=o.text(p);break}case"html":{r+=o.html(p);break}case"link":{r+=o.link(p);break}case"image":{r+=o.image(p);break}case"checkbox":{r+=o.checkbox(p);break}case"strong":{r+=o.strong(p);break}case"em":{r+=o.em(p);break}case"codespan":{r+=o.codespan(p);break}case"br":{r+=o.br(p);break}case"del":{r+=o.del(p);break}case"text":{r+=o.text(p);break}default:{let x='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(x),"";throw new Error(x)}}}return r}},gi=class{options;block;constructor(u){this.options=u||xn}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(u){return u}postprocess(u){return u}processAllTokens(u){return u}emStrongMask(u){return u}provideLexer(u=this.block){return u?Tl.lex:Tl.lexInline}provideParser(u=this.block){return u?El.parse:El.parseInline}},Ev=class{defaults=So();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=El;Renderer=Qc;TextRenderer=Ro;Lexer=Tl;Tokenizer=Xc;Hooks=gi;constructor(...u){this.use(...u)}walkTokens(u,c){let o=[];for(let r of u)switch(o=o.concat(c.call(this,r)),r.type){case"table":{let f=r;for(let h of f.header)o=o.concat(this.walkTokens(h.tokens,c));for(let h of f.rows)for(let p of h)o=o.concat(this.walkTokens(p.tokens,c));break}case"list":{let f=r;o=o.concat(this.walkTokens(f.items,c));break}default:{let f=r;this.defaults.extensions?.childTokens?.[f.type]?this.defaults.extensions.childTokens[f.type].forEach(h=>{let p=f[h].flat(1/0);o=o.concat(this.walkTokens(p,c))}):f.tokens&&(o=o.concat(this.walkTokens(f.tokens,c)))}}return o}use(...u){let c=this.defaults.extensions||{renderers:{},childTokens:{}};return u.forEach(o=>{let r={...o};if(r.async=this.defaults.async||r.async||!1,o.extensions&&(o.extensions.forEach(f=>{if(!f.name)throw new Error("extension name required");if("renderer"in f){let h=c.renderers[f.name];h?c.renderers[f.name]=function(...p){let x=f.renderer.apply(this,p);return x===!1&&(x=h.apply(this,p)),x}:c.renderers[f.name]=f.renderer}if("tokenizer"in f){if(!f.level||f.level!=="block"&&f.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let h=c[f.level];h?h.unshift(f.tokenizer):c[f.level]=[f.tokenizer],f.start&&(f.level==="block"?c.startBlock?c.startBlock.push(f.start):c.startBlock=[f.start]:f.level==="inline"&&(c.startInline?c.startInline.push(f.start):c.startInline=[f.start]))}"childTokens"in f&&f.childTokens&&(c.childTokens[f.name]=f.childTokens)}),r.extensions=c),o.renderer){let f=this.defaults.renderer||new Qc(this.defaults);for(let h in o.renderer){if(!(h in f))throw new Error(`renderer '${h}' does not exist`);if(["options","parser"].includes(h))continue;let p=h,x=o.renderer[p],y=f[p];f[p]=(...v)=>{let S=x.apply(f,v);return S===!1&&(S=y.apply(f,v)),S||""}}r.renderer=f}if(o.tokenizer){let f=this.defaults.tokenizer||new Xc(this.defaults);for(let h in o.tokenizer){if(!(h in f))throw new Error(`tokenizer '${h}' does not exist`);if(["options","rules","lexer"].includes(h))continue;let p=h,x=o.tokenizer[p],y=f[p];f[p]=(...v)=>{let S=x.apply(f,v);return S===!1&&(S=y.apply(f,v)),S}}r.tokenizer=f}if(o.hooks){let f=this.defaults.hooks||new gi;for(let h in o.hooks){if(!(h in f))throw new Error(`hook '${h}' does not exist`);if(["options","block"].includes(h))continue;let p=h,x=o.hooks[p],y=f[p];gi.passThroughHooks.has(h)?f[p]=v=>{if(this.defaults.async&&gi.passThroughHooksRespectAsync.has(h))return(async()=>{let E=await x.call(f,v);return y.call(f,E)})();let S=x.call(f,v);return y.call(f,S)}:f[p]=(...v)=>{if(this.defaults.async)return(async()=>{let E=await x.apply(f,v);return E===!1&&(E=await y.apply(f,v)),E})();let S=x.apply(f,v);return S===!1&&(S=y.apply(f,v)),S}}r.hooks=f}if(o.walkTokens){let f=this.defaults.walkTokens,h=o.walkTokens;r.walkTokens=function(p){let x=[];return x.push(h.call(this,p)),f&&(x=x.concat(f.call(this,p))),x}}this.defaults={...this.defaults,...r}}),this}setOptions(u){return this.defaults={...this.defaults,...u},this}lexer(u,c){return Tl.lex(u,c??this.defaults)}parser(u,c){return El.parse(u,c??this.defaults)}parseMarkdown(u){return(c,o)=>{let r={...o},f={...this.defaults,...r},h=this.onError(!!f.silent,!!f.async);if(this.defaults.async===!0&&r.async===!1)return h(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof c>"u"||c===null)return h(new Error("marked(): input parameter is undefined or null"));if(typeof c!="string")return h(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(c)+", string expected"));if(f.hooks&&(f.hooks.options=f,f.hooks.block=u),f.async)return(async()=>{let p=f.hooks?await f.hooks.preprocess(c):c,x=await(f.hooks?await f.hooks.provideLexer(u):u?Tl.lex:Tl.lexInline)(p,f),y=f.hooks?await f.hooks.processAllTokens(x):x;f.walkTokens&&await Promise.all(this.walkTokens(y,f.walkTokens));let v=await(f.hooks?await f.hooks.provideParser(u):u?El.parse:El.parseInline)(y,f);return f.hooks?await f.hooks.postprocess(v):v})().catch(h);try{f.hooks&&(c=f.hooks.preprocess(c));let p=(f.hooks?f.hooks.provideLexer(u):u?Tl.lex:Tl.lexInline)(c,f);f.hooks&&(p=f.hooks.processAllTokens(p)),f.walkTokens&&this.walkTokens(p,f.walkTokens);let x=(f.hooks?f.hooks.provideParser(u):u?El.parse:El.parseInline)(p,f);return f.hooks&&(x=f.hooks.postprocess(x)),x}catch(p){return h(p)}}}onError(u,c){return o=>{if(o.message+=`
73
+ Please report this to https://github.com/markedjs/marked.`,u){let r="<p>An error occurred:</p><pre>"+Ll(o.message+"",!0)+"</pre>";return c?Promise.resolve(r):r}if(c)return Promise.reject(o);throw o}}},gn=new Ev;function Oe(u,c){return gn.parse(u,c)}Oe.options=Oe.setOptions=function(u){return gn.setOptions(u),Oe.defaults=gn.defaults,Fm(Oe.defaults),Oe};Oe.getDefaults=So;Oe.defaults=xn;function Av(...u){return gn.use(...u),Oe.defaults=gn.defaults,Fm(Oe.defaults),Oe}Oe.use=Av;Oe.walkTokens=function(u,c){return gn.walkTokens(u,c)};Oe.parseInline=gn.parseInline;Oe.Parser=El;Oe.parser=El.parse;Oe.Renderer=Qc;Oe.TextRenderer=Ro;Oe.Lexer=Tl;Oe.lexer=Tl.lex;Oe.Tokenizer=Xc;Oe.Hooks=gi;Oe.parse=Oe;Oe.options;Oe.setOptions;Oe.walkTokens;Oe.parseInline;El.parse;Tl.lex;function Tm(u,c){(c==null||c>u.length)&&(c=u.length);for(var o=0,r=Array(c);o<c;o++)r[o]=u[o];return r}function _v(u){if(Array.isArray(u))return u}function Rv(u,c){var o=u==null?null:typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(o!=null){var r,f,h,p,x=[],y=!0,v=!1;try{if(h=(o=o.call(u)).next,c!==0)for(;!(y=(r=h.call(o)).done)&&(x.push(r.value),x.length!==c);y=!0);}catch(S){v=!0,f=S}finally{try{if(!y&&o.return!=null&&(p=o.return(),Object(p)!==p))return}finally{if(v)throw f}}return x}}function zv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
74
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cv(u,c){return _v(u)||Rv(u,c)||Ov(u,c)||zv()}function Ov(u,c){if(u){if(typeof u=="string")return Tm(u,c);var o={}.toString.call(u).slice(8,-1);return o==="Object"&&u.constructor&&(o=u.constructor.name),o==="Map"||o==="Set"?Array.from(u):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Tm(u,c):void 0}}const cp=Object.entries,Em=Object.setPrototypeOf,Dv=Object.isFrozen,Mv=Object.getPrototypeOf,Uv=Object.getOwnPropertyDescriptor;let vt=Object.freeze,jt=Object.seal,is=Object.create,up=typeof Reflect<"u"&&Reflect,po=up.apply,go=up.construct;vt||(vt=function(c){return c});jt||(jt=function(c){return c});po||(po=function(c,o){for(var r=arguments.length,f=new Array(r>2?r-2:0),h=2;h<r;h++)f[h-2]=arguments[h];return c.apply(o,f)});go||(go=function(c){for(var o=arguments.length,r=new Array(o>1?o-1:0),f=1;f<o;f++)r[f-1]=arguments[f];return new c(...r)});const hn=ht(Array.prototype.forEach),Lv=ht(Array.prototype.lastIndexOf),Am=ht(Array.prototype.pop),hi=ht(Array.prototype.push),Hv=ht(Array.prototype.splice),cs=Array.isArray,xi=ht(String.prototype.toLowerCase),lo=ht(String.prototype.toString),_m=ht(String.prototype.match),mi=ht(String.prototype.replace),Rm=ht(String.prototype.indexOf),Bv=ht(String.prototype.trim),qv=ht(Number.prototype.toString),Gv=ht(Boolean.prototype.toString),zm=typeof BigInt>"u"?null:ht(BigInt.prototype.toString),Cm=typeof Symbol>"u"?null:ht(Symbol.prototype.toString),Yt=ht(Object.prototype.hasOwnProperty),pi=ht(Object.prototype.toString),Ct=ht(RegExp.prototype.test),dn=Yv(TypeError);function ht(u){return function(c){c instanceof RegExp&&(c.lastIndex=0);for(var o=arguments.length,r=new Array(o>1?o-1:0),f=1;f<o;f++)r[f-1]=arguments[f];return po(u,c,r)}}function Yv(u){return function(){for(var c=arguments.length,o=new Array(c),r=0;r<c;r++)o[r]=arguments[r];return go(u,o)}}function Ce(u,c){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xi;if(Em&&Em(u,null),!cs(c))return u;let r=c.length;for(;r--;){let f=c[r];if(typeof f=="string"){const h=o(f);h!==f&&(Dv(c)||(c[r]=h),f=h)}u[f]=!0}return u}function $v(u){for(let c=0;c<u.length;c++)Yt(u,c)||(u[c]=null);return u}function el(u){const c=is(null);for(const r of cp(u)){var o=Cv(r,2);const f=o[0],h=o[1];Yt(u,f)&&(cs(h)?c[f]=$v(h):h&&typeof h=="object"&&h.constructor===Object?c[f]=el(h):c[f]=h)}return c}function Xv(u){switch(typeof u){case"string":return u;case"number":return qv(u);case"boolean":return Gv(u);case"bigint":return zm?zm(u):"0";case"symbol":return Cm?Cm(u):"Symbol()";case"undefined":return pi(u);case"function":case"object":{if(u===null)return pi(u);const c=u,o=kl(c,"toString");if(typeof o=="function"){const r=o(c);return typeof r=="string"?r:pi(r)}return pi(u)}default:return pi(u)}}function kl(u,c){for(;u!==null;){const r=Uv(u,c);if(r){if(r.get)return ht(r.get);if(typeof r.value=="function")return ht(r.value)}u=Mv(u)}function o(){return null}return o}function Qv(u){try{return Ct(u,""),!0}catch{return!1}}const Om=vt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ao=vt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),no=vt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Zv=vt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),so=vt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Vv=vt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Dm=vt(["#text"]),Mm=vt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),io=vt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Um=vt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Gc=vt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Kv=jt(/{{[\w\W]*|^[\w\W]*}}/g),Jv=jt(/<%[\w\W]*|^[\w\W]*%>/g),Iv=jt(/\${[\w\W]*/g),Fv=jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Wv=jt(/^aria-[\-\w]+$/),Lm=jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Pv=jt(/^(?:\w+script|data):/i),ey=jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ty=jt(/^html$/i),ly=jt(/^[a-z][.\w]*(-[.\w]+)+$/i),Hm=jt(/<[/\w!]/g),Bm=jt(/<[/\w]/g),ay=jt(/<\/no(script|embed|frames)/i),ny=jt(/\/>/i),Pt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},rp=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],sy=vt(Ce({},rp)),iy=(function(){const u={};return hn(rp,c=>{u[c]=jt(new RegExp("</"+c+"(?=[\\t\\n\\f\\r />])","i"))}),vt(u)})(),cy=function(){return typeof window>"u"?null:window},uy=function(c,o){if(typeof c!="object"||typeof c.createPolicy!="function")return null;let r=null;const f="data-tt-policy-suffix";o&&o.hasAttribute(f)&&(r=o.getAttribute(f));const h="dompurify"+(r?"#"+r:"");try{return c.createPolicy(h,{createHTML(p){return p},createScriptURL(p){return p}})}catch{return console.warn("TrustedTypes policy "+h+" could not be created."),null}},qm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},qa=function(c,o,r,f){return Yt(c,o)&&cs(c[o])?Ce(f.base?el(f.base):{},c[o],f.transform):r},co=function(c,o,r){const f=Yt(c,o)?c[o]:void 0;return f&&typeof f=="object"?el(f):r()};function op(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cy();const c=X=>op(X);if(c.version="3.4.14",c.removed=[],!u||!u.document||u.document.nodeType!==Pt.document||!u.Element)return c.isSupported=!1,c;let o=u.document;const r=o,f=r.currentScript;u.DocumentFragment;const h=u.HTMLTemplateElement,p=u.Node,x=u.Element,y=u.NodeFilter,v=u.NamedNodeMap;v===void 0&&(u.NamedNodeMap||u.MozNamedAttrMap),u.HTMLFormElement;const S=u.DOMParser,E=u.trustedTypes,k=x.prototype,L=kl(k,"cloneNode"),Y=kl(k,"remove"),F=kl(k,"nextSibling"),Z=kl(k,"childNodes"),z=kl(k,"parentNode"),de=kl(k,"shadowRoot"),fe=kl(k,"attributes"),te=p&&p.prototype?kl(p.prototype,"nodeType"):null,W=p&&p.prototype?kl(p.prototype,"nodeName"):null,$=p&&p.prototype?kl(p.prototype,"ownerDocument"):null,V=function(g){return te?te(g):g.nodeType},le=function(g){return W?W(g):g.nodeName};if(typeof h=="function"){const X=o.createElement("template");X.content&&X.content.ownerDocument&&(o=X.content.ownerDocument)}let ae,je="",be,P=!1,ve=0;const Je=function(){if(ve>0)throw dn('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},at=function(g){Je(),ve++;try{return ae.createHTML(g)}finally{ve--}},D=function(g){Je(),ve++;try{return ae.createScriptURL(g)}finally{ve--}},K=function(){return P||(be=uy(E,f),P=!0),be},ce=o,_e=ce.implementation,ye=ce.createNodeIterator,N=ce.createDocumentFragment,H=ce.getElementsByTagName,J=r.importNode;let Q=qm();c.isSupported=typeof cp=="function"&&typeof z=="function"&&_e&&_e.createHTMLDocument!==void 0;const he=Kv,pe=Jv,Ee=Iv,mt=Fv,B=Wv,Re=Pv,Ye=ey,We=ly;let tl=Lm,ze=null;const Ya=Ce({},[...Om,...ao,...no,...so,...Dm]);let $e=null;const os=Ce({},[...Mm,...io,...Um,...Gc]);let $t=Object.seal(is(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Hl=null,yn=null;const ll=Object.seal(is(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ji=!0,fs=!0,_t=!1,Ni=!0,xl=!1,Al=!0,al=!1,ds=!1,$a=null,bn=null,hs=!1,nl=!1,yt=!1,Xt=!1,Rt=!0,Si=!1;const wi="user-content-";let ms=!0,ca=!1,vl={},yl=null;const _l=Ce({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Xa=null;const ua=Ce({},["audio","video","img","source","image","track"]);let ki=null;const ps=Ce({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ra="http://www.w3.org/1998/Math/MathML",Rl="http://www.w3.org/2000/svg",sl="http://www.w3.org/1999/xhtml";let Bl=sl,jn=!1,Nn=null;const gs=Ce({},[ra,Rl,sl],lo),Sn=vt(["mi","mo","mn","ms","mtext"]);let wn=Ce({},Sn);const xs=vt(["annotation-xml"]);let il=Ce({},xs);const pt=Ce({},["title","style","font","a","script"]);let it=null;const oa=["application/xhtml+xml","text/html"],vs="text/html";let et=null,fa=null;const Ti=o.createElement("form"),da=function(g){return g instanceof RegExp||g instanceof Function},Qa=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(fa&&fa===g)return;(!g||typeof g!="object")&&(g={}),g=el(g),it=oa.indexOf(g.PARSER_MEDIA_TYPE)===-1?vs:g.PARSER_MEDIA_TYPE,et=it==="application/xhtml+xml"?lo:xi,ze=qa(g,"ALLOWED_TAGS",Ya,{transform:et}),$e=qa(g,"ALLOWED_ATTR",os,{transform:et}),Nn=qa(g,"ALLOWED_NAMESPACES",gs,{transform:lo}),ki=qa(g,"ADD_URI_SAFE_ATTR",ps,{transform:et,base:ps}),Xa=qa(g,"ADD_DATA_URI_TAGS",ua,{transform:et,base:ua}),yl=qa(g,"FORBID_CONTENTS",_l,{transform:et}),Hl=qa(g,"FORBID_TAGS",el({}),{transform:et}),yn=qa(g,"FORBID_ATTR",el({}),{transform:et}),vl=Yt(g,"USE_PROFILES")?g.USE_PROFILES&&typeof g.USE_PROFILES=="object"?el(g.USE_PROFILES):g.USE_PROFILES:!1,ji=g.ALLOW_ARIA_ATTR!==!1,fs=g.ALLOW_DATA_ATTR!==!1,_t=g.ALLOW_UNKNOWN_PROTOCOLS||!1,Ni=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,xl=g.SAFE_FOR_TEMPLATES||!1,Al=g.SAFE_FOR_XML!==!1,al=g.WHOLE_DOCUMENT||!1,nl=g.RETURN_DOM||!1,yt=g.RETURN_DOM_FRAGMENT||!1,Xt=g.RETURN_TRUSTED_TYPE||!1,hs=g.FORCE_BODY||!1,Rt=g.SANITIZE_DOM!==!1,Si=g.SANITIZE_NAMED_PROPS||!1,ms=g.KEEP_CONTENT!==!1,ca=g.IN_PLACE||!1,tl=Qv(g.ALLOWED_URI_REGEXP)?g.ALLOWED_URI_REGEXP:Lm,Bl=typeof g.NAMESPACE=="string"?g.NAMESPACE:sl,wn=co(g,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ce({},Sn)),il=co(g,"HTML_INTEGRATION_POINTS",()=>Ce({},xs));const w=co(g,"CUSTOM_ELEMENT_HANDLING",()=>is(null));if($t=is(null),Yt(w,"tagNameCheck")&&da(w.tagNameCheck)&&($t.tagNameCheck=w.tagNameCheck),Yt(w,"attributeNameCheck")&&da(w.attributeNameCheck)&&($t.attributeNameCheck=w.attributeNameCheck),Yt(w,"allowCustomizedBuiltInElements")&&typeof w.allowCustomizedBuiltInElements=="boolean"&&($t.allowCustomizedBuiltInElements=w.allowCustomizedBuiltInElements),jt($t),xl&&(fs=!1),yt&&(nl=!0),vl&&(ze=Ce({},Dm),$e=is(null),vl.html===!0&&(Ce(ze,Om),Ce($e,Mm)),vl.svg===!0&&(Ce(ze,ao),Ce($e,io),Ce($e,Gc)),vl.svgFilters===!0&&(Ce(ze,no),Ce($e,io),Ce($e,Gc)),vl.mathMl===!0&&(Ce(ze,so),Ce($e,Um),Ce($e,Gc))),ll.tagCheck=null,ll.attributeCheck=null,Yt(g,"ADD_TAGS")&&(typeof g.ADD_TAGS=="function"?ll.tagCheck=g.ADD_TAGS:cs(g.ADD_TAGS)&&(ze===Ya&&(ze=el(ze)),Ce(ze,g.ADD_TAGS,et))),Yt(g,"ADD_ATTR")&&(typeof g.ADD_ATTR=="function"?ll.attributeCheck=g.ADD_ATTR:cs(g.ADD_ATTR)&&($e===os&&($e=el($e)),Ce($e,g.ADD_ATTR,et))),Yt(g,"ADD_FORBID_CONTENTS")&&cs(g.ADD_FORBID_CONTENTS)&&(yl===_l&&(yl=el(yl)),Ce(yl,g.ADD_FORBID_CONTENTS,et)),ms&&(ze["#text"]=!0),al&&Ce(ze,["html","head","body"]),ze.table&&(Ce(ze,["tbody"]),delete Hl.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw dn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw dn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const G=ae;ae=g.TRUSTED_TYPES_POLICY;try{je=at("")}catch(ee){throw ae=G,ee}}else g.TRUSTED_TYPES_POLICY===null?(ae=void 0,je=""):(ae===void 0&&(ae=K()),ae&&typeof je=="string"&&(je=at("")));vt&&vt(g),fa=g},ql=Ce({},[...ao,...no,...Zv]),Gl=Ce({},[...so,...Vv]),Za=function(g,w,G){return w.namespaceURI===sl?g==="svg":w.namespaceURI===ra?g==="svg"&&(G==="annotation-xml"||wn[G]):!!ql[g]},ha=function(g,w,G){return w.namespaceURI===sl?g==="math":w.namespaceURI===Rl?g==="math"&&il[G]:!!Gl[g]},ct=function(g,w,G){return w.namespaceURI===Rl&&!il[G]||w.namespaceURI===ra&&!wn[G]?!1:!Gl[g]&&(pt[g]||!ql[g])},Ei=function(g){let w=z(g);(!w||!w.tagName)&&(w={namespaceURI:Bl,tagName:"template"});const G=xi(g.tagName),ee=xi(w.tagName);return Nn[g.namespaceURI]?g.namespaceURI===Rl?Za(G,w,ee):g.namespaceURI===ra?ha(G,w,ee):g.namespaceURI===sl?ct(G,w,ee):!!(it==="application/xhtml+xml"&&Nn[g.namespaceURI]):!1},bl=function(g){hi(c.removed,{element:g});try{z(g).removeChild(g)}catch{if(Y(g),!z(g))throw dn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},zl=function(g,w,G){try{g.removeAttributeNode(w)}catch{try{g.removeAttribute(G)}catch{}}},jl=function(g){Va(g);const w=Z(g);if(w){const ee=[];hn(w,ne=>{hi(ee,ne)}),hn(ee,ne=>{try{Y(ne)}catch{}})}const G=fe(g);if(G)for(let ee=G.length-1;ee>=0;--ee){const ne=G[ee],re=ne&&ne.name;typeof re=="string"&&zl(g,ne,re)}},Yl=function(g,w,G){if(!G)try{G=w.getAttributeNode(g)}catch{G=null}hi(c.removed,{attribute:G||null,from:w});try{G?w.removeAttributeNode(G):w.removeAttribute(g)}catch{try{w.removeAttribute(g)}catch{}}if(g==="is")if(nl||yt)try{bl(w)}catch{}else try{w.setAttribute(g,"")}catch{}},Ai=function(g){const w=fe(g);if(w)for(let G=w.length-1;G>=0;--G){const ee=w[G],ne=ee&&ee.name;typeof ne!="string"||$e[et(ne)]||zl(g,ee,ne)}},Va=function(g){const w=[g];for(;w.length>0;){const G=w.pop();V(G)===Pt.element&&Ai(G);const ne=Z(G);if(ne)for(let re=ne.length-1;re>=0;--re)w.push(ne[re])}},_i=function(g,w){return Al?g==="patchsrc"?!0:g==="for"&&w!=="label"&&w!=="output":!1},kn=function(g){if(!Al)return;const w=[g];for(;w.length>0;){const G=w.pop(),ee=V(G);if(ee===Pt.processingInstruction||ee===Pt.comment&&Ct(Bm,G.data)){try{Y(G)}catch{}continue}if(ee===Pt.element){const re=G,He=et(le(G));try{re.hasAttribute&&re.hasAttribute("patchsrc")&&re.removeAttribute("patchsrc"),re.hasAttribute&&re.hasAttribute("for")&&_i("for",He)&&re.removeAttribute("for")}catch{}}const ne=Z(G);if(ne)for(let re=ne.length-1;re>=0;--re)w.push(ne[re])}},Ka=function(g){let w=null,G=null;if(hs)g="<remove></remove>"+g;else{const re=_m(g,/^[\r\n\t ]+/);G=re&&re[0]}it==="application/xhtml+xml"&&Bl===sl&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");const ee=ae?at(g):g;if(Bl===sl)try{w=new S().parseFromString(ee,it)}catch{}if(!w||!w.documentElement){w=_e.createDocument(Bl,"template",null);try{w.documentElement.innerHTML=jn?je:ee}catch{}}const ne=w.body||w.documentElement;return g&&G&&ne.insertBefore(o.createTextNode(G),ne.childNodes[0]||null),Bl===sl?H.call(w,al?"html":"body")[0]:al?w.documentElement:ne},cl=function(g){const w=$?$(g):g.ownerDocument;return ye.call(w||g,g,y.SHOW_ELEMENT|y.SHOW_COMMENT|y.SHOW_TEXT|y.SHOW_PROCESSING_INSTRUCTION|y.SHOW_CDATA_SECTION,null)},Nt=function(g){return g=mi(g,he," "),g=mi(g,pe," "),g=mi(g,Ee," "),g},Tn=function(g){var w;g.normalize();const G=$?$(g):g.ownerDocument,ee=ye.call(G||g,g,y.SHOW_TEXT|y.SHOW_COMMENT|y.SHOW_CDATA_SECTION|y.SHOW_PROCESSING_INSTRUCTION,null);let ne=ee.nextNode();for(;ne;)ne.data=Nt(ne.data),ne=ee.nextNode();const re=(w=g.querySelectorAll)===null||w===void 0?void 0:w.call(g,"template");re&&hn(re,He=>{Cl(He.content)&&Tn(He.content)})},En=function(g){const w=W?W(g):null;return typeof w!="string"||et(w)!=="form"?!1:typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||g.attributes!==fe(g)||typeof g.removeAttribute!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function"||g.nodeType!==te(g)||g.childNodes!==Z(g)},Cl=function(g){if(!te||typeof g!="object"||g===null)return!1;try{return te(g)===Pt.documentFragment}catch{return!1}},ma=function(g){if(!te||typeof g!="object"||g===null)return!1;try{return typeof te(g)=="number"}catch{return!1}};function Dt(X,g,w){X.length!==0&&hn(X,G=>{G.call(c,g,w,fa)})}const Jc=function(g,w){return!!(Al&&g.hasChildNodes()&&!ma(g.firstElementChild)&&Ct(Hm,g.textContent)&&Ct(Hm,g.innerHTML)||Al&&g.namespaceURI===sl&&sy[w]&&(ma(g.firstElementChild)||typeof g.textContent=="string"&&Ct(iy[w],g.textContent))||g.nodeType===Pt.processingInstruction||Al&&g.nodeType===Pt.comment&&Ct(Bm,g.data))},St=function(g,w){if(g instanceof RegExp)return Ct(g,w);if(g instanceof Function){for(var G=arguments.length,ee=new Array(G>2?G-2:0),ne=2;ne<G;ne++)ee[ne-2]=arguments[ne];return!!g(w,...ee)}return!1},ys=function(g,w,G){if(!Hl[w]&&Xl(w)&&St($t.tagNameCheck,w))return!1;if(ms&&!yl[w]){const ee=z(g),ne=Z(g);if(ne&&ee){const re=ne.length;for(let He=re-1;He>=0;--He){const Ve=g===G?L(ne[He],!0):ne[He];ee.insertBefore(Ve,F(g))}}}return bl(g),!0},bs=function(g,w,G,ee){return g.length===0?w:w===G||w===ee?el(w):w},An=function(g,w){return g===w||z(g)!==null?!1:(ca&&Va(g),!0)},$l=function(g,w){if(Dt(Q.beforeSanitizeElements,g,null),An(g,w))return!0;if(En(g))return bl(g),!0;const G=et(le(g));if(ze=bs(Q.uponSanitizeElement,ze,Ya,$a),Dt(Q.uponSanitizeElement,g,{tagName:G,allowedTags:ze}),An(g,w))return!0;if(Jc(g,G))return bl(g),!0;if(Hl[G]||!(ll.tagCheck instanceof Function&&ll.tagCheck(G))&&!ze[G]){const ne=ys(g,G,w);return ne===!1&&Dt(Q.afterSanitizeElements,g,null),ne}if(V(g)===Pt.element&&!Ei(g)||(G==="noscript"||G==="noembed"||G==="noframes")&&Ct(ay,g.innerHTML))return bl(g),!0;if(xl&&g.nodeType===Pt.text){const ne=Nt(g.textContent);g.textContent!==ne&&(hi(c.removed,{element:g.cloneNode()}),g.textContent=ne)}return Dt(Q.afterSanitizeElements,g,null),!1},js=function(g,w,G){if(yn[w]||_i(w,g)||Rt&&(w==="id"||w==="name")&&(G in o||G in Ti))return!1;const ee=$e[w]||ll.attributeCheck instanceof Function&&ll.attributeCheck(w,g);return fs&&Ct(mt,w)||ji&&Ct(B,w)?!0:ee?ki[w]||Ct(tl,mi(G,Ye,""))||(w==="src"||w==="xlink:href"||w==="href")&&g!=="script"&&Rm(G,"data:")===0&&Xa[g]||_t&&!Ct(Re,mi(G,Ye,""))?!0:!G:Xl(g)&&St($t.tagNameCheck,g)&&St($t.attributeNameCheck,w,g)||w==="is"&&$t.allowCustomizedBuiltInElements&&St($t.tagNameCheck,G)},Ri=Ce({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Xl=function(g){return!Ri[xi(g)]&&Ct(We,g)},Ic=function(g,w,G,ee){if(ae&&typeof E=="object"&&typeof E.getAttributeType=="function"&&!G)switch(E.getAttributeType(g,w)){case"TrustedHTML":return at(ee);case"TrustedScriptURL":return D(ee)}return ee},zi=function(g,w,G,ee){try{G?g.setAttributeNS(G,w,ee):g.setAttribute(w,ee),En(g)?bl(g):Am(c.removed)}catch{Yl(w,g)}},Ns=function(g){Dt(Q.beforeSanitizeAttributes,g,null);const w=g.attributes;if(!w||En(g))return;$e=bs(Q.uponSanitizeAttribute,$e,os,bn);const G={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$e,forceKeepAttr:void 0};let ee=w.length;const ne=et(g.nodeName);for(;ee--;){const re=w[ee],He=re.name,Ve=re.namespaceURI,wt=re.value,ut=et(He),Qt=wt;let gt=He==="value"?Qt:Bv(Qt);if(G.attrName=ut,G.attrValue=gt,G.keepAttr=!0,G.forceKeepAttr=void 0,Dt(Q.uponSanitizeAttribute,g,G),gt=G.attrValue,Si&&(ut==="id"||ut==="name")&&Rm(gt,wi)!==0&&(Yl(He,g,re),gt=wi+gt),Al&&Ct(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,gt)){Yl(He,g,re);continue}if(ut==="attributename"&&_m(gt,"href")){Yl(He,g,re);continue}if(!G.forceKeepAttr){if(!G.keepAttr){Yl(He,g,re);continue}if(!Ni&&Ct(ny,gt)){Yl(He,g,re);continue}if(xl&&(gt=Nt(gt)),!js(ne,ut,gt)){Yl(He,g,re);continue}gt=Ic(ne,ut,Ve,gt),gt!==Qt&&zi(g,He,Ve,gt)}}Dt(Q.afterSanitizeAttributes,g,null)},pa=function(g){let w=null;const G=cl(g);for(Dt(Q.beforeSanitizeShadowDOM,g,null);w=G.nextNode();)if(Dt(Q.uponSanitizeShadowNode,w,null),$l(w,g),Ns(w),Cl(w.content)&&pa(w.content),V(w)===Pt.element){const ee=de(w);Cl(ee)&&(Ss(ee),pa(ee))}Dt(Q.afterSanitizeShadowDOM,g,null)},Ss=function(g){const w=[{node:g,shadow:null}];for(;w.length>0;){const G=w.pop();if(G.shadow){pa(G.shadow);continue}const ee=G.node,re=V(ee)===Pt.element,He=Z(ee);if(He)for(let Ve=He.length-1;Ve>=0;--Ve)w.push({node:He[Ve],shadow:null});if(re){const Ve=W?W(ee):null;if(typeof Ve=="string"&&et(Ve)==="template"){const wt=ee.content;Cl(wt)&&w.push({node:wt,shadow:null})}}if(re){const Ve=de(ee);Cl(Ve)&&w.push({node:null,shadow:Ve},{node:Ve,shadow:null})}}};return c.sanitize=function(X){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=null,G=null,ee=null,ne=null;if(jn=!X,jn&&(X="<!-->"),typeof X!="string"&&!ma(X)&&(X=Xv(X),typeof X!="string"))throw dn("dirty is not a string, aborting");if(!c.isSupported)return X;ds?(ze=$a,$e=bn):Qa(g),(Q.uponSanitizeElement.length>0||Q.uponSanitizeAttribute.length>0)&&(ze=el(ze)),Q.uponSanitizeAttribute.length>0&&($e=el($e)),c.removed=[];const re=ca&&typeof X!="string"&&ma(X);if(re){kn(X);const wt=le(X);if(typeof wt=="string"){const ut=et(wt);if(!ze[ut]||Hl[ut])throw jl(X),dn("root node is forbidden and cannot be sanitized in-place")}if(En(X))throw jl(X),dn("root node is clobbered and cannot be sanitized in-place");try{Ss(X)}catch(ut){throw jl(X),ut}}else if(ma(X))w=Ka("<!---->"),G=w.ownerDocument.importNode(X,!0),G.nodeType===Pt.element&&G.nodeName==="BODY"||G.nodeName==="HTML"?w=G:w.appendChild(G),Ss(G);else{if(!nl&&!xl&&!al&&X.indexOf("<")===-1)return ae&&Xt?at(X):X;if(w=Ka(X),!w)return nl?null:Xt?je:""}w&&hs&&bl(w.firstChild);const He=re?X:w;try{const wt=cl(He);for(;ee=wt.nextNode();)$l(ee,He),Ns(ee),Cl(ee.content)&&pa(ee.content)}catch(wt){throw re&&(jl(X),hn(c.removed,ut=>{ut.element&&Va(ut.element)})),wt}if(re)return hn(c.removed,wt=>{wt.element&&Va(wt.element)}),xl&&Tn(X),X;if(nl){if(xl&&Tn(w),yt)for(ne=N.call(w.ownerDocument);w.firstChild;)ne.appendChild(w.firstChild);else ne=w;return($e.shadowroot||$e.shadowrootmode)&&(ne=J.call(r,ne,!0)),ne}let Ve=al?w.outerHTML:w.innerHTML;return al&&ze["!doctype"]&&w.ownerDocument&&w.ownerDocument.doctype&&w.ownerDocument.doctype.name&&Ct(ty,w.ownerDocument.doctype.name)&&(Ve="<!DOCTYPE "+w.ownerDocument.doctype.name+`>
75
+ `+Ve),xl&&(Ve=Nt(Ve)),ae&&Xt?at(Ve):Ve},c.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Qa(X),ds=!0,$a=ze,bn=$e},c.clearConfig=function(){fa=null,ds=!1,$a=null,bn=null,ae=be,je=""},c.isValidAttribute=function(X,g,w){fa||Qa({});const G=et(X),ee=et(g);return js(G,ee,w)},c.addHook=function(X,g){typeof g=="function"&&Yt(Q,X)&&hi(Q[X],g)},c.removeHook=function(X,g){if(Yt(Q,X)){if(g!==void 0){const w=Lv(Q[X],g);return w===-1?void 0:Hv(Q[X],w,1)[0]}return Am(Q[X])}},c.removeHooks=function(X){Yt(Q,X)&&(Q[X]=[])},c.removeAllHooks=function(){Q=qm()},c}var rs=op();const ry=[{id:"claude",label:"claude",hint:"Claude Code via ACP"},{id:"codex",label:"codex",hint:"Codex (ChatGPT) via ACP"},{id:"pi",label:"pi",hint:"pi coding agent"}];async function vn(u,c){const r=await(await fetch("/api/chats",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agent:u,scope:c})})).json();r.id&&gl(r.scope?.kind==="team"?`/agents/${encodeURIComponent(r.scope.member)}/chat/${r.id}`:`/agents/chats/${r.id}`)}function oy(){const[u,c]=C.useState("claude"),[o,r]=C.useState(!0),[f,h]=C.useState(!1);return n.jsxs("div",{className:"new-chat",children:[n.jsx("div",{className:"page-head",children:n.jsx("h1",{children:"new chat"})}),n.jsxs("section",{className:"panel new-chat-panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"agent"})}),n.jsx("div",{className:"agent-pick",children:ry.map(p=>n.jsxs("button",{className:`agent-pick-btn ${u===p.id?"active":""}`,onClick:()=>c(p.id),children:[n.jsx("b",{children:p.label}),n.jsx("span",{children:p.hint})]},p.id))}),n.jsx("div",{className:"run-opts",style:{padding:"0 16px 14px"},children:n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:o,onChange:p=>r(p.target.checked)}),"kraftwerk-aware",n.jsx("span",{className:"opt-hint",children:"— agent gets workflows + recent runs as context"})]})}),n.jsx("div",{style:{padding:"0 16px 16px"},children:n.jsx("button",{className:"run-btn",disabled:f,onClick:async()=>{h(!0),await vn(u,{kind:o?"kraftwerk":"general"}),h(!1)},children:f?"starting…":"start chat"})})]})]})}function Gm({id:u,agentName:c}){const[o,r]=C.useState(null),[f,h]=C.useState([]),[p,x]=C.useState(!1);C.useEffect(()=>{let S=!0,E=null;return fetch(`/api/chats/${u}`).then(k=>k.ok?k.json():Promise.reject()).then(k=>{if(!S)return;r(k.meta),h(k.events);const L=k.events[k.events.length-1]?.seq??0;E=new EventSource(`/api/chats/${u}/events?after=${L}`),E.onmessage=Y=>{const F=JSON.parse(Y.data);h(Z=>Z.some(z=>z.seq===F.seq)?Z:[...Z,F])}}).catch(()=>S&&x(!0)),()=>{S=!1,E?.close()}},[u]);const y=C.useMemo(()=>{for(let S=f.length-1;S>=0;S--){const E=f[S].type;if(E==="user_message")return!0;if(E==="turn_end"||E==="error")return!1}return!1},[f]),v=C.useMemo(()=>{if(o?.title)return o.title;const S=f.find(E=>E.type==="user_message");return S&&S.type==="user_message"?S.text.replace(/\s+/g," ").trim().slice(0,80):""},[o,f]);return C.useEffect(()=>{if(!o)return;const S=c??(o.scope.kind==="team"?o.scope.member:o.agent);return vm([v||"new chat",S].filter(Boolean).join(" · ")),()=>vm("")},[o,v,c]),p?n.jsx("div",{className:"empty",children:"chat not found"}):o?n.jsxs("div",{className:"chat-thread",children:[n.jsxs("div",{className:"detail-head",children:[n.jsx("span",{className:`lamp ${y?"running":"ok"}`}),n.jsx("h1",{children:v||"new chat"}),n.jsx("span",{className:"chip agent",children:o.agent}),o.scope.kind==="run"&&n.jsx(Ue,{href:`/runs/${o.scope.runId}`,className:"chip",children:o.scope.runId}),o.scope.kind==="kraftwerk"&&n.jsx("span",{className:"chip",children:"kraftwerk-aware"}),o.scope.kind==="knowledge"&&n.jsxs(Ue,{href:o.scope.bundle?`/knowledge/${encodeURIComponent(o.scope.bundle)}`:"/knowledge",className:"chip",children:["knowledge",o.scope.bundle?`:${o.scope.bundle}`:""]}),o.scope.kind==="team"&&n.jsxs(Ue,{href:`/agents/${encodeURIComponent(o.scope.member)}/info`,className:"chip",children:["agent:",o.scope.member]}),n.jsx("span",{className:"rid",title:o.cwd,children:o.cwd})]}),n.jsx(dy,{id:u,events:f,busy:y}),n.jsx(gy,{id:u,busy:y,scope:o.scope})]}):n.jsx("div",{className:"empty",children:"loading…"})}function fy(u){const c=[],o=new Map,r=new Map;for(const f of u){const h=c[c.length-1];switch(f.type){case"user_message":c.push({kind:"user",text:f.text,key:`e${f.seq}`});break;case"text":h?.kind==="agent"?h.text+=f.text:c.push({kind:"agent",text:f.text,key:`e${f.seq}`});break;case"thought":h?.kind==="thought"?h.text+=f.text:c.push({kind:"thought",text:f.text,key:`e${f.seq}`});break;case"tool_call":o.set(f.callId,c.length),c.push({kind:"tool",callId:f.callId,title:f.title,toolKind:f.kind,status:f.status,key:`e${f.seq}`});break;case"tool_update":{const p=o.get(f.callId);if(p!=null){const x=c[p];f.title&&(x.title=f.title),f.status&&(x.status=f.status)}break}case"permission_request":r.set(f.requestId,c.length),c.push({kind:"permission",requestId:f.requestId,title:f.title,options:f.options,resolved:void 0,key:`e${f.seq}`});break;case"permission_resolved":{const p=r.get(f.requestId);p!=null&&(c[p].resolved=f.optionId);break}case"error":c.push({kind:"error",text:f.message,key:`e${f.seq}`});break}}return c}function dy({id:u,events:c,busy:o}){const r=Ga(),f=C.useMemo(()=>{const x=fy(c);return r?x:x.filter(y=>y.kind!=="tool"&&y.kind!=="thought")},[c,r]),h=C.useRef(null),p=C.useRef(!0);return C.useEffect(()=>{const x=h.current;x&&p.current&&(x.scrollTop=x.scrollHeight)},[f,o]),n.jsxs("div",{className:"chat-scroll",ref:h,onScroll:x=>{const y=x.currentTarget;p.current=y.scrollHeight-y.scrollTop-y.clientHeight<60},children:[f.length===0&&n.jsx("div",{className:"empty",children:"say something — the agent starts on your first message"}),f.map(x=>n.jsx(my,{b:x,chatId:u},x.key)),o&&n.jsxs("div",{className:"chat-working",children:[n.jsx("span",{className:"lamp running"})," working…"]})]})}function hy({text:u}){const c=C.useMemo(()=>rs.sanitize(Oe.parse(u,{async:!1})),[u]);return n.jsx("div",{className:"msg agent md-body chat-md",dangerouslySetInnerHTML:{__html:c}})}function my({b:u,chatId:c}){switch(u.kind){case"user":return n.jsx("div",{className:"msg user",children:u.text});case"agent":return n.jsx(hy,{text:u.text});case"thought":return n.jsxs("details",{className:"msg thought",children:[n.jsx("summary",{children:"thinking"}),n.jsx("div",{children:u.text})]});case"tool":return n.jsxs("div",{className:`tool-card ${u.status??""}`,children:[n.jsx("span",{className:`lamp ${u.status==="completed"?"ok":u.status==="failed"?"failed":"running"}`}),u.toolKind&&n.jsx("span",{className:"chip tool-kind",children:u.toolKind}),n.jsx("span",{className:"tool-title",children:u.title})]});case"permission":return n.jsx(py,{b:u,chatId:c});case"error":return n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",u.text]})}}function py({b:u,chatId:c}){const[o,r]=C.useState(!1),f=u.resolved===void 0;async function h(p){r(!0),await fetch(`/api/chats/${c}/permission`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({requestId:u.requestId,optionId:p})}).catch(()=>{}),r(!1)}return n.jsxs("div",{className:`perm-card ${f?"pending":""}`,children:[n.jsxs("div",{className:"perm-title",children:[n.jsx("span",{className:"microlabel",children:"permission"})," ",u.title]}),f?n.jsx("div",{className:"perm-actions",children:u.options.map(p=>n.jsx("button",{className:`perm-btn ${p.kind?.startsWith("allow")?"allow":"deny"}`,disabled:o,onClick:()=>h(p.optionId),children:p.name},p.optionId))}):n.jsx("div",{className:"perm-resolved",children:u.resolved?`→ ${u.options.find(p=>p.optionId===u.resolved)?.name??u.resolved}`:"→ dismissed"})]})}function gy({id:u,busy:c,scope:o}){const[r,f]=C.useState(""),[h,p]=C.useState([]),[x,y]=C.useState(0),[v,S]=C.useState(!1);C.useEffect(()=>{let z=!0;return(async()=>{try{let fe=(await fetch("/api/skills").then(te=>te.json())).skills??[];if(o?.kind==="team"){const[te,W]=await Promise.all([fetch(`/api/team/${encodeURIComponent(o.member)}`).then(le=>le.ok?le.json():null).catch(()=>null),fetch(`/api/team/${encodeURIComponent(o.member)}/skills`).then(le=>le.ok?le.json():null).catch(()=>null)]);if(te&&Array.isArray(te.skills)){const le=new Set(te.skills.map(ae=>ae.toLowerCase()));fe=fe.filter(ae=>le.has(ae.name.toLowerCase()))}const $=W?.skills??[],V=new Set($.map(le=>le.name.toLowerCase()));fe=[...$,...fe.filter(le=>!V.has(le.name.toLowerCase()))]}z&&p(fe)}catch{}})(),()=>{z=!1}},[u]);const E=/^\/([\w-]*)$/.exec(r)?.[1],k=E!==void 0&&!v?h.filter(z=>z.name.toLowerCase().startsWith(E.toLowerCase())):[],L=k.length>0,Y=Math.min(x,k.length-1);function F(z){f(`/${z.name} `),y(0)}async function Z(){const z=r.trim();!z||c||(f(""),await fetch(`/api/chats/${u}/message`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:z})}).catch(()=>{}))}return n.jsxs("div",{className:"composer",children:[L&&n.jsx("div",{className:"skill-menu",children:k.map((z,de)=>n.jsxs("button",{className:de===Y?"active":"",onMouseDown:fe=>{fe.preventDefault(),F(z)},children:[n.jsxs("b",{children:["/",z.name]}),z.description&&n.jsxs("span",{children:[" — ",z.description]}),n.jsx("span",{className:"skill-src",children:z.source})]},z.name))}),n.jsx("textarea",{value:r,placeholder:c?"agent is working…":"message · Enter to send, Shift+Enter for newline, / for skills",rows:Math.min(6,Math.max(1,r.split(`
76
+ `).length)),onChange:z=>{f(z.target.value),y(0),S(!1)},onKeyDown:z=>{if(L){if(z.key==="ArrowDown")return z.preventDefault(),y((Y+1)%k.length);if(z.key==="ArrowUp")return z.preventDefault(),y((Y-1+k.length)%k.length);if(z.key==="Tab"||z.key==="Enter")return z.preventDefault(),F(k[Y]);if(z.key==="Escape")return z.preventDefault(),S(!0)}z.key==="Enter"&&!z.shiftKey&&(z.preventDefault(),Z())}}),c?n.jsxs("button",{className:"stop-btn",onClick:()=>fetch(`/api/chats/${u}/cancel`,{method:"POST"}).catch(()=>{}),children:[n.jsx(I,{name:"stop",className:"ms-sm"})," stop"]}):n.jsxs("button",{className:"run-btn",disabled:!r.trim(),onClick:Z,children:[n.jsx(I,{name:"send",className:"ms-sm"})," send"]})]})}function xy({id:u}){const c=Ge("/api/runs",!0),o=c?.runs??[];return n.jsxs("div",{className:"runs-screen",children:[n.jsxs("aside",{className:"runs-side",children:[n.jsxs("div",{className:"side-head",children:[n.jsx("span",{className:"microlabel",children:"runs"}),n.jsx("span",{className:"spacer"}),n.jsx("span",{className:"microlabel num",children:o.length})]}),n.jsxs("div",{className:"side-list",children:[o.map(r=>n.jsx(vy,{r,active:r.id===u},r.id)),c&&o.length===0&&n.jsx("div",{className:"viewer-note",children:"no runs yet"})]})]}),n.jsx("div",{className:"runs-main",children:n.jsx(yy,{id:u},u)})]})}function vy({r:u,active:c}){return n.jsxs(Ue,{href:`/runs/${u.id}`,className:`side-row ${c?"active":""}`,children:[n.jsx(Vc,{status:u.status}),n.jsxs("div",{className:"side-row-body",children:[n.jsxs("div",{className:"side-row-top",children:[n.jsx("span",{className:"side-wf",children:u.workflow??"unknown"}),n.jsx("span",{className:"side-when num",children:pn(u.startedAt)})]}),n.jsxs("div",{className:"side-row-sub",children:[n.jsx("span",{className:"side-req",title:u.request,children:u.status==="running"&&u.currentPhase?`${u.currentPhase}`:u.request??""}),n.jsx("span",{className:"side-meta num",children:u.status==="running"?n.jsx(No,{since:u.startedAt}):vi(u.durationMs)})]})]})]})}function yy({id:u}){const c=Ge(`/api/runs/${u}`,!0),o=c?.status==="running",[r,f]=C.useState(null),[h,p]=C.useState(!1),x=Ga();if(!c)return n.jsx("div",{className:"empty",children:"loading…"});const y=c.files.some(k=>k.name==="runner.json"),v=r??(o?"run":"artifacts"),S=x?c.files.length:c.files.filter(k=>!Zc(k.name)).length;async function E(){p(!0),await fetch(`/api/runs/${u}/stop`,{method:"POST"}).catch(()=>{})}return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"detail-head",children:[n.jsx(Vc,{status:c.status}),n.jsx("h1",{children:c.workflow?n.jsx(Ue,{href:`/workflows/${encodeURIComponent(c.workflow)}`,title:"open workflow",children:c.workflow}):"unknown workflow"}),n.jsx(zx,{status:c.status}),y&&n.jsxs("span",{className:"chip sandbox-chip",children:[n.jsx(I,{name:"science",className:"ms-sm"})," sandbox"]}),n.jsx("span",{className:"rid",children:u.replace(/^run-/,"")}),o&&y&&n.jsx("button",{className:"stop-btn",onClick:E,disabled:h,children:h?"stopping…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"stop",className:"ms-sm"})," stop"]})}),n.jsx("span",{className:"spacer"}),n.jsx("button",{className:"open-raw",title:"chat with an agent about this run",onClick:()=>{vn("claude",{kind:"run",runId:u})},children:"⌬ discuss"}),n.jsxs("nav",{className:"tabs",children:[n.jsx("button",{className:v==="run"?"active":"",onClick:()=>f("run"),children:"run"}),n.jsxs("button",{className:v==="artifacts"?"active":"",onClick:()=>f("artifacts"),children:["artifacts ",n.jsxs("span",{className:"num",children:["(",S,")"]})]})]})]}),c.request&&n.jsx("p",{className:"detail-req",children:c.request}),v==="run"?n.jsx(by,{run:c,live:o}):n.jsx(wy,{id:u,files:c.files,live:o})]})}function by({run:u,live:c}){return n.jsxs("div",{className:"run-tab",children:[n.jsxs("div",{className:"statgrid",children:[n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"phases"}),n.jsxs("div",{className:"v num",children:[u.phasesDone,u.phasesTotal!=null?` / ${u.phasesTotal}`:""]})]}),n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"duration"}),n.jsx("div",{className:"v num",children:c?n.jsx(No,{since:u.startedAt}):vi(u.durationMs)})]}),n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"cost"}),n.jsx("div",{className:"v num",children:bo(u.costUsd??jy(u.phases))})]}),n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"tokens in / out"}),n.jsxs("div",{className:"v num",children:[Yc(Ym(u.phases,"tokensIn"))," / ",Yc(Ym(u.phases,"tokensOut"))]})]})]}),n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"phase timeline"}),n.jsx("span",{className:"spacer"}),c&&n.jsxs("span",{className:"live-note",children:[n.jsx("span",{className:"lamp running"})," live · polling"]})]}),n.jsx("div",{className:"phases",children:u.phases.map(o=>n.jsx(Ny,{p:o},o.phase))})]})]})}function Ym(u,c){return u.reduce((o,r)=>o+(r[c]??0),0)}function jy(u){return u.reduce((c,o)=>c+(o.costUsd??0),0)}function Ny({p:u}){const c=u.gates.filter(o=>!o.passed);return n.jsxs("div",{className:"phase-row",children:[n.jsx(Vc,{status:u.status}),n.jsxs("div",{className:"phase-top",children:[n.jsx("span",{className:"phase-name",children:u.phase}),u.kind==="agent"?n.jsxs("span",{className:"chip agent",children:[u.agent,u.model?` · ${u.model}`:""]}):n.jsx("span",{className:"chip",children:"script"}),n.jsxs("span",{className:"right num",children:[u.attempts>1&&n.jsxs("span",{children:["att ",u.attempts]}),u.status==="running"?n.jsx(No,{since:u.startedAt}):u.durationMs!=null&&n.jsx("span",{children:vi(u.durationMs)}),u.kind==="agent"&&u.tokensIn!=null&&n.jsxs("span",{children:[Yc(u.tokensIn)," / ",Yc(u.tokensOut)]}),u.costUsd!=null&&u.costUsd>0&&n.jsx("span",{children:bo(u.costUsd)})]})]}),u.status==="running"&&u.lastActivity&&n.jsx("div",{className:"phase-activity",children:u.lastActivity}),u.summary&&u.status!=="running"&&n.jsx("div",{className:"phase-sub",children:u.summary}),u.gates.length>0&&n.jsx("div",{className:"gate-line",children:u.gates.map(o=>n.jsxs("span",{className:`gate ${o.passed?"":"failed"}`,title:o.failure??"",children:[n.jsx(I,{name:o.passed?"check":"close",className:"ms-sm"})," ",o.gate]},o.gate))}),c.map(o=>n.jsx("div",{className:"gate-fail-msg",children:o.failure},o.gate))]})}const fp=new Set(["png","jpg","jpeg","gif","webp","svg"]);function Zc(u){return u==="runner.json"||u.endsWith(".jsonl")||u.endsWith(".log")}function Sy(u){const o=["report.html","recommendation.md"].find(h=>u.some(p=>p.name===h));if(o)return o;const r=h=>{const p=h.split(".").pop()?.toLowerCase()??"";return["html","md","markdown","pdf"].includes(p)||fp.has(p)?0:Zc(h)?2:1};let f=null;for(const h of u)(!f||r(h.name)<r(f.name))&&(f=h);return f?.name??null}function wy({id:u,files:c,live:o}){const[r,f]=C.useState(null),h=Ga(),p=C.useMemo(()=>h?c:c.filter(x=>!Zc(x.name)),[c,h]);return C.useEffect(()=>{!h&&r&&Zc(r)&&f(null)},[h,r]),C.useEffect(()=>{r||p.length===0||f(Sy(p))},[p,r]),n.jsxs("div",{className:"art-layout",children:[n.jsxs("section",{className:"panel art-files",children:[n.jsx("div",{className:"panel-head",children:n.jsxs("span",{className:"microlabel",children:["files ",n.jsxs("span",{className:"num",children:["(",p.length,")"]})]})}),n.jsxs("div",{className:"file-list",children:[p.map(x=>n.jsxs("button",{className:`file-row ${r===x.name?"active":""}`,onClick:()=>f(x.name),children:[n.jsx("span",{className:"fname",children:x.name}),n.jsx("span",{className:"fsize num",children:jo(x.size)})]},x.name)),p.length===0&&n.jsx("div",{className:"viewer-note",children:c.length>0?"no result files — raw run files live in expert mode":"no files yet"})]})]}),n.jsxs("section",{className:"panel art-viewer",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:r??"viewer"}),n.jsx("span",{className:"spacer"}),r&&n.jsx("a",{className:"open-raw",href:`/api/runs/${u}/file?name=${encodeURIComponent(r)}&raw=1`,target:"_blank",children:"open raw ↗"})]}),r?n.jsx(ky,{id:u,name:r,live:o}):n.jsx("div",{className:"empty",children:"select a file"})]})]})}function ky({id:u,name:c,live:o}){const r=c.split(".").pop()?.toLowerCase()??"",f=`/api/runs/${u}/file?name=${encodeURIComponent(c)}&raw=1`;return r==="html"?n.jsx("div",{className:"viewer",children:n.jsx("div",{className:"viewer-body",children:n.jsx("iframe",{src:f,sandbox:"allow-scripts",allow:"clipboard-write",title:c})})}):r==="pdf"?n.jsx("div",{className:"viewer",children:n.jsx("div",{className:"viewer-body",children:n.jsx("iframe",{src:f,title:c})})}):fp.has(r)?n.jsx("div",{className:"viewer",children:n.jsx("div",{className:"viewer-body",children:n.jsx("img",{src:f,alt:c})})}):r==="md"||r==="markdown"?n.jsx(Ty,{id:u,name:c,live:o}):n.jsx(Ey,{id:u,name:c,live:o})}function Ty({id:u,name:c,live:o}){const[r,f]=C.useState("rendered"),h=Ge(`/api/runs/${u}/file?name=${encodeURIComponent(c)}`,o),p=C.useMemo(()=>h?rs.sanitize(Oe.parse(h.content,{async:!1})):"",[h?.content]);return n.jsxs("div",{className:"viewer",children:[n.jsxs("div",{className:"viewer-note md-toolbar",children:[n.jsxs("div",{className:"tabs",children:[n.jsx("button",{className:r==="rendered"?"active":"",onClick:()=>f("rendered"),children:"rendered"}),n.jsx("button",{className:r==="source"?"active":"",onClick:()=>f("source"),children:"source"})]}),h?.truncated&&n.jsxs("span",{children:["large file — showing the last ",jo(4e5)]})]}),n.jsx("div",{className:"viewer-body",children:h?r==="rendered"?n.jsx("div",{className:"md-body",dangerouslySetInnerHTML:{__html:p}}):n.jsx("pre",{children:h.content||"(empty)"}):n.jsx("pre",{children:"loading…"})})]})}function Ey({id:u,name:c,live:o}){const r=Ge(`/api/runs/${u}/file?name=${encodeURIComponent(c)}`,o);return n.jsxs("div",{className:"viewer",children:[r?.truncated&&n.jsxs("div",{className:"viewer-note",children:["large file — showing the last ",jo(4e5)]}),n.jsx("div",{className:"viewer-body",children:n.jsx("pre",{children:r?r.content||"(empty)":"loading…"})})]})}function Ay(){const u=Ge("/api/workflows",!1),c=u?.workflows??[];return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"page-head",children:[n.jsx("h1",{children:"Workflows"}),n.jsxs("span",{className:"count num",children:[c.length," discovered"]}),u?.root&&n.jsx("span",{className:"count mono",children:u.root})]}),u&&c.length===0&&n.jsxs("div",{className:"empty",children:["No workflows found — expected ",n.jsx("code",{children:"src/workflows/"})," or ",n.jsx("code",{children:"workflows/"})," ","next to the output folder."]}),n.jsx("div",{className:"wf-grid",children:c.map(o=>n.jsxs(Ue,{href:`/workflows/${o.slug}`,className:"wf-card",children:[n.jsxs("div",{className:"wf-card-head",children:[n.jsx("span",{className:"wf-name",children:o.name??o.slug}),o.error&&n.jsx("span",{className:"status-word failed",children:"broken"})]}),n.jsx("p",{className:"wf-desc",children:o.error??o.description??""}),n.jsxs("div",{className:"wf-meta num",children:[n.jsxs("span",{children:[o.agents," agents"]}),n.jsx("span",{children:"·"}),n.jsxs("span",{children:[o.steps," steps"]})]})]},o.slug))})]})}function _y({slug:u}){const c=Ge(`/api/workflows/${encodeURIComponent(u)}`,!1),o=Ge("/api/runs",!1);if(!c)return n.jsx("div",{className:"empty",children:"loading…"});if(c.error)return n.jsxs(n.Fragment,{children:[n.jsx($m,{slug:c.slug}),n.jsxs("div",{className:"empty",children:[n.jsx("span",{className:"status-word failed",children:"broken workflow"}),n.jsx("pre",{style:{marginTop:12,textAlign:"left"},children:c.error})]})]});const r=new Map(c.agents.map((h,p)=>[h.id,p%4])),f=(o?.runs??[]).filter(h=>h.workflow===c.name).slice(0,8);return n.jsxs(n.Fragment,{children:[n.jsx($m,{slug:c.slug}),n.jsxs("div",{className:"detail-head",children:[n.jsx("h1",{children:c.name??c.slug}),n.jsx("span",{className:"rid mono",children:c.dir})]}),c.description&&n.jsx("p",{className:"detail-req",children:c.description}),n.jsxs("div",{className:"statgrid",children:[n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"agents"}),n.jsx("div",{className:"v num",children:c.agents.length})]}),n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"steps"}),n.jsxs("div",{className:"v num",children:[c.steps.length," ",n.jsxs("span",{style:{color:"var(--muted)",fontWeight:400},children:["(",c.steps.filter(h=>h.kind==="agent").length," agent ·"," ",c.steps.filter(h=>h.kind==="script").length," script)"]})]})]}),c.workspace&&n.jsxs("div",{className:"stat",style:{maxWidth:420},children:[n.jsx("div",{className:"microlabel",children:"workspace"}),n.jsx("div",{className:"wf-workspace mono",children:c.workspace})]})]}),n.jsx(Ry,{slug:c.slug,lastRequest:f[0]?.request}),n.jsxs("section",{className:"panel",style:{marginBottom:18},children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"agents"})}),n.jsxs("div",{className:"agent-grid",children:[c.agents.map(h=>n.jsx(zy,{a:h,idx:r.get(h.id)??0},h.id)),c.agents.length===0&&n.jsx("div",{className:"viewer-note",children:"no agents — script-only workflow"})]})]}),n.jsxs("div",{className:"columns",children:[n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"pipeline"})}),n.jsx("div",{className:"pipeline",children:c.steps.map((h,p)=>n.jsx(Cy,{s:h,i:p,idx:h.agent?r.get(h.agent)??0:null},h.name))})]}),n.jsxs("div",{style:{display:"grid",gap:18},children:[n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsxs("span",{className:"microlabel",children:["folder ",n.jsxs("span",{className:"num",children:["(",c.files.length," files)"]})]})}),n.jsx("div",{className:"file-list",children:c.files.map(h=>n.jsx("div",{className:"file-row",style:{cursor:"default"},children:n.jsx("span",{className:"fname",children:h})},h))})]}),n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsxs("span",{className:"microlabel",children:["recent runs ",n.jsxs("span",{className:"num",children:["(",f.length,")"]})]})}),n.jsxs("div",{className:"file-list",children:[f.map(h=>n.jsxs(Ue,{href:`/runs/${h.id}`,className:"file-row",children:[n.jsx(Vc,{status:h.status}),n.jsx("span",{className:"fname",children:h.id.replace(/^run-/,"")}),n.jsxs("span",{className:"fsize num",children:[vi(h.durationMs)," · ",bo(h.costUsd)," · ",pn(h.startedAt)]})]},h.id)),f.length===0&&n.jsx("div",{className:"viewer-note",children:"no runs of this workflow yet"})]})]})]})]})]})}function Ry({slug:u,lastRequest:c}){const[o,r]=C.useState(""),[f,h]=C.useState(!0),[p,x]=C.useState(!1),[y,v]=C.useState(!1),[S,E]=C.useState(null),k=Ge(`/api/workflows/${encodeURIComponent(u)}/run`,!1);C.useEffect(()=>{!o&&c&&r(c)},[c]);const L=k?.available&&k?.image,Y=k?k.available?k.image?"isolated container per run":"image missing — run `kraftwerk runner build`":"Docker not running — sandbox unavailable":"";async function F(){if(!(!o.trim()||y)){v(!0),E(null);try{const Z=await fetch(`/api/workflows/${encodeURIComponent(u)}/run`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({request:o.trim(),sandbox:f,ssh:p})}),z=await Z.json();if(!Z.ok)throw new Error(z.error??`HTTP ${Z.status}`);gl(`/runs/${z.runId}`)}catch(Z){E(Z.message),v(!1)}}}return n.jsxs("section",{className:"panel run-panel",style:{marginBottom:18},children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"trigger run"})}),n.jsxs("div",{className:"run-form",children:[n.jsx("input",{type:"text",value:o,placeholder:"request — topic, URL, host …",onChange:Z=>r(Z.target.value),onKeyDown:Z=>Z.key==="Enter"&&F()}),n.jsx("button",{className:"run-btn",onClick:F,disabled:y||!o.trim()||f&&!L,children:y?"starting…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"play_arrow",className:"ms-sm"})," ",f?"run in sandbox":"run locally"]})})]}),n.jsxs("div",{className:"run-opts",children:[n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:f,onChange:Z=>h(Z.target.checked)}),"docker sandbox ",Y&&n.jsxs("span",{className:"opt-hint",children:["— ",Y]})]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:p,onChange:Z=>x(Z.target.checked),disabled:!f}),"forward SSH agent"]})]}),S&&n.jsx("div",{className:"gate-fail-msg",children:S})]})}function $m({slug:u}){return n.jsxs("nav",{className:"crumbs",children:[n.jsx(Ue,{href:"/workflows",children:"workflows"}),n.jsx("span",{className:"sep",children:"/"}),n.jsx("span",{className:"mono",children:u})]})}function zy({a:u,idx:c}){return n.jsxs("div",{className:`agent-card aid-${c}`,children:[n.jsxs("div",{className:"agent-head",children:[n.jsx("span",{className:"agent-dot"}),n.jsx("b",{children:u.name??u.id}),n.jsxs("code",{className:"agent-id",children:["[",u.id,"]"]}),n.jsx("span",{className:"spacer"}),n.jsxs("span",{className:"chip",children:[u.model??"default",u.effort?` · ${u.effort}`:""]})]}),u.tools.length>0&&n.jsx("div",{className:"agent-tools",children:u.tools.map(o=>n.jsx("span",{className:"tool-chip",children:o},o))}),u.persona&&n.jsx("p",{className:"agent-persona",children:u.persona})]})}function Cy({s:u,i:c,idx:o}){const r=u.kind==="script"?u.script:u.prompt;return n.jsxs("div",{className:"step-node",children:[n.jsx("div",{className:`step-index num ${o!=null?`aid-${o}`:"is-script"}`,children:c+1}),n.jsxs("div",{className:"step-body",children:[n.jsxs("div",{className:"phase-top",children:[n.jsx("span",{className:"phase-name",children:u.name}),u.kind==="agent"?n.jsxs("span",{className:`chip agent-chip aid-${o??0}`,children:["agent · ",u.agent]}):n.jsxs("span",{className:"chip",children:["script",u.sourceRef?` · ${u.sourceRef}`:""]})]}),r&&n.jsxs("details",{className:"step-source",children:[n.jsx("summary",{children:u.kind==="agent"?"prompt":"script"}),n.jsx("pre",{children:r})]}),u.gates.length>0&&n.jsx("div",{className:"gate-line",children:u.gates.map(f=>n.jsxs("span",{className:"gate neutral",children:["⛨ ",f]},f))})]})]})}const Oy=u=>u==="ok"?"ok":u==="running"?"running":u==="aborted"?"aborted":"failed",Dy=u=>u==="ok"?"done":u==="running"?"working":u==="aborted"?"stopped":"failed";function My(u){return u.scope.kind==="team"?`/agents/${u.scope.member}/chat/${u.id}`:`/agents/chats/${u.id}`}function Xm(u){switch(u.scope.kind){case"team":return u.scope.member;case"run":return u.scope.runId;case"knowledge":return u.scope.bundle?`knowledge:${u.scope.bundle}`:"knowledge";case"kraftwerk":return"kraftwerk-aware";default:return"general"}}function Qm(u){return u.length>64?`${u.slice(0,46)}…${u.slice(-14)}`:u}function Uy(){const u=Ge("/api/runs",!1),c=Ge("/api/chats",!1),o=Ge("/api/knowledge",!1),r=Ge("/api/team",!1),f=Ge("/api/workflows",!1),h=Ge("/api/skills",!1),p=Ge("/api/meta",!1),[x,y]=C.useState("all"),v=u?.runs??[],S=c?.chats??[],E=o?.bundles??[],k=(h?.skills??[]).filter(F=>F.source==="workspace"),L=[[f?.workflows.length,"workflows","/workflows"],[u?v.length:void 0,"runs","/runs"],[o?E.length:void 0,"bundles","/knowledge"],[h?k.length:void 0,"skills","/skills"],[c?S.length:void 0,"chats","/agents/chats"]],Y=v.filter(F=>F.status==="failed"&&Date.now()-Date.parse(F.updatedAt)<24*36e5);return n.jsxs("div",{className:"dash",children:[n.jsxs("div",{className:"page-head",children:[n.jsxs("h1",{children:[p?.projectIcon?`${p.projectIcon} `:"",p?.projectName||"workspace"]}),n.jsx("span",{className:"spacer"}),n.jsx("span",{className:"dash-mini",children:L.map(([F,Z,z])=>n.jsxs(Ue,{href:z,children:[n.jsx("b",{className:"num",children:F??"…"})," ",Z]},Z))}),n.jsx(Ly,{workflows:f?.workflows??[]})]}),n.jsx(Hy,{members:r?.members.filter(F=>!F.archived),chats:S}),Y.length>0&&x!=="failed"&&n.jsxs("button",{className:"dash-alert",onClick:()=>y("failed"),children:["⚠ ",Y.length," run",Y.length===1?"":"s"," failed in the last 24 h — review"]}),n.jsx(Gy,{runs:v,chats:S,bundles:E,members:r?.members??[],workflows:f?.workflows??[],filter:x,setFilter:y})]})}function Ly({workflows:u}){const[c,o]=C.useState(!1);return C.useEffect(()=>{if(!c)return;const r=f=>{f.target.closest(".wf-pick-wrap")||o(!1)};return window.addEventListener("mousedown",r),()=>window.removeEventListener("mousedown",r)},[c]),n.jsxs("div",{className:"dash-actions",children:[n.jsxs("button",{className:"run-btn dash-newchat",onClick:()=>gl("/agents/chats"),children:[n.jsx(I,{name:"forum"})," new chat"]}),n.jsxs("span",{className:"wf-pick-wrap",children:[n.jsxs("button",{className:"run-btn tonal","aria-haspopup":"menu","aria-expanded":c,onClick:()=>o(r=>!r),children:[n.jsx(I,{name:"play_arrow"})," run workflow"]}),c&&n.jsxs("div",{className:"wf-pick-pop",role:"menu",children:[u.length===0&&n.jsx("span",{className:"wf-pick-empty",children:"no workflows yet"}),u.map(r=>n.jsxs(Ue,{href:`/workflows/${encodeURIComponent(r.slug)}`,className:"wf-pick-item",role:"menuitem",children:[n.jsx("span",{className:"wf-pick-name",children:r.name??r.slug}),r.description&&n.jsx("span",{className:"wf-pick-desc",children:r.description})]},r.slug))]})]})]})}function Hy({members:u,chats:c}){const o=Ga();return u&&u.length===0?n.jsx("section",{className:"panel dash-team-empty",children:n.jsx("div",{className:"viewer-note",children:o?n.jsxs(n.Fragment,{children:["No agent teammates yet — ",n.jsx(Ue,{href:"/agents/new",children:"create your first agent"})," and it will show up here, ready to chat."]}):n.jsx(n.Fragment,{children:"No agent teammates yet — ask an expert-mode user to create one."})})}):n.jsx("div",{className:"dash-team",children:(u??[]).map(r=>{const h=c.filter(x=>x.scope.kind==="team"&&x.scope.member===r.slug).find(x=>x.busy),p=()=>gl(`/agents/${encodeURIComponent(r.slug)}`);return n.jsxs("div",{className:"dash-member",role:"link",tabIndex:0,onClick:p,onKeyDown:x=>{x.key==="Enter"&&p()},children:[n.jsxs("div",{className:"dash-member-id",children:[n.jsxs("span",{className:"agent-avatar lg",children:[n.jsx("span",{"aria-hidden":!0,children:r.emoji}),n.jsx("span",{className:`lamp ${h?"running":"idle"}`})]}),n.jsx("span",{className:"dash-member-name",children:r.name}),r.description&&n.jsx("span",{className:"dash-member-desc",children:r.description})]}),n.jsxs("div",{className:"dash-member-foot",children:[n.jsx("span",{className:"dash-member-state",children:h&&n.jsx(Ue,{href:`/agents/${encodeURIComponent(r.slug)}/chat/${h.id}`,onClick:x=>x.stopPropagation(),children:"working…"})}),n.jsxs("button",{className:"run-btn dash-chat-btn",onClick:x=>{x.stopPropagation(),vn("claude",{kind:"team",member:r.slug})},children:[n.jsx(I,{name:"chat_bubble",className:"ms-sm"})," chat"]})]})]},r.slug)})})}function By(u){if(u.lamp==="running")return"now";const c=new Date(u.at),o=new Date;if(c.toDateString()===o.toDateString())return"today";const r=new Date(o);return r.setDate(r.getDate()-1),c.toDateString()===r.toDateString()?"yesterday":"earlier"}const qy=[["all","all"],["run","runs"],["session","chats"],["knowledge","knowledge"]];function Gy({runs:u,chats:c,bundles:o,members:r,workflows:f,filter:h,setFilter:p}){const x=Ga(),y=C.useMemo(()=>{const S=[],E=L=>L?f.find(Y=>Y.slug===L)?.name??L:void 0;for(const L of u)S.push({at:L.updatedAt,kind:"run",emoji:"⚙️",title:E(L.workflow)??L.id,sub:L.request??"",href:`/runs/${L.id}`,lamp:Oy(L.status),status:Dy(L.status)});for(const L of c){const Y=L.scope.kind==="team"?r.find(F=>L.scope.kind==="team"&&F.slug===L.scope.member):void 0;S.push({at:L.updatedAt,kind:"session",emoji:Y?Y.emoji||"🤖":"💬",title:Y?Y.name:L.title||"new chat",sub:Y?`${L.title||"new chat"}${x?` · ${L.agent}`:""}`:x?`${L.agent} · ${Xm(L)}`:Xm(L),href:My(L),lamp:L.busy?"running":"ok",status:L.busy?"working":void 0})}for(const L of o)L.updatedAt&&S.push({at:L.updatedAt,kind:"knowledge",emoji:"📚",title:L.name,sub:`${L.concepts} concepts`,href:`/knowledge/${encodeURIComponent(L.name)}`,lamp:"ok"});return(h==="all"?S:h==="failed"?S.filter(L=>L.kind==="run"&&L.lamp==="failed"):S.filter(L=>L.kind===h)).sort((L,Y)=>{const F=+(Y.lamp==="running")-+(L.lamp==="running");return F!==0?F:Y.at.localeCompare(L.at)}).slice(0,15)},[u,c,o,r,x,h]);let v="";return n.jsxs("section",{className:"panel dash-feed",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"activity"}),n.jsx("span",{className:"spacer"}),n.jsxs("span",{className:"dash-feed-filter",children:[qy.map(([S,E])=>n.jsx("button",{className:`feed-chip ${h===S?"on":""}`,onClick:()=>p(S),children:E},S)),h==="failed"&&n.jsxs("button",{className:"feed-chip on failed",onClick:()=>p("all"),children:["failed ",n.jsx(I,{name:"close",className:"ms-sm"})]})]})]}),y.length===0?n.jsx("div",{className:"viewer-note",children:h==="all"?"nothing yet — run a workflow or start a session":"nothing here for this filter"}):n.jsx("div",{className:"m3-list",children:y.map(S=>{const E=By(S),k=E!==v?E:null;return v=E,n.jsxs("div",{className:"feed-group",children:[k&&n.jsx("div",{className:"feed-day microlabel",children:k}),n.jsxs(Ue,{href:S.href,className:"m3-row m3-link",children:[n.jsxs("span",{className:"agent-avatar",children:[n.jsx("span",{"aria-hidden":!0,children:S.emoji}),S.lamp==="running"&&n.jsx("span",{className:"lamp running"})]}),n.jsx("span",{className:`chip dash-kind ${S.kind}`,children:S.kind==="session"?"chat":S.kind}),n.jsxs("span",{className:"m3-body",children:[n.jsx("span",{className:"m3-head",children:Qm(S.title)}),S.sub&&n.jsx("span",{className:"m3-sub",children:Qm(S.sub)})]}),S.status&&n.jsx("span",{className:`chip status ${S.lamp}`,children:S.status}),n.jsx("span",{className:"side-when num",title:new Date(S.at).toLocaleString(),children:Rx(S.at)}),n.jsx("span",{className:"m3-chev",children:n.jsx(I,{name:"chevron_right"})})]})]},`${S.kind}:${S.href}:${S.at}`)})})]})}async function dp(u){const c=window.open("","_blank");if(!c)return;c.document.write(`<title>${ss(u)}</title><body style="font-family:system-ui;padding:40px;color:#555">preparing ${ss(u)}…</body>`);let o;try{const p=await fetch(`/api/knowledge/${encodeURIComponent(u)}`).then(x=>x.json());o=await Promise.all(p.concepts.map(x=>fetch(`/api/knowledge/${encodeURIComponent(u)}/concept?id=${encodeURIComponent(x.id)}`).then(y=>y.json())))}catch{c.document.body.textContent=`could not load bundle "${u}"`;return}const r=o.map(p=>{const x=[p.type,p.generated?.at?`updated ${p.generated.at.slice(0,10)}`:"",p.trustTier==="human-reviewed"?"human-reviewed":"",(p.tags??[]).map(v=>`#${v}`).join(" ")].filter(Boolean).join(" · "),y=rs.sanitize(Oe.parse(p.body??"",{async:!1}));return`<article>
77
+ <h1>${ss(p.title||p.id)}</h1>
78
+ <div class="meta">${ss(x)}</div>
79
+ ${y}
80
+ </article>`}).join(`
81
+ `),f=new Date().toISOString().slice(0,10),h=`<!doctype html>
82
+ <html>
83
+ <head>
84
+ <meta charset="utf-8">
85
+ <title>${ss(u)}</title>
86
+ <style>
87
+ :root { color-scheme: light; }
88
+ body {
89
+ margin: 0 auto; padding: 48px 56px; max-width: 760px;
90
+ font: 14px/1.65 -apple-system, "Segoe UI", system-ui, sans-serif; color: #191919;
91
+ background: #fff;
92
+ }
93
+ .no-print {
94
+ position: sticky; top: 0; display: flex; gap: 12px; align-items: center;
95
+ margin: -48px -56px 32px; padding: 12px 56px;
96
+ background: #f4efea; border-bottom: 1px solid #ded6cb; font-size: 13px;
97
+ }
98
+ .no-print button {
99
+ font: inherit; font-weight: 600; padding: 6px 16px; cursor: pointer;
100
+ background: #191919; color: #fff; border: none; border-radius: 999px;
101
+ }
102
+ .cover { margin: 0 0 4px; font-size: 28px; letter-spacing: -0.01em; }
103
+ .cover-sub { color: #5e5b56; font-size: 13px; margin-bottom: 40px; }
104
+ article { page-break-before: always; break-before: page; }
105
+ article:first-of-type { page-break-before: auto; break-before: auto; }
106
+ article h1 { font-size: 21px; margin: 0 0 2px; letter-spacing: -0.01em; }
107
+ article .meta { color: #5e5b56; font-size: 12px; margin-bottom: 18px; }
108
+ h2 { font-size: 16px; margin: 24px 0 8px; }
109
+ h3 { font-size: 14px; margin: 18px 0 6px; }
110
+ a { color: inherit; }
111
+ code { font: 12px/1.5 ui-monospace, monospace; background: #f2ede7; padding: 1px 5px; border-radius: 4px; }
112
+ pre { background: #f2ede7; padding: 12px 14px; border-radius: 8px; overflow-x: auto; }
113
+ pre code { background: none; padding: 0; }
114
+ table { border-collapse: collapse; margin: 12px 0; font-size: 13px; }
115
+ th, td { border: 1px solid #ded6cb; padding: 6px 12px; text-align: left; }
116
+ th { background: #f4efea; }
117
+ blockquote { margin: 12px 0; padding: 2px 16px; border-left: 3px solid #ded6cb; color: #5e5b56; }
118
+ @media print {
119
+ body { padding: 0; }
120
+ .no-print { display: none; }
121
+ }
122
+ </style>
123
+ </head>
124
+ <body>
125
+ <div class="no-print">
126
+ <span>Use “Save as PDF” in the print dialog.</span>
127
+ <button onclick="window.print()">print / save as PDF</button>
128
+ </div>
129
+ <h1 class="cover">${ss(u)}</h1>
130
+ <div class="cover-sub">knowledge bundle · ${o.length} concept${o.length===1?"":"s"} · exported ${f}</div>
131
+ ${r}
132
+ <script>setTimeout(() => window.print(), 400);<\/script>
133
+ </body>
134
+ </html>`;c.location.href=URL.createObjectURL(new Blob([h],{type:"text/html"}))}function ss(u){return u.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Yy({bundle:u,conceptId:c}){const o=Ge("/api/knowledge",!1),r=o?.bundles??[];return n.jsxs("div",{className:"runs-screen",children:[n.jsxs("aside",{className:"runs-side",children:[n.jsxs("div",{className:"side-head",children:[n.jsx("span",{className:"microlabel",children:"bundles"}),n.jsx("span",{className:"spacer"}),n.jsxs(Ue,{href:"/knowledge",className:"open-raw",children:[n.jsx(I,{name:"add",className:"ms-sm"})," new"]})]}),n.jsxs("div",{className:"side-list",children:[r.map(f=>n.jsxs(Ue,{href:`/knowledge/${encodeURIComponent(f.name)}`,className:`side-row ${f.name===u?"active":""}`,children:[n.jsx("span",{className:"lamp ok"}),n.jsxs("div",{className:"side-row-body",children:[n.jsxs("div",{className:"side-row-top",children:[n.jsx("span",{className:"side-wf",children:f.name}),n.jsx("span",{className:"side-when num",children:f.concepts})]}),n.jsx("div",{className:"side-row-sub",children:n.jsxs("span",{className:"side-req",children:[f.okfVersion?`okf ${f.okfVersion}`:"okf",f.updatedAt?` · ${f.updatedAt.slice(0,10)}`:""]})})]})]},f.name)),o&&r.length===0&&n.jsx("div",{className:"viewer-note",children:"no bundles yet"})]})]}),n.jsx("div",{className:"runs-main",children:u&&c?n.jsx(Iy,{bundle:u,conceptId:c},`${u}/${c}`):u?n.jsx(Xy,{name:u},u):n.jsx($y,{root:o?.root})})]})}function $y({root:u}){const[c,o]=C.useState(""),[r,f]=C.useState(""),[h,p]=C.useState(!1);async function x(){const y=c.trim();if(!y)return;p(!0),f("");const S=await(await fetch("/api/knowledge",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:y})})).json();p(!1),S.error?f(S.error):window.location.hash=`/knowledge/${encodeURIComponent(y)}`}return n.jsxs("div",{className:"new-chat",children:[n.jsx("div",{className:"page-head",children:n.jsx("h1",{children:"context & knowledge"})}),n.jsxs("section",{className:"panel new-chat-panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"what lives here"})}),n.jsxs("div",{className:"know-intro",children:["Curated knowledge as ",n.jsx("b",{children:"OKF bundles"})," (Open Knowledge Format v0.2): plain markdown files with YAML frontmatter",u?n.jsxs(n.Fragment,{children:[" under ",n.jsx("code",{children:u})]}):null,", readable by humans and agents, diffable in git. Agents write through"," ",n.jsx("code",{children:"kraftwerk knowledge put"})," (provenance is stamped automatically); you raise a concept's trust tier by verifying it here."]}),n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"new bundle"})}),n.jsxs("div",{className:"know-newbundle",children:[n.jsx("input",{value:c,placeholder:"bundle name, e.g. customer-support",onChange:y=>o(y.target.value),onKeyDown:y=>y.key==="Enter"&&void x()}),n.jsx("button",{className:"run-btn",disabled:!c.trim()||h,onClick:x,children:h?"creating…":"create"})]}),r&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",r]})]})]})}function xo({tier:u}){return n.jsx("span",{className:`chip trust ${u}`,children:u})}function Xy({name:u}){const c=Ge(`/api/knowledge/${encodeURIComponent(u)}`,!1);return c?"error"in c?n.jsx("div",{className:"empty",children:"bundle not found"}):n.jsxs("div",{className:"member-view",children:[n.jsxs("div",{className:"page-head",children:[n.jsx("h1",{children:u}),n.jsxs("span",{className:"count",children:[c.concepts.length," concepts"]}),n.jsx("span",{className:"spacer"}),n.jsxs("button",{className:"open-raw",onClick:()=>{dp(u)},children:[n.jsx(I,{name:"picture_as_pdf",className:"ms-sm"})," export PDF"]}),n.jsx("button",{className:"run-btn",onClick:()=>{vn("claude",{kind:"knowledge",bundle:u})},children:"curate in chat"})]}),n.jsx("section",{className:"panel",children:c.concepts.length===0?n.jsxs("div",{className:"viewer-note",children:["No concepts yet — start a chat to author some, or write one with"," ",n.jsxs("code",{children:["kraftwerk knowledge put ",u,"/<path>"]}),"."]}):n.jsx("div",{className:"m3-list",children:Jy(c.concepts).map(({folder:o,concepts:r})=>n.jsxs(C.Fragment,{children:[o&&n.jsxs("div",{className:"m3-subhead",children:[o,"/"]}),r.map(f=>n.jsxs(Ue,{href:`/knowledge/${encodeURIComponent(u)}/${f.id}`,className:"m3-row m3-link",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(I,{name:Qy(f.type)})}),n.jsxs("span",{className:"m3-body",children:[n.jsxs("span",{className:"m3-head",children:[f.title,f.status!=="stable"&&n.jsx("span",{className:`chip ${f.status}`,children:f.status}),f.stale&&n.jsx("span",{className:"chip stale",children:"stale"}),f.error&&n.jsx("span",{className:"chip stale",title:f.error,children:"invalid"})]}),n.jsxs("span",{className:"m3-sub",children:[n.jsxs("code",{children:[o?f.id.slice(o.length+1):f.id,".md"]})," · ",f.type??"untyped"]})]}),n.jsx(xo,{tier:f.trustTier}),n.jsx("span",{className:"m3-chev",children:n.jsx(I,{name:"chevron_right",className:"ms-sm"})})]},f.id))]},o||"."))})}),c.log&&n.jsx(Ky,{name:u,log:c.log})]}):n.jsx("div",{className:"empty",children:"loading…"})}function Qy(u){switch((u??"").toLowerCase()){case"reference":return"article";case"policy":return"gavel";case"guide":case"howto":return"route";case"decision":return"balance";default:return"menu_book"}}function Zy(u){const c=[];for(const o of u.split(`
135
+ `)){const r=o.match(/^##\s+(\d{4}-\d{2}-\d{2})/);if(r){c.push({date:r[1],entries:[]});continue}const f=o.match(/^[*-]\s+\*\*([^*]+)\*\*:\s*(.*)$/);f&&c.length>0&&c[c.length-1].entries.push({kind:f[1].toLowerCase(),text:f[2]})}return c.filter(o=>o.entries.length>0)}function Vy(u,c){const o=[],r=/\[([^\]]+)\]\(\/?([^)]+?)\.md\)/g;let f=0,h;for(;h=r.exec(c);)h.index>f&&o.push(c.slice(f,h.index)),o.push(n.jsx(Ue,{href:`/knowledge/${encodeURIComponent(u)}/${h[2].replace(/^\//,"")}`,children:h[1]},h.index)),f=h.index+h[0].length;return f<c.length&&o.push(c.slice(f)),o}function Ky({name:u,log:c}){const o=Zy(c),[r,f]=C.useState(!1);return n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"activity"}),n.jsx("span",{className:"spacer"}),n.jsx("button",{className:"open-raw",onClick:()=>f(!r),children:r?"timeline":"raw log"})]}),r||o.length===0?n.jsx("div",{className:"viewer-body",children:n.jsx("pre",{children:c})}):n.jsx("div",{className:"know-log",children:o.map(h=>n.jsxs(C.Fragment,{children:[n.jsx("div",{className:"m3-subhead num",children:h.date}),h.entries.map((p,x)=>n.jsxs("div",{className:"know-log-row",children:[n.jsx("span",{className:`chip log-kind log-${p.kind}`,children:p.kind}),n.jsx("span",{className:"know-log-text",children:Vy(u,p.text)})]},x))]},h.date))})]})}function Jy(u){const c=new Map;for(const o of u){const r=o.id.includes("/")?o.id.slice(0,o.id.lastIndexOf("/")):"";(c.get(r)??c.set(r,[]).get(r)).push(o)}return[...c.keys()].sort((o,r)=>o===""?-1:r===""?1:o.localeCompare(r)).map(o=>({folder:o,concepts:c.get(o)}))}function Iy({bundle:u,conceptId:c}){const[o,r]=C.useState(null),[f,h]=C.useState(!1),[p,x]=C.useState(!1),[y,v]=C.useState(!1),[S,E]=C.useState(""),[k,L]=C.useState(!1),[Y,F]=C.useState(""),[Z,z]=C.useState("rendered"),de=C.useMemo(()=>o?rs.sanitize(Oe.parse(o.body,{async:!1})):"",[o?.body]),fe=()=>{fetch(`/api/knowledge/${encodeURIComponent(u)}/concept?id=${encodeURIComponent(c)}`).then($=>$.ok?$.json():Promise.reject()).then(r).catch(()=>h(!0))};C.useEffect(()=>{if(y)return;let $=!0,V;const le=async()=>{try{const ae=await fetch(`/api/knowledge/${encodeURIComponent(u)}/concept?id=${encodeURIComponent(c)}`,{cache:"no-store"});if(ae.ok){const je=await ae.json();$&&(h(!1),r(be=>JSON.stringify(be)===JSON.stringify(je)?be:je))}else ae.status===404&&$&&h(!0)}catch{}$&&(V=setTimeout(le,6e3))};return le(),()=>{$=!1,clearTimeout(V)}},[u,c,y]);async function te(){x(!0),await fetch(`/api/knowledge/${encodeURIComponent(u)}/verify`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:c})}).catch(()=>{}),x(!1),fe()}async function W(){L(!0),F("");const $=await fetch(`/api/knowledge/${encodeURIComponent(u)}/concept`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:c,content:S})}).then(V=>V.json()).catch(()=>({error:"save failed"}));L(!1),$.error?F($.error):(r($),v(!1))}return f?n.jsx("div",{className:"empty",children:"concept not found"}):o?n.jsxs("div",{className:"member-view",children:[n.jsxs("div",{className:"detail-head",children:[n.jsx("h1",{children:o.title}),o.type&&n.jsx("span",{className:"chip agent",children:o.type}),n.jsx(xo,{tier:o.trustTier}),o.status!=="stable"&&n.jsx("span",{className:`chip ${o.status}`,children:o.status}),o.stale&&n.jsxs("span",{className:"chip stale",children:["stale since ",o.staleAfter?.slice(0,10)]}),n.jsx("span",{className:"spacer"}),n.jsx("button",{className:"open-raw",onClick:()=>{vn("claude",{kind:"knowledge",bundle:u})},children:"curate in chat"}),n.jsx("button",{className:"run-btn",disabled:p,onClick:te,children:p?"verifying…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"check",className:"ms-sm"})," verify (human)"]})})]}),o.error&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",o.error]}),n.jsxs("div",{className:"detail-cols",children:[n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"content"}),n.jsx("span",{className:"spacer"}),n.jsxs("span",{className:"side-meta",children:[u,"/",o.id,".md"]}),y?n.jsxs(n.Fragment,{children:[n.jsx("button",{className:"open-raw",onClick:()=>{v(!1),F("")},children:"cancel"}),n.jsx("button",{className:"open-raw",disabled:k,onClick:W,children:k?"saving…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"check",className:"ms-sm"})," save"]})})]}):n.jsxs("button",{className:"open-raw",onClick:()=>{E(o.raw),v(!0),F("")},children:[n.jsx(I,{name:"edit",className:"ms-sm"})," edit"]})]}),y?n.jsxs(n.Fragment,{children:[n.jsx("textarea",{className:"concept-edit",value:S,rows:Math.min(40,Math.max(18,S.split(`
136
+ `).length+2)),onChange:$=>E($.target.value),spellCheck:!1}),n.jsxs("div",{className:"viewer-note",children:["full file (frontmatter + markdown body) — saving stamps provenance as"," ",n.jsx("code",{children:"human:user"})," and logs an update."]})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"viewer-note md-toolbar",children:n.jsxs("div",{className:"tabs",children:[n.jsx("button",{className:Z==="rendered"?"active":"",onClick:()=>z("rendered"),children:"rendered"}),n.jsx("button",{className:Z==="source"?"active":"",onClick:()=>z("source"),children:"source"})]})}),n.jsx("div",{className:"viewer-body",children:Z==="rendered"?n.jsx("div",{className:"md-body concept-md",dangerouslySetInnerHTML:{__html:de}}):n.jsx("pre",{children:o.body.trim()||"(empty body)"})})]}),Y&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",Y]})]}),n.jsxs("aside",{className:"detail-rail",children:[n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"about"})}),n.jsxs("div",{className:"rail-list",children:[n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"trust"}),n.jsx("span",{className:"v",children:n.jsx(xo,{tier:o.trustTier})})]}),n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"generated"}),n.jsx("span",{className:`v ${o.generated?"":"dim"}`,children:o.generated?`${o.generated.by??"?"} · ${(o.generated.at??"?").slice(0,10)}`:"not stamped"})]}),n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"verified"}),o.verified.length===0?n.jsx("span",{className:"v dim",children:"never"}):o.verified.map(($,V)=>n.jsxs("span",{className:"v",children:[$.by??"?"," · ",($.at??"?").slice(0,10)]},V))]}),o.staleAfter&&n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"stale after"}),n.jsxs("span",{className:`v ${o.stale?"":"dim"}`,children:[o.staleAfter.slice(0,10),o.stale&&n.jsx("span",{className:"chip stale",children:"stale"})]})]}),o.tags.length>0&&n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"tags"}),n.jsx("span",{className:"m3-chips",children:o.tags.map($=>n.jsx("span",{className:"chip",children:$},$))})]})]})]}),o.sources.length>0&&n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"sources"})}),n.jsx("div",{className:"rail-list",children:o.sources.map(($,V)=>n.jsxs("div",{className:"rail-kv",children:[n.jsxs("span",{className:"v",children:[$.resource?.startsWith("http")?n.jsx("a",{href:$.resource,target:"_blank",rel:"noreferrer",children:$.title??$.resource}):$.title??$.resource??"?",$.id&&n.jsxs("span",{className:"know-id",children:["[^",$.id,"]"]})]}),n.jsx("span",{className:"v dim",children:[$.author,$.usage_count!=null?`${$.usage_count} uses`:null,$.last_modified?`mod ${$.last_modified.slice(0,10)}`:null].filter(Boolean).join(" · ")})]},V))})]})]})]})]}):n.jsx("div",{className:"empty",children:"loading…"})}const Fy={workspace:"workspace",project:".claude",user:"global",agent:"agent"};function hp(u){return n.jsx("span",{className:`chip skill-src ${u}`,children:Fy[u]})}function Wy({name:u}){const c=Ge("/api/skills",!1),o=c?.skills??[],r=o.filter(p=>p.source==="workspace"),f=o.filter(p=>p.source!=="workspace"),h=p=>n.jsxs(Ue,{href:`/skills/${encodeURIComponent(p.name)}`,className:`side-row ${p.name===u?"active":""}`,children:[n.jsx("span",{className:`lamp ${p.source==="workspace"?"ok":"dim"}`}),n.jsxs("div",{className:"side-row-body",children:[n.jsxs("div",{className:"side-row-top",children:[n.jsxs("span",{className:"side-wf",children:["/",p.name]}),p.source!=="workspace"&&hp(p.source)]}),n.jsx("div",{className:"side-row-sub",children:n.jsx("span",{className:"side-req",children:p.description||"no description"})})]})]},`${p.source}:${p.name}`);return n.jsxs("div",{className:"runs-screen",children:[n.jsxs("aside",{className:"runs-side",children:[n.jsx("div",{className:"side-head",children:n.jsx("span",{className:"microlabel",children:"workspace skills"})}),n.jsxs("div",{className:"side-list",children:[r.map(h),c&&r.length===0&&n.jsx("div",{className:"viewer-note",children:"no workspace skills yet"}),f.length>0&&n.jsxs(C.Fragment,{children:[n.jsx("div",{className:"side-head skills-local-head",children:n.jsx("span",{className:"microlabel",children:"local (this machine / repo)"})}),f.map(h)]})]})]}),n.jsx("div",{className:"runs-main",children:u?n.jsx(eb,{name:u},u):n.jsx(Py,{root:c?.root,workspace:r})})]})}function Py({root:u,workspace:c}){return n.jsxs("div",{className:"new-chat",children:[n.jsxs("div",{className:"page-head",children:[n.jsx("h1",{children:"skills"}),n.jsxs("span",{className:"count",children:[c.length," in workspace"]})]}),n.jsxs("section",{className:"panel new-chat-panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"what lives here"})}),n.jsxs("div",{className:"know-intro",children:["Skills are reusable ",n.jsx("b",{children:"instruction packages"}),": one folder per skill with a"," ",n.jsx("code",{children:"SKILL.md"})," (YAML frontmatter: name, description). ",n.jsx("b",{children:"Workspace skills"}),u?n.jsxs(n.Fragment,{children:[" live under ",n.jsx("code",{children:u})]}):null,", are tracked in git and shared with everyone in this workspace — they are the ones to build on. Skills from"," ",n.jsx("code",{children:".claude/skills"})," and your personal ",n.jsx("code",{children:"~/.claude/skills"})," also work here, but stay repo-/machine-local. Invoke any skill in a session with"," ",n.jsx("code",{children:"/<name>"}),"."]}),n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"add a workspace skill"})}),n.jsxs("div",{className:"know-intro",children:["Create ",n.jsxs("code",{children:[u?`${u}/`:"skills/","<name>/SKILL.md"]}),", commit it, done — it appears here and in every session's ",n.jsx("code",{children:"/"})," menu."]})]})]})}function eb({name:u}){const[c,o]=C.useState(null),[r,f]=C.useState(!1),[h,p]=C.useState("rendered"),x=C.useMemo(()=>c?c.content.replace(/^---\r?\n[\s\S]*?\r?\n---(\r?\n|$)/,""):"",[c?.content]),y=C.useMemo(()=>c?rs.sanitize(Oe.parse(x,{async:!1})):"",[x]);return C.useEffect(()=>{fetch(`/api/skills/${encodeURIComponent(u)}`).then(v=>v.ok?v.json():Promise.reject()).then(o).catch(()=>f(!0))},[u]),r?n.jsx("div",{className:"empty",children:"skill not found"}):c?n.jsxs("div",{className:"member-view",children:[n.jsxs("div",{className:"detail-head",children:[n.jsxs("h1",{children:["/",c.name]}),hp(c.source)]}),c.description&&n.jsx("div",{className:"know-intro skill-desc",children:c.description}),n.jsxs("div",{className:"detail-cols",children:[n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"SKILL.md"}),n.jsx("span",{className:"spacer"}),n.jsxs("div",{className:"tabs",children:[n.jsx("button",{className:h==="rendered"?"active":"",onClick:()=>p("rendered"),children:"rendered"}),n.jsx("button",{className:h==="source"?"active":"",onClick:()=>p("source"),children:"source"})]})]}),n.jsx("div",{className:"viewer-body",children:h==="rendered"?n.jsx("div",{className:"md-body concept-md",dangerouslySetInnerHTML:{__html:y}}):n.jsx("pre",{children:c.content.trim()||"(empty)"})})]}),n.jsx("aside",{className:"detail-rail",children:n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"about"})}),n.jsxs("div",{className:"rail-list",children:[n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"source"}),n.jsx("span",{className:"v",children:c.source==="workspace"?"workspace — git-tracked, shared with the team":c.source==="project"?"repo .claude/skills — tracked, but outside the workspace root":"global ~/.claude/skills — only on this machine"})]}),n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"path"}),n.jsx("span",{className:"v mono skill-path",title:c.path,children:c.path})]}),n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"invoke"}),n.jsxs("span",{className:"v",children:[n.jsxs("code",{children:["/",c.name]})," in any session"]})]}),c.files.length>0&&n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"bundled files"}),c.files.map(v=>n.jsx("span",{className:"v mono",children:v},v))]})]})]})})]})]}):n.jsx("div",{className:"empty",children:"loading…"})}const tb=["","low","medium","high","xhigh","max"],lb=["🤖","🧑‍💻","🎧","🛠️","📊","✍️","🔍","🧹","📦","🚀"];function Zm({seg:u}){const c=u[0]&&u[0]!=="new"&&u[0]!=="chats"?decodeURIComponent(u[0]):void 0,o=u[0]==="new"?"new":u[0]==="chats"?"chats":u[1]==="edit"?"edit":u[1]==="info"?"info":u[1]==="chat"?"chat":c?"member":"home",r=o==="chat"?u[2]:o==="chats"?u[1]:void 0,f=Ge("/api/team",!1),h=Ga(),[p,x]=C.useState(()=>{try{const B=JSON.parse(localStorage.getItem("kw-agent-groups")??"[]");return Array.isArray(B)?B.map(String):[]}catch{return[]}}),[y,v]=C.useState(!1),[S,E]=C.useState(""),[k,L]=C.useState(null),[Y,F]=C.useState(""),[Z,z]=C.useState(null),[de,fe]=C.useState(null),[te,W]=C.useState({}),$=(f?.members??[]).map(B=>te[B.slug]!==void 0?{...B,group:te[B.slug]||void 0}:B);C.useEffect(()=>{W(B=>{const Re={...B};let Ye=!1;for(const We of f?.members??[])Re[We.slug]!==void 0&&(We.group??"")===Re[We.slug]&&(delete Re[We.slug],Ye=!0);return Ye?Re:B})},[f]);const V=$.filter(B=>!B.archived),le=$.filter(B=>B.archived),[ae,je]=C.useState(!1),be=[...new Set([...V.map(B=>B.group??"").filter(Boolean),...p])].sort((B,Re)=>B.localeCompare(Re)),P=V.filter(B=>!B.group);function ve(B){x(B);try{localStorage.setItem("kw-agent-groups",JSON.stringify(B))}catch{}}function Je(){const B=S.trim();v(!1),E(""),B&&!be.includes(B)&&ve([...p,B])}function at(B,Re){L(null);const Ye=Re.trim();if(!(!Ye||Ye===B)){for(const We of $.filter(tl=>tl.group===B))D(We.slug,Ye);p.includes(B)&&ve([...new Set(p.map(We=>We===B?Ye:We))])}}async function D(B,Re){if(($.find(We=>We.slug===B)?.group??"")!==Re){W(We=>({...We,[B]:Re}));try{const We=await fetch(`/api/team/${encodeURIComponent(B)}`);if(!We.ok)throw new Error;const tl=await We.json();if(!(await fetch(`/api/team/${encodeURIComponent(B)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({...tl,group:Re||void 0})})).ok)throw new Error}catch{W(We=>{const tl={...We};return delete tl[B],tl})}}}const K=B=>h?{onDragOver:Re=>{Z!=null&&(Re.preventDefault(),Re.dataTransfer.dropEffect="move",de!==B&&fe(B))},onDrop:Re=>{Re.preventDefault();const Ye=Re.dataTransfer.getData("text/plain")||Z;Ye&&D(Ye,B),z(null),fe(null)}}:{},ce=B=>n.jsxs(Ue,{href:`/agents/${encodeURIComponent(B.slug)}`,className:`side-row ${B.slug===c?"active":""} ${Z===B.slug?"dragging":""}`,draggable:h,onDragStart:Re=>{Re.dataTransfer.setData("text/plain",B.slug),Re.dataTransfer.effectAllowed="move",z(B.slug)},onDragEnd:()=>{z(null),fe(null)},children:[n.jsx("span",{className:"agent-avatar sm",children:n.jsx("span",{"aria-hidden":!0,children:B.emoji})}),n.jsxs("div",{className:"side-row-body",children:[n.jsx("div",{className:"side-row-top",children:n.jsx("span",{className:"side-wf",children:B.name})}),n.jsx("div",{className:"side-row-sub",children:n.jsx("span",{className:"side-req",children:B.description||B.harness})})]})]},B.slug),_e=B=>n.jsxs(Ue,{href:`/agents/${encodeURIComponent(B.slug)}/info`,className:`side-row archived-row ${B.slug===c?"active":""}`,children:[n.jsx("span",{className:"agent-avatar sm",children:n.jsx("span",{"aria-hidden":!0,children:B.emoji})}),n.jsxs("div",{className:"side-row-body",children:[n.jsx("div",{className:"side-row-top",children:n.jsx("span",{className:"side-wf",children:B.name})}),n.jsx("div",{className:"side-row-sub",children:n.jsx("span",{className:"side-req",children:B.description||B.harness})})]})]},B.slug);let ye;o==="new"?ye=n.jsx(Km,{},"new"):o==="edit"&&c?ye=n.jsx(Km,{slug:c},c):o==="chat"&&c&&r?ye=n.jsx("div",{className:"chat-main",children:n.jsx(Gm,{id:r,agentName:$.find(B=>B.slug===c)?.name??c},r)}):o==="chats"?ye=r?n.jsx("div",{className:"chat-main",children:n.jsx(Gm,{id:r},r)}):n.jsx(oy,{}):o==="info"&&c?ye=n.jsx(mp,{slug:c},c):c?ye=n.jsx(nb,{slug:c},c):ye=n.jsx(cb,{hasMembers:V.length>0,root:f?.root});const N=(o==="member"||o==="info"||o==="chat")&&c?$.find(B=>B.slug===c)?.knowledge??[]:[],[H,J]=C.useState(()=>localStorage.getItem("kw-kside")!=="hidden"),[Q,he]=C.useState(()=>Number(localStorage.getItem("kw-kside-w"))||460),pe=N.length>0&&H;function Ee(B){J(B),localStorage.setItem("kw-kside",B?"open":"hidden")}function mt(B){he(B),localStorage.setItem("kw-kside-w",String(B))}return n.jsxs("div",{className:`runs-screen team-screen ${c||o==="chats"?"has-sessions":""} ${pe?"has-knowledge":""}`,style:pe?{"--kside-w":`${Q}px`}:void 0,children:[n.jsxs("aside",{className:"runs-side",children:[n.jsxs("div",{className:"side-head",children:[n.jsx("span",{className:"microlabel",children:"agents"}),n.jsx("span",{className:"spacer"}),h&&n.jsxs(Ue,{href:"/agents/new",className:"open-raw",children:[n.jsx(I,{name:"add",className:"ms-sm"})," new"]})]}),n.jsxs("div",{className:"side-list",children:[n.jsxs(Ue,{href:"/agents/chats",className:`side-row side-general ${o==="chats"?"active":""}`,children:[n.jsx("span",{className:"agent-avatar sm",children:n.jsx("span",{"aria-hidden":!0,children:"💬"})}),n.jsxs("div",{className:"side-row-body",children:[n.jsx("div",{className:"side-row-top",children:n.jsx("span",{className:"side-wf",children:"General Chats"})}),n.jsx("div",{className:"side-row-sub",children:n.jsx("span",{className:"side-req",children:"chats without an agent"})})]})]}),n.jsxs("div",{className:`side-group ${Z&&de===""?"drop-over":""}`,...K(""),children:[P.map(ce),Z!=null&&P.length===0&&n.jsx("div",{className:"side-group-empty",children:"no group — drop here"})]}),be.map(B=>{const Re=V.filter(Ye=>Ye.group===B);return n.jsxs("div",{className:`side-group ${Z&&de===B?"drop-over":""}`,...K(B),children:[n.jsxs("div",{className:"side-group-head",children:[k===B?n.jsx("input",{className:"side-group-rename",autoFocus:!0,value:Y,onChange:Ye=>F(Ye.target.value),onKeyDown:Ye=>{Ye.key==="Enter"&&at(B,Y),Ye.key==="Escape"&&L(null)},onBlur:()=>at(B,Y)}):n.jsx("span",{className:"microlabel",children:B}),n.jsx("span",{className:"side-group-count num",children:Re.length}),n.jsx("span",{className:"spacer"}),h&&k!==B&&n.jsx("button",{className:"side-group-x",title:"Rename group",onClick:()=>{L(B),F(B)},children:n.jsx(I,{name:"edit",className:"ms-sm"})}),h&&Re.length===0&&p.includes(B)&&n.jsx("button",{className:"side-group-x",title:"Remove empty group",onClick:()=>ve(p.filter(Ye=>Ye!==B)),children:n.jsx(I,{name:"close",className:"ms-sm"})})]}),Re.map(ce),Re.length===0&&n.jsx("div",{className:"side-group-empty",children:h?"drag agents here":"no agents"})]},B)}),le.length>0&&n.jsxs("div",{className:"side-group side-archived",children:[n.jsxs("button",{className:"side-archived-toggle","aria-expanded":ae,onClick:()=>je(B=>!B),children:[n.jsx("span",{className:"microlabel",children:"archived"}),n.jsx("span",{className:"side-group-count num",children:le.length}),n.jsx("span",{className:"spacer"}),n.jsx(I,{name:ae?"expand_less":"expand_more",className:"ms-sm"})]}),ae&&le.map(_e)]}),f&&$.length===0&&n.jsx("div",{className:"viewer-note",children:"no agents yet"}),h&&(y?n.jsx("div",{className:"side-group-new",children:n.jsx("input",{autoFocus:!0,value:S,placeholder:"group name, e.g. Team Content",onChange:B=>E(B.target.value),onKeyDown:B=>{B.key==="Enter"&&Je(),B.key==="Escape"&&(v(!1),E(""))},onBlur:Je})}):n.jsxs("button",{className:"side-group-add",onClick:()=>v(!0),children:[n.jsx(I,{name:"add",className:"ms-sm"})," group"]}))]})]}),c&&n.jsx(sb,{slug:c,chatId:r}),o==="chats"&&n.jsx(ib,{chatId:r}),n.jsx("div",{className:"runs-main",children:ye}),pe&&n.jsx(ab,{bundles:N,onHide:()=>Ee(!1),onResize:mt}),N.length>0&&!H&&n.jsxs("button",{className:"kside-reopen",onClick:()=>Ee(!0),title:"Show knowledge sidebar",children:[n.jsx(I,{name:"menu_book",className:"ms-sm"})," knowledge"]})]})}function ab({bundles:u,onHide:c,onResize:o}){const[r,f]=C.useState({}),[h,p]=C.useState(null),[x,y]=C.useState({}),[v,S]=C.useState({}),[E,k]=C.useState(null),[L,Y]=C.useState(""),[F,Z]=C.useState(!1),[z,de]=C.useState("");C.useEffect(()=>{f({});let W=!0,$;const V=async()=>{await Promise.all(u.map(async le=>{try{const ae=await fetch(`/api/knowledge/${encodeURIComponent(le)}`,{cache:"no-store"}),je=ae.ok?await ae.json():null;W&&f(be=>JSON.stringify(be[le])===JSON.stringify(je)?be:{...be,[le]:je})}catch{W&&f(ae=>le in ae?ae:{...ae,[le]:null})}})),W&&($=setTimeout(V,6e3))};return V(),()=>{W=!1,clearTimeout($)}},[u.join(",")]),C.useEffect(()=>{if(!h||E===h)return;const W=h.indexOf("::"),$=h.slice(0,W),V=h.slice(W+2);let le=!0,ae;const je=async()=>{try{const be=await fetch(`/api/knowledge/${encodeURIComponent($)}/concept?id=${encodeURIComponent(V)}`,{cache:"no-store"}),P=be.ok?await be.json():null;le&&y(ve=>JSON.stringify(ve[h])===JSON.stringify(P)?ve:{...ve,[h]:P})}catch{le&&y(be=>h in be?be:{...be,[h]:null})}le&&(ae=setTimeout(je,6e3))};return je(),()=>{le=!1,clearTimeout(ae)}},[h,E]);function fe(W,$){const V=`${W}::${$}`;p(h===V?null:V)}async function te(W,$){const V=`${W}::${$}`;Z(!0),de("");try{const ae=await(await fetch(`/api/knowledge/${encodeURIComponent(W)}/concept`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:$,content:L})})).json();ae.error?de(ae.error):(y(je=>({...je,[V]:ae})),k(null))}catch(le){de(le.message)}Z(!1)}return n.jsxs("aside",{className:"runs-side knowledge-side",children:[n.jsx("div",{className:"kside-resizer",title:"Drag to resize",onMouseDown:W=>{W.preventDefault();const $=W.clientX,V=W.currentTarget.parentElement.offsetWidth,le=je=>o(Math.min(900,Math.max(280,V+($-je.clientX)))),ae=()=>{window.removeEventListener("mousemove",le),window.removeEventListener("mouseup",ae)};window.addEventListener("mousemove",le),window.addEventListener("mouseup",ae)}}),n.jsxs("div",{className:"side-head",children:[n.jsxs("span",{className:"kside-headline",children:[n.jsx("span",{className:"microlabel",children:"knowledge"}),n.jsx("span",{className:"kside-hint",children:"read & kept current by this agent"})]}),n.jsx("span",{className:"spacer"}),n.jsxs("button",{className:"open-raw",onClick:c,title:"Hide knowledge sidebar",children:["hide ",n.jsx(I,{name:"close",className:"ms-sm"})]})]}),n.jsx("div",{className:"side-list",children:u.map(W=>{const $=r[W],V=v[W]===!0;return n.jsxs("div",{className:"kside-bundle",children:[n.jsxs("div",{className:"kside-bundle-head",children:[n.jsxs("button",{className:"kside-bundle-toggle","aria-expanded":!V,onClick:()=>S({...v,[W]:!V}),children:[n.jsx("span",{className:`kside-chev ${V?"":"open"}`,"aria-hidden":!0,children:n.jsx(I,{name:"chevron_right",className:"ms-sm"})}),n.jsx("span",{className:"kside-bundle-name",children:W}),$&&n.jsx("span",{className:"kside-count num",children:$.concepts.length})]}),n.jsx("button",{className:"kside-open",title:"Export this bundle as PDF",onClick:()=>{dp(W)},children:n.jsx(I,{name:"picture_as_pdf",className:"ms-sm"})}),n.jsx(Ue,{href:`/knowledge/${encodeURIComponent(W)}`,className:"kside-open",title:"Open this bundle on the knowledge screen",children:"↗"})]}),!V&&$===null&&n.jsx("div",{className:"viewer-note",children:"bundle not found"}),!V&&$?.concepts.map(le=>{const ae=`${W}::${le.id}`,je=h===ae,be=`/knowledge/${encodeURIComponent(W)}/${le.id.split("/").map(encodeURIComponent).join("/")}`;return n.jsxs("div",{className:`kside-concept ${je?"open":""}`,children:[n.jsxs("button",{className:"kside-row","aria-expanded":je,title:le.description||void 0,onClick:()=>fe(W,le.id),children:[n.jsx("span",{className:`kside-chev ${je?"open":""}`,"aria-hidden":!0,children:n.jsx(I,{name:"chevron_right",className:"ms-sm"})}),n.jsx("span",{className:"kside-title",children:le.title||le.id}),le.stale&&n.jsx("span",{className:"kside-stale",title:"Past its stale-after date — ask the agent to re-verify it",children:"stale"})]}),je&&n.jsx("div",{className:"kside-card",ref:P=>P?.scrollIntoView({block:"nearest"}),children:x[ae]===void 0?n.jsx("div",{className:"viewer-note",children:"loading…"}):x[ae]===null?n.jsx("div",{className:"viewer-note",children:"could not load concept"}):E===ae?n.jsxs("div",{className:"kside-edit",children:[n.jsx("textarea",{className:"concept-edit",value:L,rows:Math.min(28,Math.max(10,L.split(`
137
+ `).length+2)),onChange:P=>Y(P.target.value),spellCheck:!1}),n.jsxs("div",{className:"kside-actions",children:[n.jsx("button",{className:"open-raw",disabled:F,onClick:()=>k(null),children:"cancel"}),n.jsx("button",{className:"open-raw",disabled:F,onClick:()=>te(W,le.id),children:F?"saving…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"check",className:"ms-sm"})," save"]})})]}),z&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",z]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"kside-card-bar",children:[le.type&&n.jsx("span",{className:"kside-type",children:le.type}),Vm(le)&&n.jsxs("span",{className:"kside-updated num",children:["updated ",pn(Vm(le))]}),n.jsx("span",{className:"spacer"}),n.jsxs("button",{className:"open-raw",onClick:()=>{Y(x[ae].raw),k(ae),de("")},children:[n.jsx(I,{name:"edit",className:"ms-sm"})," edit"]}),n.jsx(Ue,{href:be,className:"open-raw",children:"open ↗"})]}),n.jsx("div",{className:"kside-md md-body",dangerouslySetInnerHTML:{__html:rs.sanitize(Oe.parse(x[ae].body??"",{async:!1}))}})]})})]},le.id)}),!V&&$&&$.concepts.length===0&&n.jsx("div",{className:"viewer-note",children:"no concepts yet"})]},W)})})]})}function Vm(u){return[u.generated?.at,...u.verified.map(o=>o.at)].filter(o=>typeof o=="string"&&o.length>0).sort().pop()}function nb({slug:u}){const[c,o]=C.useState(!1);return C.useEffect(()=>{let r=!0;return o(!1),fetch("/api/chats").then(f=>f.json()).then(f=>{if(!r)return;const h=f.chats.find(p=>p.scope.kind==="team"&&p.scope.member===u);h?gl(`/agents/${encodeURIComponent(u)}/chat/${h.id}`,{replace:!0}):o(!0)}).catch(()=>r&&o(!0)),()=>{r=!1}},[u]),c?n.jsx(mp,{slug:u}):n.jsx("div",{className:"empty",children:"loading…"})}function sb({slug:u,chatId:c}){const o=Ge("/api/chats",!1),r=(o?.chats??[]).filter(p=>p.scope.kind==="team"&&p.scope.member===u),[f,h]=C.useState(!1);return n.jsxs("aside",{className:"runs-side",children:[n.jsxs("div",{className:"side-head",children:[n.jsx("span",{className:"microlabel",children:"sessions"}),n.jsx("span",{className:"spacer"}),n.jsx(Ue,{href:`/agents/${encodeURIComponent(u)}/info`,className:"open-raw",title:"agent profile & settings",children:"profile"}),n.jsx("button",{className:"open-raw",disabled:f,onClick:async()=>{h(!0),await vn("claude",{kind:"team",member:u}),h(!1)},children:f?"…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"add",className:"ms-sm"})," new"]})})]}),n.jsxs("div",{className:"side-list",children:[r.map(p=>n.jsxs(Ue,{href:`/agents/${encodeURIComponent(u)}/chat/${p.id}`,className:`side-row ${p.id===c?"active":""}`,children:[n.jsx("span",{className:`lamp ${p.busy?"running":"pending"}`}),n.jsxs("div",{className:"side-row-body",children:[n.jsx("div",{className:"side-row-top",children:n.jsx("span",{className:"side-wf",children:p.title||"new session"})}),n.jsx("div",{className:"side-row-sub",children:n.jsx("span",{className:"side-when num",children:pn(p.updatedAt)})})]}),n.jsx("button",{type:"button",className:"row-x",title:"delete session",onClick:async x=>{x.preventDefault(),x.stopPropagation(),window.confirm(`Delete session "${p.title||p.id}"?`)&&(await fetch(`/api/chats/${p.id}`,{method:"DELETE"}).catch(()=>{}),p.id===c&&gl(`/agents/${encodeURIComponent(u)}`))},children:n.jsx(I,{name:"close",className:"ms-sm"})})]},p.id)),o&&r.length===0&&n.jsx("div",{className:"viewer-note",children:"no sessions yet"})]})]})}function ib({chatId:u}){const c=Ge("/api/chats",!1),o=(c?.chats??[]).filter(r=>r.scope.kind!=="team");return n.jsxs("aside",{className:"runs-side",children:[n.jsxs("div",{className:"side-head",children:[n.jsx("span",{className:"microlabel",children:"chats"}),n.jsx("span",{className:"spacer"}),n.jsxs(Ue,{href:"/agents/chats",className:"open-raw",children:[n.jsx(I,{name:"add",className:"ms-sm"})," new"]})]}),n.jsxs("div",{className:"side-list",children:[o.map(r=>n.jsxs(Ue,{href:`/agents/chats/${r.id}`,className:`side-row ${r.id===u?"active":""}`,children:[n.jsx("span",{className:`lamp ${r.busy?"running":"pending"}`}),n.jsxs("div",{className:"side-row-body",children:[n.jsx("div",{className:"side-row-top",children:n.jsx("span",{className:"side-wf",children:r.title||"new chat"})}),n.jsxs("div",{className:"side-row-sub",children:[n.jsxs("span",{className:"side-req",children:[r.agent,r.scope.kind==="run"?` · ${r.scope.runId}`:r.scope.kind==="kraftwerk"?" · kraftwerk":r.scope.kind==="knowledge"?` · knowledge${r.scope.bundle?`:${r.scope.bundle}`:""}`:""]}),n.jsx("span",{className:"side-when num",children:pn(r.updatedAt)})]})]}),n.jsx("button",{type:"button",className:"row-x",title:"delete chat",onClick:async f=>{f.preventDefault(),f.stopPropagation(),window.confirm(`Delete chat "${r.title||r.id}"?`)&&(await fetch(`/api/chats/${r.id}`,{method:"DELETE"}).catch(()=>{}),r.id===u&&gl("/agents/chats"))},children:n.jsx(I,{name:"close",className:"ms-sm"})})]},r.id)),c&&o.length===0&&n.jsx("div",{className:"viewer-note",children:"no chats yet"})]})]})}function cb({hasMembers:u,root:c}){const o=Ga();return n.jsxs("div",{className:"new-chat",children:[n.jsx("div",{className:"page-head",children:n.jsx("h1",{children:"agents"})}),n.jsxs("section",{className:"panel new-chat-panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"what lives here"})}),n.jsxs("div",{className:"know-intro",children:["Your agents, set up like teammates: each one has a name, a role (system prompt), a harness/model to run on, and the workflows that belong to its job. An agent lives in"," ",n.jsx("code",{children:c?`${c}/<slug>/`:"agents/<slug>/"})," as ",n.jsx("code",{children:"agent.yml"})," +"," ",n.jsx("code",{children:"system.md"})," — git-tracked, so your team travels with the repo. Every session is a persistent conversation with that agent; it knows its connected workflows and knowledge bundles, runs the workflows for you, and keeps the knowledge current."]}),o?n.jsx("div",{style:{padding:"0 16px 16px"},children:n.jsx("button",{className:"run-btn",onClick:()=>gl("/agents/new"),children:n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"add",className:"ms-sm"})," ",u?"new agent":"create your first agent"]})})}):n.jsx("div",{className:"settings-note",style:{padding:"0 16px 16px"},children:"Creating agents needs expert mode — flip the switch in the top bar."})]})]})}function mp({slug:u}){const[c,o]=C.useState(null),[r,f]=C.useState(!1),[h,p]=C.useState(!1),[x,y]=C.useState(!1),[v,S]=C.useState(""),[E,k]=C.useState(""),[L,Y]=C.useState([]),[F,Z]=C.useState(!0),[z,de]=C.useState(!1),[fe,te]=C.useState(""),W=Ge("/api/workflows",!1),$=Ge("/api/knowledge",!1),V=Ge("/api/skills",!1);C.useEffect(()=>{let P=!0;return fetch(`/api/team/${encodeURIComponent(u)}`).then(ve=>ve.ok?ve.json():Promise.reject()).then(ve=>P&&o(ve)).catch(()=>P&&f(!0)),()=>{P=!1}},[u]);async function le(P){if(c){de(!0),te("");try{const Je=await(await fetch(`/api/team/${encodeURIComponent(u)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({name:c.name,emoji:c.emoji,description:c.description,harness:c.harness,model:c.model,effort:c.effort,group:c.group,system:c.system,workflows:c.workflows,knowledge:c.knowledge,skills:c.skills,...P})})).json();Je.error?te(Je.error):(o(Je),S(""))}catch(ve){te(ve.message)}de(!1)}}function ae(P,ve){Y(ve?[...L,P]:L.filter(Je=>Je!==P))}async function je(P){de(!0),te("");try{const Je=await(await fetch(`/api/team/${encodeURIComponent(u)}/archive`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({archived:P})})).json();Je.error?te(Je.error):o(Je)}catch(ve){te(ve.message)}de(!1)}if(r)return n.jsx("div",{className:"empty",children:"agent not found"});if(!c)return n.jsx("div",{className:"empty",children:"loading…"});const be=P=>n.jsxs("div",{className:"team-form-row",style:{marginTop:8},children:[n.jsx("button",{className:"run-btn",disabled:z,onClick:()=>{le(P)},children:z?"saving…":"save"}),n.jsx("button",{className:"open-raw",disabled:z,onClick:()=>(S(""),te("")),children:"cancel"})]});return n.jsxs("div",{className:"member-view",children:[n.jsxs("div",{className:"detail-head",children:[n.jsx("span",{className:"agent-avatar lg",children:n.jsx("span",{"aria-hidden":!0,children:c.emoji})}),n.jsx("h1",{children:c.name}),n.jsx("span",{className:"chip agent",children:c.harness}),c.model&&n.jsx("span",{className:"chip",children:c.model}),c.effort&&n.jsxs("span",{className:"chip",children:["effort: ",c.effort]}),c.archived&&n.jsxs("span",{className:"chip archived-chip",children:[n.jsx(I,{name:"inventory_2",className:"ms-sm"})," archived"]}),n.jsx("span",{className:"spacer"}),n.jsx(Ue,{href:`/agents/${encodeURIComponent(u)}/edit`,className:"open-raw",children:"edit"}),c.archived?n.jsxs("button",{className:"run-btn tonal",disabled:z,onClick:()=>{je(!1)},children:[n.jsx(I,{name:"unarchive",className:"ms-sm"})," ",z?"…":"unarchive"]}):n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"open-raw",disabled:z,title:"Hide this agent from the roster — restorable any time",onClick:()=>{je(!0)},children:[n.jsx(I,{name:"archive",className:"ms-sm"})," archive"]}),n.jsx("button",{className:"run-btn",disabled:h,onClick:async()=>{p(!0),await vn("claude",{kind:"team",member:u}),p(!1)},children:h?"starting…":"new session"})]})]}),n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"m3-list",children:[n.jsxs("button",{type:"button",className:"m3-row m3-toggle",onClick:()=>y(!x),children:[n.jsx("span",{className:"m3-ico",children:n.jsx(I,{name:"badge"})}),n.jsxs("span",{className:"m3-body",children:[n.jsx("span",{className:"m3-head",children:"role"}),!x&&n.jsx("span",{className:"m3-sub m3-ellipsis",children:(c.system||"").trim().split(`
138
+ `)[0]||"empty — expand to give this agent a role"})]}),n.jsx("span",{className:`m3-chev ${x?"open":""}`,children:n.jsx(I,{name:"expand_more",className:"ms-sm"})})]}),x&&v!=="role"&&n.jsxs("div",{className:"m3-expand",children:[n.jsx("pre",{children:c.system||"(empty — click edit to give this agent a role)"}),n.jsxs("div",{className:"team-form-row",style:{marginTop:10},children:[n.jsxs("button",{className:"open-raw",onClick:()=>{k(c.system),S("role"),te("")},children:[n.jsx(I,{name:"edit",className:"ms-sm"})," edit role"]}),n.jsx("span",{className:"spacer"}),n.jsxs("span",{className:"m3-sub",children:["agents/",c.slug,"/system.md"]})]})]}),x&&v==="role"&&n.jsxs("div",{className:"m3-expand",children:[n.jsx("textarea",{className:"concept-edit",rows:Math.min(24,Math.max(8,E.split(`
139
+ `).length+2)),value:E,placeholder:"You are the ... for this project. Your job is ...",onChange:P=>k(P.target.value),spellCheck:!1}),be({system:E})]}),n.jsxs("div",{className:"m3-row",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(I,{name:"account_tree"})}),n.jsxs("span",{className:"m3-body",children:[n.jsx("span",{className:"m3-head",children:"workflows"}),v==="workflows"?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"wf-checks",children:[(W?.workflows??[]).map(P=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:L.includes(P.slug),onChange:ve=>ae(P.slug,ve.target.checked)}),n.jsx("b",{children:P.slug}),P.description&&n.jsxs("span",{className:"opt-hint",children:[" — ",P.description]})]},P.slug)),(W?.workflows??[]).length===0&&n.jsx("div",{className:"viewer-note",children:"no workflows in this project"})]}),be({workflows:L})]}):c.workflows.length===0?n.jsx("span",{className:"m3-sub",children:"none connected — the agent can run any workflow you connect"}):n.jsx("span",{className:"m3-chips",children:c.workflows.map(P=>n.jsx(Ue,{href:`/workflows/${encodeURIComponent(P)}`,className:"chip",children:P},P))})]}),v!=="workflows"&&n.jsx("button",{className:"open-raw",onClick:()=>{Y(c.workflows),S("workflows"),te("")},children:"edit"})]}),n.jsxs("div",{className:"m3-row",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(I,{name:"menu_book"})}),n.jsxs("span",{className:"m3-body",children:[n.jsx("span",{className:"m3-head",children:"knowledge"}),v==="knowledge"?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"wf-checks",children:[($?.bundles??[]).map(P=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:L.includes(P.name),onChange:ve=>ae(P.name,ve.target.checked)}),n.jsx("b",{children:P.name}),n.jsxs("span",{className:"opt-hint",children:[" — ",P.concepts," concepts"]})]},P.name)),($?.bundles??[]).length===0&&n.jsx("div",{className:"viewer-note",children:"no knowledge bundles in this project"})]}),be({knowledge:L})]}):c.knowledge.length===0?n.jsx("span",{className:"m3-sub",children:"none connected — connected bundles are read and kept current by the agent"}):n.jsx("span",{className:"m3-chips",children:c.knowledge.map(P=>n.jsx(Ue,{href:`/knowledge/${encodeURIComponent(P)}`,className:"chip",children:P},P))})]}),v!=="knowledge"&&n.jsx("button",{className:"open-raw",onClick:()=>{Y(c.knowledge),S("knowledge"),te("")},children:"edit"})]}),n.jsxs("div",{className:"m3-row",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(I,{name:"extension"})}),n.jsxs("span",{className:"m3-body",children:[n.jsx("span",{className:"m3-head",children:"shared skills"}),v==="skills"?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"wf-checks",children:[n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:F,onChange:P=>Z(P.target.checked)}),n.jsx("b",{children:"all skills"}),n.jsx("span",{className:"opt-hint",children:" — every discovered skill, including future ones"})]}),!F&&(V?.skills??[]).map(P=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:L.includes(P.name),onChange:ve=>ae(P.name,ve.target.checked)}),n.jsxs("b",{children:["/",P.name]}),P.description&&n.jsxs("span",{className:"opt-hint",children:[" — ",P.description]})]},P.name)),!F&&(V?.skills??[]).length===0&&n.jsx("div",{className:"viewer-note",children:"no skills found (.claude/skills, project or user)"})]}),be({skills:F?void 0:L})]}):c.skills===void 0?n.jsx("span",{className:"m3-sub",children:"all discovered skills (default) — invoke with /name in a session"}):c.skills.length===0?n.jsx("span",{className:"m3-sub",children:"none — this agent runs without skills"}):n.jsx("span",{className:"m3-chips",children:c.skills.map(P=>n.jsxs("span",{className:"chip",children:["/",P]},P))})]}),v!=="skills"&&n.jsx("button",{className:"open-raw",onClick:()=>{Z(c.skills===void 0),Y(c.skills??[]),S("skills"),te("")},children:"edit"})]})]}),fe&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",fe]})]}),n.jsx(rb,{slug:u}),n.jsx(ob,{slug:u})]})}const ub=`---
140
+ description: What this skill is for (one line)
141
+ ---
142
+
143
+ Instructions this agent follows when the skill applies or is invoked with /<name>.
144
+ `;function rb({slug:u}){const o=Ge(`/api/team/${encodeURIComponent(u)}/skills`,!1)?.skills??[],[r,f]=C.useState(null),[h,p]=C.useState(!1),[x,y]=C.useState("");async function v(k){y("");const L=await fetch(`/api/team/${encodeURIComponent(u)}/skills/${encodeURIComponent(k)}`),Y=await L.json().catch(()=>null);if(!L.ok||!Y||Y.error)return void y(Y?.error??"could not load skill");f({name:k,content:Y.content??"",isNew:!1})}async function S(){if(!r)return;p(!0),y("");const L=await(await fetch(`/api/team/${encodeURIComponent(u)}/skills`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:r.name,content:r.content})})).json().catch(()=>({error:"save failed"}));p(!1),L.error?y(L.error):f(null)}async function E(k){window.confirm(`Delete skill "/${k}" of this agent (its folder is removed)?`)&&(await fetch(`/api/team/${encodeURIComponent(u)}/skills/${encodeURIComponent(k)}`,{method:"DELETE"}).catch(()=>{}),r?.name===k&&f(null))}return n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"own skills — only this agent"}),n.jsx("span",{className:"spacer"}),!r&&n.jsxs("button",{className:"open-raw",onClick:()=>{f({name:"",content:ub,isNew:!0}),y("")},children:[n.jsx(I,{name:"add",className:"ms-sm"})," new skill"]})]}),o.length===0&&!r&&n.jsxs("div",{className:"viewer-note",children:["none — skills in ",n.jsxs("code",{children:["agents/",u,"/skills/"]})," are private to this agent; skills for every agent live in the workspace skills folder."]}),o.length>0&&!r&&n.jsx("div",{className:"m3-list",children:o.map(k=>n.jsxs("div",{className:"m3-row",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(I,{name:"extension"})}),n.jsxs("span",{className:"m3-body",children:[n.jsxs("span",{className:"m3-head",children:["/",k.name]}),n.jsx("span",{className:"m3-sub",children:k.description||n.jsx("code",{children:"SKILL.md"})})]}),n.jsxs("button",{className:"open-raw",onClick:()=>{v(k.name)},children:[n.jsx(I,{name:"edit",className:"ms-sm"})," edit"]}),n.jsx("button",{className:"open-raw",onClick:()=>{E(k.name)},children:n.jsx(I,{name:"close",className:"ms-sm"})})]},k.name))}),r&&n.jsxs("div",{className:"team-form",children:[n.jsx("div",{className:"team-form-row",children:n.jsxs("label",{className:"team-field",style:{flex:1},children:["name — invoked as /<name>",n.jsx("input",{value:r.name,placeholder:"e.g. report-html",disabled:!r.isNew,onChange:k=>f({...r,name:k.target.value})})]})}),n.jsxs("label",{className:"team-field",children:["SKILL.md — frontmatter (description) + the instructions",n.jsx("textarea",{className:"concept-edit",rows:Math.min(28,Math.max(12,r.content.split(`
145
+ `).length+2)),value:r.content,spellCheck:!1,onChange:k=>f({...r,content:k.target.value})})]}),n.jsxs("div",{className:"team-form-row",children:[n.jsx("button",{className:"run-btn",disabled:h||!r.name.trim(),onClick:()=>{S()},children:h?"saving…":"save"}),n.jsx("button",{className:"open-raw",disabled:h,onClick:()=>f(null),children:"cancel"})]})]}),x&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",x]})]})}function ob({slug:u}){const o=Ge(`/api/team/${encodeURIComponent(u)}/routines`,!1)?.routines??[],[r,f]=C.useState(null),[h,p]=C.useState(""),[x,y]=C.useState("");async function v(k){p("");const Y=await(await fetch(`/api/team/${encodeURIComponent(u)}/routines`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(k)})).json();return Y.error?(p(Y.error),!1):!0}async function S(k){y(k),p("");const Y=await(await fetch(`/api/team/${encodeURIComponent(u)}/routines/${encodeURIComponent(k)}/run`,{method:"POST"})).json();y(""),Y.error?p(Y.error):Y.chatId&&gl(`/agents/${encodeURIComponent(u)}/chat/${Y.chatId}`)}async function E(k){window.confirm(`Delete routine "${k}"?`)&&await fetch(`/api/team/${encodeURIComponent(u)}/routines/${encodeURIComponent(k)}`,{method:"DELETE"}).catch(()=>{})}return n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"routines — scheduled prompts"}),n.jsx("span",{className:"spacer"}),!r&&n.jsxs("button",{className:"open-raw",onClick:()=>f({name:"",schedule:"0 9 * * 1-5",prompt:"",enabled:!0}),children:[n.jsx(I,{name:"add",className:"ms-sm"})," new routine"]})]}),o.length===0&&!r&&n.jsx("div",{className:"viewer-note",children:"none — a routine messages this agent on a schedule (cron, server local time) and each run opens a new session with the result."}),o.length>0&&n.jsx("div",{className:"m3-list",children:o.map(k=>n.jsxs("div",{className:"m3-row",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(I,{name:"schedule"})}),n.jsxs("span",{className:"m3-body",children:[n.jsxs("span",{className:"m3-head",children:[k.name,k.lastError&&n.jsx("span",{className:"chip stale",title:k.lastError,children:"error"})]}),n.jsxs("span",{className:"m3-sub",children:[n.jsx("code",{children:k.schedule}),k.enabled?k.nextRunAt?` · next ${pn(k.nextRunAt)}`:"":" · paused"," · ",k.lastChatId?n.jsxs(Ue,{href:`/agents/${encodeURIComponent(u)}/chat/${k.lastChatId}`,children:["last run ",pn(k.lastRunAt)]}):"never ran"]})]}),n.jsx("button",{className:"open-raw",disabled:x===k.id,onClick:()=>S(k.id),children:x===k.id?"starting…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"play_arrow",className:"ms-sm"})," run"]})}),n.jsx("button",{className:"open-raw",onClick:()=>f({id:k.id,name:k.name,schedule:k.schedule,prompt:k.prompt,enabled:k.enabled}),children:"edit"}),n.jsx("button",{className:"open-raw",onClick:()=>{E(k.id)},children:"delete"}),n.jsxs("label",{className:"m3-switch",title:k.enabled?"enabled — click to pause":"paused — click to enable",children:[n.jsx("input",{type:"checkbox",checked:k.enabled,onChange:()=>{v({id:k.id,name:k.name,schedule:k.schedule,prompt:k.prompt,enabled:!k.enabled})}}),n.jsx("span",{className:"m3-switch-track"})]})]},k.id))}),r&&n.jsxs("div",{className:"team-form",children:[n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{flex:1},children:["name",n.jsx("input",{value:r.name,placeholder:"e.g. Morning report",onChange:k=>f({...r,name:k.target.value})})]}),n.jsxs("label",{className:"team-field",style:{width:200},children:["schedule (cron)",n.jsx("input",{value:r.schedule,placeholder:"0 9 * * 1-5",onChange:k=>f({...r,schedule:k.target.value})})]}),n.jsxs("label",{className:"team-field wf-checks",style:{width:90},children:["enabled",n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:r.enabled,onChange:k=>f({...r,enabled:k.target.checked})}),"on"]})]})]}),n.jsxs("label",{className:"team-field",children:["prompt — what to ask this agent on each run",n.jsx("textarea",{rows:5,value:r.prompt,placeholder:"Check ... and summarize what changed.",onChange:k=>f({...r,prompt:k.target.value})})]}),n.jsxs("div",{className:"team-form-row",children:[n.jsx("button",{className:"run-btn",disabled:!r.name.trim()||!r.prompt.trim(),onClick:async()=>{await v(r)&&f(null)},children:r.id?"save routine":"create routine"}),n.jsx("button",{className:"open-raw",onClick:()=>(f(null),p("")),children:"cancel"})]})]}),h&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",h]})]})}function Km({slug:u}){const[c,o]=C.useState(u?null:L()),[r,f]=C.useState(""),[h,p]=C.useState(!1),y=Ge("/api/workflows",!1)?.workflows??[],S=Ge("/api/knowledge",!1)?.bundles??[],k=Ge("/api/skills",!1)?.skills??[];C.useEffect(()=>{u&&fetch(`/api/team/${encodeURIComponent(u)}`).then(z=>z.ok?z.json():Promise.reject()).then(z=>o({name:z.name,emoji:z.emoji,description:z.description??"",harness:z.harness,model:z.model??"",effort:z.effort??"",group:z.group??"",system:z.system,workflows:z.workflows,knowledge:z.knowledge??[],skillsAll:z.skills===void 0,skills:z.skills??[]})).catch(()=>f("agent not found"))},[u]);function L(){return{name:"",emoji:"🤖",description:"",harness:"claude",model:"",effort:"",group:"",system:"",workflows:[],knowledge:[],skillsAll:!0,skills:[]}}async function Y(){if(!c)return;p(!0),f("");const de=await(await fetch(u?`/api/team/${encodeURIComponent(u)}`:"/api/team",{method:u?"PUT":"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...c,skills:c.skillsAll?void 0:c.skills})})).json();p(!1),de.error?f(de.error):gl(`/agents/${encodeURIComponent(de.slug)}/info`)}async function F(){!u||!window.confirm(`Delete agent "${u}" and its definition folder?`)||(await fetch(`/api/team/${encodeURIComponent(u)}`,{method:"DELETE"}).catch(()=>{}),gl("/agents"))}if(!c)return n.jsx("div",{className:"empty",children:r||"loading…"});const Z=z=>o({...c,...z});return n.jsxs("div",{className:"new-chat",children:[n.jsx("div",{className:"page-head",children:n.jsx("h1",{children:u?`edit ${u}`:"new agent"})}),n.jsx("section",{className:"panel new-chat-panel",children:n.jsxs("div",{className:"team-form",children:[n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{flex:1},children:["name",n.jsx("input",{value:c.name,placeholder:"e.g. Max",onChange:z=>Z({name:z.target.value})})]}),n.jsxs("label",{className:"team-field",style:{width:90},children:["emoji",n.jsx("input",{value:c.emoji,onChange:z=>Z({emoji:z.target.value})})]})]}),n.jsx("div",{className:"emoji-pick",children:lb.map(z=>n.jsx("button",{type:"button",className:c.emoji===z?"active":"",onClick:()=>Z({emoji:z}),children:z},z))}),n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{flex:1},children:["description",n.jsx("input",{value:c.description,placeholder:"one line: what this agent is for",onChange:z=>Z({description:z.target.value})})]}),n.jsxs("label",{className:"team-field",style:{width:180},children:["group",n.jsx("input",{value:c.group,placeholder:"none",onChange:z=>Z({group:z.target.value})})]})]}),n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{width:140},children:["harness",n.jsxs("select",{value:c.harness,onChange:z=>Z({harness:z.target.value}),children:[n.jsx("option",{value:"claude",children:"claude"}),n.jsx("option",{value:"codex",children:"codex"}),n.jsx("option",{value:"pi",children:"pi"})]})]}),n.jsxs("label",{className:"team-field",style:{flex:1},children:["model",n.jsx("input",{value:c.model,placeholder:"harness default — e.g. sonnet, gpt-5.6-sol",onChange:z=>Z({model:z.target.value})})]}),n.jsxs("label",{className:"team-field",style:{width:140},children:["effort",n.jsx("select",{value:c.effort,onChange:z=>Z({effort:z.target.value}),children:tb.map(z=>n.jsx("option",{value:z,children:z||"default"},z))})]})]}),n.jsxs("label",{className:"team-field",children:["system prompt — the agent's role",n.jsx("textarea",{rows:10,value:c.system,placeholder:"You are the ... for this project. Your job is ...",onChange:z=>Z({system:z.target.value})})]}),n.jsxs("div",{className:"team-field",children:[n.jsx("span",{className:"team-field-label",children:"connected workflows — autoloaded into the agent's context; it can run them"}),n.jsxs("div",{className:"wf-checks",children:[y.map(z=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:c.workflows.includes(z.slug),onChange:de=>Z({workflows:de.target.checked?[...c.workflows,z.slug]:c.workflows.filter(fe=>fe!==z.slug)})}),n.jsx("b",{children:z.slug}),z.description&&n.jsxs("span",{className:"opt-hint",children:[" — ",z.description]})]},z.slug)),y.length===0&&n.jsx("div",{className:"viewer-note",children:"no workflows in this project"})]})]}),n.jsxs("div",{className:"team-field",children:[n.jsx("span",{className:"team-field-label",children:"connected knowledge — OKF bundles the agent consults and maintains"}),n.jsxs("div",{className:"wf-checks",children:[S.map(z=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:c.knowledge.includes(z.name),onChange:de=>Z({knowledge:de.target.checked?[...c.knowledge,z.name]:c.knowledge.filter(fe=>fe!==z.name)})}),n.jsx("b",{children:z.name}),n.jsxs("span",{className:"opt-hint",children:[" — ",z.concepts," concepts"]})]},z.name)),S.length===0&&n.jsx("div",{className:"viewer-note",children:"no knowledge bundles in this project"})]})]}),n.jsxs("div",{className:"team-field",children:[n.jsx("span",{className:"team-field-label",children:"connected skills — workspace skill packages (see the skills tab); invoked with /name in sessions"}),n.jsxs("div",{className:"wf-checks",children:[n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:c.skillsAll,onChange:z=>Z({skillsAll:z.target.checked})}),n.jsx("b",{children:"all skills"}),n.jsx("span",{className:"opt-hint",children:" — every discovered skill, including future ones"})]}),!c.skillsAll&&k.map(z=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:c.skills.includes(z.name),onChange:de=>Z({skills:de.target.checked?[...c.skills,z.name]:c.skills.filter(fe=>fe!==z.name)})}),n.jsxs("b",{children:["/",z.name]}),z.description&&n.jsxs("span",{className:"opt-hint",children:[" — ",z.description]})]},z.name)),!c.skillsAll&&k.length===0&&n.jsx("div",{className:"viewer-note",children:"no skills found (.claude/skills, project or user)"})]})]}),r&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",r]}),n.jsxs("div",{className:"team-form-row",children:[n.jsx("button",{className:"run-btn",disabled:!c.name.trim()||h,onClick:Y,children:h?"saving…":u?"save":"create"}),n.jsx("span",{className:"spacer"}),u&&n.jsx("button",{className:"stop-btn",onClick:F,children:"delete agent"})]})]})})]})}function fb(){const[u,c]=C.useState(null),[o,r]=C.useState(""),[f,h]=C.useState(""),[p,x]=C.useState([]),[y,v]=C.useState(!1),[S,E]=C.useState(!1),[k,L]=C.useState(!1),[Y,F]=C.useState("");C.useEffect(()=>{fetch("/api/settings").then(te=>te.json()).then(te=>{c(te),r(te.config.name??""),h(te.config.icon??""),x(te.config.switcher??[])}).catch(()=>F("could not load settings"))},[]);const Z=()=>{v(!0),L(!1),F("")};async function z(){E(!0),F("");try{const te=await fetch("/api/settings",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({name:o,icon:f,switcher:p})}),W=await te.json();if(!te.ok)throw new Error(W.error||"save failed");c(W),x(W.config.switcher??[]),v(!1),L(!0),window.dispatchEvent(new Event("kw-meta-refresh"))}catch(te){F(te.message)}finally{E(!1)}}const de=(te,W)=>{x($=>$.map((V,le)=>le===te?{...V,...W}:V)),Z()};if(!u)return n.jsx("div",{className:"empty",children:Y||"loading…"});const fe=[["port",String(u.resolved.port),"kraftwerk ui listens here (CLI --port wins)"],["workflows",u.resolved.workflowsRoot??"— none found","workflow definitions"],["output",u.resolved.outputDir,"run artifacts"],["knowledge",u.config.knowledge??"knowledge","OKF knowledge bundles"],["agents",u.config.agents??"agents","team agent definitions"],["skills",u.config.skills??"skills","workspace skills"]];return n.jsxs("div",{className:"settings-screen",children:[n.jsxs("div",{className:"settings-head",children:[n.jsxs("h1",{children:[n.jsx(I,{name:"settings",className:"ms-lg"})," Settings"]}),n.jsx("span",{className:"spacer"}),Y&&n.jsx("span",{className:"settings-err",children:Y}),k&&!y&&n.jsxs("span",{className:"settings-saved",children:[n.jsx(I,{name:"check",className:"ms-sm"})," saved"]}),n.jsx("button",{className:"run-btn",disabled:S||!y,onClick:()=>{z()},children:S?"saving…":"save changes"})]}),n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"workspace"})}),n.jsxs("div",{className:"team-form",children:[n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{width:90},children:["icon",n.jsx("input",{value:f,placeholder:"🤖",onChange:te=>{h(te.target.value),Z()}})]}),n.jsxs("label",{className:"team-field",style:{flex:1},children:["name",n.jsx("input",{value:o,placeholder:"my workspace",onChange:te=>{r(te.target.value),Z()}})]})]}),n.jsx("div",{className:"settings-note",children:"Shown in the header, browser tab and to other workspaces discovering this one."})]})]}),n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"workspace switcher"}),n.jsx("span",{className:"spacer"}),n.jsxs("button",{className:"run-btn tonal",onClick:()=>{x(te=>[...te,{name:"",url:"http://localhost:"}]),Z()},children:[n.jsx(I,{name:"add",className:"ms-sm"})," add entry"]})]}),n.jsxs("div",{className:"team-form",children:[p.length===0&&n.jsx("div",{className:"settings-note",children:"No manual entries."}),p.map((te,W)=>n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{width:70},children:["icon",n.jsx("input",{value:te.icon??"",placeholder:"•",onChange:$=>de(W,{icon:$.target.value})})]}),n.jsxs("label",{className:"team-field",style:{flex:1},children:["name",n.jsx("input",{value:te.name,placeholder:"other workspace",onChange:$=>de(W,{name:$.target.value})})]}),n.jsxs("label",{className:"team-field",style:{flex:1.4},children:["url",n.jsx("input",{value:te.url,placeholder:"http://localhost:1982",onChange:$=>de(W,{url:$.target.value})})]}),n.jsx("button",{className:"row-x settings-row-x",title:"remove entry",onClick:()=>{x($=>$.filter((V,le)=>le!==W)),Z()},children:n.jsx(I,{name:"close",className:"ms-sm"})})]},W)),n.jsx("div",{className:"settings-note",children:"Running workspaces on this machine are discovered automatically — manual entries are for remote instances or extra links."})]})]}),n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"paths & port"}),n.jsx("span",{className:"spacer"}),n.jsx("code",{className:"settings-file",title:u.configPath,children:u.exists?u.configPath:`${u.configPath} (not created yet)`})]}),n.jsx("div",{className:"settings-kv-list",children:fe.map(([te,W,$])=>n.jsxs("div",{className:"settings-kv",children:[n.jsx("span",{className:"microlabel",children:te}),n.jsx("code",{children:W}),n.jsx("span",{className:"settings-kv-hint",children:$})]},te))}),n.jsxs("div",{className:"settings-note",style:{padding:"0 18px 14px"},children:["Read-only here — edit ",n.jsx("code",{children:"kraftwerk.yml"})," directly to change these."]})]})]})}function db(){const c=Ex().split("/").filter(Boolean),[o,r]=C.useState(""),[f,h]=C.useState(""),[p,x]=C.useState([]);C.useEffect(()=>{let v=!0,S;const E=async()=>{try{const L=await fetch("/api/meta",{cache:"no-store"}).then(Y=>Y.json());if(!v)return;r(L.projectName??""),h(L.projectIcon??""),x(Array.isArray(L.switcher)?L.switcher:[])}catch{}v&&(S=setTimeout(E,3e4))};E();const k=()=>{clearTimeout(S),E()};return window.addEventListener("kw-meta-refresh",k),()=>{v=!1,clearTimeout(S),window.removeEventListener("kw-meta-refresh",k)}},[]),C.useEffect(()=>{if(Ax(o?`${o} — kraftwerk`:"kraftwerk inspector"),!f)return;const v=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="0.9em" font-size="85">${f}</text></svg>`;let S=document.querySelector('link[rel="icon"]');S||(S=document.createElement("link"),S.rel="icon",document.head.appendChild(S)),S.href=`data:image/svg+xml,${encodeURIComponent(v)}`},[o,f]);let y;return c[0]==="runs"&&c[1]?y=n.jsx(xy,{id:c[1]}):c[0]==="runs"?y=n.jsx(mb,{}):c[0]==="workflows"&&c[1]?y=n.jsx(_y,{slug:decodeURIComponent(c[1])}):c[0]==="workflows"?y=n.jsx(Ay,{}):c[0]==="chats"?y=n.jsx(Zm,{seg:c}):c[0]==="skills"?y=n.jsx(Wy,{name:c[1]?decodeURIComponent(c[1]):void 0}):c[0]==="settings"?y=n.jsx(fb,{}):c[0]==="agents"||c[0]==="team"?y=n.jsx(Zm,{seg:c.slice(1)}):c[0]==="knowledge"?y=n.jsx(Yy,{bundle:c[1]?decodeURIComponent(c[1]):void 0,conceptId:c.length>2?c.slice(2).map(decodeURIComponent).join("/"):void 0}):y=n.jsx(Uy,{}),n.jsxs(n.Fragment,{children:[n.jsxs("header",{className:"topbar",children:[n.jsxs("span",{className:"wordmark",children:[n.jsx("a",{href:"#/",className:"home-link",title:"Dashboard",children:f||n.jsx(I,{name:"home"})}),o&&n.jsx(hb,{name:o,icon:f,entries:p})]}),n.jsxs("nav",{children:[n.jsxs("a",{href:"#/agents",children:[n.jsx(I,{name:"groups"})," agents"]}),n.jsxs("a",{href:"#/knowledge",children:[n.jsx(I,{name:"menu_book"})," context & knowledge"]}),n.jsxs("a",{href:"#/workflows",children:[n.jsx(I,{name:"account_tree"})," workflows"]}),n.jsxs("a",{href:"#/runs",children:[n.jsx(I,{name:"history"})," workflow runs"]}),n.jsxs("a",{href:"#/skills",children:[n.jsx(I,{name:"extension"})," skills"]})]}),n.jsx("span",{className:"spacer"}),n.jsx(pb,{}),n.jsx(gb,{}),n.jsx(xb,{})]}),n.jsx("main",{className:"shell",children:y})]})}function hb({name:u,icon:c,entries:o}){const[r,f]=C.useState(!1);return C.useEffect(()=>{if(!r)return;const h=p=>{p.target.closest(".switcher-wrap")||f(!1)};return window.addEventListener("mousedown",h),()=>window.removeEventListener("mousedown",h)},[r]),o.length===0?n.jsx("span",{className:"env-name",title:"Project (kraftwerk.yml: name)",children:u}):n.jsxs("span",{className:"switcher-wrap",children:[n.jsxs("button",{className:"env-name env-switch",title:"Switch workspace (kraftwerk.yml: switcher)","aria-haspopup":"menu","aria-expanded":r,onClick:()=>f(h=>!h),children:[u,n.jsx(I,{name:"expand_more"})]}),r&&n.jsxs("div",{className:"switcher-pop",role:"menu",children:[n.jsx("div",{className:"switcher-head",children:"Workspaces"}),n.jsxs("span",{className:"switcher-item current","aria-current":"true",children:[n.jsx("span",{className:"switcher-icon",children:c||"•"}),n.jsxs("span",{className:"switcher-text",children:[n.jsx("span",{className:"switcher-name",children:u}),n.jsx("span",{className:"switcher-sub",children:"this workspace"})]}),n.jsx("span",{className:"switcher-hint",children:"current"})]}),o.map(h=>n.jsxs("a",{className:"switcher-item",role:"menuitem",href:h.url,children:[n.jsx("span",{className:"switcher-icon",children:h.icon||"•"}),n.jsxs("span",{className:"switcher-text",children:[n.jsx("span",{className:"switcher-name",children:h.name}),n.jsxs("span",{className:"switcher-sub",children:[h.live&&n.jsx("span",{className:"live-dot",title:"running"}),h.url.replace(/^https?:\/\//,"")]})]})]},h.url))]})]})}function mb(){const[u,c]=C.useState(null);return C.useEffect(()=>{let o=!0;return fetch("/api/runs").then(r=>r.json()).then(r=>{o&&(r.runs.length>0?gl(`/runs/${r.runs[0].id}`,{replace:!0}):c({outputDir:r.outputDir}))}).catch(()=>{}),()=>{o=!1}},[]),u?n.jsxs("div",{className:"empty",children:["No runs found in ",n.jsx("code",{children:u.outputDir}),". Start one with"," ",n.jsx("code",{children:"kraftwerk run <workflow> <request>"})," or from a workflow page."]}):n.jsx("div",{className:"empty",children:"loading…"})}function pb(){const[u,c]=C.useState(null),[o,r]=C.useState(!1);C.useEffect(()=>{let p=!0,x;const y=async()=>{try{const v=await fetch("/api/meta",{cache:"no-store"}).then(S=>S.json());p&&c(v)}catch{}p&&(x=setTimeout(y,3e4))};return y(),()=>{p=!1,clearTimeout(x)}},[]);const f=u?.restartable&&u.diskVersion&&u.diskVersion!==u.version?u.diskVersion:null;async function h(){if(f){r(!0),await fetch("/api/restart",{method:"POST"}).catch(()=>{});for(let p=0;p<60;p++){await new Promise(x=>setTimeout(x,500));try{if((await fetch("/api/meta",{cache:"no-store"}).then(y=>y.json())).version===f)break}catch{}}location.reload()}}return!f&&!o?null:n.jsx("button",{className:"relaunch-note",disabled:o,title:`v${f} is installed on disk, the server still runs v${u?.version}. Click to relaunch with the new version.`,onClick:()=>{h()},children:o?"relaunching…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"restart_alt",className:"ms-sm"})," v",f," ready — relaunch"]})})}function gb(){const u=Ga();return n.jsxs("button",{className:`expert-toggle ${u?"on":""}`,title:u?"Expert mode on — full detail":"Expert mode off — simplified view","aria-pressed":u,onClick:()=>_x(!u),children:[n.jsx("span",{className:"expert-track",children:n.jsx("span",{className:"expert-knob"})}),"expert"]})}function xb(){const[u,c]=C.useState(!1),[o,r]=C.useState(null),[f,h]=C.useState(null),[p,x]=C.useState("");C.useEffect(()=>{if(!u)return;fetch("/api/runs").then(S=>S.json()).then(r).catch(()=>{}),fetch("/api/workflows").then(S=>S.json()).then(h).catch(()=>{}),fetch("/api/meta").then(S=>S.json()).then(S=>x(S.version)).catch(()=>{});const v=S=>{S.target.closest(".info-wrap")||c(!1)};return window.addEventListener("mousedown",v),()=>window.removeEventListener("mousedown",v)},[u]);const y=o?.runs[0];return n.jsxs("span",{className:"info-wrap",children:[n.jsx("button",{className:"info-btn",title:"Project info","aria-label":"Project info",onClick:()=>c(v=>!v),children:n.jsx(I,{name:"info"})}),u&&n.jsxs("div",{className:"info-pop",children:[n.jsxs("div",{className:"info-row",children:[n.jsx("span",{className:"microlabel",children:"Workflows"}),n.jsx("span",{className:"info-v",children:f?`${f.workflows.length} discovered`:"…"}),n.jsx("code",{className:"info-path",title:f?.root,children:f?.root??""})]}),n.jsxs("div",{className:"info-row",children:[n.jsx("span",{className:"microlabel",children:"Runs"}),n.jsxs("span",{className:"info-v",children:[o?`${o.runs.length} total`:"…",y?` · latest ${y.status}`:""]}),n.jsx("code",{className:"info-path",title:o?.outputDir,children:o?.outputDir??""})]}),n.jsxs("div",{className:"info-row info-actions",children:[n.jsx("span",{className:"microlabel",children:"Workspace"}),n.jsxs("a",{className:"update-btn",href:"#/settings",onClick:()=>c(!1),children:[n.jsx(I,{name:"settings",className:"ms-sm"})," settings"]})]}),n.jsxs("div",{className:"info-row info-actions",children:[n.jsx("span",{className:"microlabel",children:"Theme"}),n.jsx(bb,{})]}),n.jsxs("div",{className:"info-row info-actions",children:[n.jsx("span",{className:"microlabel",children:"Version"}),n.jsx("span",{className:"info-v mono",children:p?`kraftwerk ${p}`:"…"}),n.jsx(yb,{})]})]})]})}function vb(u,c){const o=u.split(".").map(Number),r=c.split(".").map(Number);for(let f=0;f<3;f++)if((o[f]??0)!==(r[f]??0))return(o[f]??0)<(r[f]??0);return!1}function yb(){const[u,c]=C.useState("idle"),[o,r]=C.useState(null);async function f(){c("busy");try{const h=await fetch("/api/update-check",{cache:"no-store"}),p=await h.json();if(!h.ok||!p.latest)throw new Error;r(p),c("done")}catch{c("err")}}return u==="done"&&o?vb(o.current,o.latest)?n.jsxs("span",{className:"update-result newer",children:["v",o.latest," available — ",n.jsxs("code",{children:["npm i -g ",o.name,"@latest"]})]}):n.jsxs("span",{className:"update-result",children:[n.jsx(I,{name:"check",className:"ms-sm"})," up to date"]}):n.jsx("button",{className:"update-btn",disabled:u==="busy",onClick:()=>{f()},children:u==="busy"?"checking…":u==="err"?"npm unreachable — retry":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"sync",className:"ms-sm"})," check for updates"]})})}function bb(){return n.jsx("button",{className:"theme-btn",onClick:()=>{const u=document.documentElement,c=u.dataset.theme==="light"?"dark":"light";u.dataset.theme=c;try{localStorage.setItem("kw-theme",c)}catch{}},children:"day / night"})}Tx.createRoot(document.getElementById("root")).render(n.jsx(C.StrictMode,{children:n.jsx(db,{})}));