difit 3.1.11 → 3.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/utils.js +10 -4
- package/dist/client/assets/index-AQuNl5mW.js +92 -0
- package/dist/client/assets/{prism-csharp-Bz_zphOC.js → prism-csharp-C7x4qFLG.js} +1 -1
- package/dist/client/assets/{prism-hcl-HO7lwwhc.js → prism-hcl-CBjfvIjf.js} +1 -1
- package/dist/client/assets/{prism-java-Dh0Q2eOX.js → prism-java-Ca4SeKTf.js} +1 -1
- package/dist/client/assets/{prism-perl-D_qbRz8N.js → prism-perl-B_RTNjmx.js} +1 -1
- package/dist/client/assets/{prism-php-Dgr7EUBn.js → prism-php-Y4QWW5YT.js} +1 -1
- package/dist/client/assets/{prism-ruby-CaFchRnn.js → prism-ruby-CQyeYrqM.js} +1 -1
- package/dist/client/assets/{prism-solidity-CDfI790k.js → prism-solidity-DNiu86MI.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/git-diff.d.ts +9 -1
- package/dist/server/git-diff.js +56 -88
- package/dist/server/git-diff.test.js +19 -28
- package/dist/server/server.js +58 -14
- package/dist/server/server.test.js +39 -0
- package/dist/types/diff.d.ts +6 -0
- package/package.json +2 -1
- package/dist/client/assets/index-0eidGb4G.js +0 -92
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
function AS(e,r){for(var l=0;l<r.length;l++){const i=r[l];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(i,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function l(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(s){if(s.ep)return;s.ep=!0;const u=l(s);fetch(s.href,u)}})();function lu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lf={exports:{}},Ta={};var Rb;function TS(){if(Rb)return Ta;Rb=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function l(i,s,u){var c=null;if(u!==void 0&&(c=""+u),s.key!==void 0&&(c=""+s.key),"key"in s){u={};for(var f in s)f!=="key"&&(u[f]=s[f])}else u=s;return s=u.ref,{$$typeof:e,type:i,key:c,ref:s!==void 0?s:null,props:u}}return Ta.Fragment=r,Ta.jsx=l,Ta.jsxs=l,Ta}var _b;function jS(){return _b||(_b=1,Lf.exports=TS()),Lf.exports}var y=jS(),Df={exports:{}},_e={};var Lb;function RS(){if(Lb)return _e;Lb=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),v=Symbol.iterator;function x(D){return D===null||typeof D!="object"?null:(D=v&&D[v]||D["@@iterator"],typeof D=="function"?D:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,N={};function E(D,q,A){this.props=D,this.context=q,this.refs=N,this.updater=A||S}E.prototype.isReactComponent={},E.prototype.setState=function(D,q){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,q,"setState")},E.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function C(){}C.prototype=E.prototype;function j(D,q,A){this.props=D,this.context=q,this.refs=N,this.updater=A||S}var z=j.prototype=new C;z.constructor=j,w(z,E.prototype),z.isPureReactComponent=!0;var U=Array.isArray;function L(){}var O={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function Y(D,q,A){var ne=A.ref;return{$$typeof:e,type:D,key:q,ref:ne!==void 0?ne:null,props:A}}function B(D,q){return Y(D.type,q,D.props)}function $(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function G(D){var q={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(A){return q[A]})}var J=/\/+/g;function I(D,q){return typeof D=="object"&&D!==null&&D.key!=null?G(""+D.key):q.toString(36)}function Z(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(L,L):(D.status="pending",D.then(function(q){D.status==="pending"&&(D.status="fulfilled",D.value=q)},function(q){D.status==="pending"&&(D.status="rejected",D.reason=q)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function F(D,q,A,ne,re){var fe=typeof D;(fe==="undefined"||fe==="boolean")&&(D=null);var ge=!1;if(D===null)ge=!0;else switch(fe){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(D.$$typeof){case e:case r:ge=!0;break;case m:return ge=D._init,F(ge(D._payload),q,A,ne,re)}}if(ge)return re=re(D),ge=ne===""?"."+I(D,0):ne,U(re)?(A="",ge!=null&&(A=ge.replace(J,"$&/")+"/"),F(re,q,A,"",function(me){return me})):re!=null&&($(re)&&(re=B(re,A+(re.key==null||D&&D.key===re.key?"":(""+re.key).replace(J,"$&/")+"/")+ge)),q.push(re)),1;ge=0;var ye=ne===""?".":ne+":";if(U(D))for(var pe=0;pe<D.length;pe++)ne=D[pe],fe=ye+I(ne,pe),ge+=F(ne,q,A,fe,re);else if(pe=x(D),typeof pe=="function")for(D=pe.call(D),pe=0;!(ne=D.next()).done;)ne=ne.value,fe=ye+I(ne,pe++),ge+=F(ne,q,A,fe,re);else if(fe==="object"){if(typeof D.then=="function")return F(Z(D),q,A,ne,re);throw q=String(D),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ge}function X(D,q,A){if(D==null)return D;var ne=[],re=0;return F(D,ne,"","",function(fe){return q.call(A,fe,re++)}),ne}function M(D){if(D._status===-1){var q=D._result;q=q(),q.then(function(A){(D._status===0||D._status===-1)&&(D._status=1,D._result=A)},function(A){(D._status===0||D._status===-1)&&(D._status=2,D._result=A)}),D._status===-1&&(D._status=0,D._result=q)}if(D._status===1)return D._result.default;throw D._result}var V=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},R={map:X,forEach:function(D,q,A){X(D,function(){q.apply(this,arguments)},A)},count:function(D){var q=0;return X(D,function(){q++}),q},toArray:function(D){return X(D,function(q){return q})||[]},only:function(D){if(!$(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return _e.Activity=b,_e.Children=R,_e.Component=E,_e.Fragment=l,_e.Profiler=s,_e.PureComponent=j,_e.StrictMode=i,_e.Suspense=h,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,_e.__COMPILER_RUNTIME={__proto__:null,c:function(D){return O.H.useMemoCache(D)}},_e.cache=function(D){return function(){return D.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(D,q,A){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var ne=w({},D.props),re=D.key;if(q!=null)for(fe in q.key!==void 0&&(re=""+q.key),q)!H.call(q,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&q.ref===void 0||(ne[fe]=q[fe]);var fe=arguments.length-2;if(fe===1)ne.children=A;else if(1<fe){for(var ge=Array(fe),ye=0;ye<fe;ye++)ge[ye]=arguments[ye+2];ne.children=ge}return Y(D.type,re,ne)},_e.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:u,_context:D},D},_e.createElement=function(D,q,A){var ne,re={},fe=null;if(q!=null)for(ne in q.key!==void 0&&(fe=""+q.key),q)H.call(q,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(re[ne]=q[ne]);var ge=arguments.length-2;if(ge===1)re.children=A;else if(1<ge){for(var ye=Array(ge),pe=0;pe<ge;pe++)ye[pe]=arguments[pe+2];re.children=ye}if(D&&D.defaultProps)for(ne in ge=D.defaultProps,ge)re[ne]===void 0&&(re[ne]=ge[ne]);return Y(D,fe,re)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(D){return{$$typeof:f,render:D}},_e.isValidElement=$,_e.lazy=function(D){return{$$typeof:m,_payload:{_status:-1,_result:D},_init:M}},_e.memo=function(D,q){return{$$typeof:p,type:D,compare:q===void 0?null:q}},_e.startTransition=function(D){var q=O.T,A={};O.T=A;try{var ne=D(),re=O.S;re!==null&&re(A,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(L,V)}catch(fe){V(fe)}finally{q!==null&&A.types!==null&&(q.types=A.types),O.T=q}},_e.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},_e.use=function(D){return O.H.use(D)},_e.useActionState=function(D,q,A){return O.H.useActionState(D,q,A)},_e.useCallback=function(D,q){return O.H.useCallback(D,q)},_e.useContext=function(D){return O.H.useContext(D)},_e.useDebugValue=function(){},_e.useDeferredValue=function(D,q){return O.H.useDeferredValue(D,q)},_e.useEffect=function(D,q){return O.H.useEffect(D,q)},_e.useEffectEvent=function(D){return O.H.useEffectEvent(D)},_e.useId=function(){return O.H.useId()},_e.useImperativeHandle=function(D,q,A){return O.H.useImperativeHandle(D,q,A)},_e.useInsertionEffect=function(D,q){return O.H.useInsertionEffect(D,q)},_e.useLayoutEffect=function(D,q){return O.H.useLayoutEffect(D,q)},_e.useMemo=function(D,q){return O.H.useMemo(D,q)},_e.useOptimistic=function(D,q){return O.H.useOptimistic(D,q)},_e.useReducer=function(D,q,A){return O.H.useReducer(D,q,A)},_e.useRef=function(D){return O.H.useRef(D)},_e.useState=function(D){return O.H.useState(D)},_e.useSyncExternalStore=function(D,q,A){return O.H.useSyncExternalStore(D,q,A)},_e.useTransition=function(){return O.H.useTransition()},_e.version="19.2.4",_e}var Db;function sh(){return Db||(Db=1,Df.exports=RS()),Df.exports}var T=sh();const Jt=lu(T),Ux=AS({__proto__:null,default:Jt},[T]);var Of={exports:{}},ja={},Mf={exports:{}},zf={};var Ob;function _S(){return Ob||(Ob=1,(function(e){function r(F,X){var M=F.length;F.push(X);e:for(;0<M;){var V=M-1>>>1,R=F[V];if(0<s(R,X))F[V]=X,F[M]=R,M=V;else break e}}function l(F){return F.length===0?null:F[0]}function i(F){if(F.length===0)return null;var X=F[0],M=F.pop();if(M!==X){F[0]=M;e:for(var V=0,R=F.length,D=R>>>1;V<D;){var q=2*(V+1)-1,A=F[q],ne=q+1,re=F[ne];if(0>s(A,M))ne<R&&0>s(re,A)?(F[V]=re,F[ne]=M,V=ne):(F[V]=A,F[q]=M,V=q);else if(ne<R&&0>s(re,M))F[V]=re,F[ne]=M,V=ne;else break e}}return X}function s(F,X){var M=F.sortIndex-X.sortIndex;return M!==0?M:F.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var h=[],p=[],m=1,b=null,v=3,x=!1,S=!1,w=!1,N=!1,E=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function z(F){for(var X=l(p);X!==null;){if(X.callback===null)i(p);else if(X.startTime<=F)i(p),X.sortIndex=X.expirationTime,r(h,X);else break;X=l(p)}}function U(F){if(w=!1,z(F),!S)if(l(h)!==null)S=!0,L||(L=!0,G());else{var X=l(p);X!==null&&Z(U,X.startTime-F)}}var L=!1,O=-1,H=5,Y=-1;function B(){return N?!0:!(e.unstable_now()-Y<H)}function $(){if(N=!1,L){var F=e.unstable_now();Y=F;var X=!0;try{e:{S=!1,w&&(w=!1,C(O),O=-1),x=!0;var M=v;try{t:{for(z(F),b=l(h);b!==null&&!(b.expirationTime>F&&B());){var V=b.callback;if(typeof V=="function"){b.callback=null,v=b.priorityLevel;var R=V(b.expirationTime<=F);if(F=e.unstable_now(),typeof R=="function"){b.callback=R,z(F),X=!0;break t}b===l(h)&&i(h),z(F)}else i(h);b=l(h)}if(b!==null)X=!0;else{var D=l(p);D!==null&&Z(U,D.startTime-F),X=!1}}break e}finally{b=null,v=M,x=!1}X=void 0}}finally{X?G():L=!1}}}var G;if(typeof j=="function")G=function(){j($)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,I=J.port2;J.port1.onmessage=$,G=function(){I.postMessage(null)}}else G=function(){E($,0)};function Z(F,X){O=E(function(){F(e.unstable_now())},X)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(F){switch(v){case 1:case 2:case 3:var X=3;break;default:X=v}var M=v;v=X;try{return F()}finally{v=M}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(F,X){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var M=v;v=F;try{return X()}finally{v=M}},e.unstable_scheduleCallback=function(F,X,M){var V=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?V+M:V):M=V,F){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=M+R,F={id:m++,callback:X,priorityLevel:F,startTime:M,expirationTime:R,sortIndex:-1},M>V?(F.sortIndex=M,r(p,F),l(h)===null&&F===l(p)&&(w?(C(O),O=-1):w=!0,Z(U,M-V))):(F.sortIndex=R,r(h,F),S||x||(S=!0,L||(L=!0,G()))),F},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(F){var X=v;return function(){var M=v;v=X;try{return F.apply(this,arguments)}finally{v=M}}}})(zf)),zf}var Mb;function LS(){return Mb||(Mb=1,Mf.exports=_S()),Mf.exports}var Bf={exports:{}},Ut={};var zb;function DS(){if(zb)return Ut;zb=1;var e=sh();function r(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)p+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var i={d:{f:l,r:function(){throw Error(r(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(h,p,m){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:b==null?null:""+b,children:h,containerInfo:p,implementation:m}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Ut.createPortal=function(h,p){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return u(h,p,null,m)},Ut.flushSync=function(h){var p=c.T,m=i.p;try{if(c.T=null,i.p=2,h)return h()}finally{c.T=p,i.p=m,i.d.f()}},Ut.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(h,p))},Ut.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},Ut.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var m=p.as,b=f(m,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,x=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;m==="style"?i.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:b,integrity:v,fetchPriority:x}):m==="script"&&i.d.X(h,{crossOrigin:b,integrity:v,fetchPriority:x,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Ut.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var m=f(p.as,p.crossOrigin);i.d.M(h,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(h)},Ut.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var m=p.as,b=f(m,p.crossOrigin);i.d.L(h,m,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Ut.preloadModule=function(h,p){if(typeof h=="string")if(p){var m=f(p.as,p.crossOrigin);i.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(h)},Ut.requestFormReset=function(h){i.d.r(h)},Ut.unstable_batchedUpdates=function(h,p){return h(p)},Ut.useFormState=function(h,p,m){return c.H.useFormState(h,p,m)},Ut.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ut.version="19.2.4",Ut}var Bb;function Hx(){if(Bb)return Bf.exports;Bb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),Bf.exports=DS(),Bf.exports}var Fb;function OS(){if(Fb)return ja;Fb=1;var e=LS(),r=sh(),l=Hx();function i(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var n=t,a=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(a=n.return),t=n.return;while(t)}return n.tag===3?a:null}function c(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function f(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function h(t){if(u(t)!==t)throw Error(i(188))}function p(t){var n=t.alternate;if(!n){if(n=u(t),n===null)throw Error(i(188));return n!==t?null:t}for(var a=t,o=n;;){var d=a.return;if(d===null)break;var g=d.alternate;if(g===null){if(o=d.return,o!==null){a=o;continue}break}if(d.child===g.child){for(g=d.child;g;){if(g===a)return h(d),t;if(g===o)return h(d),n;g=g.sibling}throw Error(i(188))}if(a.return!==o.return)a=d,o=g;else{for(var k=!1,_=d.child;_;){if(_===a){k=!0,a=d,o=g;break}if(_===o){k=!0,o=d,a=g;break}_=_.sibling}if(!k){for(_=g.child;_;){if(_===a){k=!0,a=g,o=d;break}if(_===o){k=!0,o=g,a=d;break}_=_.sibling}if(!k)throw Error(i(189))}}if(a.alternate!==o)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?t:n}function m(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=m(t),n!==null)return n;t=t.sibling}return null}var b=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),j=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function G(t){return t===null||typeof t!="object"?null:(t=$&&t[$]||t["@@iterator"],typeof t=="function"?t:null)}var J=Symbol.for("react.client.reference");function I(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===J?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case w:return"Fragment";case E:return"Profiler";case N:return"StrictMode";case U:return"Suspense";case L:return"SuspenseList";case Y:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case S:return"Portal";case j:return t.displayName||"Context";case C:return(t._context.displayName||"Context")+".Consumer";case z:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case O:return n=t.displayName||null,n!==null?n:I(t.type)||"Memo";case H:n=t._payload,t=t._init;try{return I(t(n))}catch{}}return null}var Z=Array.isArray,F=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M={pending:!1,data:null,method:null,action:null},V=[],R=-1;function D(t){return{current:t}}function q(t){0>R||(t.current=V[R],V[R]=null,R--)}function A(t,n){R++,V[R]=t.current,t.current=n}var ne=D(null),re=D(null),fe=D(null),ge=D(null);function ye(t,n){switch(A(fe,n),A(re,t),A(ne,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?Wm(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=Wm(n),t=eb(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}q(ne),A(ne,t)}function pe(){q(ne),q(re),q(fe)}function me(t){t.memoizedState!==null&&A(ge,t);var n=ne.current,a=eb(n,t.type);n!==a&&(A(re,t),A(ne,a))}function xe(t){re.current===t&&(q(ne),q(re)),ge.current===t&&(q(ge),Ea._currentValue=M)}var de,Se;function Ee(t){if(de===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);de=n&&n[1]||"",Se=-1<a.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+de+t+Se}var Ve=!1;function Ke(t,n){if(!t||Ve)return"";Ve=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ie){var te=ie}Reflect.construct(t,[],ce)}else{try{ce.call()}catch(ie){te=ie}t.call(ce.prototype)}}else{try{throw Error()}catch(ie){te=ie}(ce=t())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ie){if(ie&&te&&typeof ie.stack=="string")return[ie.stack,te.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=o.DetermineComponentFrameRoot(),k=g[0],_=g[1];if(k&&_){var P=k.split(`
|
|
4
|
+
`),ee=_.split(`
|
|
5
|
+
`);for(d=o=0;o<P.length&&!P[o].includes("DetermineComponentFrameRoot");)o++;for(;d<ee.length&&!ee[d].includes("DetermineComponentFrameRoot");)d++;if(o===P.length||d===ee.length)for(o=P.length-1,d=ee.length-1;1<=o&&0<=d&&P[o]!==ee[d];)d--;for(;1<=o&&0<=d;o--,d--)if(P[o]!==ee[d]){if(o!==1||d!==1)do if(o--,d--,0>d||P[o]!==ee[d]){var ae=`
|
|
6
|
+
`+P[o].replace(" at new "," at ");return t.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",t.displayName)),ae}while(1<=o&&0<=d);break}}}finally{Ve=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?Ee(a):""}function ze(t,n){switch(t.tag){case 26:case 27:case 5:return Ee(t.type);case 16:return Ee("Lazy");case 13:return t.child!==n&&n!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return Ke(t.type,!1);case 11:return Ke(t.type.render,!1);case 1:return Ke(t.type,!0);case 31:return Ee("Activity");default:return""}}function zt(t){try{var n="",a=null;do n+=ze(t,a),a=t,t=t.return;while(t);return n}catch(o){return`
|
|
7
|
+
Error generating stack: `+o.message+`
|
|
8
|
+
`+o.stack}}var pt=Object.prototype.hasOwnProperty,mt=e.unstable_scheduleCallback,Bt=e.unstable_cancelCallback,it=e.unstable_shouldYield,Ft=e.unstable_requestPaint,at=e.unstable_now,En=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,be=e.unstable_UserBlockingPriority,Re=e.unstable_NormalPriority,De=e.unstable_LowPriority,Ge=e.unstable_IdlePriority,Gt=e.log,Fn=e.unstable_setDisableYieldValue,jt=null,xt=null;function It(t){if(typeof Gt=="function"&&Fn(t),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(jt,t)}catch{}}var Je=Math.clz32?Math.clz32:Oi,$n=Math.log,Yt=Math.LN2;function Oi(t){return t>>>=0,t===0?32:31-($n(t)/Yt|0)|0}var zl=256,Ar=262144,Tr=4194304;function In(t){var n=t&42;if(n!==0)return n;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function nr(t,n,a){var o=t.pendingLanes;if(o===0)return 0;var d=0,g=t.suspendedLanes,k=t.pingedLanes;t=t.warmLanes;var _=o&134217727;return _!==0?(o=_&~g,o!==0?d=In(o):(k&=_,k!==0?d=In(k):a||(a=_&~t,a!==0&&(d=In(a))))):(_=o&~g,_!==0?d=In(_):k!==0?d=In(k):a||(a=o&~t,a!==0&&(d=In(a)))),d===0?0:n!==0&&n!==d&&(n&g)===0&&(g=d&-d,a=n&-n,g>=a||g===32&&(a&4194048)!==0)?n:d}function cl(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function no(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 Bl(){var t=Tr;return Tr<<=1,(Tr&62914560)===0&&(Tr=4194304),t}function Mi(t){for(var n=[],a=0;31>a;a++)n.push(t);return n}function jr(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function ro(t,n,a,o,d,g){var k=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var _=t.entanglements,P=t.expirationTimes,ee=t.hiddenUpdates;for(a=k&~a;0<a;){var ae=31-Je(a),ce=1<<ae;_[ae]=0,P[ae]=-1;var te=ee[ae];if(te!==null)for(ee[ae]=null,ae=0;ae<te.length;ae++){var ie=te[ae];ie!==null&&(ie.lane&=-536870913)}a&=~ce}o!==0&&Wt(t,o,0),g!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=g&~(k&~n))}function Wt(t,n,a){t.pendingLanes|=n,t.suspendedLanes&=~n;var o=31-Je(n);t.entangledLanes|=n,t.entanglements[o]=t.entanglements[o]|1073741824|a&261930}function lo(t,n){var a=t.entangledLanes|=n;for(t=t.entanglements;a;){var o=31-Je(a),d=1<<o;d&n|t[o]&n&&(t[o]|=n),a&=~d}}function zi(t,n){var a=n&-n;return a=(a&42)!==0?1:Vn(a),(a&(t.suspendedLanes|n))!==0?0:a}function Vn(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Bi(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function io(){var t=X.p;return t!==0?t:(t=window.event,t===void 0?32:kb(t.type))}function ao(t,n){var a=X.p;try{return X.p=t,n()}finally{X.p=a}}var Gn=Math.random().toString(36).slice(2),gt="__reactFiber$"+Gn,_t="__reactProps$"+Gn,rr="__reactContainer$"+Gn,Fi="__reactEvents$"+Gn,Ii="__reactListeners$"+Gn,ku="__reactHandles$"+Gn,oo="__reactResources$"+Gn,fl="__reactMarker$"+Gn;function Ui(t){delete t[gt],delete t[_t],delete t[Fi],delete t[Ii],delete t[ku]}function Rr(t){var n=t[gt];if(n)return n;for(var a=t.parentNode;a;){if(n=a[rr]||a[gt]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(t=ob(t);t!==null;){if(a=t[gt])return a;t=ob(t)}return n}t=a,a=t.parentNode}return null}function le(t){if(t=t[gt]||t[rr]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function ve(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(i(33))}function Ne(t){var n=t[oo];return n||(n=t[oo]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function we(t){t[fl]=!0}var Ue=new Set,Xt={};function Cn(t,n){Fl(t,n),Fl(t+"Capture",n)}function Fl(t,n){for(Xt[t]=n,t=0;t<n.length;t++)Ue.add(n[t])}var yv=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]*$"),Ph={},$h={};function xv(t){return pt.call($h,t)?!0:pt.call(Ph,t)?!1:yv.test(t)?$h[t]=!0:(Ph[t]=!0,!1)}function so(t,n,a){if(xv(n))if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+a)}}function uo(t,n,a){if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+a)}}function lr(t,n,a,o){if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(n,a,""+o)}}function Nn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Vh(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function vv(t,n,a){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var d=o.get,g=o.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return d.call(this)},set:function(k){a=""+k,g.call(this,k)}}),Object.defineProperty(t,n,{enumerable:o.enumerable}),{getValue:function(){return a},setValue:function(k){a=""+k},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Eu(t){if(!t._valueTracker){var n=Vh(t)?"checked":"value";t._valueTracker=vv(t,n,""+t[n])}}function Gh(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var a=n.getValue(),o="";return t&&(o=Vh(t)?t.checked?"true":"false":t.value),t=o,t!==a?(n.setValue(t),!0):!1}function co(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var wv=/[\n"\\]/g;function An(t){return t.replace(wv,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Cu(t,n,a,o,d,g,k,_){t.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?t.type=k:t.removeAttribute("type"),n!=null?k==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Nn(n)):t.value!==""+Nn(n)&&(t.value=""+Nn(n)):k!=="submit"&&k!=="reset"||t.removeAttribute("value"),n!=null?Nu(t,k,Nn(n)):a!=null?Nu(t,k,Nn(a)):o!=null&&t.removeAttribute("value"),d==null&&g!=null&&(t.defaultChecked=!!g),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+Nn(_):t.removeAttribute("name")}function Yh(t,n,a,o,d,g,k,_){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),n!=null||a!=null){if(!(g!=="submit"&&g!=="reset"||n!=null)){Eu(t);return}a=a!=null?""+Nn(a):"",n=n!=null?""+Nn(n):a,_||n===t.value||(t.value=n),t.defaultValue=n}o=o??d,o=typeof o!="function"&&typeof o!="symbol"&&!!o,t.checked=_?t.checked:!!o,t.defaultChecked=!!o,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(t.name=k),Eu(t)}function Nu(t,n,a){n==="number"&&co(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Il(t,n,a,o){if(t=t.options,n){n={};for(var d=0;d<a.length;d++)n["$"+a[d]]=!0;for(a=0;a<t.length;a++)d=n.hasOwnProperty("$"+t[a].value),t[a].selected!==d&&(t[a].selected=d),d&&o&&(t[a].defaultSelected=!0)}else{for(a=""+Nn(a),n=null,d=0;d<t.length;d++){if(t[d].value===a){t[d].selected=!0,o&&(t[d].defaultSelected=!0);return}n!==null||t[d].disabled||(n=t[d])}n!==null&&(n.selected=!0)}}function Xh(t,n,a){if(n!=null&&(n=""+Nn(n),n!==t.value&&(t.value=n),a==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=a!=null?""+Nn(a):""}function Zh(t,n,a,o){if(n==null){if(o!=null){if(a!=null)throw Error(i(92));if(Z(o)){if(1<o.length)throw Error(i(93));o=o[0]}a=o}a==null&&(a=""),n=a}a=Nn(n),t.defaultValue=a,o=t.textContent,o===a&&o!==""&&o!==null&&(t.value=o),Eu(t)}function Ul(t,n){if(n){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=n;return}}t.textContent=n}var Sv=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 Qh(t,n,a){var o=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?o?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":o?t.setProperty(n,a):typeof a!="number"||a===0||Sv.has(n)?n==="float"?t.cssFloat=a:t[n]=(""+a).trim():t[n]=a+"px"}function Kh(t,n,a){if(n!=null&&typeof n!="object")throw Error(i(62));if(t=t.style,a!=null){for(var o in a)!a.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?t.setProperty(o,""):o==="float"?t.cssFloat="":t[o]="");for(var d in n)o=n[d],n.hasOwnProperty(d)&&a[d]!==o&&Qh(t,d,o)}else for(var g in n)n.hasOwnProperty(g)&&Qh(t,g,n[g])}function Au(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var kv=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"]]),Ev=/^[\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 fo(t){return Ev.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function ir(){}var Tu=null;function ju(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Hl=null,ql=null;function Jh(t){var n=le(t);if(n&&(t=n.stateNode)){var a=t[_t]||null;e:switch(t=n.stateNode,n.type){case"input":if(Cu(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+An(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var o=a[n];if(o!==t&&o.form===t.form){var d=o[_t]||null;if(!d)throw Error(i(90));Cu(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<a.length;n++)o=a[n],o.form===t.form&&Gh(o)}break e;case"textarea":Xh(t,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Il(t,!!a.multiple,n,!1)}}}var Ru=!1;function Wh(t,n,a){if(Ru)return t(n,a);Ru=!0;try{var o=t(n);return o}finally{if(Ru=!1,(Hl!==null||ql!==null)&&(Wo(),Hl&&(n=Hl,t=ql,ql=Hl=null,Jh(n),t)))for(n=0;n<t.length;n++)Jh(t[n])}}function Hi(t,n){var a=t.stateNode;if(a===null)return null;var o=a[_t]||null;if(o===null)return null;a=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(t=t.type,o=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!o;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(i(231,n,typeof a));return a}var ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_u=!1;if(ar)try{var qi={};Object.defineProperty(qi,"passive",{get:function(){_u=!0}}),window.addEventListener("test",qi,qi),window.removeEventListener("test",qi,qi)}catch{_u=!1}var _r=null,Lu=null,ho=null;function ep(){if(ho)return ho;var t,n=Lu,a=n.length,o,d="value"in _r?_r.value:_r.textContent,g=d.length;for(t=0;t<a&&n[t]===d[t];t++);var k=a-t;for(o=1;o<=k&&n[a-o]===d[g-o];o++);return ho=d.slice(t,1<o?1-o:void 0)}function po(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function go(){return!0}function tp(){return!1}function en(t){function n(a,o,d,g,k){this._reactName=a,this._targetInst=d,this.type=o,this.nativeEvent=g,this.target=k,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(a=t[_],this[_]=a?a(g):g[_]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?go:tp,this.isPropagationStopped=tp,this}return b(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=go)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=go)},persist:function(){},isPersistent:go}),n}var dl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mo=en(dl),Pi=b({},dl,{view:0,detail:0}),Cv=en(Pi),Du,Ou,$i,bo=b({},Pi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==$i&&($i&&t.type==="mousemove"?(Du=t.screenX-$i.screenX,Ou=t.screenY-$i.screenY):Ou=Du=0,$i=t),Du)},movementY:function(t){return"movementY"in t?t.movementY:Ou}}),np=en(bo),Nv=b({},bo,{dataTransfer:0}),Av=en(Nv),Tv=b({},Pi,{relatedTarget:0}),Mu=en(Tv),jv=b({},dl,{animationName:0,elapsedTime:0,pseudoElement:0}),Rv=en(jv),_v=b({},dl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Lv=en(_v),Dv=b({},dl,{data:0}),rp=en(Dv),Ov={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mv={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"},zv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bv(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=zv[t])?!!n[t]:!1}function zu(){return Bv}var Fv=b({},Pi,{key:function(t){if(t.key){var n=Ov[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=po(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Mv[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zu,charCode:function(t){return t.type==="keypress"?po(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?po(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Iv=en(Fv),Uv=b({},bo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lp=en(Uv),Hv=b({},Pi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zu}),qv=en(Hv),Pv=b({},dl,{propertyName:0,elapsedTime:0,pseudoElement:0}),$v=en(Pv),Vv=b({},bo,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Gv=en(Vv),Yv=b({},dl,{newState:0,oldState:0}),Xv=en(Yv),Zv=[9,13,27,32],Bu=ar&&"CompositionEvent"in window,Vi=null;ar&&"documentMode"in document&&(Vi=document.documentMode);var Qv=ar&&"TextEvent"in window&&!Vi,ip=ar&&(!Bu||Vi&&8<Vi&&11>=Vi),ap=" ",op=!1;function sp(t,n){switch(t){case"keyup":return Zv.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function up(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Pl=!1;function Kv(t,n){switch(t){case"compositionend":return up(n);case"keypress":return n.which!==32?null:(op=!0,ap);case"textInput":return t=n.data,t===ap&&op?null:t;default:return null}}function Jv(t,n){if(Pl)return t==="compositionend"||!Bu&&sp(t,n)?(t=ep(),ho=Lu=_r=null,Pl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return ip&&n.locale!=="ko"?null:n.data;default:return null}}var Wv={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 cp(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!Wv[t.type]:n==="textarea"}function fp(t,n,a,o){Hl?ql?ql.push(o):ql=[o]:Hl=o,n=as(n,"onChange"),0<n.length&&(a=new mo("onChange","change",null,a,o),t.push({event:a,listeners:n}))}var Gi=null,Yi=null;function ew(t){Ym(t,0)}function yo(t){var n=ve(t);if(Gh(n))return t}function dp(t,n){if(t==="change")return n}var hp=!1;if(ar){var Fu;if(ar){var Iu="oninput"in document;if(!Iu){var pp=document.createElement("div");pp.setAttribute("oninput","return;"),Iu=typeof pp.oninput=="function"}Fu=Iu}else Fu=!1;hp=Fu&&(!document.documentMode||9<document.documentMode)}function gp(){Gi&&(Gi.detachEvent("onpropertychange",mp),Yi=Gi=null)}function mp(t){if(t.propertyName==="value"&&yo(Yi)){var n=[];fp(n,Yi,t,ju(t)),Wh(ew,n)}}function tw(t,n,a){t==="focusin"?(gp(),Gi=n,Yi=a,Gi.attachEvent("onpropertychange",mp)):t==="focusout"&&gp()}function nw(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return yo(Yi)}function rw(t,n){if(t==="click")return yo(n)}function lw(t,n){if(t==="input"||t==="change")return yo(n)}function iw(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var dn=typeof Object.is=="function"?Object.is:iw;function Xi(t,n){if(dn(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var a=Object.keys(t),o=Object.keys(n);if(a.length!==o.length)return!1;for(o=0;o<a.length;o++){var d=a[o];if(!pt.call(n,d)||!dn(t[d],n[d]))return!1}return!0}function bp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function yp(t,n){var a=bp(t);t=0;for(var o;a;){if(a.nodeType===3){if(o=t+a.textContent.length,t<=n&&o>=n)return{node:a,offset:n-t};t=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=bp(a)}}function xp(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?xp(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function vp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=co(t.document);n instanceof t.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)t=n.contentWindow;else break;n=co(t.document)}return n}function Uu(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var aw=ar&&"documentMode"in document&&11>=document.documentMode,$l=null,Hu=null,Zi=null,qu=!1;function wp(t,n,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;qu||$l==null||$l!==co(o)||(o=$l,"selectionStart"in o&&Uu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Zi&&Xi(Zi,o)||(Zi=o,o=as(Hu,"onSelect"),0<o.length&&(n=new mo("onSelect","select",null,n,a),t.push({event:n,listeners:o}),n.target=$l)))}function hl(t,n){var a={};return a[t.toLowerCase()]=n.toLowerCase(),a["Webkit"+t]="webkit"+n,a["Moz"+t]="moz"+n,a}var Vl={animationend:hl("Animation","AnimationEnd"),animationiteration:hl("Animation","AnimationIteration"),animationstart:hl("Animation","AnimationStart"),transitionrun:hl("Transition","TransitionRun"),transitionstart:hl("Transition","TransitionStart"),transitioncancel:hl("Transition","TransitionCancel"),transitionend:hl("Transition","TransitionEnd")},Pu={},Sp={};ar&&(Sp=document.createElement("div").style,"AnimationEvent"in window||(delete Vl.animationend.animation,delete Vl.animationiteration.animation,delete Vl.animationstart.animation),"TransitionEvent"in window||delete Vl.transitionend.transition);function pl(t){if(Pu[t])return Pu[t];if(!Vl[t])return t;var n=Vl[t],a;for(a in n)if(n.hasOwnProperty(a)&&a in Sp)return Pu[t]=n[a];return t}var kp=pl("animationend"),Ep=pl("animationiteration"),Cp=pl("animationstart"),ow=pl("transitionrun"),sw=pl("transitionstart"),uw=pl("transitioncancel"),Np=pl("transitionend"),Ap=new Map,$u="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(" ");$u.push("scrollEnd");function Un(t,n){Ap.set(t,n),Cn(n,[t])}var xo=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Tn=[],Gl=0,Vu=0;function vo(){for(var t=Gl,n=Vu=Gl=0;n<t;){var a=Tn[n];Tn[n++]=null;var o=Tn[n];Tn[n++]=null;var d=Tn[n];Tn[n++]=null;var g=Tn[n];if(Tn[n++]=null,o!==null&&d!==null){var k=o.pending;k===null?d.next=d:(d.next=k.next,k.next=d),o.pending=d}g!==0&&Tp(a,d,g)}}function wo(t,n,a,o){Tn[Gl++]=t,Tn[Gl++]=n,Tn[Gl++]=a,Tn[Gl++]=o,Vu|=o,t.lanes|=o,t=t.alternate,t!==null&&(t.lanes|=o)}function Gu(t,n,a,o){return wo(t,n,a,o),So(t)}function gl(t,n){return wo(t,null,null,n),So(t)}function Tp(t,n,a){t.lanes|=a;var o=t.alternate;o!==null&&(o.lanes|=a);for(var d=!1,g=t.return;g!==null;)g.childLanes|=a,o=g.alternate,o!==null&&(o.childLanes|=a),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(d=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,d&&n!==null&&(d=31-Je(a),t=g.hiddenUpdates,o=t[d],o===null?t[d]=[n]:o.push(n),n.lane=a|536870912),g):null}function So(t){if(50<ba)throw ba=0,tf=null,Error(i(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var Yl={};function cw(t,n,a,o){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hn(t,n,a,o){return new cw(t,n,a,o)}function Yu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function or(t,n){var a=t.alternate;return a===null?(a=hn(t.tag,n,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=n,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,n=t.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function jp(t,n){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,n=a.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function ko(t,n,a,o,d,g){var k=0;if(o=t,typeof t=="function")Yu(t)&&(k=1);else if(typeof t=="string")k=gS(t,a,ne.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case Y:return t=hn(31,a,n,d),t.elementType=Y,t.lanes=g,t;case w:return ml(a.children,d,g,n);case N:k=8,d|=24;break;case E:return t=hn(12,a,n,d|2),t.elementType=E,t.lanes=g,t;case U:return t=hn(13,a,n,d),t.elementType=U,t.lanes=g,t;case L:return t=hn(19,a,n,d),t.elementType=L,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case j:k=10;break e;case C:k=9;break e;case z:k=11;break e;case O:k=14;break e;case H:k=16,o=null;break e}k=29,a=Error(i(130,t===null?"null":typeof t,"")),o=null}return n=hn(k,a,n,d),n.elementType=t,n.type=o,n.lanes=g,n}function ml(t,n,a,o){return t=hn(7,t,o,n),t.lanes=a,t}function Xu(t,n,a){return t=hn(6,t,null,n),t.lanes=a,t}function Rp(t){var n=hn(18,null,null,0);return n.stateNode=t,n}function Zu(t,n,a){return n=hn(4,t.children!==null?t.children:[],t.key,n),n.lanes=a,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var _p=new WeakMap;function jn(t,n){if(typeof t=="object"&&t!==null){var a=_p.get(t);return a!==void 0?a:(n={value:t,source:n,stack:zt(n)},_p.set(t,n),n)}return{value:t,source:n,stack:zt(n)}}var Xl=[],Zl=0,Eo=null,Qi=0,Rn=[],_n=0,Lr=null,Yn=1,Xn="";function sr(t,n){Xl[Zl++]=Qi,Xl[Zl++]=Eo,Eo=t,Qi=n}function Lp(t,n,a){Rn[_n++]=Yn,Rn[_n++]=Xn,Rn[_n++]=Lr,Lr=t;var o=Yn;t=Xn;var d=32-Je(o)-1;o&=~(1<<d),a+=1;var g=32-Je(n)+d;if(30<g){var k=d-d%5;g=(o&(1<<k)-1).toString(32),o>>=k,d-=k,Yn=1<<32-Je(n)+d|a<<d|o,Xn=g+t}else Yn=1<<g|a<<d|o,Xn=t}function Qu(t){t.return!==null&&(sr(t,1),Lp(t,1,0))}function Ku(t){for(;t===Eo;)Eo=Xl[--Zl],Xl[Zl]=null,Qi=Xl[--Zl],Xl[Zl]=null;for(;t===Lr;)Lr=Rn[--_n],Rn[_n]=null,Xn=Rn[--_n],Rn[_n]=null,Yn=Rn[--_n],Rn[_n]=null}function Dp(t,n){Rn[_n++]=Yn,Rn[_n++]=Xn,Rn[_n++]=Lr,Yn=n.id,Xn=n.overflow,Lr=t}var Lt=null,ft=null,Pe=!1,Dr=null,Ln=!1,Ju=Error(i(519));function Or(t){var n=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ki(jn(n,t)),Ju}function Op(t){var n=t.stateNode,a=t.type,o=t.memoizedProps;switch(n[gt]=t,n[_t]=o,a){case"dialog":Fe("cancel",n),Fe("close",n);break;case"iframe":case"object":case"embed":Fe("load",n);break;case"video":case"audio":for(a=0;a<xa.length;a++)Fe(xa[a],n);break;case"source":Fe("error",n);break;case"img":case"image":case"link":Fe("error",n),Fe("load",n);break;case"details":Fe("toggle",n);break;case"input":Fe("invalid",n),Yh(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Fe("invalid",n);break;case"textarea":Fe("invalid",n),Zh(n,o.value,o.defaultValue,o.children)}a=o.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||o.suppressHydrationWarning===!0||Km(n.textContent,a)?(o.popover!=null&&(Fe("beforetoggle",n),Fe("toggle",n)),o.onScroll!=null&&Fe("scroll",n),o.onScrollEnd!=null&&Fe("scrollend",n),o.onClick!=null&&(n.onclick=ir),n=!0):n=!1,n||Or(t,!0)}function Mp(t){for(Lt=t.return;Lt;)switch(Lt.tag){case 5:case 31:case 13:Ln=!1;return;case 27:case 3:Ln=!0;return;default:Lt=Lt.return}}function Ql(t){if(t!==Lt)return!1;if(!Pe)return Mp(t),Pe=!0,!1;var n=t.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||bf(t.type,t.memoizedProps)),a=!a),a&&ft&&Or(t),Mp(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));ft=ab(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));ft=ab(t)}else n===27?(n=ft,Xr(t.type)?(t=Sf,Sf=null,ft=t):ft=n):ft=Lt?On(t.stateNode.nextSibling):null;return!0}function bl(){ft=Lt=null,Pe=!1}function Wu(){var t=Dr;return t!==null&&(ln===null?ln=t:ln.push.apply(ln,t),Dr=null),t}function Ki(t){Dr===null?Dr=[t]:Dr.push(t)}var ec=D(null),yl=null,ur=null;function Mr(t,n,a){A(ec,n._currentValue),n._currentValue=a}function cr(t){t._currentValue=ec.current,q(ec)}function tc(t,n,a){for(;t!==null;){var o=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),t===a)break;t=t.return}}function nc(t,n,a,o){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var g=d.dependencies;if(g!==null){var k=d.child;g=g.firstContext;e:for(;g!==null;){var _=g;g=d;for(var P=0;P<n.length;P++)if(_.context===n[P]){g.lanes|=a,_=g.alternate,_!==null&&(_.lanes|=a),tc(g.return,a,t),o||(k=null);break e}g=_.next}}else if(d.tag===18){if(k=d.return,k===null)throw Error(i(341));k.lanes|=a,g=k.alternate,g!==null&&(g.lanes|=a),tc(k,a,t),k=null}else k=d.child;if(k!==null)k.return=d;else for(k=d;k!==null;){if(k===t){k=null;break}if(d=k.sibling,d!==null){d.return=k.return,k=d;break}k=k.return}d=k}}function Kl(t,n,a,o){t=null;for(var d=n,g=!1;d!==null;){if(!g){if((d.flags&524288)!==0)g=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var k=d.alternate;if(k===null)throw Error(i(387));if(k=k.memoizedProps,k!==null){var _=d.type;dn(d.pendingProps.value,k.value)||(t!==null?t.push(_):t=[_])}}else if(d===ge.current){if(k=d.alternate,k===null)throw Error(i(387));k.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(Ea):t=[Ea])}d=d.return}t!==null&&nc(n,t,a,o),n.flags|=262144}function Co(t){for(t=t.firstContext;t!==null;){if(!dn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function xl(t){yl=t,ur=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Dt(t){return zp(yl,t)}function No(t,n){return yl===null&&xl(t),zp(t,n)}function zp(t,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},ur===null){if(t===null)throw Error(i(308));ur=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else ur=ur.next=n;return a}var fw=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(a,o){t.push(o)}};this.abort=function(){n.aborted=!0,t.forEach(function(a){return a()})}},dw=e.unstable_scheduleCallback,hw=e.unstable_NormalPriority,St={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function rc(){return{controller:new fw,data:new Map,refCount:0}}function Ji(t){t.refCount--,t.refCount===0&&dw(hw,function(){t.controller.abort()})}var Wi=null,lc=0,Jl=0,Wl=null;function pw(t,n){if(Wi===null){var a=Wi=[];lc=0,Jl=sf(),Wl={status:"pending",value:void 0,then:function(o){a.push(o)}}}return lc++,n.then(Bp,Bp),n}function Bp(){if(--lc===0&&Wi!==null){Wl!==null&&(Wl.status="fulfilled");var t=Wi;Wi=null,Jl=0,Wl=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function gw(t,n){var a=[],o={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return t.then(function(){o.status="fulfilled",o.value=n;for(var d=0;d<a.length;d++)(0,a[d])(n)},function(d){for(o.status="rejected",o.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),o}var Fp=F.S;F.S=function(t,n){wm=at(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&pw(t,n),Fp!==null&&Fp(t,n)};var vl=D(null);function ic(){var t=vl.current;return t!==null?t:ot.pooledCache}function Ao(t,n){n===null?A(vl,vl.current):A(vl,n.pool)}function Ip(){var t=ic();return t===null?null:{parent:St._currentValue,pool:t}}var ei=Error(i(460)),ac=Error(i(474)),To=Error(i(542)),jo={then:function(){}};function Up(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Hp(t,n,a){switch(a=t[a],a===void 0?t.push(n):a!==n&&(n.then(ir,ir),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,Pp(t),t;default:if(typeof n.status=="string")n.then(ir,ir);else{if(t=ot,t!==null&&100<t.shellSuspendCounter)throw Error(i(482));t=n,t.status="pending",t.then(function(o){if(n.status==="pending"){var d=n;d.status="fulfilled",d.value=o}},function(o){if(n.status==="pending"){var d=n;d.status="rejected",d.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,Pp(t),t}throw Sl=n,ei}}function wl(t){try{var n=t._init;return n(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Sl=a,ei):a}}var Sl=null;function qp(){if(Sl===null)throw Error(i(459));var t=Sl;return Sl=null,t}function Pp(t){if(t===ei||t===To)throw Error(i(483))}var ti=null,ea=0;function Ro(t){var n=ea;return ea+=1,ti===null&&(ti=[]),Hp(ti,t,n)}function ta(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function _o(t,n){throw n.$$typeof===v?Error(i(525)):(t=Object.prototype.toString.call(n),Error(i(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function $p(t){function n(K,Q){if(t){var W=K.deletions;W===null?(K.deletions=[Q],K.flags|=16):W.push(Q)}}function a(K,Q){if(!t)return null;for(;Q!==null;)n(K,Q),Q=Q.sibling;return null}function o(K){for(var Q=new Map;K!==null;)K.key!==null?Q.set(K.key,K):Q.set(K.index,K),K=K.sibling;return Q}function d(K,Q){return K=or(K,Q),K.index=0,K.sibling=null,K}function g(K,Q,W){return K.index=W,t?(W=K.alternate,W!==null?(W=W.index,W<Q?(K.flags|=67108866,Q):W):(K.flags|=67108866,Q)):(K.flags|=1048576,Q)}function k(K){return t&&K.alternate===null&&(K.flags|=67108866),K}function _(K,Q,W,se){return Q===null||Q.tag!==6?(Q=Xu(W,K.mode,se),Q.return=K,Q):(Q=d(Q,W),Q.return=K,Q)}function P(K,Q,W,se){var Ae=W.type;return Ae===w?ae(K,Q,W.props.children,se,W.key):Q!==null&&(Q.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===H&&wl(Ae)===Q.type)?(Q=d(Q,W.props),ta(Q,W),Q.return=K,Q):(Q=ko(W.type,W.key,W.props,null,K.mode,se),ta(Q,W),Q.return=K,Q)}function ee(K,Q,W,se){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==W.containerInfo||Q.stateNode.implementation!==W.implementation?(Q=Zu(W,K.mode,se),Q.return=K,Q):(Q=d(Q,W.children||[]),Q.return=K,Q)}function ae(K,Q,W,se,Ae){return Q===null||Q.tag!==7?(Q=ml(W,K.mode,se,Ae),Q.return=K,Q):(Q=d(Q,W),Q.return=K,Q)}function ce(K,Q,W){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=Xu(""+Q,K.mode,W),Q.return=K,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:return W=ko(Q.type,Q.key,Q.props,null,K.mode,W),ta(W,Q),W.return=K,W;case S:return Q=Zu(Q,K.mode,W),Q.return=K,Q;case H:return Q=wl(Q),ce(K,Q,W)}if(Z(Q)||G(Q))return Q=ml(Q,K.mode,W,null),Q.return=K,Q;if(typeof Q.then=="function")return ce(K,Ro(Q),W);if(Q.$$typeof===j)return ce(K,No(K,Q),W);_o(K,Q)}return null}function te(K,Q,W,se){var Ae=Q!==null?Q.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Ae!==null?null:_(K,Q,""+W,se);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case x:return W.key===Ae?P(K,Q,W,se):null;case S:return W.key===Ae?ee(K,Q,W,se):null;case H:return W=wl(W),te(K,Q,W,se)}if(Z(W)||G(W))return Ae!==null?null:ae(K,Q,W,se,null);if(typeof W.then=="function")return te(K,Q,Ro(W),se);if(W.$$typeof===j)return te(K,Q,No(K,W),se);_o(K,W)}return null}function ie(K,Q,W,se,Ae){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return K=K.get(W)||null,_(Q,K,""+se,Ae);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case x:return K=K.get(se.key===null?W:se.key)||null,P(Q,K,se,Ae);case S:return K=K.get(se.key===null?W:se.key)||null,ee(Q,K,se,Ae);case H:return se=wl(se),ie(K,Q,W,se,Ae)}if(Z(se)||G(se))return K=K.get(W)||null,ae(Q,K,se,Ae,null);if(typeof se.then=="function")return ie(K,Q,W,Ro(se),Ae);if(se.$$typeof===j)return ie(K,Q,W,No(Q,se),Ae);_o(Q,se)}return null}function ke(K,Q,W,se){for(var Ae=null,Xe=null,Ce=Q,Oe=Q=0,qe=null;Ce!==null&&Oe<W.length;Oe++){Ce.index>Oe?(qe=Ce,Ce=null):qe=Ce.sibling;var Ze=te(K,Ce,W[Oe],se);if(Ze===null){Ce===null&&(Ce=qe);break}t&&Ce&&Ze.alternate===null&&n(K,Ce),Q=g(Ze,Q,Oe),Xe===null?Ae=Ze:Xe.sibling=Ze,Xe=Ze,Ce=qe}if(Oe===W.length)return a(K,Ce),Pe&&sr(K,Oe),Ae;if(Ce===null){for(;Oe<W.length;Oe++)Ce=ce(K,W[Oe],se),Ce!==null&&(Q=g(Ce,Q,Oe),Xe===null?Ae=Ce:Xe.sibling=Ce,Xe=Ce);return Pe&&sr(K,Oe),Ae}for(Ce=o(Ce);Oe<W.length;Oe++)qe=ie(Ce,K,Oe,W[Oe],se),qe!==null&&(t&&qe.alternate!==null&&Ce.delete(qe.key===null?Oe:qe.key),Q=g(qe,Q,Oe),Xe===null?Ae=qe:Xe.sibling=qe,Xe=qe);return t&&Ce.forEach(function(Wr){return n(K,Wr)}),Pe&&sr(K,Oe),Ae}function je(K,Q,W,se){if(W==null)throw Error(i(151));for(var Ae=null,Xe=null,Ce=Q,Oe=Q=0,qe=null,Ze=W.next();Ce!==null&&!Ze.done;Oe++,Ze=W.next()){Ce.index>Oe?(qe=Ce,Ce=null):qe=Ce.sibling;var Wr=te(K,Ce,Ze.value,se);if(Wr===null){Ce===null&&(Ce=qe);break}t&&Ce&&Wr.alternate===null&&n(K,Ce),Q=g(Wr,Q,Oe),Xe===null?Ae=Wr:Xe.sibling=Wr,Xe=Wr,Ce=qe}if(Ze.done)return a(K,Ce),Pe&&sr(K,Oe),Ae;if(Ce===null){for(;!Ze.done;Oe++,Ze=W.next())Ze=ce(K,Ze.value,se),Ze!==null&&(Q=g(Ze,Q,Oe),Xe===null?Ae=Ze:Xe.sibling=Ze,Xe=Ze);return Pe&&sr(K,Oe),Ae}for(Ce=o(Ce);!Ze.done;Oe++,Ze=W.next())Ze=ie(Ce,K,Oe,Ze.value,se),Ze!==null&&(t&&Ze.alternate!==null&&Ce.delete(Ze.key===null?Oe:Ze.key),Q=g(Ze,Q,Oe),Xe===null?Ae=Ze:Xe.sibling=Ze,Xe=Ze);return t&&Ce.forEach(function(NS){return n(K,NS)}),Pe&&sr(K,Oe),Ae}function rt(K,Q,W,se){if(typeof W=="object"&&W!==null&&W.type===w&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case x:e:{for(var Ae=W.key;Q!==null;){if(Q.key===Ae){if(Ae=W.type,Ae===w){if(Q.tag===7){a(K,Q.sibling),se=d(Q,W.props.children),se.return=K,K=se;break e}}else if(Q.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===H&&wl(Ae)===Q.type){a(K,Q.sibling),se=d(Q,W.props),ta(se,W),se.return=K,K=se;break e}a(K,Q);break}else n(K,Q);Q=Q.sibling}W.type===w?(se=ml(W.props.children,K.mode,se,W.key),se.return=K,K=se):(se=ko(W.type,W.key,W.props,null,K.mode,se),ta(se,W),se.return=K,K=se)}return k(K);case S:e:{for(Ae=W.key;Q!==null;){if(Q.key===Ae)if(Q.tag===4&&Q.stateNode.containerInfo===W.containerInfo&&Q.stateNode.implementation===W.implementation){a(K,Q.sibling),se=d(Q,W.children||[]),se.return=K,K=se;break e}else{a(K,Q);break}else n(K,Q);Q=Q.sibling}se=Zu(W,K.mode,se),se.return=K,K=se}return k(K);case H:return W=wl(W),rt(K,Q,W,se)}if(Z(W))return ke(K,Q,W,se);if(G(W)){if(Ae=G(W),typeof Ae!="function")throw Error(i(150));return W=Ae.call(W),je(K,Q,W,se)}if(typeof W.then=="function")return rt(K,Q,Ro(W),se);if(W.$$typeof===j)return rt(K,Q,No(K,W),se);_o(K,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,Q!==null&&Q.tag===6?(a(K,Q.sibling),se=d(Q,W),se.return=K,K=se):(a(K,Q),se=Xu(W,K.mode,se),se.return=K,K=se),k(K)):a(K,Q)}return function(K,Q,W,se){try{ea=0;var Ae=rt(K,Q,W,se);return ti=null,Ae}catch(Ce){if(Ce===ei||Ce===To)throw Ce;var Xe=hn(29,Ce,null,K.mode);return Xe.lanes=se,Xe.return=K,Xe}}}var kl=$p(!0),Vp=$p(!1),zr=!1;function oc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sc(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Br(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Fr(t,n,a){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(Qe&2)!==0){var d=o.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),o.pending=n,n=So(t),Tp(t,null,a),n}return wo(t,o,n,a),So(t)}function na(t,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var o=n.lanes;o&=t.pendingLanes,a|=o,n.lanes=a,lo(t,a)}}function uc(t,n){var a=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var d=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var k={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};g===null?d=g=k:g=g.next=k,a=a.next}while(a!==null);g===null?d=g=n:g=g.next=n}else d=g=n;a={baseState:o.baseState,firstBaseUpdate:d,lastBaseUpdate:g,shared:o.shared,callbacks:o.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=n:t.next=n,a.lastBaseUpdate=n}var cc=!1;function ra(){if(cc){var t=Wl;if(t!==null)throw t}}function la(t,n,a,o){cc=!1;var d=t.updateQueue;zr=!1;var g=d.firstBaseUpdate,k=d.lastBaseUpdate,_=d.shared.pending;if(_!==null){d.shared.pending=null;var P=_,ee=P.next;P.next=null,k===null?g=ee:k.next=ee,k=P;var ae=t.alternate;ae!==null&&(ae=ae.updateQueue,_=ae.lastBaseUpdate,_!==k&&(_===null?ae.firstBaseUpdate=ee:_.next=ee,ae.lastBaseUpdate=P))}if(g!==null){var ce=d.baseState;k=0,ae=ee=P=null,_=g;do{var te=_.lane&-536870913,ie=te!==_.lane;if(ie?(He&te)===te:(o&te)===te){te!==0&&te===Jl&&(cc=!0),ae!==null&&(ae=ae.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var ke=t,je=_;te=n;var rt=a;switch(je.tag){case 1:if(ke=je.payload,typeof ke=="function"){ce=ke.call(rt,ce,te);break e}ce=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=je.payload,te=typeof ke=="function"?ke.call(rt,ce,te):ke,te==null)break e;ce=b({},ce,te);break e;case 2:zr=!0}}te=_.callback,te!==null&&(t.flags|=64,ie&&(t.flags|=8192),ie=d.callbacks,ie===null?d.callbacks=[te]:ie.push(te))}else ie={lane:te,tag:_.tag,payload:_.payload,callback:_.callback,next:null},ae===null?(ee=ae=ie,P=ce):ae=ae.next=ie,k|=te;if(_=_.next,_===null){if(_=d.shared.pending,_===null)break;ie=_,_=ie.next,ie.next=null,d.lastBaseUpdate=ie,d.shared.pending=null}}while(!0);ae===null&&(P=ce),d.baseState=P,d.firstBaseUpdate=ee,d.lastBaseUpdate=ae,g===null&&(d.shared.lanes=0),Pr|=k,t.lanes=k,t.memoizedState=ce}}function Gp(t,n){if(typeof t!="function")throw Error(i(191,t));t.call(n)}function Yp(t,n){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)Gp(a[t],n)}var ni=D(null),Lo=D(0);function Xp(t,n){t=xr,A(Lo,t),A(ni,n),xr=t|n.baseLanes}function fc(){A(Lo,xr),A(ni,ni.current)}function dc(){xr=Lo.current,q(ni),q(Lo)}var pn=D(null),Dn=null;function Ir(t){var n=t.alternate;A(vt,vt.current&1),A(pn,t),Dn===null&&(n===null||ni.current!==null||n.memoizedState!==null)&&(Dn=t)}function hc(t){A(vt,vt.current),A(pn,t),Dn===null&&(Dn=t)}function Zp(t){t.tag===22?(A(vt,vt.current),A(pn,t),Dn===null&&(Dn=t)):Ur()}function Ur(){A(vt,vt.current),A(pn,pn.current)}function gn(t){q(pn),Dn===t&&(Dn=null),q(vt)}var vt=D(0);function Do(t){for(var n=t;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||vf(a)||wf(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var fr=0,Le=null,tt=null,kt=null,Oo=!1,ri=!1,El=!1,Mo=0,ia=0,li=null,mw=0;function bt(){throw Error(i(321))}function pc(t,n){if(n===null)return!1;for(var a=0;a<n.length&&a<t.length;a++)if(!dn(t[a],n[a]))return!1;return!0}function gc(t,n,a,o,d,g){return fr=g,Le=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,F.H=t===null||t.memoizedState===null?Lg:Rc,El=!1,g=a(o,d),El=!1,ri&&(g=Kp(n,a,o,d)),Qp(t),g}function Qp(t){F.H=sa;var n=tt!==null&&tt.next!==null;if(fr=0,kt=tt=Le=null,Oo=!1,ia=0,li=null,n)throw Error(i(300));t===null||Et||(t=t.dependencies,t!==null&&Co(t)&&(Et=!0))}function Kp(t,n,a,o){Le=t;var d=0;do{if(ri&&(li=null),ia=0,ri=!1,25<=d)throw Error(i(301));if(d+=1,kt=tt=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}F.H=Dg,g=n(a,o)}while(ri);return g}function bw(){var t=F.H,n=t.useState()[0];return n=typeof n.then=="function"?aa(n):n,t=t.useState()[0],(tt!==null?tt.memoizedState:null)!==t&&(Le.flags|=1024),n}function mc(){var t=Mo!==0;return Mo=0,t}function bc(t,n,a){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~a}function yc(t){if(Oo){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}Oo=!1}fr=0,kt=tt=Le=null,ri=!1,ia=Mo=0,li=null}function Zt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?Le.memoizedState=kt=t:kt=kt.next=t,kt}function wt(){if(tt===null){var t=Le.alternate;t=t!==null?t.memoizedState:null}else t=tt.next;var n=kt===null?Le.memoizedState:kt.next;if(n!==null)kt=n,tt=t;else{if(t===null)throw Le.alternate===null?Error(i(467)):Error(i(310));tt=t,t={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},kt===null?Le.memoizedState=kt=t:kt=kt.next=t}return kt}function zo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function aa(t){var n=ia;return ia+=1,li===null&&(li=[]),t=Hp(li,t,n),n=Le,(kt===null?n.memoizedState:kt.next)===null&&(n=n.alternate,F.H=n===null||n.memoizedState===null?Lg:Rc),t}function Bo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return aa(t);if(t.$$typeof===j)return Dt(t)}throw Error(i(438,String(t)))}function xc(t){var n=null,a=Le.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var o=Le.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=zo(),Le.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(t),o=0;o<t;o++)a[o]=B;return n.index++,a}function dr(t,n){return typeof n=="function"?n(t):n}function Fo(t){var n=wt();return vc(n,tt,t)}function vc(t,n,a){var o=t.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=a;var d=t.baseQueue,g=o.pending;if(g!==null){if(d!==null){var k=d.next;d.next=g.next,g.next=k}n.baseQueue=d=g,o.pending=null}if(g=t.baseState,d===null)t.memoizedState=g;else{n=d.next;var _=k=null,P=null,ee=n,ae=!1;do{var ce=ee.lane&-536870913;if(ce!==ee.lane?(He&ce)===ce:(fr&ce)===ce){var te=ee.revertLane;if(te===0)P!==null&&(P=P.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),ce===Jl&&(ae=!0);else if((fr&te)===te){ee=ee.next,te===Jl&&(ae=!0);continue}else ce={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},P===null?(_=P=ce,k=g):P=P.next=ce,Le.lanes|=te,Pr|=te;ce=ee.action,El&&a(g,ce),g=ee.hasEagerState?ee.eagerState:a(g,ce)}else te={lane:ce,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},P===null?(_=P=te,k=g):P=P.next=te,Le.lanes|=ce,Pr|=ce;ee=ee.next}while(ee!==null&&ee!==n);if(P===null?k=g:P.next=_,!dn(g,t.memoizedState)&&(Et=!0,ae&&(a=Wl,a!==null)))throw a;t.memoizedState=g,t.baseState=k,t.baseQueue=P,o.lastRenderedState=g}return d===null&&(o.lanes=0),[t.memoizedState,o.dispatch]}function wc(t){var n=wt(),a=n.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=t;var o=a.dispatch,d=a.pending,g=n.memoizedState;if(d!==null){a.pending=null;var k=d=d.next;do g=t(g,k.action),k=k.next;while(k!==d);dn(g,n.memoizedState)||(Et=!0),n.memoizedState=g,n.baseQueue===null&&(n.baseState=g),a.lastRenderedState=g}return[g,o]}function Jp(t,n,a){var o=Le,d=wt(),g=Pe;if(g){if(a===void 0)throw Error(i(407));a=a()}else a=n();var k=!dn((tt||d).memoizedState,a);if(k&&(d.memoizedState=a,Et=!0),d=d.queue,Ec(tg.bind(null,o,d,t),[t]),d.getSnapshot!==n||k||kt!==null&&kt.memoizedState.tag&1){if(o.flags|=2048,ii(9,{destroy:void 0},eg.bind(null,o,d,a,n),null),ot===null)throw Error(i(349));g||(fr&127)!==0||Wp(o,n,a)}return a}function Wp(t,n,a){t.flags|=16384,t={getSnapshot:n,value:a},n=Le.updateQueue,n===null?(n=zo(),Le.updateQueue=n,n.stores=[t]):(a=n.stores,a===null?n.stores=[t]:a.push(t))}function eg(t,n,a,o){n.value=a,n.getSnapshot=o,ng(n)&&rg(t)}function tg(t,n,a){return a(function(){ng(n)&&rg(t)})}function ng(t){var n=t.getSnapshot;t=t.value;try{var a=n();return!dn(t,a)}catch{return!0}}function rg(t){var n=gl(t,2);n!==null&&an(n,t,2)}function Sc(t){var n=Zt();if(typeof t=="function"){var a=t;if(t=a(),El){It(!0);try{a()}finally{It(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dr,lastRenderedState:t},n}function lg(t,n,a,o){return t.baseState=a,vc(t,tt,typeof o=="function"?o:dr)}function yw(t,n,a,o,d){if(Ho(t))throw Error(i(485));if(t=n.action,t!==null){var g={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){g.listeners.push(k)}};F.T!==null?a(!0):g.isTransition=!1,o(g),a=n.pending,a===null?(g.next=n.pending=g,ig(n,g)):(g.next=a.next,n.pending=a.next=g)}}function ig(t,n){var a=n.action,o=n.payload,d=t.state;if(n.isTransition){var g=F.T,k={};F.T=k;try{var _=a(d,o),P=F.S;P!==null&&P(k,_),ag(t,n,_)}catch(ee){kc(t,n,ee)}finally{g!==null&&k.types!==null&&(g.types=k.types),F.T=g}}else try{g=a(d,o),ag(t,n,g)}catch(ee){kc(t,n,ee)}}function ag(t,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(o){og(t,n,o)},function(o){return kc(t,n,o)}):og(t,n,a)}function og(t,n,a){n.status="fulfilled",n.value=a,sg(n),t.state=a,n=t.pending,n!==null&&(a=n.next,a===n?t.pending=null:(a=a.next,n.next=a,ig(t,a)))}function kc(t,n,a){var o=t.pending;if(t.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=a,sg(n),n=n.next;while(n!==o)}t.action=null}function sg(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function ug(t,n){return n}function cg(t,n){if(Pe){var a=ot.formState;if(a!==null){e:{var o=Le;if(Pe){if(ft){t:{for(var d=ft,g=Ln;d.nodeType!==8;){if(!g){d=null;break t}if(d=On(d.nextSibling),d===null){d=null;break t}}g=d.data,d=g==="F!"||g==="F"?d:null}if(d){ft=On(d.nextSibling),o=d.data==="F!";break e}}Or(o)}o=!1}o&&(n=a[0])}}return a=Zt(),a.memoizedState=a.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ug,lastRenderedState:n},a.queue=o,a=jg.bind(null,Le,o),o.dispatch=a,o=Sc(!1),g=jc.bind(null,Le,!1,o.queue),o=Zt(),d={state:n,dispatch:null,action:t,pending:null},o.queue=d,a=yw.bind(null,Le,d,g,a),d.dispatch=a,o.memoizedState=t,[n,a,!1]}function fg(t){var n=wt();return dg(n,tt,t)}function dg(t,n,a){if(n=vc(t,n,ug)[0],t=Fo(dr)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=aa(n)}catch(k){throw k===ei?To:k}else o=n;n=wt();var d=n.queue,g=d.dispatch;return a!==n.memoizedState&&(Le.flags|=2048,ii(9,{destroy:void 0},xw.bind(null,d,a),null)),[o,g,t]}function xw(t,n){t.action=n}function hg(t){var n=wt(),a=tt;if(a!==null)return dg(n,a,t);wt(),n=n.memoizedState,a=wt();var o=a.queue.dispatch;return a.memoizedState=t,[n,o,!1]}function ii(t,n,a,o){return t={tag:t,create:a,deps:o,inst:n,next:null},n=Le.updateQueue,n===null&&(n=zo(),Le.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=t.next=t:(o=a.next,a.next=t,t.next=o,n.lastEffect=t),t}function pg(){return wt().memoizedState}function Io(t,n,a,o){var d=Zt();Le.flags|=t,d.memoizedState=ii(1|n,{destroy:void 0},a,o===void 0?null:o)}function Uo(t,n,a,o){var d=wt();o=o===void 0?null:o;var g=d.memoizedState.inst;tt!==null&&o!==null&&pc(o,tt.memoizedState.deps)?d.memoizedState=ii(n,g,a,o):(Le.flags|=t,d.memoizedState=ii(1|n,g,a,o))}function gg(t,n){Io(8390656,8,t,n)}function Ec(t,n){Uo(2048,8,t,n)}function vw(t){Le.flags|=4;var n=Le.updateQueue;if(n===null)n=zo(),Le.updateQueue=n,n.events=[t];else{var a=n.events;a===null?n.events=[t]:a.push(t)}}function mg(t){var n=wt().memoizedState;return vw({ref:n,nextImpl:t}),function(){if((Qe&2)!==0)throw Error(i(440));return n.impl.apply(void 0,arguments)}}function bg(t,n){return Uo(4,2,t,n)}function yg(t,n){return Uo(4,4,t,n)}function xg(t,n){if(typeof n=="function"){t=t();var a=n(t);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function vg(t,n,a){a=a!=null?a.concat([t]):null,Uo(4,4,xg.bind(null,n,t),a)}function Cc(){}function wg(t,n){var a=wt();n=n===void 0?null:n;var o=a.memoizedState;return n!==null&&pc(n,o[1])?o[0]:(a.memoizedState=[t,n],t)}function Sg(t,n){var a=wt();n=n===void 0?null:n;var o=a.memoizedState;if(n!==null&&pc(n,o[1]))return o[0];if(o=t(),El){It(!0);try{t()}finally{It(!1)}}return a.memoizedState=[o,n],o}function Nc(t,n,a){return a===void 0||(fr&1073741824)!==0&&(He&261930)===0?t.memoizedState=n:(t.memoizedState=a,t=km(),Le.lanes|=t,Pr|=t,a)}function kg(t,n,a,o){return dn(a,n)?a:ni.current!==null?(t=Nc(t,a,o),dn(t,n)||(Et=!0),t):(fr&42)===0||(fr&1073741824)!==0&&(He&261930)===0?(Et=!0,t.memoizedState=a):(t=km(),Le.lanes|=t,Pr|=t,n)}function Eg(t,n,a,o,d){var g=X.p;X.p=g!==0&&8>g?g:8;var k=F.T,_={};F.T=_,jc(t,!1,n,a);try{var P=d(),ee=F.S;if(ee!==null&&ee(_,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var ae=gw(P,o);oa(t,n,ae,yn(t))}else oa(t,n,o,yn(t))}catch(ce){oa(t,n,{then:function(){},status:"rejected",reason:ce},yn())}finally{X.p=g,k!==null&&_.types!==null&&(k.types=_.types),F.T=k}}function ww(){}function Ac(t,n,a,o){if(t.tag!==5)throw Error(i(476));var d=Cg(t).queue;Eg(t,d,n,M,a===null?ww:function(){return Ng(t),a(o)})}function Cg(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:M,baseState:M,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dr,lastRenderedState:M},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dr,lastRenderedState:a},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Ng(t){var n=Cg(t);n.next===null&&(n=t.alternate.memoizedState),oa(t,n.next.queue,{},yn())}function Tc(){return Dt(Ea)}function Ag(){return wt().memoizedState}function Tg(){return wt().memoizedState}function Sw(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var a=yn();t=Br(a);var o=Fr(n,t,a);o!==null&&(an(o,n,a),na(o,n,a)),n={cache:rc()},t.payload=n;return}n=n.return}}function kw(t,n,a){var o=yn();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ho(t)?Rg(n,a):(a=Gu(t,n,a,o),a!==null&&(an(a,t,o),_g(a,n,o)))}function jg(t,n,a){var o=yn();oa(t,n,a,o)}function oa(t,n,a,o){var d={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ho(t))Rg(n,d);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=n.lastRenderedReducer,g!==null))try{var k=n.lastRenderedState,_=g(k,a);if(d.hasEagerState=!0,d.eagerState=_,dn(_,k))return wo(t,n,d,0),ot===null&&vo(),!1}catch{}if(a=Gu(t,n,d,o),a!==null)return an(a,t,o),_g(a,n,o),!0}return!1}function jc(t,n,a,o){if(o={lane:2,revertLane:sf(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Ho(t)){if(n)throw Error(i(479))}else n=Gu(t,a,o,2),n!==null&&an(n,t,2)}function Ho(t){var n=t.alternate;return t===Le||n!==null&&n===Le}function Rg(t,n){ri=Oo=!0;var a=t.pending;a===null?n.next=n:(n.next=a.next,a.next=n),t.pending=n}function _g(t,n,a){if((a&4194048)!==0){var o=n.lanes;o&=t.pendingLanes,a|=o,n.lanes=a,lo(t,a)}}var sa={readContext:Dt,use:Bo,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};sa.useEffectEvent=bt;var Lg={readContext:Dt,use:Bo,useCallback:function(t,n){return Zt().memoizedState=[t,n===void 0?null:n],t},useContext:Dt,useEffect:gg,useImperativeHandle:function(t,n,a){a=a!=null?a.concat([t]):null,Io(4194308,4,xg.bind(null,n,t),a)},useLayoutEffect:function(t,n){return Io(4194308,4,t,n)},useInsertionEffect:function(t,n){Io(4,2,t,n)},useMemo:function(t,n){var a=Zt();n=n===void 0?null:n;var o=t();if(El){It(!0);try{t()}finally{It(!1)}}return a.memoizedState=[o,n],o},useReducer:function(t,n,a){var o=Zt();if(a!==void 0){var d=a(n);if(El){It(!0);try{a(n)}finally{It(!1)}}}else d=n;return o.memoizedState=o.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},o.queue=t,t=t.dispatch=kw.bind(null,Le,t),[o.memoizedState,t]},useRef:function(t){var n=Zt();return t={current:t},n.memoizedState=t},useState:function(t){t=Sc(t);var n=t.queue,a=jg.bind(null,Le,n);return n.dispatch=a,[t.memoizedState,a]},useDebugValue:Cc,useDeferredValue:function(t,n){var a=Zt();return Nc(a,t,n)},useTransition:function(){var t=Sc(!1);return t=Eg.bind(null,Le,t.queue,!0,!1),Zt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,a){var o=Le,d=Zt();if(Pe){if(a===void 0)throw Error(i(407));a=a()}else{if(a=n(),ot===null)throw Error(i(349));(He&127)!==0||Wp(o,n,a)}d.memoizedState=a;var g={value:a,getSnapshot:n};return d.queue=g,gg(tg.bind(null,o,g,t),[t]),o.flags|=2048,ii(9,{destroy:void 0},eg.bind(null,o,g,a,n),null),a},useId:function(){var t=Zt(),n=ot.identifierPrefix;if(Pe){var a=Xn,o=Yn;a=(o&~(1<<32-Je(o)-1)).toString(32)+a,n="_"+n+"R_"+a,a=Mo++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=mw++,n="_"+n+"r_"+a.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:Tc,useFormState:cg,useActionState:cg,useOptimistic:function(t){var n=Zt();n.memoizedState=n.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=jc.bind(null,Le,!0,a),a.dispatch=n,[t,n]},useMemoCache:xc,useCacheRefresh:function(){return Zt().memoizedState=Sw.bind(null,Le)},useEffectEvent:function(t){var n=Zt(),a={impl:t};return n.memoizedState=a,function(){if((Qe&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Rc={readContext:Dt,use:Bo,useCallback:wg,useContext:Dt,useEffect:Ec,useImperativeHandle:vg,useInsertionEffect:bg,useLayoutEffect:yg,useMemo:Sg,useReducer:Fo,useRef:pg,useState:function(){return Fo(dr)},useDebugValue:Cc,useDeferredValue:function(t,n){var a=wt();return kg(a,tt.memoizedState,t,n)},useTransition:function(){var t=Fo(dr)[0],n=wt().memoizedState;return[typeof t=="boolean"?t:aa(t),n]},useSyncExternalStore:Jp,useId:Ag,useHostTransitionStatus:Tc,useFormState:fg,useActionState:fg,useOptimistic:function(t,n){var a=wt();return lg(a,tt,t,n)},useMemoCache:xc,useCacheRefresh:Tg};Rc.useEffectEvent=mg;var Dg={readContext:Dt,use:Bo,useCallback:wg,useContext:Dt,useEffect:Ec,useImperativeHandle:vg,useInsertionEffect:bg,useLayoutEffect:yg,useMemo:Sg,useReducer:wc,useRef:pg,useState:function(){return wc(dr)},useDebugValue:Cc,useDeferredValue:function(t,n){var a=wt();return tt===null?Nc(a,t,n):kg(a,tt.memoizedState,t,n)},useTransition:function(){var t=wc(dr)[0],n=wt().memoizedState;return[typeof t=="boolean"?t:aa(t),n]},useSyncExternalStore:Jp,useId:Ag,useHostTransitionStatus:Tc,useFormState:hg,useActionState:hg,useOptimistic:function(t,n){var a=wt();return tt!==null?lg(a,tt,t,n):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:xc,useCacheRefresh:Tg};Dg.useEffectEvent=mg;function _c(t,n,a,o){n=t.memoizedState,a=a(o,n),a=a==null?n:b({},n,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Lc={enqueueSetState:function(t,n,a){t=t._reactInternals;var o=yn(),d=Br(o);d.payload=n,a!=null&&(d.callback=a),n=Fr(t,d,o),n!==null&&(an(n,t,o),na(n,t,o))},enqueueReplaceState:function(t,n,a){t=t._reactInternals;var o=yn(),d=Br(o);d.tag=1,d.payload=n,a!=null&&(d.callback=a),n=Fr(t,d,o),n!==null&&(an(n,t,o),na(n,t,o))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var a=yn(),o=Br(a);o.tag=2,n!=null&&(o.callback=n),n=Fr(t,o,a),n!==null&&(an(n,t,a),na(n,t,a))}};function Og(t,n,a,o,d,g,k){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(o,g,k):n.prototype&&n.prototype.isPureReactComponent?!Xi(a,o)||!Xi(d,g):!0}function Mg(t,n,a,o){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,o),n.state!==t&&Lc.enqueueReplaceState(n,n.state,null)}function Cl(t,n){var a=n;if("ref"in n){a={};for(var o in n)o!=="ref"&&(a[o]=n[o])}if(t=t.defaultProps){a===n&&(a=b({},a));for(var d in t)a[d]===void 0&&(a[d]=t[d])}return a}function zg(t){xo(t)}function Bg(t){console.error(t)}function Fg(t){xo(t)}function qo(t,n){try{var a=t.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function Ig(t,n,a){try{var o=t.onCaughtError;o(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Dc(t,n,a){return a=Br(a),a.tag=3,a.payload={element:null},a.callback=function(){qo(t,n)},a}function Ug(t){return t=Br(t),t.tag=3,t}function Hg(t,n,a,o){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var g=o.value;t.payload=function(){return d(g)},t.callback=function(){Ig(n,a,o)}}var k=a.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(t.callback=function(){Ig(n,a,o),typeof d!="function"&&($r===null?$r=new Set([this]):$r.add(this));var _=o.stack;this.componentDidCatch(o.value,{componentStack:_!==null?_:""})})}function Ew(t,n,a,o,d){if(a.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=a.alternate,n!==null&&Kl(n,a,d,!0),a=pn.current,a!==null){switch(a.tag){case 31:case 13:return Dn===null?es():a.alternate===null&&yt===0&&(yt=3),a.flags&=-257,a.flags|=65536,a.lanes=d,o===jo?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([o]):n.add(o),lf(t,o,d)),!1;case 22:return a.flags|=65536,o===jo?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([o]):a.add(o)),lf(t,o,d)),!1}throw Error(i(435,a.tag))}return lf(t,o,d),es(),!1}if(Pe)return n=pn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,o!==Ju&&(t=Error(i(422),{cause:o}),Ki(jn(t,a)))):(o!==Ju&&(n=Error(i(423),{cause:o}),Ki(jn(n,a))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,o=jn(o,a),d=Dc(t.stateNode,o,d),uc(t,d),yt!==4&&(yt=2)),!1;var g=Error(i(520),{cause:o});if(g=jn(g,a),ma===null?ma=[g]:ma.push(g),yt!==4&&(yt=2),n===null)return!0;o=jn(o,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,t=d&-d,a.lanes|=t,t=Dc(a.stateNode,o,t),uc(a,t),!1;case 1:if(n=a.type,g=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&($r===null||!$r.has(g))))return a.flags|=65536,d&=-d,a.lanes|=d,d=Ug(d),Hg(d,t,a,o),uc(a,d),!1}a=a.return}while(a!==null);return!1}var Oc=Error(i(461)),Et=!1;function Ot(t,n,a,o){n.child=t===null?Vp(n,null,a,o):kl(n,t.child,a,o)}function qg(t,n,a,o,d){a=a.render;var g=n.ref;if("ref"in o){var k={};for(var _ in o)_!=="ref"&&(k[_]=o[_])}else k=o;return xl(n),o=gc(t,n,a,k,g,d),_=mc(),t!==null&&!Et?(bc(t,n,d),hr(t,n,d)):(Pe&&_&&Qu(n),n.flags|=1,Ot(t,n,o,d),n.child)}function Pg(t,n,a,o,d){if(t===null){var g=a.type;return typeof g=="function"&&!Yu(g)&&g.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=g,$g(t,n,g,o,d)):(t=ko(a.type,null,o,n,n.mode,d),t.ref=n.ref,t.return=n,n.child=t)}if(g=t.child,!qc(t,d)){var k=g.memoizedProps;if(a=a.compare,a=a!==null?a:Xi,a(k,o)&&t.ref===n.ref)return hr(t,n,d)}return n.flags|=1,t=or(g,o),t.ref=n.ref,t.return=n,n.child=t}function $g(t,n,a,o,d){if(t!==null){var g=t.memoizedProps;if(Xi(g,o)&&t.ref===n.ref)if(Et=!1,n.pendingProps=o=g,qc(t,d))(t.flags&131072)!==0&&(Et=!0);else return n.lanes=t.lanes,hr(t,n,d)}return Mc(t,n,a,o,d)}function Vg(t,n,a,o){var d=o.children,g=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(g=g!==null?g.baseLanes|a:a,t!==null){for(o=n.child=t.child,d=0;o!==null;)d=d|o.lanes|o.childLanes,o=o.sibling;o=d&~g}else o=0,n.child=null;return Gg(t,n,g,a,o)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ao(n,g!==null?g.cachePool:null),g!==null?Xp(n,g):fc(),Zp(n);else return o=n.lanes=536870912,Gg(t,n,g!==null?g.baseLanes|a:a,a,o)}else g!==null?(Ao(n,g.cachePool),Xp(n,g),Ur(),n.memoizedState=null):(t!==null&&Ao(n,null),fc(),Ur());return Ot(t,n,d,a),n.child}function ua(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Gg(t,n,a,o,d){var g=ic();return g=g===null?null:{parent:St._currentValue,pool:g},n.memoizedState={baseLanes:a,cachePool:g},t!==null&&Ao(n,null),fc(),Zp(n),t!==null&&Kl(t,n,o,!0),n.childLanes=d,null}function Po(t,n){return n=Vo({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function Yg(t,n,a){return kl(n,t.child,null,a),t=Po(n,n.pendingProps),t.flags|=2,gn(n),n.memoizedState=null,t}function Cw(t,n,a){var o=n.pendingProps,d=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(Pe){if(o.mode==="hidden")return t=Po(n,o),n.lanes=536870912,ua(null,t);if(hc(n),(t=ft)?(t=ib(t,Ln),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Lr!==null?{id:Yn,overflow:Xn}:null,retryLane:536870912,hydrationErrors:null},a=Rp(t),a.return=n,n.child=a,Lt=n,ft=null)):t=null,t===null)throw Or(n);return n.lanes=536870912,null}return Po(n,o)}var g=t.memoizedState;if(g!==null){var k=g.dehydrated;if(hc(n),d)if(n.flags&256)n.flags&=-257,n=Yg(t,n,a);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(i(558));else if(Et||Kl(t,n,a,!1),d=(a&t.childLanes)!==0,Et||d){if(o=ot,o!==null&&(k=zi(o,a),k!==0&&k!==g.retryLane))throw g.retryLane=k,gl(t,k),an(o,t,k),Oc;es(),n=Yg(t,n,a)}else t=g.treeContext,ft=On(k.nextSibling),Lt=n,Pe=!0,Dr=null,Ln=!1,t!==null&&Dp(n,t),n=Po(n,o),n.flags|=4096;return n}return t=or(t.child,{mode:o.mode,children:o.children}),t.ref=n.ref,n.child=t,t.return=n,t}function $o(t,n){var a=n.ref;if(a===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(t===null||t.ref!==a)&&(n.flags|=4194816)}}function Mc(t,n,a,o,d){return xl(n),a=gc(t,n,a,o,void 0,d),o=mc(),t!==null&&!Et?(bc(t,n,d),hr(t,n,d)):(Pe&&o&&Qu(n),n.flags|=1,Ot(t,n,a,d),n.child)}function Xg(t,n,a,o,d,g){return xl(n),n.updateQueue=null,a=Kp(n,o,a,d),Qp(t),o=mc(),t!==null&&!Et?(bc(t,n,g),hr(t,n,g)):(Pe&&o&&Qu(n),n.flags|=1,Ot(t,n,a,g),n.child)}function Zg(t,n,a,o,d){if(xl(n),n.stateNode===null){var g=Yl,k=a.contextType;typeof k=="object"&&k!==null&&(g=Dt(k)),g=new a(o,g),n.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Lc,n.stateNode=g,g._reactInternals=n,g=n.stateNode,g.props=o,g.state=n.memoizedState,g.refs={},oc(n),k=a.contextType,g.context=typeof k=="object"&&k!==null?Dt(k):Yl,g.state=n.memoizedState,k=a.getDerivedStateFromProps,typeof k=="function"&&(_c(n,a,k,o),g.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(k=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),k!==g.state&&Lc.enqueueReplaceState(g,g.state,null),la(n,o,g,d),ra(),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(t===null){g=n.stateNode;var _=n.memoizedProps,P=Cl(a,_);g.props=P;var ee=g.context,ae=a.contextType;k=Yl,typeof ae=="object"&&ae!==null&&(k=Dt(ae));var ce=a.getDerivedStateFromProps;ae=typeof ce=="function"||typeof g.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,ae||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_||ee!==k)&&Mg(n,g,o,k),zr=!1;var te=n.memoizedState;g.state=te,la(n,o,g,d),ra(),ee=n.memoizedState,_||te!==ee||zr?(typeof ce=="function"&&(_c(n,a,ce,o),ee=n.memoizedState),(P=zr||Og(n,a,P,o,te,ee,k))?(ae||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(n.flags|=4194308)):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=ee),g.props=o,g.state=ee,g.context=k,o=P):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{g=n.stateNode,sc(t,n),k=n.memoizedProps,ae=Cl(a,k),g.props=ae,ce=n.pendingProps,te=g.context,ee=a.contextType,P=Yl,typeof ee=="object"&&ee!==null&&(P=Dt(ee)),_=a.getDerivedStateFromProps,(ee=typeof _=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(k!==ce||te!==P)&&Mg(n,g,o,P),zr=!1,te=n.memoizedState,g.state=te,la(n,o,g,d),ra();var ie=n.memoizedState;k!==ce||te!==ie||zr||t!==null&&t.dependencies!==null&&Co(t.dependencies)?(typeof _=="function"&&(_c(n,a,_,o),ie=n.memoizedState),(ae=zr||Og(n,a,ae,o,te,ie,P)||t!==null&&t.dependencies!==null&&Co(t.dependencies))?(ee||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(o,ie,P),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(o,ie,P)),typeof g.componentDidUpdate=="function"&&(n.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof g.componentDidUpdate!="function"||k===t.memoizedProps&&te===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&te===t.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=ie),g.props=o,g.state=ie,g.context=P,o=ae):(typeof g.componentDidUpdate!="function"||k===t.memoizedProps&&te===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&te===t.memoizedState||(n.flags|=1024),o=!1)}return g=o,$o(t,n),o=(n.flags&128)!==0,g||o?(g=n.stateNode,a=o&&typeof a.getDerivedStateFromError!="function"?null:g.render(),n.flags|=1,t!==null&&o?(n.child=kl(n,t.child,null,d),n.child=kl(n,null,a,d)):Ot(t,n,a,d),n.memoizedState=g.state,t=n.child):t=hr(t,n,d),t}function Qg(t,n,a,o){return bl(),n.flags|=256,Ot(t,n,a,o),n.child}var zc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bc(t){return{baseLanes:t,cachePool:Ip()}}function Fc(t,n,a){return t=t!==null?t.childLanes&~a:0,n&&(t|=bn),t}function Kg(t,n,a){var o=n.pendingProps,d=!1,g=(n.flags&128)!==0,k;if((k=g)||(k=t!==null&&t.memoizedState===null?!1:(vt.current&2)!==0),k&&(d=!0,n.flags&=-129),k=(n.flags&32)!==0,n.flags&=-33,t===null){if(Pe){if(d?Ir(n):Ur(),(t=ft)?(t=ib(t,Ln),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Lr!==null?{id:Yn,overflow:Xn}:null,retryLane:536870912,hydrationErrors:null},a=Rp(t),a.return=n,n.child=a,Lt=n,ft=null)):t=null,t===null)throw Or(n);return wf(t)?n.lanes=32:n.lanes=536870912,null}var _=o.children;return o=o.fallback,d?(Ur(),d=n.mode,_=Vo({mode:"hidden",children:_},d),o=ml(o,d,a,null),_.return=n,o.return=n,_.sibling=o,n.child=_,o=n.child,o.memoizedState=Bc(a),o.childLanes=Fc(t,k,a),n.memoizedState=zc,ua(null,o)):(Ir(n),Ic(n,_))}var P=t.memoizedState;if(P!==null&&(_=P.dehydrated,_!==null)){if(g)n.flags&256?(Ir(n),n.flags&=-257,n=Uc(t,n,a)):n.memoizedState!==null?(Ur(),n.child=t.child,n.flags|=128,n=null):(Ur(),_=o.fallback,d=n.mode,o=Vo({mode:"visible",children:o.children},d),_=ml(_,d,a,null),_.flags|=2,o.return=n,_.return=n,o.sibling=_,n.child=o,kl(n,t.child,null,a),o=n.child,o.memoizedState=Bc(a),o.childLanes=Fc(t,k,a),n.memoizedState=zc,n=ua(null,o));else if(Ir(n),wf(_)){if(k=_.nextSibling&&_.nextSibling.dataset,k)var ee=k.dgst;k=ee,o=Error(i(419)),o.stack="",o.digest=k,Ki({value:o,source:null,stack:null}),n=Uc(t,n,a)}else if(Et||Kl(t,n,a,!1),k=(a&t.childLanes)!==0,Et||k){if(k=ot,k!==null&&(o=zi(k,a),o!==0&&o!==P.retryLane))throw P.retryLane=o,gl(t,o),an(k,t,o),Oc;vf(_)||es(),n=Uc(t,n,a)}else vf(_)?(n.flags|=192,n.child=t.child,n=null):(t=P.treeContext,ft=On(_.nextSibling),Lt=n,Pe=!0,Dr=null,Ln=!1,t!==null&&Dp(n,t),n=Ic(n,o.children),n.flags|=4096);return n}return d?(Ur(),_=o.fallback,d=n.mode,P=t.child,ee=P.sibling,o=or(P,{mode:"hidden",children:o.children}),o.subtreeFlags=P.subtreeFlags&65011712,ee!==null?_=or(ee,_):(_=ml(_,d,a,null),_.flags|=2),_.return=n,o.return=n,o.sibling=_,n.child=o,ua(null,o),o=n.child,_=t.child.memoizedState,_===null?_=Bc(a):(d=_.cachePool,d!==null?(P=St._currentValue,d=d.parent!==P?{parent:P,pool:P}:d):d=Ip(),_={baseLanes:_.baseLanes|a,cachePool:d}),o.memoizedState=_,o.childLanes=Fc(t,k,a),n.memoizedState=zc,ua(t.child,o)):(Ir(n),a=t.child,t=a.sibling,a=or(a,{mode:"visible",children:o.children}),a.return=n,a.sibling=null,t!==null&&(k=n.deletions,k===null?(n.deletions=[t],n.flags|=16):k.push(t)),n.child=a,n.memoizedState=null,a)}function Ic(t,n){return n=Vo({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Vo(t,n){return t=hn(22,t,null,n),t.lanes=0,t}function Uc(t,n,a){return kl(n,t.child,null,a),t=Ic(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function Jg(t,n,a){t.lanes|=n;var o=t.alternate;o!==null&&(o.lanes|=n),tc(t.return,n,a)}function Hc(t,n,a,o,d,g){var k=t.memoizedState;k===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:a,tailMode:d,treeForkCount:g}:(k.isBackwards=n,k.rendering=null,k.renderingStartTime=0,k.last=o,k.tail=a,k.tailMode=d,k.treeForkCount=g)}function Wg(t,n,a){var o=n.pendingProps,d=o.revealOrder,g=o.tail;o=o.children;var k=vt.current,_=(k&2)!==0;if(_?(k=k&1|2,n.flags|=128):k&=1,A(vt,k),Ot(t,n,o,a),o=Pe?Qi:0,!_&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Jg(t,a,n);else if(t.tag===19)Jg(t,a,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(d){case"forwards":for(a=n.child,d=null;a!==null;)t=a.alternate,t!==null&&Do(t)===null&&(d=a),a=a.sibling;a=d,a===null?(d=n.child,n.child=null):(d=a.sibling,a.sibling=null),Hc(n,!1,d,a,g,o);break;case"backwards":case"unstable_legacy-backwards":for(a=null,d=n.child,n.child=null;d!==null;){if(t=d.alternate,t!==null&&Do(t)===null){n.child=d;break}t=d.sibling,d.sibling=a,a=d,d=t}Hc(n,!0,a,null,g,o);break;case"together":Hc(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function hr(t,n,a){if(t!==null&&(n.dependencies=t.dependencies),Pr|=n.lanes,(a&n.childLanes)===0)if(t!==null){if(Kl(t,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(i(153));if(n.child!==null){for(t=n.child,a=or(t,t.pendingProps),n.child=a,a.return=n;t.sibling!==null;)t=t.sibling,a=a.sibling=or(t,t.pendingProps),a.return=n;a.sibling=null}return n.child}function qc(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&Co(t)))}function Nw(t,n,a){switch(n.tag){case 3:ye(n,n.stateNode.containerInfo),Mr(n,St,t.memoizedState.cache),bl();break;case 27:case 5:me(n);break;case 4:ye(n,n.stateNode.containerInfo);break;case 10:Mr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,hc(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(Ir(n),n.flags|=128,null):(a&n.child.childLanes)!==0?Kg(t,n,a):(Ir(n),t=hr(t,n,a),t!==null?t.sibling:null);Ir(n);break;case 19:var d=(t.flags&128)!==0;if(o=(a&n.childLanes)!==0,o||(Kl(t,n,a,!1),o=(a&n.childLanes)!==0),d){if(o)return Wg(t,n,a);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),A(vt,vt.current),o)break;return null;case 22:return n.lanes=0,Vg(t,n,a,n.pendingProps);case 24:Mr(n,St,t.memoizedState.cache)}return hr(t,n,a)}function em(t,n,a){if(t!==null)if(t.memoizedProps!==n.pendingProps)Et=!0;else{if(!qc(t,a)&&(n.flags&128)===0)return Et=!1,Nw(t,n,a);Et=(t.flags&131072)!==0}else Et=!1,Pe&&(n.flags&1048576)!==0&&Lp(n,Qi,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(t=wl(n.elementType),n.type=t,typeof t=="function")Yu(t)?(o=Cl(t,o),n.tag=1,n=Zg(null,n,t,o,a)):(n.tag=0,n=Mc(null,n,t,o,a));else{if(t!=null){var d=t.$$typeof;if(d===z){n.tag=11,n=qg(null,n,t,o,a);break e}else if(d===O){n.tag=14,n=Pg(null,n,t,o,a);break e}}throw n=I(t)||t,Error(i(306,n,""))}}return n;case 0:return Mc(t,n,n.type,n.pendingProps,a);case 1:return o=n.type,d=Cl(o,n.pendingProps),Zg(t,n,o,d,a);case 3:e:{if(ye(n,n.stateNode.containerInfo),t===null)throw Error(i(387));o=n.pendingProps;var g=n.memoizedState;d=g.element,sc(t,n),la(n,o,null,a);var k=n.memoizedState;if(o=k.cache,Mr(n,St,o),o!==g.cache&&nc(n,[St],a,!0),ra(),o=k.element,g.isDehydrated)if(g={element:o,isDehydrated:!1,cache:k.cache},n.updateQueue.baseState=g,n.memoizedState=g,n.flags&256){n=Qg(t,n,o,a);break e}else if(o!==d){d=jn(Error(i(424)),n),Ki(d),n=Qg(t,n,o,a);break e}else for(t=n.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,ft=On(t.firstChild),Lt=n,Pe=!0,Dr=null,Ln=!0,a=Vp(n,null,o,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(bl(),o===d){n=hr(t,n,a);break e}Ot(t,n,o,a)}n=n.child}return n;case 26:return $o(t,n),t===null?(a=fb(n.type,null,n.pendingProps,null))?n.memoizedState=a:Pe||(a=n.type,t=n.pendingProps,o=os(fe.current).createElement(a),o[gt]=n,o[_t]=t,Mt(o,a,t),we(o),n.stateNode=o):n.memoizedState=fb(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return me(n),t===null&&Pe&&(o=n.stateNode=sb(n.type,n.pendingProps,fe.current),Lt=n,Ln=!0,d=ft,Xr(n.type)?(Sf=d,ft=On(o.firstChild)):ft=d),Ot(t,n,n.pendingProps.children,a),$o(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&Pe&&((d=o=ft)&&(o=nS(o,n.type,n.pendingProps,Ln),o!==null?(n.stateNode=o,Lt=n,ft=On(o.firstChild),Ln=!1,d=!0):d=!1),d||Or(n)),me(n),d=n.type,g=n.pendingProps,k=t!==null?t.memoizedProps:null,o=g.children,bf(d,g)?o=null:k!==null&&bf(d,k)&&(n.flags|=32),n.memoizedState!==null&&(d=gc(t,n,bw,null,null,a),Ea._currentValue=d),$o(t,n),Ot(t,n,o,a),n.child;case 6:return t===null&&Pe&&((t=a=ft)&&(a=rS(a,n.pendingProps,Ln),a!==null?(n.stateNode=a,Lt=n,ft=null,t=!0):t=!1),t||Or(n)),null;case 13:return Kg(t,n,a);case 4:return ye(n,n.stateNode.containerInfo),o=n.pendingProps,t===null?n.child=kl(n,null,o,a):Ot(t,n,o,a),n.child;case 11:return qg(t,n,n.type,n.pendingProps,a);case 7:return Ot(t,n,n.pendingProps,a),n.child;case 8:return Ot(t,n,n.pendingProps.children,a),n.child;case 12:return Ot(t,n,n.pendingProps.children,a),n.child;case 10:return o=n.pendingProps,Mr(n,n.type,o.value),Ot(t,n,o.children,a),n.child;case 9:return d=n.type._context,o=n.pendingProps.children,xl(n),d=Dt(d),o=o(d),n.flags|=1,Ot(t,n,o,a),n.child;case 14:return Pg(t,n,n.type,n.pendingProps,a);case 15:return $g(t,n,n.type,n.pendingProps,a);case 19:return Wg(t,n,a);case 31:return Cw(t,n,a);case 22:return Vg(t,n,a,n.pendingProps);case 24:return xl(n),o=Dt(St),t===null?(d=ic(),d===null&&(d=ot,g=rc(),d.pooledCache=g,g.refCount++,g!==null&&(d.pooledCacheLanes|=a),d=g),n.memoizedState={parent:o,cache:d},oc(n),Mr(n,St,d)):((t.lanes&a)!==0&&(sc(t,n),la(n,null,null,a),ra()),d=t.memoizedState,g=n.memoizedState,d.parent!==o?(d={parent:o,cache:o},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),Mr(n,St,o)):(o=g.cache,Mr(n,St,o),o!==d.cache&&nc(n,[St],a,!0))),Ot(t,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(i(156,n.tag))}function pr(t){t.flags|=4}function Pc(t,n,a,o,d){if((n=(t.mode&32)!==0)&&(n=!1),n){if(t.flags|=16777216,(d&335544128)===d)if(t.stateNode.complete)t.flags|=8192;else if(Am())t.flags|=8192;else throw Sl=jo,ac}else t.flags&=-16777217}function tm(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!mb(n))if(Am())t.flags|=8192;else throw Sl=jo,ac}function Go(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?Bl():536870912,t.lanes|=n,ui|=n)}function ca(t,n){if(!Pe)switch(t.tailMode){case"hidden":n=t.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:o.sibling=null}}function dt(t){var n=t.alternate!==null&&t.alternate.child===t.child,a=0,o=0;if(n)for(var d=t.child;d!==null;)a|=d.lanes|d.childLanes,o|=d.subtreeFlags&65011712,o|=d.flags&65011712,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)a|=d.lanes|d.childLanes,o|=d.subtreeFlags,o|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=o,t.childLanes=a,n}function Aw(t,n,a){var o=n.pendingProps;switch(Ku(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(n),null;case 1:return dt(n),null;case 3:return a=n.stateNode,o=null,t!==null&&(o=t.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),cr(St),pe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Ql(n)?pr(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Wu())),dt(n),null;case 26:var d=n.type,g=n.memoizedState;return t===null?(pr(n),g!==null?(dt(n),tm(n,g)):(dt(n),Pc(n,d,null,o,a))):g?g!==t.memoizedState?(pr(n),dt(n),tm(n,g)):(dt(n),n.flags&=-16777217):(t=t.memoizedProps,t!==o&&pr(n),dt(n),Pc(n,d,t,o,a)),null;case 27:if(xe(n),a=fe.current,d=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==o&&pr(n);else{if(!o){if(n.stateNode===null)throw Error(i(166));return dt(n),null}t=ne.current,Ql(n)?Op(n):(t=sb(d,o,a),n.stateNode=t,pr(n))}return dt(n),null;case 5:if(xe(n),d=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==o&&pr(n);else{if(!o){if(n.stateNode===null)throw Error(i(166));return dt(n),null}if(g=ne.current,Ql(n))Op(n);else{var k=os(fe.current);switch(g){case 1:g=k.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:g=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":g=k.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":g=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":g=k.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof o.is=="string"?k.createElement("select",{is:o.is}):k.createElement("select"),o.multiple?g.multiple=!0:o.size&&(g.size=o.size);break;default:g=typeof o.is=="string"?k.createElement(d,{is:o.is}):k.createElement(d)}}g[gt]=n,g[_t]=o;e:for(k=n.child;k!==null;){if(k.tag===5||k.tag===6)g.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===n)break e;for(;k.sibling===null;){if(k.return===null||k.return===n)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}n.stateNode=g;e:switch(Mt(g,d,o),d){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&pr(n)}}return dt(n),Pc(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,a),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==o&&pr(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(i(166));if(t=fe.current,Ql(n)){if(t=n.stateNode,a=n.memoizedProps,o=null,d=Lt,d!==null)switch(d.tag){case 27:case 5:o=d.memoizedProps}t[gt]=n,t=!!(t.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||Km(t.nodeValue,a)),t||Or(n,!0)}else t=os(t).createTextNode(o),t[gt]=n,n.stateNode=t}return dt(n),null;case 31:if(a=n.memoizedState,t===null||t.memoizedState!==null){if(o=Ql(n),a!==null){if(t===null){if(!o)throw Error(i(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(557));t[gt]=n}else bl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),t=!1}else a=Wu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return n.flags&256?(gn(n),n):(gn(n),null);if((n.flags&128)!==0)throw Error(i(558))}return dt(n),null;case 13:if(o=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=Ql(n),o!==null&&o.dehydrated!==null){if(t===null){if(!d)throw Error(i(318));if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(i(317));d[gt]=n}else bl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),d=!1}else d=Wu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(gn(n),n):(gn(n),null)}return gn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=o!==null,t=t!==null&&t.memoizedState!==null,a&&(o=n.child,d=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(d=o.alternate.memoizedState.cachePool.pool),g=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(g=o.memoizedState.cachePool.pool),g!==d&&(o.flags|=2048)),a!==t&&a&&(n.child.flags|=8192),Go(n,n.updateQueue),dt(n),null);case 4:return pe(),t===null&&df(n.stateNode.containerInfo),dt(n),null;case 10:return cr(n.type),dt(n),null;case 19:if(q(vt),o=n.memoizedState,o===null)return dt(n),null;if(d=(n.flags&128)!==0,g=o.rendering,g===null)if(d)ca(o,!1);else{if(yt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(g=Do(t),g!==null){for(n.flags|=128,ca(o,!1),t=g.updateQueue,n.updateQueue=t,Go(n,t),n.subtreeFlags=0,t=a,a=n.child;a!==null;)jp(a,t),a=a.sibling;return A(vt,vt.current&1|2),Pe&&sr(n,o.treeForkCount),n.child}t=t.sibling}o.tail!==null&&at()>Ko&&(n.flags|=128,d=!0,ca(o,!1),n.lanes=4194304)}else{if(!d)if(t=Do(g),t!==null){if(n.flags|=128,d=!0,t=t.updateQueue,n.updateQueue=t,Go(n,t),ca(o,!0),o.tail===null&&o.tailMode==="hidden"&&!g.alternate&&!Pe)return dt(n),null}else 2*at()-o.renderingStartTime>Ko&&a!==536870912&&(n.flags|=128,d=!0,ca(o,!1),n.lanes=4194304);o.isBackwards?(g.sibling=n.child,n.child=g):(t=o.last,t!==null?t.sibling=g:n.child=g,o.last=g)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=at(),t.sibling=null,a=vt.current,A(vt,d?a&1|2:a&1),Pe&&sr(n,o.treeForkCount),t):(dt(n),null);case 22:case 23:return gn(n),dc(),o=n.memoizedState!==null,t!==null?t.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(a&536870912)!==0&&(n.flags&128)===0&&(dt(n),n.subtreeFlags&6&&(n.flags|=8192)):dt(n),a=n.updateQueue,a!==null&&Go(n,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==a&&(n.flags|=2048),t!==null&&q(vl),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),cr(St),dt(n),null;case 25:return null;case 30:return null}throw Error(i(156,n.tag))}function Tw(t,n){switch(Ku(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return cr(St),pe(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return xe(n),null;case 31:if(n.memoizedState!==null){if(gn(n),n.alternate===null)throw Error(i(340));bl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(gn(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(i(340));bl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return q(vt),null;case 4:return pe(),null;case 10:return cr(n.type),null;case 22:case 23:return gn(n),dc(),t!==null&&q(vl),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return cr(St),null;case 25:return null;default:return null}}function nm(t,n){switch(Ku(n),n.tag){case 3:cr(St),pe();break;case 26:case 27:case 5:xe(n);break;case 4:pe();break;case 31:n.memoizedState!==null&&gn(n);break;case 13:gn(n);break;case 19:q(vt);break;case 10:cr(n.type);break;case 22:case 23:gn(n),dc(),t!==null&&q(vl);break;case 24:cr(St)}}function fa(t,n){try{var a=n.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var d=o.next;a=d;do{if((a.tag&t)===t){o=void 0;var g=a.create,k=a.inst;o=g(),k.destroy=o}a=a.next}while(a!==d)}}catch(_){et(n,n.return,_)}}function Hr(t,n,a){try{var o=n.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var g=d.next;o=g;do{if((o.tag&t)===t){var k=o.inst,_=k.destroy;if(_!==void 0){k.destroy=void 0,d=n;var P=a,ee=_;try{ee()}catch(ae){et(d,P,ae)}}}o=o.next}while(o!==g)}}catch(ae){et(n,n.return,ae)}}function rm(t){var n=t.updateQueue;if(n!==null){var a=t.stateNode;try{Yp(n,a)}catch(o){et(t,t.return,o)}}}function lm(t,n,a){a.props=Cl(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(o){et(t,n,o)}}function da(t,n){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var o=t.stateNode;break;case 30:o=t.stateNode;break;default:o=t.stateNode}typeof a=="function"?t.refCleanup=a(o):a.current=o}}catch(d){et(t,n,d)}}function Zn(t,n){var a=t.ref,o=t.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(d){et(t,n,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(d){et(t,n,d)}else a.current=null}function im(t){var n=t.type,a=t.memoizedProps,o=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&o.focus();break e;case"img":a.src?o.src=a.src:a.srcSet&&(o.srcset=a.srcSet)}}catch(d){et(t,t.return,d)}}function $c(t,n,a){try{var o=t.stateNode;Qw(o,t.type,a,n),o[_t]=n}catch(d){et(t,t.return,d)}}function am(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Xr(t.type)||t.tag===4}function Vc(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||am(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Xr(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Gc(t,n,a){var o=t.tag;if(o===5||o===6)t=t.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(t),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=ir));else if(o!==4&&(o===27&&Xr(t.type)&&(a=t.stateNode,n=null),t=t.child,t!==null))for(Gc(t,n,a),t=t.sibling;t!==null;)Gc(t,n,a),t=t.sibling}function Yo(t,n,a){var o=t.tag;if(o===5||o===6)t=t.stateNode,n?a.insertBefore(t,n):a.appendChild(t);else if(o!==4&&(o===27&&Xr(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Yo(t,n,a),t=t.sibling;t!==null;)Yo(t,n,a),t=t.sibling}function om(t){var n=t.stateNode,a=t.memoizedProps;try{for(var o=t.type,d=n.attributes;d.length;)n.removeAttributeNode(d[0]);Mt(n,o,a),n[gt]=t,n[_t]=a}catch(g){et(t,t.return,g)}}var gr=!1,Ct=!1,Yc=!1,sm=typeof WeakSet=="function"?WeakSet:Set,Rt=null;function jw(t,n){if(t=t.containerInfo,gf=ps,t=vp(t),Uu(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var o=a.getSelection&&a.getSelection();if(o&&o.rangeCount!==0){a=o.anchorNode;var d=o.anchorOffset,g=o.focusNode;o=o.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var k=0,_=-1,P=-1,ee=0,ae=0,ce=t,te=null;t:for(;;){for(var ie;ce!==a||d!==0&&ce.nodeType!==3||(_=k+d),ce!==g||o!==0&&ce.nodeType!==3||(P=k+o),ce.nodeType===3&&(k+=ce.nodeValue.length),(ie=ce.firstChild)!==null;)te=ce,ce=ie;for(;;){if(ce===t)break t;if(te===a&&++ee===d&&(_=k),te===g&&++ae===o&&(P=k),(ie=ce.nextSibling)!==null)break;ce=te,te=ce.parentNode}ce=ie}a=_===-1||P===-1?null:{start:_,end:P}}else a=null}a=a||{start:0,end:0}}else a=null;for(mf={focusedElem:t,selectionRange:a},ps=!1,Rt=n;Rt!==null;)if(n=Rt,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,Rt=t;else for(;Rt!==null;){switch(n=Rt,g=n.alternate,t=n.flags,n.tag){case 0:if((t&4)!==0&&(t=n.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)d=t[a],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,a=n,d=g.memoizedProps,g=g.memoizedState,o=a.stateNode;try{var ke=Cl(a.type,d);t=o.getSnapshotBeforeUpdate(ke,g),o.__reactInternalSnapshotBeforeUpdate=t}catch(je){et(a,a.return,je)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,a=t.nodeType,a===9)xf(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":xf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(i(163))}if(t=n.sibling,t!==null){t.return=n.return,Rt=t;break}Rt=n.return}}function um(t,n,a){var o=a.flags;switch(a.tag){case 0:case 11:case 15:br(t,a),o&4&&fa(5,a);break;case 1:if(br(t,a),o&4)if(t=a.stateNode,n===null)try{t.componentDidMount()}catch(k){et(a,a.return,k)}else{var d=Cl(a.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(d,n,t.__reactInternalSnapshotBeforeUpdate)}catch(k){et(a,a.return,k)}}o&64&&rm(a),o&512&&da(a,a.return);break;case 3:if(br(t,a),o&64&&(t=a.updateQueue,t!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{Yp(t,n)}catch(k){et(a,a.return,k)}}break;case 27:n===null&&o&4&&om(a);case 26:case 5:br(t,a),n===null&&o&4&&im(a),o&512&&da(a,a.return);break;case 12:br(t,a);break;case 31:br(t,a),o&4&&dm(t,a);break;case 13:br(t,a),o&4&&hm(t,a),o&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=Fw.bind(null,a),lS(t,a))));break;case 22:if(o=a.memoizedState!==null||gr,!o){n=n!==null&&n.memoizedState!==null||Ct,d=gr;var g=Ct;gr=o,(Ct=n)&&!g?yr(t,a,(a.subtreeFlags&8772)!==0):br(t,a),gr=d,Ct=g}break;case 30:break;default:br(t,a)}}function cm(t){var n=t.alternate;n!==null&&(t.alternate=null,cm(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Ui(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ht=null,tn=!1;function mr(t,n,a){for(a=a.child;a!==null;)fm(t,n,a),a=a.sibling}function fm(t,n,a){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(jt,a)}catch{}switch(a.tag){case 26:Ct||Zn(a,n),mr(t,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ct||Zn(a,n);var o=ht,d=tn;Xr(a.type)&&(ht=a.stateNode,tn=!1),mr(t,n,a),wa(a.stateNode),ht=o,tn=d;break;case 5:Ct||Zn(a,n);case 6:if(o=ht,d=tn,ht=null,mr(t,n,a),ht=o,tn=d,ht!==null)if(tn)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(a.stateNode)}catch(g){et(a,n,g)}else try{ht.removeChild(a.stateNode)}catch(g){et(a,n,g)}break;case 18:ht!==null&&(tn?(t=ht,rb(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),bi(t)):rb(ht,a.stateNode));break;case 4:o=ht,d=tn,ht=a.stateNode.containerInfo,tn=!0,mr(t,n,a),ht=o,tn=d;break;case 0:case 11:case 14:case 15:Hr(2,a,n),Ct||Hr(4,a,n),mr(t,n,a);break;case 1:Ct||(Zn(a,n),o=a.stateNode,typeof o.componentWillUnmount=="function"&&lm(a,n,o)),mr(t,n,a);break;case 21:mr(t,n,a);break;case 22:Ct=(o=Ct)||a.memoizedState!==null,mr(t,n,a),Ct=o;break;default:mr(t,n,a)}}function dm(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{bi(t)}catch(a){et(n,n.return,a)}}}function hm(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{bi(t)}catch(a){et(n,n.return,a)}}function Rw(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new sm),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new sm),n;default:throw Error(i(435,t.tag))}}function Xo(t,n){var a=Rw(t);n.forEach(function(o){if(!a.has(o)){a.add(o);var d=Iw.bind(null,t,o);o.then(d,d)}})}function nn(t,n){var a=n.deletions;if(a!==null)for(var o=0;o<a.length;o++){var d=a[o],g=t,k=n,_=k;e:for(;_!==null;){switch(_.tag){case 27:if(Xr(_.type)){ht=_.stateNode,tn=!1;break e}break;case 5:ht=_.stateNode,tn=!1;break e;case 3:case 4:ht=_.stateNode.containerInfo,tn=!0;break e}_=_.return}if(ht===null)throw Error(i(160));fm(g,k,d),ht=null,tn=!1,g=d.alternate,g!==null&&(g.return=null),d.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)pm(n,t),n=n.sibling}var Hn=null;function pm(t,n){var a=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:nn(n,t),rn(t),o&4&&(Hr(3,t,t.return),fa(3,t),Hr(5,t,t.return));break;case 1:nn(n,t),rn(t),o&512&&(Ct||a===null||Zn(a,a.return)),o&64&&gr&&(t=t.updateQueue,t!==null&&(o=t.callbacks,o!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?o:a.concat(o))));break;case 26:var d=Hn;if(nn(n,t),rn(t),o&512&&(Ct||a===null||Zn(a,a.return)),o&4){var g=a!==null?a.memoizedState:null;if(o=t.memoizedState,a===null)if(o===null)if(t.stateNode===null){e:{o=t.type,a=t.memoizedProps,d=d.ownerDocument||d;t:switch(o){case"title":g=d.getElementsByTagName("title")[0],(!g||g[fl]||g[gt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=d.createElement(o),d.head.insertBefore(g,d.querySelector("head > title"))),Mt(g,o,a),g[gt]=t,we(g),o=g;break e;case"link":var k=pb("link","href",d).get(o+(a.href||""));if(k){for(var _=0;_<k.length;_++)if(g=k[_],g.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&g.getAttribute("rel")===(a.rel==null?null:a.rel)&&g.getAttribute("title")===(a.title==null?null:a.title)&&g.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){k.splice(_,1);break t}}g=d.createElement(o),Mt(g,o,a),d.head.appendChild(g);break;case"meta":if(k=pb("meta","content",d).get(o+(a.content||""))){for(_=0;_<k.length;_++)if(g=k[_],g.getAttribute("content")===(a.content==null?null:""+a.content)&&g.getAttribute("name")===(a.name==null?null:a.name)&&g.getAttribute("property")===(a.property==null?null:a.property)&&g.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&g.getAttribute("charset")===(a.charSet==null?null:a.charSet)){k.splice(_,1);break t}}g=d.createElement(o),Mt(g,o,a),d.head.appendChild(g);break;default:throw Error(i(468,o))}g[gt]=t,we(g),o=g}t.stateNode=o}else gb(d,t.type,t.stateNode);else t.stateNode=hb(d,o,t.memoizedProps);else g!==o?(g===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):g.count--,o===null?gb(d,t.type,t.stateNode):hb(d,o,t.memoizedProps)):o===null&&t.stateNode!==null&&$c(t,t.memoizedProps,a.memoizedProps)}break;case 27:nn(n,t),rn(t),o&512&&(Ct||a===null||Zn(a,a.return)),a!==null&&o&4&&$c(t,t.memoizedProps,a.memoizedProps);break;case 5:if(nn(n,t),rn(t),o&512&&(Ct||a===null||Zn(a,a.return)),t.flags&32){d=t.stateNode;try{Ul(d,"")}catch(ke){et(t,t.return,ke)}}o&4&&t.stateNode!=null&&(d=t.memoizedProps,$c(t,d,a!==null?a.memoizedProps:d)),o&1024&&(Yc=!0);break;case 6:if(nn(n,t),rn(t),o&4){if(t.stateNode===null)throw Error(i(162));o=t.memoizedProps,a=t.stateNode;try{a.nodeValue=o}catch(ke){et(t,t.return,ke)}}break;case 3:if(cs=null,d=Hn,Hn=ss(n.containerInfo),nn(n,t),Hn=d,rn(t),o&4&&a!==null&&a.memoizedState.isDehydrated)try{bi(n.containerInfo)}catch(ke){et(t,t.return,ke)}Yc&&(Yc=!1,gm(t));break;case 4:o=Hn,Hn=ss(t.stateNode.containerInfo),nn(n,t),rn(t),Hn=o;break;case 12:nn(n,t),rn(t);break;case 31:nn(n,t),rn(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Xo(t,o)));break;case 13:nn(n,t),rn(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Qo=at()),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Xo(t,o)));break;case 22:d=t.memoizedState!==null;var P=a!==null&&a.memoizedState!==null,ee=gr,ae=Ct;if(gr=ee||d,Ct=ae||P,nn(n,t),Ct=ae,gr=ee,rn(t),o&8192)e:for(n=t.stateNode,n._visibility=d?n._visibility&-2:n._visibility|1,d&&(a===null||P||gr||Ct||Nl(t)),a=null,n=t;;){if(n.tag===5||n.tag===26){if(a===null){P=a=n;try{if(g=P.stateNode,d)k=g.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{_=P.stateNode;var ce=P.memoizedProps.style,te=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;_.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(ke){et(P,P.return,ke)}}}else if(n.tag===6){if(a===null){P=n;try{P.stateNode.nodeValue=d?"":P.memoizedProps}catch(ke){et(P,P.return,ke)}}}else if(n.tag===18){if(a===null){P=n;try{var ie=P.stateNode;d?lb(ie,!0):lb(P.stateNode,!1)}catch(ke){et(P,P.return,ke)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break e;for(;n.sibling===null;){if(n.return===null||n.return===t)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=t.updateQueue,o!==null&&(a=o.retryQueue,a!==null&&(o.retryQueue=null,Xo(t,a))));break;case 19:nn(n,t),rn(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Xo(t,o)));break;case 30:break;case 21:break;default:nn(n,t),rn(t)}}function rn(t){var n=t.flags;if(n&2){try{for(var a,o=t.return;o!==null;){if(am(o)){a=o;break}o=o.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var d=a.stateNode,g=Vc(t);Yo(t,g,d);break;case 5:var k=a.stateNode;a.flags&32&&(Ul(k,""),a.flags&=-33);var _=Vc(t);Yo(t,_,k);break;case 3:case 4:var P=a.stateNode.containerInfo,ee=Vc(t);Gc(t,ee,P);break;default:throw Error(i(161))}}catch(ae){et(t,t.return,ae)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function gm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;gm(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function br(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)um(t,n.alternate,n),n=n.sibling}function Nl(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:Hr(4,n,n.return),Nl(n);break;case 1:Zn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&lm(n,n.return,a),Nl(n);break;case 27:wa(n.stateNode);case 26:case 5:Zn(n,n.return),Nl(n);break;case 22:n.memoizedState===null&&Nl(n);break;case 30:Nl(n);break;default:Nl(n)}t=t.sibling}}function yr(t,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,d=t,g=n,k=g.flags;switch(g.tag){case 0:case 11:case 15:yr(d,g,a),fa(4,g);break;case 1:if(yr(d,g,a),o=g,d=o.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(ee){et(o,o.return,ee)}if(o=g,d=o.updateQueue,d!==null){var _=o.stateNode;try{var P=d.shared.hiddenCallbacks;if(P!==null)for(d.shared.hiddenCallbacks=null,d=0;d<P.length;d++)Gp(P[d],_)}catch(ee){et(o,o.return,ee)}}a&&k&64&&rm(g),da(g,g.return);break;case 27:om(g);case 26:case 5:yr(d,g,a),a&&o===null&&k&4&&im(g),da(g,g.return);break;case 12:yr(d,g,a);break;case 31:yr(d,g,a),a&&k&4&&dm(d,g);break;case 13:yr(d,g,a),a&&k&4&&hm(d,g);break;case 22:g.memoizedState===null&&yr(d,g,a),da(g,g.return);break;case 30:break;default:yr(d,g,a)}n=n.sibling}}function Xc(t,n){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&Ji(a))}function Zc(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ji(t))}function qn(t,n,a,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)mm(t,n,a,o),n=n.sibling}function mm(t,n,a,o){var d=n.flags;switch(n.tag){case 0:case 11:case 15:qn(t,n,a,o),d&2048&&fa(9,n);break;case 1:qn(t,n,a,o);break;case 3:qn(t,n,a,o),d&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ji(t)));break;case 12:if(d&2048){qn(t,n,a,o),t=n.stateNode;try{var g=n.memoizedProps,k=g.id,_=g.onPostCommit;typeof _=="function"&&_(k,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(P){et(n,n.return,P)}}else qn(t,n,a,o);break;case 31:qn(t,n,a,o);break;case 13:qn(t,n,a,o);break;case 23:break;case 22:g=n.stateNode,k=n.alternate,n.memoizedState!==null?g._visibility&2?qn(t,n,a,o):ha(t,n):g._visibility&2?qn(t,n,a,o):(g._visibility|=2,ai(t,n,a,o,(n.subtreeFlags&10256)!==0||!1)),d&2048&&Xc(k,n);break;case 24:qn(t,n,a,o),d&2048&&Zc(n.alternate,n);break;default:qn(t,n,a,o)}}function ai(t,n,a,o,d){for(d=d&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var g=t,k=n,_=a,P=o,ee=k.flags;switch(k.tag){case 0:case 11:case 15:ai(g,k,_,P,d),fa(8,k);break;case 23:break;case 22:var ae=k.stateNode;k.memoizedState!==null?ae._visibility&2?ai(g,k,_,P,d):ha(g,k):(ae._visibility|=2,ai(g,k,_,P,d)),d&&ee&2048&&Xc(k.alternate,k);break;case 24:ai(g,k,_,P,d),d&&ee&2048&&Zc(k.alternate,k);break;default:ai(g,k,_,P,d)}n=n.sibling}}function ha(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=t,o=n,d=o.flags;switch(o.tag){case 22:ha(a,o),d&2048&&Xc(o.alternate,o);break;case 24:ha(a,o),d&2048&&Zc(o.alternate,o);break;default:ha(a,o)}n=n.sibling}}var pa=8192;function oi(t,n,a){if(t.subtreeFlags&pa)for(t=t.child;t!==null;)bm(t,n,a),t=t.sibling}function bm(t,n,a){switch(t.tag){case 26:oi(t,n,a),t.flags&pa&&t.memoizedState!==null&&mS(a,Hn,t.memoizedState,t.memoizedProps);break;case 5:oi(t,n,a);break;case 3:case 4:var o=Hn;Hn=ss(t.stateNode.containerInfo),oi(t,n,a),Hn=o;break;case 22:t.memoizedState===null&&(o=t.alternate,o!==null&&o.memoizedState!==null?(o=pa,pa=16777216,oi(t,n,a),pa=o):oi(t,n,a));break;default:oi(t,n,a)}}function ym(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function ga(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];Rt=o,vm(o,t)}ym(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xm(t),t=t.sibling}function xm(t){switch(t.tag){case 0:case 11:case 15:ga(t),t.flags&2048&&Hr(9,t,t.return);break;case 3:ga(t);break;case 12:ga(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Zo(t)):ga(t);break;default:ga(t)}}function Zo(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var o=n[a];Rt=o,vm(o,t)}ym(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Hr(8,n,n.return),Zo(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Zo(n));break;default:Zo(n)}t=t.sibling}}function vm(t,n){for(;Rt!==null;){var a=Rt;switch(a.tag){case 0:case 11:case 15:Hr(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var o=a.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Ji(a.memoizedState.cache)}if(o=a.child,o!==null)o.return=a,Rt=o;else e:for(a=t;Rt!==null;){o=Rt;var d=o.sibling,g=o.return;if(cm(o),o===a){Rt=null;break e}if(d!==null){d.return=g,Rt=d;break e}Rt=g}}}var _w={getCacheForType:function(t){var n=Dt(St),a=n.data.get(t);return a===void 0&&(a=t(),n.data.set(t,a)),a},cacheSignal:function(){return Dt(St).controller.signal}},Lw=typeof WeakMap=="function"?WeakMap:Map,Qe=0,ot=null,Be=null,He=0,We=0,mn=null,qr=!1,si=!1,Qc=!1,xr=0,yt=0,Pr=0,Al=0,Kc=0,bn=0,ui=0,ma=null,ln=null,Jc=!1,Qo=0,wm=0,Ko=1/0,Jo=null,$r=null,Tt=0,Vr=null,ci=null,vr=0,Wc=0,ef=null,Sm=null,ba=0,tf=null;function yn(){return(Qe&2)!==0&&He!==0?He&-He:F.T!==null?sf():io()}function km(){if(bn===0)if((He&536870912)===0||Pe){var t=Ar;Ar<<=1,(Ar&3932160)===0&&(Ar=262144),bn=t}else bn=536870912;return t=pn.current,t!==null&&(t.flags|=32),bn}function an(t,n,a){(t===ot&&(We===2||We===9)||t.cancelPendingCommit!==null)&&(fi(t,0),Gr(t,He,bn,!1)),jr(t,a),((Qe&2)===0||t!==ot)&&(t===ot&&((Qe&2)===0&&(Al|=a),yt===4&&Gr(t,He,bn,!1)),Qn(t))}function Em(t,n,a){if((Qe&6)!==0)throw Error(i(327));var o=!a&&(n&127)===0&&(n&t.expiredLanes)===0||cl(t,n),d=o?Mw(t,n):rf(t,n,!0),g=o;do{if(d===0){si&&!o&&Gr(t,n,0,!1);break}else{if(a=t.current.alternate,g&&!Dw(a)){d=rf(t,n,!1),g=!1;continue}if(d===2){if(g=n,t.errorRecoveryDisabledLanes&g)var k=0;else k=t.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){n=k;e:{var _=t;d=ma;var P=_.current.memoizedState.isDehydrated;if(P&&(fi(_,k).flags|=256),k=rf(_,k,!1),k!==2){if(Qc&&!P){_.errorRecoveryDisabledLanes|=g,Al|=g,d=4;break e}g=ln,ln=d,g!==null&&(ln===null?ln=g:ln.push.apply(ln,g))}d=k}if(g=!1,d!==2)continue}}if(d===1){fi(t,0),Gr(t,n,0,!0);break}e:{switch(o=t,g=d,g){case 0:case 1:throw Error(i(345));case 4:if((n&4194048)!==n)break;case 6:Gr(o,n,bn,!qr);break e;case 2:ln=null;break;case 3:case 5:break;default:throw Error(i(329))}if((n&62914560)===n&&(d=Qo+300-at(),10<d)){if(Gr(o,n,bn,!qr),nr(o,0,!0)!==0)break e;vr=n,o.timeoutHandle=tb(Cm.bind(null,o,a,ln,Jo,Jc,n,bn,Al,ui,qr,g,"Throttled",-0,0),d);break e}Cm(o,a,ln,Jo,Jc,n,bn,Al,ui,qr,g,null,-0,0)}}break}while(!0);Qn(t)}function Cm(t,n,a,o,d,g,k,_,P,ee,ae,ce,te,ie){if(t.timeoutHandle=-1,ce=n.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ir},bm(n,g,ce);var ke=(g&62914560)===g?Qo-at():(g&4194048)===g?wm-at():0;if(ke=bS(ce,ke),ke!==null){vr=g,t.cancelPendingCommit=ke(Dm.bind(null,t,n,g,a,o,d,k,_,P,ae,ce,null,te,ie)),Gr(t,g,k,!ee);return}}Dm(t,n,g,a,o,d,k,_,P)}function Dw(t){for(var n=t;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var o=0;o<a.length;o++){var d=a[o],g=d.getSnapshot;d=d.value;try{if(!dn(g(),d))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Gr(t,n,a,o){n&=~Kc,n&=~Al,t.suspendedLanes|=n,t.pingedLanes&=~n,o&&(t.warmLanes|=n),o=t.expirationTimes;for(var d=n;0<d;){var g=31-Je(d),k=1<<g;o[g]=-1,d&=~k}a!==0&&Wt(t,a,n)}function Wo(){return(Qe&6)===0?(ya(0),!1):!0}function nf(){if(Be!==null){if(We===0)var t=Be.return;else t=Be,ur=yl=null,yc(t),ti=null,ea=0,t=Be;for(;t!==null;)nm(t.alternate,t),t=t.return;Be=null}}function fi(t,n){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,Ww(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),vr=0,nf(),ot=t,Be=a=or(t.current,null),He=n,We=0,mn=null,qr=!1,si=cl(t,n),Qc=!1,ui=bn=Kc=Al=Pr=yt=0,ln=ma=null,Jc=!1,(n&8)!==0&&(n|=n&32);var o=t.entangledLanes;if(o!==0)for(t=t.entanglements,o&=n;0<o;){var d=31-Je(o),g=1<<d;n|=t[d],o&=~g}return xr=n,vo(),a}function Nm(t,n){Le=null,F.H=sa,n===ei||n===To?(n=qp(),We=3):n===ac?(n=qp(),We=4):We=n===Oc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,mn=n,Be===null&&(yt=1,qo(t,jn(n,t.current)))}function Am(){var t=pn.current;return t===null?!0:(He&4194048)===He?Dn===null:(He&62914560)===He||(He&536870912)!==0?t===Dn:!1}function Tm(){var t=F.H;return F.H=sa,t===null?sa:t}function jm(){var t=F.A;return F.A=_w,t}function es(){yt=4,qr||(He&4194048)!==He&&pn.current!==null||(si=!0),(Pr&134217727)===0&&(Al&134217727)===0||ot===null||Gr(ot,He,bn,!1)}function rf(t,n,a){var o=Qe;Qe|=2;var d=Tm(),g=jm();(ot!==t||He!==n)&&(Jo=null,fi(t,n)),n=!1;var k=yt;e:do try{if(We!==0&&Be!==null){var _=Be,P=mn;switch(We){case 8:nf(),k=6;break e;case 3:case 2:case 9:case 6:pn.current===null&&(n=!0);var ee=We;if(We=0,mn=null,di(t,_,P,ee),a&&si){k=0;break e}break;default:ee=We,We=0,mn=null,di(t,_,P,ee)}}Ow(),k=yt;break}catch(ae){Nm(t,ae)}while(!0);return n&&t.shellSuspendCounter++,ur=yl=null,Qe=o,F.H=d,F.A=g,Be===null&&(ot=null,He=0,vo()),k}function Ow(){for(;Be!==null;)Rm(Be)}function Mw(t,n){var a=Qe;Qe|=2;var o=Tm(),d=jm();ot!==t||He!==n?(Jo=null,Ko=at()+500,fi(t,n)):si=cl(t,n);e:do try{if(We!==0&&Be!==null){n=Be;var g=mn;t:switch(We){case 1:We=0,mn=null,di(t,n,g,1);break;case 2:case 9:if(Up(g)){We=0,mn=null,_m(n);break}n=function(){We!==2&&We!==9||ot!==t||(We=7),Qn(t)},g.then(n,n);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:Up(g)?(We=0,mn=null,_m(n)):(We=0,mn=null,di(t,n,g,7));break;case 5:var k=null;switch(Be.tag){case 26:k=Be.memoizedState;case 5:case 27:var _=Be;if(k?mb(k):_.stateNode.complete){We=0,mn=null;var P=_.sibling;if(P!==null)Be=P;else{var ee=_.return;ee!==null?(Be=ee,ts(ee)):Be=null}break t}}We=0,mn=null,di(t,n,g,5);break;case 6:We=0,mn=null,di(t,n,g,6);break;case 8:nf(),yt=6;break e;default:throw Error(i(462))}}zw();break}catch(ae){Nm(t,ae)}while(!0);return ur=yl=null,F.H=o,F.A=d,Qe=a,Be!==null?0:(ot=null,He=0,vo(),yt)}function zw(){for(;Be!==null&&!it();)Rm(Be)}function Rm(t){var n=em(t.alternate,t,xr);t.memoizedProps=t.pendingProps,n===null?ts(t):Be=n}function _m(t){var n=t,a=n.alternate;switch(n.tag){case 15:case 0:n=Xg(a,n,n.pendingProps,n.type,void 0,He);break;case 11:n=Xg(a,n,n.pendingProps,n.type.render,n.ref,He);break;case 5:yc(n);default:nm(a,n),n=Be=jp(n,xr),n=em(a,n,xr)}t.memoizedProps=t.pendingProps,n===null?ts(t):Be=n}function di(t,n,a,o){ur=yl=null,yc(n),ti=null,ea=0;var d=n.return;try{if(Ew(t,d,n,a,He)){yt=1,qo(t,jn(a,t.current)),Be=null;return}}catch(g){if(d!==null)throw Be=d,g;yt=1,qo(t,jn(a,t.current)),Be=null;return}n.flags&32768?(Pe||o===1?t=!0:si||(He&536870912)!==0?t=!1:(qr=t=!0,(o===2||o===9||o===3||o===6)&&(o=pn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Lm(n,t)):ts(n)}function ts(t){var n=t;do{if((n.flags&32768)!==0){Lm(n,qr);return}t=n.return;var a=Aw(n.alternate,n,xr);if(a!==null){Be=a;return}if(n=n.sibling,n!==null){Be=n;return}Be=n=t}while(n!==null);yt===0&&(yt=5)}function Lm(t,n){do{var a=Tw(t.alternate,t);if(a!==null){a.flags&=32767,Be=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(t=t.sibling,t!==null)){Be=t;return}Be=t=a}while(t!==null);yt=6,Be=null}function Dm(t,n,a,o,d,g,k,_,P){t.cancelPendingCommit=null;do ns();while(Tt!==0);if((Qe&6)!==0)throw Error(i(327));if(n!==null){if(n===t.current)throw Error(i(177));if(g=n.lanes|n.childLanes,g|=Vu,ro(t,a,g,k,_,P),t===ot&&(Be=ot=null,He=0),ci=n,Vr=t,vr=a,Wc=g,ef=d,Sm=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Uw(Re,function(){return Fm(),null})):(t.callbackNode=null,t.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=F.T,F.T=null,d=X.p,X.p=2,k=Qe,Qe|=4;try{jw(t,n,a)}finally{Qe=k,X.p=d,F.T=o}}Tt=1,Om(),Mm(),zm()}}function Om(){if(Tt===1){Tt=0;var t=Vr,n=ci,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=F.T,F.T=null;var o=X.p;X.p=2;var d=Qe;Qe|=4;try{pm(n,t);var g=mf,k=vp(t.containerInfo),_=g.focusedElem,P=g.selectionRange;if(k!==_&&_&&_.ownerDocument&&xp(_.ownerDocument.documentElement,_)){if(P!==null&&Uu(_)){var ee=P.start,ae=P.end;if(ae===void 0&&(ae=ee),"selectionStart"in _)_.selectionStart=ee,_.selectionEnd=Math.min(ae,_.value.length);else{var ce=_.ownerDocument||document,te=ce&&ce.defaultView||window;if(te.getSelection){var ie=te.getSelection(),ke=_.textContent.length,je=Math.min(P.start,ke),rt=P.end===void 0?je:Math.min(P.end,ke);!ie.extend&&je>rt&&(k=rt,rt=je,je=k);var K=yp(_,je),Q=yp(_,rt);if(K&&Q&&(ie.rangeCount!==1||ie.anchorNode!==K.node||ie.anchorOffset!==K.offset||ie.focusNode!==Q.node||ie.focusOffset!==Q.offset)){var W=ce.createRange();W.setStart(K.node,K.offset),ie.removeAllRanges(),je>rt?(ie.addRange(W),ie.extend(Q.node,Q.offset)):(W.setEnd(Q.node,Q.offset),ie.addRange(W))}}}}for(ce=[],ie=_;ie=ie.parentNode;)ie.nodeType===1&&ce.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<ce.length;_++){var se=ce[_];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}ps=!!gf,mf=gf=null}finally{Qe=d,X.p=o,F.T=a}}t.current=n,Tt=2}}function Mm(){if(Tt===2){Tt=0;var t=Vr,n=ci,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=F.T,F.T=null;var o=X.p;X.p=2;var d=Qe;Qe|=4;try{um(t,n.alternate,n)}finally{Qe=d,X.p=o,F.T=a}}Tt=3}}function zm(){if(Tt===4||Tt===3){Tt=0,Ft();var t=Vr,n=ci,a=vr,o=Sm;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Tt=5:(Tt=0,ci=Vr=null,Bm(t,t.pendingLanes));var d=t.pendingLanes;if(d===0&&($r=null),Bi(a),n=n.stateNode,xt&&typeof xt.onCommitFiberRoot=="function")try{xt.onCommitFiberRoot(jt,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=F.T,d=X.p,X.p=2,F.T=null;try{for(var g=t.onRecoverableError,k=0;k<o.length;k++){var _=o[k];g(_.value,{componentStack:_.stack})}}finally{F.T=n,X.p=d}}(vr&3)!==0&&ns(),Qn(t),d=t.pendingLanes,(a&261930)!==0&&(d&42)!==0?t===tf?ba++:(ba=0,tf=t):ba=0,ya(0)}}function Bm(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Ji(n)))}function ns(){return Om(),Mm(),zm(),Fm()}function Fm(){if(Tt!==5)return!1;var t=Vr,n=Wc;Wc=0;var a=Bi(vr),o=F.T,d=X.p;try{X.p=32>a?32:a,F.T=null,a=ef,ef=null;var g=Vr,k=vr;if(Tt=0,ci=Vr=null,vr=0,(Qe&6)!==0)throw Error(i(331));var _=Qe;if(Qe|=4,xm(g.current),mm(g,g.current,k,a),Qe=_,ya(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(jt,g)}catch{}return!0}finally{X.p=d,F.T=o,Bm(t,n)}}function Im(t,n,a){n=jn(a,n),n=Dc(t.stateNode,n,2),t=Fr(t,n,2),t!==null&&(jr(t,2),Qn(t))}function et(t,n,a){if(t.tag===3)Im(t,t,a);else for(;n!==null;){if(n.tag===3){Im(n,t,a);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&($r===null||!$r.has(o))){t=jn(a,t),a=Ug(2),o=Fr(n,a,2),o!==null&&(Hg(a,o,n,t),jr(o,2),Qn(o));break}}n=n.return}}function lf(t,n,a){var o=t.pingCache;if(o===null){o=t.pingCache=new Lw;var d=new Set;o.set(n,d)}else d=o.get(n),d===void 0&&(d=new Set,o.set(n,d));d.has(a)||(Qc=!0,d.add(a),t=Bw.bind(null,t,n,a),n.then(t,t))}function Bw(t,n,a){var o=t.pingCache;o!==null&&o.delete(n),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,ot===t&&(He&a)===a&&(yt===4||yt===3&&(He&62914560)===He&&300>at()-Qo?(Qe&2)===0&&fi(t,0):Kc|=a,ui===He&&(ui=0)),Qn(t)}function Um(t,n){n===0&&(n=Bl()),t=gl(t,n),t!==null&&(jr(t,n),Qn(t))}function Fw(t){var n=t.memoizedState,a=0;n!==null&&(a=n.retryLane),Um(t,a)}function Iw(t,n){var a=0;switch(t.tag){case 31:case 13:var o=t.stateNode,d=t.memoizedState;d!==null&&(a=d.retryLane);break;case 19:o=t.stateNode;break;case 22:o=t.stateNode._retryCache;break;default:throw Error(i(314))}o!==null&&o.delete(n),Um(t,a)}function Uw(t,n){return mt(t,n)}var rs=null,hi=null,af=!1,ls=!1,of=!1,Yr=0;function Qn(t){t!==hi&&t.next===null&&(hi===null?rs=hi=t:hi=hi.next=t),ls=!0,af||(af=!0,qw())}function ya(t,n){if(!of&&ls){of=!0;do for(var a=!1,o=rs;o!==null;){if(t!==0){var d=o.pendingLanes;if(d===0)var g=0;else{var k=o.suspendedLanes,_=o.pingedLanes;g=(1<<31-Je(42|t)+1)-1,g&=d&~(k&~_),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(a=!0,$m(o,g))}else g=He,g=nr(o,o===ot?g:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(g&3)===0||cl(o,g)||(a=!0,$m(o,g));o=o.next}while(a);of=!1}}function Hw(){Hm()}function Hm(){ls=af=!1;var t=0;Yr!==0&&Jw()&&(t=Yr);for(var n=at(),a=null,o=rs;o!==null;){var d=o.next,g=qm(o,n);g===0?(o.next=null,a===null?rs=d:a.next=d,d===null&&(hi=a)):(a=o,(t!==0||(g&3)!==0)&&(ls=!0)),o=d}Tt!==0&&Tt!==5||ya(t),Yr!==0&&(Yr=0)}function qm(t,n){for(var a=t.suspendedLanes,o=t.pingedLanes,d=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var k=31-Je(g),_=1<<k,P=d[k];P===-1?((_&a)===0||(_&o)!==0)&&(d[k]=no(_,n)):P<=n&&(t.expiredLanes|=_),g&=~_}if(n=ot,a=He,a=nr(t,t===n?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o=t.callbackNode,a===0||t===n&&(We===2||We===9)||t.cancelPendingCommit!==null)return o!==null&&o!==null&&Bt(o),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||cl(t,a)){if(n=a&-a,n===t.callbackPriority)return n;switch(o!==null&&Bt(o),Bi(a)){case 2:case 8:a=be;break;case 32:a=Re;break;case 268435456:a=Ge;break;default:a=Re}return o=Pm.bind(null,t),a=mt(a,o),t.callbackPriority=n,t.callbackNode=a,n}return o!==null&&o!==null&&Bt(o),t.callbackPriority=2,t.callbackNode=null,2}function Pm(t,n){if(Tt!==0&&Tt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(ns()&&t.callbackNode!==a)return null;var o=He;return o=nr(t,t===ot?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o===0?null:(Em(t,o,n),qm(t,at()),t.callbackNode!=null&&t.callbackNode===a?Pm.bind(null,t):null)}function $m(t,n){if(ns())return null;Em(t,n,!0)}function qw(){eS(function(){(Qe&6)!==0?mt(oe,Hw):Hm()})}function sf(){if(Yr===0){var t=Jl;t===0&&(t=zl,zl<<=1,(zl&261888)===0&&(zl=256)),Yr=t}return Yr}function Vm(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:fo(""+t)}function Gm(t,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,t.id&&a.setAttribute("form",t.id),n.parentNode.insertBefore(a,n),t=new FormData(t),a.parentNode.removeChild(a),t}function Pw(t,n,a,o,d){if(n==="submit"&&a&&a.stateNode===d){var g=Vm((d[_t]||null).action),k=o.submitter;k&&(n=(n=k[_t]||null)?Vm(n.formAction):k.getAttribute("formAction"),n!==null&&(g=n,k=null));var _=new mo("action","action",null,o,d);t.push({event:_,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Yr!==0){var P=k?Gm(d,k):new FormData(d);Ac(a,{pending:!0,data:P,method:d.method,action:g},null,P)}}else typeof g=="function"&&(_.preventDefault(),P=k?Gm(d,k):new FormData(d),Ac(a,{pending:!0,data:P,method:d.method,action:g},g,P))},currentTarget:d}]})}}for(var uf=0;uf<$u.length;uf++){var cf=$u[uf],$w=cf.toLowerCase(),Vw=cf[0].toUpperCase()+cf.slice(1);Un($w,"on"+Vw)}Un(kp,"onAnimationEnd"),Un(Ep,"onAnimationIteration"),Un(Cp,"onAnimationStart"),Un("dblclick","onDoubleClick"),Un("focusin","onFocus"),Un("focusout","onBlur"),Un(ow,"onTransitionRun"),Un(sw,"onTransitionStart"),Un(uw,"onTransitionCancel"),Un(Np,"onTransitionEnd"),Fl("onMouseEnter",["mouseout","mouseover"]),Fl("onMouseLeave",["mouseout","mouseover"]),Fl("onPointerEnter",["pointerout","pointerover"]),Fl("onPointerLeave",["pointerout","pointerover"]),Cn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Cn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Cn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Cn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Cn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Cn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xa="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(" "),Gw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xa));function Ym(t,n){n=(n&4)!==0;for(var a=0;a<t.length;a++){var o=t[a],d=o.event;o=o.listeners;e:{var g=void 0;if(n)for(var k=o.length-1;0<=k;k--){var _=o[k],P=_.instance,ee=_.currentTarget;if(_=_.listener,P!==g&&d.isPropagationStopped())break e;g=_,d.currentTarget=ee;try{g(d)}catch(ae){xo(ae)}d.currentTarget=null,g=P}else for(k=0;k<o.length;k++){if(_=o[k],P=_.instance,ee=_.currentTarget,_=_.listener,P!==g&&d.isPropagationStopped())break e;g=_,d.currentTarget=ee;try{g(d)}catch(ae){xo(ae)}d.currentTarget=null,g=P}}}}function Fe(t,n){var a=n[Fi];a===void 0&&(a=n[Fi]=new Set);var o=t+"__bubble";a.has(o)||(Xm(n,t,2,!1),a.add(o))}function ff(t,n,a){var o=0;n&&(o|=4),Xm(a,t,o,n)}var is="_reactListening"+Math.random().toString(36).slice(2);function df(t){if(!t[is]){t[is]=!0,Ue.forEach(function(a){a!=="selectionchange"&&(Gw.has(a)||ff(a,!1,t),ff(a,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[is]||(n[is]=!0,ff("selectionchange",!1,n))}}function Xm(t,n,a,o){switch(kb(n)){case 2:var d=vS;break;case 8:d=wS;break;default:d=Af}a=d.bind(null,n,a,t),d=void 0,!_u||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),o?d!==void 0?t.addEventListener(n,a,{capture:!0,passive:d}):t.addEventListener(n,a,!0):d!==void 0?t.addEventListener(n,a,{passive:d}):t.addEventListener(n,a,!1)}function hf(t,n,a,o,d){var g=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var k=o.tag;if(k===3||k===4){var _=o.stateNode.containerInfo;if(_===d)break;if(k===4)for(k=o.return;k!==null;){var P=k.tag;if((P===3||P===4)&&k.stateNode.containerInfo===d)return;k=k.return}for(;_!==null;){if(k=Rr(_),k===null)return;if(P=k.tag,P===5||P===6||P===26||P===27){o=g=k;continue e}_=_.parentNode}}o=o.return}Wh(function(){var ee=g,ae=ju(a),ce=[];e:{var te=Ap.get(t);if(te!==void 0){var ie=mo,ke=t;switch(t){case"keypress":if(po(a)===0)break e;case"keydown":case"keyup":ie=Iv;break;case"focusin":ke="focus",ie=Mu;break;case"focusout":ke="blur",ie=Mu;break;case"beforeblur":case"afterblur":ie=Mu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ie=np;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=Av;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=qv;break;case kp:case Ep:case Cp:ie=Rv;break;case Np:ie=$v;break;case"scroll":case"scrollend":ie=Cv;break;case"wheel":ie=Gv;break;case"copy":case"cut":case"paste":ie=Lv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=lp;break;case"toggle":case"beforetoggle":ie=Xv}var je=(n&4)!==0,rt=!je&&(t==="scroll"||t==="scrollend"),K=je?te!==null?te+"Capture":null:te;je=[];for(var Q=ee,W;Q!==null;){var se=Q;if(W=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||W===null||K===null||(se=Hi(Q,K),se!=null&&je.push(va(Q,se,W))),rt)break;Q=Q.return}0<je.length&&(te=new ie(te,ke,null,a,ae),ce.push({event:te,listeners:je}))}}if((n&7)===0){e:{if(te=t==="mouseover"||t==="pointerover",ie=t==="mouseout"||t==="pointerout",te&&a!==Tu&&(ke=a.relatedTarget||a.fromElement)&&(Rr(ke)||ke[rr]))break e;if((ie||te)&&(te=ae.window===ae?ae:(te=ae.ownerDocument)?te.defaultView||te.parentWindow:window,ie?(ke=a.relatedTarget||a.toElement,ie=ee,ke=ke?Rr(ke):null,ke!==null&&(rt=u(ke),je=ke.tag,ke!==rt||je!==5&&je!==27&&je!==6)&&(ke=null)):(ie=null,ke=ee),ie!==ke)){if(je=np,se="onMouseLeave",K="onMouseEnter",Q="mouse",(t==="pointerout"||t==="pointerover")&&(je=lp,se="onPointerLeave",K="onPointerEnter",Q="pointer"),rt=ie==null?te:ve(ie),W=ke==null?te:ve(ke),te=new je(se,Q+"leave",ie,a,ae),te.target=rt,te.relatedTarget=W,se=null,Rr(ae)===ee&&(je=new je(K,Q+"enter",ke,a,ae),je.target=W,je.relatedTarget=rt,se=je),rt=se,ie&&ke)t:{for(je=Yw,K=ie,Q=ke,W=0,se=K;se;se=je(se))W++;se=0;for(var Ae=Q;Ae;Ae=je(Ae))se++;for(;0<W-se;)K=je(K),W--;for(;0<se-W;)Q=je(Q),se--;for(;W--;){if(K===Q||Q!==null&&K===Q.alternate){je=K;break t}K=je(K),Q=je(Q)}je=null}else je=null;ie!==null&&Zm(ce,te,ie,je,!1),ke!==null&&rt!==null&&Zm(ce,rt,ke,je,!0)}}e:{if(te=ee?ve(ee):window,ie=te.nodeName&&te.nodeName.toLowerCase(),ie==="select"||ie==="input"&&te.type==="file")var Xe=dp;else if(cp(te))if(hp)Xe=lw;else{Xe=nw;var Ce=tw}else ie=te.nodeName,!ie||ie.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?ee&&Au(ee.elementType)&&(Xe=dp):Xe=rw;if(Xe&&(Xe=Xe(t,ee))){fp(ce,Xe,a,ae);break e}Ce&&Ce(t,te,ee),t==="focusout"&&ee&&te.type==="number"&&ee.memoizedProps.value!=null&&Nu(te,"number",te.value)}switch(Ce=ee?ve(ee):window,t){case"focusin":(cp(Ce)||Ce.contentEditable==="true")&&($l=Ce,Hu=ee,Zi=null);break;case"focusout":Zi=Hu=$l=null;break;case"mousedown":qu=!0;break;case"contextmenu":case"mouseup":case"dragend":qu=!1,wp(ce,a,ae);break;case"selectionchange":if(aw)break;case"keydown":case"keyup":wp(ce,a,ae)}var Oe;if(Bu)e:{switch(t){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else Pl?sp(t,a)&&(qe="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(qe="onCompositionStart");qe&&(ip&&a.locale!=="ko"&&(Pl||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&Pl&&(Oe=ep()):(_r=ae,Lu="value"in _r?_r.value:_r.textContent,Pl=!0)),Ce=as(ee,qe),0<Ce.length&&(qe=new rp(qe,t,null,a,ae),ce.push({event:qe,listeners:Ce}),Oe?qe.data=Oe:(Oe=up(a),Oe!==null&&(qe.data=Oe)))),(Oe=Qv?Kv(t,a):Jv(t,a))&&(qe=as(ee,"onBeforeInput"),0<qe.length&&(Ce=new rp("onBeforeInput","beforeinput",null,a,ae),ce.push({event:Ce,listeners:qe}),Ce.data=Oe)),Pw(ce,t,ee,a,ae)}Ym(ce,n)})}function va(t,n,a){return{instance:t,listener:n,currentTarget:a}}function as(t,n){for(var a=n+"Capture",o=[];t!==null;){var d=t,g=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||g===null||(d=Hi(t,a),d!=null&&o.unshift(va(t,d,g)),d=Hi(t,n),d!=null&&o.push(va(t,d,g))),t.tag===3)return o;t=t.return}return[]}function Yw(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Zm(t,n,a,o,d){for(var g=n._reactName,k=[];a!==null&&a!==o;){var _=a,P=_.alternate,ee=_.stateNode;if(_=_.tag,P!==null&&P===o)break;_!==5&&_!==26&&_!==27||ee===null||(P=ee,d?(ee=Hi(a,g),ee!=null&&k.unshift(va(a,ee,P))):d||(ee=Hi(a,g),ee!=null&&k.push(va(a,ee,P)))),a=a.return}k.length!==0&&t.push({event:n,listeners:k})}var Xw=/\r\n?/g,Zw=/\u0000|\uFFFD/g;function Qm(t){return(typeof t=="string"?t:""+t).replace(Xw,`
|
|
9
|
+
`).replace(Zw,"")}function Km(t,n){return n=Qm(n),Qm(t)===n}function nt(t,n,a,o,d,g){switch(a){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||Ul(t,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&Ul(t,""+o);break;case"className":uo(t,"class",o);break;case"tabIndex":uo(t,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":uo(t,a,o);break;case"style":Kh(t,o,g);break;case"data":if(n!=="object"){uo(t,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||a!=="href")){t.removeAttribute(a);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(a);break}o=fo(""+o),t.setAttribute(a,o);break;case"action":case"formAction":if(typeof o=="function"){t.setAttribute(a,"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 g=="function"&&(a==="formAction"?(n!=="input"&&nt(t,n,"name",d.name,d,null),nt(t,n,"formEncType",d.formEncType,d,null),nt(t,n,"formMethod",d.formMethod,d,null),nt(t,n,"formTarget",d.formTarget,d,null)):(nt(t,n,"encType",d.encType,d,null),nt(t,n,"method",d.method,d,null),nt(t,n,"target",d.target,d,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(a);break}o=fo(""+o),t.setAttribute(a,o);break;case"onClick":o!=null&&(t.onclick=ir);break;case"onScroll":o!=null&&Fe("scroll",t);break;case"onScrollEnd":o!=null&&Fe("scrollend",t);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(d.children!=null)throw Error(i(60));t.innerHTML=a}}break;case"multiple":t.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":t.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){t.removeAttribute("xlink:href");break}a=fo(""+o),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(a,""+o):t.removeAttribute(a);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":o&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":o===!0?t.setAttribute(a,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(a,o):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?t.setAttribute(a,o):t.removeAttribute(a);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?t.removeAttribute(a):t.setAttribute(a,o);break;case"popover":Fe("beforetoggle",t),Fe("toggle",t),so(t,"popover",o);break;case"xlinkActuate":lr(t,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":lr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":lr(t,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":lr(t,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":lr(t,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":lr(t,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":lr(t,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":lr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":lr(t,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":so(t,"is",o);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=kv.get(a)||a,so(t,a,o))}}function pf(t,n,a,o,d,g){switch(a){case"style":Kh(t,o,g);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(i(61));if(a=o.__html,a!=null){if(d.children!=null)throw Error(i(60));t.innerHTML=a}}break;case"children":typeof o=="string"?Ul(t,o):(typeof o=="number"||typeof o=="bigint")&&Ul(t,""+o);break;case"onScroll":o!=null&&Fe("scroll",t);break;case"onScrollEnd":o!=null&&Fe("scrollend",t);break;case"onClick":o!=null&&(t.onclick=ir);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xt.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),n=a.slice(2,d?a.length-7:void 0),g=t[_t]||null,g=g!=null?g[a]:null,typeof g=="function"&&t.removeEventListener(n,g,d),typeof o=="function")){typeof g!="function"&&g!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(n,o,d);break e}a in t?t[a]=o:o===!0?t.setAttribute(a,""):so(t,a,o)}}}function Mt(t,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Fe("error",t),Fe("load",t);var o=!1,d=!1,g;for(g in a)if(a.hasOwnProperty(g)){var k=a[g];if(k!=null)switch(g){case"src":o=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:nt(t,n,g,k,a,null)}}d&&nt(t,n,"srcSet",a.srcSet,a,null),o&&nt(t,n,"src",a.src,a,null);return;case"input":Fe("invalid",t);var _=g=k=d=null,P=null,ee=null;for(o in a)if(a.hasOwnProperty(o)){var ae=a[o];if(ae!=null)switch(o){case"name":d=ae;break;case"type":k=ae;break;case"checked":P=ae;break;case"defaultChecked":ee=ae;break;case"value":g=ae;break;case"defaultValue":_=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(i(137,n));break;default:nt(t,n,o,ae,a,null)}}Yh(t,g,_,P,ee,k,d,!1);return;case"select":Fe("invalid",t),o=k=g=null;for(d in a)if(a.hasOwnProperty(d)&&(_=a[d],_!=null))switch(d){case"value":g=_;break;case"defaultValue":k=_;break;case"multiple":o=_;default:nt(t,n,d,_,a,null)}n=g,a=k,t.multiple=!!o,n!=null?Il(t,!!o,n,!1):a!=null&&Il(t,!!o,a,!0);return;case"textarea":Fe("invalid",t),g=d=o=null;for(k in a)if(a.hasOwnProperty(k)&&(_=a[k],_!=null))switch(k){case"value":o=_;break;case"defaultValue":d=_;break;case"children":g=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(i(91));break;default:nt(t,n,k,_,a,null)}Zh(t,o,d,g);return;case"option":for(P in a)a.hasOwnProperty(P)&&(o=a[P],o!=null)&&(P==="selected"?t.selected=o&&typeof o!="function"&&typeof o!="symbol":nt(t,n,P,o,a,null));return;case"dialog":Fe("beforetoggle",t),Fe("toggle",t),Fe("cancel",t),Fe("close",t);break;case"iframe":case"object":Fe("load",t);break;case"video":case"audio":for(o=0;o<xa.length;o++)Fe(xa[o],t);break;case"image":Fe("error",t),Fe("load",t);break;case"details":Fe("toggle",t);break;case"embed":case"source":case"link":Fe("error",t),Fe("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ee in a)if(a.hasOwnProperty(ee)&&(o=a[ee],o!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:nt(t,n,ee,o,a,null)}return;default:if(Au(n)){for(ae in a)a.hasOwnProperty(ae)&&(o=a[ae],o!==void 0&&pf(t,n,ae,o,a,void 0));return}}for(_ in a)a.hasOwnProperty(_)&&(o=a[_],o!=null&&nt(t,n,_,o,a,null))}function Qw(t,n,a,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,g=null,k=null,_=null,P=null,ee=null,ae=null;for(ie in a){var ce=a[ie];if(a.hasOwnProperty(ie)&&ce!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":P=ce;default:o.hasOwnProperty(ie)||nt(t,n,ie,null,o,ce)}}for(var te in o){var ie=o[te];if(ce=a[te],o.hasOwnProperty(te)&&(ie!=null||ce!=null))switch(te){case"type":g=ie;break;case"name":d=ie;break;case"checked":ee=ie;break;case"defaultChecked":ae=ie;break;case"value":k=ie;break;case"defaultValue":_=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(i(137,n));break;default:ie!==ce&&nt(t,n,te,ie,o,ce)}}Cu(t,k,_,P,ee,ae,g,d);return;case"select":ie=k=_=te=null;for(g in a)if(P=a[g],a.hasOwnProperty(g)&&P!=null)switch(g){case"value":break;case"multiple":ie=P;default:o.hasOwnProperty(g)||nt(t,n,g,null,o,P)}for(d in o)if(g=o[d],P=a[d],o.hasOwnProperty(d)&&(g!=null||P!=null))switch(d){case"value":te=g;break;case"defaultValue":_=g;break;case"multiple":k=g;default:g!==P&&nt(t,n,d,g,o,P)}n=_,a=k,o=ie,te!=null?Il(t,!!a,te,!1):!!o!=!!a&&(n!=null?Il(t,!!a,n,!0):Il(t,!!a,a?[]:"",!1));return;case"textarea":ie=te=null;for(_ in a)if(d=a[_],a.hasOwnProperty(_)&&d!=null&&!o.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:nt(t,n,_,null,o,d)}for(k in o)if(d=o[k],g=a[k],o.hasOwnProperty(k)&&(d!=null||g!=null))switch(k){case"value":te=d;break;case"defaultValue":ie=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(i(91));break;default:d!==g&&nt(t,n,k,d,o,g)}Xh(t,te,ie);return;case"option":for(var ke in a)te=a[ke],a.hasOwnProperty(ke)&&te!=null&&!o.hasOwnProperty(ke)&&(ke==="selected"?t.selected=!1:nt(t,n,ke,null,o,te));for(P in o)te=o[P],ie=a[P],o.hasOwnProperty(P)&&te!==ie&&(te!=null||ie!=null)&&(P==="selected"?t.selected=te&&typeof te!="function"&&typeof te!="symbol":nt(t,n,P,te,o,ie));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 je in a)te=a[je],a.hasOwnProperty(je)&&te!=null&&!o.hasOwnProperty(je)&&nt(t,n,je,null,o,te);for(ee in o)if(te=o[ee],ie=a[ee],o.hasOwnProperty(ee)&&te!==ie&&(te!=null||ie!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(i(137,n));break;default:nt(t,n,ee,te,o,ie)}return;default:if(Au(n)){for(var rt in a)te=a[rt],a.hasOwnProperty(rt)&&te!==void 0&&!o.hasOwnProperty(rt)&&pf(t,n,rt,void 0,o,te);for(ae in o)te=o[ae],ie=a[ae],!o.hasOwnProperty(ae)||te===ie||te===void 0&&ie===void 0||pf(t,n,ae,te,o,ie);return}}for(var K in a)te=a[K],a.hasOwnProperty(K)&&te!=null&&!o.hasOwnProperty(K)&&nt(t,n,K,null,o,te);for(ce in o)te=o[ce],ie=a[ce],!o.hasOwnProperty(ce)||te===ie||te==null&&ie==null||nt(t,n,ce,te,o,ie)}function Jm(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Kw(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,a=performance.getEntriesByType("resource"),o=0;o<a.length;o++){var d=a[o],g=d.transferSize,k=d.initiatorType,_=d.duration;if(g&&_&&Jm(k)){for(k=0,_=d.responseEnd,o+=1;o<a.length;o++){var P=a[o],ee=P.startTime;if(ee>_)break;var ae=P.transferSize,ce=P.initiatorType;ae&&Jm(ce)&&(P=P.responseEnd,k+=ae*(P<_?1:(_-ee)/(P-ee)))}if(--o,n+=8*(g+k)/(d.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var gf=null,mf=null;function os(t){return t.nodeType===9?t:t.ownerDocument}function Wm(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function eb(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function bf(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var yf=null;function Jw(){var t=window.event;return t&&t.type==="popstate"?t===yf?!1:(yf=t,!0):(yf=null,!1)}var tb=typeof setTimeout=="function"?setTimeout:void 0,Ww=typeof clearTimeout=="function"?clearTimeout:void 0,nb=typeof Promise=="function"?Promise:void 0,eS=typeof queueMicrotask=="function"?queueMicrotask:typeof nb<"u"?function(t){return nb.resolve(null).then(t).catch(tS)}:tb;function tS(t){setTimeout(function(){throw t})}function Xr(t){return t==="head"}function rb(t,n){var a=n,o=0;do{var d=a.nextSibling;if(t.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"||a==="/&"){if(o===0){t.removeChild(d),bi(n);return}o--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")o++;else if(a==="html")wa(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,wa(a);for(var g=a.firstChild;g;){var k=g.nextSibling,_=g.nodeName;g[fl]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&g.rel.toLowerCase()==="stylesheet"||a.removeChild(g),g=k}}else a==="body"&&wa(t.ownerDocument.body);a=d}while(a);bi(n)}function lb(t,n){var a=t;t=0;do{var o=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),o&&o.nodeType===8)if(a=o.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=o}while(a)}function xf(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":xf(a),Ui(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function nS(t,n,a,o){for(;t.nodeType===1;){var d=a;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(o){if(!t[fl])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var g=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=On(t.nextSibling),t===null)break}return null}function rS(t,n,a){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=On(t.nextSibling),t===null))return null;return t}function ib(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=On(t.nextSibling),t===null))return null;return t}function vf(t){return t.data==="$?"||t.data==="$~"}function wf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function lS(t,n){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||a.readyState!=="loading")n();else{var o=function(){n(),a.removeEventListener("DOMContentLoaded",o)};a.addEventListener("DOMContentLoaded",o),t._reactRetry=o}}function On(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var Sf=null;function ab(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(n===0)return On(t.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}t=t.nextSibling}return null}function ob(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return t;n--}else a!=="/$"&&a!=="/&"||n++}t=t.previousSibling}return null}function sb(t,n,a){switch(n=os(a),t){case"html":if(t=n.documentElement,!t)throw Error(i(452));return t;case"head":if(t=n.head,!t)throw Error(i(453));return t;case"body":if(t=n.body,!t)throw Error(i(454));return t;default:throw Error(i(451))}}function wa(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Ui(t)}var Mn=new Map,ub=new Set;function ss(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var wr=X.d;X.d={f:iS,r:aS,D:oS,C:sS,L:uS,m:cS,X:dS,S:fS,M:hS};function iS(){var t=wr.f(),n=Wo();return t||n}function aS(t){var n=le(t);n!==null&&n.tag===5&&n.type==="form"?Ng(n):wr.r(t)}var pi=typeof document>"u"?null:document;function cb(t,n,a){var o=pi;if(o&&typeof n=="string"&&n){var d=An(n);d='link[rel="'+t+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),ub.has(d)||(ub.add(d),t={rel:t,crossOrigin:a,href:n},o.querySelector(d)===null&&(n=o.createElement("link"),Mt(n,"link",t),we(n),o.head.appendChild(n)))}}function oS(t){wr.D(t),cb("dns-prefetch",t,null)}function sS(t,n){wr.C(t,n),cb("preconnect",t,n)}function uS(t,n,a){wr.L(t,n,a);var o=pi;if(o&&t&&n){var d='link[rel="preload"][as="'+An(n)+'"]';n==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+An(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+An(a.imageSizes)+'"]')):d+='[href="'+An(t)+'"]';var g=d;switch(n){case"style":g=gi(t);break;case"script":g=mi(t)}Mn.has(g)||(t=b({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:t,as:n},a),Mn.set(g,t),o.querySelector(d)!==null||n==="style"&&o.querySelector(Sa(g))||n==="script"&&o.querySelector(ka(g))||(n=o.createElement("link"),Mt(n,"link",t),we(n),o.head.appendChild(n)))}}function cS(t,n){wr.m(t,n);var a=pi;if(a&&t){var o=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+An(o)+'"][href="'+An(t)+'"]',g=d;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=mi(t)}if(!Mn.has(g)&&(t=b({rel:"modulepreload",href:t},n),Mn.set(g,t),a.querySelector(d)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ka(g)))return}o=a.createElement("link"),Mt(o,"link",t),we(o),a.head.appendChild(o)}}}function fS(t,n,a){wr.S(t,n,a);var o=pi;if(o&&t){var d=Ne(o).hoistableStyles,g=gi(t);n=n||"default";var k=d.get(g);if(!k){var _={loading:0,preload:null};if(k=o.querySelector(Sa(g)))_.loading=5;else{t=b({rel:"stylesheet",href:t,"data-precedence":n},a),(a=Mn.get(g))&&kf(t,a);var P=k=o.createElement("link");we(P),Mt(P,"link",t),P._p=new Promise(function(ee,ae){P.onload=ee,P.onerror=ae}),P.addEventListener("load",function(){_.loading|=1}),P.addEventListener("error",function(){_.loading|=2}),_.loading|=4,us(k,n,o)}k={type:"stylesheet",instance:k,count:1,state:_},d.set(g,k)}}}function dS(t,n){wr.X(t,n);var a=pi;if(a&&t){var o=Ne(a).hoistableScripts,d=mi(t),g=o.get(d);g||(g=a.querySelector(ka(d)),g||(t=b({src:t,async:!0},n),(n=Mn.get(d))&&Ef(t,n),g=a.createElement("script"),we(g),Mt(g,"link",t),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},o.set(d,g))}}function hS(t,n){wr.M(t,n);var a=pi;if(a&&t){var o=Ne(a).hoistableScripts,d=mi(t),g=o.get(d);g||(g=a.querySelector(ka(d)),g||(t=b({src:t,async:!0,type:"module"},n),(n=Mn.get(d))&&Ef(t,n),g=a.createElement("script"),we(g),Mt(g,"link",t),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},o.set(d,g))}}function fb(t,n,a,o){var d=(d=fe.current)?ss(d):null;if(!d)throw Error(i(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=gi(a.href),a=Ne(d).hoistableStyles,o=a.get(n),o||(o={type:"style",instance:null,count:0,state:null},a.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=gi(a.href);var g=Ne(d).hoistableStyles,k=g.get(t);if(k||(d=d.ownerDocument||d,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,k),(g=d.querySelector(Sa(t)))&&!g._p&&(k.instance=g,k.state.loading=5),Mn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Mn.set(t,a),g||pS(d,t,a,k.state))),n&&o===null)throw Error(i(528,""));return k}if(n&&o!==null)throw Error(i(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=mi(a),a=Ne(d).hoistableScripts,o=a.get(n),o||(o={type:"script",instance:null,count:0,state:null},a.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,t))}}function gi(t){return'href="'+An(t)+'"'}function Sa(t){return'link[rel="stylesheet"]['+t+"]"}function db(t){return b({},t,{"data-precedence":t.precedence,precedence:null})}function pS(t,n,a,o){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=t.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),Mt(n,"link",a),we(n),t.head.appendChild(n))}function mi(t){return'[src="'+An(t)+'"]'}function ka(t){return"script[async]"+t}function hb(t,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var o=t.querySelector('style[data-href~="'+An(a.href)+'"]');if(o)return n.instance=o,we(o),o;var d=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),we(o),Mt(o,"style",d),us(o,a.precedence,t),n.instance=o;case"stylesheet":d=gi(a.href);var g=t.querySelector(Sa(d));if(g)return n.state.loading|=4,n.instance=g,we(g),g;o=db(a),(d=Mn.get(d))&&kf(o,d),g=(t.ownerDocument||t).createElement("link"),we(g);var k=g;return k._p=new Promise(function(_,P){k.onload=_,k.onerror=P}),Mt(g,"link",o),n.state.loading|=4,us(g,a.precedence,t),n.instance=g;case"script":return g=mi(a.src),(d=t.querySelector(ka(g)))?(n.instance=d,we(d),d):(o=a,(d=Mn.get(g))&&(o=b({},a),Ef(o,d)),t=t.ownerDocument||t,d=t.createElement("script"),we(d),Mt(d,"link",o),t.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error(i(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,us(o,a.precedence,t));return n.instance}function us(t,n,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=o.length?o[o.length-1]:null,g=d,k=0;k<o.length;k++){var _=o[k];if(_.dataset.precedence===n)g=_;else if(g!==d)break}g?g.parentNode.insertBefore(t,g.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(t,n.firstChild))}function kf(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Ef(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var cs=null;function pb(t,n,a){if(cs===null){var o=new Map,d=cs=new Map;d.set(a,o)}else d=cs,o=d.get(a),o||(o=new Map,d.set(a,o));if(o.has(t))return o;for(o.set(t,null),a=a.getElementsByTagName(t),d=0;d<a.length;d++){var g=a[d];if(!(g[fl]||g[gt]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var k=g.getAttribute(n)||"";k=t+k;var _=o.get(k);_?_.push(g):o.set(k,[g])}}return o}function gb(t,n,a){t=t.ownerDocument||t,t.head.insertBefore(a,n==="title"?t.querySelector("head > title"):null)}function gS(t,n,a){if(a===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function mb(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function mS(t,n,a,o){if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var d=gi(o.href),g=n.querySelector(Sa(d));if(g){n=g._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=fs.bind(t),n.then(t,t)),a.state.loading|=4,a.instance=g,we(g);return}g=n.ownerDocument||n,o=db(o),(d=Mn.get(d))&&kf(o,d),g=g.createElement("link"),we(g);var k=g;k._p=new Promise(function(_,P){k.onload=_,k.onerror=P}),Mt(g,"link",o),a.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=fs.bind(t),n.addEventListener("load",a),n.addEventListener("error",a))}}var Cf=0;function bS(t,n){return t.stylesheets&&t.count===0&&hs(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var o=setTimeout(function(){if(t.stylesheets&&hs(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+n);0<t.imgBytes&&Cf===0&&(Cf=62500*Kw());var d=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&hs(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>Cf?50:800)+n);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(d)}}:null}function fs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hs(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var ds=null;function hs(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,ds=new Map,n.forEach(yS,t),ds=null,fs.call(t))}function yS(t,n){if(!(n.state.loading&4)){var a=ds.get(t);if(a)var o=a.get(null);else{a=new Map,ds.set(t,a);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<d.length;g++){var k=d[g];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(a.set(k.dataset.precedence,k),o=k)}o&&a.set(null,o)}d=n.instance,k=d.getAttribute("data-precedence"),g=a.get(k)||o,g===o&&a.set(null,d),a.set(k,d),this.count++,o=fs.bind(this),d.addEventListener("load",o),d.addEventListener("error",o),g?g.parentNode.insertBefore(d,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),n.state.loading|=4}}var Ea={$$typeof:j,Provider:null,Consumer:null,_currentValue:M,_currentValue2:M,_threadCount:0};function xS(t,n,a,o,d,g,k,_,P){this.tag=1,this.containerInfo=t,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=Mi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mi(0),this.hiddenUpdates=Mi(null),this.identifierPrefix=o,this.onUncaughtError=d,this.onCaughtError=g,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=P,this.incompleteTransitions=new Map}function bb(t,n,a,o,d,g,k,_,P,ee,ae,ce){return t=new xS(t,n,a,k,P,ee,ae,ce,_),n=1,g===!0&&(n|=24),g=hn(3,null,null,n),t.current=g,g.stateNode=t,n=rc(),n.refCount++,t.pooledCache=n,n.refCount++,g.memoizedState={element:o,isDehydrated:a,cache:n},oc(g),t}function yb(t){return t?(t=Yl,t):Yl}function xb(t,n,a,o,d,g){d=yb(d),o.context===null?o.context=d:o.pendingContext=d,o=Br(n),o.payload={element:a},g=g===void 0?null:g,g!==null&&(o.callback=g),a=Fr(t,o,n),a!==null&&(an(a,t,n),na(a,t,n))}function vb(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<n?a:n}}function Nf(t,n){vb(t,n),(t=t.alternate)&&vb(t,n)}function wb(t){if(t.tag===13||t.tag===31){var n=gl(t,67108864);n!==null&&an(n,t,67108864),Nf(t,67108864)}}function Sb(t){if(t.tag===13||t.tag===31){var n=yn();n=Vn(n);var a=gl(t,n);a!==null&&an(a,t,n),Nf(t,n)}}var ps=!0;function vS(t,n,a,o){var d=F.T;F.T=null;var g=X.p;try{X.p=2,Af(t,n,a,o)}finally{X.p=g,F.T=d}}function wS(t,n,a,o){var d=F.T;F.T=null;var g=X.p;try{X.p=8,Af(t,n,a,o)}finally{X.p=g,F.T=d}}function Af(t,n,a,o){if(ps){var d=Tf(o);if(d===null)hf(t,n,o,gs,a),Eb(t,o);else if(kS(d,t,n,a,o))o.stopPropagation();else if(Eb(t,o),n&4&&-1<SS.indexOf(t)){for(;d!==null;){var g=le(d);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var k=In(g.pendingLanes);if(k!==0){var _=g;for(_.pendingLanes|=2,_.entangledLanes|=2;k;){var P=1<<31-Je(k);_.entanglements[1]|=P,k&=~P}Qn(g),(Qe&6)===0&&(Ko=at()+500,ya(0))}}break;case 31:case 13:_=gl(g,2),_!==null&&an(_,g,2),Wo(),Nf(g,2)}if(g=Tf(o),g===null&&hf(t,n,o,gs,a),g===d)break;d=g}d!==null&&o.stopPropagation()}else hf(t,n,o,null,a)}}function Tf(t){return t=ju(t),jf(t)}var gs=null;function jf(t){if(gs=null,t=Rr(t),t!==null){var n=u(t);if(n===null)t=null;else{var a=n.tag;if(a===13){if(t=c(n),t!==null)return t;t=null}else if(a===31){if(t=f(n),t!==null)return t;t=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return gs=t,null}function kb(t){switch(t){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(En()){case oe:return 2;case be:return 8;case Re:case De:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Rf=!1,Zr=null,Qr=null,Kr=null,Ca=new Map,Na=new Map,Jr=[],SS="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 Eb(t,n){switch(t){case"focusin":case"focusout":Zr=null;break;case"dragenter":case"dragleave":Qr=null;break;case"mouseover":case"mouseout":Kr=null;break;case"pointerover":case"pointerout":Ca.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Na.delete(n.pointerId)}}function Aa(t,n,a,o,d,g){return t===null||t.nativeEvent!==g?(t={blockedOn:n,domEventName:a,eventSystemFlags:o,nativeEvent:g,targetContainers:[d]},n!==null&&(n=le(n),n!==null&&wb(n)),t):(t.eventSystemFlags|=o,n=t.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),t)}function kS(t,n,a,o,d){switch(n){case"focusin":return Zr=Aa(Zr,t,n,a,o,d),!0;case"dragenter":return Qr=Aa(Qr,t,n,a,o,d),!0;case"mouseover":return Kr=Aa(Kr,t,n,a,o,d),!0;case"pointerover":var g=d.pointerId;return Ca.set(g,Aa(Ca.get(g)||null,t,n,a,o,d)),!0;case"gotpointercapture":return g=d.pointerId,Na.set(g,Aa(Na.get(g)||null,t,n,a,o,d)),!0}return!1}function Cb(t){var n=Rr(t.target);if(n!==null){var a=u(n);if(a!==null){if(n=a.tag,n===13){if(n=c(a),n!==null){t.blockedOn=n,ao(t.priority,function(){Sb(a)});return}}else if(n===31){if(n=f(a),n!==null){t.blockedOn=n,ao(t.priority,function(){Sb(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ms(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var a=Tf(t.nativeEvent);if(a===null){a=t.nativeEvent;var o=new a.constructor(a.type,a);Tu=o,a.target.dispatchEvent(o),Tu=null}else return n=le(a),n!==null&&wb(n),t.blockedOn=a,!1;n.shift()}return!0}function Nb(t,n,a){ms(t)&&a.delete(n)}function ES(){Rf=!1,Zr!==null&&ms(Zr)&&(Zr=null),Qr!==null&&ms(Qr)&&(Qr=null),Kr!==null&&ms(Kr)&&(Kr=null),Ca.forEach(Nb),Na.forEach(Nb)}function bs(t,n){t.blockedOn===n&&(t.blockedOn=null,Rf||(Rf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,ES)))}var ys=null;function Ab(t){ys!==t&&(ys=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ys===t&&(ys=null);for(var n=0;n<t.length;n+=3){var a=t[n],o=t[n+1],d=t[n+2];if(typeof o!="function"){if(jf(o||a)===null)continue;break}var g=le(a);g!==null&&(t.splice(n,3),n-=3,Ac(g,{pending:!0,data:d,method:a.method,action:o},o,d))}}))}function bi(t){function n(P){return bs(P,t)}Zr!==null&&bs(Zr,t),Qr!==null&&bs(Qr,t),Kr!==null&&bs(Kr,t),Ca.forEach(n),Na.forEach(n);for(var a=0;a<Jr.length;a++){var o=Jr[a];o.blockedOn===t&&(o.blockedOn=null)}for(;0<Jr.length&&(a=Jr[0],a.blockedOn===null);)Cb(a),a.blockedOn===null&&Jr.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(o=0;o<a.length;o+=3){var d=a[o],g=a[o+1],k=d[_t]||null;if(typeof g=="function")k||Ab(a);else if(k){var _=null;if(g&&g.hasAttribute("formAction")){if(d=g,k=g[_t]||null)_=k.formAction;else if(jf(d)!==null)continue}else _=k.action;typeof _=="function"?a[o+1]=_:(a.splice(o,3),o-=3),Ab(a)}}}function Tb(){function t(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(k){return d=k})},focusReset:"manual",scroll:"manual"})}function n(){d!==null&&(d(),d=null),o||setTimeout(a,20)}function a(){if(!o&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,d=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){o=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),d!==null&&(d(),d=null)}}}function _f(t){this._internalRoot=t}xs.prototype.render=_f.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(i(409));var a=n.current,o=yn();xb(a,o,t,n,null,null)},xs.prototype.unmount=_f.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;xb(t.current,2,null,t,null,null),Wo(),n[rr]=null}};function xs(t){this._internalRoot=t}xs.prototype.unstable_scheduleHydration=function(t){if(t){var n=io();t={blockedOn:null,target:t,priority:n};for(var a=0;a<Jr.length&&n!==0&&n<Jr[a].priority;a++);Jr.splice(a,0,t),a===0&&Cb(t)}};var jb=r.version;if(jb!=="19.2.4")throw Error(i(527,jb,"19.2.4"));X.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(i(188)):(t=Object.keys(t).join(","),Error(i(268,t)));return t=p(n),t=t!==null?m(t):null,t=t===null?null:t.stateNode,t};var CS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vs.isDisabled&&vs.supportsFiber)try{jt=vs.inject(CS),xt=vs}catch{}}return ja.createRoot=function(t,n){if(!s(t))throw Error(i(299));var a=!1,o="",d=zg,g=Bg,k=Fg;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(g=n.onCaughtError),n.onRecoverableError!==void 0&&(k=n.onRecoverableError)),n=bb(t,1,!1,null,null,a,o,null,d,g,k,Tb),t[rr]=n.current,df(t),new _f(n)},ja.hydrateRoot=function(t,n,a){if(!s(t))throw Error(i(299));var o=!1,d="",g=zg,k=Bg,_=Fg,P=null;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(g=a.onUncaughtError),a.onCaughtError!==void 0&&(k=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.formState!==void 0&&(P=a.formState)),n=bb(t,1,!0,n,a??null,o,d,P,g,k,_,Tb),n.context=yb(null),a=n.current,o=yn(),o=Vn(o),d=Br(o),d.callback=null,Fr(a,d,o),a=o,n.current.lanes=a,jr(n,a),Qn(n),t[rr]=n.current,df(t),new xs(n)},ja.version="19.2.4",ja}var Ib;function MS(){if(Ib)return Of.exports;Ib=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),Of.exports=OS(),Of.exports}var zS=MS();const BS=lu(zS),qx=["shift","alt","meta","mod","ctrl","control"],FS={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function al(e){return(FS[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function Px(e){return qx.includes(e)}function Ff(e,r=","){return e.toLowerCase().split(r)}function If(e,r="+",l=">",i=!1,s,u){let c=[],f=!1;e=e.trim(),e.includes(l)?(f=!0,c=e.toLocaleLowerCase().split(l).map(m=>al(m))):c=e.toLocaleLowerCase().split(r).map(m=>al(m));const h={alt:c.includes("alt"),ctrl:c.includes("ctrl")||c.includes("control"),shift:c.includes("shift"),meta:c.includes("meta"),mod:c.includes("mod"),useKey:i},p=c.filter(m=>!qx.includes(m));return{...h,keys:p,description:s,isSequence:f,hotkey:e,metadata:u}}typeof document<"u"&&(document.addEventListener("keydown",e=>{e.code!==void 0&&$x([al(e.code)])}),document.addEventListener("keyup",e=>{e.code!==void 0&&Vx([al(e.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{kr.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{kr.clear()},0)}));const kr=new Set;function uh(e){return Array.isArray(e)}function IS(e,r=","){return(uh(e)?e:e.split(r)).every(l=>kr.has(l.trim().toLowerCase()))}function $x(e){const r=Array.isArray(e)?e:[e];kr.has("meta")&&kr.forEach(l=>{Px(l)||kr.delete(l.toLowerCase())}),r.forEach(l=>{kr.add(l.toLowerCase())})}function Vx(e){const r=Array.isArray(e)?e:[e];e==="meta"?kr.clear():r.forEach(l=>{kr.delete(l.toLowerCase())})}function US(e,r,l){(typeof l=="function"&&l(e,r)||l===!0)&&e.preventDefault()}function HS(e,r,l){return typeof l=="function"?l(e,r):l===!0||l===void 0}const qS=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function PS(e){return Gx(e,qS)}function Gx(e,r=!1){const{target:l,composed:i}=e;let s,u;return $S(l)&&i?(s=e.composedPath()[0]&&e.composedPath()[0].tagName,u=e.composedPath()[0]&&e.composedPath()[0].role):(s=l&&l.tagName,u=l&&l.role),uh(r)?!!(s&&r&&r.some(c=>c.toLowerCase()===s.toLowerCase()||c===u)):!!(s&&r&&r)}function $S(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function VS(e,r){return e.length===0&&r?!1:r?e.some(l=>r.includes(l))||e.includes("*"):!0}const GS=(e,r,l=!1)=>{const{alt:i,meta:s,mod:u,shift:c,ctrl:f,keys:h,useKey:p}=r,{code:m,key:b,ctrlKey:v,metaKey:x,shiftKey:S,altKey:w}=e,N=al(m);if(p&&h?.length===1&&h.includes(b.toLowerCase()))return!0;if(!h?.includes(N)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(N))return!1;if(!l){if(i!==w&&N!=="alt"||c!==S&&N!=="shift")return!1;if(u){if(!x&&!v)return!1}else if(s!==x&&N!=="meta"&&N!=="os"||f!==v&&N!=="ctrl"&&N!=="control")return!1}return h&&h.length===1&&h.includes(N)?!0:h&&h.length>0?h.includes(N)?IS(h):!1:!h||h.length===0},Yx=T.createContext(void 0),YS=()=>T.useContext(Yx);function XS({addHotkey:e,removeHotkey:r,children:l}){return y.jsx(Yx.Provider,{value:{addHotkey:e,removeHotkey:r},children:l})}function ch(e,r){return e&&r&&typeof e=="object"&&typeof r=="object"?Object.keys(e).length===Object.keys(r).length&&Object.keys(e).reduce((l,i)=>l&&ch(e[i],r[i]),!0):e===r}const Xx=T.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Xa=()=>T.useContext(Xx),ZS=({initiallyActiveScopes:e=["*"],children:r})=>{const[l,i]=T.useState(e),[s,u]=T.useState([]),c=T.useCallback(b=>{i(v=>v.includes("*")?[b]:Array.from(new Set([...v,b])))},[]),f=T.useCallback(b=>{i(v=>v.filter(x=>x!==b))},[]),h=T.useCallback(b=>{i(v=>v.includes(b)?v.filter(x=>x!==b):v.includes("*")?[b]:Array.from(new Set([...v,b])))},[]),p=T.useCallback(b=>{u(v=>[...v,b])},[]),m=T.useCallback(b=>{u(v=>v.filter(x=>!ch(x,b)))},[]);return y.jsx(Xx.Provider,{value:{activeScopes:l,hotkeys:s,enableScope:c,disableScope:f,toggleScope:h},children:y.jsx(XS,{addHotkey:p,removeHotkey:m,children:r})})};function QS(e){const r=T.useRef(void 0);return ch(r.current,e)||(r.current=e),r.current}const Ub=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},KS=typeof window<"u"?T.useLayoutEffect:T.useEffect;function lt(e,r,l,i){const s=T.useRef(null),u=T.useRef(!1),c=Array.isArray(l)?Array.isArray(i)?void 0:i:l,f=uh(e)?e.join(c?.delimiter):e,h=Array.isArray(l)?l:Array.isArray(i)?i:void 0,p=T.useCallback(r,h??[]),m=T.useRef(p);h?m.current=p:m.current=r;const b=QS(c),{activeScopes:v}=Xa(),x=YS();return KS(()=>{if(b?.enabled===!1||!VS(v,b?.scopes))return;let S=[],w;const N=(z,U=!1)=>{if(!(PS(z)&&!Gx(z,b?.enableOnFormTags))){if(s.current!==null){const L=s.current.getRootNode();if((L instanceof Document||L instanceof ShadowRoot)&&L.activeElement!==s.current&&!s.current.contains(L.activeElement)){Ub(z);return}}z.target?.isContentEditable&&!b?.enableOnContentEditable||Ff(f,b?.delimiter).forEach(L=>{if(L.includes(b?.splitKey??"+")&&L.includes(b?.sequenceSplitKey??">")){console.warn(`Hotkey ${L} contains both ${b?.splitKey??"+"} and ${b?.sequenceSplitKey??">"} which is not supported.`);return}const O=If(L,b?.splitKey,b?.sequenceSplitKey,b?.useKey,b?.description,b?.metadata);if(O.isSequence){w=setTimeout(()=>{S=[]},b?.sequenceTimeoutMs??1e3);const H=O.useKey?z.key:al(z.code);if(Px(H.toLowerCase()))return;S.push(H);const Y=O.keys?.[S.length-1];if(H!==Y){S=[],w&&clearTimeout(w);return}S.length===O.keys?.length&&(m.current(z,O),w&&clearTimeout(w),S=[])}else if(GS(z,O,b?.ignoreModifiers)||O.keys?.includes("*")){if(b?.ignoreEventWhen?.(z)||U&&u.current)return;if(US(z,O,b?.preventDefault),!HS(z,O,b?.enabled)){Ub(z);return}m.current(z,O),U||(u.current=!0)}})}},E=z=>{z.code!==void 0&&($x(al(z.code)),(b?.keydown===void 0&&b?.keyup!==!0||b?.keydown)&&N(z))},C=z=>{z.code!==void 0&&(Vx(al(z.code)),u.current=!1,b?.keyup&&N(z,!0))},j=s.current||c?.document||document;return j.addEventListener("keyup",C,c?.eventListenerOptions),j.addEventListener("keydown",E,c?.eventListenerOptions),x&&Ff(f,b?.delimiter).forEach(z=>{x.addHotkey(If(z,b?.splitKey,b?.sequenceSplitKey,b?.useKey,b?.description,b?.metadata))}),()=>{j.removeEventListener("keyup",C,c?.eventListenerOptions),j.removeEventListener("keydown",E,c?.eventListenerOptions),x&&Ff(f,b?.delimiter).forEach(z=>{x.removeHotkey(If(z,b?.splitKey,b?.sequenceSplitKey,b?.useKey,b?.description,b?.metadata))}),S=[],w&&clearTimeout(w)}},[f,b,v]),s}const Zx=(...e)=>e.filter((r,l,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===l).join(" ").trim();const JS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const WS=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,l,i)=>i?i.toUpperCase():l.toLowerCase());const Hb=e=>{const r=WS(e);return r.charAt(0).toUpperCase()+r.slice(1)};var e2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const t2=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};const n2=T.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:s="",children:u,iconNode:c,...f},h)=>T.createElement("svg",{ref:h,...e2,width:r,height:r,stroke:e,strokeWidth:i?Number(l)*24/Number(r):l,className:Zx("lucide",s),...!u&&!t2(f)&&{"aria-hidden":"true"},...f},[...c.map(([p,m])=>T.createElement(p,m)),...Array.isArray(u)?u:[u]]));const $e=(e,r)=>{const l=T.forwardRef(({className:i,...s},u)=>T.createElement(n2,{ref:u,iconNode:r,className:Zx(`lucide-${JS(Hb(e))}`,`lucide-${e}`,i),...s}));return l.displayName=Hb(e),l};const r2=[["path",{d:"M19 3H5",key:"1236rx"}],["path",{d:"M12 21V7",key:"gj6g52"}],["path",{d:"m6 15 6 6 6-6",key:"h15q88"}]],l2=$e("arrow-down-from-line",r2);const i2=[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]],a2=$e("arrow-up-from-line",i2);const o2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Pa=$e("check",o2);const s2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ti=$e("chevron-down",s2);const u2=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],c2=$e("chevron-left",u2);const f2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Qx=$e("chevron-right",f2);const d2=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],h2=$e("chevrons-down-up",d2);const p2=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],g2=$e("chevrons-up-down",p2);const m2=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],b2=$e("code",m2);const y2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],x2=$e("columns-2",y2);const v2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Kx=$e("copy",v2);const w2=[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]],S2=$e("eraser",w2);const k2=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],E2=$e("external-link",k2);const C2=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ms=$e("eye",C2);const N2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],iu=$e("file-diff",N2);const A2=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],Jx=$e("file-pen",A2);const T2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],Wx=$e("file-plus",T2);const j2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],e1=$e("file-x",j2);const R2=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],_2=$e("folder-open",R2);const L2=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],D2=$e("folder",L2);const O2=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],M2=$e("git-branch",O2);const z2=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],B2=$e("keyboard",z2);const F2=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],I2=$e("list",F2);const U2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],H2=$e("loader-circle",U2);const q2=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],t1=$e("message-square",q2);const P2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],$2=$e("panel-left-close",P2);const V2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],G2=$e("panel-left",V2);const Y2=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],X2=$e("pen",Y2);const Z2=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Q2=$e("refresh-cw",Z2);const K2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],J2=$e("search",K2);const W2=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],n1=$e("settings",W2);const ek=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],tk=$e("square",ek);const nk=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],rk=$e("text-align-start",nk);const lk=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]],ik=$e("unfold-vertical",lk);const ak=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],au=$e("x",ak),Za="split";function ok(e){switch(e){case"split":case"side-by-side":return"split";case"unified":case"inline":return"unified";default:return Za}}function r1({checked:e,onChange:r,label:l,className:i="",title:s}){const u=f=>{f.stopPropagation(),r(!e)},c=f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),f.stopPropagation(),r(!e))};return y.jsxs("div",{className:`flex items-center gap-2 text-xs text-github-text-primary cursor-pointer ${i}`,title:s,onClick:u,onKeyDown:c,role:"checkbox","aria-checked":e,tabIndex:0,children:[y.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center transition-all duration-200 cursor-pointer ${e?"bg-github-accent border-github-accent":"bg-github-bg-tertiary border-github-text-muted hover:border-github-accent/50"}`,children:e&&y.jsx(Pa,{size:10,className:"text-white"})}),l&&y.jsx("span",{className:"select-none",children:l})]})}function qb({commentsCount:e,isCopiedAll:r,onCopyAll:l,onDeleteAll:i,onViewAll:s,direction:u="down",compact:c=!1}){const[f,h]=T.useState(!1),p=T.useRef(null),m=c,b=u==="up";T.useEffect(()=>{const N=E=>{p.current&&!p.current.contains(E.target)&&h(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const v=()=>{l(),h(!1)},x=()=>{i(),h(!1)},S=()=>{s?.(),h(!1)},w=m?r?"Copied":`Copy All (${e})`:r?"Copied All!":`Copy All Prompt (${e})`;return y.jsxs("div",{className:"relative",ref:p,children:[y.jsxs("div",{className:"flex",children:[y.jsxs("button",{onClick:v,className:`text-xs px-3 py-1.5 pr-2 rounded-l transition-all flex items-center gap-1.5 ${m?"whitespace-normal":"whitespace-nowrap"}`,style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)",borderRight:"none"},onMouseEnter:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:`Copy all ${e} comments to AI coding agent`,children:[r?y.jsx(Pa,{size:12}):y.jsx(Kx,{size:12}),w]}),y.jsx("button",{onClick:()=>h(!f),className:"text-xs px-2 py-1.5 rounded-r transition-all flex items-center border-l",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",borderTop:"1px solid var(--color-yellow-btn-border)",borderRight:"1px solid var(--color-yellow-btn-border)",borderBottom:"1px solid var(--color-yellow-btn-border)",borderLeft:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:"More options",children:y.jsx(Ti,{size:12,className:`transition-transform duration-200 ${f?"rotate-180":""}`})})]}),f&&y.jsxs("div",{className:`absolute left-0 right-0 bg-github-bg-primary border border-github-border z-50 pb-px ${b?"bottom-full rounded-t":"top-full rounded-b"}`,style:{borderTop:b?void 0:"none",borderBottom:b?"none":void 0},children:[s&&y.jsxs("button",{onClick:S,className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 text-github-text-primary hover:bg-github-bg-tertiary transition-colors",disabled:e===0,children:[y.jsx(I2,{size:12}),"View All Comments"]}),y.jsxs("button",{onClick:x,className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 text-github-text-primary hover:bg-github-bg-tertiary transition-colors",children:[y.jsx(S2,{size:12}),"Cleanup All Prompt"]})]})]})}function l1(e){return/```suggestion\n([\s\S]*?)```/.test(e)}function i1(e){const r=[],l=/```suggestion\n([\s\S]*?)```/g;let i;for(;(i=l.exec(e))!==null;)r.push({suggestedCode:i[1].replace(/\n$/,""),startIndex:i.index,endIndex:i.index+i[0].length});return r}function sk(e){return`\`\`\`suggestion
|
|
10
|
+
${e.endsWith(`
|
|
11
|
+
`)?e:e+`
|
|
12
|
+
`}\`\`\``}const uk=2,ck=100;function fk(e){return!(e.length<uk||e.length>ck)}function Pb(e){return e.toLowerCase()}function $b(e){const r=e.trim();return r?r.match(/^\w+$/)!==null&&fk(r):!1}const dk=200,a1=T.createContext(void 0);function hk({children:e}){const[r,l]=T.useState(null),i=T.useRef(null),s=T.useCallback(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]),u=T.useCallback(p=>{const m=p.target;if(!m.classList.contains("word-token"))return;s();const b=m.getAttribute("data-word");b&&(i.current=setTimeout(()=>{l(b)},dk))},[s]),c=T.useCallback(()=>{s(),l(null)},[s]),f=T.useCallback(p=>r?Pb(p)===Pb(r):!1,[r]);T.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);const h=T.useMemo(()=>({highlightedWord:r,handleMouseOver:u,handleMouseOut:c,isWordHighlighted:f}),[r,u,c,f]);return y.jsx(a1.Provider,{value:h,children:e})}function pk(){const e=T.useContext(a1);if(!e)throw new Error("useWordHighlight must be used within a WordHighlightProvider");return e}function o1(e){var r,l,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(r=0;r<s;r++)e[r]&&(l=o1(e[r]))&&(i&&(i+=" "),i+=l)}else for(l in e)e[l]&&(i&&(i+=" "),i+=l);return i}function s1(){for(var e,r,l=0,i="",s=arguments.length;l<s;l++)(e=arguments[l])&&(r=o1(e))&&(i&&(i+=" "),i+=r);return i}var gk=Object.create,ou=Object.defineProperty,mk=Object.defineProperties,bk=Object.getOwnPropertyDescriptor,yk=Object.getOwnPropertyDescriptors,u1=Object.getOwnPropertyNames,zs=Object.getOwnPropertySymbols,xk=Object.getPrototypeOf,fh=Object.prototype.hasOwnProperty,c1=Object.prototype.propertyIsEnumerable,Vb=(e,r,l)=>r in e?ou(e,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[r]=l,Jn=(e,r)=>{for(var l in r||(r={}))fh.call(r,l)&&Vb(e,l,r[l]);if(zs)for(var l of zs(r))c1.call(r,l)&&Vb(e,l,r[l]);return e},su=(e,r)=>mk(e,yk(r)),f1=(e,r)=>{var l={};for(var i in e)fh.call(e,i)&&r.indexOf(i)<0&&(l[i]=e[i]);if(e!=null&&zs)for(var i of zs(e))r.indexOf(i)<0&&c1.call(e,i)&&(l[i]=e[i]);return l},vk=(e,r)=>function(){return r||(0,e[u1(e)[0]])((r={exports:{}}).exports,r),r.exports},wk=(e,r)=>{for(var l in r)ou(e,l,{get:r[l],enumerable:!0})},Sk=(e,r,l,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of u1(r))!fh.call(e,s)&&s!==l&&ou(e,s,{get:()=>r[s],enumerable:!(i=bk(r,s))||i.enumerable});return e},kk=(e,r,l)=>(l=e!=null?gk(xk(e)):{},Sk(!e||!e.__esModule?ou(l,"default",{value:e,enumerable:!0}):l,e)),Ek=vk({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,r){var l=(function(){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,u={},c={util:{encode:function S(w){return w instanceof f?new f(w.type,S(w.content),w.alias):Array.isArray(w)?w.map(S):w.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(S){return Object.prototype.toString.call(S).slice(8,-1)},objId:function(S){return S.__id||Object.defineProperty(S,"__id",{value:++s}),S.__id},clone:function S(w,N){N=N||{};var E,C;switch(c.util.type(w)){case"Object":if(C=c.util.objId(w),N[C])return N[C];E={},N[C]=E;for(var j in w)w.hasOwnProperty(j)&&(E[j]=S(w[j],N));return E;case"Array":return C=c.util.objId(w),N[C]?N[C]:(E=[],N[C]=E,w.forEach(function(z,U){E[U]=S(z,N)}),E);default:return w}},getLanguage:function(S){for(;S;){var w=i.exec(S.className);if(w)return w[1].toLowerCase();S=S.parentElement}return"none"},setLanguage:function(S,w){S.className=S.className.replace(RegExp(i,"gi"),""),S.classList.add("language-"+w)},isActive:function(S,w,N){for(var E="no-"+w;S;){var C=S.classList;if(C.contains(w))return!0;if(C.contains(E))return!1;S=S.parentElement}return!!N}},languages:{plain:u,plaintext:u,text:u,txt:u,extend:function(S,w){var N=c.util.clone(c.languages[S]);for(var E in w)N[E]=w[E];return N},insertBefore:function(S,w,N,E){E=E||c.languages;var C=E[S],j={};for(var z in C)if(C.hasOwnProperty(z)){if(z==w)for(var U in N)N.hasOwnProperty(U)&&(j[U]=N[U]);N.hasOwnProperty(z)||(j[z]=C[z])}var L=E[S];return E[S]=j,c.languages.DFS(c.languages,function(O,H){H===L&&O!=S&&(this[O]=j)}),j},DFS:function S(w,N,E,C){C=C||{};var j=c.util.objId;for(var z in w)if(w.hasOwnProperty(z)){N.call(w,z,w[z],E||z);var U=w[z],L=c.util.type(U);L==="Object"&&!C[j(U)]?(C[j(U)]=!0,S(U,N,null,C)):L==="Array"&&!C[j(U)]&&(C[j(U)]=!0,S(U,N,z,C))}}},plugins:{},highlight:function(S,w,N){var E={code:S,grammar:w,language:N};if(c.hooks.run("before-tokenize",E),!E.grammar)throw new Error('The language "'+E.language+'" has no grammar.');return E.tokens=c.tokenize(E.code,E.grammar),c.hooks.run("after-tokenize",E),f.stringify(c.util.encode(E.tokens),E.language)},tokenize:function(S,w){var N=w.rest;if(N){for(var E in N)w[E]=N[E];delete w.rest}var C=new m;return b(C,C.head,S),p(S,C,w,C.head,0),x(C)},hooks:{all:{},add:function(S,w){var N=c.hooks.all;N[S]=N[S]||[],N[S].push(w)},run:function(S,w){var N=c.hooks.all[S];if(!(!N||!N.length))for(var E=0,C;C=N[E++];)C(w)}},Token:f};function f(S,w,N,E){this.type=S,this.content=w,this.alias=N,this.length=(E||"").length|0}f.stringify=function S(w,N){if(typeof w=="string")return w;if(Array.isArray(w)){var E="";return w.forEach(function(L){E+=S(L,N)}),E}var C={type:w.type,content:S(w.content,N),tag:"span",classes:["token",w.type],attributes:{},language:N},j=w.alias;j&&(Array.isArray(j)?Array.prototype.push.apply(C.classes,j):C.classes.push(j)),c.hooks.run("wrap",C);var z="";for(var U in C.attributes)z+=" "+U+'="'+(C.attributes[U]||"").replace(/"/g,""")+'"';return"<"+C.tag+' class="'+C.classes.join(" ")+'"'+z+">"+C.content+"</"+C.tag+">"};function h(S,w,N,E){S.lastIndex=w;var C=S.exec(N);if(C&&E&&C[1]){var j=C[1].length;C.index+=j,C[0]=C[0].slice(j)}return C}function p(S,w,N,E,C,j){for(var z in N)if(!(!N.hasOwnProperty(z)||!N[z])){var U=N[z];U=Array.isArray(U)?U:[U];for(var L=0;L<U.length;++L){if(j&&j.cause==z+","+L)return;var O=U[L],H=O.inside,Y=!!O.lookbehind,B=!!O.greedy,$=O.alias;if(B&&!O.pattern.global){var G=O.pattern.toString().match(/[imsuy]*$/)[0];O.pattern=RegExp(O.pattern.source,G+"g")}for(var J=O.pattern||O,I=E.next,Z=C;I!==w.tail&&!(j&&Z>=j.reach);Z+=I.value.length,I=I.next){var F=I.value;if(w.length>S.length)return;if(!(F instanceof f)){var X=1,M;if(B){if(M=h(J,Z,S,Y),!M||M.index>=S.length)break;var q=M.index,V=M.index+M[0].length,R=Z;for(R+=I.value.length;q>=R;)I=I.next,R+=I.value.length;if(R-=I.value.length,Z=R,I.value instanceof f)continue;for(var D=I;D!==w.tail&&(R<V||typeof D.value=="string");D=D.next)X++,R+=D.value.length;X--,F=S.slice(Z,R),M.index-=Z}else if(M=h(J,0,F,Y),!M)continue;var q=M.index,A=M[0],ne=F.slice(0,q),re=F.slice(q+A.length),fe=Z+F.length;j&&fe>j.reach&&(j.reach=fe);var ge=I.prev;ne&&(ge=b(w,ge,ne),Z+=ne.length),v(w,ge,X);var ye=new f(z,H?c.tokenize(A,H):A,$,A);if(I=b(w,ge,ye),re&&b(w,I,re),X>1){var pe={cause:z+","+L,reach:fe};p(S,w,N,I.prev,Z,pe),j&&pe.reach>j.reach&&(j.reach=pe.reach)}}}}}}function m(){var S={value:null,prev:null,next:null},w={value:null,prev:S,next:null};S.next=w,this.head=S,this.tail=w,this.length=0}function b(S,w,N){var E=w.next,C={value:N,prev:w,next:E};return w.next=C,E.prev=C,S.length++,C}function v(S,w,N){for(var E=w.next,C=0;C<N&&E!==S.tail;C++)E=E.next;w.next=E,E.prev=w,S.length-=C}function x(S){for(var w=[],N=S.head.next;N!==S.tail;)w.push(N.value),N=N.next;return w}return c})();r.exports=l,l.default=l}}),ue=kk(Ek());ue.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},ue.languages.markup.tag.inside["attr-value"].inside.entity=ue.languages.markup.entity,ue.languages.markup.doctype.inside["internal-subset"].inside=ue.languages.markup,ue.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(ue.languages.markup.tag,"addInlined",{value:function(e,i){var l={},l=(l["language-"+i]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:ue.languages[i]},l.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:l}}),i=(l["language-"+i]={pattern:/[\s\S]+/,inside:ue.languages[i]},{});i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:l},ue.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(ue.languages.markup.tag,"addAttribute",{value:function(e,r){ue.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:ue.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),ue.languages.html=ue.languages.markup,ue.languages.mathml=ue.languages.markup,ue.languages.svg=ue.languages.markup,ue.languages.xml=ue.languages.extend("markup",{}),ue.languages.ssml=ue.languages.xml,ue.languages.atom=ue.languages.xml,ue.languages.rss=ue.languages.xml,(function(e){var r={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},l=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,i="(?:[^\\\\-]|"+l.source+")",i=RegExp(i+"-"+i),s={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:l,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":r,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:l}},"special-escape":r,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":s}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:l,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":s}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(ue),ue.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},ue.languages.javascript=ue.languages.extend("clike",{"class-name":[ue.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),ue.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,ue.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:ue.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:ue.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:ue.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:ue.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:ue.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),ue.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:ue.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),ue.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),ue.languages.markup&&(ue.languages.markup.tag.addInlined("script","javascript"),ue.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),ue.languages.js=ue.languages.javascript,ue.languages.actionscript=ue.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),ue.languages.actionscript["class-name"].alias="function",delete ue.languages.actionscript.parameter,delete ue.languages.actionscript["literal-property"],ue.languages.markup&&ue.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:ue.languages.markup}}),(function(e){var r=/#(?!\{).+/,l={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:r,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:l}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:r,interpolation:l}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:l}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript})(ue),(function(e){var r=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(r,"addSupport",{value:function(l,i){(l=typeof l=="string"?[l]:l).forEach(function(s){var u=function(b){b.inside||(b.inside={}),b.inside.rest=i},c="doc-comment";if(f=e.languages[s]){var f,h=f[c];if((h=h||(f=e.languages.insertBefore(s,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[c])instanceof RegExp&&(h=f[c]={pattern:h}),Array.isArray(h))for(var p=0,m=h.length;p<m;p++)h[p]instanceof RegExp&&(h[p]={pattern:h[p]}),u(h[p]);else u(h)}})}}),r.addSupport(["java","javascript","php"],r)})(ue),(function(e){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,r=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+r.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(ue),(function(e){var r=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,r=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:r={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+r.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[r,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=r,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),l={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:l,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:l})})(ue),(function(e){var r=/[*&][^\s[\]{},]+/,l=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,i="(?:"+l.source+"(?:[ ]+"+r.source+")?|"+r.source+"(?:[ ]+"+l.source+")?)",s=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),u=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function c(f,h){h=(h||"").replace(/m/g,"")+"m";var p=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<value>>/g,function(){return f});return RegExp(p,h)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return i})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<key>>/g,function(){return"(?:"+s+"|"+u+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:c(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:c(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:c(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:c(u),lookbehind:!0,greedy:!0},number:{pattern:c(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:l,important:r,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(ue),(function(e){var r=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function l(p){return p=p.replace(/<inner>/g,function(){return r}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+p+")")}var i=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,s=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return i}),u=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,c=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+s+u+"(?:"+s+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+s+u+")(?:"+s+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+s+")"+u+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+s+"$"),inside:{"table-header":{pattern:RegExp(i),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:l(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:l(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:l(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:l(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(p){["url","bold","italic","strike","code-snippet"].forEach(function(m){p!==m&&(e.languages.markdown[p].inside.content.inside[m]=e.languages.markdown[m])})}),e.hooks.add("after-tokenize",function(p){p.language!=="markdown"&&p.language!=="md"||(function m(b){if(b&&typeof b!="string")for(var v=0,x=b.length;v<x;v++){var S,w=b[v];w.type!=="code"?m(w.content):(S=w.content[1],w=w.content[3],S&&w&&S.type==="code-language"&&w.type==="code-block"&&typeof S.content=="string"&&(S=S.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),S="language-"+(S=(/[a-z][\w-]*/i.exec(S)||[""])[0].toLowerCase()),w.alias?typeof w.alias=="string"?w.alias=[w.alias,S]:w.alias.push(S):w.alias=[S]))}})(p.tokens)}),e.hooks.add("wrap",function(p){if(p.type==="code-block"){for(var m="",b=0,v=p.classes.length;b<v;b++){var x=p.classes[b],x=/language-(.+)/.exec(x);if(x){m=x[1];break}}var S,w=e.languages[m];w?p.content=e.highlight((function(N){return N=N.replace(c,""),N=N.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(E,C){var j;return(C=C.toLowerCase())[0]==="#"?(j=C[1]==="x"?parseInt(C.slice(2),16):Number(C.slice(1)),h(j)):f[C]||E})})(p.content),w,m):m&&m!=="none"&&e.plugins.autoloader&&(S="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),p.attributes.id=S,e.plugins.autoloader.loadLanguages(m,function(){var N=document.getElementById(S);N&&(N.innerHTML=e.highlight(N.textContent,e.languages[m],m))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),f={amp:"&",lt:"<",gt:">",quot:'"'},h=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown})(ue),ue.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:ue.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},ue.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var r=e.tokens.filter(function(S){return typeof S!="string"&&S.type!=="comment"&&S.type!=="scalar"}),l=0;l<r.length;){var i=r[l++];if(i.type==="keyword"&&i.content==="mutation"){var s=[];if(b(["definition-mutation","punctuation"])&&m(1).content==="("){l+=2;var u=v(/^\($/,/^\)$/);if(u===-1)continue;for(;l<u;l++){var c=m(0);c.type==="variable"&&(x(c,"variable-input"),s.push(c.content))}l=u+1}if(b(["punctuation","property-query"])&&m(0).content==="{"&&(l++,x(m(0),"property-mutation"),0<s.length)){var f=v(/^\{$/,/^\}$/);if(f!==-1)for(var h=l;h<f;h++){var p=r[h];p.type==="variable"&&0<=s.indexOf(p.content)&&x(p,"variable-input")}}}}function m(S){return r[l+S]}function b(S,w){w=w||0;for(var N=0;N<S.length;N++){var E=m(N+w);if(!E||E.type!==S[N])return}return 1}function v(S,w){for(var N=1,E=l;E<r.length;E++){var C=r[E],j=C.content;if(C.type==="punctuation"&&typeof j=="string"){if(S.test(j))N++;else if(w.test(j)&&--N===0)return E}}return-1}function x(S,w){var N=S.alias;N?Array.isArray(N)||(S.alias=N=[N]):S.alias=N=[],N.push(w)}}),ue.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},(function(e){var r=e.languages.javascript["template-string"],l=r.pattern.source,i=r.inside.interpolation,s=i.inside["interpolation-punctuation"],u=i.pattern.source;function c(b,v){if(e.languages[b])return{pattern:RegExp("((?:"+v+")\\s*)"+l),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:b}}}}function f(b,v,x){return b={code:b,grammar:v,language:x},e.hooks.run("before-tokenize",b),b.tokens=e.tokenize(b.code,b.grammar),e.hooks.run("after-tokenize",b),b.tokens}function h(b,v,x){var N=e.tokenize(b,{interpolation:{pattern:RegExp(u),lookbehind:!0}}),S=0,w={},N=f(N.map(function(C){if(typeof C=="string")return C;for(var j,z,C=C.content;b.indexOf((z=S++,j="___"+x.toUpperCase()+"_"+z+"___"))!==-1;);return w[j]=C,j}).join(""),v,x),E=Object.keys(w);return S=0,(function C(j){for(var z=0;z<j.length;z++){if(S>=E.length)return;var U,L,O,H,Y,B,$,G=j[z];typeof G=="string"||typeof G.content=="string"?(U=E[S],($=(B=typeof G=="string"?G:G.content).indexOf(U))!==-1&&(++S,L=B.substring(0,$),Y=w[U],O=void 0,(H={})["interpolation-punctuation"]=s,(H=e.tokenize(Y,H)).length===3&&((O=[1,1]).push.apply(O,f(H[1],e.languages.javascript,"javascript")),H.splice.apply(H,O)),O=new e.Token("interpolation",H,i.alias,Y),H=B.substring($+U.length),Y=[],L&&Y.push(L),Y.push(O),H&&(C(B=[H]),Y.push.apply(Y,B)),typeof G=="string"?(j.splice.apply(j,[z,1].concat(Y)),z+=Y.length-1):G.content=Y)):($=G.content,Array.isArray($)?C($):C([$]))}})(N),new e.Token(x,N,"language-"+x,b)}e.languages.javascript["template-string"]=[c("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),c("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),c("svg",/\bsvg/.source),c("markdown",/\b(?:markdown|md)/.source),c("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),c("sql",/\bsql/.source),r].filter(Boolean);var p={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function m(b){return typeof b=="string"?b:Array.isArray(b)?b.map(m).join(""):m(b.content)}e.hooks.add("after-tokenize",function(b){b.language in p&&(function v(x){for(var S=0,w=x.length;S<w;S++){var N,E,C,j=x[S];typeof j!="string"&&(N=j.content,Array.isArray(N)?j.type==="template-string"?(j=N[1],N.length===3&&typeof j!="string"&&j.type==="embedded-code"&&(E=m(j),j=j.alias,j=Array.isArray(j)?j[0]:j,C=e.languages[j])&&(N[1]=h(E,C,j))):v(N):typeof N!="string"&&v([N]))}})(b.tokens)})})(ue),(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var r=e.languages.extend("typescript",{});delete r["class-name"],e.languages.typescript["class-name"].inside=r,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:r}}}}),e.languages.ts=e.languages.typescript})(ue),(function(e){var r=e.languages.javascript,l=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,i="(@(?:arg|argument|param|property)\\s+(?:"+l+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(i+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(i+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:r,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return l})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+l),lookbehind:!0,inside:{string:r.string,number:r.number,boolean:r.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:r,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)})(ue),(function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})})(ue),ue.languages.n4js=ue.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),ue.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),ue.languages.n4jsd=ue.languages.n4js,(function(e){function r(c,f){return RegExp(c.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),f)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:r(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:r(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:r(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var l=["function","function-variable","method","method-variable","property-access"],i=0;i<l.length;i++){var u=l[i],s=e.languages.javascript[u],u=(s=e.util.type(s)==="RegExp"?e.languages.javascript[u]={pattern:s}:s).inside||{};(s.inside=u)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(ue),(function(e){var r=e.util.clone(e.languages.javascript),l=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,i=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,s=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function u(h,p){return h=h.replace(/<S>/g,function(){return l}).replace(/<BRACES>/g,function(){return i}).replace(/<SPREAD>/g,function(){return s}),RegExp(h,p)}s=u(s).source,e.languages.jsx=e.languages.extend("markup",r),e.languages.jsx.tag.pattern=u(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=r.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:u(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:u(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function c(h){for(var p=[],m=0;m<h.length;m++){var b=h[m],v=!1;typeof b!="string"&&(b.type==="tag"&&b.content[0]&&b.content[0].type==="tag"?b.content[0].content[0].content==="</"?0<p.length&&p[p.length-1].tagName===f(b.content[0].content[1])&&p.pop():b.content[b.content.length-1].content!=="/>"&&p.push({tagName:f(b.content[0].content[1]),openedBraces:0}):0<p.length&&b.type==="punctuation"&&b.content==="{"?p[p.length-1].openedBraces++:0<p.length&&0<p[p.length-1].openedBraces&&b.type==="punctuation"&&b.content==="}"?p[p.length-1].openedBraces--:v=!0),(v||typeof b=="string")&&0<p.length&&p[p.length-1].openedBraces===0&&(v=f(b),m<h.length-1&&(typeof h[m+1]=="string"||h[m+1].type==="plain-text")&&(v+=f(h[m+1]),h.splice(m+1,1)),0<m&&(typeof h[m-1]=="string"||h[m-1].type==="plain-text")&&(v=f(h[m-1])+v,h.splice(m-1,1),m--),h[m]=new e.Token("plain-text",v,null,v)),b.content&&typeof b.content!="string"&&c(b.content)}}var f=function(h){return h?typeof h=="string"?h:typeof h.content=="string"?h.content:h.content.map(f).join(""):""};e.hooks.add("after-tokenize",function(h){h.language!=="jsx"&&h.language!=="tsx"||c(h.tokens)})})(ue),(function(e){var r=e.util.clone(e.languages.typescript),r=(e.languages.tsx=e.languages.extend("jsx",r),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(ue),ue.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},ue.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=ue.languages.swift}),(function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var r={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:r},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:r},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin})(ue),ue.languages.c=ue.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),ue.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),ue.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},ue.languages.c.string],char:ue.languages.c.char,comment:ue.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:ue.languages.c}}}}),ue.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete ue.languages.c.boolean,ue.languages.objectivec=ue.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete ue.languages.objectivec["class-name"],ue.languages.objc=ue.languages.objectivec,ue.languages.reason=ue.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),ue.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete ue.languages.reason.function,(function(e){for(var r=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,l=0;l<2;l++)r=r.replace(/<self>/g,function(){return r});r=r.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+r),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(ue),ue.languages.go=ue.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),ue.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete ue.languages.go["class-name"],(function(e){var r=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,l=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return r.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return r.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:r,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return l})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(ue),ue.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},ue.languages.python["string-interpolation"].inside.interpolation.inside.rest=ue.languages.python,ue.languages.py=ue.languages.python,ue.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},ue.languages.webmanifest=ue.languages.json;var vn={};wk(vn,{dracula:()=>Nk,duotoneDark:()=>Tk,duotoneLight:()=>Rk,github:()=>Lk,gruvboxMaterialDark:()=>oE,gruvboxMaterialLight:()=>uE,jettwaveDark:()=>Wk,jettwaveLight:()=>tE,nightOwl:()=>Ok,nightOwlLight:()=>zk,oceanicNext:()=>Fk,okaidia:()=>Uk,oneDark:()=>rE,oneLight:()=>iE,palenight:()=>qk,shadesOfPurple:()=>$k,synthwave84:()=>Gk,ultramin:()=>Xk,vsDark:()=>d1,vsLight:()=>Kk});var Ck={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},Nk=Ck,Ak={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},Tk=Ak,jk={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},Rk=jk,_k={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},Lk=_k,Dk={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},Ok=Dk,Mk={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},zk=Mk,xn={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},Bk={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:xn.keyword}},{types:["attr-value"],style:{color:xn.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:xn.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:xn.primitive}},{types:["boolean"],style:{color:xn.boolean}},{types:["tag"],style:{color:xn.tag}},{types:["string"],style:{color:xn.string}},{types:["punctuation"],style:{color:xn.string}},{types:["selector","char","builtin","inserted"],style:{color:xn.char}},{types:["function"],style:{color:xn.function}},{types:["operator","entity","url","variable"],style:{color:xn.variable}},{types:["keyword"],style:{color:xn.keyword}},{types:["atrule","class-name"],style:{color:xn.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},Fk=Bk,Ik={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},Uk=Ik,Hk={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},qk=Hk,Pk={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},$k=Pk,Vk={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},Gk=Vk,Yk={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},Xk=Yk,Zk={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},d1=Zk,Qk={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},Kk=Qk,Jk={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},Wk=Jk,eE={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},tE=eE,nE={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},rE=nE,lE={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},iE=lE,aE={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},oE=aE,sE={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},uE=sE,cE=e=>T.useCallback(r=>{var l=r,{className:i,style:s,line:u}=l,c=f1(l,["className","style","line"]);const f=su(Jn({},c),{className:s1("token-line",i)});return typeof e=="object"&&"plain"in e&&(f.style=e.plain),typeof s=="object"&&(f.style=Jn(Jn({},f.style||{}),s)),f},[e]),fE=e=>{const r=T.useCallback(({types:l,empty:i})=>{if(e!=null){{if(l.length===1&&l[0]==="plain")return i!=null?{display:"inline-block"}:void 0;if(l.length===1&&i!=null)return e[l[0]]}return Object.assign(i!=null?{display:"inline-block"}:{},...l.map(s=>e[s]))}},[e]);return T.useCallback(l=>{var i=l,{token:s,className:u,style:c}=i,f=f1(i,["token","className","style"]);const h=su(Jn({},f),{className:s1("token",...s.types,u),children:s.content,style:r(s)});return c!=null&&(h.style=Jn(Jn({},h.style||{}),c)),h},[r])},dE=/\r\n|\r|\n/,Gb=e=>{e.length===0?e.push({types:["plain"],content:`
|
|
13
|
+
`,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
|
|
14
|
+
`,e[0].empty=!0)},Yb=(e,r)=>{const l=e.length;return l>0&&e[l-1]===r?e:e.concat(r)},hE=e=>{const r=[[]],l=[e],i=[0],s=[e.length];let u=0,c=0,f=[];const h=[f];for(;c>-1;){for(;(u=i[c]++)<s[c];){let p,m=r[c];const v=l[c][u];if(typeof v=="string"?(m=c>0?m:["plain"],p=v):(m=Yb(m,v.type),v.alias&&(m=Yb(m,v.alias)),p=v.content),typeof p!="string"){c++,r.push(m),l.push(p),i.push(0),s.push(p.length);continue}const x=p.split(dE),S=x.length;f.push({types:m,content:x[0]});for(let w=1;w<S;w++)Gb(f),h.push(f=[]),f.push({types:m,content:x[w]})}c--,r.pop(),l.pop(),i.pop(),s.pop()}return Gb(f),h},Xb=hE,pE=({prism:e,code:r,grammar:l,language:i})=>T.useMemo(()=>{if(l==null)return Xb([r]);const s={code:r,grammar:l,language:i,tokens:[]};return e.hooks.run("before-tokenize",s),s.tokens=e.tokenize(r,l),e.hooks.run("after-tokenize",s),Xb(s.tokens)},[r,l,i,e]),gE=(e,r)=>{const{plain:l}=e,i=e.styles.reduce((s,u)=>{const{languages:c,style:f}=u;return c&&!c.includes(r)||u.types.forEach(h=>{const p=Jn(Jn({},s[h]),f);s[h]=p}),s},{});return i.root=l,i.plain=su(Jn({},l),{backgroundColor:void 0}),i},mE=gE,bE=({children:e,language:r,code:l,theme:i,prism:s})=>{const u=r.toLowerCase(),c=mE(i,u),f=cE(c),h=fE(c),p=s.languages[u],m=pE({prism:s,language:u,code:l,grammar:p});return e({tokens:m,className:`prism-code language-${u}`,style:c!=null?c.root:{},getLineProps:f,getTokenProps:h})},yE=e=>T.createElement(bE,su(Jn({},e),{prism:e.prism||ue,theme:e.theme||d1,code:e.code,language:e.language}));const xE="modulepreload",vE=function(e){return"/"+e},Zb={},Ht=function(r,l,i){let s=Promise.resolve();if(l&&l.length>0){let h=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");s=h(l.map(p=>{if(p=vE(p),p in Zb)return;Zb[p]=!0;const m=p.endsWith(".css"),b=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${b}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":xE,m||(v.as="script"),v.crossOrigin="",v.href=p,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((x,S)=>{v.addEventListener("load",x),v.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${p}`)))})}))}function u(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return s.then(c=>{for(const f of c||[])f.status==="rejected"&&u(f.reason);return r().catch(u)})},ws={};function h1(e){if(!ws[e]){const l={bash:()=>Ht(()=>import("./prism-bash-DTkDXsAh.js"),[]),sh:()=>Ht(()=>import("./prism-bash-DTkDXsAh.js"),[]),shell:()=>Ht(()=>import("./prism-bash-DTkDXsAh.js"),[]),php:async()=>(await Ht(()=>import("./prism-markup-templating-Ct1xsyfA.js"),[]),Ht(()=>import("./prism-php-Y4QWW5YT.js").then(i=>i.p),[])),sql:()=>Ht(()=>import("./prism-sql-AgAyy5H_.js"),[]),ruby:()=>Ht(()=>import("./prism-ruby-CQyeYrqM.js").then(i=>i.p),[]),java:()=>Ht(()=>import("./prism-java-Ca4SeKTf.js").then(i=>i.p),[]),scala:async()=>(await h1("java"),Ht(()=>import("./prism-scala-BjNo2HkN.js"),[])),solidity:()=>Ht(()=>import("./prism-solidity-DNiu86MI.js").then(i=>i.p),[]),vim:()=>Ht(()=>import("./prism-vim-uciLQ2PQ.js"),[]),dart:()=>Ht(()=>import("./prism-dart-MjriiaMt.js"),[]),csharp:()=>Ht(()=>import("./prism-csharp-C7x4qFLG.js").then(i=>i.p),[]),protobuf:()=>Ht(()=>import("./prism-protobuf-DiQ_z8B5.js"),[]),hcl:()=>Ht(()=>import("./prism-hcl-CBjfvIjf.js").then(i=>i.p),[]),perl:()=>Ht(()=>import("./prism-perl-B_RTNjmx.js").then(i=>i.p),[])}[e];if(!l)return console.warn(`No loader available for language: ${e}`),Promise.reject(new Error(`Unsupported language: ${e}`));ws[e]=l().then(()=>{}).catch(i=>{throw delete ws[e],console.warn(`Failed to load language: ${e}`,i),i})}return ws[e]}typeof global<"u"?global.Prism=ue:typeof window<"u"&&(window.Prism=ue);const Qb=["markup","html","xml","svg","javascript","js","typescript","ts","jsx","tsx","css","c","cpp","swift","kotlin","objectivec","reason","rust","go","graphql","yaml","yml","json","markdown","md","python","py"];function wE(e,r){const[l,i]=T.useState(()=>Qb.includes(r)||!!ue.languages[r]);return T.useEffect(()=>{if(!l){if(Qb.includes(r)){i(!0);return}h1(r).then(()=>{i(!0)}).catch(()=>{i(!1)})}},[r,l]),{ready:l,actualLang:l?r:"text"}}function Qa(e){return e&&e.split(".").pop()?.toLowerCase()||null}function SE(e){return e&&e.split("/").pop()||""}const kE={js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",tsx:"typescript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",cpp:"cpp",c:"c",cs:"csharp",php:"php",swift:"swift",kt:"kotlin",scala:"scala",r:"r",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",yml:"yaml",yaml:"yaml",json:"json",xml:"xml",html:"html",css:"css",scss:"scss",sass:"sass",less:"less",md:"markdown",markdown:"markdown",tex:"latex",vim:"vim"},EE={ts:"typescript",tsx:"tsx",mts:"typescript",cts:"typescript",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",json:"json",css:"css",scss:"css",html:"html",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",yml:"yaml",yaml:"yaml",md:"markdown",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",cpp:"cpp",c:"c",php:"php",sql:"sql",xml:"xml",swift:"swift",kt:"kotlin",scala:"scala",svelte:"svelte",r:"r",lua:"lua",perl:"perl",pl:"perl",pm:"perl",dockerfile:"docker",makefile:"makefile",gitignore:"git",env:"bash",conf:"nginx",ini:"ini",toml:"toml",sol:"solidity",vim:"vim",dart:"dart",cs:"csharp",proto:"protobuf",tf:"hcl",tfvars:"hcl",hcl:"hcl"},CE={dockerfile:"docker",makefile:"makefile",".gitignore":"git",".env":"bash",".bashrc":"bash",".zshrc":"bash",".bash_profile":"bash",".profile":"bash"};function p1(e,r){if(e)return r[e.toLowerCase()]}function NE(e){return p1(Qa(e),kE)}function AE(e){const r=SE(e).toLowerCase(),l=CE[r];return l||p1(Qa(e),EE)||"text"}function TE(e){return{...e,styles:e.styles.map(r=>({...r,style:{...r.style,background:void 0,backgroundColor:void 0}}))}}function jE(e){let r;switch(e){case"github":r=vn.github;break;case"vsLight":r=vn.vsLight;break;case"oneLight":r=vn.oneLight;break;case"gruvboxMaterialLight":r=vn.gruvboxMaterialLight;break;case"nightOwlLight":r=vn.nightOwlLight;break;case"vsDark":r=vn.vsDark;break;case"oneDark":r=vn.oneDark;break;case"gruvboxMaterialDark":r=vn.gruvboxMaterialDark;break;case"nightOwl":r=vn.nightOwl;break;case"dracula":r=vn.dracula;break;case"okaidia":r=vn.okaidia;break;default:r=vn.vsDark}return TE(r)}const dh=Jt.memo(function({code:r,language:l,className:i,syntaxTheme:s="vsDark",filename:u="",renderToken:c,onMouseOver:f,onMouseOut:h}){const p=l||(u?AE(u):"text"),{actualLang:m}=wE(r,p),b=jE(s),v=T.useCallback(({style:x,tokens:S,getLineProps:w,getTokenProps:N})=>y.jsx("span",{className:i,style:{...x,background:"transparent",backgroundColor:"transparent"},onMouseOver:f,onMouseOut:h,children:S.map((E,C)=>y.jsx("span",{...w({line:E}),children:E.map((j,z)=>c?c(j,z,N):y.jsx("span",{...N({token:j})},z))},C))}),[i,f,h,c]);return y.jsx(yE,{code:r,language:m,theme:b,prism:ue,children:v})}),$a=Jt.memo(function(r){const{handleMouseOver:l,handleMouseOut:i,isWordHighlighted:s}=pk(),u=T.useCallback((c,f,h)=>{const p=h({token:c}),m=c.content.split(/( +)/);if(m.length===1&&m[0]&&!$b(m[0]))return y.jsx("span",{...p},f);const b=m.map((v,x)=>{if(!v)return null;if($b(v)){const S=v.trim(),w=s(S);return y.jsx("span",{className:`word-token ${w?"word-highlight":""}`,"data-word":S,children:v},`${f}-${x}`)}return y.jsx("span",{children:v},`${f}-${x}`)});return y.jsx("span",{...p,children:b},f)},[s]);return y.jsx(dh,{...r,renderToken:u,onMouseOver:l,onMouseOut:i})}),kd=Jt.memo(function({segments:r,className:l=""}){const i=T.useMemo(()=>r.map((s,u)=>{const c=s.type==="added"?"word-diff-added":s.type==="removed"?"word-diff-removed":"";return y.jsx("span",{className:c,children:s.value},u)}),[r]);return y.jsx("span",{className:l,children:i})}),RE=e=>{switch(e){case"add":return"+";case"delete":return"-";default:return" "}},_E=e=>{switch(e){case"add":return"text-github-accent bg-diff-addition-bg";case"delete":return"text-github-danger bg-diff-deletion-bg";default:return"text-github-text-muted bg-github-bg-secondary"}};function g1({line:e,syntaxTheme:r,filename:l,diffSegments:i,showPrefixBorder:s=!0}){return y.jsxs("div",{className:"flex items-center relative min-h-[16px]",children:[y.jsx("span",{className:`w-5 text-center flex-shrink-0 ${s?"border-r border-github-border":""} ${_E(e.type)}`,children:RE(e.type)}),i?y.jsx(kd,{segments:i,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx($a,{code:e.content,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit",syntaxTheme:r,filename:l})]})}const LE=e=>e==="add"?"bg-diff-addition-bg":"bg-diff-deletion-bg",DE=(e,r)=>({type:e,content:r});function Kb({code:e,type:r,filename:l,keyPrefix:i,syntaxTheme:s}){return y.jsx(y.Fragment,{children:e.split(`
|
|
15
|
+
`).map((u,c)=>y.jsx("div",{className:LE(r),children:y.jsx(g1,{line:DE(r,u),filename:l,syntaxTheme:s,showPrefixBorder:!1})},`${i}-${c}`))})}function m1(e){return l1(e)}function Ed({body:e,originalCode:r,filename:l,syntaxTheme:i}){const s=T.useMemo(()=>{const u=i1(e);if(u.length===0)return[{type:"text",content:e}];const c=[];let f=0;for(const h of u)h.startIndex>f&&c.push({type:"text",content:e.slice(f,h.startIndex)}),c.push({type:"suggestion",code:h.suggestedCode,original:r||""}),f=h.endIndex;return f<e.length&&c.push({type:"text",content:e.slice(f)}),c},[e,r]);return y.jsx("div",{className:"text-github-text-primary text-sm leading-6",children:s.map((u,c)=>u.type==="text"?y.jsx("span",{className:"whitespace-pre-wrap",children:u.content},c):y.jsx("div",{className:"my-2 border border-github-border rounded-md overflow-hidden",children:y.jsxs("div",{className:"font-mono text-sm",children:[u.original&&y.jsx(Kb,{code:u.original,type:"delete",filename:l,keyPrefix:`orig-${c}`,syntaxTheme:i}),y.jsx(Kb,{code:u.code,type:"add",filename:l,keyPrefix:`sugg-${c}`,syntaxTheme:i})]})},c))})}const OE="text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all flex items-center gap-1";function b1({selectedCode:e,value:r,onChange:l,textareaRef:i,className:s=OE}){if(!e)return null;const u=()=>{const c=sk(e),f=i?.current;if(!f){l(`${r}${r?`
|
|
16
|
+
|
|
17
|
+
`:""}${c}
|
|
18
|
+
|
|
19
|
+
`);return}const h=f.selectionStart,p=f.selectionEnd,m=r.slice(0,h),b=r.slice(p),x=`${m?`
|
|
20
|
+
|
|
21
|
+
`:""}${c}
|
|
22
|
+
|
|
23
|
+
`,S=m+x+b;l(S);const w=m.length+x.length;requestAnimationFrame(()=>{f.focus(),f.setSelectionRange(w,w)})};return y.jsxs("button",{type:"button",onClick:u,className:s,title:"Add code suggestion",children:[y.jsx(b2,{size:12}),"Add suggestion"]})}function hh({comment:e,onGeneratePrompt:r,onRemoveComment:l,onUpdateComment:i,onClick:s,syntaxTheme:u}){const[c,f]=T.useState(!1),[h,p]=T.useState(!1),[m,b]=T.useState(e.body),[v,x]=T.useState("edit"),S=T.useRef(null),w=m1(m),N=w?v:"edit",E=async O=>{O.stopPropagation();try{const H=r(e);await navigator.clipboard.writeText(H),f(!0),setTimeout(()=>f(!1),2e3)}catch(H){console.error("Failed to copy prompt:",H)}},C=O=>{O.stopPropagation(),p(!0),x("edit"),b(e.body)},j=()=>{p(!1),x("edit"),b(e.body)},z=O=>{O?.stopPropagation(),m.trim()!==e.body&&i(e.id,m.trim()),p(!1),x("edit")},U=O=>{O.stopPropagation(),l(e.id)},L=O=>{O.key==="Enter"&&(O.metaKey||O.ctrlKey)?(O.preventDefault(),z()):O.key==="Escape"&&(O.preventDefault(),j())};return lt("escape",()=>{h&&j()},{enableOnFormTags:["textarea"],enabled:h},[h]),lt("mod+enter",()=>{h&&z()},{enableOnFormTags:["textarea"],enabled:h},[h,m,e.body]),y.jsxs("div",{id:`comment-${e.id}`,className:`p-3 bg-github-bg-tertiary border border-yellow-600/50 rounded-md border-l-4 border-l-yellow-400 shadow-sm transition-all ${s?"hover:shadow-md cursor-pointer":""}`,onClick:s,children:[y.jsxs("div",{className:"flex items-center justify-between mb-2 gap-3",children:[y.jsx("div",{className:"flex items-center gap-2 text-xs text-github-text-secondary flex-1 min-w-0",children:y.jsxs("span",{className:"font-mono px-1 py-0.5 rounded overflow-hidden text-ellipsis whitespace-nowrap",style:{backgroundColor:"var(--color-yellow-path-bg)",color:"var(--color-yellow-path-text)"},children:[e.file,":",Array.isArray(e.line)?`${e.line[0]}-${e.line[1]}`:e.line]})}),y.jsx("div",{className:"flex items-center gap-2",children:h?w?y.jsxs("div",{className:"flex items-center bg-github-bg-tertiary border border-github-border rounded p-0.5",onClick:O=>O.stopPropagation(),children:[y.jsx("button",{type:"button",onClick:()=>x("edit"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${N==="edit"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:"Edit"}),y.jsx("button",{type:"button",onClick:()=>x("preview"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${N==="preview"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:"Preview"})]}):y.jsx("div",{onClick:O=>O.stopPropagation(),children:y.jsx(b1,{selectedCode:e.codeContent,value:m,onChange:b,textareaRef:S})}):y.jsxs(y.Fragment,{children:[y.jsx("button",{onClick:E,className:"text-xs px-2 py-1 rounded transition-all whitespace-nowrap",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:O=>{O.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",O.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:O=>{O.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",O.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:"Copy prompt for AI coding agent",children:c?"Copied!":"Copy Prompt"}),y.jsx("button",{onClick:C,className:"text-xs p-1.5 bg-github-bg-tertiary text-github-text-secondary border border-github-border rounded hover:text-github-text-primary hover:bg-github-bg-primary transition-all",title:"Edit",children:y.jsx(X2,{size:12})}),y.jsx("button",{onClick:U,className:"text-xs p-1.5 bg-github-bg-tertiary text-green-600 border border-github-border rounded hover:bg-green-500/10 hover:border-green-600 transition-all",title:"Resolve",children:y.jsx(Pa,{size:12})})]})})]}),h?y.jsxs("div",{children:[w&&N==="preview"?y.jsx(Ed,{body:m,originalCode:e.codeContent,filename:e.file,syntaxTheme:u}):y.jsx(y.Fragment,{children:y.jsx("textarea",{ref:S,value:m,onChange:O=>b(O.target.value),className:"w-full text-github-text-primary text-sm leading-6 bg-github-bg-secondary border border-github-border rounded px-2 py-1 resize-none focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600/30",rows:Math.max(2,m.split(`
|
|
24
|
+
`).length),placeholder:"Edit your comment...",autoFocus:!0,onClick:O=>O.stopPropagation(),onKeyDown:O=>{O.stopPropagation(),L(O)}})}),y.jsxs("div",{className:"flex gap-2 justify-end mt-2",children:[y.jsx("button",{type:"button",onClick:j,className:"text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all",children:"Cancel"}),y.jsx("button",{type:"button",onClick:z,className:"text-xs px-3 py-1.5 rounded transition-all disabled:opacity-50",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:O=>{O.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",O.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:O=>{O.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",O.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},disabled:!m.trim(),children:"Submit"})]})]}):y.jsx(Ed,{body:e.body,originalCode:e.codeContent,filename:e.file,syntaxTheme:u})]})}function ME({isOpen:e,onClose:r,onNavigate:l,comments:i,onRemoveComment:s,onGeneratePrompt:u,onUpdateComment:c,syntaxTheme:f}){const[h,p]=T.useState(0),m=T.useRef([]),{enableScope:b,disableScope:v}=Xa(),x=[...i].sort((E,C)=>{const j=E.file.localeCompare(C.file);if(j!==0)return j;const z=Array.isArray(E.line)?E.line[0]:E.line,U=Array.isArray(C.line)?C.line[0]:C.line;return z-U}),S=T.useCallback(E=>{l(E),r()},[l,r]),w=T.useCallback(E=>{confirm(`Delete this comment?
|
|
25
|
+
|
|
26
|
+
"${E.body}"`)&&(s(E.id),h>=x.length-1&&h>0&&p(h-1))},[s,h,x.length]);T.useEffect(()=>(e?(b("comments-list"),v("navigation")):(b("navigation"),v("comments-list"),p(0)),()=>{b("navigation"),v("comments-list")}),[e,b,v]);const N={scopes:"comments-list",enableOnFormTags:!1};return lt("escape",()=>r(),N,[r]),lt("j, down",()=>p(E=>Math.min(E+1,x.length-1)),N,[x.length]),lt("k, up",()=>p(E=>Math.max(E-1,0)),N,[]),lt("enter",()=>{x[h]&&S(x[h])},N,[h,x,S]),lt("d",()=>{x[h]&&w(x[h])},N,[h,x,w]),T.useEffect(()=>{m.current[h]&&m.current[h]?.scrollIntoView({behavior:"smooth",block:"nearest"})},[h]),e?y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:r}),y.jsxs("div",{className:"relative bg-github-bg-primary border border-github-border rounded-lg shadow-lg max-w-4xl w-full max-h-[80vh] overflow-hidden",children:[y.jsxs("div",{className:"sticky top-0 bg-github-bg-primary border-b border-github-border px-6 py-4",children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"All Comments"}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary transition-colors","aria-label":"Close comments list",children:y.jsx(au,{size:20})})]}),y.jsxs("div",{className:"text-xs text-github-text-secondary",children:[y.jsx("span",{className:"font-mono",children:"j/k"})," or ",y.jsx("span",{className:"font-mono",children:"↑/↓"})," to navigate • ",y.jsx("span",{className:"font-mono",children:"Enter"})," to jump •"," ",y.jsx("span",{className:"font-mono",children:"d"})," to delete • ",y.jsx("span",{className:"font-mono",children:"Esc"})," ","to close"]})]}),y.jsx("div",{className:"overflow-y-auto max-h-[calc(80vh-120px)]",children:y.jsx("div",{className:"p-6",children:x.length===0?y.jsx("p",{className:"text-github-text-secondary text-center",children:"No comments yet"}):y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"space-y-2",children:x.map((E,C)=>y.jsx("div",{ref:j=>{m.current[C]=j},className:`${h===C?"ring-2 ring-blue-500 rounded":""}`,children:y.jsx(hh,{comment:E,onGeneratePrompt:u,onRemoveComment:s,onUpdateComment:c,syntaxTheme:f,onClick:j=>{j.stopPropagation(),p(C),S(E)}})},E.id))}),x.length>0&&y.jsxs("div",{className:"mt-4 pt-4 border-t border-github-border text-xs text-github-text-secondary text-center",children:[h+1," of ",x.length," comments"]})]})})})]})]}):null}function uu(){return typeof window<"u"}function sl(e){return ph(e)?(e.nodeName||"").toLowerCase():"#document"}function cn(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function er(e){var r;return(r=(ph(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function ph(e){return uu()?e instanceof Node||e instanceof cn(e).Node:!1}function ct(e){return uu()?e instanceof Element||e instanceof cn(e).Element:!1}function At(e){return uu()?e instanceof HTMLElement||e instanceof cn(e).HTMLElement:!1}function Bs(e){return!uu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof cn(e).ShadowRoot}const zE=new Set(["inline","contents"]);function Ka(e){const{overflow:r,overflowX:l,overflowY:i,display:s}=Bn(e);return/auto|scroll|overlay|hidden|clip/.test(r+i+l)&&!zE.has(s)}const BE=new Set(["table","td","th"]);function FE(e){return BE.has(sl(e))}const IE=[":popover-open",":modal"];function cu(e){return IE.some(r=>{try{return e.matches(r)}catch{return!1}})}const UE=["transform","translate","scale","rotate","perspective"],HE=["transform","translate","scale","rotate","perspective","filter"],qE=["paint","layout","strict","content"];function gh(e){const r=fu(),l=ct(e)?Bn(e):e;return UE.some(i=>l[i]?l[i]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!r&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!r&&(l.filter?l.filter!=="none":!1)||HE.some(i=>(l.willChange||"").includes(i))||qE.some(i=>(l.contain||"").includes(i))}function PE(e){let r=Cr(e);for(;At(r)&&!Er(r);){if(gh(r))return r;if(cu(r))return null;r=Cr(r)}return null}function fu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const $E=new Set(["html","body","#document"]);function Er(e){return $E.has(sl(e))}function Bn(e){return cn(e).getComputedStyle(e)}function du(e){return ct(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Cr(e){if(sl(e)==="html")return e;const r=e.assignedSlot||e.parentNode||Bs(e)&&e.host||er(e);return Bs(r)?r.host:r}function y1(e){const r=Cr(e);return Er(r)?e.ownerDocument?e.ownerDocument.body:e.body:At(r)&&Ka(r)?r:y1(r)}function ol(e,r,l){var i;r===void 0&&(r=[]),l===void 0&&(l=!0);const s=y1(e),u=s===((i=e.ownerDocument)==null?void 0:i.body),c=cn(s);if(u){const f=Cd(c);return r.concat(c,c.visualViewport||[],Ka(s)?s:[],f&&l?ol(f):[])}return r.concat(s,ol(s,[],l))}function Cd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Fs=Math.min,Rl=Math.max,Is=Math.round,Ss=Math.floor,Wn=e=>({x:e,y:e}),VE={left:"right",right:"left",bottom:"top",top:"bottom"},GE={start:"end",end:"start"};function Jb(e,r,l){return Rl(e,Fs(r,l))}function hu(e,r){return typeof e=="function"?e(r):e}function _l(e){return e.split("-")[0]}function pu(e){return e.split("-")[1]}function x1(e){return e==="x"?"y":"x"}function v1(e){return e==="y"?"height":"width"}const YE=new Set(["top","bottom"]);function ll(e){return YE.has(_l(e))?"y":"x"}function w1(e){return x1(ll(e))}function XE(e,r,l){l===void 0&&(l=!1);const i=pu(e),s=w1(e),u=v1(s);let c=s==="x"?i===(l?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[u]>r.floating[u]&&(c=Us(c)),[c,Us(c)]}function ZE(e){const r=Us(e);return[Nd(e),r,Nd(r)]}function Nd(e){return e.replace(/start|end/g,r=>GE[r])}const Wb=["left","right"],ey=["right","left"],QE=["top","bottom"],KE=["bottom","top"];function JE(e,r,l){switch(e){case"top":case"bottom":return l?r?ey:Wb:r?Wb:ey;case"left":case"right":return r?QE:KE;default:return[]}}function WE(e,r,l,i){const s=pu(e);let u=JE(_l(e),l==="start",i);return s&&(u=u.map(c=>c+"-"+s),r&&(u=u.concat(u.map(Nd)))),u}function Us(e){return e.replace(/left|right|bottom|top/g,r=>VE[r])}function eC(e){return{top:0,right:0,bottom:0,left:0,...e}}function tC(e){return typeof e!="number"?eC(e):{top:e,right:e,bottom:e,left:e}}function Hs(e){const{x:r,y:l,width:i,height:s}=e;return{width:i,height:s,top:l,left:r,right:r+i,bottom:l+s,x:r,y:l}}var nC=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],qs=nC.join(","),S1=typeof Element>"u",ji=S1?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ps=!S1&&Element.prototype.getRootNode?function(e){var r;return e==null||(r=e.getRootNode)===null||r===void 0?void 0:r.call(e)}:function(e){return e?.ownerDocument},$s=function(r,l){var i;l===void 0&&(l=!0);var s=r==null||(i=r.getAttribute)===null||i===void 0?void 0:i.call(r,"inert"),u=s===""||s==="true",c=u||l&&r&&(typeof r.closest=="function"?r.closest("[inert]"):$s(r.parentNode));return c},rC=function(r){var l,i=r==null||(l=r.getAttribute)===null||l===void 0?void 0:l.call(r,"contenteditable");return i===""||i==="true"},k1=function(r,l,i){if($s(r))return[];var s=Array.prototype.slice.apply(r.querySelectorAll(qs));return l&&ji.call(r,qs)&&s.unshift(r),s=s.filter(i),s},Vs=function(r,l,i){for(var s=[],u=Array.from(r);u.length;){var c=u.shift();if(!$s(c,!1))if(c.tagName==="SLOT"){var f=c.assignedElements(),h=f.length?f:c.children,p=Vs(h,!0,i);i.flatten?s.push.apply(s,p):s.push({scopeParent:c,candidates:p})}else{var m=ji.call(c,qs);m&&i.filter(c)&&(l||!r.includes(c))&&s.push(c);var b=c.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(c),v=!$s(b,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(c));if(b&&v){var x=Vs(b===!0?c.children:b.children,!0,i);i.flatten?s.push.apply(s,x):s.push({scopeParent:c,candidates:x})}else u.unshift.apply(u,c.children)}}return s},E1=function(r){return!isNaN(parseInt(r.getAttribute("tabindex"),10))},C1=function(r){if(!r)throw new Error("No node provided");return r.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(r.tagName)||rC(r))&&!E1(r)?0:r.tabIndex},lC=function(r,l){var i=C1(r);return i<0&&l&&!E1(r)?0:i},iC=function(r,l){return r.tabIndex===l.tabIndex?r.documentOrder-l.documentOrder:r.tabIndex-l.tabIndex},N1=function(r){return r.tagName==="INPUT"},aC=function(r){return N1(r)&&r.type==="hidden"},oC=function(r){var l=r.tagName==="DETAILS"&&Array.prototype.slice.apply(r.children).some(function(i){return i.tagName==="SUMMARY"});return l},sC=function(r,l){for(var i=0;i<r.length;i++)if(r[i].checked&&r[i].form===l)return r[i]},uC=function(r){if(!r.name)return!0;var l=r.form||Ps(r),i=function(f){return l.querySelectorAll('input[type="radio"][name="'+f+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=i(window.CSS.escape(r.name));else try{s=i(r.name)}catch(c){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",c.message),!1}var u=sC(s,r.form);return!u||u===r},cC=function(r){return N1(r)&&r.type==="radio"},fC=function(r){return cC(r)&&!uC(r)},dC=function(r){var l,i=r&&Ps(r),s=(l=i)===null||l===void 0?void 0:l.host,u=!1;if(i&&i!==r){var c,f,h;for(u=!!((c=s)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(s)||r!=null&&(h=r.ownerDocument)!==null&&h!==void 0&&h.contains(r));!u&&s;){var p,m,b;i=Ps(s),s=(p=i)===null||p===void 0?void 0:p.host,u=!!((m=s)!==null&&m!==void 0&&(b=m.ownerDocument)!==null&&b!==void 0&&b.contains(s))}}return u},ty=function(r){var l=r.getBoundingClientRect(),i=l.width,s=l.height;return i===0&&s===0},hC=function(r,l){var i=l.displayCheck,s=l.getShadowRoot;if(i==="full-native"&&"checkVisibility"in r){var u=r.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!u}if(getComputedStyle(r).visibility==="hidden")return!0;var c=ji.call(r,"details>summary:first-of-type"),f=c?r.parentElement:r;if(ji.call(f,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="full-native"||i==="legacy-full"){if(typeof s=="function"){for(var h=r;r;){var p=r.parentElement,m=Ps(r);if(p&&!p.shadowRoot&&s(p)===!0)return ty(r);r.assignedSlot?r=r.assignedSlot:!p&&m!==r.ownerDocument?r=m.host:r=p}r=h}if(dC(r))return!r.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return ty(r);return!1},pC=function(r){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(r.tagName))for(var l=r.parentElement;l;){if(l.tagName==="FIELDSET"&&l.disabled){for(var i=0;i<l.children.length;i++){var s=l.children.item(i);if(s.tagName==="LEGEND")return ji.call(l,"fieldset[disabled] *")?!0:!s.contains(r)}return!0}l=l.parentElement}return!1},Ad=function(r,l){return!(l.disabled||aC(l)||hC(l,r)||oC(l)||pC(l))},Td=function(r,l){return!(fC(l)||C1(l)<0||!Ad(r,l))},gC=function(r){var l=parseInt(r.getAttribute("tabindex"),10);return!!(isNaN(l)||l>=0)},A1=function(r){var l=[],i=[];return r.forEach(function(s,u){var c=!!s.scopeParent,f=c?s.scopeParent:s,h=lC(f,c),p=c?A1(s.candidates):f;h===0?c?l.push.apply(l,p):l.push(f):i.push({documentOrder:u,tabIndex:h,item:s,isScope:c,content:p})}),i.sort(iC).reduce(function(s,u){return u.isScope?s.push.apply(s,u.content):s.push(u.content),s},[]).concat(l)},gu=function(r,l){l=l||{};var i;return l.getShadowRoot?i=Vs([r],l.includeContainer,{filter:Td.bind(null,l),flatten:!1,getShadowRoot:l.getShadowRoot,shadowRootFilter:gC}):i=k1(r,l.includeContainer,Td.bind(null,l)),A1(i)},mC=function(r,l){l=l||{};var i;return l.getShadowRoot?i=Vs([r],l.includeContainer,{filter:Ad.bind(null,l),flatten:!0,getShadowRoot:l.getShadowRoot}):i=k1(r,l.includeContainer,Ad.bind(null,l)),i},T1=function(r,l){if(l=l||{},!r)throw new Error("No node provided");return ji.call(r,qs)===!1?!1:Td(l,r)};function j1(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function R1(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(r=>{let{brand:l,version:i}=r;return l+"/"+i}).join(" "):navigator.userAgent}function _1(){return/apple/i.test(navigator.vendor)}function jd(){const e=/android/i;return e.test(j1())||e.test(R1())}function bC(){return j1().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function L1(){return R1().includes("jsdom/")}const ny="data-floating-ui-focusable",yC="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function rl(e){let r=e.activeElement;for(;((l=r)==null||(l=l.shadowRoot)==null?void 0:l.activeElement)!=null;){var l;r=r.shadowRoot.activeElement}return r}function qt(e,r){if(!e||!r)return!1;const l=r.getRootNode==null?void 0:r.getRootNode();if(e.contains(r))return!0;if(l&&Bs(l)){let i=r;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Sr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Uf(e,r){if(r==null)return!1;if("composedPath"in e)return e.composedPath().includes(r);const l=e;return l.target!=null&&r.contains(l.target)}function xC(e){return e.matches("html,body")}function Pt(e){return e?.ownerDocument||document}function mh(e){return At(e)&&e.matches(yC)}function ry(e){return e?e.getAttribute("role")==="combobox"&&mh(e):!1}function vC(e){if(!e||L1())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Rd(e){return e?e.hasAttribute(ny)?e:e.querySelector("["+ny+"]")||e:null}function Ei(e,r,l){return l===void 0&&(l=!0),e.filter(s=>{var u;return s.parentId===r&&(!l||((u=s.context)==null?void 0:u.open))}).flatMap(s=>[s,...Ei(e,s.id,l)])}function ly(e,r){var l;let i=[],s=(l=e.find(u=>u.id===r))==null?void 0:l.parentId;for(;s;){const u=e.find(c=>c.id===s);s=u?.parentId,u&&(i=i.concat(u))}return i}function Hf(e){e.preventDefault(),e.stopPropagation()}function wC(e){return"nativeEvent"in e}function SC(e){return e.mozInputSource===0&&e.isTrusted?!0:jd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function kC(e){return L1()?!1:!jd()&&e.width===0&&e.height===0||jd()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Va(e,r){const l=["mouse","pen"];return r||l.push("",void 0),l.includes(e)}var EC=typeof document<"u",CC=function(){},un=EC?T.useLayoutEffect:CC;const NC={...Ux};function jl(e){const r=T.useRef(e);return un(()=>{r.current=e}),r}const AC=NC.useInsertionEffect,TC=AC||(e=>e());function sn(e){const r=T.useRef(()=>{});return TC(()=>{r.current=e}),T.useCallback(function(){for(var l=arguments.length,i=new Array(l),s=0;s<l;s++)i[s]=arguments[s];return r.current==null?void 0:r.current(...i)},[])}const Ja=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function D1(e,r){const l=gu(e,Ja()),i=l.length;if(i===0)return;const s=rl(Pt(e)),u=l.indexOf(s),c=u===-1?r===1?0:i-1:u+r;return l[c]}function O1(e){return D1(Pt(e).body,1)||e}function M1(e){return D1(Pt(e).body,-1)||e}function Ba(e,r){const l=r||e.currentTarget,i=e.relatedTarget;return!i||!qt(l,i)}function jC(e){gu(e,Ja()).forEach(l=>{l.dataset.tabindex=l.getAttribute("tabindex")||"",l.setAttribute("tabindex","-1")})}function iy(e){e.querySelectorAll("[data-tabindex]").forEach(l=>{const i=l.dataset.tabindex;delete l.dataset.tabindex,i?l.setAttribute("tabindex",i):l.removeAttribute("tabindex")})}var z1=Hx();function ay(e,r,l){let{reference:i,floating:s}=e;const u=ll(r),c=w1(r),f=v1(c),h=_l(r),p=u==="y",m=i.x+i.width/2-s.width/2,b=i.y+i.height/2-s.height/2,v=i[f]/2-s[f]/2;let x;switch(h){case"top":x={x:m,y:i.y-s.height};break;case"bottom":x={x:m,y:i.y+i.height};break;case"right":x={x:i.x+i.width,y:b};break;case"left":x={x:i.x-s.width,y:b};break;default:x={x:i.x,y:i.y}}switch(pu(r)){case"start":x[c]-=v*(l&&p?-1:1);break;case"end":x[c]+=v*(l&&p?-1:1);break}return x}async function RC(e,r){var l;r===void 0&&(r={});const{x:i,y:s,platform:u,rects:c,elements:f,strategy:h}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:b="floating",altBoundary:v=!1,padding:x=0}=hu(r,e),S=tC(x),N=f[v?b==="floating"?"reference":"floating":b],E=Hs(await u.getClippingRect({element:(l=await(u.isElement==null?void 0:u.isElement(N)))==null||l?N:N.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(f.floating)),boundary:p,rootBoundary:m,strategy:h})),C=b==="floating"?{x:i,y:s,width:c.floating.width,height:c.floating.height}:c.reference,j=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f.floating)),z=await(u.isElement==null?void 0:u.isElement(j))?await(u.getScale==null?void 0:u.getScale(j))||{x:1,y:1}:{x:1,y:1},U=Hs(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:C,offsetParent:j,strategy:h}):C);return{top:(E.top-U.top+S.top)/z.y,bottom:(U.bottom-E.bottom+S.bottom)/z.y,left:(E.left-U.left+S.left)/z.x,right:(U.right-E.right+S.right)/z.x}}const _C=async(e,r,l)=>{const{placement:i="bottom",strategy:s="absolute",middleware:u=[],platform:c}=l,f=u.filter(Boolean),h=await(c.isRTL==null?void 0:c.isRTL(r));let p=await c.getElementRects({reference:e,floating:r,strategy:s}),{x:m,y:b}=ay(p,i,h),v=i,x={},S=0;for(let N=0;N<f.length;N++){var w;const{name:E,fn:C}=f[N],{x:j,y:z,data:U,reset:L}=await C({x:m,y:b,initialPlacement:i,placement:v,strategy:s,middlewareData:x,rects:p,platform:{...c,detectOverflow:(w=c.detectOverflow)!=null?w:RC},elements:{reference:e,floating:r}});m=j??m,b=z??b,x={...x,[E]:{...x[E],...U}},L&&S<=50&&(S++,typeof L=="object"&&(L.placement&&(v=L.placement),L.rects&&(p=L.rects===!0?await c.getElementRects({reference:e,floating:r,strategy:s}):L.rects),{x:m,y:b}=ay(p,v,h)),N=-1)}return{x:m,y:b,placement:v,strategy:s,middlewareData:x}},LC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var l,i;const{placement:s,middlewareData:u,rects:c,initialPlacement:f,platform:h,elements:p}=r,{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0,...N}=hu(e,r);if((l=u.arrow)!=null&&l.alignmentOffset)return{};const E=_l(s),C=ll(f),j=_l(f)===f,z=await(h.isRTL==null?void 0:h.isRTL(p.floating)),U=v||(j||!w?[Us(f)]:ZE(f)),L=S!=="none";!v&&L&&U.push(...WE(f,w,S,z));const O=[f,...U],H=await h.detectOverflow(r,N),Y=[];let B=((i=u.flip)==null?void 0:i.overflows)||[];if(m&&Y.push(H[E]),b){const I=XE(s,c,z);Y.push(H[I[0]],H[I[1]])}if(B=[...B,{placement:s,overflows:Y}],!Y.every(I=>I<=0)){var $,G;const I=((($=u.flip)==null?void 0:$.index)||0)+1,Z=O[I];if(Z&&(!(b==="alignment"?C!==ll(Z):!1)||B.every(M=>ll(M.placement)===C?M.overflows[0]>0:!0)))return{data:{index:I,overflows:B},reset:{placement:Z}};let F=(G=B.filter(X=>X.overflows[0]<=0).sort((X,M)=>X.overflows[1]-M.overflows[1])[0])==null?void 0:G.placement;if(!F)switch(x){case"bestFit":{var J;const X=(J=B.filter(M=>{if(L){const V=ll(M.placement);return V===C||V==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(V=>V>0).reduce((V,R)=>V+R,0)]).sort((M,V)=>M[1]-V[1])[0])==null?void 0:J[0];X&&(F=X);break}case"initialPlacement":F=f;break}if(s!==F)return{reset:{placement:F}}}return{}}}},DC=new Set(["left","top"]);async function OC(e,r){const{placement:l,platform:i,elements:s}=e,u=await(i.isRTL==null?void 0:i.isRTL(s.floating)),c=_l(l),f=pu(l),h=ll(l)==="y",p=DC.has(c)?-1:1,m=u&&h?-1:1,b=hu(r,e);let{mainAxis:v,crossAxis:x,alignmentAxis:S}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return f&&typeof S=="number"&&(x=f==="end"?S*-1:S),h?{x:x*m,y:v*p}:{x:v*p,y:x*m}}const MC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var l,i;const{x:s,y:u,placement:c,middlewareData:f}=r,h=await OC(r,e);return c===((l=f.offset)==null?void 0:l.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:s+h.x,y:u+h.y,data:{...h,placement:c}}}}},zC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:l,y:i,placement:s,platform:u}=r,{mainAxis:c=!0,crossAxis:f=!1,limiter:h={fn:E=>{let{x:C,y:j}=E;return{x:C,y:j}}},...p}=hu(e,r),m={x:l,y:i},b=await u.detectOverflow(r,p),v=ll(_l(s)),x=x1(v);let S=m[x],w=m[v];if(c){const E=x==="y"?"top":"left",C=x==="y"?"bottom":"right",j=S+b[E],z=S-b[C];S=Jb(j,S,z)}if(f){const E=v==="y"?"top":"left",C=v==="y"?"bottom":"right",j=w+b[E],z=w-b[C];w=Jb(j,w,z)}const N=h.fn({...r,[x]:S,[v]:w});return{...N,data:{x:N.x-l,y:N.y-i,enabled:{[x]:c,[v]:f}}}}}};function B1(e){const r=Bn(e);let l=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const s=At(e),u=s?e.offsetWidth:l,c=s?e.offsetHeight:i,f=Is(l)!==u||Is(i)!==c;return f&&(l=u,i=c),{width:l,height:i,$:f}}function bh(e){return ct(e)?e:e.contextElement}function Ci(e){const r=bh(e);if(!At(r))return Wn(1);const l=r.getBoundingClientRect(),{width:i,height:s,$:u}=B1(r);let c=(u?Is(l.width):l.width)/i,f=(u?Is(l.height):l.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const BC=Wn(0);function F1(e){const r=cn(e);return!fu()||!r.visualViewport?BC:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function FC(e,r,l){return r===void 0&&(r=!1),!l||r&&l!==cn(e)?!1:r}function Ll(e,r,l,i){r===void 0&&(r=!1),l===void 0&&(l=!1);const s=e.getBoundingClientRect(),u=bh(e);let c=Wn(1);r&&(i?ct(i)&&(c=Ci(i)):c=Ci(e));const f=FC(u,l,i)?F1(u):Wn(0);let h=(s.left+f.x)/c.x,p=(s.top+f.y)/c.y,m=s.width/c.x,b=s.height/c.y;if(u){const v=cn(u),x=i&&ct(i)?cn(i):i;let S=v,w=Cd(S);for(;w&&i&&x!==S;){const N=Ci(w),E=w.getBoundingClientRect(),C=Bn(w),j=E.left+(w.clientLeft+parseFloat(C.paddingLeft))*N.x,z=E.top+(w.clientTop+parseFloat(C.paddingTop))*N.y;h*=N.x,p*=N.y,m*=N.x,b*=N.y,h+=j,p+=z,S=cn(w),w=Cd(S)}}return Hs({width:m,height:b,x:h,y:p})}function mu(e,r){const l=du(e).scrollLeft;return r?r.left+l:Ll(er(e)).left+l}function I1(e,r){const l=e.getBoundingClientRect(),i=l.left+r.scrollLeft-mu(e,l),s=l.top+r.scrollTop;return{x:i,y:s}}function IC(e){let{elements:r,rect:l,offsetParent:i,strategy:s}=e;const u=s==="fixed",c=er(i),f=r?cu(r.floating):!1;if(i===c||f&&u)return l;let h={scrollLeft:0,scrollTop:0},p=Wn(1);const m=Wn(0),b=At(i);if((b||!b&&!u)&&((sl(i)!=="body"||Ka(c))&&(h=du(i)),At(i))){const x=Ll(i);p=Ci(i),m.x=x.x+i.clientLeft,m.y=x.y+i.clientTop}const v=c&&!b&&!u?I1(c,h):Wn(0);return{width:l.width*p.x,height:l.height*p.y,x:l.x*p.x-h.scrollLeft*p.x+m.x+v.x,y:l.y*p.y-h.scrollTop*p.y+m.y+v.y}}function UC(e){return Array.from(e.getClientRects())}function HC(e){const r=er(e),l=du(e),i=e.ownerDocument.body,s=Rl(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),u=Rl(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let c=-l.scrollLeft+mu(e);const f=-l.scrollTop;return Bn(i).direction==="rtl"&&(c+=Rl(r.clientWidth,i.clientWidth)-s),{width:s,height:u,x:c,y:f}}const oy=25;function qC(e,r){const l=cn(e),i=er(e),s=l.visualViewport;let u=i.clientWidth,c=i.clientHeight,f=0,h=0;if(s){u=s.width,c=s.height;const m=fu();(!m||m&&r==="fixed")&&(f=s.offsetLeft,h=s.offsetTop)}const p=mu(i);if(p<=0){const m=i.ownerDocument,b=m.body,v=getComputedStyle(b),x=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(i.clientWidth-b.clientWidth-x);S<=oy&&(u-=S)}else p<=oy&&(u+=p);return{width:u,height:c,x:f,y:h}}const PC=new Set(["absolute","fixed"]);function $C(e,r){const l=Ll(e,!0,r==="fixed"),i=l.top+e.clientTop,s=l.left+e.clientLeft,u=At(e)?Ci(e):Wn(1),c=e.clientWidth*u.x,f=e.clientHeight*u.y,h=s*u.x,p=i*u.y;return{width:c,height:f,x:h,y:p}}function sy(e,r,l){let i;if(r==="viewport")i=qC(e,l);else if(r==="document")i=HC(er(e));else if(ct(r))i=$C(r,l);else{const s=F1(e);i={x:r.x-s.x,y:r.y-s.y,width:r.width,height:r.height}}return Hs(i)}function U1(e,r){const l=Cr(e);return l===r||!ct(l)||Er(l)?!1:Bn(l).position==="fixed"||U1(l,r)}function VC(e,r){const l=r.get(e);if(l)return l;let i=ol(e,[],!1).filter(f=>ct(f)&&sl(f)!=="body"),s=null;const u=Bn(e).position==="fixed";let c=u?Cr(e):e;for(;ct(c)&&!Er(c);){const f=Bn(c),h=gh(c);!h&&f.position==="fixed"&&(s=null),(u?!h&&!s:!h&&f.position==="static"&&!!s&&PC.has(s.position)||Ka(c)&&!h&&U1(e,c))?i=i.filter(m=>m!==c):s=f,c=Cr(c)}return r.set(e,i),i}function GC(e){let{element:r,boundary:l,rootBoundary:i,strategy:s}=e;const c=[...l==="clippingAncestors"?cu(r)?[]:VC(r,this._c):[].concat(l),i],f=c[0],h=c.reduce((p,m)=>{const b=sy(r,m,s);return p.top=Rl(b.top,p.top),p.right=Fs(b.right,p.right),p.bottom=Fs(b.bottom,p.bottom),p.left=Rl(b.left,p.left),p},sy(r,f,s));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function YC(e){const{width:r,height:l}=B1(e);return{width:r,height:l}}function XC(e,r,l){const i=At(r),s=er(r),u=l==="fixed",c=Ll(e,!0,u,r);let f={scrollLeft:0,scrollTop:0};const h=Wn(0);function p(){h.x=mu(s)}if(i||!i&&!u)if((sl(r)!=="body"||Ka(s))&&(f=du(r)),i){const x=Ll(r,!0,u,r);h.x=x.x+r.clientLeft,h.y=x.y+r.clientTop}else s&&p();u&&!i&&s&&p();const m=s&&!i&&!u?I1(s,f):Wn(0),b=c.left+f.scrollLeft-h.x-m.x,v=c.top+f.scrollTop-h.y-m.y;return{x:b,y:v,width:c.width,height:c.height}}function qf(e){return Bn(e).position==="static"}function uy(e,r){if(!At(e)||Bn(e).position==="fixed")return null;if(r)return r(e);let l=e.offsetParent;return er(e)===l&&(l=l.ownerDocument.body),l}function H1(e,r){const l=cn(e);if(cu(e))return l;if(!At(e)){let s=Cr(e);for(;s&&!Er(s);){if(ct(s)&&!qf(s))return s;s=Cr(s)}return l}let i=uy(e,r);for(;i&&FE(i)&&qf(i);)i=uy(i,r);return i&&Er(i)&&qf(i)&&!gh(i)?l:i||PE(e)||l}const ZC=async function(e){const r=this.getOffsetParent||H1,l=this.getDimensions,i=await l(e.floating);return{reference:XC(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function QC(e){return Bn(e).direction==="rtl"}const KC={convertOffsetParentRelativeRectToViewportRelativeRect:IC,getDocumentElement:er,getClippingRect:GC,getOffsetParent:H1,getElementRects:ZC,getClientRects:UC,getDimensions:YC,getScale:Ci,isElement:ct,isRTL:QC};function q1(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function JC(e,r){let l=null,i;const s=er(e);function u(){var f;clearTimeout(i),(f=l)==null||f.disconnect(),l=null}function c(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),u();const p=e.getBoundingClientRect(),{left:m,top:b,width:v,height:x}=p;if(f||r(),!v||!x)return;const S=Ss(b),w=Ss(s.clientWidth-(m+v)),N=Ss(s.clientHeight-(b+x)),E=Ss(m),j={rootMargin:-S+"px "+-w+"px "+-N+"px "+-E+"px",threshold:Rl(0,Fs(1,h))||1};let z=!0;function U(L){const O=L[0].intersectionRatio;if(O!==h){if(!z)return c();O?c(!1,O):i=setTimeout(()=>{c(!1,1e-7)},1e3)}O===1&&!q1(p,e.getBoundingClientRect())&&c(),z=!1}try{l=new IntersectionObserver(U,{...j,root:s.ownerDocument})}catch{l=new IntersectionObserver(U,j)}l.observe(e)}return c(!0),u}function _d(e,r,l,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,p=bh(e),m=s||u?[...p?ol(p):[],...ol(r)]:[];m.forEach(E=>{s&&E.addEventListener("scroll",l,{passive:!0}),u&&E.addEventListener("resize",l)});const b=p&&f?JC(p,l):null;let v=-1,x=null;c&&(x=new ResizeObserver(E=>{let[C]=E;C&&C.target===p&&x&&(x.unobserve(r),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var j;(j=x)==null||j.observe(r)})),l()}),p&&!h&&x.observe(p),x.observe(r));let S,w=h?Ll(e):null;h&&N();function N(){const E=Ll(e);w&&!q1(w,E)&&l(),w=E,S=requestAnimationFrame(N)}return l(),()=>{var E;m.forEach(C=>{s&&C.removeEventListener("scroll",l),u&&C.removeEventListener("resize",l)}),b?.(),(E=x)==null||E.disconnect(),x=null,h&&cancelAnimationFrame(S)}}const WC=MC,e3=zC,t3=LC,n3=(e,r,l)=>{const i=new Map,s={platform:KC,...l},u={...s.platform,_c:i};return _C(e,r,{...s,platform:u})};var r3=typeof document<"u",l3=function(){},Ls=r3?T.useLayoutEffect:l3;function Gs(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let l,i,s;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(l=e.length,l!==r.length)return!1;for(i=l;i--!==0;)if(!Gs(e[i],r[i]))return!1;return!0}if(s=Object.keys(e),l=s.length,l!==Object.keys(r).length)return!1;for(i=l;i--!==0;)if(!{}.hasOwnProperty.call(r,s[i]))return!1;for(i=l;i--!==0;){const u=s[i];if(!(u==="_owner"&&e.$$typeof)&&!Gs(e[u],r[u]))return!1}return!0}return e!==e&&r!==r}function P1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cy(e,r){const l=P1(e);return Math.round(r*l)/l}function Pf(e){const r=T.useRef(e);return Ls(()=>{r.current=e}),r}function i3(e){e===void 0&&(e={});const{placement:r="bottom",strategy:l="absolute",middleware:i=[],platform:s,elements:{reference:u,floating:c}={},transform:f=!0,whileElementsMounted:h,open:p}=e,[m,b]=T.useState({x:0,y:0,strategy:l,placement:r,middlewareData:{},isPositioned:!1}),[v,x]=T.useState(i);Gs(v,i)||x(i);const[S,w]=T.useState(null),[N,E]=T.useState(null),C=T.useCallback(M=>{M!==L.current&&(L.current=M,w(M))},[]),j=T.useCallback(M=>{M!==O.current&&(O.current=M,E(M))},[]),z=u||S,U=c||N,L=T.useRef(null),O=T.useRef(null),H=T.useRef(m),Y=h!=null,B=Pf(h),$=Pf(s),G=Pf(p),J=T.useCallback(()=>{if(!L.current||!O.current)return;const M={placement:r,strategy:l,middleware:v};$.current&&(M.platform=$.current),n3(L.current,O.current,M).then(V=>{const R={...V,isPositioned:G.current!==!1};I.current&&!Gs(H.current,R)&&(H.current=R,z1.flushSync(()=>{b(R)}))})},[v,r,l,$,G]);Ls(()=>{p===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,b(M=>({...M,isPositioned:!1})))},[p]);const I=T.useRef(!1);Ls(()=>(I.current=!0,()=>{I.current=!1}),[]),Ls(()=>{if(z&&(L.current=z),U&&(O.current=U),z&&U){if(B.current)return B.current(z,U,J);J()}},[z,U,J,B,Y]);const Z=T.useMemo(()=>({reference:L,floating:O,setReference:C,setFloating:j}),[C,j]),F=T.useMemo(()=>({reference:z,floating:U}),[z,U]),X=T.useMemo(()=>{const M={position:l,left:0,top:0};if(!F.floating)return M;const V=cy(F.floating,m.x),R=cy(F.floating,m.y);return f?{...M,transform:"translate("+V+"px, "+R+"px)",...P1(F.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:V,top:R}},[l,f,F.floating,m.x,m.y]);return T.useMemo(()=>({...m,update:J,refs:Z,elements:F,floatingStyles:X}),[m,J,Z,F,X])}const Ld=(e,r)=>({...WC(e),options:[e,r]}),Dd=(e,r)=>({...e3(e),options:[e,r]}),Od=(e,r)=>({...t3(e),options:[e,r]}),a3="data-floating-ui-focusable",fy="active",dy="selected",o3={...Ux};let hy=!1,s3=0;const py=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+s3++;function u3(){const[e,r]=T.useState(()=>hy?py():void 0);return un(()=>{e==null&&r(py())},[]),T.useEffect(()=>{hy=!0},[]),e}const c3=o3.useId,yh=c3||u3;function f3(){const e=new Map;return{emit(r,l){var i;(i=e.get(r))==null||i.forEach(s=>s(l))},on(r,l){e.has(r)||e.set(r,new Set),e.get(r).add(l)},off(r,l){var i;(i=e.get(r))==null||i.delete(l)}}}const d3=T.createContext(null),h3=T.createContext(null),xh=()=>{var e;return((e=T.useContext(d3))==null?void 0:e.id)||null},bu=()=>T.useContext(h3);function Dl(e){return"data-floating-ui-"+e}function Qt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const gy=Dl("safe-polygon");function $f(e,r,l){if(l&&!Va(l))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const i=e();return typeof i=="number"?i:i?.[r]}return e?.[r]}function Vf(e){return typeof e=="function"?e():e}function Md(e,r){r===void 0&&(r={});const{open:l,onOpenChange:i,dataRef:s,events:u,elements:c}=e,{enabled:f=!0,delay:h=0,handleClose:p=null,mouseOnly:m=!1,restMs:b=0,move:v=!0}=r,x=bu(),S=xh(),w=jl(p),N=jl(h),E=jl(l),C=jl(b),j=T.useRef(),z=T.useRef(-1),U=T.useRef(),L=T.useRef(-1),O=T.useRef(!0),H=T.useRef(!1),Y=T.useRef(()=>{}),B=T.useRef(!1),$=sn(()=>{var X;const M=(X=s.current.openEvent)==null?void 0:X.type;return M?.includes("mouse")&&M!=="mousedown"});T.useEffect(()=>{if(!f)return;function X(M){let{open:V}=M;V||(Qt(z),Qt(L),O.current=!0,B.current=!1)}return u.on("openchange",X),()=>{u.off("openchange",X)}},[f,u]),T.useEffect(()=>{if(!f||!w.current||!l)return;function X(V){$()&&i(!1,V,"hover")}const M=Pt(c.floating).documentElement;return M.addEventListener("mouseleave",X),()=>{M.removeEventListener("mouseleave",X)}},[c.floating,l,i,f,w,$]);const G=T.useCallback(function(X,M,V){M===void 0&&(M=!0),V===void 0&&(V="hover");const R=$f(N.current,"close",j.current);R&&!U.current?(Qt(z),z.current=window.setTimeout(()=>i(!1,X,V),R)):M&&(Qt(z),i(!1,X,V))},[N,i]),J=sn(()=>{Y.current(),U.current=void 0}),I=sn(()=>{if(H.current){const X=Pt(c.floating).body;X.style.pointerEvents="",X.removeAttribute(gy),H.current=!1}}),Z=sn(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);T.useEffect(()=>{if(!f)return;function X(q){if(Qt(z),O.current=!1,m&&!Va(j.current)||Vf(C.current)>0&&!$f(N.current,"open"))return;const A=$f(N.current,"open",j.current);A?z.current=window.setTimeout(()=>{E.current||i(!0,q,"hover")},A):l||i(!0,q,"hover")}function M(q){if(Z()){I();return}Y.current();const A=Pt(c.floating);if(Qt(L),B.current=!1,w.current&&s.current.floatingContext){l||Qt(z),U.current=w.current({...s.current.floatingContext,tree:x,x:q.clientX,y:q.clientY,onClose(){I(),J(),Z()||G(q,!0,"safe-polygon")}});const re=U.current;A.addEventListener("mousemove",re),Y.current=()=>{A.removeEventListener("mousemove",re)};return}(j.current!=="touch"||!qt(c.floating,q.relatedTarget))&&G(q)}function V(q){Z()||s.current.floatingContext&&(w.current==null||w.current({...s.current.floatingContext,tree:x,x:q.clientX,y:q.clientY,onClose(){I(),J(),Z()||G(q)}})(q))}function R(){Qt(z)}function D(q){Z()||G(q,!1)}if(ct(c.domReference)){const q=c.domReference,A=c.floating;return l&&q.addEventListener("mouseleave",V),v&&q.addEventListener("mousemove",X,{once:!0}),q.addEventListener("mouseenter",X),q.addEventListener("mouseleave",M),A&&(A.addEventListener("mouseleave",V),A.addEventListener("mouseenter",R),A.addEventListener("mouseleave",D)),()=>{l&&q.removeEventListener("mouseleave",V),v&&q.removeEventListener("mousemove",X),q.removeEventListener("mouseenter",X),q.removeEventListener("mouseleave",M),A&&(A.removeEventListener("mouseleave",V),A.removeEventListener("mouseenter",R),A.removeEventListener("mouseleave",D))}}},[c,f,e,m,v,G,J,I,i,l,E,x,N,w,s,Z,C]),un(()=>{var X;if(f&&l&&(X=w.current)!=null&&(X=X.__options)!=null&&X.blockPointerEvents&&$()){H.current=!0;const V=c.floating;if(ct(c.domReference)&&V){var M;const R=Pt(c.floating).body;R.setAttribute(gy,"");const D=c.domReference,q=x==null||(M=x.nodesRef.current.find(A=>A.id===S))==null||(M=M.context)==null?void 0:M.elements.floating;return q&&(q.style.pointerEvents=""),R.style.pointerEvents="none",D.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{R.style.pointerEvents="",D.style.pointerEvents="",V.style.pointerEvents=""}}}},[f,l,S,c,x,w,$]),un(()=>{l||(j.current=void 0,B.current=!1,J(),I())},[l,J,I]),T.useEffect(()=>()=>{J(),Qt(z),Qt(L),I()},[f,c.domReference,J,I]);const F=T.useMemo(()=>{function X(M){j.current=M.pointerType}return{onPointerDown:X,onPointerEnter:X,onMouseMove(M){const{nativeEvent:V}=M;function R(){!O.current&&!E.current&&i(!0,V,"hover")}m&&!Va(j.current)||l||Vf(C.current)===0||B.current&&M.movementX**2+M.movementY**2<2||(Qt(L),j.current==="touch"?R():(B.current=!0,L.current=window.setTimeout(R,Vf(C.current))))}}},[m,i,l,E,C]);return T.useMemo(()=>f?{reference:F}:{},[f,F])}let my=0;function yi(e,r){r===void 0&&(r={});const{preventScroll:l=!1,cancelPrevious:i=!0,sync:s=!1}=r;i&&cancelAnimationFrame(my);const u=()=>e?.focus({preventScroll:l});s?u():my=requestAnimationFrame(u)}function Gf(e,r){if(!e||!r)return!1;const l=r.getRootNode==null?void 0:r.getRootNode();if(e.contains(r))return!0;if(l&&Bs(l)){let i=r;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function p3(e){return"composedPath"in e?e.composedPath()[0]:e.target}function g3(e){return e?.ownerDocument||document}const Ni={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function by(e){return e==="inert"?Ni.inert:e==="aria-hidden"?Ni["aria-hidden"]:Ni.none}let ks=new WeakSet,Es={},Yf=0;const m3=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,$1=e=>e&&(e.host||$1(e.parentNode)),b3=(e,r)=>r.map(l=>{if(e.contains(l))return l;const i=$1(l);return e.contains(i)?i:null}).filter(l=>l!=null);function y3(e,r,l,i){const s="data-floating-ui-inert",u=i?"inert":l?"aria-hidden":null,c=b3(r,e),f=new Set,h=new Set(c),p=[];Es[s]||(Es[s]=new WeakMap);const m=Es[s];c.forEach(b),v(r),f.clear();function b(x){!x||f.has(x)||(f.add(x),x.parentNode&&b(x.parentNode))}function v(x){!x||h.has(x)||[].forEach.call(x.children,S=>{if(sl(S)!=="script")if(f.has(S))v(S);else{const w=u?S.getAttribute(u):null,N=w!==null&&w!=="false",E=by(u),C=(E.get(S)||0)+1,j=(m.get(S)||0)+1;E.set(S,C),m.set(S,j),p.push(S),C===1&&N&&ks.add(S),j===1&&S.setAttribute(s,""),!N&&u&&S.setAttribute(u,u==="inert"?"":"true")}})}return Yf++,()=>{p.forEach(x=>{const S=by(u),N=(S.get(x)||0)-1,E=(m.get(x)||0)-1;S.set(x,N),m.set(x,E),N||(!ks.has(x)&&u&&x.removeAttribute(u),ks.delete(x)),E||x.removeAttribute(s)}),Yf--,Yf||(Ni.inert=new WeakMap,Ni["aria-hidden"]=new WeakMap,Ni.none=new WeakMap,ks=new WeakSet,Es={})}}function yy(e,r,l){r===void 0&&(r=!1),l===void 0&&(l=!1);const i=g3(e[0]).body;return y3(e.concat(Array.from(i.querySelectorAll('[aria-live],[role="status"],output'))),i,r,l)}const vh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Ys=T.forwardRef(function(r,l){const[i,s]=T.useState();un(()=>{_1()&&s("button")},[]);const u={ref:l,tabIndex:0,role:i,"aria-hidden":i?void 0:!0,[Dl("focus-guard")]:"",style:vh};return y.jsx("span",{...r,...u})}),x3={clipPath:"inset(50%)",position:"fixed",top:0,left:0},V1=T.createContext(null),xy=Dl("portal");function v3(e){e===void 0&&(e={});const{id:r,root:l}=e,i=yh(),s=G1(),[u,c]=T.useState(null),f=T.useRef(null);return un(()=>()=>{u?.remove(),queueMicrotask(()=>{f.current=null})},[u]),un(()=>{if(!i||f.current)return;const h=r?document.getElementById(r):null;if(!h)return;const p=document.createElement("div");p.id=i,p.setAttribute(xy,""),h.appendChild(p),f.current=p,c(p)},[r,i]),un(()=>{if(l===null||!i||f.current)return;let h=l||s?.portalNode;h&&!ph(h)&&(h=h.current),h=h||document.body;let p=null;r&&(p=document.createElement("div"),p.id=r,h.appendChild(p));const m=document.createElement("div");m.id=i,m.setAttribute(xy,""),h=p||h,h.appendChild(m),f.current=m,c(m)},[r,l,i,s]),u}function zd(e){const{children:r,id:l,root:i,preserveTabOrder:s=!0}=e,u=v3({id:l,root:i}),[c,f]=T.useState(null),h=T.useRef(null),p=T.useRef(null),m=T.useRef(null),b=T.useRef(null),v=c?.modal,x=c?.open,S=!!c&&!c.modal&&c.open&&s&&!!(i||u);return T.useEffect(()=>{if(!u||!s||v)return;function w(N){u&&Ba(N)&&(N.type==="focusin"?iy:jC)(u)}return u.addEventListener("focusin",w,!0),u.addEventListener("focusout",w,!0),()=>{u.removeEventListener("focusin",w,!0),u.removeEventListener("focusout",w,!0)}},[u,s,v]),T.useEffect(()=>{u&&(x||iy(u))},[x,u]),y.jsxs(V1.Provider,{value:T.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:h,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:b,portalNode:u,setFocusManagerState:f}),[s,u]),children:[S&&u&&y.jsx(Ys,{"data-type":"outside",ref:h,onFocus:w=>{if(Ba(w,u)){var N;(N=m.current)==null||N.focus()}else{const E=c?c.domReference:null,C=M1(E);C?.focus()}}}),S&&u&&y.jsx("span",{"aria-owns":u.id,style:x3}),u&&z1.createPortal(r,u),S&&u&&y.jsx(Ys,{"data-type":"outside",ref:p,onFocus:w=>{if(Ba(w,u)){var N;(N=b.current)==null||N.focus()}else{const E=c?c.domReference:null,C=O1(E);C?.focus(),c?.closeOnFocusOut&&c?.onOpenChange(!1,w.nativeEvent,"focus-out")}}})]})}const G1=()=>T.useContext(V1);function vy(e){return T.useMemo(()=>r=>{e.forEach(l=>{l&&(l.current=r)})},e)}const w3=20;let il=[];function wh(){il=il.filter(e=>e.isConnected)}function S3(e){wh(),e&&sl(e)!=="body"&&(il.push(e),il.length>w3&&(il=il.slice(-20)))}function wy(){return wh(),il[il.length-1]}function k3(e){const r=Ja();return T1(e,r)?e:gu(e,r)[0]||e}function Sy(e,r){var l;if(!r.current.includes("floating")&&!((l=e.getAttribute("role"))!=null&&l.includes("dialog")))return;const i=Ja(),u=mC(e,i).filter(f=>{const h=f.getAttribute("data-tabindex")||"";return T1(f,i)||f.hasAttribute("data-tabindex")&&!h.startsWith("-")}),c=e.getAttribute("tabindex");r.current.includes("floating")||u.length===0?c!=="0"&&e.setAttribute("tabindex","0"):(c!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const E3=T.forwardRef(function(r,l){return y.jsx("button",{...r,type:"button",ref:l,tabIndex:-1,style:vh})});function C3(e){const{context:r,children:l,disabled:i=!1,order:s=["content"],guards:u=!0,initialFocus:c=0,returnFocus:f=!0,restoreFocus:h=!1,modal:p=!0,visuallyHiddenDismiss:m=!1,closeOnFocusOut:b=!0,outsideElementsInert:v=!1,getInsideElements:x=()=>[]}=e,{open:S,onOpenChange:w,events:N,dataRef:E,elements:{domReference:C,floating:j}}=r,z=sn(()=>{var de;return(de=E.current.floatingContext)==null?void 0:de.nodeId}),U=sn(x),L=typeof c=="number"&&c<0,O=ry(C)&&L,H=m3(),Y=H?u:!0,B=!Y||H&&v,$=jl(s),G=jl(c),J=jl(f),I=bu(),Z=G1(),F=T.useRef(null),X=T.useRef(null),M=T.useRef(!1),V=T.useRef(!1),R=T.useRef(-1),D=T.useRef(-1),q=Z!=null,A=Rd(j),ne=sn(function(de){return de===void 0&&(de=A),de?gu(de,Ja()):[]}),re=sn(de=>{const Se=ne(de);return $.current.map(Ee=>C&&Ee==="reference"?C:A&&Ee==="floating"?A:Se).filter(Boolean).flat()});T.useEffect(()=>{if(i||!p)return;function de(Ee){if(Ee.key==="Tab"){qt(A,rl(Pt(A)))&&ne().length===0&&!O&&Hf(Ee);const Ve=re(),Ke=Sr(Ee);$.current[0]==="reference"&&Ke===C&&(Hf(Ee),Ee.shiftKey?yi(Ve[Ve.length-1]):yi(Ve[1])),$.current[1]==="floating"&&Ke===A&&Ee.shiftKey&&(Hf(Ee),yi(Ve[0]))}}const Se=Pt(A);return Se.addEventListener("keydown",de),()=>{Se.removeEventListener("keydown",de)}},[i,C,A,p,$,O,ne,re]),T.useEffect(()=>{if(i||!j)return;function de(Se){const Ee=Sr(Se),Ke=ne().indexOf(Ee);Ke!==-1&&(R.current=Ke)}return j.addEventListener("focusin",de),()=>{j.removeEventListener("focusin",de)}},[i,j,ne]),T.useEffect(()=>{if(i||!b)return;function de(){V.current=!0,setTimeout(()=>{V.current=!1})}function Se(Ke){const ze=Ke.relatedTarget,zt=Ke.currentTarget,pt=Sr(Ke);queueMicrotask(()=>{const mt=z(),Bt=!(qt(C,ze)||qt(j,ze)||qt(ze,j)||qt(Z?.portalNode,ze)||ze!=null&&ze.hasAttribute(Dl("focus-guard"))||I&&(Ei(I.nodesRef.current,mt).find(it=>{var Ft,at;return qt((Ft=it.context)==null?void 0:Ft.elements.floating,ze)||qt((at=it.context)==null?void 0:at.elements.domReference,ze)})||ly(I.nodesRef.current,mt).find(it=>{var Ft,at,En;return[(Ft=it.context)==null?void 0:Ft.elements.floating,Rd((at=it.context)==null?void 0:at.elements.floating)].includes(ze)||((En=it.context)==null?void 0:En.elements.domReference)===ze})));if(zt===C&&A&&Sy(A,$),h&&zt!==C&&!(pt!=null&&pt.isConnected)&&rl(Pt(A))===Pt(A).body){At(A)&&A.focus();const it=R.current,Ft=ne(),at=Ft[it]||Ft[Ft.length-1]||A;At(at)&&at.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}(O||!p)&&ze&&Bt&&!V.current&&ze!==wy()&&(M.current=!0,w(!1,Ke,"focus-out"))})}const Ee=!!(!I&&Z);function Ve(){Qt(D),E.current.insideReactTree=!0,D.current=window.setTimeout(()=>{E.current.insideReactTree=!1})}if(j&&At(C))return C.addEventListener("focusout",Se),C.addEventListener("pointerdown",de),j.addEventListener("focusout",Se),Ee&&j.addEventListener("focusout",Ve,!0),()=>{C.removeEventListener("focusout",Se),C.removeEventListener("pointerdown",de),j.removeEventListener("focusout",Se),Ee&&j.removeEventListener("focusout",Ve,!0)}},[i,C,j,A,p,I,Z,w,b,h,ne,O,z,$,E]);const fe=T.useRef(null),ge=T.useRef(null),ye=vy([fe,Z?.beforeInsideRef]),pe=vy([ge,Z?.afterInsideRef]);T.useEffect(()=>{var de,Se;if(i||!j)return;const Ee=Array.from((Z==null||(de=Z.portalNode)==null?void 0:de.querySelectorAll("["+Dl("portal")+"]"))||[]),Ke=(Se=(I?ly(I.nodesRef.current,z()):[]).find(pt=>{var mt;return ry(((mt=pt.context)==null?void 0:mt.elements.domReference)||null)}))==null||(Se=Se.context)==null?void 0:Se.elements.domReference,ze=[j,Ke,...Ee,...U(),F.current,X.current,fe.current,ge.current,Z?.beforeOutsideRef.current,Z?.afterOutsideRef.current,$.current.includes("reference")||O?C:null].filter(pt=>pt!=null),zt=p||O?yy(ze,!B,B):yy(ze);return()=>{zt()}},[i,C,j,p,$,Z,O,Y,B,I,z,U]),un(()=>{if(i||!At(A))return;const de=Pt(A),Se=rl(de);queueMicrotask(()=>{const Ee=re(A),Ve=G.current,Ke=(typeof Ve=="number"?Ee[Ve]:Ve.current)||A,ze=qt(A,Se);!L&&!ze&&S&&yi(Ke,{preventScroll:Ke===A})})},[i,S,A,L,re,G]),un(()=>{if(i||!A)return;const de=Pt(A),Se=rl(de);S3(Se);function Ee(ze){let{reason:zt,event:pt,nested:mt}=ze;if(["hover","safe-polygon"].includes(zt)&&pt.type==="mouseleave"&&(M.current=!0),zt==="outside-press")if(mt)M.current=!1;else if(SC(pt)||kC(pt))M.current=!1;else{let Bt=!1;document.createElement("div").focus({get preventScroll(){return Bt=!0,!1}}),Bt?M.current=!1:M.current=!0}}N.on("openchange",Ee);const Ve=de.createElement("span");Ve.setAttribute("tabindex","-1"),Ve.setAttribute("aria-hidden","true"),Object.assign(Ve.style,vh),q&&C&&C.insertAdjacentElement("afterend",Ve);function Ke(){if(typeof J.current=="boolean"){const ze=C||wy();return ze&&ze.isConnected?ze:Ve}return J.current.current||Ve}return()=>{N.off("openchange",Ee);const ze=rl(de),zt=qt(j,ze)||I&&Ei(I.nodesRef.current,z(),!1).some(mt=>{var Bt;return qt((Bt=mt.context)==null?void 0:Bt.elements.floating,ze)}),pt=Ke();queueMicrotask(()=>{const mt=k3(pt);J.current&&!M.current&&At(mt)&&(!(mt!==ze&&ze!==de.body)||zt)&&mt.focus({preventScroll:!0}),Ve.remove()})}},[i,j,A,J,E,N,I,q,C,z]),T.useEffect(()=>(queueMicrotask(()=>{M.current=!1}),()=>{queueMicrotask(wh)}),[i]),un(()=>{if(!i&&Z)return Z.setFocusManagerState({modal:p,closeOnFocusOut:b,open:S,onOpenChange:w,domReference:C}),()=>{Z.setFocusManagerState(null)}},[i,Z,p,S,w,b,C]),un(()=>{i||A&&Sy(A,$)},[i,A,$]);function me(de){return i||!m||!p?null:y.jsx(E3,{ref:de==="start"?F:X,onClick:Se=>w(!1,Se.nativeEvent),children:typeof m=="string"?m:"Dismiss"})}const xe=!i&&Y&&(p?!O:!0)&&(q||p);return y.jsxs(y.Fragment,{children:[xe&&y.jsx(Ys,{"data-type":"inside",ref:ye,onFocus:de=>{if(p){const Ee=re();yi(s[0]==="reference"?Ee[0]:Ee[Ee.length-1])}else if(Z!=null&&Z.preserveTabOrder&&Z.portalNode)if(M.current=!1,Ba(de,Z.portalNode)){const Ee=O1(C);Ee?.focus()}else{var Se;(Se=Z.beforeOutsideRef.current)==null||Se.focus()}}}),!O&&me("start"),l,me("end"),xe&&y.jsx(Ys,{"data-type":"inside",ref:pe,onFocus:de=>{if(p)yi(re()[0]);else if(Z!=null&&Z.preserveTabOrder&&Z.portalNode)if(b&&(M.current=!0),Ba(de,Z.portalNode)){const Ee=M1(C);Ee?.focus()}else{var Se;(Se=Z.afterOutsideRef.current)==null||Se.focus()}}})]})}function ky(e){return At(e.target)&&e.target.tagName==="BUTTON"}function N3(e){return At(e.target)&&e.target.tagName==="A"}function Ey(e){return mh(e)}function Bd(e,r){r===void 0&&(r={});const{open:l,onOpenChange:i,dataRef:s,elements:{domReference:u}}=e,{enabled:c=!0,event:f="click",toggle:h=!0,ignoreMouse:p=!1,keyboardHandlers:m=!0,stickIfOpen:b=!0}=r,v=T.useRef(),x=T.useRef(!1),S=T.useMemo(()=>({onPointerDown(w){v.current=w.pointerType},onMouseDown(w){const N=v.current;w.button===0&&f!=="click"&&(Va(N,!0)&&p||(l&&h&&(!(s.current.openEvent&&b)||s.current.openEvent.type==="mousedown")?i(!1,w.nativeEvent,"click"):(w.preventDefault(),i(!0,w.nativeEvent,"click"))))},onClick(w){const N=v.current;if(f==="mousedown"&&v.current){v.current=void 0;return}Va(N,!0)&&p||(l&&h&&(!(s.current.openEvent&&b)||s.current.openEvent.type==="click")?i(!1,w.nativeEvent,"click"):i(!0,w.nativeEvent,"click"))},onKeyDown(w){v.current=void 0,!(w.defaultPrevented||!m||ky(w))&&(w.key===" "&&!Ey(u)&&(w.preventDefault(),x.current=!0),!N3(w)&&w.key==="Enter"&&i(!(l&&h),w.nativeEvent,"click"))},onKeyUp(w){w.defaultPrevented||!m||ky(w)||Ey(u)||w.key===" "&&x.current&&(x.current=!1,i(!(l&&h),w.nativeEvent,"click"))}}),[s,u,f,p,m,i,l,b,h]);return T.useMemo(()=>c?{reference:S}:{},[c,S])}const A3={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},T3={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Cy=e=>{var r,l;return{escapeKey:typeof e=="boolean"?e:(r=e?.escapeKey)!=null?r:!1,outsidePress:typeof e=="boolean"?e:(l=e?.outsidePress)!=null?l:!0}};function Fd(e,r){r===void 0&&(r={});const{open:l,onOpenChange:i,elements:s,dataRef:u}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:h=!0,outsidePressEvent:p="pointerdown",referencePress:m=!1,referencePressEvent:b="pointerdown",ancestorScroll:v=!1,bubbles:x,capture:S}=r,w=bu(),N=sn(typeof h=="function"?h:()=>!1),E=typeof h=="function"?N:h,C=T.useRef(!1),{escapeKey:j,outsidePress:z}=Cy(x),{escapeKey:U,outsidePress:L}=Cy(S),O=T.useRef(!1),H=sn(I=>{var Z;if(!l||!c||!f||I.key!=="Escape"||O.current)return;const F=(Z=u.current.floatingContext)==null?void 0:Z.nodeId,X=w?Ei(w.nodesRef.current,F):[];if(!j&&(I.stopPropagation(),X.length>0)){let M=!0;if(X.forEach(V=>{var R;if((R=V.context)!=null&&R.open&&!V.context.dataRef.current.__escapeKeyBubbles){M=!1;return}}),!M)return}i(!1,wC(I)?I.nativeEvent:I,"escape-key")}),Y=sn(I=>{var Z;const F=()=>{var X;H(I),(X=Sr(I))==null||X.removeEventListener("keydown",F)};(Z=Sr(I))==null||Z.addEventListener("keydown",F)}),B=sn(I=>{var Z;const F=u.current.insideReactTree;u.current.insideReactTree=!1;const X=C.current;if(C.current=!1,p==="click"&&X||F||typeof E=="function"&&!E(I))return;const M=Sr(I),V="["+Dl("inert")+"]",R=Pt(s.floating).querySelectorAll(V);let D=ct(M)?M:null;for(;D&&!Er(D);){const re=Cr(D);if(Er(re)||!ct(re))break;D=re}if(R.length&&ct(M)&&!xC(M)&&!qt(M,s.floating)&&Array.from(R).every(re=>!qt(D,re)))return;if(At(M)&&J){const re=Er(M),fe=Bn(M),ge=/auto|scroll/,ye=re||ge.test(fe.overflowX),pe=re||ge.test(fe.overflowY),me=ye&&M.clientWidth>0&&M.scrollWidth>M.clientWidth,xe=pe&&M.clientHeight>0&&M.scrollHeight>M.clientHeight,de=fe.direction==="rtl",Se=xe&&(de?I.offsetX<=M.offsetWidth-M.clientWidth:I.offsetX>M.clientWidth),Ee=me&&I.offsetY>M.clientHeight;if(Se||Ee)return}const q=(Z=u.current.floatingContext)==null?void 0:Z.nodeId,A=w&&Ei(w.nodesRef.current,q).some(re=>{var fe;return Uf(I,(fe=re.context)==null?void 0:fe.elements.floating)});if(Uf(I,s.floating)||Uf(I,s.domReference)||A)return;const ne=w?Ei(w.nodesRef.current,q):[];if(ne.length>0){let re=!0;if(ne.forEach(fe=>{var ge;if((ge=fe.context)!=null&&ge.open&&!fe.context.dataRef.current.__outsidePressBubbles){re=!1;return}}),!re)return}i(!1,I,"outside-press")}),$=sn(I=>{var Z;const F=()=>{var X;B(I),(X=Sr(I))==null||X.removeEventListener(p,F)};(Z=Sr(I))==null||Z.addEventListener(p,F)});T.useEffect(()=>{if(!l||!c)return;u.current.__escapeKeyBubbles=j,u.current.__outsidePressBubbles=z;let I=-1;function Z(R){i(!1,R,"ancestor-scroll")}function F(){window.clearTimeout(I),O.current=!0}function X(){I=window.setTimeout(()=>{O.current=!1},fu()?5:0)}const M=Pt(s.floating);f&&(M.addEventListener("keydown",U?Y:H,U),M.addEventListener("compositionstart",F),M.addEventListener("compositionend",X)),E&&M.addEventListener(p,L?$:B,L);let V=[];return v&&(ct(s.domReference)&&(V=ol(s.domReference)),ct(s.floating)&&(V=V.concat(ol(s.floating))),!ct(s.reference)&&s.reference&&s.reference.contextElement&&(V=V.concat(ol(s.reference.contextElement)))),V=V.filter(R=>{var D;return R!==((D=M.defaultView)==null?void 0:D.visualViewport)}),V.forEach(R=>{R.addEventListener("scroll",Z,{passive:!0})}),()=>{f&&(M.removeEventListener("keydown",U?Y:H,U),M.removeEventListener("compositionstart",F),M.removeEventListener("compositionend",X)),E&&M.removeEventListener(p,L?$:B,L),V.forEach(R=>{R.removeEventListener("scroll",Z)}),window.clearTimeout(I)}},[u,s,f,E,p,l,i,v,c,j,z,H,U,Y,B,L,$]),T.useEffect(()=>{u.current.insideReactTree=!1},[u,E,p]);const G=T.useMemo(()=>({onKeyDown:H,...m&&{[A3[b]]:I=>{i(!1,I.nativeEvent,"reference-press")},...b!=="click"&&{onClick(I){i(!1,I.nativeEvent,"reference-press")}}}}),[H,i,m,b]),J=T.useMemo(()=>({onKeyDown:H,onMouseDown(){C.current=!0},onMouseUp(){C.current=!0},[T3[p]]:()=>{u.current.insideReactTree=!0}}),[H,p,u]);return T.useMemo(()=>c?{reference:G,floating:J}:{},[c,G,J])}function j3(e){const{open:r=!1,onOpenChange:l,elements:i}=e,s=yh(),u=T.useRef({}),[c]=T.useState(()=>f3()),f=xh()!=null,[h,p]=T.useState(i.reference),m=sn((x,S,w)=>{u.current.openEvent=x?S:void 0,c.emit("openchange",{open:x,event:S,reason:w,nested:f}),l?.(x,S,w)}),b=T.useMemo(()=>({setPositionReference:p}),[]),v=T.useMemo(()=>({reference:h||i.reference||null,floating:i.floating||null,domReference:i.reference}),[h,i.reference,i.floating]);return T.useMemo(()=>({dataRef:u,open:r,onOpenChange:m,elements:v,events:c,floatingId:s,refs:b}),[r,m,v,c,s,b])}function Id(e){e===void 0&&(e={});const{nodeId:r}=e,l=j3({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||l,s=i.elements,[u,c]=T.useState(null),[f,h]=T.useState(null),m=s?.domReference||u,b=T.useRef(null),v=bu();un(()=>{m&&(b.current=m)},[m]);const x=i3({...e,elements:{...s,...f&&{reference:f}}}),S=T.useCallback(j=>{const z=ct(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),getClientRects:()=>j.getClientRects(),contextElement:j}:j;h(z),x.refs.setReference(z)},[x.refs]),w=T.useCallback(j=>{(ct(j)||j===null)&&(b.current=j,c(j)),(ct(x.refs.reference.current)||x.refs.reference.current===null||j!==null&&!ct(j))&&x.refs.setReference(j)},[x.refs]),N=T.useMemo(()=>({...x.refs,setReference:w,setPositionReference:S,domReference:b}),[x.refs,w,S]),E=T.useMemo(()=>({...x.elements,domReference:m}),[x.elements,m]),C=T.useMemo(()=>({...x,...i,refs:N,elements:E,nodeId:r}),[x,N,E,r,i]);return un(()=>{i.dataRef.current.floatingContext=C;const j=v?.nodesRef.current.find(z=>z.id===r);j&&(j.context=C)}),T.useMemo(()=>({...x,context:C,refs:N,elements:E}),[x,N,E,C])}function Xf(){return bC()&&_1()}function R3(e,r){r===void 0&&(r={});const{open:l,onOpenChange:i,events:s,dataRef:u,elements:c}=e,{enabled:f=!0,visibleOnly:h=!0}=r,p=T.useRef(!1),m=T.useRef(-1),b=T.useRef(!0);T.useEffect(()=>{if(!f)return;const x=cn(c.domReference);function S(){!l&&At(c.domReference)&&c.domReference===rl(Pt(c.domReference))&&(p.current=!0)}function w(){b.current=!0}function N(){b.current=!1}return x.addEventListener("blur",S),Xf()&&(x.addEventListener("keydown",w,!0),x.addEventListener("pointerdown",N,!0)),()=>{x.removeEventListener("blur",S),Xf()&&(x.removeEventListener("keydown",w,!0),x.removeEventListener("pointerdown",N,!0))}},[c.domReference,l,f]),T.useEffect(()=>{if(!f)return;function x(S){let{reason:w}=S;(w==="reference-press"||w==="escape-key")&&(p.current=!0)}return s.on("openchange",x),()=>{s.off("openchange",x)}},[s,f]),T.useEffect(()=>()=>{Qt(m)},[]);const v=T.useMemo(()=>({onMouseLeave(){p.current=!1},onFocus(x){if(p.current)return;const S=Sr(x.nativeEvent);if(h&&ct(S)){if(Xf()&&!x.relatedTarget){if(!b.current&&!mh(S))return}else if(!vC(S))return}i(!0,x.nativeEvent,"focus")},onBlur(x){p.current=!1;const S=x.relatedTarget,w=x.nativeEvent,N=ct(S)&&S.hasAttribute(Dl("focus-guard"))&&S.getAttribute("data-type")==="outside";m.current=window.setTimeout(()=>{var E;const C=rl(c.domReference?c.domReference.ownerDocument:document);!S&&C===c.domReference||qt((E=u.current.floatingContext)==null?void 0:E.refs.floating.current,C)||qt(c.domReference,C)||N||i(!1,w,"focus")})}}),[u,c.domReference,i,h]);return T.useMemo(()=>f?{reference:v}:{},[f,v])}function Zf(e,r,l){const i=new Map,s=l==="item";let u=e;if(s&&e){const{[fy]:c,[dy]:f,...h}=e;u=h}return{...l==="floating"&&{tabIndex:-1,[a3]:""},...u,...r.map(c=>{const f=c?c[l]:null;return typeof f=="function"?e?f(e):null:f}).concat(e).reduce((c,f)=>(f&&Object.entries(f).forEach(h=>{let[p,m]=h;if(!(s&&[fy,dy].includes(p)))if(p.indexOf("on")===0){if(i.has(p)||i.set(p,[]),typeof m=="function"){var b;(b=i.get(p))==null||b.push(m),c[p]=function(){for(var v,x=arguments.length,S=new Array(x),w=0;w<x;w++)S[w]=arguments[w];return(v=i.get(p))==null?void 0:v.map(N=>N(...S)).find(N=>N!==void 0)}}}else c[p]=m}),c),{})}}function Ud(e){e===void 0&&(e=[]);const r=e.map(f=>f?.reference),l=e.map(f=>f?.floating),i=e.map(f=>f?.item),s=T.useCallback(f=>Zf(f,e,"reference"),r),u=T.useCallback(f=>Zf(f,e,"floating"),l),c=T.useCallback(f=>Zf(f,e,"item"),i);return T.useMemo(()=>({getReferenceProps:s,getFloatingProps:u,getItemProps:c}),[s,u,c])}const _3=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Hd(e,r){var l,i;r===void 0&&(r={});const{open:s,elements:u,floatingId:c}=e,{enabled:f=!0,role:h="dialog"}=r,p=yh(),m=((l=u.domReference)==null?void 0:l.id)||p,b=T.useMemo(()=>{var C;return((C=Rd(u.floating))==null?void 0:C.id)||c},[u.floating,c]),v=(i=_3.get(h))!=null?i:h,S=xh()!=null,w=T.useMemo(()=>v==="tooltip"||h==="label"?{["aria-"+(h==="label"?"labelledby":"describedby")]:s?b:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":v==="alertdialog"?"dialog":v,"aria-controls":s?b:void 0,...v==="listbox"&&{role:"combobox"},...v==="menu"&&{id:m},...v==="menu"&&S&&{role:"menuitem"},...h==="select"&&{"aria-autocomplete":"none"},...h==="combobox"&&{"aria-autocomplete":"list"}},[v,b,S,s,m,h]),N=T.useMemo(()=>{const C={id:b,...v&&{role:v}};return v==="tooltip"||h==="label"?C:{...C,...v==="menu"&&{"aria-labelledby":m}}},[v,b,m,h]),E=T.useCallback(C=>{let{active:j,selected:z}=C;const U={role:"option",...j&&{id:b+"-fui-option"}};switch(h){case"select":case"combobox":return{...U,"aria-selected":z}}return{}},[b,h]);return T.useMemo(()=>f?{reference:w,floating:N,item:E}:{},[f,w,N,E])}function Y1(e,r,l){return l===void 0&&(l=!0),e.filter(s=>{var u;return s.parentId===r&&(!l||((u=s.context)==null?void 0:u.open))}).flatMap(s=>[s,...Y1(e,s.id,l)])}function Ny(e,r){const[l,i]=e;let s=!1;const u=r.length;for(let c=0,f=u-1;c<u;f=c++){const[h,p]=r[c]||[0,0],[m,b]=r[f]||[0,0];p>=i!=b>=i&&l<=(m-h)*(i-p)/(b-p)+h&&(s=!s)}return s}function L3(e,r){return e[0]>=r.x&&e[0]<=r.x+r.width&&e[1]>=r.y&&e[1]<=r.y+r.height}function qd(e){e===void 0&&(e={});const{buffer:r=.5,blockPointerEvents:l=!1,requireIntent:i=!0}=e,s={current:-1};let u=!1,c=null,f=null,h=typeof performance<"u"?performance.now():0;function p(b,v){const x=performance.now(),S=x-h;if(c===null||f===null||S===0)return c=b,f=v,h=x,null;const w=b-c,N=v-f,C=Math.sqrt(w*w+N*N)/S;return c=b,f=v,h=x,C}const m=b=>{let{x:v,y:x,placement:S,elements:w,onClose:N,nodeId:E,tree:C}=b;return function(z){function U(){Qt(s),N()}if(Qt(s),!w.domReference||!w.floating||S==null||v==null||x==null)return;const{clientX:L,clientY:O}=z,H=[L,O],Y=p3(z),B=z.type==="mouseleave",$=Gf(w.floating,Y),G=Gf(w.domReference,Y),J=w.domReference.getBoundingClientRect(),I=w.floating.getBoundingClientRect(),Z=S.split("-")[0],F=v>I.right-I.width/2,X=x>I.bottom-I.height/2,M=L3(H,J),V=I.width>J.width,R=I.height>J.height,D=(V?J:I).left,q=(V?J:I).right,A=(R?J:I).top,ne=(R?J:I).bottom;if($&&(u=!0,!B))return;if(G&&(u=!1),G&&!B){u=!0;return}if(B&&ct(z.relatedTarget)&&Gf(w.floating,z.relatedTarget)||C&&Y1(C.nodesRef.current,E).length)return;if(Z==="top"&&x>=J.bottom-1||Z==="bottom"&&x<=J.top+1||Z==="left"&&v>=J.right-1||Z==="right"&&v<=J.left+1)return U();let re=[];switch(Z){case"top":re=[[D,J.top+1],[D,I.bottom-1],[q,I.bottom-1],[q,J.top+1]];break;case"bottom":re=[[D,I.top+1],[D,J.bottom-1],[q,J.bottom-1],[q,I.top+1]];break;case"left":re=[[I.right-1,ne],[I.right-1,A],[J.left+1,A],[J.left+1,ne]];break;case"right":re=[[J.right-1,ne],[J.right-1,A],[I.left+1,A],[I.left+1,ne]];break}function fe(ge){let[ye,pe]=ge;switch(Z){case"top":{const me=[V?ye+r/2:F?ye+r*4:ye-r*4,pe+r+1],xe=[V?ye-r/2:F?ye+r*4:ye-r*4,pe+r+1],de=[[I.left,F||V?I.bottom-r:I.top],[I.right,F?V?I.bottom-r:I.top:I.bottom-r]];return[me,xe,...de]}case"bottom":{const me=[V?ye+r/2:F?ye+r*4:ye-r*4,pe-r],xe=[V?ye-r/2:F?ye+r*4:ye-r*4,pe-r],de=[[I.left,F||V?I.top+r:I.bottom],[I.right,F?V?I.top+r:I.bottom:I.top+r]];return[me,xe,...de]}case"left":{const me=[ye+r+1,R?pe+r/2:X?pe+r*4:pe-r*4],xe=[ye+r+1,R?pe-r/2:X?pe+r*4:pe-r*4];return[...[[X||R?I.right-r:I.left,I.top],[X?R?I.right-r:I.left:I.right-r,I.bottom]],me,xe]}case"right":{const me=[ye-r,R?pe+r/2:X?pe+r*4:pe-r*4],xe=[ye-r,R?pe-r/2:X?pe+r*4:pe-r*4],de=[[X||R?I.left+r:I.right,I.top],[X?R?I.left+r:I.right:I.left+r,I.bottom]];return[me,xe,...de]}}}if(!Ny([L,O],re)){if(u&&!M)return U();if(!B&&i){const ge=p(z.clientX,z.clientY);if(ge!==null&&ge<.1)return U()}Ny([L,O],fe([v,x]))?!u&&i&&(s.current=window.setTimeout(U,40)):U()}}};return m.__options={blockPointerEvents:l},m}const D3={".":"Uncommitted Changes",staged:"Staging Area",working:"Working Directory"},O3=new Set([".","staged","working"]),M3=e=>{const r=!e||O3.has(e)?"HEAD":`${e}^`;return{base:`${r}^`,target:r}},Ay=(e,r)=>!!r&&e===`${r}^`,Cs=(e,r)=>e?e===r.shortHash||e===r.hash:!1,Ty=(e,r)=>r?`${e.shortHash}^`:e.shortHash,jy=(e,r,l)=>{if(!r)return"Select...";const i=r.endsWith("^"),s=i?r.slice(0,-1):r;if(s.startsWith("HEAD"))return r;const u=D3[r];if(u)return u;const c=e.specialOptions.find(p=>p.value===r);if(c)return c.label;const f=e.branches.find(p=>p.name===s);if(f)return i?`${f.name}^`:f.name;const h=e.commits.find(p=>p.shortHash===s||p.hash===s);if(h)return Ty(h,i);if(l){const p=e.commits.find(m=>m.shortHash===l||m.hash===l);if(p)return Ty(p,!1)}return r};function z3({options:e,baseRevision:r,targetRevision:l,resolvedBaseRevision:i,resolvedTargetRevision:s,onSelectDiff:u,onOpenAdvanced:c,compact:f=!1}){const[h,p]=T.useState(!1),[m,b]=T.useState(!1),v=f,{refs:x,floatingStyles:S,context:w}=Id({open:h||m,onOpenChange:re=>{!re&&m||p(re)},placement:"bottom-end",middleware:[Ld(6),Od(),Dd({padding:8})],whileElementsMounted:_d}),N=Md(w,{handleClose:qd()}),E=Bd(w),C=Fd(w),j=Hd(w,{role:"menu"}),{getReferenceProps:z,getFloatingProps:U}=Ud([N,E,C,j]),{refs:L,floatingStyles:O,context:H}=Id({open:m,onOpenChange:re=>{re&&p(!0),b(re)},placement:"left-start",middleware:[Ld(0),Od(),Dd({padding:8})],whileElementsMounted:_d}),Y=Md(H,{handleClose:qd()}),B=Bd(H),$=Fd(H),G=Hd(H,{role:"menu"}),{getReferenceProps:J,getFloatingProps:I}=Ud([Y,B,$,G]);T.useEffect(()=>{h||b(!1)},[h]);const Z=T.useMemo(()=>{const re=Ay(r,l),fe=e.commits.find(pe=>re?Cs(l,pe)||Cs(s,pe):!1);if(fe)return`${fe.shortHash} ${fe.message}`;const ge=jy(e,r,i),ye=jy(e,l,s);return`${ge}...${ye}`},[e,r,l,i,s]),F=T.useMemo(()=>e.branches.find(re=>re.name==="main")||e.branches.find(re=>re.name==="master"),[e.branches]),X=!!F,M=T.useMemo(()=>({base:"HEAD^",target:"HEAD"}),[]),V=T.useMemo(()=>M3(l),[l]),R=(re,fe)=>{u(re,fe),b(!1),p(!1)},D=()=>{b(!1),p(!1),c()},q=(re,fe)=>["w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors",re?"hover:bg-diff-selected-bg focus:bg-diff-selected-bg":"hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary",re?"bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2":"",fe?"opacity-50 cursor-not-allowed":"cursor-pointer"].join(" "),A=(re,fe)=>r===re&&l===fe,ne=re=>Ay(r,l)?Cs(l,re)||Cs(s,re):!1;return y.jsxs("div",{className:"relative",children:[y.jsx("button",{ref:x.setReference,type:"button",className:"flex items-center gap-1.5 cursor-pointer group","aria-haspopup":"menu","aria-expanded":h,"aria-label":`Revision menu: ${Z}`,title:Z,...z(),children:v?y.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors",children:[y.jsx(M2,{size:14,className:"text-github-text-secondary"}),y.jsx(Ti,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]}):y.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors",children:[y.jsx("code",{className:"text-xs text-github-text-primary",children:Z}),y.jsx(Ti,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]})}),h&&y.jsx(zd,{children:y.jsxs("div",{ref:x.setFloating,style:S,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[260px] max-h-[360px] overflow-y-auto",...U(),children:[y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Quick Diffs"}),y.jsx("button",{onClick:()=>R("HEAD","."),className:q(A("HEAD","."),!1),children:"HEAD...Uncommitted"}),X&&F&&y.jsx(y.Fragment,{children:y.jsxs("button",{onClick:()=>R(F.name,"."),className:q(A(F.name,"."),!1),children:[F.name,"...Uncommitted"]})}),y.jsx("button",{onClick:()=>R(M.base,M.target),className:q(A(M.base,M.target),!1),children:"HEAD"})]}),y.jsx("div",{className:"border-b border-github-border",children:y.jsx("button",{onClick:()=>R(V.base,V.target),className:q(A(V.base,V.target),!1),type:"button",children:"Previous commit"})}),y.jsx("div",{className:"border-b border-github-border",children:y.jsx("button",{ref:e.commits.length>0?L.setReference:void 0,className:q(!1,e.commits.length===0),...e.commits.length>0?J():{},disabled:e.commits.length===0,type:"button",children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(c2,{size:12,className:"text-github-text-secondary"}),y.jsx("span",{children:"Pick Commit..."})]})})}),y.jsx("div",{children:y.jsx("button",{onClick:D,className:q(!1,!1),type:"button",children:"Detailed..."})})]})}),m&&e.commits.length>0&&y.jsx(zd,{children:y.jsxs("div",{ref:L.setFloating,style:O,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[360px] overflow-y-auto",...I(),children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Recent Commits"}),e.commits.map(re=>y.jsx("button",{onClick:()=>R(`${re.shortHash}^`,re.shortHash),className:q(ne(re),!1),type:"button",children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx("code",{className:"text-xs text-github-text-primary font-mono whitespace-nowrap",children:re.shortHash}),y.jsx("span",{className:"text-xs text-github-text-secondary flex-1 break-words",children:re.message})]})},re.hash))]})})]})}const B3=["jpg","jpeg","png","gif","bmp","svg","webp","ico","tiff","tif","avif","heic","heif"];function F3(e){if(!e)return!1;const r=Qa(e);return r?B3.includes(r):!1}const I3=["md","markdown"];function U3(e){if(!e)return!1;const r=Qa(e);return r?I3.includes(r):!1}const H3=["ipynb"];function q3(e){if(!e)return!1;const r=Qa(e);return r?H3.includes(r):!1}function P3({file:e,diffMode:r,baseCommitish:l,targetCommitish:i}){const s=r??Za,u=e.status==="deleted",c=e.status==="added",f=e.status==="modified"||e.status==="renamed",h=l||"HEAD~1",p=i||"HEAD",[m,b]=T.useState({}),[v,x]=T.useState({}),S=async(C,j)=>{try{const z=C.naturalWidth,U=C.naturalHeight,H=(await(await fetch(C.src)).blob()).size;j({width:z,height:U,size:H})}catch(z){console.error("Failed to get image info:",z)}},w=C=>C?C<1024?`${C} B`:C<1024*1024?`${(C/1024).toFixed(1)} KB`:`${(C/(1024*1024)).toFixed(1)} MB`:"",N=C=>!C.width||!C.height?"":`W: ${C.width}px | H: ${C.height}px`,E={backgroundImage:`
|
|
27
|
+
linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%),
|
|
28
|
+
linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%)
|
|
29
|
+
`,backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px",backgroundColor:"white"};return u?y.jsx("div",{className:"bg-github-bg-primary p-4",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"mb-2",children:y.jsx("span",{className:"text-github-danger font-medium",children:"Deleted Image"})}),y.jsxs("div",{className:"inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${h}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>S(C.currentTarget,b),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(m.width||m.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(m),N(m)&&w(m.size)&&" | ",w(m.size)]})]})]})}):c?y.jsx("div",{className:"bg-github-bg-primary p-4",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"mb-2",children:y.jsx("span",{className:"text-github-accent font-medium",children:"Added Image"})}),y.jsxs("div",{className:"inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"New file:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${p}`,alt:`New image ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>S(C.currentTarget,x),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(v.width||v.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(v),N(v)&&w(v.size)&&" | ",w(v.size)]})]})]})}):f?s==="split"?y.jsxs("div",{className:"bg-github-bg-primary p-4",children:[y.jsx("div",{className:"text-center mb-4",children:y.jsx("span",{className:"text-github-text-primary font-medium",children:"Modified Image"})}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${h}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>S(C.currentTarget,b),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(m.width||m.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(m),N(m)&&w(m.size)&&" | ",w(m.size)]})]})}),y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Current version:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${p}`,alt:`Current version of ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>S(C.currentTarget,x),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(v.width||v.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(v),N(v)&&w(v.size)&&" | ",w(v.size)]})]})})]})]}):y.jsxs("div",{className:"bg-github-bg-primary p-4",children:[y.jsx("div",{className:"text-center mb-4",children:y.jsx("span",{className:"text-github-text-primary font-medium",children:"Modified Image"})}),y.jsxs("div",{className:"space-y-6",children:[y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${h}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>S(C.currentTarget,b),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(m.width||m.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(m),N(m)&&w(m.size)&&" | ",w(m.size)]})]})}),y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Current version:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${p}`,alt:`Current version of ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>S(C.currentTarget,x),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(v.width||v.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(v),N(v)&&w(v.size)&&" | ",w(v.size)]})]})})]})]}):null}function $3(e,r){const l={};return(e[e.length-1]===""?[...e,""]:e).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const V3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,G3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Y3={};function Ry(e,r){return(Y3.jsx?G3:V3).test(e)}const X3=/[ \t\n\f\r]/g;function Z3(e){return typeof e=="object"?e.type==="text"?_y(e.value):!1:_y(e)}function _y(e){return e.replace(X3,"")===""}class Wa{constructor(r,l,i){this.normal=l,this.property=r,i&&(this.space=i)}}Wa.prototype.normal={};Wa.prototype.property={};Wa.prototype.space=void 0;function X1(e,r){const l={},i={};for(const s of e)Object.assign(l,s.property),Object.assign(i,s.normal);return new Wa(l,i,r)}function Pd(e){return e.toLowerCase()}class fn{constructor(r,l){this.attribute=l,this.property=r}}fn.prototype.attribute="";fn.prototype.booleanish=!1;fn.prototype.boolean=!1;fn.prototype.commaOrSpaceSeparated=!1;fn.prototype.commaSeparated=!1;fn.prototype.defined=!1;fn.prototype.mustUseProperty=!1;fn.prototype.number=!1;fn.prototype.overloadedBoolean=!1;fn.prototype.property="";fn.prototype.spaceSeparated=!1;fn.prototype.space=void 0;let Q3=0;const Me=Ml(),Nt=Ml(),$d=Ml(),he=Ml(),ut=Ml(),Ai=Ml(),wn=Ml();function Ml(){return 2**++Q3}const Vd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Me,booleanish:Nt,commaOrSpaceSeparated:wn,commaSeparated:Ai,number:he,overloadedBoolean:$d,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),Qf=Object.keys(Vd);class Sh extends fn{constructor(r,l,i,s){let u=-1;if(super(r,l),Ly(this,"space",s),typeof i=="number")for(;++u<Qf.length;){const c=Qf[u];Ly(this,Qf[u],(i&Vd[c])===Vd[c])}}}Sh.prototype.defined=!0;function Ly(e,r,l){l&&(e[r]=l)}function Li(e){const r={},l={};for(const[i,s]of Object.entries(e.properties)){const u=new Sh(i,e.transform(e.attributes||{},i),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(u.mustUseProperty=!0),r[i]=u,l[Pd(i)]=i,l[Pd(u.attribute)]=i}return new Wa(r,l,e.space)}const Z1=Li({properties:{ariaActiveDescendant:null,ariaAtomic:Nt,ariaAutoComplete:null,ariaBusy:Nt,ariaChecked:Nt,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:Nt,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:Nt,ariaFlowTo:ut,ariaGrabbed:Nt,ariaHasPopup:null,ariaHidden:Nt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:he,ariaLive:null,ariaModal:Nt,ariaMultiLine:Nt,ariaMultiSelectable:Nt,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Nt,ariaReadOnly:Nt,ariaRelevant:null,ariaRequired:Nt,ariaRoleDescription:ut,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Nt,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function Q1(e,r){return r in e?e[r]:r}function K1(e,r){return Q1(e,r.toLowerCase())}const K3=Li({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ai,acceptCharset:ut,accessKey:ut,action:null,allow:null,allowFullScreen:Me,allowPaymentRequest:Me,allowUserMedia:Me,alt:null,as:null,async:Me,autoCapitalize:null,autoComplete:ut,autoFocus:Me,autoPlay:Me,blocking:ut,capture:null,charSet:null,checked:Me,cite:null,className:ut,cols:he,colSpan:null,content:null,contentEditable:Nt,controls:Me,controlsList:ut,coords:he|Ai,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Me,defer:Me,dir:null,dirName:null,disabled:Me,download:$d,draggable:Nt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Me,formTarget:null,headers:ut,height:he,hidden:$d,high:he,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:Me,inputMode:null,integrity:null,is:null,isMap:Me,itemId:null,itemProp:ut,itemRef:ut,itemScope:Me,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Me,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:Me,muted:Me,name:null,nonce:null,noModule:Me,noValidate:Me,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Me,optimum:he,pattern:null,ping:ut,placeholder:null,playsInline:Me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Me,referrerPolicy:null,rel:ut,required:Me,reversed:Me,rows:he,rowSpan:he,sandbox:ut,scope:null,scoped:Me,seamless:Me,selected:Me,shadowRootClonable:Me,shadowRootDelegatesFocus:Me,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Nt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:Me,useMap:null,value:Nt,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ut,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Me,declare:Me,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:Me,noHref:Me,noShade:Me,noWrap:Me,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Nt,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Me,disableRemotePlayback:Me,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:K1}),J3=Li({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:wn,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:ut,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:Me,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ai,g2:Ai,glyphName:Ai,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:wn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wn,rev:wn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wn,requiredFeatures:wn,requiredFonts:wn,requiredFormats:wn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:wn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wn,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Q1}),J1=Li({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,r){return"xlink:"+r.slice(5).toLowerCase()}}),W1=Li({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:K1}),e0=Li({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,r){return"xml:"+r.slice(3).toLowerCase()}}),W3={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},e4=/[A-Z]/g,Dy=/-[a-z]/g,t4=/^data[-\w.:]+$/i;function n4(e,r){const l=Pd(r);let i=r,s=fn;if(l in e.normal)return e.property[e.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&t4.test(r)){if(r.charAt(4)==="-"){const u=r.slice(5).replace(Dy,l4);i="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=r.slice(4);if(!Dy.test(u)){let c=u.replace(e4,r4);c.charAt(0)!=="-"&&(c="-"+c),r="data"+c}}s=Sh}return new s(i,r)}function r4(e){return"-"+e.toLowerCase()}function l4(e){return e.charAt(1).toUpperCase()}const i4=X1([Z1,K3,J1,W1,e0],"html"),kh=X1([Z1,J3,J1,W1,e0],"svg");function a4(e){return e.join(" ").trim()}var xi={},Kf,Oy;function o4(){if(Oy)return Kf;Oy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,l=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
|
|
30
|
+
`,p="/",m="*",b="",v="comment",x="declaration";function S(N,E){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];E=E||{};var C=1,j=1;function z(I){var Z=I.match(r);Z&&(C+=Z.length);var F=I.lastIndexOf(h);j=~F?I.length-F:j+I.length}function U(){var I={line:C,column:j};return function(Z){return Z.position=new L(I),Y(),Z}}function L(I){this.start=I,this.end={line:C,column:j},this.source=E.source}L.prototype.content=N;function O(I){var Z=new Error(E.source+":"+C+":"+j+": "+I);if(Z.reason=I,Z.filename=E.source,Z.line=C,Z.column=j,Z.source=N,!E.silent)throw Z}function H(I){var Z=I.exec(N);if(Z){var F=Z[0];return z(F),N=N.slice(F.length),Z}}function Y(){H(l)}function B(I){var Z;for(I=I||[];Z=$();)Z!==!1&&I.push(Z);return I}function $(){var I=U();if(!(p!=N.charAt(0)||m!=N.charAt(1))){for(var Z=2;b!=N.charAt(Z)&&(m!=N.charAt(Z)||p!=N.charAt(Z+1));)++Z;if(Z+=2,b===N.charAt(Z-1))return O("End of comment missing");var F=N.slice(2,Z-2);return j+=2,z(F),N=N.slice(Z),j+=2,I({type:v,comment:F})}}function G(){var I=U(),Z=H(i);if(Z){if($(),!H(s))return O("property missing ':'");var F=H(u),X=I({type:x,property:w(Z[0].replace(e,b)),value:F?w(F[0].replace(e,b)):b});return H(c),X}}function J(){var I=[];B(I);for(var Z;Z=G();)Z!==!1&&(I.push(Z),B(I));return I}return Y(),J()}function w(N){return N?N.replace(f,b):b}return Kf=S,Kf}var My;function s4(){if(My)return xi;My=1;var e=xi&&xi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(xi,"__esModule",{value:!0}),xi.default=l;const r=e(o4());function l(i,s){let u=null;if(!i||typeof i!="string")return u;const c=(0,r.default)(i),f=typeof s=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:p,value:m}=h;f?s(p,m,h):m&&(u=u||{},u[p]=m)}),u}return xi}var Ra={},zy;function u4(){if(zy)return Ra;zy=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,l=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,u=function(p){return!p||l.test(p)||e.test(p)},c=function(p,m){return m.toUpperCase()},f=function(p,m){return"".concat(m,"-")},h=function(p,m){return m===void 0&&(m={}),u(p)?p:(p=p.toLowerCase(),m.reactCompat?p=p.replace(s,f):p=p.replace(i,f),p.replace(r,c))};return Ra.camelCase=h,Ra}var _a,By;function c4(){if(By)return _a;By=1;var e=_a&&_a.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},r=e(s4()),l=u4();function i(s,u){var c={};return!s||typeof s!="string"||(0,r.default)(s,function(f,h){f&&h&&(c[(0,l.camelCase)(f,u)]=h)}),c}return i.default=i,_a=i,_a}var f4=c4();const d4=lu(f4),t0=n0("end"),Eh=n0("start");function n0(e){return r;function r(l){const i=l&&l.position&&l.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function h4(e){const r=Eh(e),l=t0(e);if(r&&l)return{start:r,end:l}}function Fa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Fy(e.position):"start"in e||"end"in e?Fy(e):"line"in e||"column"in e?Gd(e):""}function Gd(e){return Iy(e&&e.line)+":"+Iy(e&&e.column)}function Fy(e){return Gd(e&&e.start)+"-"+Gd(e&&e.end)}function Iy(e){return e&&typeof e=="number"?e:1}class Vt extends Error{constructor(r,l,i){super(),typeof l=="string"&&(i=l,l=void 0);let s="",u={},c=!1;if(l&&("line"in l&&"column"in l?u={place:l}:"start"in l&&"end"in l?u={place:l}:"type"in l?u={ancestors:[l],place:l.position}:u={...l}),typeof r=="string"?s=r:!u.cause&&r&&(c=!0,s=r.message,u.cause=r),!u.ruleId&&!u.source&&typeof i=="string"){const h=i.indexOf(":");h===-1?u.ruleId=i:(u.source=i.slice(0,h),u.ruleId=i.slice(h+1))}if(!u.place&&u.ancestors&&u.ancestors){const h=u.ancestors[u.ancestors.length-1];h&&(u.place=h.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=Fa(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Vt.prototype.file="";Vt.prototype.name="";Vt.prototype.reason="";Vt.prototype.message="";Vt.prototype.stack="";Vt.prototype.column=void 0;Vt.prototype.line=void 0;Vt.prototype.ancestors=void 0;Vt.prototype.cause=void 0;Vt.prototype.fatal=void 0;Vt.prototype.place=void 0;Vt.prototype.ruleId=void 0;Vt.prototype.source=void 0;const Ch={}.hasOwnProperty,p4=new Map,g4=/[A-Z]/g,m4=new Set(["table","tbody","thead","tfoot","tr"]),b4=new Set(["td","th"]),r0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function y4(e,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const l=r.filePath||void 0;let i;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=N4(l,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=C4(l,r.jsx,r.jsxs)}const s={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:i,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:l,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?kh:i4,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},u=l0(s,e,void 0);return u&&typeof u!="string"?u:s.create(e,s.Fragment,{children:u||void 0},void 0)}function l0(e,r,l){if(r.type==="element")return x4(e,r,l);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return v4(e,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return S4(e,r,l);if(r.type==="mdxjsEsm")return w4(e,r);if(r.type==="root")return k4(e,r,l);if(r.type==="text")return E4(e,r)}function x4(e,r,l){const i=e.schema;let s=i;r.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=kh,e.schema=s),e.ancestors.push(r);const u=a0(e,r.tagName,!1),c=A4(e,r);let f=Ah(e,r);return m4.has(r.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!Z3(h):!0})),i0(e,c,u,r),Nh(c,f),e.ancestors.pop(),e.schema=i,e.create(r,u,c,l)}function v4(e,r){if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Ga(e,r.position)}function w4(e,r){if(r.data&&r.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(r.data.estree);Ga(e,r.position)}function S4(e,r,l){const i=e.schema;let s=i;r.name==="svg"&&i.space==="html"&&(s=kh,e.schema=s),e.ancestors.push(r);const u=r.name===null?e.Fragment:a0(e,r.name,!0),c=T4(e,r),f=Ah(e,r);return i0(e,c,u,r),Nh(c,f),e.ancestors.pop(),e.schema=i,e.create(r,u,c,l)}function k4(e,r,l){const i={};return Nh(i,Ah(e,r)),e.create(r,e.Fragment,i,l)}function E4(e,r){return r.value}function i0(e,r,l,i){typeof l!="string"&&l!==e.Fragment&&e.passNode&&(r.node=i)}function Nh(e,r){if(r.length>0){const l=r.length>1?r:r[0];l&&(e.children=l)}}function C4(e,r,l){return i;function i(s,u,c,f){const p=Array.isArray(c.children)?l:r;return f?p(u,c,f):p(u,c)}}function N4(e,r){return l;function l(i,s,u,c){const f=Array.isArray(u.children),h=Eh(i);return r(s,u,c,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function A4(e,r){const l={};let i,s;for(s in r.properties)if(s!=="children"&&Ch.call(r.properties,s)){const u=j4(e,s,r.properties[s]);if(u){const[c,f]=u;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&b4.has(r.tagName)?i=f:l[c]=f}}if(i){const u=l.style||(l.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return l}function T4(e,r){const l={};for(const i of r.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const u=i.data.estree.body[0];u.type;const c=u.expression;c.type;const f=c.properties[0];f.type,Object.assign(l,e.evaluater.evaluateExpression(f.argument))}else Ga(e,r.position);else{const s=i.name;let u;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const f=i.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else Ga(e,r.position);else u=i.value===null?!0:i.value;l[s]=u}return l}function Ah(e,r){const l=[];let i=-1;const s=e.passKeys?new Map:p4;for(;++i<r.children.length;){const u=r.children[i];let c;if(e.passKeys){const h=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(h){const p=s.get(h)||0;c=h+"-"+p,s.set(h,p+1)}}const f=l0(e,u,c);f!==void 0&&l.push(f)}return l}function j4(e,r,l){const i=n4(e.schema,r);if(!(l==null||typeof l=="number"&&Number.isNaN(l))){if(Array.isArray(l)&&(l=i.commaSeparated?$3(l):a4(l)),i.property==="style"){let s=typeof l=="object"?l:R4(e,String(l));return e.stylePropertyNameCase==="css"&&(s=_4(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&i.space?W3[i.property]||i.property:i.attribute,l]}}function R4(e,r){try{return d4(r,{reactCompat:!0})}catch(l){if(e.ignoreInvalidStyle)return{};const i=l,s=new Vt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=r0+"#cannot-parse-style-attribute",s}}function a0(e,r,l){let i;if(!l)i={type:"Literal",value:r};else if(r.includes(".")){const s=r.split(".");let u=-1,c;for(;++u<s.length;){const f=Ry(s[u])?{type:"Identifier",name:s[u]}:{type:"Literal",value:s[u]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}i=c}else i=Ry(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(i.type==="Literal"){const s=i.value;return Ch.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(i);Ga(e)}function Ga(e,r){const l=new Vt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=r0+"#cannot-handle-mdx-estrees-without-createevaluater",l}function _4(e){const r={};let l;for(l in e)Ch.call(e,l)&&(r[L4(l)]=e[l]);return r}function L4(e){let r=e.replace(g4,D4);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function D4(e){return"-"+e.toLowerCase()}const Jf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},O4={};function Th(e,r){const l=O4,i=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,s=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return o0(e,i,s)}function o0(e,r,l){if(M4(e)){if("value"in e)return e.type==="html"&&!l?"":e.value;if(r&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Uy(e.children,r,l)}return Array.isArray(e)?Uy(e,r,l):""}function Uy(e,r,l){const i=[];let s=-1;for(;++s<e.length;)i[s]=o0(e[s],r,l);return i.join("")}function M4(e){return!!(e&&typeof e=="object")}const Hy=document.createElement("i");function jh(e){const r="&"+e+";";Hy.innerHTML=r;const l=Hy.textContent;return l.charCodeAt(l.length-1)===59&&e!=="semi"||l===r?!1:l}function kn(e,r,l,i){const s=e.length;let u=0,c;if(r<0?r=-r>s?0:s+r:r=r>s?s:r,l=l>0?l:0,i.length<1e4)c=Array.from(i),c.unshift(r,l),e.splice(...c);else for(l&&e.splice(r,l);u<i.length;)c=i.slice(u,u+1e4),c.unshift(r,0),e.splice(...c),u+=1e4,r+=1e4}function zn(e,r){return e.length>0?(kn(e,e.length,0,r),e):r}const qy={}.hasOwnProperty;function s0(e){const r={};let l=-1;for(;++l<e.length;)z4(r,e[l]);return r}function z4(e,r){let l;for(l in r){const s=(qy.call(e,l)?e[l]:void 0)||(e[l]={}),u=r[l];let c;if(u)for(c in u){qy.call(s,c)||(s[c]=[]);const f=u[c];B4(s[c],Array.isArray(f)?f:f?[f]:[])}}}function B4(e,r){let l=-1;const i=[];for(;++l<r.length;)(r[l].add==="after"?e:i).push(r[l]);kn(e,0,0,i)}function u0(e,r){const l=Number.parseInt(e,r);return l<9||l===11||l>13&&l<32||l>126&&l<160||l>55295&&l<57344||l>64975&&l<65008||(l&65535)===65535||(l&65535)===65534||l>1114111?"�":String.fromCodePoint(l)}function Pn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Kt=ul(/[A-Za-z]/),$t=ul(/[\dA-Za-z]/),F4=ul(/[#-'*+\--9=?A-Z^-~]/);function Xs(e){return e!==null&&(e<32||e===127)}const Yd=ul(/\d/),I4=ul(/[\dA-Fa-f]/),U4=ul(/[!-/:-@[-`{-~]/);function Te(e){return e!==null&&e<-2}function st(e){return e!==null&&(e<0||e===32)}function Ie(e){return e===-2||e===-1||e===32}const yu=ul(new RegExp("\\p{P}|\\p{S}","u")),Ol=ul(/\s/);function ul(e){return r;function r(l){return l!==null&&l>-1&&e.test(String.fromCharCode(l))}}function Di(e){const r=[];let l=-1,i=0,s=0;for(;++l<e.length;){const u=e.charCodeAt(l);let c="";if(u===37&&$t(e.charCodeAt(l+1))&&$t(e.charCodeAt(l+2)))s=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(l+1);u<56320&&f>56319&&f<57344?(c=String.fromCharCode(u,f),s=1):c="�"}else c=String.fromCharCode(u);c&&(r.push(e.slice(i,l),encodeURIComponent(c)),i=l+s+1,c=""),s&&(l+=s,s=0)}return r.join("")+e.slice(i)}function Ye(e,r,l,i){const s=i?i-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(h){return Ie(h)?(e.enter(l),f(h)):r(h)}function f(h){return Ie(h)&&u++<s?(e.consume(h),f):(e.exit(l),r(h))}}const H4={tokenize:q4};function q4(e){const r=e.attempt(this.parser.constructs.contentInitial,i,s);let l;return r;function i(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ye(e,r,"linePrefix")}function s(f){return e.enter("paragraph"),u(f)}function u(f){const h=e.enter("chunkText",{contentType:"text",previous:l});return l&&(l.next=h),l=h,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Te(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),c)}}const P4={tokenize:$4},Py={tokenize:V4};function $4(e){const r=this,l=[];let i=0,s,u,c;return f;function f(j){if(i<l.length){const z=l[i];return r.containerState=z[1],e.attempt(z[0].continuation,h,p)(j)}return p(j)}function h(j){if(i++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,s&&C();const z=r.events.length;let U=z,L;for(;U--;)if(r.events[U][0]==="exit"&&r.events[U][1].type==="chunkFlow"){L=r.events[U][1].end;break}E(i);let O=z;for(;O<r.events.length;)r.events[O][1].end={...L},O++;return kn(r.events,U+1,0,r.events.slice(z)),r.events.length=O,p(j)}return f(j)}function p(j){if(i===l.length){if(!s)return v(j);if(s.currentConstruct&&s.currentConstruct.concrete)return S(j);r.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return r.containerState={},e.check(Py,m,b)(j)}function m(j){return s&&C(),E(i),v(j)}function b(j){return r.parser.lazy[r.now().line]=i!==l.length,c=r.now().offset,S(j)}function v(j){return r.containerState={},e.attempt(Py,x,S)(j)}function x(j){return i++,l.push([r.currentConstruct,r.containerState]),v(j)}function S(j){if(j===null){s&&C(),E(0),e.consume(j);return}return s=s||r.parser.flow(r.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:u}),w(j)}function w(j){if(j===null){N(e.exit("chunkFlow"),!0),E(0),e.consume(j);return}return Te(j)?(e.consume(j),N(e.exit("chunkFlow")),i=0,r.interrupt=void 0,f):(e.consume(j),w)}function N(j,z){const U=r.sliceStream(j);if(z&&U.push(null),j.previous=u,u&&(u.next=j),u=j,s.defineSkip(j.start),s.write(U),r.parser.lazy[j.start.line]){let L=s.events.length;for(;L--;)if(s.events[L][1].start.offset<c&&(!s.events[L][1].end||s.events[L][1].end.offset>c))return;const O=r.events.length;let H=O,Y,B;for(;H--;)if(r.events[H][0]==="exit"&&r.events[H][1].type==="chunkFlow"){if(Y){B=r.events[H][1].end;break}Y=!0}for(E(i),L=O;L<r.events.length;)r.events[L][1].end={...B},L++;kn(r.events,H+1,0,r.events.slice(O)),r.events.length=L}}function E(j){let z=l.length;for(;z-- >j;){const U=l[z];r.containerState=U[1],U[0].exit.call(r,e)}l.length=j}function C(){s.write([null]),u=void 0,s=void 0,r.containerState._closeFlow=void 0}}function V4(e,r,l){return Ye(e,e.attempt(this.parser.constructs.document,r,l),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ri(e){if(e===null||st(e)||Ol(e))return 1;if(yu(e))return 2}function xu(e,r,l){const i=[];let s=-1;for(;++s<e.length;){const u=e[s].resolveAll;u&&!i.includes(u)&&(r=u(r,l),i.push(u))}return r}const Xd={name:"attention",resolveAll:G4,tokenize:Y4};function G4(e,r){let l=-1,i,s,u,c,f,h,p,m;for(;++l<e.length;)if(e[l][0]==="enter"&&e[l][1].type==="attentionSequence"&&e[l][1]._close){for(i=l;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&r.sliceSerialize(e[i][1]).charCodeAt(0)===r.sliceSerialize(e[l][1]).charCodeAt(0)){if((e[i][1]._close||e[l][1]._open)&&(e[l][1].end.offset-e[l][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[l][1].end.offset-e[l][1].start.offset)%3))continue;h=e[i][1].end.offset-e[i][1].start.offset>1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1;const b={...e[i][1].end},v={...e[l][1].start};$y(b,-h),$y(v,h),c={type:h>1?"strongSequence":"emphasisSequence",start:b,end:{...e[i][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[l][1].start},end:v},u={type:h>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[l][1].start}},s={type:h>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[i][1].end={...c.start},e[l][1].start={...f.end},p=[],e[i][1].end.offset-e[i][1].start.offset&&(p=zn(p,[["enter",e[i][1],r],["exit",e[i][1],r]])),p=zn(p,[["enter",s,r],["enter",c,r],["exit",c,r],["enter",u,r]]),p=zn(p,xu(r.parser.constructs.insideSpan.null,e.slice(i+1,l),r)),p=zn(p,[["exit",u,r],["enter",f,r],["exit",f,r],["exit",s,r]]),e[l][1].end.offset-e[l][1].start.offset?(m=2,p=zn(p,[["enter",e[l][1],r],["exit",e[l][1],r]])):m=0,kn(e,i-1,l-i+3,p),l=i+p.length-m-2;break}}for(l=-1;++l<e.length;)e[l][1].type==="attentionSequence"&&(e[l][1].type="data");return e}function Y4(e,r){const l=this.parser.constructs.attentionMarkers.null,i=this.previous,s=Ri(i);let u;return c;function c(h){return u=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===u)return e.consume(h),f;const p=e.exit("attentionSequence"),m=Ri(h),b=!m||m===2&&s||l.includes(h),v=!s||s===2&&m||l.includes(i);return p._open=!!(u===42?b:b&&(s||!v)),p._close=!!(u===42?v:v&&(m||!b)),r(h)}}function $y(e,r){e.column+=r,e.offset+=r,e._bufferIndex+=r}const X4={name:"autolink",tokenize:Z4};function Z4(e,r,l){let i=0;return s;function s(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(x){return Kt(x)?(e.consume(x),c):x===64?l(x):p(x)}function c(x){return x===43||x===45||x===46||$t(x)?(i=1,f(x)):p(x)}function f(x){return x===58?(e.consume(x),i=0,h):(x===43||x===45||x===46||$t(x))&&i++<32?(e.consume(x),f):(i=0,p(x))}function h(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),r):x===null||x===32||x===60||Xs(x)?l(x):(e.consume(x),h)}function p(x){return x===64?(e.consume(x),m):F4(x)?(e.consume(x),p):l(x)}function m(x){return $t(x)?b(x):l(x)}function b(x){return x===46?(e.consume(x),i=0,m):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),r):v(x)}function v(x){if((x===45||$t(x))&&i++<63){const S=x===45?v:b;return e.consume(x),S}return l(x)}}const eo={partial:!0,tokenize:Q4};function Q4(e,r,l){return i;function i(u){return Ie(u)?Ye(e,s,"linePrefix")(u):s(u)}function s(u){return u===null||Te(u)?r(u):l(u)}}const c0={continuation:{tokenize:J4},exit:W4,name:"blockQuote",tokenize:K4};function K4(e,r,l){const i=this;return s;function s(c){if(c===62){const f=i.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),u}return l(c)}function u(c){return Ie(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),r):(e.exit("blockQuotePrefix"),r(c))}}function J4(e,r,l){const i=this;return s;function s(c){return Ie(c)?Ye(e,u,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(c0,r,l)(c)}}function W4(e){e.exit("blockQuote")}const f0={name:"characterEscape",tokenize:eN};function eN(e,r,l){return i;function i(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),s}function s(u){return U4(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),r):l(u)}}const d0={name:"characterReference",tokenize:tN};function tN(e,r,l){const i=this;let s=0,u,c;return f;function f(b){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),h}function h(b){return b===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(b),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),u=31,c=$t,m(b))}function p(b){return b===88||b===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(b),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=I4,m):(e.enter("characterReferenceValue"),u=7,c=Yd,m(b))}function m(b){if(b===59&&s){const v=e.exit("characterReferenceValue");return c===$t&&!jh(i.sliceSerialize(v))?l(b):(e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),e.exit("characterReference"),r)}return c(b)&&s++<u?(e.consume(b),m):l(b)}}const Vy={partial:!0,tokenize:rN},Gy={concrete:!0,name:"codeFenced",tokenize:nN};function nN(e,r,l){const i=this,s={partial:!0,tokenize:U};let u=0,c=0,f;return h;function h(L){return p(L)}function p(L){const O=i.events[i.events.length-1];return u=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,f=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(L)}function m(L){return L===f?(c++,e.consume(L),m):c<3?l(L):(e.exit("codeFencedFenceSequence"),Ie(L)?Ye(e,b,"whitespace")(L):b(L))}function b(L){return L===null||Te(L)?(e.exit("codeFencedFence"),i.interrupt?r(L):e.check(Vy,w,z)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(L))}function v(L){return L===null||Te(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),b(L)):Ie(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ye(e,x,"whitespace")(L)):L===96&&L===f?l(L):(e.consume(L),v)}function x(L){return L===null||Te(L)?b(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(L))}function S(L){return L===null||Te(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),b(L)):L===96&&L===f?l(L):(e.consume(L),S)}function w(L){return e.attempt(s,z,N)(L)}function N(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),E}function E(L){return u>0&&Ie(L)?Ye(e,C,"linePrefix",u+1)(L):C(L)}function C(L){return L===null||Te(L)?e.check(Vy,w,z)(L):(e.enter("codeFlowValue"),j(L))}function j(L){return L===null||Te(L)?(e.exit("codeFlowValue"),C(L)):(e.consume(L),j)}function z(L){return e.exit("codeFenced"),r(L)}function U(L,O,H){let Y=0;return B;function B(Z){return L.enter("lineEnding"),L.consume(Z),L.exit("lineEnding"),$}function $(Z){return L.enter("codeFencedFence"),Ie(Z)?Ye(L,G,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):G(Z)}function G(Z){return Z===f?(L.enter("codeFencedFenceSequence"),J(Z)):H(Z)}function J(Z){return Z===f?(Y++,L.consume(Z),J):Y>=c?(L.exit("codeFencedFenceSequence"),Ie(Z)?Ye(L,I,"whitespace")(Z):I(Z)):H(Z)}function I(Z){return Z===null||Te(Z)?(L.exit("codeFencedFence"),O(Z)):H(Z)}}}function rN(e,r,l){const i=this;return s;function s(c){return c===null?l(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return i.parser.lazy[i.now().line]?l(c):r(c)}}const Wf={name:"codeIndented",tokenize:iN},lN={partial:!0,tokenize:aN};function iN(e,r,l){const i=this;return s;function s(p){return e.enter("codeIndented"),Ye(e,u,"linePrefix",5)(p)}function u(p){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?c(p):l(p)}function c(p){return p===null?h(p):Te(p)?e.attempt(lN,c,h)(p):(e.enter("codeFlowValue"),f(p))}function f(p){return p===null||Te(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),f)}function h(p){return e.exit("codeIndented"),r(p)}}function aN(e,r,l){const i=this;return s;function s(c){return i.parser.lazy[i.now().line]?l(c):Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):Ye(e,u,"linePrefix",5)(c)}function u(c){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?r(c):Te(c)?s(c):l(c)}}const oN={name:"codeText",previous:uN,resolve:sN,tokenize:cN};function sN(e){let r=e.length-4,l=3,i,s;if((e[l][1].type==="lineEnding"||e[l][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(i=l;++i<r;)if(e[i][1].type==="codeTextData"){e[l][1].type="codeTextPadding",e[r][1].type="codeTextPadding",l+=2,r-=2;break}}for(i=l-1,r++;++i<=r;)s===void 0?i!==r&&e[i][1].type!=="lineEnding"&&(s=i):(i===r||e[i][1].type==="lineEnding")&&(e[s][1].type="codeTextData",i!==s+2&&(e[s][1].end=e[i-1][1].end,e.splice(s+2,i-s-2),r-=i-s-2,i=s+2),s=void 0);return e}function uN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function cN(e,r,l){let i=0,s,u;return c;function c(b){return e.enter("codeText"),e.enter("codeTextSequence"),f(b)}function f(b){return b===96?(e.consume(b),i++,f):(e.exit("codeTextSequence"),h(b))}function h(b){return b===null?l(b):b===32?(e.enter("space"),e.consume(b),e.exit("space"),h):b===96?(u=e.enter("codeTextSequence"),s=0,m(b)):Te(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h):(e.enter("codeTextData"),p(b))}function p(b){return b===null||b===32||b===96||Te(b)?(e.exit("codeTextData"),h(b)):(e.consume(b),p)}function m(b){return b===96?(e.consume(b),s++,m):s===i?(e.exit("codeTextSequence"),e.exit("codeText"),r(b)):(u.type="codeTextData",p(b))}}class fN{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,l){const i=l??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(r,i):r>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(r,l,i){const s=l||0;this.setCursor(Math.trunc(r));const u=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&La(this.left,i),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),La(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),La(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const l=this.left.splice(r,Number.POSITIVE_INFINITY);La(this.right,l.reverse())}else{const l=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);La(this.left,l.reverse())}}}function La(e,r){let l=0;if(r.length<1e4)e.push(...r);else for(;l<r.length;)e.push(...r.slice(l,l+1e4)),l+=1e4}function h0(e){const r={};let l=-1,i,s,u,c,f,h,p;const m=new fN(e);for(;++l<m.length;){for(;l in r;)l=r[l];if(i=m.get(l),l&&i[1].type==="chunkFlow"&&m.get(l-1)[1].type==="listItemPrefix"&&(h=i[1]._tokenizer.events,u=0,u<h.length&&h[u][1].type==="lineEndingBlank"&&(u+=2),u<h.length&&h[u][1].type==="content"))for(;++u<h.length&&h[u][1].type!=="content";)h[u][1].type==="chunkText"&&(h[u][1]._isInFirstContentOfListItem=!0,u++);if(i[0]==="enter")i[1].contentType&&(Object.assign(r,dN(m,l)),l=r[l],p=!0);else if(i[1]._container){for(u=l,s=void 0;u--;)if(c=m.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(m.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(i[1].end={...m.get(s)[1].start},f=m.slice(s,l),f.unshift(i),m.splice(s,l-s+1,f))}}return kn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!p}function dN(e,r){const l=e.get(r)[1],i=e.get(r)[2];let s=r-1;const u=[];let c=l._tokenizer;c||(c=i.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,h=[],p={};let m,b,v=-1,x=l,S=0,w=0;const N=[w];for(;x;){for(;e.get(++s)[1]!==x;);u.push(s),x._tokenizer||(m=i.sliceStream(x),x.next||m.push(null),b&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(m),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),b=x,x=x.next}for(x=l;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(w=v+1,N.push(w),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):N.pop(),v=N.length;v--;){const E=f.slice(N[v],N[v+1]),C=u.pop();h.push([C,C+E.length-1]),e.splice(C,2,E)}for(h.reverse(),v=-1;++v<h.length;)p[S+h[v][0]]=S+h[v][1],S+=h[v][1]-h[v][0]-1;return p}const hN={resolve:gN,tokenize:mN},pN={partial:!0,tokenize:bN};function gN(e){return h0(e),e}function mN(e,r){let l;return i;function i(f){return e.enter("content"),l=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?u(f):Te(f)?e.check(pN,c,u)(f):(e.consume(f),s)}function u(f){return e.exit("chunkContent"),e.exit("content"),r(f)}function c(f){return e.consume(f),e.exit("chunkContent"),l.next=e.enter("chunkContent",{contentType:"content",previous:l}),l=l.next,s}}function bN(e,r,l){const i=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ye(e,u,"linePrefix")}function u(c){if(c===null||Te(c))return l(c);const f=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?r(c):e.interrupt(i.parser.constructs.flow,l,r)(c)}}function p0(e,r,l,i,s,u,c,f,h){const p=h||Number.POSITIVE_INFINITY;let m=0;return b;function b(E){return E===60?(e.enter(i),e.enter(s),e.enter(u),e.consume(E),e.exit(u),v):E===null||E===32||E===41||Xs(E)?l(E):(e.enter(i),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),w(E))}function v(E){return E===62?(e.enter(u),e.consume(E),e.exit(u),e.exit(s),e.exit(i),r):(e.enter(f),e.enter("chunkString",{contentType:"string"}),x(E))}function x(E){return E===62?(e.exit("chunkString"),e.exit(f),v(E)):E===null||E===60||Te(E)?l(E):(e.consume(E),E===92?S:x)}function S(E){return E===60||E===62||E===92?(e.consume(E),x):x(E)}function w(E){return!m&&(E===null||E===41||st(E))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(i),r(E)):m<p&&E===40?(e.consume(E),m++,w):E===41?(e.consume(E),m--,w):E===null||E===32||E===40||Xs(E)?l(E):(e.consume(E),E===92?N:w)}function N(E){return E===40||E===41||E===92?(e.consume(E),w):w(E)}}function g0(e,r,l,i,s,u){const c=this;let f=0,h;return p;function p(x){return e.enter(i),e.enter(s),e.consume(x),e.exit(s),e.enter(u),m}function m(x){return f>999||x===null||x===91||x===93&&!h||x===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?l(x):x===93?(e.exit(u),e.enter(s),e.consume(x),e.exit(s),e.exit(i),r):Te(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),b(x))}function b(x){return x===null||x===91||x===93||Te(x)||f++>999?(e.exit("chunkString"),m(x)):(e.consume(x),h||(h=!Ie(x)),x===92?v:b)}function v(x){return x===91||x===92||x===93?(e.consume(x),f++,b):b(x)}}function m0(e,r,l,i,s,u){let c;return f;function f(v){return v===34||v===39||v===40?(e.enter(i),e.enter(s),e.consume(v),e.exit(s),c=v===40?41:v,h):l(v)}function h(v){return v===c?(e.enter(s),e.consume(v),e.exit(s),e.exit(i),r):(e.enter(u),p(v))}function p(v){return v===c?(e.exit(u),h(c)):v===null?l(v):Te(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Ye(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===c||v===null||Te(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?b:m)}function b(v){return v===c||v===92?(e.consume(v),m):m(v)}}function Ia(e,r){let l;return i;function i(s){return Te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),l=!0,i):Ie(s)?Ye(e,i,l?"linePrefix":"lineSuffix")(s):r(s)}}const yN={name:"definition",tokenize:vN},xN={partial:!0,tokenize:wN};function vN(e,r,l){const i=this;let s;return u;function u(x){return e.enter("definition"),c(x)}function c(x){return g0.call(i,e,f,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function f(x){return s=Pn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),h):l(x)}function h(x){return st(x)?Ia(e,p)(x):p(x)}function p(x){return p0(e,m,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function m(x){return e.attempt(xN,b,b)(x)}function b(x){return Ie(x)?Ye(e,v,"whitespace")(x):v(x)}function v(x){return x===null||Te(x)?(e.exit("definition"),i.parser.defined.push(s),r(x)):l(x)}}function wN(e,r,l){return i;function i(f){return st(f)?Ia(e,s)(f):l(f)}function s(f){return m0(e,u,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return Ie(f)?Ye(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Te(f)?r(f):l(f)}}const SN={name:"hardBreakEscape",tokenize:kN};function kN(e,r,l){return i;function i(u){return e.enter("hardBreakEscape"),e.consume(u),s}function s(u){return Te(u)?(e.exit("hardBreakEscape"),r(u)):l(u)}}const EN={name:"headingAtx",resolve:CN,tokenize:NN};function CN(e,r){let l=e.length-2,i=3,s,u;return e[i][1].type==="whitespace"&&(i+=2),l-2>i&&e[l][1].type==="whitespace"&&(l-=2),e[l][1].type==="atxHeadingSequence"&&(i===l-1||l-4>i&&e[l-2][1].type==="whitespace")&&(l-=i+1===l?2:4),l>i&&(s={type:"atxHeadingText",start:e[i][1].start,end:e[l][1].end},u={type:"chunkText",start:e[i][1].start,end:e[l][1].end,contentType:"text"},kn(e,i,l-i+1,[["enter",s,r],["enter",u,r],["exit",u,r],["exit",s,r]])),e}function NN(e,r,l){let i=0;return s;function s(m){return e.enter("atxHeading"),u(m)}function u(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&i++<6?(e.consume(m),c):m===null||st(m)?(e.exit("atxHeadingSequence"),f(m)):l(m)}function f(m){return m===35?(e.enter("atxHeadingSequence"),h(m)):m===null||Te(m)?(e.exit("atxHeading"),r(m)):Ie(m)?Ye(e,f,"whitespace")(m):(e.enter("atxHeadingText"),p(m))}function h(m){return m===35?(e.consume(m),h):(e.exit("atxHeadingSequence"),f(m))}function p(m){return m===null||m===35||st(m)?(e.exit("atxHeadingText"),f(m)):(e.consume(m),p)}}const AN=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Yy=["pre","script","style","textarea"],TN={concrete:!0,name:"htmlFlow",resolveTo:_N,tokenize:LN},jN={partial:!0,tokenize:ON},RN={partial:!0,tokenize:DN};function _N(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function LN(e,r,l){const i=this;let s,u,c,f,h;return p;function p(A){return m(A)}function m(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),b}function b(A){return A===33?(e.consume(A),v):A===47?(e.consume(A),u=!0,w):A===63?(e.consume(A),s=3,i.interrupt?r:R):Kt(A)?(e.consume(A),c=String.fromCharCode(A),N):l(A)}function v(A){return A===45?(e.consume(A),s=2,x):A===91?(e.consume(A),s=5,f=0,S):Kt(A)?(e.consume(A),s=4,i.interrupt?r:R):l(A)}function x(A){return A===45?(e.consume(A),i.interrupt?r:R):l(A)}function S(A){const ne="CDATA[";return A===ne.charCodeAt(f++)?(e.consume(A),f===ne.length?i.interrupt?r:G:S):l(A)}function w(A){return Kt(A)?(e.consume(A),c=String.fromCharCode(A),N):l(A)}function N(A){if(A===null||A===47||A===62||st(A)){const ne=A===47,re=c.toLowerCase();return!ne&&!u&&Yy.includes(re)?(s=1,i.interrupt?r(A):G(A)):AN.includes(c.toLowerCase())?(s=6,ne?(e.consume(A),E):i.interrupt?r(A):G(A)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?l(A):u?C(A):j(A))}return A===45||$t(A)?(e.consume(A),c+=String.fromCharCode(A),N):l(A)}function E(A){return A===62?(e.consume(A),i.interrupt?r:G):l(A)}function C(A){return Ie(A)?(e.consume(A),C):B(A)}function j(A){return A===47?(e.consume(A),B):A===58||A===95||Kt(A)?(e.consume(A),z):Ie(A)?(e.consume(A),j):B(A)}function z(A){return A===45||A===46||A===58||A===95||$t(A)?(e.consume(A),z):U(A)}function U(A){return A===61?(e.consume(A),L):Ie(A)?(e.consume(A),U):j(A)}function L(A){return A===null||A===60||A===61||A===62||A===96?l(A):A===34||A===39?(e.consume(A),h=A,O):Ie(A)?(e.consume(A),L):H(A)}function O(A){return A===h?(e.consume(A),h=null,Y):A===null||Te(A)?l(A):(e.consume(A),O)}function H(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||st(A)?U(A):(e.consume(A),H)}function Y(A){return A===47||A===62||Ie(A)?j(A):l(A)}function B(A){return A===62?(e.consume(A),$):l(A)}function $(A){return A===null||Te(A)?G(A):Ie(A)?(e.consume(A),$):l(A)}function G(A){return A===45&&s===2?(e.consume(A),F):A===60&&s===1?(e.consume(A),X):A===62&&s===4?(e.consume(A),D):A===63&&s===3?(e.consume(A),R):A===93&&s===5?(e.consume(A),V):Te(A)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(jN,q,J)(A)):A===null||Te(A)?(e.exit("htmlFlowData"),J(A)):(e.consume(A),G)}function J(A){return e.check(RN,I,q)(A)}function I(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),Z}function Z(A){return A===null||Te(A)?J(A):(e.enter("htmlFlowData"),G(A))}function F(A){return A===45?(e.consume(A),R):G(A)}function X(A){return A===47?(e.consume(A),c="",M):G(A)}function M(A){if(A===62){const ne=c.toLowerCase();return Yy.includes(ne)?(e.consume(A),D):G(A)}return Kt(A)&&c.length<8?(e.consume(A),c+=String.fromCharCode(A),M):G(A)}function V(A){return A===93?(e.consume(A),R):G(A)}function R(A){return A===62?(e.consume(A),D):A===45&&s===2?(e.consume(A),R):G(A)}function D(A){return A===null||Te(A)?(e.exit("htmlFlowData"),q(A)):(e.consume(A),D)}function q(A){return e.exit("htmlFlow"),r(A)}}function DN(e,r,l){const i=this;return s;function s(c){return Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):l(c)}function u(c){return i.parser.lazy[i.now().line]?l(c):r(c)}}function ON(e,r,l){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(eo,r,l)}}const MN={name:"htmlText",tokenize:zN};function zN(e,r,l){const i=this;let s,u,c;return f;function f(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),h}function h(R){return R===33?(e.consume(R),p):R===47?(e.consume(R),U):R===63?(e.consume(R),j):Kt(R)?(e.consume(R),H):l(R)}function p(R){return R===45?(e.consume(R),m):R===91?(e.consume(R),u=0,S):Kt(R)?(e.consume(R),C):l(R)}function m(R){return R===45?(e.consume(R),x):l(R)}function b(R){return R===null?l(R):R===45?(e.consume(R),v):Te(R)?(c=b,X(R)):(e.consume(R),b)}function v(R){return R===45?(e.consume(R),x):b(R)}function x(R){return R===62?F(R):R===45?v(R):b(R)}function S(R){const D="CDATA[";return R===D.charCodeAt(u++)?(e.consume(R),u===D.length?w:S):l(R)}function w(R){return R===null?l(R):R===93?(e.consume(R),N):Te(R)?(c=w,X(R)):(e.consume(R),w)}function N(R){return R===93?(e.consume(R),E):w(R)}function E(R){return R===62?F(R):R===93?(e.consume(R),E):w(R)}function C(R){return R===null||R===62?F(R):Te(R)?(c=C,X(R)):(e.consume(R),C)}function j(R){return R===null?l(R):R===63?(e.consume(R),z):Te(R)?(c=j,X(R)):(e.consume(R),j)}function z(R){return R===62?F(R):j(R)}function U(R){return Kt(R)?(e.consume(R),L):l(R)}function L(R){return R===45||$t(R)?(e.consume(R),L):O(R)}function O(R){return Te(R)?(c=O,X(R)):Ie(R)?(e.consume(R),O):F(R)}function H(R){return R===45||$t(R)?(e.consume(R),H):R===47||R===62||st(R)?Y(R):l(R)}function Y(R){return R===47?(e.consume(R),F):R===58||R===95||Kt(R)?(e.consume(R),B):Te(R)?(c=Y,X(R)):Ie(R)?(e.consume(R),Y):F(R)}function B(R){return R===45||R===46||R===58||R===95||$t(R)?(e.consume(R),B):$(R)}function $(R){return R===61?(e.consume(R),G):Te(R)?(c=$,X(R)):Ie(R)?(e.consume(R),$):Y(R)}function G(R){return R===null||R===60||R===61||R===62||R===96?l(R):R===34||R===39?(e.consume(R),s=R,J):Te(R)?(c=G,X(R)):Ie(R)?(e.consume(R),G):(e.consume(R),I)}function J(R){return R===s?(e.consume(R),s=void 0,Z):R===null?l(R):Te(R)?(c=J,X(R)):(e.consume(R),J)}function I(R){return R===null||R===34||R===39||R===60||R===61||R===96?l(R):R===47||R===62||st(R)?Y(R):(e.consume(R),I)}function Z(R){return R===47||R===62||st(R)?Y(R):l(R)}function F(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),r):l(R)}function X(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),M}function M(R){return Ie(R)?Ye(e,V,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):V(R)}function V(R){return e.enter("htmlTextData"),c(R)}}const Rh={name:"labelEnd",resolveAll:UN,resolveTo:HN,tokenize:qN},BN={tokenize:PN},FN={tokenize:$N},IN={tokenize:VN};function UN(e){let r=-1;const l=[];for(;++r<e.length;){const i=e[r][1];if(l.push(e[r]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",r+=s}}return e.length!==l.length&&kn(e,0,e.length,l),e}function HN(e,r){let l=e.length,i=0,s,u,c,f;for(;l--;)if(s=e[l][1],u){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[l][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[l][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(u=l,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(c=l);const h={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[u][1].start},end:{...e[c][1].end}},m={type:"labelText",start:{...e[u+i+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",h,r],["enter",p,r]],f=zn(f,e.slice(u+1,u+i+3)),f=zn(f,[["enter",m,r]]),f=zn(f,xu(r.parser.constructs.insideSpan.null,e.slice(u+i+4,c-3),r)),f=zn(f,[["exit",m,r],e[c-2],e[c-1],["exit",p,r]]),f=zn(f,e.slice(c+1)),f=zn(f,[["exit",h,r]]),kn(e,u,e.length,f),e}function qN(e,r,l){const i=this;let s=i.events.length,u,c;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){u=i.events[s][1];break}return f;function f(v){return u?u._inactive?b(v):(c=i.parser.defined.includes(Pn(i.sliceSerialize({start:u.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),h):l(v)}function h(v){return v===40?e.attempt(BN,m,c?m:b)(v):v===91?e.attempt(FN,m,c?p:b)(v):c?m(v):b(v)}function p(v){return e.attempt(IN,m,b)(v)}function m(v){return r(v)}function b(v){return u._balanced=!0,l(v)}}function PN(e,r,l){return i;function i(b){return e.enter("resource"),e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),s}function s(b){return st(b)?Ia(e,u)(b):u(b)}function u(b){return b===41?m(b):p0(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function c(b){return st(b)?Ia(e,h)(b):m(b)}function f(b){return l(b)}function h(b){return b===34||b===39||b===40?m0(e,p,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):m(b)}function p(b){return st(b)?Ia(e,m)(b):m(b)}function m(b){return b===41?(e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),e.exit("resource"),r):l(b)}}function $N(e,r,l){const i=this;return s;function s(f){return g0.call(i,e,u,c,"reference","referenceMarker","referenceString")(f)}function u(f){return i.parser.defined.includes(Pn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?r(f):l(f)}function c(f){return l(f)}}function VN(e,r,l){return i;function i(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),s}function s(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),r):l(u)}}const GN={name:"labelStartImage",resolveAll:Rh.resolveAll,tokenize:YN};function YN(e,r,l){const i=this;return s;function s(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):l(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in i.parser.constructs?l(f):r(f)}}const XN={name:"labelStartLink",resolveAll:Rh.resolveAll,tokenize:ZN};function ZN(e,r,l){const i=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?l(c):r(c)}}const ed={name:"lineEnding",tokenize:QN};function QN(e,r){return l;function l(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ye(e,r,"linePrefix")}}const Ds={name:"thematicBreak",tokenize:KN};function KN(e,r,l){let i=0,s;return u;function u(p){return e.enter("thematicBreak"),c(p)}function c(p){return s=p,f(p)}function f(p){return p===s?(e.enter("thematicBreakSequence"),h(p)):i>=3&&(p===null||Te(p))?(e.exit("thematicBreak"),r(p)):l(p)}function h(p){return p===s?(e.consume(p),i++,h):(e.exit("thematicBreakSequence"),Ie(p)?Ye(e,f,"whitespace")(p):f(p))}}const on={continuation:{tokenize:tA},exit:rA,name:"list",tokenize:eA},JN={partial:!0,tokenize:lA},WN={partial:!0,tokenize:nA};function eA(e,r,l){const i=this,s=i.events[i.events.length-1];let u=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return f;function f(x){const S=i.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!i.containerState.marker||x===i.containerState.marker:Yd(x)){if(i.containerState.type||(i.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Ds,l,p)(x):p(x);if(!i.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(x)}return l(x)}function h(x){return Yd(x)&&++c<10?(e.consume(x),h):(!i.interrupt||c<2)&&(i.containerState.marker?x===i.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),p(x)):l(x)}function p(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||x,e.check(eo,i.interrupt?l:m,e.attempt(JN,v,b))}function m(x){return i.containerState.initialBlankLine=!0,u++,v(x)}function b(x){return Ie(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),v):l(x)}function v(x){return i.containerState.size=u+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(x)}}function tA(e,r,l){const i=this;return i.containerState._closeFlow=void 0,e.check(eo,s,u);function s(f){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ye(e,r,"listItemIndent",i.containerState.size+1)(f)}function u(f){return i.containerState.furtherBlankLines||!Ie(f)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(f)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(WN,r,c)(f))}function c(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ye(e,e.attempt(on,r,l),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function nA(e,r,l){const i=this;return Ye(e,s,"listItemIndent",i.containerState.size+1);function s(u){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?r(u):l(u)}}function rA(e){e.exit(this.containerState.type)}function lA(e,r,l){const i=this;return Ye(e,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(u){const c=i.events[i.events.length-1];return!Ie(u)&&c&&c[1].type==="listItemPrefixWhitespace"?r(u):l(u)}}const Xy={name:"setextUnderline",resolveTo:iA,tokenize:aA};function iA(e,r){let l=e.length,i,s,u;for(;l--;)if(e[l][0]==="enter"){if(e[l][1].type==="content"){i=l;break}e[l][1].type==="paragraph"&&(s=l)}else e[l][1].type==="content"&&e.splice(l,1),!u&&e[l][1].type==="definition"&&(u=l);const c={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",u?(e.splice(s,0,["enter",c,r]),e.splice(u+1,0,["exit",e[i][1],r]),e[i][1].end={...e[u][1].end}):e[i][1]=c,e.push(["exit",c,r]),e}function aA(e,r,l){const i=this;let s;return u;function u(p){let m=i.events.length,b;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){b=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||b)?(e.enter("setextHeadingLine"),s=p,c(p)):l(p)}function c(p){return e.enter("setextHeadingLineSequence"),f(p)}function f(p){return p===s?(e.consume(p),f):(e.exit("setextHeadingLineSequence"),Ie(p)?Ye(e,h,"lineSuffix")(p):h(p))}function h(p){return p===null||Te(p)?(e.exit("setextHeadingLine"),r(p)):l(p)}}const oA={tokenize:sA};function sA(e){const r=this,l=e.attempt(eo,i,e.attempt(this.parser.constructs.flowInitial,s,Ye(e,e.attempt(this.parser.constructs.flow,s,e.attempt(hN,s)),"linePrefix")));return l;function i(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),r.currentConstruct=void 0,l}function s(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),r.currentConstruct=void 0,l}}const uA={resolveAll:y0()},cA=b0("string"),fA=b0("text");function b0(e){return{resolveAll:y0(e==="text"?dA:void 0),tokenize:r};function r(l){const i=this,s=this.parser.constructs[e],u=l.attempt(s,c,f);return c;function c(m){return p(m)?u(m):f(m)}function f(m){if(m===null){l.consume(m);return}return l.enter("data"),l.consume(m),h}function h(m){return p(m)?(l.exit("data"),u(m)):(l.consume(m),h)}function p(m){if(m===null)return!0;const b=s[m];let v=-1;if(b)for(;++v<b.length;){const x=b[v];if(!x.previous||x.previous.call(i,i.previous))return!0}return!1}}}function y0(e){return r;function r(l,i){let s=-1,u;for(;++s<=l.length;)u===void 0?l[s]&&l[s][1].type==="data"&&(u=s,s++):(!l[s]||l[s][1].type!=="data")&&(s!==u+2&&(l[u][1].end=l[s-1][1].end,l.splice(u+2,s-u-2),s=u+2),u=void 0);return e?e(l,i):l}}function dA(e,r){let l=0;for(;++l<=e.length;)if((l===e.length||e[l][1].type==="lineEnding")&&e[l-1][1].type==="data"){const i=e[l-1][1],s=r.sliceStream(i);let u=s.length,c=-1,f=0,h;for(;u--;){const p=s[u];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(p===-2)h=!0,f++;else if(p!==-1){u++;break}}if(r._contentTypeTextTrailing&&l===e.length&&(f=0),f){const p={type:l===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:i.start._bufferIndex+c,_index:i.start._index+u,line:i.end.line,column:i.end.column-f,offset:i.end.offset-f},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(e.splice(l,0,["enter",p,r],["exit",p,r]),l+=2)}l++}return e}const hA={42:on,43:on,45:on,48:on,49:on,50:on,51:on,52:on,53:on,54:on,55:on,56:on,57:on,62:c0},pA={91:yN},gA={[-2]:Wf,[-1]:Wf,32:Wf},mA={35:EN,42:Ds,45:[Xy,Ds],60:TN,61:Xy,95:Ds,96:Gy,126:Gy},bA={38:d0,92:f0},yA={[-5]:ed,[-4]:ed,[-3]:ed,33:GN,38:d0,42:Xd,60:[X4,MN],91:XN,92:[SN,f0],93:Rh,95:Xd,96:oN},xA={null:[Xd,uA]},vA={null:[42,95]},wA={null:[]},SA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:vA,contentInitial:pA,disable:wA,document:hA,flow:mA,flowInitial:gA,insideSpan:xA,string:bA,text:yA},Symbol.toStringTag,{value:"Module"}));function kA(e,r,l){let i={_bufferIndex:-1,_index:0,line:l&&l.line||1,column:l&&l.column||1,offset:l&&l.offset||0};const s={},u=[];let c=[],f=[];const h={attempt:O(U),check:O(L),consume:C,enter:j,exit:z,interrupt:O(L,{interrupt:!0})},p={code:null,containerState:{},defineSkip:w,events:[],now:S,parser:e,previous:null,sliceSerialize:v,sliceStream:x,write:b};let m=r.tokenize.call(p,h);return r.resolveAll&&u.push(r),p;function b($){return c=zn(c,$),N(),c[c.length-1]!==null?[]:(H(r,0),p.events=xu(u,p.events,p),p.events)}function v($,G){return CA(x($),G)}function x($){return EA(c,$)}function S(){const{_bufferIndex:$,_index:G,line:J,column:I,offset:Z}=i;return{_bufferIndex:$,_index:G,line:J,column:I,offset:Z}}function w($){s[$.line]=$.column,B()}function N(){let $;for(;i._index<c.length;){const G=c[i._index];if(typeof G=="string")for($=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===$&&i._bufferIndex<G.length;)E(G.charCodeAt(i._bufferIndex));else E(G)}}function E($){m=m($)}function C($){Te($)?(i.line++,i.column=1,i.offset+=$===-3?2:1,B()):$!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=$}function j($,G){const J=G||{};return J.type=$,J.start=S(),p.events.push(["enter",J,p]),f.push(J),J}function z($){const G=f.pop();return G.end=S(),p.events.push(["exit",G,p]),G}function U($,G){H($,G.from)}function L($,G){G.restore()}function O($,G){return J;function J(I,Z,F){let X,M,V,R;return Array.isArray(I)?q(I):"tokenize"in I?q([I]):D(I);function D(fe){return ge;function ge(ye){const pe=ye!==null&&fe[ye],me=ye!==null&&fe.null,xe=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(me)?me:me?[me]:[]];return q(xe)(ye)}}function q(fe){return X=fe,M=0,fe.length===0?F:A(fe[M])}function A(fe){return ge;function ge(ye){return R=Y(),V=fe,fe.partial||(p.currentConstruct=fe),fe.name&&p.parser.constructs.disable.null.includes(fe.name)?re():fe.tokenize.call(G?Object.assign(Object.create(p),G):p,h,ne,re)(ye)}}function ne(fe){return $(V,R),Z}function re(fe){return R.restore(),++M<X.length?A(X[M]):F}}}function H($,G){$.resolveAll&&!u.includes($)&&u.push($),$.resolve&&kn(p.events,G,p.events.length-G,$.resolve(p.events.slice(G),p)),$.resolveTo&&(p.events=$.resolveTo(p.events,p))}function Y(){const $=S(),G=p.previous,J=p.currentConstruct,I=p.events.length,Z=Array.from(f);return{from:I,restore:F};function F(){i=$,p.previous=G,p.currentConstruct=J,p.events.length=I,f=Z,B()}}function B(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function EA(e,r){const l=r.start._index,i=r.start._bufferIndex,s=r.end._index,u=r.end._bufferIndex;let c;if(l===s)c=[e[l].slice(i,u)];else{if(c=e.slice(l,s),i>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(i):c.shift()}u>0&&c.push(e[s].slice(0,u))}return c}function CA(e,r){let l=-1;const i=[];let s;for(;++l<e.length;){const u=e[l];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
|
|
31
|
+
`;break}case-3:{c=`\r
|
|
32
|
+
`;break}case-2:{c=r?" ":" ";break}case-1:{if(!r&&s)continue;c=" ";break}default:c=String.fromCharCode(u)}s=u===-2,i.push(c)}return i.join("")}function NA(e){const i={constructs:s0([SA,...(e||{}).extensions||[]]),content:s(H4),defined:[],document:s(P4),flow:s(oA),lazy:{},string:s(cA),text:s(fA)};return i;function s(u){return c;function c(f){return kA(i,u,f)}}}function AA(e){for(;!h0(e););return e}const Zy=/[\0\t\n\r]/g;function TA(){let e=1,r="",l=!0,i;return s;function s(u,c,f){const h=[];let p,m,b,v,x;for(u=r+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),b=0,r="",l&&(u.charCodeAt(0)===65279&&b++,l=void 0);b<u.length;){if(Zy.lastIndex=b,p=Zy.exec(u),v=p&&p.index!==void 0?p.index:u.length,x=u.charCodeAt(v),!p){r=u.slice(b);break}if(x===10&&b===v&&i)h.push(-3),i=void 0;else switch(i&&(h.push(-5),i=void 0),b<v&&(h.push(u.slice(b,v)),e+=v-b),x){case 0:{h.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,h.push(-2);e++<m;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:i=!0,e=1}b=v+1}return f&&(i&&h.push(-5),r&&h.push(r),h.push(null)),h}}const jA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function RA(e){return e.replace(jA,_A)}function _A(e,r,l){if(r)return r;if(l.charCodeAt(0)===35){const s=l.charCodeAt(1),u=s===120||s===88;return u0(l.slice(u?2:1),u?16:10)}return jh(l)||e}const x0={}.hasOwnProperty;function LA(e,r,l){return typeof r!="string"&&(l=r,r=void 0),DA(l)(AA(NA(l).document().write(TA()(e,r,!0))))}function DA(e){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(pt),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:u(Ve),blockQuote:u(me),characterEscape:Y,characterReference:Y,codeFenced:u(xe),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(xe,c),codeText:u(de,c),codeTextData:Y,data:Y,codeFlowValue:Y,definition:u(Se),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(Ee),hardBreakEscape:u(Ke),hardBreakTrailing:u(Ke),htmlFlow:u(ze,c),htmlFlowData:Y,htmlText:u(ze,c),htmlTextData:Y,image:u(zt),label:c,link:u(pt),listItem:u(Bt),listItemValue:v,listOrdered:u(mt,b),listUnordered:u(mt),paragraph:u(it),reference:A,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(Ve),strong:u(Ft),thematicBreak:u(En)},exit:{atxHeading:h(),atxHeadingSequence:U,autolink:h(),autolinkEmail:pe,autolinkProtocol:ye,blockQuote:h(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:fe,characterReference:ge,codeFenced:h(N),codeFencedFence:w,codeFencedFenceInfo:x,codeFencedFenceMeta:S,codeFlowValue:B,codeIndented:h(E),codeText:h(Z),codeTextData:B,data:B,definition:h(),definitionDestinationString:z,definitionLabelString:C,definitionTitleString:j,emphasis:h(),hardBreakEscape:h(G),hardBreakTrailing:h(G),htmlFlow:h(J),htmlFlowData:B,htmlText:h(I),htmlTextData:B,image:h(X),label:V,labelText:M,lineEnding:$,link:h(F),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ne,resourceDestinationString:R,resourceTitleString:D,resource:q,setextHeading:h(H),setextHeadingLineSequence:O,setextHeadingText:L,strong:h(),thematicBreak:h()}};v0(r,(e||{}).mdastExtensions||[]);const l={};return i;function i(oe){let be={type:"root",children:[]};const Re={stack:[be],tokenStack:[],config:r,enter:f,exit:p,buffer:c,resume:m,data:l},De=[];let Ge=-1;for(;++Ge<oe.length;)if(oe[Ge][1].type==="listOrdered"||oe[Ge][1].type==="listUnordered")if(oe[Ge][0]==="enter")De.push(Ge);else{const Gt=De.pop();Ge=s(oe,Gt,Ge)}for(Ge=-1;++Ge<oe.length;){const Gt=r[oe[Ge][0]];x0.call(Gt,oe[Ge][1].type)&&Gt[oe[Ge][1].type].call(Object.assign({sliceSerialize:oe[Ge][2].sliceSerialize},Re),oe[Ge][1])}if(Re.tokenStack.length>0){const Gt=Re.tokenStack[Re.tokenStack.length-1];(Gt[1]||Qy).call(Re,void 0,Gt[0])}for(be.position={start:el(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:el(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},Ge=-1;++Ge<r.transforms.length;)be=r.transforms[Ge](be)||be;return be}function s(oe,be,Re){let De=be-1,Ge=-1,Gt=!1,Fn,jt,xt,It;for(;++De<=Re;){const Je=oe[De];switch(Je[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Je[0]==="enter"?Ge++:Ge--,It=void 0;break}case"lineEndingBlank":{Je[0]==="enter"&&(Fn&&!It&&!Ge&&!xt&&(xt=De),It=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:It=void 0}if(!Ge&&Je[0]==="enter"&&Je[1].type==="listItemPrefix"||Ge===-1&&Je[0]==="exit"&&(Je[1].type==="listUnordered"||Je[1].type==="listOrdered")){if(Fn){let $n=De;for(jt=void 0;$n--;){const Yt=oe[$n];if(Yt[1].type==="lineEnding"||Yt[1].type==="lineEndingBlank"){if(Yt[0]==="exit")continue;jt&&(oe[jt][1].type="lineEndingBlank",Gt=!0),Yt[1].type="lineEnding",jt=$n}else if(!(Yt[1].type==="linePrefix"||Yt[1].type==="blockQuotePrefix"||Yt[1].type==="blockQuotePrefixWhitespace"||Yt[1].type==="blockQuoteMarker"||Yt[1].type==="listItemIndent"))break}xt&&(!jt||xt<jt)&&(Fn._spread=!0),Fn.end=Object.assign({},jt?oe[jt][1].start:Je[1].end),oe.splice(jt||De,0,["exit",Fn,Je[2]]),De++,Re++}if(Je[1].type==="listItemPrefix"){const $n={type:"listItem",_spread:!1,start:Object.assign({},Je[1].start),end:void 0};Fn=$n,oe.splice(De,0,["enter",$n,Je[2]]),De++,Re++,xt=void 0,It=!0}}}return oe[be][1]._spread=Gt,Re}function u(oe,be){return Re;function Re(De){f.call(this,oe(De),De),be&&be.call(this,De)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(oe,be,Re){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([be,Re||void 0]),oe.position={start:el(be.start),end:void 0}}function h(oe){return be;function be(Re){oe&&oe.call(this,Re),p.call(this,Re)}}function p(oe,be){const Re=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==oe.type&&(be?be.call(this,oe,De[0]):(De[1]||Qy).call(this,oe,De[0]));else throw new Error("Cannot close `"+oe.type+"` ("+Fa({start:oe.start,end:oe.end})+"): it’s not open");Re.position.end=el(oe.end)}function m(){return Th(this.stack.pop())}function b(){this.data.expectingFirstListItemValue=!0}function v(oe){if(this.data.expectingFirstListItemValue){const be=this.stack[this.stack.length-2];be.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function x(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.lang=oe}function S(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.meta=oe}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.value=oe.replace(/(\r?\n|\r)$/g,"")}function C(oe){const be=this.resume(),Re=this.stack[this.stack.length-1];Re.label=be,Re.identifier=Pn(this.sliceSerialize(oe)).toLowerCase()}function j(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.title=oe}function z(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.url=oe}function U(oe){const be=this.stack[this.stack.length-1];if(!be.depth){const Re=this.sliceSerialize(oe).length;be.depth=Re}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function O(oe){const be=this.stack[this.stack.length-1];be.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function Y(oe){const Re=this.stack[this.stack.length-1].children;let De=Re[Re.length-1];(!De||De.type!=="text")&&(De=at(),De.position={start:el(oe.start),end:void 0},Re.push(De)),this.stack.push(De)}function B(oe){const be=this.stack.pop();be.value+=this.sliceSerialize(oe),be.position.end=el(oe.end)}function $(oe){const be=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Re=be.children[be.children.length-1];Re.position.end=el(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(be.type)&&(Y.call(this,oe),B.call(this,oe))}function G(){this.data.atHardBreak=!0}function J(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.value=oe}function I(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.value=oe}function Z(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.value=oe}function F(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=be,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function X(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=be,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function M(oe){const be=this.sliceSerialize(oe),Re=this.stack[this.stack.length-2];Re.label=RA(be),Re.identifier=Pn(be).toLowerCase()}function V(){const oe=this.stack[this.stack.length-1],be=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){const De=oe.children;Re.children=De}else Re.alt=be}function R(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.url=oe}function D(){const oe=this.resume(),be=this.stack[this.stack.length-1];be.title=oe}function q(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function ne(oe){const be=this.resume(),Re=this.stack[this.stack.length-1];Re.label=be,Re.identifier=Pn(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function re(oe){this.data.characterReferenceType=oe.type}function fe(oe){const be=this.sliceSerialize(oe),Re=this.data.characterReferenceType;let De;Re?(De=u0(be,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=jh(be);const Ge=this.stack[this.stack.length-1];Ge.value+=De}function ge(oe){const be=this.stack.pop();be.position.end=el(oe.end)}function ye(oe){B.call(this,oe);const be=this.stack[this.stack.length-1];be.url=this.sliceSerialize(oe)}function pe(oe){B.call(this,oe);const be=this.stack[this.stack.length-1];be.url="mailto:"+this.sliceSerialize(oe)}function me(){return{type:"blockquote",children:[]}}function xe(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function Se(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ee(){return{type:"emphasis",children:[]}}function Ve(){return{type:"heading",depth:0,children:[]}}function Ke(){return{type:"break"}}function ze(){return{type:"html",value:""}}function zt(){return{type:"image",title:null,url:"",alt:null}}function pt(){return{type:"link",title:null,url:"",children:[]}}function mt(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function Bt(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function it(){return{type:"paragraph",children:[]}}function Ft(){return{type:"strong",children:[]}}function at(){return{type:"text",value:""}}function En(){return{type:"thematicBreak"}}}function el(e){return{line:e.line,column:e.column,offset:e.offset}}function v0(e,r){let l=-1;for(;++l<r.length;){const i=r[l];Array.isArray(i)?v0(e,i):OA(e,i)}}function OA(e,r){let l;for(l in r)if(x0.call(r,l))switch(l){case"canContainEols":{const i=r[l];i&&e[l].push(...i);break}case"transforms":{const i=r[l];i&&e[l].push(...i);break}case"enter":case"exit":{const i=r[l];i&&Object.assign(e[l],i);break}}}function Qy(e,r){throw e?new Error("Cannot close `"+e.type+"` ("+Fa({start:e.start,end:e.end})+"): a different token (`"+r.type+"`, "+Fa({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Fa({start:r.start,end:r.end})+") is still open")}function MA(e){const r=this;r.parser=l;function l(i){return LA(i,{...r.data("settings"),...e,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function zA(e,r){const l={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(r),!0)};return e.patch(r,l),e.applyData(r,l)}function BA(e,r){const l={type:"element",tagName:"br",properties:{},children:[]};return e.patch(r,l),[e.applyData(r,l),{type:"text",value:`
|
|
33
|
+
`}]}function FA(e,r){const l=r.value?r.value+`
|
|
34
|
+
`:"",i={},s=r.lang?r.lang.split(/\s+/):[];s.length>0&&(i.className=["language-"+s[0]]);let u={type:"element",tagName:"code",properties:i,children:[{type:"text",value:l}]};return r.meta&&(u.data={meta:r.meta}),e.patch(r,u),u=e.applyData(r,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(r,u),u}function IA(e,r){const l={type:"element",tagName:"del",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function UA(e,r){const l={type:"element",tagName:"em",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function HA(e,r){const l=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(r.identifier).toUpperCase(),s=Di(i.toLowerCase()),u=e.footnoteOrder.indexOf(i);let c,f=e.footnoteCounts.get(i);f===void 0?(f=0,e.footnoteOrder.push(i),c=e.footnoteOrder.length):c=u+1,f+=1,e.footnoteCounts.set(i,f);const h={type:"element",tagName:"a",properties:{href:"#"+l+"fn-"+s,id:l+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(r,h);const p={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(r,p),e.applyData(r,p)}function qA(e,r){const l={type:"element",tagName:"h"+r.depth,properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function PA(e,r){if(e.options.allowDangerousHtml){const l={type:"raw",value:r.value};return e.patch(r,l),e.applyData(r,l)}}function w0(e,r){const l=r.referenceType;let i="]";if(l==="collapsed"?i+="[]":l==="full"&&(i+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+i}];const s=e.all(r),u=s[0];u&&u.type==="text"?u.value="["+u.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=i:s.push({type:"text",value:i}),s}function $A(e,r){const l=String(r.identifier).toUpperCase(),i=e.definitionById.get(l);if(!i)return w0(e,r);const s={src:Di(i.url||""),alt:r.alt};i.title!==null&&i.title!==void 0&&(s.title=i.title);const u={type:"element",tagName:"img",properties:s,children:[]};return e.patch(r,u),e.applyData(r,u)}function VA(e,r){const l={src:Di(r.url)};r.alt!==null&&r.alt!==void 0&&(l.alt=r.alt),r.title!==null&&r.title!==void 0&&(l.title=r.title);const i={type:"element",tagName:"img",properties:l,children:[]};return e.patch(r,i),e.applyData(r,i)}function GA(e,r){const l={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};e.patch(r,l);const i={type:"element",tagName:"code",properties:{},children:[l]};return e.patch(r,i),e.applyData(r,i)}function YA(e,r){const l=String(r.identifier).toUpperCase(),i=e.definitionById.get(l);if(!i)return w0(e,r);const s={href:Di(i.url||"")};i.title!==null&&i.title!==void 0&&(s.title=i.title);const u={type:"element",tagName:"a",properties:s,children:e.all(r)};return e.patch(r,u),e.applyData(r,u)}function XA(e,r){const l={href:Di(r.url)};r.title!==null&&r.title!==void 0&&(l.title=r.title);const i={type:"element",tagName:"a",properties:l,children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function ZA(e,r,l){const i=e.all(r),s=l?QA(l):S0(r),u={},c=[];if(typeof r.checked=="boolean"){const m=i[0];let b;m&&m.type==="element"&&m.tagName==="p"?b=m:(b={type:"element",tagName:"p",properties:{},children:[]},i.unshift(b)),b.children.length>0&&b.children.unshift({type:"text",value:" "}),b.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<i.length;){const m=i[f];(s||f!==0||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
|
|
35
|
+
`}),m.type==="element"&&m.tagName==="p"&&!s?c.push(...m.children):c.push(m)}const h=i[i.length-1];h&&(s||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
|
|
36
|
+
`});const p={type:"element",tagName:"li",properties:u,children:c};return e.patch(r,p),e.applyData(r,p)}function QA(e){let r=!1;if(e.type==="list"){r=e.spread||!1;const l=e.children;let i=-1;for(;!r&&++i<l.length;)r=S0(l[i])}return r}function S0(e){const r=e.spread;return r??e.children.length>1}function KA(e,r){const l={},i=e.all(r);let s=-1;for(typeof r.start=="number"&&r.start!==1&&(l.start=r.start);++s<i.length;){const c=i[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){l.className=["contains-task-list"];break}}const u={type:"element",tagName:r.ordered?"ol":"ul",properties:l,children:e.wrap(i,!0)};return e.patch(r,u),e.applyData(r,u)}function JA(e,r){const l={type:"element",tagName:"p",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function WA(e,r){const l={type:"root",children:e.wrap(e.all(r))};return e.patch(r,l),e.applyData(r,l)}function eT(e,r){const l={type:"element",tagName:"strong",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function tT(e,r){const l=e.all(r),i=l.shift(),s=[];if(i){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(r.children[0],c),s.push(c)}if(l.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(l,!0)},f=Eh(r.children[1]),h=t0(r.children[r.children.length-1]);f&&h&&(c.position={start:f,end:h}),s.push(c)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(r,u),e.applyData(r,u)}function nT(e,r,l){const i=l?l.children:void 0,u=(i?i.indexOf(r):1)===0?"th":"td",c=l&&l.type==="table"?l.align:void 0,f=c?c.length:r.children.length;let h=-1;const p=[];for(;++h<f;){const b=r.children[h],v={},x=c?c[h]:void 0;x&&(v.align=x);let S={type:"element",tagName:u,properties:v,children:[]};b&&(S.children=e.all(b),e.patch(b,S),S=e.applyData(b,S)),p.push(S)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(r,m),e.applyData(r,m)}function rT(e,r){const l={type:"element",tagName:"td",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}const Ky=9,Jy=32;function lT(e){const r=String(e),l=/\r?\n|\r/g;let i=l.exec(r),s=0;const u=[];for(;i;)u.push(Wy(r.slice(s,i.index),s>0,!0),i[0]),s=i.index+i[0].length,i=l.exec(r);return u.push(Wy(r.slice(s),s>0,!1)),u.join("")}function Wy(e,r,l){let i=0,s=e.length;if(r){let u=e.codePointAt(i);for(;u===Ky||u===Jy;)i++,u=e.codePointAt(i)}if(l){let u=e.codePointAt(s-1);for(;u===Ky||u===Jy;)s--,u=e.codePointAt(s-1)}return s>i?e.slice(i,s):""}function iT(e,r){const l={type:"text",value:lT(String(r.value))};return e.patch(r,l),e.applyData(r,l)}function aT(e,r){const l={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(r,l),e.applyData(r,l)}const oT={blockquote:zA,break:BA,code:FA,delete:IA,emphasis:UA,footnoteReference:HA,heading:qA,html:PA,imageReference:$A,image:VA,inlineCode:GA,linkReference:YA,link:XA,listItem:ZA,list:KA,paragraph:JA,root:WA,strong:eT,table:tT,tableCell:rT,tableRow:nT,text:iT,thematicBreak:aT,toml:Ns,yaml:Ns,definition:Ns,footnoteDefinition:Ns};function Ns(){}const k0=-1,vu=0,Ua=1,Zs=2,_h=3,Lh=4,Dh=5,Oh=6,E0=7,C0=8,ex=typeof self=="object"?self:globalThis,sT=(e,r)=>{const l=(s,u)=>(e.set(u,s),s),i=s=>{if(e.has(s))return e.get(s);const[u,c]=r[s];switch(u){case vu:case k0:return l(c,s);case Ua:{const f=l([],s);for(const h of c)f.push(i(h));return f}case Zs:{const f=l({},s);for(const[h,p]of c)f[i(h)]=i(p);return f}case _h:return l(new Date(c),s);case Lh:{const{source:f,flags:h}=c;return l(new RegExp(f,h),s)}case Dh:{const f=l(new Map,s);for(const[h,p]of c)f.set(i(h),i(p));return f}case Oh:{const f=l(new Set,s);for(const h of c)f.add(i(h));return f}case E0:{const{name:f,message:h}=c;return l(new ex[f](h),s)}case C0:return l(BigInt(c),s);case"BigInt":return l(Object(BigInt(c)),s);case"ArrayBuffer":return l(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return l(new DataView(f),c)}}return l(new ex[u](c),s)};return i},tx=e=>sT(new Map,e)(0),vi="",{toString:uT}={},{keys:cT}=Object,Da=e=>{const r=typeof e;if(r!=="object"||!e)return[vu,r];const l=uT.call(e).slice(8,-1);switch(l){case"Array":return[Ua,vi];case"Object":return[Zs,vi];case"Date":return[_h,vi];case"RegExp":return[Lh,vi];case"Map":return[Dh,vi];case"Set":return[Oh,vi];case"DataView":return[Ua,l]}return l.includes("Array")?[Ua,l]:l.includes("Error")?[E0,l]:[Zs,l]},As=([e,r])=>e===vu&&(r==="function"||r==="symbol"),fT=(e,r,l,i)=>{const s=(c,f)=>{const h=i.push(c)-1;return l.set(f,h),h},u=c=>{if(l.has(c))return l.get(c);let[f,h]=Da(c);switch(f){case vu:{let m=c;switch(h){case"bigint":f=C0,m=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);m=null;break;case"undefined":return s([k0],c)}return s([f,m],c)}case Ua:{if(h){let v=c;return h==="DataView"?v=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(v=new Uint8Array(c)),s([h,[...v]],c)}const m=[],b=s([f,m],c);for(const v of c)m.push(u(v));return b}case Zs:{if(h)switch(h){case"BigInt":return s([h,c.toString()],c);case"Boolean":case"Number":case"String":return s([h,c.valueOf()],c)}if(r&&"toJSON"in c)return u(c.toJSON());const m=[],b=s([f,m],c);for(const v of cT(c))(e||!As(Da(c[v])))&&m.push([u(v),u(c[v])]);return b}case _h:return s([f,c.toISOString()],c);case Lh:{const{source:m,flags:b}=c;return s([f,{source:m,flags:b}],c)}case Dh:{const m=[],b=s([f,m],c);for(const[v,x]of c)(e||!(As(Da(v))||As(Da(x))))&&m.push([u(v),u(x)]);return b}case Oh:{const m=[],b=s([f,m],c);for(const v of c)(e||!As(Da(v)))&&m.push(u(v));return b}}const{message:p}=c;return s([f,{name:h,message:p}],c)};return u},nx=(e,{json:r,lossy:l}={})=>{const i=[];return fT(!(r||l),!!r,new Map,i)(e),i},Qs=typeof structuredClone=="function"?(e,r)=>r&&("json"in r||"lossy"in r)?tx(nx(e,r)):structuredClone(e):(e,r)=>tx(nx(e,r));function dT(e,r){const l=[{type:"text",value:"↩"}];return r>1&&l.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),l}function hT(e,r){return"Back to reference "+(e+1)+(r>1?"-"+r:"")}function pT(e){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=e.options.footnoteBackContent||dT,i=e.options.footnoteBackLabel||hT,s=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[h]);if(!p)continue;const m=e.all(p),b=String(p.identifier).toUpperCase(),v=Di(b.toLowerCase());let x=0;const S=[],w=e.footnoteCounts.get(b);for(;w!==void 0&&++x<=w;){S.length>0&&S.push({type:"text",value:" "});let C=typeof l=="string"?l:l(h,x);typeof C=="string"&&(C={type:"text",value:C}),S.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+v+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(h,x),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const N=m[m.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const C=N.children[N.children.length-1];C&&C.type==="text"?C.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...S)}else m.push(...S);const E={type:"element",tagName:"li",properties:{id:r+"fn-"+v},children:e.wrap(m,!0)};e.patch(p,E),f.push(E)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Qs(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
37
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
38
|
+
`}]}}const wu=(function(e){if(e==null)return yT;if(typeof e=="function")return Su(e);if(typeof e=="object")return Array.isArray(e)?gT(e):mT(e);if(typeof e=="string")return bT(e);throw new Error("Expected function, string, or object as test")});function gT(e){const r=[];let l=-1;for(;++l<e.length;)r[l]=wu(e[l]);return Su(i);function i(...s){let u=-1;for(;++u<r.length;)if(r[u].apply(this,s))return!0;return!1}}function mT(e){const r=e;return Su(l);function l(i){const s=i;let u;for(u in e)if(s[u]!==r[u])return!1;return!0}}function bT(e){return Su(r);function r(l){return l&&l.type===e}}function Su(e){return r;function r(l,i,s){return!!(xT(l)&&e.call(this,l,typeof i=="number"?i:void 0,s||void 0))}}function yT(){return!0}function xT(e){return e!==null&&typeof e=="object"&&"type"in e}const N0=[],vT=!0,Zd=!1,wT="skip";function A0(e,r,l,i){let s;typeof r=="function"&&typeof l!="function"?(i=l,l=r):s=r;const u=wu(s),c=i?-1:1;f(e,void 0,[])();function f(h,p,m){const b=h&&typeof h=="object"?h:{};if(typeof b.type=="string"){const x=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(h.type+(x?"<"+x+">":""))+")"})}return v;function v(){let x=N0,S,w,N;if((!r||u(h,p,m[m.length-1]||void 0))&&(x=ST(l(h,m)),x[0]===Zd))return x;if("children"in h&&h.children){const E=h;if(E.children&&x[0]!==wT)for(w=(i?E.children.length:-1)+c,N=m.concat(E);w>-1&&w<E.children.length;){const C=E.children[w];if(S=f(C,w,N)(),S[0]===Zd)return S;w=typeof S[1]=="number"?S[1]:w+c}}return x}}}function ST(e){return Array.isArray(e)?e:typeof e=="number"?[vT,e]:e==null?N0:[e]}function Mh(e,r,l,i){let s,u,c;typeof r=="function"&&typeof l!="function"?(u=void 0,c=r,s=l):(u=r,c=l,s=i),A0(e,u,f,s);function f(h,p){const m=p[p.length-1],b=m?m.children.indexOf(h):void 0;return c(h,b,m)}}const Qd={}.hasOwnProperty,kT={};function ET(e,r){const l=r||kT,i=new Map,s=new Map,u=new Map,c={...oT,...l.handlers},f={all:p,applyData:NT,definitionById:i,footnoteById:s,footnoteCounts:u,footnoteOrder:[],handlers:c,one:h,options:l,patch:CT,wrap:TT};return Mh(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const b=m.type==="definition"?i:s,v=String(m.identifier).toUpperCase();b.has(v)||b.set(v,m)}}),f;function h(m,b){const v=m.type,x=f.handlers[v];if(Qd.call(f.handlers,v)&&x)return x(f,m,b);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in m){const{children:w,...N}=m,E=Qs(N);return E.children=f.all(m),E}return Qs(m)}return(f.options.unknownHandler||AT)(f,m,b)}function p(m){const b=[];if("children"in m){const v=m.children;let x=-1;for(;++x<v.length;){const S=f.one(v[x],m);if(S){if(x&&v[x-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=rx(S.value)),!Array.isArray(S)&&S.type==="element")){const w=S.children[0];w&&w.type==="text"&&(w.value=rx(w.value))}Array.isArray(S)?b.push(...S):b.push(S)}}}return b}}function CT(e,r){e.position&&(r.position=h4(e))}function NT(e,r){let l=r;if(e&&e.data){const i=e.data.hName,s=e.data.hChildren,u=e.data.hProperties;if(typeof i=="string")if(l.type==="element")l.tagName=i;else{const c="children"in l?l.children:[l];l={type:"element",tagName:i,properties:{},children:c}}l.type==="element"&&u&&Object.assign(l.properties,Qs(u)),"children"in l&&l.children&&s!==null&&s!==void 0&&(l.children=s)}return l}function AT(e,r){const l=r.data||{},i="value"in r&&!(Qd.call(l,"hProperties")||Qd.call(l,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function TT(e,r){const l=[];let i=-1;for(r&&l.push({type:"text",value:`
|
|
39
|
+
`});++i<e.length;)i&&l.push({type:"text",value:`
|
|
40
|
+
`}),l.push(e[i]);return r&&e.length>0&&l.push({type:"text",value:`
|
|
41
|
+
`}),l}function rx(e){let r=0,l=e.charCodeAt(r);for(;l===9||l===32;)r++,l=e.charCodeAt(r);return e.slice(r)}function lx(e,r){const l=ET(e,r),i=l.one(e,void 0),s=pT(l),u=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return s&&u.children.push({type:"text",value:`
|
|
42
|
+
`},s),u}function jT(e,r){return e&&"run"in e?async function(l,i){const s=lx(l,{file:i,...r});await e.run(s,i)}:function(l,i){return lx(l,{file:i,...e||r})}}function ix(e){if(e)throw e}var td,ax;function RT(){if(ax)return td;ax=1;var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,l=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(p){return typeof Array.isArray=="function"?Array.isArray(p):r.call(p)==="[object Array]"},u=function(p){if(!p||r.call(p)!=="[object Object]")return!1;var m=e.call(p,"constructor"),b=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!m&&!b)return!1;var v;for(v in p);return typeof v>"u"||e.call(p,v)},c=function(p,m){l&&m.name==="__proto__"?l(p,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):p[m.name]=m.newValue},f=function(p,m){if(m==="__proto__")if(e.call(p,m)){if(i)return i(p,m).value}else return;return p[m]};return td=function h(){var p,m,b,v,x,S,w=arguments[0],N=1,E=arguments.length,C=!1;for(typeof w=="boolean"&&(C=w,w=arguments[1]||{},N=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});N<E;++N)if(p=arguments[N],p!=null)for(m in p)b=f(w,m),v=f(p,m),w!==v&&(C&&v&&(u(v)||(x=s(v)))?(x?(x=!1,S=b&&s(b)?b:[]):S=b&&u(b)?b:{},c(w,{name:m,newValue:h(C,S,v)})):typeof v<"u"&&c(w,{name:m,newValue:v}));return w},td}var _T=RT();const nd=lu(_T);function Kd(e){if(typeof e!="object"||e===null)return!1;const r=Object.getPrototypeOf(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function LT(){const e=[],r={run:l,use:i};return r;function l(...s){let u=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...s);function f(h,...p){const m=e[++u];let b=-1;if(h){c(h);return}for(;++b<s.length;)(p[b]===null||p[b]===void 0)&&(p[b]=s[b]);s=p,m?DT(m,f)(...p):c(null,...p)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),r}}function DT(e,r){let l;return i;function i(...c){const f=e.length>c.length;let h;f&&c.push(s);try{h=e.apply(this,c)}catch(p){const m=p;if(f&&l)throw m;return s(m)}f||(h&&h.then&&typeof h.then=="function"?h.then(u,s):h instanceof Error?s(h):u(h))}function s(c,...f){l||(l=!0,r(c,...f))}function u(c){s(null,c)}}const Kn={basename:OT,dirname:MT,extname:zT,join:BT,sep:"/"};function OT(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');to(e);let l=0,i=-1,s=e.length,u;if(r===void 0||r.length===0||r.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(u){l=s+1;break}}else i<0&&(u=!0,i=s+1);return i<0?"":e.slice(l,i)}if(r===e)return"";let c=-1,f=r.length-1;for(;s--;)if(e.codePointAt(s)===47){if(u){l=s+1;break}}else c<0&&(u=!0,c=s+1),f>-1&&(e.codePointAt(s)===r.codePointAt(f--)?f<0&&(i=s):(f=-1,i=c));return l===i?i=c:i<0&&(i=e.length),e.slice(l,i)}function MT(e){if(to(e),e.length===0)return".";let r=-1,l=e.length,i;for(;--l;)if(e.codePointAt(l)===47){if(i){r=l;break}}else i||(i=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)}function zT(e){to(e);let r=e.length,l=-1,i=0,s=-1,u=0,c;for(;r--;){const f=e.codePointAt(r);if(f===47){if(c){i=r+1;break}continue}l<0&&(c=!0,l=r+1),f===46?s<0?s=r:u!==1&&(u=1):s>-1&&(u=-1)}return s<0||l<0||u===0||u===1&&s===l-1&&s===i+1?"":e.slice(s,l)}function BT(...e){let r=-1,l;for(;++r<e.length;)to(e[r]),e[r]&&(l=l===void 0?e[r]:l+"/"+e[r]);return l===void 0?".":FT(l)}function FT(e){to(e);const r=e.codePointAt(0)===47;let l=IT(e,!r);return l.length===0&&!r&&(l="."),l.length>0&&e.codePointAt(e.length-1)===47&&(l+="/"),r?"/"+l:l}function IT(e,r){let l="",i=0,s=-1,u=0,c=-1,f,h;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(s===c-1||u===1))if(s!==c-1&&u===2){if(l.length<2||i!==2||l.codePointAt(l.length-1)!==46||l.codePointAt(l.length-2)!==46){if(l.length>2){if(h=l.lastIndexOf("/"),h!==l.length-1){h<0?(l="",i=0):(l=l.slice(0,h),i=l.length-1-l.lastIndexOf("/")),s=c,u=0;continue}}else if(l.length>0){l="",i=0,s=c,u=0;continue}}r&&(l=l.length>0?l+"/..":"..",i=2)}else l.length>0?l+="/"+e.slice(s+1,c):l=e.slice(s+1,c),i=c-s-1;s=c,u=0}else f===46&&u>-1?u++:u=-1}return l}function to(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const UT={cwd:HT};function HT(){return"/"}function Jd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function qT(e){if(typeof e=="string")e=new URL(e);else if(!Jd(e)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(e.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return PT(e)}function PT(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const r=e.pathname;let l=-1;for(;++l<r.length;)if(r.codePointAt(l)===37&&r.codePointAt(l+1)===50){const i=r.codePointAt(l+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(r)}const rd=["history","path","basename","stem","extname","dirname"];class T0{constructor(r){let l;r?Jd(r)?l={path:r}:typeof r=="string"||$T(r)?l={value:r}:l=r:l={},this.cwd="cwd"in l?"":UT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<rd.length;){const u=rd[i];u in l&&l[u]!==void 0&&l[u]!==null&&(this[u]=u==="history"?[...l[u]]:l[u])}let s;for(s in l)rd.includes(s)||(this[s]=l[s])}get basename(){return typeof this.path=="string"?Kn.basename(this.path):void 0}set basename(r){id(r,"basename"),ld(r,"basename"),this.path=Kn.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?Kn.dirname(this.path):void 0}set dirname(r){ox(this.basename,"dirname"),this.path=Kn.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?Kn.extname(this.path):void 0}set extname(r){if(ld(r,"extname"),ox(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Kn.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){Jd(r)&&(r=qT(r)),id(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?Kn.basename(this.path,this.extname):void 0}set stem(r){id(r,"stem"),ld(r,"stem"),this.path=Kn.join(this.dirname||"",r+(this.extname||""))}fail(r,l,i){const s=this.message(r,l,i);throw s.fatal=!0,s}info(r,l,i){const s=this.message(r,l,i);return s.fatal=void 0,s}message(r,l,i){const s=new Vt(r,l,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function ld(e,r){if(e&&e.includes(Kn.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+Kn.sep+"`")}function id(e,r){if(!e)throw new Error("`"+r+"` cannot be empty")}function ox(e,r){if(!e)throw new Error("Setting `"+r+"` requires `path` to be set too")}function $T(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const VT=(function(e){const i=this.constructor.prototype,s=i[e],u=function(){return s.apply(u,arguments)};return Object.setPrototypeOf(u,i),u}),GT={}.hasOwnProperty;class zh extends VT{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=LT()}copy(){const r=new zh;let l=-1;for(;++l<this.attachers.length;){const i=this.attachers[l];r.use(...i)}return r.data(nd(!0,{},this.namespace)),r}data(r,l){return typeof r=="string"?arguments.length===2?(sd("data",this.frozen),this.namespace[r]=l,this):GT.call(this.namespace,r)&&this.namespace[r]||void 0:r?(sd("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[l,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=l.call(r,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const l=Ts(r),i=this.parser||this.Parser;return ad("parse",i),i(String(l),l)}process(r,l){const i=this;return this.freeze(),ad("process",this.parser||this.Parser),od("process",this.compiler||this.Compiler),l?s(void 0,l):new Promise(s);function s(u,c){const f=Ts(r),h=i.parse(f);i.run(h,f,function(m,b,v){if(m||!b||!v)return p(m);const x=b,S=i.stringify(x,v);ZT(S)?v.value=S:v.result=S,p(m,v)});function p(m,b){m||!b?c(m):u?u(b):l(void 0,b)}}}processSync(r){let l=!1,i;return this.freeze(),ad("processSync",this.parser||this.Parser),od("processSync",this.compiler||this.Compiler),this.process(r,s),ux("processSync","process",l),i;function s(u,c){l=!0,ix(u),i=c}}run(r,l,i){sx(r),this.freeze();const s=this.transformers;return!i&&typeof l=="function"&&(i=l,l=void 0),i?u(void 0,i):new Promise(u);function u(c,f){const h=Ts(l);s.run(r,h,p);function p(m,b,v){const x=b||r;m?f(m):c?c(x):i(void 0,x,v)}}}runSync(r,l){let i=!1,s;return this.run(r,l,u),ux("runSync","run",i),s;function u(c,f){ix(c),s=f,i=!0}}stringify(r,l){this.freeze();const i=Ts(l),s=this.compiler||this.Compiler;return od("stringify",s),sx(r),s(r,i)}use(r,...l){const i=this.attachers,s=this.namespace;if(sd("use",this.frozen),r!=null)if(typeof r=="function")h(r,l);else if(typeof r=="object")Array.isArray(r)?f(r):c(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function u(p){if(typeof p=="function")h(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[m,...b]=p;h(m,b)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(p.plugins),p.settings&&(s.settings=nd(!0,s.settings,p.settings))}function f(p){let m=-1;if(p!=null)if(Array.isArray(p))for(;++m<p.length;){const b=p[m];u(b)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function h(p,m){let b=-1,v=-1;for(;++b<i.length;)if(i[b][0]===p){v=b;break}if(v===-1)i.push([p,...m]);else if(m.length>0){let[x,...S]=m;const w=i[v][1];Kd(w)&&Kd(x)&&(x=nd(!0,w,x)),i[v]=[p,x,...S]}}}}const YT=new zh().freeze();function ad(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function od(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sd(e,r){if(r)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function sx(e){if(!Kd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ux(e,r,l){if(!l)throw new Error("`"+e+"` finished async. Use `"+r+"` instead")}function Ts(e){return XT(e)?e:new T0(e)}function XT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ZT(e){return typeof e=="string"||QT(e)}function QT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const KT="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",cx=[],fx={allowDangerousHtml:!0},JT=/^(https?|ircs?|mailto|xmpp)$/i,WT=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Bh(e){const r=e6(e),l=t6(e);return n6(r.runSync(r.parse(l),l),e)}function e6(e){const r=e.rehypePlugins||cx,l=e.remarkPlugins||cx,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...fx}:fx;return YT().use(MA).use(l).use(jT,i).use(r)}function t6(e){const r=e.children||"",l=new T0;return typeof r=="string"&&(l.value=r),l}function n6(e,r){const l=r.allowedElements,i=r.allowElement,s=r.components,u=r.disallowedElements,c=r.skipHtml,f=r.unwrapDisallowed,h=r.urlTransform||r6;for(const m of WT)Object.hasOwn(r,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+KT+m.id,void 0);return Mh(e,p),y4(e,{Fragment:y.Fragment,components:s,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function p(m,b,v){if(m.type==="raw"&&v&&typeof b=="number")return c?v.children.splice(b,1):v.children[b]={type:"text",value:m.value},b;if(m.type==="element"){let x;for(x in Jf)if(Object.hasOwn(Jf,x)&&Object.hasOwn(m.properties,x)){const S=m.properties[x],w=Jf[x];(w===null||w.includes(m.tagName))&&(m.properties[x]=h(String(S||""),x,m))}}if(m.type==="element"){let x=l?!l.includes(m.tagName):u?u.includes(m.tagName):!1;if(!x&&i&&typeof b=="number"&&(x=!i(m,b,v)),x&&v&&typeof b=="number")return f&&m.children?v.children.splice(b,1,...m.children):v.children.splice(b,1),b}}}function r6(e){const r=e.indexOf(":"),l=e.indexOf("?"),i=e.indexOf("#"),s=e.indexOf("/");return r===-1||s!==-1&&r>s||l!==-1&&r>l||i!==-1&&r>i||JT.test(e.slice(0,r))?e:""}function dx(e,r){const l=String(e);if(typeof r!="string")throw new TypeError("Expected character");let i=0,s=l.indexOf(r);for(;s!==-1;)i++,s=l.indexOf(r,s+r.length);return i}function l6(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function i6(e,r,l){const s=wu((l||{}).ignore||[]),u=a6(r);let c=-1;for(;++c<u.length;)A0(e,"text",f);function f(p,m){let b=-1,v;for(;++b<m.length;){const x=m[b],S=v?v.children:void 0;if(s(x,S?S.indexOf(x):void 0,v))return;v=x}if(v)return h(p,m)}function h(p,m){const b=m[m.length-1],v=u[c][0],x=u[c][1];let S=0;const N=b.children.indexOf(p);let E=!1,C=[];v.lastIndex=0;let j=v.exec(p.value);for(;j;){const z=j.index,U={index:j.index,input:j.input,stack:[...m,p]};let L=x(...j,U);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?v.lastIndex=z+1:(S!==z&&C.push({type:"text",value:p.value.slice(S,z)}),Array.isArray(L)?C.push(...L):L&&C.push(L),S=z+j[0].length,E=!0),!v.global)break;j=v.exec(p.value)}return E?(S<p.value.length&&C.push({type:"text",value:p.value.slice(S)}),b.children.splice(N,1,...C)):C=[p],N+C.length}}function a6(e){const r=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const l=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<l.length;){const s=l[i];r.push([o6(s[0]),s6(s[1])])}return r}function o6(e){return typeof e=="string"?new RegExp(l6(e),"g"):e}function s6(e){return typeof e=="function"?e:function(){return e}}const ud="phrasing",cd=["autolink","link","image","label"];function u6(){return{transforms:[m6],enter:{literalAutolink:f6,literalAutolinkEmail:fd,literalAutolinkHttp:fd,literalAutolinkWww:fd},exit:{literalAutolink:g6,literalAutolinkEmail:p6,literalAutolinkHttp:d6,literalAutolinkWww:h6}}}function c6(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ud,notInConstruct:cd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ud,notInConstruct:cd},{character:":",before:"[ps]",after:"\\/",inConstruct:ud,notInConstruct:cd}]}}function f6(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function fd(e){this.config.enter.autolinkProtocol.call(this,e)}function d6(e){this.config.exit.autolinkProtocol.call(this,e)}function h6(e){this.config.exit.data.call(this,e);const r=this.stack[this.stack.length-1];r.type,r.url="http://"+this.sliceSerialize(e)}function p6(e){this.config.exit.autolinkEmail.call(this,e)}function g6(e){this.exit(e)}function m6(e){i6(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,b6],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),y6]],{ignore:["link","linkReference"]})}function b6(e,r,l,i,s){let u="";if(!j0(s)||(/^w/i.test(r)&&(l=r+l,r="",u="http://"),!x6(l)))return!1;const c=v6(l+i);if(!c[0])return!1;const f={type:"link",title:null,url:u+r+c[0],children:[{type:"text",value:r+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function y6(e,r,l,i){return!j0(i,!0)||/[-\d_]$/.test(l)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+l,children:[{type:"text",value:r+"@"+l}]}}function x6(e){const r=e.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function v6(e){const r=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!r)return[e,void 0];e=e.slice(0,r.index);let l=r[0],i=l.indexOf(")");const s=dx(e,"(");let u=dx(e,")");for(;i!==-1&&s>u;)e+=l.slice(0,i+1),l=l.slice(i+1),i=l.indexOf(")"),u++;return[e,l]}function j0(e,r){const l=e.input.charCodeAt(e.index-1);return(e.index===0||Ol(l)||yu(l))&&(!r||l!==47)}R0.peek=j6;function w6(){this.buffer()}function S6(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function k6(){this.buffer()}function E6(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function C6(e){const r=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=Pn(this.sliceSerialize(e)).toLowerCase(),l.label=r}function N6(e){this.exit(e)}function A6(e){const r=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=Pn(this.sliceSerialize(e)).toLowerCase(),l.label=r}function T6(e){this.exit(e)}function j6(){return"["}function R0(e,r,l,i){const s=l.createTracker(i);let u=s.move("[^");const c=l.enter("footnoteReference"),f=l.enter("reference");return u+=s.move(l.safe(l.associationId(e),{after:"]",before:u})),f(),c(),u+=s.move("]"),u}function R6(){return{enter:{gfmFootnoteCallString:w6,gfmFootnoteCall:S6,gfmFootnoteDefinitionLabelString:k6,gfmFootnoteDefinition:E6},exit:{gfmFootnoteCallString:C6,gfmFootnoteCall:N6,gfmFootnoteDefinitionLabelString:A6,gfmFootnoteDefinition:T6}}}function _6(e){let r=!1;return e&&e.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:l,footnoteReference:R0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(i,s,u,c){const f=u.createTracker(c);let h=f.move("[^");const p=u.enter("footnoteDefinition"),m=u.enter("label");return h+=f.move(u.safe(u.associationId(i),{before:h,after:"]"})),m(),h+=f.move("]:"),i.children&&i.children.length>0&&(f.shift(4),h+=f.move((r?`
|
|
43
|
+
`:" ")+u.indentLines(u.containerFlow(i,f.current()),r?_0:L6))),p(),h}}function L6(e,r,l){return r===0?e:_0(e,r,l)}function _0(e,r,l){return(l?"":" ")+e}const D6=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];L0.peek=F6;function O6(){return{canContainEols:["delete"],enter:{strikethrough:z6},exit:{strikethrough:B6}}}function M6(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:D6}],handlers:{delete:L0}}}function z6(e){this.enter({type:"delete",children:[]},e)}function B6(e){this.exit(e)}function L0(e,r,l,i){const s=l.createTracker(i),u=l.enter("strikethrough");let c=s.move("~~");return c+=l.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),u(),c}function F6(){return"~"}function I6(e){return e.length}function U6(e,r){const l=r||{},i=(l.align||[]).concat(),s=l.stringLength||I6,u=[],c=[],f=[],h=[];let p=0,m=-1;for(;++m<e.length;){const w=[],N=[];let E=-1;for(e[m].length>p&&(p=e[m].length);++E<e[m].length;){const C=H6(e[m][E]);if(l.alignDelimiters!==!1){const j=s(C);N[E]=j,(h[E]===void 0||j>h[E])&&(h[E]=j)}w.push(C)}c[m]=w,f[m]=N}let b=-1;if(typeof i=="object"&&"length"in i)for(;++b<p;)u[b]=hx(i[b]);else{const w=hx(i);for(;++b<p;)u[b]=w}b=-1;const v=[],x=[];for(;++b<p;){const w=u[b];let N="",E="";w===99?(N=":",E=":"):w===108?N=":":w===114&&(E=":");let C=l.alignDelimiters===!1?1:Math.max(1,h[b]-N.length-E.length);const j=N+"-".repeat(C)+E;l.alignDelimiters!==!1&&(C=N.length+C+E.length,C>h[b]&&(h[b]=C),x[b]=C),v[b]=j}c.splice(1,0,v),f.splice(1,0,x),m=-1;const S=[];for(;++m<c.length;){const w=c[m],N=f[m];b=-1;const E=[];for(;++b<p;){const C=w[b]||"";let j="",z="";if(l.alignDelimiters!==!1){const U=h[b]-(N[b]||0),L=u[b];L===114?j=" ".repeat(U):L===99?U%2?(j=" ".repeat(U/2+.5),z=" ".repeat(U/2-.5)):(j=" ".repeat(U/2),z=j):z=" ".repeat(U)}l.delimiterStart!==!1&&!b&&E.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&C==="")&&(l.delimiterStart!==!1||b)&&E.push(" "),l.alignDelimiters!==!1&&E.push(j),E.push(C),l.alignDelimiters!==!1&&E.push(z),l.padding!==!1&&E.push(" "),(l.delimiterEnd!==!1||b!==p-1)&&E.push("|")}S.push(l.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return S.join(`
|
|
44
|
+
`)}function H6(e){return e==null?"":String(e)}function hx(e){const r=typeof e=="string"?e.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}function q6(e,r,l,i){const s=l.enter("blockquote"),u=l.createTracker(i);u.move("> "),u.shift(2);const c=l.indentLines(l.containerFlow(e,u.current()),P6);return s(),c}function P6(e,r,l){return">"+(l?"":" ")+e}function $6(e,r){return px(e,r.inConstruct,!0)&&!px(e,r.notInConstruct,!1)}function px(e,r,l){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return l;let i=-1;for(;++i<r.length;)if(e.includes(r[i]))return!0;return!1}function gx(e,r,l,i){let s=-1;for(;++s<l.unsafe.length;)if(l.unsafe[s].character===`
|
|
45
|
+
`&&$6(l.stack,l.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
46
|
+
`}function V6(e,r){const l=String(e);let i=l.indexOf(r),s=i,u=0,c=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===s?++u>c&&(c=u):u=1,s=i+r.length,i=l.indexOf(r,s);return c}function G6(e,r){return!!(r.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Y6(e){const r=e.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function X6(e,r,l,i){const s=Y6(l),u=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(G6(e,l)){const b=l.enter("codeIndented"),v=l.indentLines(u,Z6);return b(),v}const f=l.createTracker(i),h=s.repeat(Math.max(V6(u,s)+1,3)),p=l.enter("codeFenced");let m=f.move(h);if(e.lang){const b=l.enter(`codeFencedLang${c}`);m+=f.move(l.safe(e.lang,{before:m,after:" ",encode:["`"],...f.current()})),b()}if(e.lang&&e.meta){const b=l.enter(`codeFencedMeta${c}`);m+=f.move(" "),m+=f.move(l.safe(e.meta,{before:m,after:`
|
|
47
|
+
`,encode:["`"],...f.current()})),b()}return m+=f.move(`
|
|
48
|
+
`),u&&(m+=f.move(u+`
|
|
49
|
+
`)),m+=f.move(h),p(),m}function Z6(e,r,l){return(l?"":" ")+e}function Fh(e){const r=e.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function Q6(e,r,l,i){const s=Fh(l),u=s==='"'?"Quote":"Apostrophe",c=l.enter("definition");let f=l.enter("label");const h=l.createTracker(i);let p=h.move("[");return p+=h.move(l.safe(l.associationId(e),{before:p,after:"]",...h.current()})),p+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=l.enter("destinationLiteral"),p+=h.move("<"),p+=h.move(l.safe(e.url,{before:p,after:">",...h.current()})),p+=h.move(">")):(f=l.enter("destinationRaw"),p+=h.move(l.safe(e.url,{before:p,after:e.title?" ":`
|
|
50
|
+
`,...h.current()}))),f(),e.title&&(f=l.enter(`title${u}`),p+=h.move(" "+s),p+=h.move(l.safe(e.title,{before:p,after:s,...h.current()})),p+=h.move(s),f()),c(),p}function K6(e){const r=e.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function Ya(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ks(e,r,l){const i=Ri(e),s=Ri(r);return i===void 0?s===void 0?l==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}D0.peek=J6;function D0(e,r,l,i){const s=K6(l),u=l.enter("emphasis"),c=l.createTracker(i),f=c.move(s);let h=c.move(l.containerPhrasing(e,{after:s,before:f,...c.current()}));const p=h.charCodeAt(0),m=Ks(i.before.charCodeAt(i.before.length-1),p,s);m.inside&&(h=Ya(p)+h.slice(1));const b=h.charCodeAt(h.length-1),v=Ks(i.after.charCodeAt(0),b,s);v.inside&&(h=h.slice(0,-1)+Ya(b));const x=c.move(s);return u(),l.attentionEncodeSurroundingInfo={after:v.outside,before:m.outside},f+h+x}function J6(e,r,l){return l.options.emphasis||"*"}function W6(e,r){let l=!1;return Mh(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return l=!0,Zd}),!!((!e.depth||e.depth<3)&&Th(e)&&(r.options.setext||l))}function e5(e,r,l,i){const s=Math.max(Math.min(6,e.depth||1),1),u=l.createTracker(i);if(W6(e,l)){const m=l.enter("headingSetext"),b=l.enter("phrasing"),v=l.containerPhrasing(e,{...u.current(),before:`
|
|
51
|
+
`,after:`
|
|
52
|
+
`});return b(),m(),v+`
|
|
53
|
+
`+(s===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
|
|
54
|
+
`))+1))}const c="#".repeat(s),f=l.enter("headingAtx"),h=l.enter("phrasing");u.move(c+" ");let p=l.containerPhrasing(e,{before:"# ",after:`
|
|
55
|
+
`,...u.current()});return/^[\t ]/.test(p)&&(p=Ya(p.charCodeAt(0))+p.slice(1)),p=p?c+" "+p:c,l.options.closeAtx&&(p+=" "+c),h(),f(),p}O0.peek=t5;function O0(e){return e.value||""}function t5(){return"<"}M0.peek=n5;function M0(e,r,l,i){const s=Fh(l),u=s==='"'?"Quote":"Apostrophe",c=l.enter("image");let f=l.enter("label");const h=l.createTracker(i);let p=h.move("![");return p+=h.move(l.safe(e.alt,{before:p,after:"]",...h.current()})),p+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=l.enter("destinationLiteral"),p+=h.move("<"),p+=h.move(l.safe(e.url,{before:p,after:">",...h.current()})),p+=h.move(">")):(f=l.enter("destinationRaw"),p+=h.move(l.safe(e.url,{before:p,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=l.enter(`title${u}`),p+=h.move(" "+s),p+=h.move(l.safe(e.title,{before:p,after:s,...h.current()})),p+=h.move(s),f()),p+=h.move(")"),c(),p}function n5(){return"!"}z0.peek=r5;function z0(e,r,l,i){const s=e.referenceType,u=l.enter("imageReference");let c=l.enter("label");const f=l.createTracker(i);let h=f.move("![");const p=l.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(p+"]["),c();const m=l.stack;l.stack=[],c=l.enter("reference");const b=l.safe(l.associationId(e),{before:h,after:"]",...f.current()});return c(),l.stack=m,u(),s==="full"||!p||p!==b?h+=f.move(b+"]"):s==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function r5(){return"!"}B0.peek=l5;function B0(e,r,l){let i=e.value||"",s="`",u=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++u<l.unsafe.length;){const c=l.unsafe[u],f=l.compilePattern(c);let h;if(c.atBreak)for(;h=f.exec(i);){let p=h.index;i.charCodeAt(p)===10&&i.charCodeAt(p-1)===13&&p--,i=i.slice(0,p)+" "+i.slice(h.index+1)}}return s+i+s}function l5(){return"`"}function F0(e,r){const l=Th(e);return!!(!r.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(l===e.url||"mailto:"+l===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}I0.peek=i5;function I0(e,r,l,i){const s=Fh(l),u=s==='"'?"Quote":"Apostrophe",c=l.createTracker(i);let f,h;if(F0(e,l)){const m=l.stack;l.stack=[],f=l.enter("autolink");let b=c.move("<");return b+=c.move(l.containerPhrasing(e,{before:b,after:">",...c.current()})),b+=c.move(">"),f(),l.stack=m,b}f=l.enter("link"),h=l.enter("label");let p=c.move("[");return p+=c.move(l.containerPhrasing(e,{before:p,after:"](",...c.current()})),p+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=l.enter("destinationLiteral"),p+=c.move("<"),p+=c.move(l.safe(e.url,{before:p,after:">",...c.current()})),p+=c.move(">")):(h=l.enter("destinationRaw"),p+=c.move(l.safe(e.url,{before:p,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=l.enter(`title${u}`),p+=c.move(" "+s),p+=c.move(l.safe(e.title,{before:p,after:s,...c.current()})),p+=c.move(s),h()),p+=c.move(")"),f(),p}function i5(e,r,l){return F0(e,l)?"<":"["}U0.peek=a5;function U0(e,r,l,i){const s=e.referenceType,u=l.enter("linkReference");let c=l.enter("label");const f=l.createTracker(i);let h=f.move("[");const p=l.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(p+"]["),c();const m=l.stack;l.stack=[],c=l.enter("reference");const b=l.safe(l.associationId(e),{before:h,after:"]",...f.current()});return c(),l.stack=m,u(),s==="full"||!p||p!==b?h+=f.move(b+"]"):s==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function a5(){return"["}function Ih(e){const r=e.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function o5(e){const r=Ih(e),l=e.options.bulletOther;if(!l)return r==="*"?"-":"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(l===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+l+"`) to be different");return l}function s5(e){const r=e.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function H0(e){const r=e.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function u5(e,r,l,i){const s=l.enter("list"),u=l.bulletCurrent;let c=e.ordered?s5(l):Ih(l);const f=e.ordered?c==="."?")":".":o5(l);let h=r&&l.bulletLastUsed?c===l.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&m&&(!m.children||!m.children[0])&&l.stack[l.stack.length-1]==="list"&&l.stack[l.stack.length-2]==="listItem"&&l.stack[l.stack.length-3]==="list"&&l.stack[l.stack.length-4]==="listItem"&&l.indexStack[l.indexStack.length-1]===0&&l.indexStack[l.indexStack.length-2]===0&&l.indexStack[l.indexStack.length-3]===0&&(h=!0),H0(l)===c&&m){let b=-1;for(;++b<e.children.length;){const v=e.children[b];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=f),l.bulletCurrent=c;const p=l.containerFlow(e,i);return l.bulletLastUsed=c,l.bulletCurrent=u,s(),p}function c5(e){const r=e.options.listItemIndent||"one";if(r!=="tab"&&r!=="one"&&r!=="mixed")throw new Error("Cannot serialize items with `"+r+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return r}function f5(e,r,l,i){const s=c5(l);let u=l.bulletCurrent||Ih(l);r&&r.type==="list"&&r.ordered&&(u=(typeof r.start=="number"&&r.start>-1?r.start:1)+(l.options.incrementListMarker===!1?0:r.children.indexOf(e))+u);let c=u.length+1;(s==="tab"||s==="mixed"&&(r&&r.type==="list"&&r.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=l.createTracker(i);f.move(u+" ".repeat(c-u.length)),f.shift(c);const h=l.enter("listItem"),p=l.indentLines(l.containerFlow(e,f.current()),m);return h(),p;function m(b,v,x){return v?(x?"":" ".repeat(c))+b:(x?u:u+" ".repeat(c-u.length))+b}}function d5(e,r,l,i){const s=l.enter("paragraph"),u=l.enter("phrasing"),c=l.containerPhrasing(e,i);return u(),s(),c}const h5=wu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function p5(e,r,l,i){return(e.children.some(function(c){return h5(c)})?l.containerPhrasing:l.containerFlow).call(l,e,i)}function g5(e){const r=e.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}q0.peek=m5;function q0(e,r,l,i){const s=g5(l),u=l.enter("strong"),c=l.createTracker(i),f=c.move(s+s);let h=c.move(l.containerPhrasing(e,{after:s,before:f,...c.current()}));const p=h.charCodeAt(0),m=Ks(i.before.charCodeAt(i.before.length-1),p,s);m.inside&&(h=Ya(p)+h.slice(1));const b=h.charCodeAt(h.length-1),v=Ks(i.after.charCodeAt(0),b,s);v.inside&&(h=h.slice(0,-1)+Ya(b));const x=c.move(s+s);return u(),l.attentionEncodeSurroundingInfo={after:v.outside,before:m.outside},f+h+x}function m5(e,r,l){return l.options.strong||"*"}function b5(e,r,l,i){return l.safe(e.value,i)}function y5(e){const r=e.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function x5(e,r,l){const i=(H0(l)+(l.options.ruleSpaces?" ":"")).repeat(y5(l));return l.options.ruleSpaces?i.slice(0,-1):i}const P0={blockquote:q6,break:gx,code:X6,definition:Q6,emphasis:D0,hardBreak:gx,heading:e5,html:O0,image:M0,imageReference:z0,inlineCode:B0,link:I0,linkReference:U0,list:u5,listItem:f5,paragraph:d5,root:p5,strong:q0,text:b5,thematicBreak:x5};function v5(){return{enter:{table:w5,tableData:mx,tableHeader:mx,tableRow:k5},exit:{codeText:E5,table:S5,tableData:dd,tableHeader:dd,tableRow:dd}}}function w5(e){const r=e._align;this.enter({type:"table",align:r.map(function(l){return l==="none"?null:l}),children:[]},e),this.data.inTable=!0}function S5(e){this.exit(e),this.data.inTable=void 0}function k5(e){this.enter({type:"tableRow",children:[]},e)}function dd(e){this.exit(e)}function mx(e){this.enter({type:"tableCell",children:[]},e)}function E5(e){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,C5));const l=this.stack[this.stack.length-1];l.type,l.value=r,this.exit(e)}function C5(e,r){return r==="|"?r:e}function N5(e){const r=e||{},l=r.tableCellPadding,i=r.tablePipeAlign,s=r.stringLength,u=l?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
56
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:c,tableCell:h,tableRow:f}};function c(x,S,w,N){return p(m(x,w,N),x.align)}function f(x,S,w,N){const E=b(x,w,N),C=p([E]);return C.slice(0,C.indexOf(`
|
|
57
|
+
`))}function h(x,S,w,N){const E=w.enter("tableCell"),C=w.enter("phrasing"),j=w.containerPhrasing(x,{...N,before:u,after:u});return C(),E(),j}function p(x,S){return U6(x,{align:S,alignDelimiters:i,padding:l,stringLength:s})}function m(x,S,w){const N=x.children;let E=-1;const C=[],j=S.enter("table");for(;++E<N.length;)C[E]=b(N[E],S,w);return j(),C}function b(x,S,w){const N=x.children;let E=-1;const C=[],j=S.enter("tableRow");for(;++E<N.length;)C[E]=h(N[E],x,S,w);return j(),C}function v(x,S,w){let N=P0.inlineCode(x,S,w);return w.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function A5(){return{exit:{taskListCheckValueChecked:bx,taskListCheckValueUnchecked:bx,paragraph:j5}}}function T5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:R5}}}function bx(e){const r=this.stack[this.stack.length-2];r.type,r.checked=e.type==="taskListCheckValueChecked"}function j5(e){const r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){const l=this.stack[this.stack.length-1];l.type;const i=l.children[0];if(i&&i.type==="text"){const s=r.children;let u=-1,c;for(;++u<s.length;){const f=s[u];if(f.type==="paragraph"){c=f;break}}c===l&&(i.value=i.value.slice(1),i.value.length===0?l.children.shift():l.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,l.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function R5(e,r,l,i){const s=e.children[0],u=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=l.createTracker(i);u&&f.move(c);let h=P0.listItem(e,r,l,{...i,...f.current()});return u&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),h;function p(m){return m+c}}function _5(){return[u6(),R6(),O6(),v5(),A5()]}function L5(e){return{extensions:[c6(),_6(e),M6(),N5(e),T5()]}}const D5={tokenize:I5,partial:!0},$0={tokenize:U5,partial:!0},V0={tokenize:H5,partial:!0},G0={tokenize:q5,partial:!0},O5={tokenize:P5,partial:!0},Y0={name:"wwwAutolink",tokenize:B5,previous:Z0},X0={name:"protocolAutolink",tokenize:F5,previous:Q0},Nr={name:"emailAutolink",tokenize:z5,previous:K0},tr={};function M5(){return{text:tr}}let Tl=48;for(;Tl<123;)tr[Tl]=Nr,Tl++,Tl===58?Tl=65:Tl===91&&(Tl=97);tr[43]=Nr;tr[45]=Nr;tr[46]=Nr;tr[95]=Nr;tr[72]=[Nr,X0];tr[104]=[Nr,X0];tr[87]=[Nr,Y0];tr[119]=[Nr,Y0];function z5(e,r,l){const i=this;let s,u;return c;function c(b){return!Wd(b)||!K0.call(i,i.previous)||Uh(i.events)?l(b):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(b))}function f(b){return Wd(b)?(e.consume(b),f):b===64?(e.consume(b),h):l(b)}function h(b){return b===46?e.check(O5,m,p)(b):b===45||b===95||$t(b)?(u=!0,e.consume(b),h):m(b)}function p(b){return e.consume(b),s=!0,h}function m(b){return u&&s&&Kt(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),r(b)):l(b)}}function B5(e,r,l){const i=this;return s;function s(c){return c!==87&&c!==119||!Z0.call(i,i.previous)||Uh(i.events)?l(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(D5,e.attempt($0,e.attempt(V0,u),l),l)(c))}function u(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),r(c)}}function F5(e,r,l){const i=this;let s="",u=!1;return c;function c(b){return(b===72||b===104)&&Q0.call(i,i.previous)&&!Uh(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(b),e.consume(b),f):l(b)}function f(b){if(Kt(b)&&s.length<5)return s+=String.fromCodePoint(b),e.consume(b),f;if(b===58){const v=s.toLowerCase();if(v==="http"||v==="https")return e.consume(b),h}return l(b)}function h(b){return b===47?(e.consume(b),u?p:(u=!0,h)):l(b)}function p(b){return b===null||Xs(b)||st(b)||Ol(b)||yu(b)?l(b):e.attempt($0,e.attempt(V0,m),l)(b)}function m(b){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),r(b)}}function I5(e,r,l){let i=0;return s;function s(c){return(c===87||c===119)&&i<3?(i++,e.consume(c),s):c===46&&i===3?(e.consume(c),u):l(c)}function u(c){return c===null?l(c):r(c)}}function U5(e,r,l){let i,s,u;return c;function c(p){return p===46||p===95?e.check(G0,h,f)(p):p===null||st(p)||Ol(p)||p!==45&&yu(p)?h(p):(u=!0,e.consume(p),c)}function f(p){return p===95?i=!0:(s=i,i=void 0),e.consume(p),c}function h(p){return s||i||!u?l(p):r(p)}}function H5(e,r){let l=0,i=0;return s;function s(c){return c===40?(l++,e.consume(c),s):c===41&&i<l?u(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(G0,r,u)(c):c===null||st(c)||Ol(c)?r(c):(e.consume(c),s)}function u(c){return c===41&&i++,e.consume(c),s}}function q5(e,r,l){return i;function i(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),i):f===38?(e.consume(f),u):f===93?(e.consume(f),s):f===60||f===null||st(f)||Ol(f)?r(f):l(f)}function s(f){return f===null||f===40||f===91||st(f)||Ol(f)?r(f):i(f)}function u(f){return Kt(f)?c(f):l(f)}function c(f){return f===59?(e.consume(f),i):Kt(f)?(e.consume(f),c):l(f)}}function P5(e,r,l){return i;function i(u){return e.consume(u),s}function s(u){return $t(u)?l(u):r(u)}}function Z0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function Q0(e){return!Kt(e)}function K0(e){return!(e===47||Wd(e))}function Wd(e){return e===43||e===45||e===46||e===95||$t(e)}function Uh(e){let r=e.length,l=!1;for(;r--;){const i=e[r][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){l=!0;break}if(i._gfmAutolinkLiteralWalkedInto){l=!1;break}}return e.length>0&&!l&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),l}const $5={tokenize:J5,partial:!0};function V5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Z5,continuation:{tokenize:Q5},exit:K5}},text:{91:{name:"gfmFootnoteCall",tokenize:X5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:G5,resolveTo:Y5}}}}function G5(e,r,l){const i=this;let s=i.events.length;const u=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;s--;){const h=i.events[s][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!c||!c._balanced)return l(h);const p=Pn(i.sliceSerialize({start:c.end,end:i.now()}));return p.codePointAt(0)!==94||!u.includes(p.slice(1))?l(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),r(h))}}function Y5(e,r){let l=e.length;for(;l--;)if(e[l][1].type==="labelImage"&&e[l][0]==="enter"){e[l][1];break}e[l+1][1].type="data",e[l+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[l+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[l+3][1].end),end:Object.assign({},e[l+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[l+1],e[l+2],["enter",i,r],e[l+3],e[l+4],["enter",s,r],["exit",s,r],["enter",u,r],["enter",c,r],["exit",c,r],["exit",u,r],e[e.length-2],e[e.length-1],["exit",i,r]];return e.splice(l,e.length-l+1,...f),e}function X5(e,r,l){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u=0,c;return f;function f(b){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),h}function h(b){return b!==94?l(b):(e.enter("gfmFootnoteCallMarker"),e.consume(b),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(b){if(u>999||b===93&&!c||b===null||b===91||st(b))return l(b);if(b===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return s.includes(Pn(i.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),r):l(b)}return st(b)||(c=!0),u++,e.consume(b),b===92?m:p}function m(b){return b===91||b===92||b===93?(e.consume(b),u++,p):p(b)}}function Z5(e,r,l){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u,c=0,f;return h;function h(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):l(S)}function m(S){if(c>999||S===93&&!f||S===null||S===91||st(S))return l(S);if(S===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return u=Pn(i.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return st(S)||(f=!0),c++,e.consume(S),S===92?b:m}function b(S){return S===91||S===92||S===93?(e.consume(S),c++,m):m(S)}function v(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(u)||s.push(u),Ye(e,x,"gfmFootnoteDefinitionWhitespace")):l(S)}function x(S){return r(S)}}function Q5(e,r,l){return e.check(eo,r,e.attempt($5,r,l))}function K5(e){e.exit("gfmFootnoteDefinition")}function J5(e,r,l){const i=this;return Ye(e,s,"gfmFootnoteDefinitionIndent",5);function s(u){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?r(u):l(u)}}function W5(e){let l=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:u,resolveAll:s};return l==null&&(l=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(c,f){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let p=h;for(;p--;)if(c[p][0]==="exit"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[p][1].end.offset-c[p][1].start.offset){c[h][1].type="strikethroughSequence",c[p][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},c[p][1].start),end:Object.assign({},c[h][1].end)},b={type:"strikethroughText",start:Object.assign({},c[p][1].end),end:Object.assign({},c[h][1].start)},v=[["enter",m,f],["enter",c[p][1],f],["exit",c[p][1],f],["enter",b,f]],x=f.parser.constructs.insideSpan.null;x&&kn(v,v.length,0,xu(x,c.slice(p+1,h),f)),kn(v,v.length,0,[["exit",b,f],["enter",c[h][1],f],["exit",c[h][1],f],["exit",m,f]]),kn(c,p-1,h-p+3,v),h=p+v.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function u(c,f,h){const p=this.previous,m=this.events;let b=0;return v;function v(S){return p===126&&m[m.length-1][1].type!=="characterEscape"?h(S):(c.enter("strikethroughSequenceTemporary"),x(S))}function x(S){const w=Ri(p);if(S===126)return b>1?h(S):(c.consume(S),b++,x);if(b<2&&!l)return h(S);const N=c.exit("strikethroughSequenceTemporary"),E=Ri(S);return N._open=!E||E===2&&!!w,N._close=!w||w===2&&!!E,f(S)}}}class e8{constructor(){this.map=[]}add(r,l,i){t8(this,r,l,i)}consume(r){if(this.map.sort(function(u,c){return u[0]-c[0]}),this.map.length===0)return;let l=this.map.length;const i=[];for(;l>0;)l-=1,i.push(r.slice(this.map[l][0]+this.map[l][1]),this.map[l][2]),r.length=this.map[l][0];i.push(r.slice()),r.length=0;let s=i.pop();for(;s;){for(const u of s)r.push(u);s=i.pop()}this.map.length=0}}function t8(e,r,l,i){let s=0;if(!(l===0&&i.length===0)){for(;s<e.map.length;){if(e.map[s][0]===r){e.map[s][1]+=l,e.map[s][2].push(...i);return}s+=1}e.map.push([r,l,i])}}function n8(e,r){let l=!1;const i=[];for(;r<e.length;){const s=e[r];if(l){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(e[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[r-1][1].type==="tableDelimiterMarker"){const u=i.length-1;i[u]=i[u]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(l=!0);r+=1}return i}function r8(){return{flow:{null:{name:"table",tokenize:l8,resolveAll:i8}}}}function l8(e,r,l){const i=this;let s=0,u=0,c;return f;function f(B){let $=i.events.length-1;for(;$>-1;){const I=i.events[$][1].type;if(I==="lineEnding"||I==="linePrefix")$--;else break}const G=$>-1?i.events[$][1].type:null,J=G==="tableHead"||G==="tableRow"?L:h;return J===L&&i.parser.lazy[i.now().line]?l(B):J(B)}function h(B){return e.enter("tableHead"),e.enter("tableRow"),p(B)}function p(B){return B===124||(c=!0,u+=1),m(B)}function m(B){return B===null?l(B):Te(B)?u>1?(u=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),x):l(B):Ie(B)?Ye(e,m,"whitespace")(B):(u+=1,c&&(c=!1,s+=1),B===124?(e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),c=!0,m):(e.enter("data"),b(B)))}function b(B){return B===null||B===124||st(B)?(e.exit("data"),m(B)):(e.consume(B),B===92?v:b)}function v(B){return B===92||B===124?(e.consume(B),b):b(B)}function x(B){return i.interrupt=!1,i.parser.lazy[i.now().line]?l(B):(e.enter("tableDelimiterRow"),c=!1,Ie(B)?Ye(e,S,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):S(B))}function S(B){return B===45||B===58?N(B):B===124?(c=!0,e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),w):U(B)}function w(B){return Ie(B)?Ye(e,N,"whitespace")(B):N(B)}function N(B){return B===58?(u+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(B),e.exit("tableDelimiterMarker"),E):B===45?(u+=1,E(B)):B===null||Te(B)?z(B):U(B)}function E(B){return B===45?(e.enter("tableDelimiterFiller"),C(B)):U(B)}function C(B){return B===45?(e.consume(B),C):B===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(B),e.exit("tableDelimiterMarker"),j):(e.exit("tableDelimiterFiller"),j(B))}function j(B){return Ie(B)?Ye(e,z,"whitespace")(B):z(B)}function z(B){return B===124?S(B):B===null||Te(B)?!c||s!==u?U(B):(e.exit("tableDelimiterRow"),e.exit("tableHead"),r(B)):U(B)}function U(B){return l(B)}function L(B){return e.enter("tableRow"),O(B)}function O(B){return B===124?(e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),O):B===null||Te(B)?(e.exit("tableRow"),r(B)):Ie(B)?Ye(e,O,"whitespace")(B):(e.enter("data"),H(B))}function H(B){return B===null||B===124||st(B)?(e.exit("data"),O(B)):(e.consume(B),B===92?Y:H)}function Y(B){return B===92||B===124?(e.consume(B),H):H(B)}}function i8(e,r){let l=-1,i=!0,s=0,u=[0,0,0,0],c=[0,0,0,0],f=!1,h=0,p,m,b;const v=new e8;for(;++l<e.length;){const x=e[l],S=x[1];x[0]==="enter"?S.type==="tableHead"?(f=!1,h!==0&&(yx(v,r,h,p,m),m=void 0,h=0),p={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},v.add(l,0,[["enter",p,r]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(i=!0,b=void 0,u=[0,0,0,0],c=[0,l+1,0,0],f&&(f=!1,m={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},v.add(l,0,[["enter",m,r]])),s=S.type==="tableDelimiterRow"?2:m?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],b=js(v,r,u,s,void 0,b),u=[0,0,0,0]),c[2]=l)):S.type==="tableCellDivider"&&(i?i=!1:(u[1]!==0&&(c[0]=c[1],b=js(v,r,u,s,void 0,b)),u=c,c=[u[1],l,0,0])):S.type==="tableHead"?(f=!0,h=l):S.type==="tableRow"||S.type==="tableDelimiterRow"?(h=l,u[1]!==0?(c[0]=c[1],b=js(v,r,u,s,l,b)):c[1]!==0&&(b=js(v,r,c,s,l,b)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(c[3]=l)}for(h!==0&&yx(v,r,h,p,m),v.consume(r.events),l=-1;++l<r.events.length;){const x=r.events[l];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=n8(r.events,l))}return e}function js(e,r,l,i,s,u){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",f="tableContent";l[0]!==0&&(u.end=Object.assign({},ki(r.events,l[0])),e.add(l[0],0,[["exit",u,r]]));const h=ki(r.events,l[1]);if(u={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(l[1],0,[["enter",u,r]]),l[2]!==0){const p=ki(r.events,l[2]),m=ki(r.events,l[3]),b={type:f,start:Object.assign({},p),end:Object.assign({},m)};if(e.add(l[2],0,[["enter",b,r]]),i!==2){const v=r.events[l[2]],x=r.events[l[3]];if(v[1].end=Object.assign({},x[1].end),v[1].type="chunkText",v[1].contentType="text",l[3]>l[2]+1){const S=l[2]+1,w=l[3]-l[2]-1;e.add(S,w,[])}}e.add(l[3]+1,0,[["exit",b,r]])}return s!==void 0&&(u.end=Object.assign({},ki(r.events,s)),e.add(s,0,[["exit",u,r]]),u=void 0),u}function yx(e,r,l,i,s){const u=[],c=ki(r.events,l);s&&(s.end=Object.assign({},c),u.push(["exit",s,r])),i.end=Object.assign({},c),u.push(["exit",i,r]),e.add(l+1,0,u)}function ki(e,r){const l=e[r],i=l[0]==="enter"?"start":"end";return l[1][i]}const a8={name:"tasklistCheck",tokenize:s8};function o8(){return{text:{91:a8}}}function s8(e,r,l){const i=this;return s;function s(h){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?l(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),u)}function u(h){return st(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):l(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):l(h)}function f(h){return Te(h)?r(h):Ie(h)?e.check({tokenize:u8},r,l)(h):l(h)}}function u8(e,r,l){return Ye(e,i,"whitespace");function i(s){return s===null?l(s):r(s)}}function c8(e){return s0([M5(),V5(),W5(e),r8(),o8()])}const f8={};function Hh(e){const r=this,l=e||f8,i=r.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),u=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(c8(l)),u.push(_5()),c.push(L5(l))}class qh{diff(r,l,i={}){let s;typeof i=="function"?(s=i,i={}):"callback"in i&&(s=i.callback);const u=this.castInput(r,i),c=this.castInput(l,i),f=this.removeEmpty(this.tokenize(u,i)),h=this.removeEmpty(this.tokenize(c,i));return this.diffWithOptionsObj(f,h,i,s)}diffWithOptionsObj(r,l,i,s){var u;const c=C=>{if(C=this.postProcess(C,i),s){setTimeout(function(){s(C)},0);return}else return C},f=l.length,h=r.length;let p=1,m=f+h;i.maxEditLength!=null&&(m=Math.min(m,i.maxEditLength));const b=(u=i.timeout)!==null&&u!==void 0?u:1/0,v=Date.now()+b,x=[{oldPos:-1,lastComponent:void 0}];let S=this.extractCommon(x[0],l,r,0,i);if(x[0].oldPos+1>=h&&S+1>=f)return c(this.buildValues(x[0].lastComponent,l,r));let w=-1/0,N=1/0;const E=()=>{for(let C=Math.max(w,-p);C<=Math.min(N,p);C+=2){let j;const z=x[C-1],U=x[C+1];z&&(x[C-1]=void 0);let L=!1;if(U){const H=U.oldPos-C;L=U&&0<=H&&H<f}const O=z&&z.oldPos+1<h;if(!L&&!O){x[C]=void 0;continue}if(!O||L&&z.oldPos<U.oldPos?j=this.addToPath(U,!0,!1,0,i):j=this.addToPath(z,!1,!0,1,i),S=this.extractCommon(j,l,r,C,i),j.oldPos+1>=h&&S+1>=f)return c(this.buildValues(j.lastComponent,l,r))||!0;x[C]=j,j.oldPos+1>=h&&(N=Math.min(N,C-1)),S+1>=f&&(w=Math.max(w,C+1))}p++};if(s)(function C(){setTimeout(function(){if(p>m||Date.now()>v)return s(void 0);E()||C()},0)})();else for(;p<=m&&Date.now()<=v;){const C=E();if(C)return C}}addToPath(r,l,i,s,u){const c=r.lastComponent;return c&&!u.oneChangePerToken&&c.added===l&&c.removed===i?{oldPos:r.oldPos+s,lastComponent:{count:c.count+1,added:l,removed:i,previousComponent:c.previousComponent}}:{oldPos:r.oldPos+s,lastComponent:{count:1,added:l,removed:i,previousComponent:c}}}extractCommon(r,l,i,s,u){const c=l.length,f=i.length;let h=r.oldPos,p=h-s,m=0;for(;p+1<c&&h+1<f&&this.equals(i[h+1],l[p+1],u);)p++,h++,m++,u.oneChangePerToken&&(r.lastComponent={count:1,previousComponent:r.lastComponent,added:!1,removed:!1});return m&&!u.oneChangePerToken&&(r.lastComponent={count:m,previousComponent:r.lastComponent,added:!1,removed:!1}),r.oldPos=h,p}equals(r,l,i){return i.comparator?i.comparator(r,l):r===l||!!i.ignoreCase&&r.toLowerCase()===l.toLowerCase()}removeEmpty(r){const l=[];for(let i=0;i<r.length;i++)r[i]&&l.push(r[i]);return l}castInput(r,l){return r}tokenize(r,l){return Array.from(r)}join(r){return r.join("")}postProcess(r,l){return r}get useLongestToken(){return!1}buildValues(r,l,i){const s=[];let u;for(;r;)s.push(r),u=r.previousComponent,delete r.previousComponent,r=u;s.reverse();const c=s.length;let f=0,h=0,p=0;for(;f<c;f++){const m=s[f];if(m.removed)m.value=this.join(i.slice(p,p+m.count)),p+=m.count;else{if(!m.added&&this.useLongestToken){let b=l.slice(h,h+m.count);b=b.map(function(v,x){const S=i[p+x];return S.length>v.length?S:v}),m.value=this.join(b)}else m.value=this.join(l.slice(h,h+m.count));h+=m.count,m.added||(p+=m.count)}}return s}}function xx(e,r){let l;for(l=0;l<e.length&&l<r.length;l++)if(e[l]!=r[l])return e.slice(0,l);return e.slice(0,l)}function vx(e,r){let l;if(!e||!r||e[e.length-1]!=r[r.length-1])return"";for(l=0;l<e.length&&l<r.length;l++)if(e[e.length-(l+1)]!=r[r.length-(l+1)])return e.slice(-l);return e.slice(-l)}function eh(e,r,l){if(e.slice(0,r.length)!=r)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(r)}; this is a bug`);return l+e.slice(r.length)}function th(e,r,l){if(!r)return e+l;if(e.slice(-r.length)!=r)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(r)}; this is a bug`);return e.slice(0,-r.length)+l}function Oa(e,r){return eh(e,r,"")}function Rs(e,r){return th(e,r,"")}function wx(e,r){return r.slice(0,d8(e,r))}function d8(e,r){let l=0;e.length>r.length&&(l=e.length-r.length);let i=r.length;e.length<r.length&&(i=e.length);const s=Array(i);let u=0;s[0]=0;for(let c=1;c<i;c++){for(r[c]==r[u]?s[c]=s[u]:s[c]=u;u>0&&r[c]!=r[u];)u=s[u];r[c]==r[u]&&u++}u=0;for(let c=l;c<e.length;c++){for(;u>0&&e[c]!=r[u];)u=s[u];e[c]==r[u]&&u++}return u}function Ma(e){let r;for(r=e.length-1;r>=0&&e[r].match(/\s/);r--);return e.substring(r+1)}function tl(e){const r=e.match(/^\s*/);return r?r[0]:""}const Js="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",h8=new RegExp(`[${Js}]+|\\s+|[^${Js}]`,"ug");class p8 extends qh{equals(r,l,i){return i.ignoreCase&&(r=r.toLowerCase(),l=l.toLowerCase()),r.trim()===l.trim()}tokenize(r,l={}){let i;if(l.intlSegmenter){const c=l.intlSegmenter;if(c.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');i=[];for(const f of Array.from(c.segment(r))){const h=f.segment;i.length&&/\s/.test(i[i.length-1])&&/\s/.test(h)?i[i.length-1]+=h:i.push(h)}}else i=r.match(h8)||[];const s=[];let u=null;return i.forEach(c=>{/\s/.test(c)?u==null?s.push(c):s.push(s.pop()+c):u!=null&&/\s/.test(u)?s[s.length-1]==u?s.push(s.pop()+c):s.push(u+c):s.push(c),u=c}),s}join(r){return r.map((l,i)=>i==0?l:l.replace(/^\s+/,"")).join("")}postProcess(r,l){if(!r||l.oneChangePerToken)return r;let i=null,s=null,u=null;return r.forEach(c=>{c.added?s=c:c.removed?u=c:((s||u)&&Sx(i,u,s,c),i=c,s=null,u=null)}),(s||u)&&Sx(i,u,s,null),r}}const g8=new p8;function m8(e,r,l){return g8.diff(e,r,l)}function Sx(e,r,l,i){if(r&&l){const s=tl(r.value),u=Ma(r.value),c=tl(l.value),f=Ma(l.value);if(e){const h=xx(s,c);e.value=th(e.value,c,h),r.value=Oa(r.value,h),l.value=Oa(l.value,h)}if(i){const h=vx(u,f);i.value=eh(i.value,f,h),r.value=Rs(r.value,h),l.value=Rs(l.value,h)}}else if(l){if(e){const s=tl(l.value);l.value=l.value.substring(s.length)}if(i){const s=tl(i.value);i.value=i.value.substring(s.length)}}else if(e&&i){const s=tl(i.value),u=tl(r.value),c=Ma(r.value),f=xx(s,u);r.value=Oa(r.value,f);const h=vx(Oa(s,f),c);r.value=Rs(r.value,h),i.value=eh(i.value,s,h),e.value=th(e.value,s,s.slice(0,s.length-h.length))}else if(i){const s=tl(i.value),u=Ma(r.value),c=wx(u,s);r.value=Rs(r.value,c)}else if(e){const s=Ma(e.value),u=tl(r.value),c=wx(s,u);r.value=Oa(r.value,c)}}class b8 extends qh{tokenize(r){const l=new RegExp(`(\\r?\\n)|[${Js}]+|[^\\S\\n\\r]+|[^${Js}]`,"ug");return r.match(l)||[]}}const y8=new b8;function x8(e,r,l){return y8.diff(e,r,l)}class v8 extends qh{constructor(){super(...arguments),this.tokenize=k8}equals(r,l,i){return i.ignoreWhitespace?((!i.newlineIsToken||!r.includes(`
|
|
58
|
+
`))&&(r=r.trim()),(!i.newlineIsToken||!l.includes(`
|
|
59
|
+
`))&&(l=l.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(r.endsWith(`
|
|
60
|
+
`)&&(r=r.slice(0,-1)),l.endsWith(`
|
|
61
|
+
`)&&(l=l.slice(0,-1))),super.equals(r,l,i)}}const w8=new v8;function S8(e,r,l){return w8.diff(e,r,l)}function k8(e,r){r.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
62
|
+
`));const l=[],i=e.split(/(\n|\r\n)/);i[i.length-1]||i.pop();for(let s=0;s<i.length;s++){const u=i[s];s%2&&!r.newlineIsToken?l[l.length-1]+=u:l.push(u)}return l}function J0(e,r){const l=x8(e,r),i=[],s=[];for(const u of l)u.added?s.push({value:u.value,type:"added"}):u.removed?i.push({value:u.value,type:"removed"}):(i.push({value:u.value,type:"unchanged"}),s.push({value:u.value,type:"unchanged"}));return{oldSegments:i,newSegments:s}}function W0(e,r){if(!e.trim()||!r.trim()||e===r)return!1;const l=m8(e,r);let i=0,s=0;for(const c of l)s+=c.value.length,!c.added&&!c.removed&&(i+=c.value.length);return i/s>=.2}function ev({onSubmit:e,onCancel:r,selectedCode:l,syntaxTheme:i,filename:s}){const[u,c]=T.useState(""),[f,h]=T.useState(!1),[p,m]=T.useState("edit"),b=T.useRef(null),v=m1(u),x=v?p:"edit",S=async N=>{if(N.preventDefault(),!!u.trim()){h(!0);try{await e(u.trim()),c(""),m("edit")}catch(E){console.error("Failed to submit comment:",E)}finally{h(!1)}}},w=N=>{N.key==="Enter"&&(N.metaKey||N.ctrlKey)?S(N):N.key==="Escape"&&r()};return y.jsxs("form",{className:"m-2 mx-3 p-3 bg-github-bg-tertiary border border-yellow-600/50 rounded-md border-l-4 border-l-yellow-400",onSubmit:S,"data-empty":!u.trim(),children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsx("span",{className:"text-sm font-medium",style:{color:"var(--color-yellow-path-text)"},children:"Add a comment"}),v?y.jsxs("div",{className:"flex items-center border border-github-border rounded-md overflow-hidden",children:[y.jsx("button",{type:"button",onClick:()=>m("edit"),className:`text-xs px-2.5 py-1.5 ${x==="edit"?"bg-github-bg-tertiary text-github-text-primary":"bg-github-bg-secondary text-github-text-secondary"} transition-colors`,children:"Edit"}),y.jsx("button",{type:"button",onClick:()=>m("preview"),className:`text-xs px-2.5 py-1.5 border-l border-github-border ${x==="preview"?"bg-github-bg-tertiary text-github-text-primary":"bg-github-bg-secondary text-github-text-secondary"} transition-colors`,children:"Preview"})]}):y.jsx(b1,{selectedCode:l,value:u,onChange:c,textareaRef:b})]}),v&&x==="preview"?y.jsx("div",{className:"min-h-[60px] mb-2 bg-github-bg-secondary border border-github-border rounded px-3 py-2",children:y.jsx(Ed,{body:u,originalCode:l,filename:s,syntaxTheme:i})}):y.jsx("textarea",{ref:b,className:"w-full min-h-[60px] mb-2 resize-y bg-github-bg-secondary border border-github-border rounded px-3 py-2 text-github-text-primary text-sm leading-6 focus:outline-none focus:border-blue-600 focus:ring-2 focus:ring-blue-600/30 focus:min-h-[80px] disabled:opacity-50",value:u,onChange:N=>c(N.target.value),onKeyDown:w,placeholder:"Leave a comment...",rows:Math.max(3,u.split(`
|
|
63
|
+
`).length),autoFocus:!0,disabled:f}),y.jsxs("div",{className:"flex gap-2 justify-end",children:[y.jsx("button",{type:"button",onClick:r,className:"text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all disabled:opacity-50",disabled:f,children:"Cancel"}),y.jsx("button",{type:"submit",className:"text-xs px-3 py-1.5 rounded transition-all disabled:opacity-50",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},disabled:!u.trim()||f,children:f?"Submitting...":"Submit"})]})]})}const Ws=Jt.memo(({onMouseDown:e,onMouseUp:r,title:l="Add a comment"})=>y.jsx("button",{className:"absolute -right-2 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded transition-all duration-150 hover:scale-110 z-10","data-comment-button":"true",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:i=>{i.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",i.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:i=>{i.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",i.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},onMouseDown:e,onMouseUp:r,title:l,children:y.jsx(t1,{className:"w-4 h-4"})}));Ws.displayName="CommentButton";const eu=Jt.memo(({onClick:e,title:r="Open in editor",className:l})=>y.jsx("button",{className:`absolute -right-10 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded transition-all duration-150 hover:scale-110 z-10 ${l||""}`,"data-open-in-editor-button":"true",style:{backgroundColor:"var(--color-editor-btn-bg)",color:"var(--color-editor-btn-text)",border:"1px solid var(--color-editor-btn-border)"},onMouseEnter:i=>{i.currentTarget.style.backgroundColor="var(--color-editor-btn-hover-bg)",i.currentTarget.style.borderColor="var(--color-editor-btn-hover-border)"},onMouseLeave:i=>{i.currentTarget.style.backgroundColor="var(--color-editor-btn-bg)",i.currentTarget.style.borderColor="var(--color-editor-btn-border)"},onMouseDown:i=>{i.stopPropagation()},onClick:i=>{i.stopPropagation(),e(i)},title:r,children:y.jsx(E2,{className:"w-4 h-4 opacity-80"})}));eu.displayName="OpenInEditorButton";const E8=e=>{if("isExpanded"in e&&e.isExpanded)return"bg-github-bg-tertiary/80";switch(e.type){case"add":return"bg-diff-addition-bg";case"delete":return"bg-diff-deletion-bg";default:return"bg-transparent"}},tv=Jt.memo(({line:e,index:r,lineId:l,isCurrentLine:i=!1,hoveredLineIndex:s,selectedLineStyle:u,onMouseEnter:c,onMouseLeave:f,onMouseMove:h,onCommentButtonMouseDown:p,onCommentButtonMouseUp:m,onOpenInEditor:b,syntaxTheme:v,onClick:x,filename:S,diffSegments:w})=>{const N=e.newLineNumber||e.oldLineNumber,E=s===r&&N,C=i?"keyboard-cursor":"";return y.jsxs("tr",{id:l,className:`group ${E8(e)} relative ${u} ${C} cursor-pointer`,onMouseEnter:c,onMouseLeave:f,onMouseMove:h,onClick:x,children:[y.jsx("td",{className:"w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative",children:e.oldLineNumber||""}),y.jsxs("td",{className:"w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible",children:[y.jsx("span",{children:e.newLineNumber||""}),E&&y.jsxs(y.Fragment,{children:[b&&y.jsx(eu,{onClick:b}),y.jsx(Ws,{onMouseDown:p,onMouseUp:m})]})]}),y.jsx("td",{className:"p-0 w-full relative align-top",children:y.jsx(g1,{line:e,syntaxTheme:v,filename:S,diffSegments:w})})]})});tv.displayName="DiffLineRow";const kx=e=>e!==void 0&&"isExpanded"in e&&e.isExpanded===!0,Ex=(e,r)=>r?"bg-github-bg-tertiary/80":e?.type==="delete"?"bg-diff-deletion-bg":e?.type==="add"?"bg-diff-addition-bg":e?.type==="normal"?"bg-transparent":"bg-github-bg-secondary";function C8({chunk:e,chunkIndex:r,comments:l,onAddComment:i,onGeneratePrompt:s,onRemoveComment:u,onUpdateComment:c,syntaxTheme:f,cursor:h=null,fileIndex:p=0,onLineClick:m,commentTrigger:b,onCommentTriggerHandled:v,filename:x,onOpenInEditor:S}){const[w,N]=T.useState(null),[E,C]=T.useState(null),[j,z]=T.useState(!1),[U,L]=T.useState(null),[O,H]=T.useState(null);T.useEffect(()=>{if(b?.lineIndex!==void 0){const M=e.lines[b.lineIndex];if(M&&M.type!=="delete"){const V=M.newLineNumber;V&&(L({side:"new",lineNumber:V}),v?.())}}},[b,e.lines,v]),T.useEffect(()=>{if(j){const M=()=>{z(!1),N(null),C(null)};return document.addEventListener("mouseup",M),()=>{document.removeEventListener("mouseup",M)}}},[j]);const Y=T.useCallback((M,V)=>{U?.side===M&&U?.lineNumber===V?L(null):L({side:M,lineNumber:V})},[U]),B=T.useCallback(()=>{L(null)},[]),$=T.useCallback(()=>{if(!U)return"";const{side:M,lineNumber:V}=U,R=e.lines;if(typeof V=="number")return R.find(q=>M==="old"?q.oldLineNumber===V:q.newLineNumber===V)?.content?.replace(/^[+-]/,"")||"";{const[D,q]=V;return R.filter(ne=>{const re=M==="old"?ne.oldLineNumber:ne.newLineNumber;return re!==void 0&&re>=D&&re<=q}).map(ne=>ne.content?.replace(/^[+-]/,"")||"").join(`
|
|
64
|
+
`)}},[U,e.lines]),G=T.useCallback(async M=>{if(U!==null){const V=$();await i(U.lineNumber,M,V||void 0,U.side),L(null)}},[U,i,$]),J=(M,V)=>l.filter(R=>{const D=Array.isArray(R.line)?R.line[1]===M:R.line===M,q=!R.side||R.side===V;return D&&q}),I=M=>M.oldLine?.type==="delete"&&M.newLine?.type==="add"?M.newLineNumber?"right":"left":M.oldLine?.type==="delete"?"left":M.newLine?.type==="add"?"right":"full",Z=(M,V)=>{const R=M==="old"?V.oldLineNumber:V.newLineNumber;if(!R)return"";if(j&&w&&E&&w.side===M&&E.side===M){const D=Math.min(w.lineNumber,E.lineNumber),q=Math.max(w.lineNumber,E.lineNumber);if(R>=D&&R<=q){let A="after:bg-blue-100 after:absolute after:inset-0 after:opacity-30 after:border-l-4 after:border-blue-500 after:pointer-events-none";return R===D&&(A+=" after:border-t-2"),R===q&&(A+=" after:border-b-2"),A}}if(U&&U.side===M){const D=Array.isArray(U.lineNumber)?U.lineNumber:[U.lineNumber,U.lineNumber],q=D[0],A=D[1];if(q!==void 0&&A!==void 0&&R>=q&&R<=A)return"after:bg-diff-selected-bg after:absolute after:inset-0 after:border-l-5 after:border-l-diff-selected-border after:pointer-events-none"}return""},F=T.useCallback(M=>{const V=[];let R=e.oldStart,D=e.newStart,q=0;for(;q<M.length;){const A=M[q];if(!A){q++;continue}if(A.type==="normal")V.push({oldLine:A,newLine:{...A},oldLineNumber:A.oldLineNumber??R,newLineNumber:A.newLineNumber??D,oldLineOriginalIndex:q,newLineOriginalIndex:q}),R++,D++,q++;else if(A.type==="delete"){let ne=q+1;for(;ne<M.length&&M[ne]?.type==="delete";)ne++;const re=M.slice(q,ne),fe=q,ge=[],ye=ne;for(;ne<M.length&&M[ne]?.type==="add";){const me=M[ne];me&&ge.push(me),ne++}const pe=Math.max(re.length,ge.length);for(let me=0;me<pe;me++){const xe=re[me],de=ge[me];let Se;xe&&de&&W0(xe.content,de.content)&&(Se=J0(xe.content,de.content)),V.push({oldLine:xe,newLine:de,oldLineNumber:xe?xe.oldLineNumber??R+me:void 0,newLineNumber:de?de.newLineNumber??D+me:void 0,oldLineOriginalIndex:xe?fe+me:void 0,newLineOriginalIndex:de?ye+me:void 0,wordLevelDiff:Se})}R+=re.length,D+=ge.length,q=ne}else A.type==="add"&&(V.push({newLine:A,newLineNumber:A.newLineNumber??D,newLineOriginalIndex:q}),D++,q++)}return V},[e.oldStart,e.newStart]),X=T.useMemo(()=>F(e.lines),[e.lines,F]);return y.jsx("div",{className:"bg-github-bg-primary overflow-hidden",children:y.jsx("table",{className:"w-full table-fixed border-collapse font-mono text-sm leading-5",children:y.jsx("tbody",{children:X.map((M,V)=>{const R=M.oldLineNumber?J(M.oldLineNumber,"old"):[],D=M.newLineNumber?J(M.newLineNumber,"new"):[],q=[...R,...D],A=M.oldLineOriginalIndex??-1,ne=M.newLineOriginalIndex??-1,re=h?h.side==="left"&&A>=0?h.chunkIndex===r&&h.lineIndex===A:h.side==="right"&&ne>=0?h.chunkIndex===r&&h.lineIndex===ne:!1:!1,fe=A>=0?`file-${p}-chunk-${r}-line-${A}-left`:void 0,ge=ne>=0?`file-${p}-chunk-${r}-line-${ne}-right`:void 0,ye=re&&h?.side==="left",pe=re&&h?.side==="right",me="keyboard-cursor";return y.jsxs(Jt.Fragment,{children:[y.jsxs("tr",{className:"group cursor-pointer",onClick:xe=>{if(!j){const de=xe.target;if(!(de instanceof HTMLElement))return;const Se=de.closest("td:nth-child(1)")||de.closest("td:nth-child(2)"),Ee=de.closest("td:nth-child(3)")||de.closest("td:nth-child(4)");Se&&A>=0?m?.(p,r,A,"left"):Ee&&ne>=0&&m?.(p,r,ne,"right")}},onMouseEnter:xe=>{const de=xe.target;if(!(de instanceof HTMLElement))return;const Se=de.closest("td:nth-child(1)")||de.closest("td:nth-child(2)"),Ee=de.closest("td:nth-child(3)")||de.closest("td:nth-child(4)");Se&&M.oldLineNumber?H({side:"old",lineNumber:M.oldLineNumber}):Ee&&M.newLineNumber&&H({side:"new",lineNumber:M.newLineNumber})},onMouseMove:xe=>{const de=xe.target;if(!(de instanceof HTMLElement))return;const Se=de.closest("td:nth-child(1)")||de.closest("td:nth-child(2)"),Ee=de.closest("td:nth-child(3)")||de.closest("td:nth-child(4)");Se&&M.oldLineNumber?(O?.side!=="old"||O?.lineNumber!==M.oldLineNumber)&&H({side:"old",lineNumber:M.oldLineNumber}):Ee&&M.newLineNumber&&(O?.side!=="new"||O?.lineNumber!==M.newLineNumber)&&H({side:"new",lineNumber:M.newLineNumber}),j&&w&&(w.side==="old"&&M.oldLineNumber?C({side:"old",lineNumber:M.oldLineNumber}):w.side==="new"&&M.newLineNumber&&C({side:"new",lineNumber:M.newLineNumber}))},onMouseLeave:()=>H(null),children:[y.jsxs("td",{id:fe,className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible ${ye?me:""}`,children:[y.jsx("span",{children:M.oldLineNumber||""}),O?.side==="old"&&O?.lineNumber===M.oldLineNumber&&y.jsxs(y.Fragment,{children:[S&&x&&M.oldLine?.type!=="delete"&&M.newLineNumber!==void 0&&y.jsx(eu,{onClick:()=>{const xe=M.newLineNumber;!x||xe===void 0||S(x,xe)}}),y.jsx(Ws,{onMouseDown:xe=>{xe.stopPropagation(),M.oldLineNumber&&(N({side:"old",lineNumber:M.oldLineNumber}),C({side:"old",lineNumber:M.oldLineNumber}),z(!0))},onMouseUp:xe=>{if(xe.stopPropagation(),!M.oldLineNumber||!w){z(!1),N(null),C(null);return}const de=E&&E.side==="old"?E.lineNumber:M.oldLineNumber;if(w.side!=="old"||w.lineNumber===de)Y("old",M.oldLineNumber);else{const Se=Math.min(w.lineNumber,de),Ee=Math.max(w.lineNumber,de);Y("old",[Se,Ee])}z(!1),N(null),C(null)}})]})]}),y.jsx("td",{className:`w-1/2 p-0 align-top border-r border-github-border relative ${Ex(M.oldLine,kx(M.oldLine))} ${Z("old",M)} ${ye?me:""}`,children:M.oldLine&&y.jsx("div",{className:"flex items-center relative min-h-[20px] px-3",children:M.wordLevelDiff?y.jsx(kd,{segments:M.wordLevelDiff.oldSegments,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx($a,{code:M.oldLine.content,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit",syntaxTheme:f,filename:x})})}),y.jsxs("td",{id:ge,className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible ${pe?me:""}`,children:[y.jsx("span",{children:M.newLineNumber||""}),O?.side==="new"&&O?.lineNumber===M.newLineNumber&&y.jsxs(y.Fragment,{children:[S&&x&&M.newLineNumber!==void 0&&y.jsx(eu,{onClick:()=>{const xe=M.newLineNumber;!x||xe===void 0||S(x,xe)}}),y.jsx(Ws,{onMouseDown:xe=>{xe.stopPropagation(),M.newLineNumber&&(N({side:"new",lineNumber:M.newLineNumber}),C({side:"new",lineNumber:M.newLineNumber}),z(!0))},onMouseUp:xe=>{if(xe.stopPropagation(),!M.newLineNumber||!w){z(!1),N(null),C(null);return}const de=E&&E.side==="new"?E.lineNumber:M.newLineNumber;if(w.side!=="new"||w.lineNumber===de)Y("new",M.newLineNumber);else{const Se=Math.min(w.lineNumber,de),Ee=Math.max(w.lineNumber,de);Y("new",[Se,Ee])}z(!1),N(null),C(null)}})]})]}),y.jsx("td",{className:`w-1/2 p-0 align-top relative ${Ex(M.newLine,kx(M.newLine))} ${Z("new",M)} ${pe?me:""}`,children:M.newLine&&y.jsx("div",{className:"flex items-center relative min-h-[20px] px-3",children:M.wordLevelDiff?y.jsx(kd,{segments:M.wordLevelDiff.newSegments,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx($a,{code:M.newLine.content,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit",syntaxTheme:f,filename:x})})})]}),q.length>0&&y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:4,className:"p-0 border-t border-github-border",children:q.map(xe=>{const de=xe.side||"new";let Se;return de==="old"&&M.oldLineNumber?Se="left":de==="new"&&M.newLineNumber?Se="right":Se=I(M),y.jsx("div",{className:`flex ${Se==="left"?"justify-start":Se==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${Se==="full"?"w-full":"w-1/2"}`,children:y.jsx("div",{className:"m-2 mx-3",children:y.jsx(hh,{comment:xe,onGeneratePrompt:s,onRemoveComment:u,onUpdateComment:c,syntaxTheme:f})})})},xe.id)})})}),U&&(U.side==="old"&&U.lineNumber===M.oldLineNumber||U.side==="new"&&U.lineNumber===M.newLineNumber||Array.isArray(U.lineNumber)&&(U.side==="new"&&U.lineNumber[1]===M.newLineNumber||U.side==="old"&&U.lineNumber[1]===M.oldLineNumber))&&y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:4,className:"p-0",children:y.jsx("div",{className:`flex ${U.side==="old"?"justify-start":U.side==="new"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:"w-1/2",children:y.jsx(ev,{onSubmit:G,onCancel:B,selectedCode:$(),syntaxTheme:f,filename:x})})})})})]},V)})})})})}const N8=T.memo(function({chunk:r,chunkIndex:l,comments:i,onAddComment:s,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f,mode:h=Za,syntaxTheme:p,cursor:m=null,fileIndex:b=0,onLineClick:v,commentTrigger:x,onCommentTriggerHandled:S,filename:w,onOpenInEditor:N}){const[E,C]=T.useState(null),[j,z]=T.useState(null),[U,L]=T.useState(!1),[O,H]=T.useState(null),[Y,B]=T.useState(null);T.useEffect(()=>{if(x?.lineIndex!==void 0){const V=r.lines[x.lineIndex];if(V){const R=V.newLineNumber||V.oldLineNumber,D=V.type==="delete"?"old":"new";R&&(H({side:D,lineNumber:R}),S?.())}}},[x,r.lines,S]),T.useEffect(()=>{if(U){const V=()=>{L(!1),C(null),z(null)};return document.addEventListener("mouseup",V),()=>{document.removeEventListener("mouseup",V)}}},[U]);const $=T.useCallback((V,R)=>{O?.side===V&&O?.lineNumber===R?H(null):H({side:V,lineNumber:R})},[O]),G=T.useCallback(()=>{H(null)},[]),J=T.useCallback(()=>{if(!O)return"";const{side:V,lineNumber:R}=O,D=r.lines;if(typeof R=="number")return D.find(A=>V==="old"?A.oldLineNumber===R:A.newLineNumber===R)?.content?.replace(/^[+-]/,"")||"";{const[q,A]=R;return D.filter(re=>{const fe=V==="old"?re.oldLineNumber:re.newLineNumber;return fe!==void 0&&fe>=q&&fe<=A}).map(re=>re.content?.replace(/^[+-]/,"")||"").join(`
|
|
65
|
+
`)}},[O,r.lines]),I=T.useCallback(async V=>{if(O!==null){const R=J();await s(O.lineNumber,V,R||void 0,O.side),H(null)}},[O,s,J]),Z=(V,R)=>i.filter(D=>{const q=Array.isArray(D.line)?D.line[1]===V:D.line===V,A=!D.side||D.side===R;return q&&A}),F=V=>{if(h==="unified")return"full";switch(V.type){case"delete":return"left";case"add":return"right";default:return"full"}},X=(V,R)=>{if(!V)return"";if(U&&E&&j){const D=Math.min(E,j),q=Math.max(E,j);if(V>=D&&V<=q){let A="after:bg-blue-100 after:absolute after:inset-0 after:opacity-30 after:border-l-4 after:border-blue-500 after:pointer-events-none";return V===D&&(A+=" after:border-t-2"),V===q&&(A+=" after:border-b-2"),A}}if(O&&O.side===R){const D=Array.isArray(O.lineNumber)?O.lineNumber[0]:O.lineNumber,q=Array.isArray(O.lineNumber)?O.lineNumber[1]:O.lineNumber;if(V>=D&&V<=q)return"after:bg-diff-selected-bg after:absolute after:inset-0 after:border-l-5 after:border-l-diff-selected-border after:pointer-events-none"}return""},M=T.useMemo(()=>{const V=new Map,R=r.lines;let D=0;for(;D<R.length;){const q=R[D];if(!q){D++;continue}if(q.type==="delete"){let A=D+1;for(;A<R.length&&R[A]?.type==="delete";)A++;const ne=R.slice(D,A),re=D,fe=[];for(;A<R.length&&R[A]?.type==="add";){const ye=R[A];ye&&fe.push({line:ye,index:A}),A++}const ge=Math.max(ne.length,fe.length);for(let ye=0;ye<ge;ye++){const pe=ne[ye],me=fe[ye];if(pe&&me&&W0(pe.content,me.line.content)){const xe=J0(pe.content,me.line.content);V.set(re+ye,xe.oldSegments),V.set(me.index,xe.newSegments)}}D=A}else D++}return V},[r.lines]);return h==="split"?y.jsx(C8,{chunk:r,chunkIndex:l,comments:i,onAddComment:s,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f,onOpenInEditor:N,syntaxTheme:p,cursor:m,fileIndex:b,onLineClick:v,filename:w,commentTrigger:x,onCommentTriggerHandled:S}):y.jsx("div",{className:"bg-github-bg-primary",children:y.jsx("table",{className:"w-full table-fixed border-collapse font-mono text-sm leading-5",children:y.jsx("tbody",{children:r.lines.map((V,R)=>{const D=V.newLineNumber||V.oldLineNumber||0,q=V.type==="delete"?"old":"new",A=O?Array.isArray(O.lineNumber)?O.lineNumber[1]:O.lineNumber:null,ne=V.type==="delete"?V.oldLineNumber:V.newLineNumber,re=V.type==="delete"?"old":"new",fe=ne?Z(ne,re):[],ge=`file-${b}-chunk-${l}-line-${R}`,ye=m&&m.chunkIndex===l&&m.lineIndex===R;return y.jsxs(Jt.Fragment,{children:[y.jsx(tv,{line:V,index:R,lineId:ge,isCurrentLine:ye||!1,hoveredLineIndex:Y,selectedLineStyle:X(V.newLineNumber||V.oldLineNumber,V.type==="delete"?"old":"new"),onMouseEnter:()=>{B(R)},onMouseLeave:()=>B(null),onMouseMove:()=>{if(U&&E){const pe=V.newLineNumber||V.oldLineNumber;pe&&z(pe)}},onCommentButtonMouseDown:pe=>{pe.stopPropagation();const me=V.newLineNumber||V.oldLineNumber;me&&(C(me),z(me),L(!0))},onCommentButtonMouseUp:pe=>{pe.stopPropagation();const me=V.newLineNumber||V.oldLineNumber,xe=V.type==="delete"?"old":"new";if(!me||!E){L(!1),C(null),z(null);return}const de=j||me;if(E===de)$(xe,me);else{const Se=Math.min(E,de),Ee=Math.max(E,de);$(xe,[Se,Ee])}L(!1),C(null),z(null)},onOpenInEditor:N&&w&&V.type!=="delete"&&(V.newLineNumber||V.oldLineNumber)?()=>{const pe=V.newLineNumber||V.oldLineNumber;pe&&w&&N(w,pe)}:void 0,syntaxTheme:p,filename:w,diffSegments:M.get(R),onClick:()=>{const pe=V.type==="delete"?"left":"right";v?.(b,l,R,pe)}}),fe.map(pe=>{const me=F(V);return y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:3,className:"p-0 border-t border-github-border",children:y.jsx("div",{className:`flex ${me==="left"?"justify-start":me==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${me==="full"?"w-full":"w-1/2"} m-2 mx-4`,children:y.jsx(hh,{comment:pe,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f,syntaxTheme:p})})})})},pe.id)}),O&&O.side===q&&A===D&&y.jsx("tr",{className:"bg-[var(--bg-secondary)]",children:y.jsx("td",{colSpan:3,className:"p-0",children:y.jsx("div",{className:`flex ${F(V)==="left"?"justify-start":F(V)==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${F(V)==="full"?"w-full":"w-1/2"}`,children:y.jsx(ev,{onSubmit:I,onCancel:G,selectedCode:J(),syntaxTheme:p,filename:w})})})})})]},R)})})})})}),hd=20,pd=T.memo(function({direction:r,hiddenLines:l,onExpandUp:i,onExpandDown:s,onExpandAll:u,isLoading:c=!1}){if(l<=0)return null;const f=`${l} ${l===1?"line":"lines"}`,h=l<=hd,p="grid-cols-[var(--line-number-width)_1fr]",m="flex flex-1 w-full items-center justify-center py-1 text-github-text-primary hover:bg-github-bg-secondary hover:text-github-text-muted transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed",b=[];return h?b.push({key:"all",onClick:u,ariaLabel:`Expand all ${l} hidden lines`,icon:y.jsx(ik,{size:16,"aria-hidden":"true"})}):((r==="up"||r==="both")&&b.push({key:"up",onClick:i,ariaLabel:`Expand ${hd} hidden lines above`,icon:y.jsx(a2,{size:12,"aria-hidden":"true",className:"translate-y-0.5"})}),(r==="down"||r==="both")&&b.push({key:"down",onClick:s,ariaLabel:`Expand ${hd} hidden lines below`,icon:y.jsx(l2,{size:12,"aria-hidden":"true",className:"-translate-y-0.5"})})),y.jsxs("div",{className:`grid w-full border-l border-r border-github-border bg-github-bg-tertiary text-sm ${p}`,children:[y.jsx("div",{className:"flex flex-col items-stretch justify-center gap-0.5 border-r border-github-border",children:c?y.jsx(H2,{size:14,className:"animate-spin text-github-text-muted self-center","aria-hidden":"true"}):b.map(v=>y.jsx("button",{type:"button",onClick:v.onClick,disabled:c||!v.onClick,className:m,title:v.ariaLabel,"aria-label":v.ariaLabel,children:v.icon},v.key))}),y.jsx("div",{className:"flex items-center justify-start px-3 py-1.5 font-mono text-github-text-muted select-none",children:f})]})});function tu({file:e,comments:r,diffMode:l,syntaxTheme:i,cursor:s,fileIndex:u,mergedChunks:c,isExpandLoading:f,expandHiddenLines:h,expandAllBetweenChunks:p,onAddComment:m,onGeneratePrompt:b,onRemoveComment:v,onUpdateComment:x,onLineClick:S,onOpenInEditor:w,commentTrigger:N,onCommentTriggerHandled:E}){const C=(j,z,U,L)=>j==="top"&&z.hiddenLinesBefore>0?y.jsx(pd,{direction:"down",hiddenLines:z.hiddenLinesBefore,onExpandDown:()=>h(e,U,"up"),onExpandAll:()=>p(e,U,z.hiddenLinesBefore),isLoading:f}):j==="middle"&&z.hiddenLinesBefore>0?y.jsx(pd,{direction:"both",hiddenLines:z.hiddenLinesBefore,onExpandUp:()=>h(e,U-1,"down"),onExpandDown:()=>h(e,U,"up"),onExpandAll:()=>p(e,U,z.hiddenLinesBefore),isLoading:f}):j==="bottom"&&z.hiddenLinesAfter>0?y.jsx(pd,{direction:"up",hiddenLines:z.hiddenLinesAfter,onExpandUp:()=>h(e,L,"down"),onExpandAll:()=>h(e,L,"down",z.hiddenLinesAfter),isLoading:f}):null;return y.jsx(y.Fragment,{children:c.map((j,z)=>{const U=z===0,L=z===c.length-1,O=j.originalIndices[0]??0,H=j.originalIndices[j.originalIndices.length-1]??0;return y.jsxs(Jt.Fragment,{children:[U&&C("top",j,O,H),!U&&C("middle",j,O,H),y.jsx("div",{id:`chunk-${e.path.replace(/[^a-zA-Z0-9]/g,"-")}-${z}`,children:y.jsx(N8,{chunk:j,chunkIndex:z,comments:r,onAddComment:m,onGeneratePrompt:b,onRemoveComment:v,onUpdateComment:x,onOpenInEditor:w,mode:l,syntaxTheme:i,cursor:s&&s.chunkIndex===z?s:null,fileIndex:u,onLineClick:S,commentTrigger:N&&N.chunkIndex===z?N:null,onCommentTriggerHandled:E,filename:e.path})}),L&&C("bottom",j,O,H)]},z)})})}const A8=e=>!!(e&&e!=="stdin"),wi=["text-[26px] font-semibold","text-[22px] font-semibold","text-xl font-semibold","text-lg font-semibold","text-base font-semibold uppercase tracking-wide","text-base font-semibold"],T8=e=>e.type==="delete"||e.type==="remove",j8=e=>e.type==="normal"||e.type==="context",nu=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),nh=(e,r,l)=>{const i=e[e.length-1];if(i&&i.type===r){i.lines.push(l);return}e.push({type:r,lines:[l]})},gd=(e,r)=>{r.forEach(l=>nh(e,"delete",l)),r.length=0},R8=e=>{const r=[],l=[];let i=!1;return e.forEach(s=>{s.lines.forEach(u=>{if(!(u.type==="header"||u.type==="hunk")){if(T8(u)){l.push(u.content);return}if(u.type==="add"){l.length>0&&(gd(r,l),i=!0),nh(r,i?"change":"add",u.content);return}j8(u)&&(gd(r,l),i=!1,nh(r,"context",u.content))}}),gd(r,l),i=!1}),r},_8=e=>Jt.isValidElement(e),L8=e=>Jt.isValidElement(e),rh=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(rh).join(""):_8(e)?rh(e.props.children):"",nv=e=>({h1:({children:r})=>y.jsx("h1",{className:`${wi[0]} mt-6 mb-2 first:mt-0`,children:r}),h2:({children:r})=>y.jsx("h2",{className:`${wi[1]} mt-6 mb-2 first:mt-0`,children:r}),h3:({children:r})=>y.jsx("h3",{className:`${wi[2]} mt-6 mb-2 first:mt-0`,children:r}),h4:({children:r})=>y.jsx("h4",{className:`${wi[3]} mt-6 mb-2 first:mt-0`,children:r}),h5:({children:r})=>y.jsx("h5",{className:`${wi[4]} mt-6 mb-2 first:mt-0`,children:r}),h6:({children:r})=>y.jsx("h6",{className:`${wi[5]} mt-6 mb-2 first:mt-0`,children:r}),p:({children:r})=>y.jsx("p",{className:"text-base leading-7",children:r}),ul:({children:r})=>y.jsx("ul",{className:"list-disc pl-6 text-base space-y-1",children:r}),ol:({children:r})=>y.jsx("ol",{className:"list-decimal pl-6 text-base space-y-1",children:r}),li:({children:r})=>y.jsx("li",{children:r}),blockquote:({children:r})=>y.jsx("blockquote",{className:"border-l-4 border-github-border pl-4 text-github-text-muted italic",children:r}),hr:()=>y.jsx("hr",{className:"border-github-border"}),a:({href:r,children:l})=>{const i=r??"";if(!i||!nu(i))return y.jsx("span",{children:l});const s=i.startsWith("http");return y.jsx("a",{href:i,target:s?"_blank":void 0,rel:s?"noreferrer":void 0,className:"text-sky-400 hover:text-sky-300 underline underline-offset-4",children:l})},img:({src:r,alt:l})=>{const i=r??"";return!i||!nu(i)?null:y.jsx("img",{src:i,alt:l??"",loading:"lazy",className:"max-w-full rounded border border-github-border"})},pre:({children:r})=>{const i=(Array.isArray(r)?r:[r]).find(L8),s=rh(i??r),c=/language-(\S+)/.exec(i?.props.className??"")?.[1];return s.trim()?y.jsx("pre",{className:"markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm",children:y.jsx(dh,{code:s.replace(/\n$/,""),language:c,syntaxTheme:e,className:"font-mono text-github-text-primary"})}):y.jsx("pre",{className:"markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm",children:r})},code:({className:r,children:l})=>r?y.jsx("code",{className:r,children:l}):y.jsx("code",{className:"px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-sm font-mono",children:l})}),D8=e=>{switch(e){case"add":return"border-l-4 border-diff-addition-border";case"delete":return"border-l-4 border-diff-deletion-border";case"change":return"border-l-4 border-diff-addition-border";default:return"border-l-4 border-transparent"}},O8=e=>/^\s*\[[^\]]+\]:\s+\S+/.test(e),M8=e=>/^\s*\[\^[^\]]+\]:\s+/.test(e),z8=e=>/^\s*<!--.*-->\s*$/.test(e),B8=e=>e.trim()===""||O8(e)||M8(e)||z8(e),F8=e=>e.every(B8),I8=({blocks:e,syntaxTheme:r})=>{const l=T.useMemo(()=>nv(r),[r]);return y.jsx("div",{className:"space-y-4",children:e.map((i,s)=>{const c=i.lines.join(`
|
|
66
|
+
`).trim();if(!c)return null;const f=F8(i.lines);return y.jsx("div",{className:`px-4 ${D8(i.type)}`,children:f?y.jsx("pre",{className:"whitespace-pre-wrap text-sm text-github-text-primary font-mono",children:c}):y.jsx(Bh,{remarkPlugins:[Hh],urlTransform:h=>nu(h)?h:"",components:l,children:c})},`preview-block-${s}`)})})},U8=({content:e,syntaxTheme:r})=>{const l=T.useMemo(()=>nv(r),[r]);return y.jsx("div",{className:"space-y-4",children:y.jsx(Bh,{remarkPlugins:[Hh],urlTransform:i=>nu(i)?i:"",components:l,children:e})})};function H8(e){const{file:r,baseCommitish:l,targetCommitish:i,mergedChunks:s,syntaxTheme:u}=e,[c,f]=T.useState("diff"),[h,p]=T.useState(null),[m,b]=T.useState(!1),[v,x]=T.useState(null),[S,w]=T.useState(null),N=T.useMemo(()=>R8(s),[s]),E=T.useMemo(()=>!l&&!i?null:r.status==="added"?i?{path:r.path,ref:i}:null:r.status==="deleted"?l?{path:r.oldPath||r.path,ref:l}:null:i?{path:r.path,ref:i}:l?{path:r.oldPath||r.path,ref:l}:null,[l,i,r.path,r.oldPath,r.status]),C=T.useMemo(()=>E?`${E.ref}:${E.path}`:null,[E]);T.useEffect(()=>{if(!E||!C||!A8(E.ref)){p(null),w(null),x(null),b(!1);return}let z=!1;return(C!==S||h===null)&&(async()=>{C!==S&&p(null),b(!0),x(null);try{const L=encodeURIComponent(E.path),O=await fetch(`/api/blob/${L}?ref=${encodeURIComponent(E.ref)}`);if(!O.ok)throw new Error(`Failed to fetch preview: ${O.statusText}`);const H=await O.text();z||(p(H),w(C))}catch(L){z||(p(null),w(null),x(L instanceof Error?L.message:"Failed to load preview"))}finally{z||b(!1)}})(),()=>{z=!0}},[h,S,E,C]);const j=T.useMemo(()=>C===S&&h!==null,[h,S,C]);return T.useEffect(()=>{c==="full-preview"&&!j&&f("diff-preview")},[j,c]),y.jsxs("div",{className:"bg-github-bg-primary",children:[y.jsx("div",{className:"flex items-center justify-between border-b border-github-border px-4 py-2",children:y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("button",{onClick:()=>f("diff"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="diff"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Code Diff",children:[y.jsx(iu,{size:14}),"Diff"]}),y.jsxs("button",{onClick:()=>f("diff-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="diff-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Diff Preview",children:[y.jsx(Ms,{size:14}),"Diff Preview"]}),j&&y.jsxs("button",{onClick:()=>f("full-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="full-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Full Preview",children:[y.jsx(Ms,{size:14}),"Full Preview"]})]})}),c==="diff"&&y.jsx(tu,{...e}),c==="diff-preview"&&y.jsx("div",{className:"p-4",children:y.jsx(I8,{blocks:N,syntaxTheme:u})}),c==="full-preview"&&y.jsxs("div",{className:"p-4",children:[m&&y.jsx("div",{className:"text-sm text-github-text-muted mb-3",children:"Loading preview..."}),v&&y.jsx("div",{className:"text-sm text-github-danger mb-3",children:v}),!m&&!v&&h!==null&&y.jsx(U8,{content:h,syntaxTheme:u}),!m&&!v&&h===null&&y.jsx("div",{className:"text-sm text-github-text-muted",children:"Preview unavailable."})]})]})}const Si=["text-2xl font-semibold","text-xl font-semibold","text-lg font-semibold","text-base font-semibold","text-sm font-semibold uppercase tracking-wide","text-sm font-semibold"],rv={markdown:"Markdown",code:"Code",raw:"Raw",unknown:"Cell"},q8=/"cell_type"\s*:\s*"([^"]+)"/,Cx=/"source"\s*:/,P8=/"execution_count"\s*:\s*(null|[0-9]+)/,$8=/"id"\s*:\s*"([^"]+)"/,V8=e=>e.type==="delete"||e.type==="remove",G8=e=>e.type==="normal"||e.type==="context",lv=e=>e.type==="add"?"add":V8(e)?"delete":G8(e)?"context":null,iv=e=>e==="markdown"||e==="code"||e==="raw"?e:"unknown",Y8=e=>{const r=e.trim();if(!r.startsWith('"'))return null;let l=r;l.endsWith(",")&&(l=l.slice(0,-1));try{const i=JSON.parse(l);return typeof i=="string"?i:null}catch{return l.replace(/^"/,"").replace(/"$/,"").replace(/\\n/g,`
|
|
67
|
+
`).replace(/\\t/g," ").replace(/\\"/g,'"').replace(/\\\\/g,"\\")}},X8=e=>{const r=e.indexOf('"source"');if(r===-1)return null;const l=e.indexOf(":",r);if(l===-1)return null;let i=e.slice(l+1).trim();if(!i)return null;if(i.endsWith(",")&&(i=i.slice(0,-1).trim()),i.startsWith("[")){const s=i.lastIndexOf("]");if(s===-1)return null;const u=i.slice(0,s+1);try{const c=JSON.parse(u);if(Array.isArray(c))return c.filter(f=>typeof f=="string")}catch{return null}return[]}if(i.startsWith('"'))try{const s=JSON.parse(i);return typeof s=="string"?[s]:null}catch{return null}return null},Z8=e=>{const r=Q8(e);if(r)return r;const l=[];let i=null,s=!1,u=!1,c=!1;const f=()=>{i&&(i.status=s&&u?"change":s?"add":u?"delete":"context",l.push(i),i=null,s=!1,u=!1,c=!1)},h=p=>{f(),i={cellType:p,sourceLines:[],status:"context"}};return e.forEach(p=>{p.lines.forEach(m=>{const b=lv(m);if(!b)return;const v=m.content.match(q8);if(v?h(iv(v[1]??"")):!i&&Cx.test(m.content)&&h("unknown"),!i)return;if(b==="add"&&(s=!0),b==="delete"&&(u=!0),!i.id){const w=m.content.match($8);w&&(i.id=w[1])}if(i.executionCount===void 0){const w=m.content.match(P8);w&&(i.executionCount=w[1]==="null"?null:w[1])}if(Cx.test(m.content)){const w=X8(m.content);if(w){w.forEach(N=>{i?.sourceLines.push({type:b,content:N})}),c=!1;return}c=!0;return}if(!c)return;if(m.content.trim().startsWith("]")){c=!1;return}const S=Y8(m.content);S!==null&&i.sourceLines.push({type:b,content:S})})}),f(),{cells:l}},Q8=e=>{const r=Nx(e,["add","context"]),l=Nx(e,["delete","context"]),i=Ha(r),s=Ha(l);if(!i&&!s||i&&i.cells.length===0&&!s)return null;const u=i?.language??s?.language;return{cells:av(s?.cells??[],i?.cells??[]),language:u}},Nx=(e,r)=>e.flatMap(l=>l.lines).map(l=>{const i=lv(l);return!i||!r.includes(i)?null:l.content}).filter(l=>l!==null).join(`
|
|
68
|
+
`),Ha=e=>{if(!e.trim())return null;try{const r=JSON.parse(e);if(!r||typeof r!="object"||!("cells"in r))return null;const l=r.cells;if(!Array.isArray(l))return null;const i=r.metadata,s=K8(i);return{cells:l.map(u=>J8(u)),language:s}}catch{return null}},K8=e=>{if(!e||typeof e!="object")return;const r=e,l=r.language_info;if(l&&typeof l=="object"){const s=l.name;if(typeof s=="string"&&s.trim())return s}const i=r.kernelspec;if(i&&typeof i=="object"){const s=i.language;if(typeof s=="string"&&s.trim())return s}},J8=e=>{const r=typeof e=="object"&&e?e:{},l=typeof r.cell_type=="string"?r.cell_type:"",i=iv(l),s=typeof r.id=="string"?r.id:void 0,u=r.execution_count,c=u===null?null:typeof u=="number"?String(u):typeof u=="string"?u:void 0,f=W8(r.source);return{cellType:i,sourceText:f,id:s,executionCount:c}},W8=e=>typeof e=="string"?e:Array.isArray(e)?e.filter(r=>typeof r=="string").join(""):"",av=(e,r)=>{const l=[];if(e.some(u=>!!u.id)||r.some(u=>!!u.id)){const u=new Map;e.forEach((f,h)=>{f.id&&u.set(f.id,{cell:f,index:h})});const c=new Set;return r.forEach(f=>{const h=f.id?u.get(f.id):void 0;h&&c.add(h.index),l.push(md(h?.cell??null,f))}),e.forEach((f,h)=>{c.has(h)||l.push(md(f,null))}),l}const s=Math.max(e.length,r.length);for(let u=0;u<s;u+=1){const c=e[u]??null,f=r[u]??null;l.push(md(c,f))}return l},md=(e,r)=>{if(!r&&e)return{cellType:e.cellType,sourceLines:za(e.sourceText,"delete"),status:"delete",id:e.id,executionCount:e.executionCount};if(r&&!e)return{cellType:r.cellType,sourceLines:za(r.sourceText,"add"),status:"add",id:r.id,executionCount:r.executionCount};const l=e?.sourceText??"",i=r?.sourceText??"",s=r?.cellType??e?.cellType??"unknown",u=r?.id??e?.id,c=r?.executionCount??e?.executionCount;return l===i&&(e?.cellType??"")===(r?.cellType??"")?{cellType:s,sourceLines:za(i,"context"),status:"context",id:u,executionCount:c}:{cellType:s,sourceLines:[...za(l,"delete"),...za(i,"add")],status:"change",id:u,executionCount:c}},za=(e,r)=>e?[{type:r,content:e}]:[],bd=e=>!!(e&&e!=="stdin"),yd=async(e,r)=>{const l=encodeURIComponent(e),i=await fetch(`/api/blob/${l}?ref=${encodeURIComponent(r)}`);return i.ok?i.text():null},_i=(e,r)=>e.filter(l=>r.includes(l.type)).map(l=>l.content).join(""),xd=e=>{if(!e)return[];const r=e.split(`
|
|
69
|
+
`);return r.length>0&&r[r.length-1]===""&&r.pop(),r},ov=(e,r)=>!e&&!r?[]:e?r?S8(e,r).flatMap(l=>{const i=l.added?"add":l.removed?"delete":"context";return xd(l.value).map(s=>({type:i,content:s}))}):xd(e).map(l=>({type:"delete",content:l})):xd(r).map(l=>({type:"add",content:l})),ej=e=>Jt.isValidElement(e),tj=e=>Jt.isValidElement(e),lh=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(lh).join(""):ej(e)?lh(e.props.children):"",nj=e=>{switch(e){case"add":return"border-l-4 border-diff-addition-border";case"delete":return"border-l-4 border-diff-deletion-border";case"change":return"border-l-4 border-diff-addition-border";default:return"border-l-4 border-transparent"}},Ax=e=>{switch(e){case"before":return"border-l-4 border-diff-deletion-border";case"after":return"border-l-4 border-diff-addition-border";default:return"border-l-4 border-transparent"}},rj=e=>{switch(e){case"add":return"bg-diff-addition-bg";case"delete":return"bg-diff-deletion-bg";default:return"bg-transparent"}},lj=e=>{switch(e){case"add":return"+";case"delete":return"-";default:return" "}},ij=e=>{switch(e){case"add":return"text-github-accent";case"delete":return"text-github-danger";default:return"text-github-text-muted"}},ih=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),aj=e=>({h1:({children:r})=>y.jsx("h1",{className:`${Si[0]} mb-2`,children:r}),h2:({children:r})=>y.jsx("h2",{className:`${Si[1]} mb-2`,children:r}),h3:({children:r})=>y.jsx("h3",{className:`${Si[2]} mb-2`,children:r}),h4:({children:r})=>y.jsx("h4",{className:`${Si[3]} mb-2`,children:r}),h5:({children:r})=>y.jsx("h5",{className:`${Si[4]} mb-2`,children:r}),h6:({children:r})=>y.jsx("h6",{className:`${Si[5]} mb-2`,children:r}),p:({children:r})=>y.jsx("p",{className:"text-sm leading-7",children:r}),ul:({children:r})=>y.jsx("ul",{className:"list-disc pl-6 text-sm space-y-1",children:r}),ol:({children:r})=>y.jsx("ol",{className:"list-decimal pl-6 text-sm space-y-1",children:r}),li:({children:r})=>y.jsx("li",{children:r}),blockquote:({children:r})=>y.jsx("blockquote",{className:"border-l-4 border-github-border pl-4 text-github-text-muted italic",children:r}),hr:()=>y.jsx("hr",{className:"border-github-border"}),a:({href:r,children:l})=>{const i=r??"";if(!i||!ih(i))return y.jsx("span",{children:l});const s=i.startsWith("http");return y.jsx("a",{href:i,target:s?"_blank":void 0,rel:s?"noreferrer":void 0,className:"text-sky-400 hover:text-sky-300 underline underline-offset-4",children:l})},img:({src:r,alt:l})=>{const i=r??"";return!i||!ih(i)?null:y.jsx("img",{src:i,alt:l??"",loading:"lazy",className:"max-w-full rounded border border-github-border"})},pre:({children:r})=>{const i=(Array.isArray(r)?r:[r]).find(tj),s=lh(i??r),c=/language-(\S+)/.exec(i?.props.className??"")?.[1];return s.trim()?y.jsx("pre",{className:"border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs",children:y.jsx(dh,{code:s.replace(/\n$/,""),language:c,syntaxTheme:e,className:"font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre"})}):y.jsx("pre",{className:"border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs",children:r})},code:({className:r,children:l})=>r?y.jsx("code",{className:r,children:l}):y.jsx("code",{className:"px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-xs font-mono",children:l}),table:({children:r})=>y.jsx("div",{className:"overflow-x-auto",children:y.jsx("table",{className:"min-w-full border border-github-border",children:r})}),th:({children:r})=>y.jsx("th",{className:"border border-github-border px-2 py-1 bg-github-bg-tertiary text-sm",children:r}),td:({children:r})=>y.jsx("td",{className:"border border-github-border px-2 py-1 text-sm",children:r})}),oj=e=>{const r=_i(e.sourceLines,["context","delete"]),l=_i(e.sourceLines,["context","add"]),i=[];return e.status==="change"?(r.trim()&&i.push({label:"Before",content:r,tone:"before"}),l.trim()&&i.push({label:"After",content:l,tone:"after"}),i.length===0&&i.push({label:"After",content:l,tone:"after"}),i):e.status==="delete"?(i.push({label:"Before",content:r||l,tone:"before"}),i):(i.push({label:"After",content:l||r,tone:"after"}),i)},sv=(e,r,l,i)=>{if(!r.trim())return y.jsx("span",{className:"text-xs text-github-text-muted",children:"Empty cell"});if(e==="markdown"){const s=aj(l);return y.jsx(Bh,{remarkPlugins:[Hh],urlTransform:u=>ih(u)?u:"",components:s,children:r})}return e==="raw"?y.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs font-mono text-github-text-primary",children:r}):y.jsx("pre",{className:"overflow-x-auto text-xs",children:y.jsx($a,{code:r.replace(/\n$/,""),language:i||"python",syntaxTheme:l,className:"font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre"})})},sj=({lines:e,syntaxTheme:r,language:l})=>e.length===0?y.jsx("span",{className:"text-xs text-github-text-muted",children:"Empty cell"}):y.jsx("div",{className:"overflow-x-auto",children:y.jsx("div",{className:"font-mono text-xs",children:e.map((i,s)=>y.jsxs("div",{className:`flex items-start min-h-[16px] ${rj(i.type)}`,children:[y.jsx("span",{className:`w-5 text-center flex-shrink-0 select-none ${ij(i.type)}`,children:lj(i.type)}),y.jsx($a,{code:i.content||" ",language:l||"python",syntaxTheme:r,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit"})]},`notebook-code-line-${s}`))})}),uj=({cells:e,syntaxTheme:r,language:l})=>y.jsx("div",{className:"space-y-4",children:e.map((i,s)=>{const u=oj(i),c=i.cellType==="code"&&i.executionCount!==void 0?`In[${i.executionCount??" "}]`:null,f=i.cellType==="code",h=f?ov(_i(i.sourceLines,["context","delete"]),_i(i.sourceLines,["context","add"])).filter(p=>p.type!=="context"):[];return f&&h.length===0?null:y.jsxs("div",{className:`rounded border border-github-border bg-github-bg-secondary/40 p-4 ${nj(i.status)}`,children:[y.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2 mb-3",children:y.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-github-text-muted",children:rv[i.cellType]}),c&&y.jsx("span",{className:"text-xs font-mono text-github-text-secondary",children:c}),i.id&&y.jsx("span",{className:"text-xs font-mono text-github-text-muted",children:i.id})]})}),y.jsx("div",{className:"space-y-3",children:f?y.jsx("div",{className:`px-4 py-3 ${Ax(i.status==="delete"?"before":"after")}`,children:y.jsx(sj,{lines:h,syntaxTheme:r,language:l})}):u.map((p,m)=>y.jsx("div",{className:`px-4 py-3 ${Ax(p.tone)}`,children:y.jsx("div",{className:"text-sm text-github-text-primary",children:sv(i.cellType,p.content,r,l)})},`notebook-cell-${s}-section-${m}`))})]},`notebook-cell-${s}`)})}),cj=({cells:e,syntaxTheme:r,language:l})=>y.jsx("div",{className:"space-y-4",children:e.map((i,s)=>{const u=i.cellType==="code"&&i.executionCount!==void 0?`In[${i.executionCount??" "}]`:null;return y.jsxs("div",{className:"rounded border border-github-border bg-github-bg-secondary/40 p-4",children:[y.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-github-text-muted",children:rv[i.cellType]}),u&&y.jsx("span",{className:"text-xs font-mono text-github-text-secondary",children:u}),i.id&&y.jsx("span",{className:"text-xs font-mono text-github-text-muted",children:i.id})]}),y.jsx("div",{className:"text-sm text-github-text-primary",children:sv(i.cellType,i.sourceText,r,l)})]},`notebook-full-cell-${s}`)})});function fj(e){const{file:r,baseCommitish:l,targetCommitish:i}=e,[s,u]=T.useState("diff"),c=T.useMemo(()=>Z8(e.mergedChunks),[e.mergedChunks]),[f,h]=T.useState({status:"idle",cells:c.cells,language:c.language}),p=T.useMemo(()=>f.cells.filter(L=>L.status==="context"?!1:L.cellType!=="code"?!0:ov(_i(L.sourceLines,["context","delete"]),_i(L.sourceLines,["context","add"])).filter(H=>H.type!=="context").length>0),[f.cells]),[m,b]=T.useState(null),[v,x]=T.useState(c.language),[S,w]=T.useState(!1),[N,E]=T.useState(null),[C,j]=T.useState(null),z=T.useMemo(()=>!l&&!i?null:r.status==="added"?i?{path:r.path,ref:i}:null:r.status==="deleted"?l?{path:r.oldPath||r.path,ref:l}:null:i?{path:r.path,ref:i}:l?{path:r.oldPath||r.path,ref:l}:null,[l,i,r.oldPath,r.path,r.status]),U=T.useMemo(()=>z?`${z.ref}:${z.path}`:null,[z]);return T.useEffect(()=>{let L=!1;return(async()=>{const H=l||"HEAD~1",Y=i||"HEAD",B=r.oldPath||r.path,$=r.status!=="added"&&bd(H),G=r.status!=="deleted"&&bd(Y);if(!$&&!G){h({status:"ready",cells:c.cells,language:c.language,source:"diff",message:"Notebook content could not be loaded, falling back to diff preview."});return}h(J=>({...J,status:"loading"}));try{const[J,I]=await Promise.all([$?yd(B,H):Promise.resolve(null),G?yd(r.path,Y):Promise.resolve(null)]),Z=J?Ha(J):null,F=I?Ha(I):null;if(!Z&&!F){L||h({status:"ready",cells:c.cells,language:c.language,source:"diff",message:"Notebook content could not be parsed, falling back to diff preview."});return}const X=F?.language??Z?.language??c.language,M=av(Z?.cells??[],F?.cells??[]);L||h({status:"ready",cells:M,source:"blob",language:X})}catch(J){L||h({status:"error",cells:c.cells,language:c.language,source:"diff",message:J instanceof Error?J.message:"Failed to load notebook preview."})}})(),()=>{L=!0}},[l,r.oldPath,r.path,r.status,e.mergedChunks,i,c]),T.useEffect(()=>{if(s!=="full-preview")return;if(!z||!U||!bd(z.ref)){b(null),j(null),E(null),w(!1);return}let L=!1;return(U!==C||!m)&&(async()=>{U!==C&&b(null),w(!0),E(null);try{const H=await yd(z.path,z.ref);if(!H)throw new Error("Failed to load preview.");const Y=Ha(H);if(!Y)throw new Error("Notebook content could not be parsed.");L||(b(Y.cells),x(Y.language??c.language),j(U))}catch(H){L||(b(null),j(null),E(H instanceof Error?H.message:"Failed to load preview"))}finally{L||w(!1)}})(),()=>{L=!0}},[c.language,m,C,s,z,U]),y.jsxs("div",{className:"bg-github-bg-primary",children:[y.jsx("div",{className:"flex items-center justify-between border-b border-github-border px-4 py-2",children:y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("button",{onClick:()=>u("diff"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${s==="diff"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Code Diff",children:[y.jsx(iu,{size:14}),"Diff"]}),y.jsxs("button",{onClick:()=>u("diff-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${s==="diff-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Diff Preview",children:[y.jsx(Ms,{size:14}),"Diff Preview"]}),y.jsxs("button",{onClick:()=>u("full-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${s==="full-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Full Preview",children:[y.jsx(Ms,{size:14}),"Full Preview"]})]})}),s==="diff"&&y.jsx(tu,{...e}),s==="diff-preview"&&y.jsxs("div",{className:"p-4",children:[f.status==="loading"&&y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:"Loading notebook preview…"}),f.message&&y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:f.message}),p.length===0?y.jsxs("div",{children:[y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:"No changed notebook cells were found. Showing raw diff instead."}),y.jsx(tu,{...e})]}):y.jsx(uj,{cells:p,syntaxTheme:e.syntaxTheme,language:f.language})]}),s==="full-preview"&&y.jsxs("div",{className:"p-4",children:[S&&y.jsx("div",{className:"text-sm text-github-text-muted mb-3",children:"Loading preview..."}),N&&y.jsx("div",{className:"text-sm text-github-danger mb-3",children:N}),!S&&!N&&m&&y.jsx(cj,{cells:m,syntaxTheme:e.syntaxTheme,language:v??c.language}),!S&&!N&&!m&&y.jsx("div",{className:"text-sm text-github-text-muted",children:"Preview unavailable."})]})]})}const vd=[{id:"image",match:e=>F3(e.path),Component:P3,canExpandHiddenLines:()=>!1},{id:"markdown",match:e=>U3(e.path),Component:H8,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"},{id:"notebook",match:e=>q3(e.path),Component:fj,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"},{id:"default",match:()=>!0,Component:tu,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"}],dj=e=>{const r=vd[vd.length-1];if(!r)throw new Error("No diff viewers registered");return vd.find(l=>l.match(e))??r},hj=e=>{switch(e){case"added":return y.jsx(Wx,{size:16,className:"text-github-accent"});case"deleted":return y.jsx(e1,{size:16,className:"text-github-danger"});case"renamed":return y.jsx(Jx,{size:16,className:"text-github-warning"});default:return y.jsx(iu,{size:16,className:"text-github-text-secondary"})}},pj=({file:e,isCollapsed:r,isReviewed:l,onToggleCollapsed:i,onToggleAllCollapsed:s,onToggleReviewed:u})=>{const[c,f]=T.useState(!1);return y.jsxs("div",{className:"bg-github-bg-secondary border-t-2 border-t-github-accent border-b border-github-border px-5 py-4 flex items-center justify-between flex-wrap gap-3 sticky top-0 z-10",children:[y.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[y.jsx("button",{onClick:h=>{h.altKey?s(!r):i(e.path)},className:"text-github-text-muted hover:text-github-text-primary transition-colors cursor-pointer",title:r?"Expand file (Alt+Click to expand all)":"Collapse file (Alt+Click to collapse all)",children:r?y.jsx(Qx,{size:16}):y.jsx(Ti,{size:16})}),hj(e.status),y.jsx("h2",{className:"text-sm font-mono text-github-text-primary m-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e.path}),y.jsx("button",{className:`bg-transparent border-none cursor-pointer px-1.5 py-1 rounded text-sm transition-all hover:bg-github-bg-tertiary ${c?"text-github-accent":"text-github-text-secondary hover:text-github-text-primary"}`,onClick:()=>{navigator.clipboard.writeText(e.path).then(()=>{console.log("File path copied to clipboard:",e.path),f(!0),setTimeout(()=>f(!1),2e3)}).catch(h=>{console.error("Failed to copy file path:",h)})},title:"Copy file path",children:c?y.jsx(Pa,{size:14}):y.jsx(Kx,{size:14})}),e.oldPath&&e.oldPath!==e.path&&y.jsxs("span",{className:"text-xs text-github-text-muted italic",children:["(renamed from ",e.oldPath,")"]})]}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[y.jsxs("span",{className:"font-medium px-1 py-0.5 rounded text-github-accent bg-green-100/10",children:["+",e.additions]}),y.jsxs("span",{className:"font-medium px-1 py-0.5 rounded text-github-danger bg-red-100/10",children:["-",e.deletions]})]}),y.jsxs("button",{onClick:()=>u(e.path),className:`flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-all duration-200 ${l?"bg-github-accent text-white":"dark:bg-slate-600 dark:text-white dark:border-slate-500 dark:hover:bg-slate-500 dark:hover:border-slate-400 bg-github-bg-secondary text-github-text-primary border border-github-border hover:bg-github-bg-tertiary hover:border-github-text-muted"}`,title:l?"Mark as not reviewed":"Mark as reviewed",children:[l?y.jsx(Pa,{size:14}):y.jsx(tk,{size:14}),"Viewed"]})]})]})},gj=e=>{const r={old:[],new:[]};return e.forEach(l=>{const i=l.side??"new",[s,u]=Array.isArray(l.line)?[l.line[0],l.line[1]]:[l.line,l.line];s<=0||u<=0||r[i].push({start:Math.min(s,u),end:Math.max(s,u)})}),r},mj=(e,r)=>e.chunks.map((l,i)=>{const s=r==="old"?l.oldStart:l.newStart,u=r==="old"?l.oldLines:l.newLines;return!s||u<=0?null:{start:s,end:s+u-1,index:i}}).filter(l=>!!l),bj=e=>{const r=[],l=e[0];if(!l)return r;l.start>1&&r.push({type:"before",start:1,end:l.start-1,nextChunkIndex:l.index});for(let s=1;s<e.length;s+=1){const u=e[s-1],c=e[s];!u||!c||c.start>u.end+1&&r.push({type:"between",start:u.end+1,end:c.start-1,prevChunkIndex:u.index,nextChunkIndex:c.index})}const i=e[e.length-1];return i&&r.push({type:"after",start:i.end+1,end:Number.POSITIVE_INFINITY,prevChunkIndex:i.index}),r},yj=e=>{const r=new Map;return e.forEach(l=>{const i=l.originalIndices[0];i!==void 0&&r.set(i,l)}),r},xj=e=>{const r=e[e.length-1];return r?.originalIndices[r.originalIndices.length-1]??null},vj=T.memo(function({file:r,comments:l,diffMode:i,reviewedFiles:s,onToggleReviewed:u,collapsedFiles:c,onToggleCollapsed:f,onToggleAllCollapsed:h,onAddComment:p,onGeneratePrompt:m,onRemoveComment:b,onUpdateComment:v,onOpenInEditor:x,syntaxTheme:S,baseCommitish:w,targetCommitish:N,cursor:E=null,fileIndex:C=0,onLineClick:j,commentTrigger:z,onCommentTriggerHandled:U,mergedChunks:L,expandLines:O,expandAllBetweenChunks:H,prefetchFileContent:Y,isExpandLoading:B}){const $=c.has(r.path),G=T.useRef(null),[J,I]=T.useState(!1),Z=dj(r),F=Z.canExpandHiddenLines?.(r)??!1;T.useEffect(()=>{if(!F)return;const D=G.current;if(!D)return;const q=new IntersectionObserver(([A])=>{A?.isIntersecting&&I(!0)},{rootMargin:"200px"});return q.observe(D),()=>q.disconnect()},[F]),T.useEffect(()=>{J&&!$&&F&&Y(r)},[J,$,F,r,Y]);const X=T.useCallback(async(D,q,A,ne)=>{try{await p(r.path,D,q,A,ne)}catch(re){console.error("Failed to add comment:",re)}},[r.path,p]);T.useEffect(()=>{if($||B||!F||l.length===0||r.chunks.length===0||L.length===0)return;const D=gj(l),q=yj(L),A=xj(L),ne=L[L.length-1],re=new Set,fe=(ge,ye)=>{re.has(ge)||(re.add(ge),ye())};["old","new"].forEach(ge=>{const ye=D[ge];if(ye.length===0)return;const pe=mj(r,ge);bj(pe).forEach(xe=>{if(!ye.some(Ve=>Ve.start<=xe.end&&Ve.end>=xe.start))return;if(xe.type==="after"&&ne&&A!==null){ne.hiddenLinesAfter>0&&fe(`after-${A}`,()=>{O(r,A,"down",ne.hiddenLinesAfter)});return}const Se=xe.nextChunkIndex;if(Se===void 0)return;const Ee=q.get(Se);!Ee||Ee.hiddenLinesBefore<=0||(xe.type==="before"?fe(`before-${Se}`,()=>{O(r,Se,"up",Ee.hiddenLinesBefore)}):xe.type==="between"&&fe(`between-${Se}`,()=>{H(r,Se,Ee.hiddenLinesBefore)}))})})},[l,H,O,r,$,B,L,F]);const M="4em",V=Z.Component,R={file:r,comments:l,diffMode:i,syntaxTheme:S,baseCommitish:w,targetCommitish:N,cursor:E,fileIndex:C,mergedChunks:L,isExpandLoading:B,expandHiddenLines:O,expandAllBetweenChunks:H,onAddComment:X,onGeneratePrompt:m,onRemoveComment:b,onUpdateComment:v,onOpenInEditor:x,onLineClick:j,commentTrigger:z,onCommentTriggerHandled:U};return y.jsxs("div",{ref:G,className:"bg-github-bg-primary",style:{"--line-number-width":M},children:[y.jsx(pj,{file:r,isCollapsed:$,isReviewed:s.has(r.path),onToggleCollapsed:f,onToggleAllCollapsed:h,onToggleReviewed:u}),!$&&y.jsx("div",{className:"overflow-y-auto",children:y.jsx(V,{...R})})]})});function ah(e){if(!e.isDirectory||!e.children)return[];const r=[];return e.path&&r.push(e.path),e.children.forEach(l=>{r.push(...ah(l))}),r}function wj(e){const r={name:"",path:"",isDirectory:!0,children:[]};e.forEach(i=>{const s=i.path.split("/");let u=r;for(let c=0;c<s.length;c++){const f=s[c];if(!f)continue;const h=c===s.length-1,p=s.slice(0,c+1).join("/");u.children||(u.children=[]);let m=u.children.find(b=>b.name===f);m||(m={name:f,path:p,isDirectory:!h,children:h?void 0:[],file:h?i:void 0},u.children.push(m)),u=m}});const l=i=>{if(!i.isDirectory||!i.children)return i;if(i.children=i.children.map(l),i.children.length===1&&i.children[0]?.isDirectory&&i.children[0]?.children){const s=i.children[0];if(s)return i.name?{...i,name:`${i.name}/${s.name}`,path:s.path,children:s.children}:i}return i};return l(r)}function Sj({files:e,onScrollToFile:r,comments:l,reviewedFiles:i,onToggleReviewed:s,selectedFileIndex:u}){const c=T.useMemo(()=>wj(e),[e]),f=T.useRef(null),h=T.useRef(new Map),p={"--dir-row-height":"calc(var(--spacing, 0.25rem) * 9)"},[m,b]=T.useState(()=>new Set(ah(c))),[v,x]=T.useState(""),S=T.useMemo(()=>{const H=new Map;return l.forEach(Y=>{H.set(Y.file,(H.get(Y.file)??0)+1)}),H},[l]),w=T.useMemo(()=>{const H=new Map;return e.forEach((Y,B)=>{H.set(Y.path,B)}),H},[e]),N=T.useMemo(()=>{const H=v.trim().toLowerCase(),Y=B=>{if(!H)return B;if(B.isDirectory&&B.children){const $=B.children.map(G=>Y(G)).filter(G=>G!==null);return $.length>0?{...B,children:$}:null}else if(B.file)return B.file.path.toLowerCase().includes(H)?B:null;return null};return Y(c)||{...c,children:[]}},[c,v]),E=H=>{switch(H){case"added":return y.jsx(Wx,{size:16,className:"text-github-accent"});case"deleted":return y.jsx(e1,{size:16,className:"text-github-danger"});case"renamed":return y.jsx(Jx,{size:16,className:"text-github-warning"});default:return y.jsx(iu,{size:16,className:"text-github-text-secondary"})}},C=H=>{b(Y=>{const B=new Set(Y);return B.has(H)?B.delete(H):B.add(H),B})},j=T.useMemo(()=>ah(c),[c]),z=m.size===j.length&&j.length>0,U=()=>{b(z?new Set:new Set(j))},L=(H,Y)=>{const B=f.current,$=H.currentTarget;if(!B){C(Y);return}const G=B.getBoundingClientRect(),J=$.getBoundingClientRect(),I=Number.parseFloat(getComputedStyle($).top||"0");if(J.top-G.top<=I+1){const M=h.current.get(Y)?.querySelector('[data-tree-row="true"]:not([data-dir-header="true"])'),V=$.getBoundingClientRect().height||0,R=M??$,D=Number.parseInt(R.dataset.depth||$.dataset.depth||"0",10),q=V*D,A=Math.max(0,R.offsetTop-q);if(Math.abs(B.scrollTop-A)<=1){C(Y);return}B.scrollTo({top:A,behavior:"smooth"});return}C(Y)},O=(H,Y=0)=>{if(H.isDirectory&&H.children){const B=m.has(H.path);return y.jsxs("div",{"data-dir-container":H.path||void 0,ref:$=>{H.path&&($?h.current.set(H.path,$):h.current.delete(H.path))},children:[H.name&&y.jsxs("div",{className:"sticky flex h-9 items-center gap-2 bg-github-bg-secondary px-4 hover:bg-github-bg-tertiary cursor-pointer","data-dir-header":"true","data-tree-row":"true","data-depth":Y,style:{paddingLeft:`${Y*16+16}px`,top:`calc(${Y} * var(--dir-row-height))`,zIndex:1e3-Y},onClick:$=>L($,H.path),children:[B?y.jsx(Ti,{size:16}):y.jsx(Qx,{size:16}),B?y.jsx(_2,{size:16,className:"text-github-text-secondary"}):y.jsx(D2,{size:16,className:"text-github-text-secondary"}),y.jsx("span",{className:"text-sm text-github-text-primary font-medium flex-1 overflow-hidden text-ellipsis whitespace-nowrap",title:H.name,children:H.name})]}),(B||!H.name)&&H.children.map($=>O($,H.name?Y+1:Y))]},H.path)}else if(H.file){const B=H.file,$=S.get(B.path)??0,G=i.has(B.path),J=w.get(B.path)??-1,I=u!==null&&u===J;return y.jsxs("div",{className:`flex items-center gap-2 px-4 py-2 hover:bg-github-bg-tertiary cursor-pointer transition-colors ${G?"opacity-70":""} ${I?"bg-github-bg-tertiary":""}`,"data-file-row":"true","data-tree-row":"true","data-depth":Y,style:{paddingLeft:`${Y*16+16}px`},onClick:()=>r(B.path),children:[y.jsx(r1,{checked:G,onChange:()=>{s(B.path)},title:G?"Mark as not reviewed":"Mark as reviewed",className:"z-10"}),E(H.file.status),y.jsx("span",{className:`text-sm text-github-text-primary flex-1 overflow-hidden text-ellipsis whitespace-nowrap ${G?"line-through text-github-text-muted":""}`,title:H.file.path,children:H.name}),$>0&&y.jsxs("span",{className:"text-github-warning text-sm font-medium ml-auto flex items-center gap-1",children:[y.jsx(t1,{size:14}),$]})]},B.path)}return null};return y.jsxs("div",{className:"h-full flex flex-col",children:[y.jsxs("div",{className:"px-4 py-3 border-b border-github-border bg-github-bg-tertiary",children:[y.jsxs("div",{className:"flex items-center justify-between mb-3",children:[y.jsxs("h3",{className:"text-sm font-semibold text-github-text-primary m-0",children:["Files changed (",e.length,")"]}),y.jsx("button",{onClick:U,className:"p-1 hover:bg-github-bg-primary rounded transition-colors",title:z?"Collapse all":"Expand all",children:z?y.jsx(h2,{size:16,className:"text-github-text-secondary"}):y.jsx(g2,{size:16,className:"text-github-text-secondary"})})]}),y.jsxs("div",{className:"relative",children:[y.jsx(J2,{size:16,className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-github-text-muted"}),y.jsx("input",{type:"text",placeholder:"Filter files...",value:v,onChange:H=>x(H.target.value),className:"w-full pl-9 pr-3 py-2 text-sm bg-github-bg-primary border border-github-border rounded-md focus:outline-none focus:border-github-accent text-github-text-primary placeholder-github-text-muted"})]})]}),y.jsx("div",{className:"flex-1 overflow-y-auto relative z-0",style:p,ref:f,children:N.children?.map(H=>O(H))})]})}function kj({style:e}){return y.jsx("svg",{width:"98",height:"96",viewBox:"0, 0, 98, 96",style:e,xmlns:"http://www.w3.org/2000/svg","aria-label":"GitHub",role:"img",children:y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z",fill:"currentColor"})})}function Ej({isOpen:e,onClose:r}){const{enableScope:l,disableScope:i}=Xa();return lt("escape",()=>r(),{enabled:e},[r,e]),T.useEffect(()=>(e?i("navigation"):l("navigation"),()=>{l("navigation")}),[e,l,i]),e?y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:r}),y.jsxs("div",{className:"relative bg-github-bg-primary border border-github-border rounded-lg shadow-lg max-w-4xl w-full mx-4 max-h-[80vh] overflow-y-auto",children:[y.jsxs("div",{className:"sticky top-0 bg-github-bg-primary border-b border-github-border px-6 py-4 flex items-center justify-between",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"Keyboard Shortcuts"}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary transition-colors","aria-label":"Close help modal",children:y.jsx(au,{size:20})})]}),y.jsxs("div",{className:"px-6 py-4 grid grid-cols-1 lg:grid-cols-2 gap-6",children:[y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Line Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"j"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"↓"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Next line"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"k"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"↑"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous line"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"File Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"]"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"["}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"["})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Jump to first file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"]"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Jump to last file"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Chunk Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"n"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next change chunk (added/deleted lines)"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"p"}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous change chunk (added/deleted lines)"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Comment Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"N"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next comment"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"P"}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous comment"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Side Navigation (Side-by-side mode)"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"h"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"←"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Focus left side"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"l"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"→"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Focus right side"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Comment Management"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"L"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"View all comments list"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"C"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Copy all comments prompt"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"D"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Delete all comments"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Actions"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"v"}),y.jsx("span",{className:"text-github-text-secondary",children:"Toggle viewed state of current file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"R"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Refresh diff when changes detected"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"c"}),y.jsx("span",{className:"text-github-text-secondary",children:"Add comment at current line"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"."}),y.jsx("span",{className:"text-github-text-secondary",children:"Move cursor to center of viewport"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"?"}),y.jsx("span",{className:"text-github-text-secondary",children:"Show/hide this help"})]})]})]}),y.jsx("div",{className:"pt-4 border-t border-github-border lg:col-span-2",children:y.jsx("p",{className:"text-xs text-github-text-secondary",children:"Shortcuts are disabled when typing in input fields."})})]})]})]}):null}function Cj({style:e}){return y.jsxs("svg",{style:e,viewBox:"0 0 720 190",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"difit",role:"img",children:[y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M440.487 5.90627C432.164 9.01695 427.318 16.2817 427.318 25.649C427.318 35.9474 433.206 43.6458 442.714 45.7819C451.336 47.7188 459.606 44.3893 464.84 36.8737C466.923 33.8843 467.35 32.4073 467.606 27.3105C467.773 23.9957 467.492 20.0154 466.983 18.4654C465.699 14.5629 460.869 9.13088 456.854 7.07513C452.57 4.88086 444.73 4.32102 440.487 5.90627ZM596.658 6.653C588.927 9.55794 584.572 15.4908 583.887 24.0465C583.17 33.0212 586.83 39.8868 594.382 43.7278C603.739 48.4877 615.574 44.5081 620.482 34.9515C625.35 25.4728 622.15 13.4916 613.37 8.32678C608.986 5.74808 601.154 4.96365 596.658 6.653ZM368.585 7.68006C367.464 8.80629 367.302 12.903 367.302 40.2286V71.4878L363.832 68.1329C353.432 58.0787 335.595 52.668 319.246 54.6082C310.542 55.641 299.81 59.1369 293.3 63.0607C278.56 71.9427 266.453 89.5576 263.139 106.945C261.765 114.155 261.602 129.431 262.825 136.365C265.723 152.796 274.795 168.36 286.716 177.355C298.275 186.077 310.237 190 325.274 190C340.687 190 353.943 185.273 362.869 176.594L367.302 172.284V178.215C367.302 186.902 366.946 186.724 384.303 186.709C392.243 186.702 399.29 186.347 399.964 185.919C401.04 185.236 401.189 174.47 401.189 97.1224C401.189 23.7236 401.003 8.87842 400.068 7.74809C398.433 5.77021 370.547 5.71037 368.585 7.68006ZM526.937 7.94153C519.783 10.0325 515.359 12.5834 510.029 17.6867C501.959 25.4129 498.766 34.4597 498.766 49.5975V58.8517H490.659C484.378 58.8517 482.263 59.1418 481.268 60.1394C480.214 61.1976 479.986 63.6558 479.986 73.91C479.986 82.5264 480.289 86.6977 480.966 87.3764C481.601 88.0141 484.903 88.36 490.356 88.36H498.766V136.692C498.766 183.638 498.811 185.048 500.345 185.873C502.433 186.994 529.394 186.994 531.482 185.873C533.016 185.048 533.061 183.638 533.061 136.692V88.36H549.334C563.038 88.36 565.809 88.1568 566.89 87.0723C568.782 85.1723 568.782 62.0394 566.89 60.1394C565.808 59.0541 563.029 58.8517 549.231 58.8517H532.856L533.216 51.9721C533.604 44.5499 534.721 41.9147 538.546 39.3958C540.377 38.1901 543.049 37.904 554.661 37.6737C562.626 37.5155 569.018 37.0343 569.602 36.5483C570.892 35.4761 571.046 10.3579 569.777 7.9776C568.978 6.47923 567.918 6.39562 550.384 6.45054C535.269 6.49808 530.93 6.77431 526.937 7.94153ZM654.931 26.4834C653.136 27.7662 653.094 28.1572 653.094 43.3245V58.8517H644.567C633.342 58.8517 633.497 58.6443 633.497 73.6059C633.497 88.5674 633.342 88.36 644.567 88.36H653.094V122.636C653.094 159.998 653.439 163.935 657.362 171.354C661.848 179.838 669.111 184.99 680.857 188.022C687.996 189.866 707.647 189.269 714.309 187.007C719.756 185.158 719.86 184.87 719.969 171.298C720.082 157.364 720.441 157.791 709.174 158.48C695.386 159.324 689.341 156.938 687.388 149.883C686.927 148.214 686.58 134.435 686.577 117.663L686.572 88.36H702.068H717.564L718.87 86.3592C719.946 84.7108 720.129 82.3461 719.91 72.9575C719.719 64.8279 719.321 61.1689 718.522 60.2041C717.553 59.0345 715.315 58.8517 701.987 58.8517H686.572L686.546 43.8926C686.526 31.8556 686.28 28.613 685.288 27.2941C684.156 25.7884 682.945 25.6351 670.412 25.4129C658.94 25.2088 656.476 25.3793 654.931 26.4834ZM431.459 60.1394C430.316 61.2877 430.178 68.0001 430.188 121.82C430.197 168.838 430.429 182.667 431.232 184.262L432.264 186.311L446.657 186.535C458.941 186.725 461.242 186.567 462.353 185.452C463.521 184.279 463.655 177.845 463.655 122.786C463.655 68.0985 463.515 61.2877 462.372 60.1394C460.469 58.2287 433.362 58.2287 431.459 60.1394ZM587.799 60.4369C587.238 61.4894 586.954 82.56 586.954 123.084C586.954 177.502 587.093 184.285 588.236 185.434C590.138 187.342 616.431 187.342 618.333 185.434C619.476 184.285 619.615 177.447 619.615 122.482C619.615 75.6149 619.38 60.5828 618.636 59.8353C617.947 59.1443 613.344 58.8517 603.15 58.8517C589.644 58.8517 588.586 58.9607 587.799 60.4369ZM347.956 87.3469C362.023 93.9543 369.138 107.306 367.775 124.535C366.623 139.097 359.678 149.866 347.83 155.463C337.073 160.544 325.541 160.523 315.049 155.403C293.381 144.83 288.765 112.315 306.417 94.5961C313.92 87.0641 322.021 84.1412 334.301 84.5354C341.49 84.7666 343.224 85.124 347.956 87.3469Z",fill:"currentColor"}),y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.42299 0.744751C4.61699 2.15275 2.03999 5.66375 0.956994 12.2768C-0.369006 20.3728 -0.294006 170.791 1.03899 176.572C2.29699 182.031 4.81699 185.308 9.65399 187.774C13.265 189.615 16.865 189.684 108.63 189.684C163.129 189.684 204.095 189.304 204.41 188.795C206 188.5 206 188.795 207.5 188C211.167 187.079 216.779 180.138 218.005 175.584C218.682 173.068 218.939 143.952 218.756 90.4718C218.487 11.7478 218.417 9.10275 216.535 6.62675C215.466 5.22075 213.441 3.19575 212.035 2.12675C209.546 0.23575 206.839 0.17975 110.978 0.0167504C55.373 -0.0782496 11.148 0.239751 9.42299 0.744751ZM203.778 14.8838C205.558 16.6638 205.509 172.577 203.728 175.005C202.577 176.574 198.865 176.688 156.978 176.446L111.478 176.184L111.226 138.684L110.974 101.184H84.059C69.255 101.184 56.808 101.52 56.397 101.931C55.986 102.343 60.674 107.82 66.814 114.104C72.954 120.388 77.978 126.202 77.978 127.026C77.978 129.577 74.769 134.267 71.896 135.916C69.609 137.229 68.75 137.278 66.704 136.217C63.533 134.572 28.705 99.1448 27.757 96.5998C27.36 95.5348 27.491 93.4308 28.049 91.9238C28.955 89.4768 68.498 49.6838 70.024 49.6838C70.366 49.6838 72.356 51.1627 74.447 52.9697C77.589 55.6867 78.118 56.6658 77.498 58.6198C77.086 59.9198 72.075 65.8308 66.363 71.7568C60.651 77.6818 55.978 83.0148 55.978 83.6068C55.978 84.3488 64.068 84.6838 81.952 84.6838H107.927H110.666C111.144 82.5 110.978 73.4537 110.978 46.2337V13.6838H156.778C191.067 13.6838 202.88 13.9858 203.778 14.8838ZM148.803 52.7217C146.51 54.0597 144.845 59.5997 145.74 62.9107C146.146 64.4107 150.657 69.9308 155.764 75.1788C161.411 80.9788 164.547 84.8988 163.764 85.1788C163.057 85.4318 151.549 85.7608 138.19 85.9108C117.896 86.1388 113.747 86.4308 112.956 87.6838C112.435 88.5088 112.002 91.7228 111.993 94.8268C111.982 99.0598 112.373 100.622 113.56 101.077C114.43 101.411 126.13 101.684 139.56 101.684C156.121 101.684 163.978 102.026 163.978 102.746C163.978 103.33 160.187 107.607 155.554 112.251C146.244 121.582 144.276 125.371 146.069 130.514C147.321 134.107 149.576 135.684 153.463 135.684C155.522 135.684 159.843 131.902 173.778 117.904C191.699 99.9008 194.978 96.0678 194.978 93.1208C194.978 91.1338 157.422 53.8238 154.163 52.5728C151.322 51.4818 150.908 51.4937 148.803 52.7217Z",fill:"currentColor"})]})}function Nj({shouldReload:e,isReloading:r,onReload:l,changeType:i,className:s="",compact:u=!1}){if(!e)return null;const c=()=>{switch(i){case"commit":return"New commits available";case"staging":return"Staging changes detected";case"file":return"File changes detected";default:return"Changes detected"}};return y.jsxs("button",{onClick:l,disabled:r,className:`
|
|
70
|
+
flex items-center gap-1.5 text-xs rounded-md border ${s} ${u?"px-2 py-2":"px-3 py-1.5"}
|
|
71
|
+
${r?"bg-github-text-primary text-github-bg-primary border-github-text-primary cursor-not-allowed":"bg-github-text-primary text-github-bg-primary border-github-text-primary"}
|
|
72
|
+
`,title:`${c()} - Click to refresh`,"aria-label":u?"Refresh":void 0,children:[y.jsx(Q2,{size:12,className:`${r?"animate-spin":""}`}),u?y.jsx("span",{className:"sr-only",children:"Refresh"}):"Refresh"]})}function Tx({label:e,value:r,resolvedValue:l,onChange:i,options:s,disabledValues:u=[]}){const[c,f]=T.useState(!1),{refs:h,floatingStyles:p,context:m}=Id({open:c,onOpenChange:f,middleware:[Ld(4),Od(),Dd({padding:8})],whileElementsMounted:_d}),b=Md(m,{handleClose:qd()}),v=Bd(m),x=R3(m),S=Fd(m),w=Hd(m),{getReferenceProps:N,getFloatingProps:E}=Ud([b,v,x,S,w]),C=r==="working"&&u.includes("staged")||r==="staged"&&u.includes("working"),j=()=>{const Y=s.specialOptions.find(G=>G.value===r);if(Y)return Y.label;const B=s.branches.find(G=>G.name===r);if(B)return`${B.name}${B.current?" (current)":""}`;const $=s.commits.find(G=>G.shortHash===r||G.hash===r);return $?`${$.shortHash} - ${$.message}`:r||"Select..."},z=Y=>{i(Y),f(!1)},U=Y=>u.includes(Y),L=(Y,B)=>["w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors",Y?"hover:bg-diff-selected-bg focus:bg-diff-selected-bg":"hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary",Y?"bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2":"",B?"opacity-50 cursor-not-allowed":"cursor-pointer"].join(" "),O=(Y,B)=>Y===r||B===r?!0:l?Y===l||B===l:!1,H=()=>{let Y=0;const B=s.specialOptions.findIndex($=>$.value===r);if(B!==-1)return B;if(Y+=s.specialOptions.length,!C){const $=s.commits.findIndex(J=>J.shortHash===r);if($!==-1)return Y+$;Y+=s.commits.length;const G=s.branches.findIndex(J=>J.name===r);if(G!==-1)return Y+G}return 0};return y.jsxs(y.Fragment,{children:[y.jsxs("button",{ref:h.setReference,type:"button",className:"flex items-center gap-1.5 cursor-pointer group","aria-haspopup":"listbox","aria-expanded":c,...N(),children:[y.jsxs("span",{className:"text-xs text-github-text-secondary",children:[e,":"]}),y.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors",children:[y.jsx("code",{className:"text-xs text-github-text-primary max-w-[150px] truncate",children:j()}),y.jsx(Ti,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]})]}),c&&y.jsx(zd,{children:y.jsx(C3,{context:m,modal:!1,initialFocus:H(),children:y.jsxs("div",{ref:h.setFloating,style:p,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[400px] overflow-y-auto",...E(),children:[s.specialOptions.length>0&&y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Special"}),s.specialOptions.map(Y=>y.jsx("button",{onClick:()=>z(Y.value),disabled:U(Y.value),className:L(Y.value===r,U(Y.value)),children:Y.label},Y.value))]}),!C&&s.commits.length>0&&y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Recent Commits"}),s.commits.map(Y=>y.jsx("button",{onClick:()=>z(Y.shortHash),disabled:U(Y.shortHash),className:L(O(Y.shortHash,Y.hash),U(Y.shortHash)),children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx("code",{className:"text-xs text-github-text-primary font-mono whitespace-nowrap",children:Y.shortHash}),y.jsx("span",{className:"text-xs text-github-text-secondary flex-1 break-words",children:Y.message})]})},Y.hash))]}),!C&&s.branches.length>0&&y.jsxs("div",{children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Branches"}),s.branches.map(Y=>y.jsx("button",{onClick:()=>z(Y.name),disabled:U(Y.name),className:L(Y.name===r,U(Y.name)),children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-github-text-primary",children:Y.name}),Y.current&&y.jsx("span",{className:"text-xs text-github-text-muted",children:"(current)"})]})},Y.name))]})]})})})]})}function Aj({isOpen:e,onClose:r,options:l,baseRevision:i,targetRevision:s,resolvedBaseRevision:u,resolvedTargetRevision:c,onApply:f}){const[h,p]=T.useState(i),[m,b]=T.useState(s),{enableScope:v,disableScope:x}=Xa();T.useEffect(()=>(e?x("navigation"):v("navigation"),()=>{v("navigation")}),[e,v,x]);const S=T.useMemo(()=>{const E=c||m,C=l.commits.findIndex(z=>z.shortHash===E||z.hash===E);if(C===-1)return m?[m]:[];const j=l.commits.slice(0,C+1).map(z=>z.shortHash);return m&&!j.includes(m)&&j.push(m),j.includes("working")||j.push("working"),j},[m,c,l.commits]),w=T.useMemo(()=>{const E=u||h,C=l.commits.findIndex(z=>z.shortHash===E||z.hash===E);if(C===-1)return h?[h]:[];const j=l.commits.slice(C).map(z=>z.shortHash);return h&&!j.includes(h)&&j.push(h),j},[h,u,l.commits]);if(!e)return null;const N=()=>{f(h,m),r()};return y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/40",onClick:r}),y.jsxs("div",{className:"relative bg-github-bg-secondary border border-github-border rounded-lg shadow-lg w-full max-w-lg mx-4",children:[y.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-github-border",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"Detailed Diff"}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary p-1","aria-label":"Close detailed diff",children:y.jsx(au,{size:18})})]}),y.jsxs("div",{className:"p-4 space-y-4",children:[y.jsxs("div",{className:"flex items-center justify-center gap-3",children:[y.jsx(Tx,{label:"Base",value:h,resolvedValue:u,onChange:p,options:l,disabledValues:S}),y.jsx("span",{className:"text-github-text-muted",children:"..."}),y.jsx(Tx,{label:"Target",value:m,resolvedValue:c,onChange:b,options:l,disabledValues:w})]}),y.jsxs("div",{className:"flex justify-end gap-2",children:[y.jsx("button",{onClick:r,className:"px-3 py-1.5 text-xs font-medium rounded border border-github-border text-github-text-secondary hover:text-github-text-primary transition-colors",type:"button",children:"Cancel"}),y.jsx("button",{onClick:N,className:"px-3 py-1.5 text-xs font-medium rounded bg-github-accent text-white hover:bg-github-accent/90 transition-colors",type:"button",children:"Apply"})]})]})]})]})}const Tj=[{id:"vscode",label:"VS Code",protocol:"vscode",cliCommand:"code",cliArgs:[],aliases:["vscode","code"]},{id:"cursor",label:"Cursor",protocol:"cursor",cliCommand:"cursor",cliArgs:[],aliases:["cursor"]},{id:"none",label:"Hide “Open in editor” button",protocol:null,cliCommand:null,cliArgs:[],aliases:["none","disabled","off"]}],uv="vscode",jx=[{id:"github",label:"GitHub Light"},{id:"vsLight",label:"VS Light"},{id:"oneLight",label:"One Light"},{id:"gruvboxMaterialLight",label:"Gruvbox Material Light"},{id:"nightOwlLight",label:"Night Owl Light"}],Rx=[{id:"vsDark",label:"VS Dark"},{id:"oneDark",label:"One Dark"},{id:"gruvboxMaterialDark",label:"Gruvbox Material Dark"},{id:"nightOwl",label:"Night Owl"},{id:"dracula",label:"Dracula"},{id:"okaidia",label:"Okaidia"}],jj={fontSize:14,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',theme:"dark",syntaxTheme:"vsDark",editor:uv},Rj=[{name:"System Font",value:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif'},{name:"Menlo",value:'Menlo, Monaco, "Courier New", monospace'},{name:"SF Mono",value:'SF Mono, Consolas, "Liberation Mono", monospace'},{name:"Fira Code",value:'"Fira Code", "Courier New", monospace'},{name:"JetBrains Mono",value:'"JetBrains Mono", "Courier New", monospace'}];function _j({isOpen:e,onClose:r,settings:l,onSettingsChange:i}){const[s,u]=T.useState(l),{enableScope:c,disableScope:f}=Xa();T.useEffect(()=>{u(l)},[l]),T.useEffect(()=>{i(s)},[s,i]),T.useEffect(()=>(e?f("navigation"):c("navigation"),()=>{c("navigation")}),[e,c,f]);const h=()=>s.theme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":s.theme,p=()=>h()==="light"?jx:Rx,m=v=>{const x={...s,theme:v},w=(v==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":v)==="light"?jx:Rx;if(!w.some(E=>E.id===s.syntaxTheme)&&w.length>0){const E=w[0];E&&(x.syntaxTheme=E.id)}u(x)},b=()=>{u(jj)};return e?y.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50 pointer-events-none",children:y.jsxs("div",{className:"bg-github-bg-secondary border border-github-border rounded-lg w-full max-w-md mx-4 pointer-events-auto",children:[y.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-github-border",children:[y.jsxs("h2",{className:"text-lg font-semibold text-github-text-primary flex items-center gap-2",children:[y.jsx(n1,{size:20}),"Appearance Settings"]}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary p-1",children:y.jsx(au,{size:18})})]}),y.jsxs("div",{className:"p-4 space-y-6",children:[y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Font Size"}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("input",{type:"range",min:"10",max:"20",step:"1",value:s.fontSize,onChange:v=>u({...s,fontSize:parseInt(v.target.value)}),className:"flex-1 accent-github-accent"}),y.jsxs("span",{className:"text-sm text-github-text-secondary w-8 text-right",children:[s.fontSize,"px"]})]})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Font Family"}),y.jsx("select",{value:s.fontFamily,onChange:v=>u({...s,fontFamily:v.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:Rj.map(v=>y.jsx("option",{value:v.value,children:v.name},v.value))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Theme"}),y.jsx("div",{className:"flex gap-2",children:["light","dark","auto"].map(v=>y.jsx("button",{onClick:()=>m(v),className:`px-3 py-2 text-sm rounded border transition-colors ${s.theme===v?"bg-github-accent text-white border-github-accent":"bg-github-bg-tertiary text-github-text-secondary border-github-border hover:text-github-text-primary"}`,children:v.charAt(0).toUpperCase()+v.slice(1)},v))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Syntax Highlighting Theme"}),y.jsx("select",{value:s.syntaxTheme,onChange:v=>u({...s,syntaxTheme:v.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:p().map(v=>y.jsx("option",{value:v.id,children:v.label},v.id))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Open In Editor"}),y.jsx("select",{value:s.editor,onChange:v=>u({...s,editor:v.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:Tj.map(v=>y.jsx("option",{value:v.id,children:v.label},v.id))})]})]}),y.jsxs("div",{className:"flex items-center justify-between p-4 border-t border-github-border",children:[y.jsx("button",{onClick:b,className:"px-3 py-2 text-sm text-github-text-secondary hover:text-github-text-primary",children:"Reset to Default"}),y.jsx("button",{onClick:r,className:"px-4 py-2 text-sm bg-github-accent text-white rounded hover:bg-green-600",children:"Close"})]})]})}):null}const _x={position:"absolute",fontSize:"16px",pointerEvents:"none",zIndex:100,transform:"translateY(20px) scale(0.5)",opacity:0},Lj=({isActive:e})=>e?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"animate-sparkle-rise",style:{..._x,left:"-12px",animationDelay:"0s"},children:"✨"}),y.jsx("div",{className:"animate-sparkle-rise",style:{..._x,right:"-12px",animationDelay:"0.3s"},children:"✨"})]}):null,Lx={fontSize:14,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',theme:"dark",syntaxTheme:"vsDark",editor:uv},Dx="reviewit-appearance-settings";function Dj(){const[e,r]=T.useState(()=>{try{const s=localStorage.getItem(Dx);if(s)return{...Lx,...JSON.parse(s)}}catch(s){console.warn("Failed to load appearance settings from localStorage:",s)}return Lx}),l=T.useCallback(s=>{const u=document.documentElement;u.setAttribute("data-theme",s),s==="light"?(u.style.setProperty("--color-github-bg-primary","#ffffff"),u.style.setProperty("--color-github-bg-secondary","#f6f8fa"),u.style.setProperty("--color-github-bg-tertiary","#f1f3f4"),u.style.setProperty("--color-github-border","#d1d9e0"),u.style.setProperty("--color-github-text-primary","#24292f"),u.style.setProperty("--color-github-text-secondary","#656d76"),u.style.setProperty("--color-github-text-muted","#8c959f"),u.style.setProperty("--color-github-accent","#1f883d"),u.style.setProperty("--color-github-danger","#cf222e"),u.style.setProperty("--color-github-warning","#bf8700"),u.style.setProperty("--color-diff-addition-bg","#d1f4cd"),u.style.setProperty("--color-diff-addition-border","#1f883d"),u.style.setProperty("--color-diff-deletion-bg","#ffd8d3"),u.style.setProperty("--color-diff-deletion-border","#cf222e"),u.style.setProperty("--color-diff-neutral-bg","#f1f3f4"),u.style.setProperty("--color-comment-bg","#fff8e1"),u.style.setProperty("--color-comment-border","#ffd54f"),u.style.setProperty("--color-comment-text","#5d4037"),u.style.setProperty("--color-yellow-btn-bg","#fef3c7"),u.style.setProperty("--color-yellow-btn-border","#f59e0b"),u.style.setProperty("--color-yellow-btn-text","#92400e"),u.style.setProperty("--color-yellow-btn-hover-bg","#fde68a"),u.style.setProperty("--color-yellow-btn-hover-border","#d97706"),u.style.setProperty("--color-yellow-path-bg","#fde68a"),u.style.setProperty("--color-yellow-path-text","#92400e"),u.style.setProperty("--color-editor-btn-bg","rgba(248, 250, 252, 0.1)"),u.style.setProperty("--color-editor-btn-border","rgba(31, 41, 55, 0.35)"),u.style.setProperty("--color-editor-btn-text","#1f2937"),u.style.setProperty("--color-editor-btn-hover-bg","rgba(248, 250, 252, 0.2)"),u.style.setProperty("--color-editor-btn-hover-border","rgba(31, 41, 55, 0.5)")):(u.style.setProperty("--color-github-bg-primary","#0d1117"),u.style.setProperty("--color-github-bg-secondary","#161b22"),u.style.setProperty("--color-github-bg-tertiary","#21262d"),u.style.setProperty("--color-github-border","#30363d"),u.style.setProperty("--color-github-text-primary","#f0f6fc"),u.style.setProperty("--color-github-text-secondary","#8b949e"),u.style.setProperty("--color-github-text-muted","#6e7681"),u.style.setProperty("--color-github-accent","#238636"),u.style.setProperty("--color-github-danger","#da3633"),u.style.setProperty("--color-github-warning","#d29922"),u.style.setProperty("--color-diff-addition-bg","#0d4429"),u.style.setProperty("--color-diff-addition-border","#1b7c3d"),u.style.setProperty("--color-diff-deletion-bg","#67060c"),u.style.setProperty("--color-diff-deletion-border","#da3633"),u.style.setProperty("--color-diff-neutral-bg","#21262d"),u.style.setProperty("--color-comment-bg","#1c2128"),u.style.setProperty("--color-comment-border","#373e47"),u.style.setProperty("--color-comment-text","#e6edf3"),u.style.setProperty("--color-yellow-btn-bg","rgba(180, 83, 9, 0.2)"),u.style.setProperty("--color-yellow-btn-border","rgba(217, 119, 6, 0.5)"),u.style.setProperty("--color-yellow-btn-text","#fbbf24"),u.style.setProperty("--color-yellow-btn-hover-bg","rgba(180, 83, 9, 0.3)"),u.style.setProperty("--color-yellow-btn-hover-border","#d97706"),u.style.setProperty("--color-yellow-path-bg","rgba(180, 83, 9, 0.3)"),u.style.setProperty("--color-yellow-path-text","#fbbf24"),u.style.setProperty("--color-editor-btn-bg","rgba(248, 250, 252, 0.1)"),u.style.setProperty("--color-editor-btn-border","rgba(248, 250, 252, 0.3)"),u.style.setProperty("--color-editor-btn-text","#f0f6fc"),u.style.setProperty("--color-editor-btn-hover-bg","rgba(248, 250, 252, 0.2)"),u.style.setProperty("--color-editor-btn-hover-border","rgba(248, 250, 252, 0.45)")),document.body.style.backgroundColor="var(--color-github-bg-primary)",document.body.style.color="var(--color-github-text-primary)"},[]);return T.useEffect(()=>{const s=document.documentElement;if(s.style.setProperty("--app-font-size",`${e.fontSize}px`),s.style.setProperty("--app-font-family",e.fontFamily),e.theme==="auto"){const u=window.matchMedia("(prefers-color-scheme: dark)");l(u.matches?"dark":"light");const c=f=>{l(f.matches?"dark":"light")};return u.addEventListener("change",c),()=>u.removeEventListener("change",c)}else{l(e.theme);return}},[e,l]),{settings:e,updateSettings:s=>{r(s);try{localStorage.setItem(Dx,JSON.stringify(s))}catch(u){console.warn("Failed to save appearance settings to localStorage:",u)}}}}function cv(e,r,l,i){const s=typeof r=="number"?`L${r}`:Array.isArray(r)?`L${r[0]}-L${r[1]}`:"",u=e||"<unknown file>";if(l1(l)){const c=i1(l);if(c.length>0){let f=`${u}:${s}`,h=0;for(const m of c){const b=l.slice(h,m.startIndex).trim();b&&(f+=`
|
|
73
|
+
${b}`),i&&(f+=`
|
|
74
|
+
ORIGINAL:
|
|
75
|
+
\`\`\`
|
|
76
|
+
${i}
|
|
77
|
+
\`\`\``),f+=`
|
|
78
|
+
SUGGESTED:
|
|
79
|
+
\`\`\`
|
|
80
|
+
${m.suggestedCode}
|
|
81
|
+
\`\`\``,h=m.endIndex}const p=l.slice(h).trim();return p&&(f+=`
|
|
82
|
+
${p}`),f}}return`${u}:${s}
|
|
83
|
+
${l}`}function Oj(e){return e.length===0?"":e.map(l=>cv(l.file,l.line,l.body,l.codeContent)).join(`
|
|
84
|
+
=====
|
|
85
|
+
`)}const _s="difit-storage-v1";class Mj{generateStorageKey(r,l){const i=s=>s.replace(/[^a-zA-Z0-9-_]/g,u=>`_${u.charCodeAt(0).toString(16)}_`);return`${i(r)}-${i(l)}`}normalizeCommitish(r,l,i){if(r==="."||r==="working")return"WORKING";if(r==="staged")return"STAGED";if((r==="HEAD"||r==="@")&&l)return l;if(i?.has(r)){const s=i.get(r);if(s)return s}return(r.startsWith("@")||r.includes("^")||r.includes("~")||r.includes("HEAD"))&&console.warn(`[StorageService] Cannot normalize symbolic ref '${r}' - may cause key collision. currentCommitHash=${l}`),r}getStorageKey(r,l,i,s,u){let c,f;l==="."||l==="working"?(c=i||r,f="WORKING"):l==="staged"?(c=i||r,f="STAGED"):(c=this.normalizeCommitish(r,i,s),f=this.normalizeCommitish(l,i,s));const h=this.generateStorageKey(c,f);return u?`${_s}/${u}/${h}`:`${_s}/${h}`}getDiffContextData(r,l,i,s,u){try{const c=this.getStorageKey(r,l,i,s,u),f=localStorage.getItem(c);if(!f)return null;const h=JSON.parse(f);return h.version!==1?(console.warn(`Unknown storage version: ${h.version}`),null):h}catch(c){return console.error("Error reading diff context data:",c),null}}saveDiffContextData(r,l,i,s,u,c){try{const f=this.getStorageKey(r,l,s,u,c),h={...i,baseCommitish:r,targetCommitish:l,lastModifiedAt:new Date().toISOString()};localStorage.setItem(f,JSON.stringify(h))}catch(f){f instanceof DOMException&&f.name==="QuotaExceededError"?console.error("localStorage quota exceeded"):console.error("Error saving diff context data:",f)}}getComments(r,l,i,s,u){return this.getDiffContextData(r,l,i,s,u)?.comments||[]}saveComments(r,l,i,s,u,c){const h=this.getDiffContextData(r,l,s,u,c)||{version:1,baseCommitish:r,targetCommitish:l,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),comments:[],viewedFiles:[]};h.comments=i,this.saveDiffContextData(r,l,h,s,u,c)}getViewedFiles(r,l,i,s,u){return this.getDiffContextData(r,l,i,s,u)?.viewedFiles||[]}saveViewedFiles(r,l,i,s,u,c){const h=this.getDiffContextData(r,l,s,u,c)||{version:1,baseCommitish:r,targetCommitish:l,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),comments:[],viewedFiles:[]};h.viewedFiles=i,this.saveDiffContextData(r,l,h,s,u,c)}cleanupOldData(r){const l=new Date;l.setDate(l.getDate()-r);const i=l.getTime(),s=[];for(let u=0;u<localStorage.length;u++){const c=localStorage.key(u);if(c?.startsWith(_s))try{const f=localStorage.getItem(c);if(!f)continue;const h=JSON.parse(f);new Date(h.lastModifiedAt).getTime()<i&&s.push(c)}catch{}}s.forEach(u=>localStorage.removeItem(u))}getStorageSize(){let r=0;for(let l=0;l<localStorage.length;l++){const i=localStorage.key(l);if(!i?.startsWith(_s))continue;const s=localStorage.getItem(i);s&&(r+=(i.length+s.length)*2)}return r}}const qa=new Mj;async function Ox(e){try{const l=new TextEncoder().encode(e),i=await crypto.subtle.digest("SHA-256",l);return Array.from(new Uint8Array(i)).map(u=>u.toString(16).padStart(2,"0")).join("")}catch{return console.warn("Crypto API not available, using fallback hash"),zj(e)}}function zj(e){let r=0;for(let l=0;l<e.length;l++){const i=e.charCodeAt(l);r=(r<<5)-r+i,r=r&r}return Math.abs(r).toString(16)}function Mx(e){const r=e.chunks.map(l=>{const i=l.lines.filter(s=>s.type!=="hunk"&&s.type!=="header").map(s=>`${s.type}:${s.content}`).join(`
|
|
86
|
+
`);return`${l.header}
|
|
87
|
+
${i}`}).join(`
|
|
88
|
+
|
|
89
|
+
`);return`${e.path}
|
|
90
|
+
${e.status}
|
|
91
|
+
${r}`}function Bj(e,r,l,i,s){const[u,c]=T.useState([]);T.useEffect(()=>{if(!e||!r)return;const S=qa.getComments(e,r,l,i,s);c(S)},[e,r,l,i,s]);const f=T.useCallback(S=>{!e||!r||(qa.saveComments(e,r,S,l,i,s),c(S))},[e,r,l,i,s]),h=T.useCallback(S=>{const w={id:crypto.randomUUID(),filePath:S.filePath,body:S.body,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),position:{side:S.side,line:S.line},codeSnapshot:S.codeSnapshot||{content:"",language:NE(S.filePath)}},N=[...u,w];return f(N),w},[u,f]),p=T.useCallback(S=>{const w=u.filter(N=>N.id!==S);f(w)},[u,f]),m=T.useCallback((S,w)=>{const N=u.map(E=>E.id===S?{...E,body:w,updatedAt:new Date().toISOString()}:E);f(N)},[u,f]),b=T.useCallback(()=>{f([])},[f]),v=T.useCallback(S=>{const w=u.find(E=>E.id===S);if(!w)return"";const N=typeof w.position.line=="number"?w.position.line:[w.position.line.start,w.position.line.end];return cv(w.filePath,N,w.body,w.codeSnapshot?.content)},[u]),x=T.useCallback(()=>{const S=u.map(w=>({id:w.id,file:w.filePath,line:typeof w.position.line=="number"?w.position.line:[w.position.line.start,w.position.line.end],body:w.body,timestamp:w.createdAt,codeContent:w.codeSnapshot?.content}));return Oj(S)},[u]);return{comments:u,addComment:h,removeComment:p,updateComment:m,clearAllComments:b,generatePrompt:v,generateAllCommentsPrompt:x}}const Fj=20;async function zx(e,r){const l=encodeURIComponent(e),i=await fetch(`/api/blob/${l}?ref=${encodeURIComponent(r)}`);if(!i.ok)throw new Error(`Failed to fetch file content: ${i.statusText}`);const u=(await i.text()).split(`
|
|
92
|
+
`);return u.length>0&&u[u.length-1]===""&&u.pop(),{lines:u,totalLines:u.length}}async function Ij(e,r,l,i){const s=encodeURIComponent(e),u=new URLSearchParams;r&&u.set("oldRef",r),l&&u.set("newRef",l),i&&i!==e&&u.set("oldPath",i);const c=await fetch(`/api/line-count/${s}?${u}`);if(!c.ok)throw new Error(`Failed to fetch line count: ${c.statusText}`);return c.json()}function Uj({baseCommitish:e,targetCommitish:r}){const[l,i]=T.useState({}),[s,u]=T.useState(!1),[c,f]=T.useState(null),[h,p]=T.useState(0),m=T.useRef(new Map),b=T.useRef({});b.current=l;const v=T.useCallback(async L=>{const O=m.current.get(L.path);if(O)return O;const H=(async()=>{const Y=b.current[L.path];if(Y?.oldContent&&Y?.newContent)return Y;const B={...Y,expandedRanges:Y?.expandedRanges||[]};if(L.status!=="added"&&e){const $=L.oldPath||L.path;try{const{lines:G,totalLines:J}=await zx($,e);B.oldContent=G,B.oldTotalLines=J}catch(G){console.error("Failed to fetch old file content:",G),B.oldContent=[],B.oldTotalLines=0}}if(L.status!=="deleted"&&r)try{const{lines:$,totalLines:G}=await zx(L.path,r);B.newContent=$,B.newTotalLines=G}catch($){console.error("Failed to fetch new file content:",$),B.newContent=[],B.newTotalLines=0}return B})();m.current.set(L.path,H);try{return await H}finally{m.current.delete(L.path)}},[e,r]),x=T.useCallback(L=>{f(L),p(O=>O+1)},[]),S=T.useCallback(async(L,O,H,Y=Fj)=>{u(!0);try{const B=await v(L);i($=>{const G=$[L.path],J=G?.expandedRanges||B.expandedRanges||[],I=J.findIndex(F=>F.chunkIndex===O&&F.direction===H),Z=[...J];if(I>=0&&Z[I]){const F=Z[I];Z[I]={chunkIndex:F.chunkIndex,direction:F.direction,count:F.count+Y}}else Z.push({chunkIndex:O,direction:H,count:Y});return{...$,[L.path]:{oldContent:G?.oldContent??B.oldContent,newContent:G?.newContent??B.newContent,oldTotalLines:G?.oldTotalLines??B.oldTotalLines,newTotalLines:G?.newTotalLines??B.newTotalLines,expandedRanges:Z}}}),x(L.path)}finally{u(!1)}},[v,x]),w=T.useCallback(async(L,O,H)=>{u(!0);try{const Y=await v(L);i(B=>{const $=B[L.path],J=[...$?.expandedRanges||Y.expandedRanges||[]],I=J.findIndex(D=>D.chunkIndex===O&&D.direction==="up"),Z=J.findIndex(D=>D.chunkIndex===O-1&&D.direction==="down");let F=0,X=0;I>=0&&J[I]&&(F=J[I].count),Z>=0&&J[Z]&&(X=J[Z].count);const M=F+X+H,V=J.filter(D=>!(D.chunkIndex===O-1&&D.direction==="down")),R=V.findIndex(D=>D.chunkIndex===O&&D.direction==="up");return R>=0&&V[R]?V[R]={chunkIndex:O,direction:"up",count:M}:V.push({chunkIndex:O,direction:"up",count:M}),{...B,[L.path]:{oldContent:$?.oldContent??Y.oldContent,newContent:$?.newContent??Y.newContent,oldTotalLines:$?.oldTotalLines??Y.oldTotalLines,newTotalLines:$?.newTotalLines??Y.newTotalLines,expandedRanges:V}}}),x(L.path)}finally{u(!1)}},[v,x]),N=T.useCallback(async L=>{const O=b.current[L.path];if(O?.oldTotalLines!==void 0||O?.newTotalLines!==void 0)return;const H=L.status!=="added"?e:void 0,Y=L.status!=="deleted"?r:void 0;if(!(!H&&!Y))try{const{oldLineCount:B,newLineCount:$}=await Ij(L.path,H,Y,L.oldPath);i(G=>{const J=G[L.path];return J?.oldTotalLines!==void 0||J?.newTotalLines!==void 0?G:{...G,[L.path]:{...J,expandedRanges:J?.expandedRanges||[],oldTotalLines:B,newTotalLines:$}}}),x(L.path)}catch(B){console.error("Failed to prefetch line count:",B)}},[e,r,x]),E=T.useCallback((L,O,H)=>{const Y=l[L];return Y&&Y.expandedRanges.find($=>$.chunkIndex===O&&$.direction===H)?.count||0},[l]),C=T.useCallback((L,O,H)=>{if(L.status==="added"||L.status==="deleted")return 0;const Y=L.chunks[H-1];let B;if(!Y)B=O.oldStart-1;else{const J=Y.oldStart+Y.oldLines;B=O.oldStart-J}const $=E(L.path,H,"up"),G=H>0?E(L.path,H-1,"down"):0;return Math.max(0,B-$-G)},[E]),j=T.useCallback((L,O,H)=>{if(L.status==="added"||L.status==="deleted")return 0;const Y=l[L.path],B=Y?.oldTotalLines||Y?.newTotalLines;if(B===void 0)return L.chunks[H+1]?0:-1;if(L.chunks[H+1])return 0;const G=O.oldStart+O.oldLines-1,J=B-G,I=E(L.path,H,"down");return Math.max(0,J-I)},[l,E]),z=T.useCallback((L,O,H)=>{const Y=l[L.path];if(!Y)return O;const B=E(L.path,H,"up"),$=E(L.path,H,"down");if(B===0&&$===0)return O;const G=Y.oldContent||[],J=Y.newContent||[],I=[];if(B>0){const X=L.chunks[H-1];let M;X?M=X.oldStart+X.oldLines-1:M=Math.max(0,O.oldStart-1-B);const V=O.oldStart-1,R=O.newStart-1,D=Math.min(B,V-M),q=V-D,A=R-D;for(let ne=0;ne<D;ne++){const re=q+ne+1,fe=A+ne+1,ge=G[re-1]??J[fe-1]??"";I.push({type:"normal",content:ge,oldLineNumber:re,newLineNumber:fe,isExpanded:!0})}}if(I.push(...O.lines),$>0){const X=O.oldStart+O.oldLines-1,M=O.newStart+O.newLines-1,V=L.chunks[H+1],R=V?V.oldStart-1:Y.oldTotalLines||X,D=Math.min($,R-X);for(let q=0;q<D;q++){const A=X+q+1,ne=M+q+1,re=G[A-1]??J[ne-1]??"";I.push({type:"normal",content:re,oldLineNumber:A,newLineNumber:ne,isExpanded:!0})}}const Z=I[0],F=I[I.length-1];return{...O,lines:I,oldStart:Z?.oldLineNumber??O.oldStart,newStart:Z?.newLineNumber??O.newStart,oldLines:(F?.oldLineNumber??O.oldStart+O.oldLines-1)-(Z?.oldLineNumber??O.oldStart)+1,newLines:(F?.newLineNumber??O.newStart+O.newLines-1)-(Z?.newLineNumber??O.newStart)+1}},[l,E]),U=T.useCallback(L=>{const O=[];for(let H=0;H<L.chunks.length;H++){const Y=L.chunks[H];if(!Y)continue;const B=z(L,Y,H),$=C(L,Y,H),G=j(L,Y,H),J=O[O.length-1];if(J&&$===0){J.lines=[...J.lines,...B.lines],J.originalIndices.push(H),J.hiddenLinesAfter=G;const I=J.lines[J.lines.length-1];J.oldLines=(I?.oldLineNumber??J.oldStart+J.oldLines-1)-J.oldStart+1,J.newLines=(I?.newLineNumber??J.newStart+J.newLines-1)-J.newStart+1}else O.push({...B,originalIndices:[H],hiddenLinesBefore:$,hiddenLinesAfter:G})}return O},[z,C,j]);return{expandedState:l,isLoading:s,lastUpdatedFilePath:c,lastUpdatedAt:h,expandLines:S,expandAllBetweenChunks:w,prefetchFileContent:N,getMergedChunks:U,getHiddenLinesBefore:C,getHiddenLinesAfter:j}}var fv=(e=>(e.DEFAULT="default",e.WORKING="working",e.STAGED="staged",e.DOT="dot",e.SPECIFIC="specific",e))(fv||{});function Hj(e){const r=T.useRef(null),l=T.useRef(null),i=T.useRef(0),s=5,u=3e3,[c,f]=T.useState({isWatchEnabled:!1,diffMode:fv.DEFAULT,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null,connectionStatus:"disconnected"}),[h,p]=T.useState(null),m=T.useCallback(()=>{if(!r.current)try{const x=new EventSource("/api/watch");r.current=x,x.onopen=()=>{console.log("Connected to file watch service"),f(S=>({...S,connectionStatus:"connected"})),i.current=0,p(null)},x.onmessage=S=>{try{const w=JSON.parse(S.data);switch(w.type){case"connected":f(N=>({...N,isWatchEnabled:!0,diffMode:w.diffMode,connectionStatus:"connected"}));break;case"reload":console.log("File changes detected, showing reload button:",w.changeType),f(N=>({...N,shouldReload:!0,lastChangeTime:new Date,lastChangeType:w.changeType}));break;case"error":console.error("File watch error:",w.message),p(w.message||"File watch error occurred");break}}catch(w){console.error("Error parsing watch event:",w)}},x.onerror=()=>{console.log("File watch connection lost"),f(S=>({...S,connectionStatus:"disconnected"})),r.current&&(r.current.close(),r.current=null),i.current<s?(f(S=>({...S,connectionStatus:"reconnecting"})),i.current+=1,l.current=setTimeout(()=>{console.log(`Attempting to reconnect to file watch service (${i.current}/${s})...`),m()},u)):(console.error("Max reconnection attempts reached"),p("Lost connection to file watch service"))}}catch(x){console.error("Failed to connect to file watch service:",x),p("Failed to connect to file watch service")}},[s,u]),b=T.useCallback(async()=>{if(!c.isReloading){f(x=>({...x,isReloading:!0}));try{e&&await e(),f(x=>({...x,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null}))}catch(x){console.error("Reload failed:",x),p("Failed to reload diff data"),f(S=>({...S,isReloading:!1}))}}},[e,c.isReloading]),v=()=>{r.current&&(r.current.close(),r.current=null),l.current&&(clearTimeout(l.current),l.current=null)};return T.useEffect(()=>(m(),v),[m]),T.useEffect(()=>v,[]),{shouldReload:c.shouldReload,isConnected:c.connectionStatus==="connected",error:h,reload:b,watchState:c}}const oh={SCROLL_CONTAINER:"main.overflow-y-auto"};function nl(e,r){const l=`file-${e.fileIndex}-chunk-${e.chunkIndex}-line-${e.lineIndex}`;return r==="split"?`${l}-${e.side}`:l}function dv(e,r){return`${e}:${r}`}function qj(e,r){const l=r[e.fileIndex]?.chunks[e.chunkIndex]?.lines[e.lineIndex];return l&&(l.type==="add"||l.type==="delete"||l.type==="normal")?l.type:null}function Sn(e,r){const l=qj(e,r);return l?l==="normal"?!0:l==="delete"?e.side==="left":l==="add"?e.side==="right":!1:!1}function hv(e,r){return Sn(e,r)?e:{...e,side:e.side==="left"?"right":"left"}}const Bx={VIEWPORT_OFFSET_RATIO:1/3};function Pj(e,r,l,i){return{line:s=>{const u=e[s.fileIndex];return!u||i?.has(u.path)?!1:l==="unified"||Sn(s,e)},chunk:s=>{const u=e[s.fileIndex];if(!u||i?.has(u.path))return!1;const c=u.chunks[s.chunkIndex]?.lines[s.lineIndex];if(!c||c.type==="normal")return!1;if(s.lineIndex===0)return!0;const f=u.chunks[s.chunkIndex]?.lines[s.lineIndex-1];return!f||f.type==="normal"},comment:s=>{const u=e[s.fileIndex];if(!u||i?.has(u.path))return!1;const c=u.chunks[s.chunkIndex]?.lines[s.lineIndex];if(!c||c.type==="delete")return!1;const f=c.newLineNumber;if(!f)return!1;const h=dv(u.path,f);return r.has(h)},file:s=>s.chunkIndex===0&&s.lineIndex===0}}function $j(){return e=>{const r=document.getElementById(e);if(!r)return;const l=document.querySelector(oh.SCROLL_CONTAINER);if(!l)throw new Error(`Scrollable container (${oh.SCROLL_CONTAINER}) not found`);const i=r.getBoundingClientRect(),s=l.getBoundingClientRect(),u=l.clientHeight,c=l.scrollTop,f=Math.max(s.top,0),h=Math.min(s.bottom,window.innerHeight);if(!(i.top>=f&&i.bottom<=h)){const w=Vj(r,l)-u*Bx.VIEWPORT_OFFSET_RATIO;l.scrollTop=Math.max(0,w);return}const m=i.bottom>Math.min(s.bottom,window.innerHeight),v=r.offsetTop-l.offsetTop-u*Bx.VIEWPORT_OFFSET_RATIO,x=v>c;m&&x&&(l.scrollTop=Math.max(0,v))}}function Vj(e,r){let l=e,i=0;for(;l&&l!==r&&l.offsetParent;)i+=l.offsetTop,l=l.offsetParent;return l&&l!==r&&(i+=l.offsetTop),i}function Gj(e){return e||{fileIndex:0,chunkIndex:0,lineIndex:-1,side:"right"}}function Yj(e,r,l){return l&&e.fileIndex===r.fileIndex&&e.chunkIndex===r.chunkIndex&&e.lineIndex===r.lineIndex}function Xj(e,r,l){let{fileIndex:i,chunkIndex:s,lineIndex:u}=e;const c=l.length;let f=0;if(r==="next")for(u++;f<c;){if(l[i]?.chunks[s]?.lines[u])return{...e,fileIndex:i,chunkIndex:s,lineIndex:u};s++,u=0,l[i]?.chunks[s]||(i++,s=0,u=0,i>=c&&(i=0,f++))}else for(u--;f<c;){if(u<0)if(s--,s<0){i--,i<0&&(i=c-1,f++);const h=l[i];if(h&&h.chunks.length>0){s=h.chunks.length-1;const p=h.chunks[s];u=p&&p.lines.length>0?p.lines.length-1:-1}else s=-1,u=-1}else{const h=l[i]?.chunks[s];u=h&&h.lines.length>0?h.lines.length-1:-1}if(u>=0&&l[i]?.chunks[s]?.lines[u])return{...e,fileIndex:i,chunkIndex:s,lineIndex:u};u<0||u--}return null}function Zj(e,r,l,i,s){let u=e,c=!1;for(;u;){const f=Xj(u,r,i);if(!f||(u=f,Yj(u,e,c)))break;if(c=!0,l(u,i)){const h=hv(u,i);return{position:h,scrollTarget:nl(h,s)}}}return{position:null,scrollTarget:null}}function Qj({files:e,comments:r,viewMode:l=Za,reviewedFiles:i,onToggleReviewed:s,onCreateComment:u,onCopyAllComments:c,onDeleteAllComments:f,onShowCommentsList:h,onRefresh:p}){const[m,b]=T.useState(null),[v,x]=T.useState(!1),S=T.useMemo(()=>$j(),[]),w=T.useMemo(()=>{const $=new Map;return r.forEach(G=>{const J=Array.isArray(G.line)?G.line[0]:G.line,I=dv(G.file,J);$.has(I)||$.set(I,[]),$.get(I)?.push(G)}),$},[r]),N=T.useMemo(()=>Pj(e,w,l,i),[e,w,l,i]),E=T.useCallback(($,G)=>{if(e.length===0)return{position:null,scrollTarget:null};const J=Gj(m);return Zj(J,$,G,e,l)},[m,e,l]),C=T.useCallback($=>G=>{const J=E(G,$);J.position&&(b(J.position),J.scrollTarget&&S(J.scrollTarget))},[E,S]),j=T.useMemo(()=>C(N.line),[C,N.line]),z=T.useMemo(()=>C(N.chunk),[C,N.chunk]),U=T.useMemo(()=>C(N.file),[C,N.file]),L=T.useMemo(()=>C(N.comment),[C,N.comment]),O=T.useCallback($=>{if(!m||l!=="split")return;let G={...m,side:$};const J=e[m.fileIndex]?.chunks[m.chunkIndex]?.lines[m.lineIndex];if(J){if($==="left"&&J.type==="add"&&m.lineIndex>0){if(e[m.fileIndex]?.chunks[m.chunkIndex]?.lines[m.lineIndex-1]?.type==="delete"){G={...G,lineIndex:m.lineIndex-1},b(G),S(nl(G,l));return}}else if($==="right"&&J.type==="delete"&&e[m.fileIndex]?.chunks[m.chunkIndex]?.lines[m.lineIndex+1]?.type==="add"){G={...G,lineIndex:m.lineIndex+1},b(G),S(nl(G,l));return}}if(!Sn(G,e)){const I=e[m.fileIndex];if(!I)return;const Z=I.chunks[m.chunkIndex];if(Z){for(let F=m.lineIndex+1;F<Z.lines.length;F++){const X={...G,lineIndex:F};if(Sn(X,e)){G=X;break}}if(!Sn(G,e))for(let F=m.lineIndex-1;F>=0;F--){const X={...G,lineIndex:F};if(Sn(X,e)){G=X;break}}}if(!Sn(G,e)){for(let F=m.chunkIndex+1;F<I.chunks.length;F++){const X=I.chunks[F];if(X){for(let M=0;M<X.lines.length;M++){const V={...G,chunkIndex:F,lineIndex:M};if(Sn(V,e)){G=V;break}}if(Sn(G,e))break}}if(!Sn(G,e))for(let F=m.chunkIndex-1;F>=0;F--){const X=I.chunks[F];if(X){for(let M=X.lines.length-1;M>=0;M--){const V={...G,chunkIndex:F,lineIndex:M};if(Sn(V,e)){G=V;break}}if(Sn(G,e))break}}}}b(G),S(nl(G,l))},[m,l,S,e]),H=T.useCallback(()=>{const $=document.querySelector(oh.SCROLL_CONTAINER);if(!$)return;const G=$.getBoundingClientRect(),J=G.top+G.height/2;let I=1/0,Z=null;e.forEach((F,X)=>{F.chunks.forEach((M,V)=>{M.lines.forEach((R,D)=>{const q=l==="split"?["left","right"]:["right"];for(const A of q){const ne={fileIndex:X,chunkIndex:V,lineIndex:D,side:A};if(l==="split"&&!Sn(ne,e))continue;const re=nl(ne,l),fe=document.getElementById(re);if(fe){const ge=fe.getBoundingClientRect(),ye=ge.top+ge.height/2,pe=Math.abs(ye-J);ge.top<G.bottom&&ge.bottom>G.top&&pe<I&&(I=pe,Z=ne)}}})})}),Z&&b(Z)},[e,l,b]),Y=T.useCallback($=>{if(!$){b(null);return}const G=hv($,e);b(G),S(nl(G,l))},[e,l,S]),B={scopes:"navigation",enableOnFormTags:!1,preventDefault:!0};return lt("j, down",()=>j("next"),B,[j]),lt("k, up",()=>j("prev"),B,[j]),lt("n",()=>z("next"),B,[z]),lt("p",()=>z("prev"),B,[z]),lt("shift+n",()=>L("next"),B,[L]),lt("shift+p",()=>L("prev"),B,[L]),lt("]",()=>U("next"),{...B,useKey:!0},[U]),lt("[",()=>U("prev"),{...B,useKey:!0},[U]),lt("{",()=>{e.length>0&&(b({fileIndex:0,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"}),S(nl({fileIndex:0,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"},l)))},{...B,useKey:!0},[e,l,S]),lt("}",()=>{if(e.length>0){const $=e.length-1,G=e[$];G&&G.chunks.length>0&&(b({fileIndex:$,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"}),S(nl({fileIndex:$,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"},l)))}},{...B,useKey:!0},[e,l,S]),lt("h, left",()=>O("left"),{...B,enabled:l==="split"},[O,l]),lt("l, right",()=>O("right"),{...B,enabled:l==="split"},[O,l]),lt("v",()=>{if(m){const $=e[m.fileIndex];$&&s($.path)}},B,[m,e,s]),lt("shift+r",()=>{p&&p()},B,[p]),lt("c",()=>{if(m&&u){const $=e[m.fileIndex]?.chunks[m.chunkIndex]?.lines[m.lineIndex];$&&$.type!=="delete"&&u()}},B,[m,e,u]),lt("?",()=>x(!v),{...B,useKey:!0},[v]),lt(".",$=>{$.ctrlKey||$.altKey||$.shiftKey||$.metaKey||(H(),$.preventDefault())},{...B,useKey:!0,preventDefault:!1},[H]),lt("shift+c",()=>{c&&c()},{...B,scopes:["navigation","comments-list"]},[c]),lt("shift+d",()=>{f&&f()},{...B,scopes:["navigation","comments-list"]},[f]),lt("shift+l",()=>{h&&h()},B,[h]),{cursor:m,isHelpOpen:v,setIsHelpOpen:x,setCursorPosition:Y}}const wd=new Map;let Kj=0;function Os(e){return wd.has(e)||wd.set(e,`file-${++Kj}`),wd.get(e)??""}const Jj=8,Wj="1200px 0px",Fx=60,eR=180;function tR({diffData:e,diffScrollContainerRef:r,setDiffData:l}){const[i,s]=T.useState(new Set),u=T.useRef(new Set),c=T.useRef(null),f=T.useRef(new Map),h=T.useRef(new Set),p=T.useRef(null),m=T.useRef(0);T.useEffect(()=>{if(!e){const C=new Set;u.current=C,s(C),h.current.clear(),p.current=null;return}const w=`${e.requestedBaseCommitish??""}:${e.requestedTargetCommitish??""}`;if(p.current===w)return;p.current=w;const N=e.files.slice(0,Jj).map(C=>C.path),E=new Set(N);u.current=E,s(E),h.current.clear()},[e]);const b=T.useCallback(w=>{const N=f.current.get(w);N&&c.current&&c.current.unobserve(N),s(E=>{if(E.has(w))return E;const C=new Set(E);return C.add(w),u.current=C,C})},[]),v=T.useCallback((w,N)=>{const E=c.current,C=f.current.get(w);if(C&&E&&E.unobserve(C),!N){f.current.delete(w);return}f.current.set(w,N),!(u.current.has(w)||!E)&&E.observe(N)},[]);T.useEffect(()=>{if(c.current&&c.current.disconnect(),!e){c.current=null;return}const w=new IntersectionObserver(N=>{s(E=>{let C=!1;const j=new Set(E);return N.forEach(z=>{if(!z.isIntersecting)return;const U=z.target.dataset.filePath;!U||j.has(U)||(j.add(U),w.unobserve(z.target),C=!0)}),C&&(u.current=j),C?j:E})},{root:r.current,rootMargin:Wj});return c.current=w,f.current.forEach((N,E)=>{u.current.has(E)||w.observe(N)}),()=>{w.disconnect(),c.current=null}},[e,r]);const x=T.useCallback(w=>{if(!e)return;const N=e.files.findIndex(C=>C.path===w);if(N<0)return;const E=c.current;s(C=>{let j=!1;const z=new Set(C);for(let U=0;U<=N;U++){const L=e.files[U]?.path;if(L&&!z.has(L)){z.add(L),j=!0;const O=f.current.get(L);O&&E&&E.unobserve(O)}}return j&&(u.current=z),j?z:C})},[e]),S=T.useCallback(w=>{x(w);const N=e?.files.findIndex(O=>O.path===w)??-1,E=e&&N>=0?e.files.slice(0,N+1).map(O=>Os(O.path)):[Os(w)],C=m.current+1;m.current=C;const j=()=>{for(const O of E){const H=document.getElementById(O);if(!H||H.dataset.rendered!=="true")return!1}return!0},z=O=>{const H=r.current,Y=document.getElementById(Os(w));if(!H||!Y)return!1;const B=H.getBoundingClientRect(),$=Y.getBoundingClientRect(),G=H.scrollTop+($.top-B.top);return H.scrollTo({top:Math.max(0,G),behavior:O}),!0};let U=0;const L=()=>{requestAnimationFrame(()=>{if(m.current===C){if(!j()){U<Fx&&(U++,L());return}if(!z("smooth")){U<Fx&&(U++,L());return}window.setTimeout(()=>{m.current===C&&z("smooth")},eR)}})};L()},[e,r,x]);return T.useEffect(()=>{if(!e||e.targetCommitish==="stdin")return;const w=e.targetCommitish||"HEAD",N=`${e.requestedBaseCommitish??""}...${e.requestedTargetCommitish??""}`;e.files.forEach(E=>{if(!i.has(E.path)||E.isGenerated!==!1||E.status==="deleted")return;const C=`${N}:${w}:${E.path}`;if(h.current.has(C))return;h.current.add(C);const j=encodeURIComponent(E.path);fetch(`/api/generated-status/${j}?ref=${encodeURIComponent(w)}`).then(z=>z.ok?z.json():null).then(z=>{!z||z.isGenerated!==!0||l(U=>{if(!U||U.requestedBaseCommitish!==e.requestedBaseCommitish||U.requestedTargetCommitish!==e.requestedTargetCommitish)return U;let L=!1;const O=U.files.map(H=>H.path!==E.path||H.isGenerated?H:(L=!0,{...H,isGenerated:!0}));return L?{...U,files:O}:U})}).catch(()=>{})})},[e,i,l]),{renderedFilePaths:i,ensureFileRendered:b,ensureFilesRenderedUpTo:x,registerLazyFileContainer:v,scrollFileIntoDiffContainer:S}}function nR(e,r,l,i,s,u){const[c,f]=T.useState([]),[h,p]=T.useState(new Map);T.useEffect(()=>{if(!e||!r)return;const E=qa.getViewedFiles(e,r,l,i,u);(async()=>{if(s&&s.length>0){const j=[],z=new Set(E.map(U=>U.filePath));for(const U of s)if((U.isGenerated||U.status==="deleted")&&!z.has(U.path))try{const L=Mx(U),O=await Ox(L),H={filePath:U.path,viewedAt:new Date().toISOString(),diffContentHash:O};j.push(H)}catch(L){console.error("Failed to generate hash for auto-collapsed file:",L)}if(j.length>0){const U=[...E,...j];qa.saveViewedFiles(e,r,U,l,i,u),f(U);return}}f(E)})()},[e,r,l,i,u]);const m=T.useCallback(E=>{!e||!r||(qa.saveViewedFiles(e,r,E,l,i,u),f(E))},[e,r,l,i,u]),b=T.useMemo(()=>new Set(c.map(E=>E.filePath)),[c]),v=T.useCallback(E=>c.find(C=>C.filePath===E),[c]),x=T.useCallback(async E=>{const C=h.get(E.path);if(C)return C;const j=Mx(E),z=await Ox(j);return p(U=>new Map(U).set(E.path,z)),z},[h]),S=T.useCallback(async(E,C)=>{const j=v(E);if(!j)return!1;const z=await x(C);return j.diffContentHash!==z},[v,x]),w=T.useCallback(async(E,C)=>{if(v(E)){const z=c.filter(U=>U.filePath!==E);m(z)}else{const z=await x(C),U={filePath:E,viewedAt:new Date().toISOString(),diffContentHash:z},L=[...c,U];m(L)}},[c,v,x,m]),N=T.useCallback(()=>{m([]),p(new Map)},[m]);return{viewedFiles:b,toggleFileViewed:w,isFileContentChanged:S,getViewedFileRecord:v,clearViewedFiles:N}}const Ix={mobileMax:767,desktopMin:1024},ru={mobile:`(max-width: ${Ix.mobileMax}px)`,desktop:`(min-width: ${Ix.desktopMin}px)`},rR=()=>typeof window>"u"?{isMobile:!1,isDesktop:!0}:{isMobile:window.matchMedia(ru.mobile).matches,isDesktop:window.matchMedia(ru.desktop).matches};function lR(){const[e,r]=T.useState(()=>rR());return T.useEffect(()=>{if(typeof window>"u")return;const l=window.matchMedia(ru.mobile),i=window.matchMedia(ru.desktop),s=()=>{r({isMobile:l.matches,isDesktop:i.matches})};return s(),l.addEventListener("change",s),i.addEventListener("change",s),()=>{l.removeEventListener("change",s),i.removeEventListener("change",s)}},[]),e}function iR(e,r,l){for(let i=0;i<e.chunks.length;i++){const s=e.chunks[i];if(s)for(let u=0;u<s.lines.length;u++){const c=s.lines[u];if(!c)continue;if((c.newLineNumber||c.oldLineNumber)===l)return{fileIndex:r,chunkIndex:i,lineIndex:u,side:c.newLineNumber?"right":"left"}}}return null}function aR(e,r){const l=r.findIndex(u=>u.path===e.file);if(l===-1)return null;const i=r[l];if(!i)return null;const s=Array.isArray(e.line)?e.line[1]:e.line;return iR(i,l,s)}const oR=[],sR=[],pv="difit.sidebarWidth",gv=200,mv=600,Sd=280,uR=()=>{if(typeof window>"u")return Sd;const e=window.localStorage.getItem(pv);if(!e)return Sd;const r=Number.parseInt(e,10);return Number.isFinite(r)?Math.min(mv,Math.max(gv,r)):Sd};function cR(){const[e,r]=T.useState(null),[l,i]=T.useState(Za),s=T.useRef(!1),[u,c]=T.useState(!0),[f,h]=T.useState(!0),[p,m]=T.useState(null),[b,v]=T.useState(!1),[x,S]=T.useState(uR),[w,N]=T.useState(!1),[E,C]=T.useState(!0),[j,z]=T.useState(!1),[U,L]=T.useState(!1),[O,H]=T.useState(!1),[Y,B]=T.useState(!1),[$,G]=T.useState(!1),[J,I]=T.useState(new Set),Z=T.useRef(!1),F=T.useRef(null),[X,M]=T.useState(null),[V,R]=T.useState(""),[D,q]=T.useState(""),[A,ne]=T.useState(""),[re,fe]=T.useState(""),ge=T.useRef(!1),{settings:ye,updateSettings:pe}=Dj(),{isMobile:me,isDesktop:xe}=lR(),{comments:de,addComment:Se,removeComment:Ee,updateComment:Ve,clearAllComments:Ke,generatePrompt:ze,generateAllCommentsPrompt:zt}=Bj(e?.baseCommitish,e?.targetCommitish,e?.commit,void 0,e?.repositoryId),pt=T.useMemo(()=>de.map(le=>({id:le.id,file:le.filePath,line:typeof le.position.line=="number"?le.position.line:[le.position.line.start,le.position.line.end],body:le.body,timestamp:le.createdAt,codeContent:le.codeSnapshot?.content,side:le.position.side})),[de]),mt=T.useMemo(()=>{const le=new Map;return pt.forEach(ve=>{const Ne=le.get(ve.file);Ne?Ne.push(ve):le.set(ve.file,[ve])}),le},[pt]),Bt=me&&de.length>0,{viewedFiles:it,toggleFileViewed:Ft,clearViewedFiles:at}=nR(e?.baseCommitish,e?.targetCommitish,e?.commit,void 0,e?.files,e?.repositoryId);T.useEffect(()=>{Z.current=!1},[e?.repositoryId,e?.commit]),T.useEffect(()=>{Z.current||(I(new Set(it)),Z.current=!0)},[it]);const{renderedFilePaths:En,ensureFileRendered:oe,ensureFilesRenderedUpTo:be,registerLazyFileContainer:Re,scrollFileIntoDiffContainer:De}=tR({diffData:e,diffScrollContainerRef:F,setDiffData:r}),Ge=T.useCallback(async le=>{if(!e)return;const ve=e.files.find(we=>we.path===le);if(!ve)return;const Ne=it.has(le);await Ft(le,ve),I(we=>{const Ue=new Set(we);return Ne?Ue.delete(le):Ue.add(le),Ue}),Ne||setTimeout(()=>{De(le)},100)},[e,De,Ft,it]),Gt=T.useCallback(le=>{I(ve=>{const Ne=new Set(ve);return Ne.has(le)?Ne.delete(le):Ne.add(le),Ne})},[]),Fn=T.useCallback(le=>{e&&I(le?new Set(e.files.map(ve=>ve.path)):new Set)},[e]),jt=T.useCallback(le=>{s.current=!0,i(le)},[]),{isLoading:xt,expandLines:It,expandAllBetweenChunks:Je,prefetchFileContent:$n,getMergedChunks:Yt,lastUpdatedFilePath:Oi,lastUpdatedAt:zl}=Uj({baseCommitish:e?.baseCommitish,targetCommitish:e?.targetCommitish}),Ar=T.useRef(Yt);T.useEffect(()=>{Ar.current=Yt},[Yt]);const[Tr,In]=T.useState(new Map),nr=T.useMemo(()=>{const le=new Map;return e?.files.forEach(ve=>{le.set(ve.path,ve)}),le},[e]);T.useEffect(()=>{if(!e){In(new Map);return}In(le=>{let ve=!1;const Ne=new Map(le),we=new Set(e.files.map(Ue=>Ue.path));return Ne.forEach((Ue,Xt)=>{we.has(Xt)||(Ne.delete(Xt),ve=!0)}),En.forEach(Ue=>{if(Ne.has(Ue))return;const Xt=nr.get(Ue);Xt&&(Ne.set(Ue,Ar.current(Xt)),ve=!0)}),ve?Ne:le})},[e,nr,En]),T.useEffect(()=>{if(!e||!Oi)return;const le=nr.get(Oi);le&&In(ve=>{if(!ve.has(le.path))return ve;const Ne=new Map(ve);return Ne.set(le.path,Ar.current(le)),Ne})},[e,nr,Oi,zl]);const cl=T.useMemo(()=>e?e.files.map(le=>({...le,chunks:Tr.get(le.path)||le.chunks})):[],[e,Tr]),[no,Bl]=T.useState(null),{shouldReload:Mi,reload:jr,watchState:ro}=Hj(async()=>{await gt()}),{cursor:Wt,isHelpOpen:lo,setIsHelpOpen:zi,setCursorPosition:Vn}=Qj({files:cl,comments:pt,viewMode:l,reviewedFiles:it,onToggleReviewed:Ge,onCreateComment:()=>{Wt&&Bl({fileIndex:Wt.fileIndex,chunkIndex:Wt.chunkIndex,lineIndex:Wt.lineIndex})},onCopyAllComments:()=>{de.length>0&&Ii()},onDeleteAllComments:()=>{de.length>0&&confirm("Delete all comments?")&&Ke()},onShowCommentsList:()=>{B(!0)},onRefresh:()=>{jr()}});T.useEffect(()=>{if(!e||!Wt)return;const le=e.files[Wt.fileIndex]?.path;!le||En.has(le)||(be(le),requestAnimationFrame(()=>{Vn(Wt)}))},[Wt,e,be,En,Vn]);const Bi=T.useCallback((le,ve,Ne,we)=>{Vn({fileIndex:le,chunkIndex:ve,lineIndex:Ne,side:we})},[Vn]),io=T.useCallback(()=>{Bl(null)},[Bl]),ao=T.useCallback(le=>ze(le.id),[ze]),Gn=le=>{le.preventDefault(),z(!0);const ve=le.clientX,Ne=x,we=Xt=>{const Cn=Math.max(gv,Math.min(mv,Ne+(Xt.clientX-ve)));S(Cn)},Ue=()=>{z(!1),document.removeEventListener("mousemove",we),document.removeEventListener("mouseup",Ue)};document.addEventListener("mousemove",we),document.addEventListener("mouseup",Ue)},gt=T.useCallback(async(le,ve)=>{try{const Ne=new URLSearchParams({ignoreWhitespace:String(u)});le&&Ne.set("base",le),ve&&Ne.set("target",ve);const we=await fetch(`/api/diff?${Ne}`);if(!we.ok)throw new Error("Failed to fetch diff data");const Ue=await we.json();if(r(Ue),Ue.baseCommitish&&ne(Ue.baseCommitish),Ue.targetCommitish&&fe(Ue.targetCommitish),!ge.current){const Xt=Ue.requestedBaseCommitish??Ue.baseCommitish,Cn=Ue.requestedTargetCommitish??Ue.targetCommitish;Xt&&R(Xt),Cn&&q(Cn)}Ue.mode&&!s.current&&i(ok(Ue.mode))}catch(Ne){m(Ne instanceof Error?Ne.message:"Unknown error")}finally{h(!1)}},[u]);T.useEffect(()=>{gt()},[gt]),T.useEffect(()=>{me&&l!=="unified"&&i("unified")},[l,me]),T.useEffect(()=>{try{window.localStorage.setItem(pv,String(x))}catch{}},[x]),T.useEffect(()=>{fetch("/api/revisions").then(le=>le.ok?le.json():null).then(le=>{M(le),le?.resolvedBase&&ne(ve=>ve||le.resolvedBase||""),le?.resolvedTarget&&fe(ve=>ve||le.resolvedTarget||"")}).catch(()=>M(null))},[]);const _t=T.useCallback(async(le,ve)=>{le===V&&ve===D||(ge.current=!0,R(le),q(ve),h(!0),m(null),await gt(le,ve))},[V,D,gt]),rr=T.useRef(!1);T.useEffect(()=>{e?.clearComments&&!rr.current&&(rr.current=!0,Ke(),at(),console.log("✅ All existing comments and viewed files cleared as requested via --clean flag"))},[e?.clearComments,Ke,at]),T.useEffect(()=>{e&&(it.size<e.files.length?H(!1):it.size===e.files.length&&!O&&(L(!0),H(!0),setTimeout(()=>{L(!1)},1e3)))},[it.size,e,O]),T.useEffect(()=>{if(de.length>0){const ve=de.map(we=>({id:we.id,file:we.filePath,line:typeof we.position.line=="number"?we.position.line:[we.position.line.start,we.position.line.end],body:we.body,timestamp:we.createdAt,side:we.position.side})),Ne=JSON.stringify({comments:ve});fetch("/api/comments",{method:"POST",headers:{"Content-Type":"application/json"},body:Ne}).catch(we=>{console.error("Failed to sync comments:",we)})}const le=()=>{if(de.length>0){const ve=de.map(we=>({id:we.id,file:we.filePath,line:typeof we.position.line=="number"?we.position.line:[we.position.line.start,we.position.line.end],body:we.body,timestamp:we.createdAt,side:we.position.side})),Ne=JSON.stringify({comments:ve});navigator.sendBeacon("/api/comments",Ne)}};return window.addEventListener("beforeunload",le),()=>{window.removeEventListener("beforeunload",le)}},[de]),T.useEffect(()=>{const le=new EventSource("/api/heartbeat");return le.onopen=()=>{console.log("Connected to server heartbeat")},le.onerror=()=>{console.log("Server connection lost"),le.close()},()=>{le.close()}},[]);const Fi=T.useCallback((le,ve,Ne,we,Ue)=>(Se({filePath:le,body:Ne,side:Ue||"new",line:typeof ve=="number"?ve:{start:ve[0],end:ve[1]},codeSnapshot:we?{content:we,language:void 0}:void 0}),Promise.resolve()),[Se]),Ii=async()=>{try{const le=zt();await navigator.clipboard.writeText(le),v(!0),setTimeout(()=>v(!1),2e3)}catch(le){console.error("Failed to copy all comments prompt:",le)}},ku=le=>{if(!e)return;const ve=aR(le,e.files);ve&&Vn(ve)},oo=T.useCallback(async(le,ve)=>{try{const Ne=await fetch("/api/open-in-editor",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:le,line:ve,editor:ye.editor})});if(!Ne.ok){const we=await Ne.json().catch(()=>null);let Ue=Ne.statusText;we&&typeof we=="object"&&"error"in we&&typeof we.error=="string"&&(Ue=we.error),console.error("Failed to open file in editor:",Ue)}}catch(Ne){console.error("Failed to open file in editor:",Ne)}},[ye.editor]),fl=le=>{Vn(null);const ve=le.target,Ne=ve.closest('[data-comment-button="true"]'),we=ve.closest('[data-open-in-editor-button="true"]');!Ne&&!we&&Ui(le)},Ui=le=>{document.querySelectorAll('form[data-empty="true"]').forEach(Ne=>{Ne.contains(le.target)||Ne.querySelector('button[type="button"]')?.click()})};if(f)return y.jsx("div",{className:"flex items-center justify-center h-screen bg-github-bg-primary",children:y.jsx("div",{className:"text-github-text-secondary text-base",children:"Loading diff..."})});if(p)return y.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2",children:[y.jsx("h2",{className:"text-github-danger text-2xl mb-2",children:"Error"}),y.jsx("p",{className:"text-github-text-secondary text-base",children:p})]});if(!e)return y.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2",children:[y.jsx("h2",{className:"text-github-danger text-2xl mb-2",children:"No data"}),y.jsx("p",{className:"text-github-text-secondary text-base",children:"No diff data available"})]});const Rr=ye.editor!=="none"&&e.openInEditorAvailable!==!1;return y.jsx(hk,{children:y.jsxs("div",{className:"h-screen flex flex-col",onClickCapture:fl,children:[y.jsxs("header",{className:`bg-github-bg-secondary border-b border-github-border flex ${me?"flex-col":"flex-row items-center"}`,children:[y.jsxs("div",{className:`flex items-center justify-between w-full ${me?"px-3 py-2 gap-3":"px-4 py-3 gap-4 w-auto"} ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:me?"100%":E?`${x}px`:"auto",minWidth:me?"0px":E?"200px":"auto",maxWidth:me?"none":E?"600px":"none"},children:[y.jsx("h1",{children:y.jsx(Cj,{style:{height:"18px",color:"var(--color-github-text-secondary)"}})}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("button",{onClick:()=>C(!E),className:"p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors",title:E?"Collapse file tree":"Expand file tree","aria-expanded":E,"aria-controls":"file-tree-panel","aria-label":"Toggle file tree panel",children:E?y.jsx($2,{size:18}):y.jsx(G2,{size:18})}),y.jsx("button",{onClick:()=>N(!0),className:"p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors",title:"Appearance Settings",children:y.jsx(n1,{size:18})})]})]}),!me&&y.jsx("div",{className:`border-r border-github-border ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:E?"4px":"0px",height:"calc(100% - 16px)",margin:"8px 0",transform:"translateX(-2px)"}}),y.jsxs("div",{className:`flex-1 flex flex-wrap items-center justify-between ${me?"px-3 pb-2 gap-3":"px-4 py-3 gap-4"}`,children:[y.jsxs("div",{className:`flex flex-wrap items-center ${me?"gap-2":"gap-3"}`,children:[!me&&y.jsxs("div",{className:"flex bg-github-bg-tertiary border border-github-border rounded-md p-1",children:[y.jsxs("button",{onClick:()=>jt("split"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${l==="split"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:[y.jsx(x2,{size:14}),"Split"]}),y.jsxs("button",{onClick:()=>jt("unified"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${l==="unified"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:[y.jsx(rk,{size:14}),"Unified"]})]}),y.jsx(r1,{checked:u,onChange:c,label:"Ignore Whitespace",title:u?"Show whitespace changes":"Ignore whitespace changes"}),y.jsx(Nj,{shouldReload:Mi,isReloading:ro.isReloading,onReload:jr,changeType:ro.lastChangeType,compact:me})]}),y.jsxs("div",{className:`flex flex-wrap items-center text-sm text-github-text-secondary ${me?"gap-3":"gap-4"}`,children:[!me&&de.length>0&&y.jsx(qb,{commentsCount:de.length,isCopiedAll:b,onCopyAll:Ii,onDeleteAll:Ke,onViewAll:()=>B(!0)}),y.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[y.jsxs("div",{className:"text-xs relative",children:[it.size===e.files.length?"All diffs difit-ed!":`${it.size} / ${e.files.length} files viewed`,y.jsx(Lj,{isActive:U})]}),y.jsx("div",{className:"relative h-2 bg-github-bg-tertiary rounded-full overflow-hidden",style:{width:"90px",border:"1px solid var(--color-github-border)"},children:y.jsx("div",{className:"absolute top-0 right-0 h-full transition-all duration-300 ease-out",style:{width:`${(e.files.length-it.size)/e.files.length*100}%`,backgroundColor:(()=>{const le=(e.files.length-it.size)/e.files.length*100;return le>50?"var(--color-github-accent)":le>20?"var(--color-github-warning)":"var(--color-github-danger)"})()}})})]}),X?y.jsx(z3,{options:X,baseRevision:V,targetRevision:D,resolvedBaseRevision:A,resolvedTargetRevision:re,onSelectDiff:(le,ve)=>{_t(le,ve)},onOpenAdvanced:()=>G(!0),compact:!xe}):y.jsxs("span",{className:"text-xs",children:["Reviewing:"," ",y.jsx("code",{className:"bg-github-bg-tertiary px-1.5 py-0.5 rounded text-xs text-github-text-primary",children:e.commit.includes("...")?y.jsxs(y.Fragment,{children:[y.jsxs("span",{className:"text-github-text-secondary font-medium",children:[e.commit.split("...")[0],"..."]}),y.jsx("span",{className:"font-medium",children:e.commit.split("...")[1]})]}):e.commit})]})]})]})]}),X&&y.jsx(Aj,{isOpen:$,onClose:()=>G(!1),options:X,baseRevision:V,targetRevision:D,resolvedBaseRevision:A,resolvedTargetRevision:re,onApply:(le,ve)=>{_t(le,ve)}},$?`${V}:${D}`:"closed"),me&&E&&y.jsx("button",{type:"button","aria-label":"Close file tree",className:"fixed inset-0 bg-black/40 z-30",onClick:()=>C(!1)}),y.jsxs("div",{className:"flex flex-1 overflow-hidden relative",children:[y.jsx("div",{className:`relative overflow-hidden ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:me?"0px":E?`${x}px`:"0px"},children:y.jsxs("aside",{id:"file-tree-panel",className:`bg-github-bg-secondary border-r border-github-border overflow-y-auto flex flex-col ${me?"fixed inset-y-0 left-0 z-40 w-[min(85vw,360px)] transition-transform duration-300 ease-out":"relative"}`,style:{width:me?"min(85vw, 360px)":`${x}px`,minWidth:me?"0px":"200px",maxWidth:me?"none":"600px",height:"100%",transform:me?E?"translateX(0)":"translateX(-100%)":void 0},children:[y.jsx("div",{className:"flex-1 overflow-y-auto",children:y.jsx(Sj,{files:e.files,onScrollToFile:De,comments:de.map(le=>({id:le.id,file:le.filePath,line:typeof le.position.line=="number"?le.position.line:[le.position.line.start,le.position.line.end],body:le.body,timestamp:le.createdAt,codeContent:le.codeSnapshot?.content})),reviewedFiles:it,onToggleReviewed:Ge,selectedFileIndex:Wt?.fileIndex??null})}),!me&&y.jsxs("div",{className:"p-4 border-t border-github-border flex justify-between items-center",children:[y.jsxs("button",{onClick:()=>zi(!0),className:"flex items-center gap-1.5 text-github-text-secondary hover:text-github-text-primary transition-colors",title:"Keyboard shortcuts (Shift+?)",children:[y.jsx(B2,{size:16}),y.jsx("span",{className:"text-sm",children:"Shortcuts"})]}),y.jsxs("a",{href:"https://github.com/yoshiko-pg/difit",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-github-text-secondary hover:text-github-text-primary transition-colors",title:"View on GitHub",children:[y.jsx("span",{className:"text-sm",children:"Star on GitHub"}),y.jsx(kj,{style:{height:"18px",width:"18px"}})]})]})]})}),!me&&y.jsx("div",{className:`bg-github-border hover:bg-github-text-muted cursor-col-resize ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:E?"4px":"0px"},onMouseDown:Gn,title:"Drag to resize file list"}),y.jsx("main",{ref:F,className:`flex-1 overflow-y-auto ${Bt?"pb-16":""}`,children:e.files.map((le,ve)=>{const Ne=mt.get(le.path)??oR,we=Tr.get(le.path)??sR,Ue=En.has(le.path);return y.jsx("div",{id:Os(le.path),"data-file-path":le.path,"data-rendered":Ue?"true":"false",ref:Xt=>Re(le.path,Xt),className:"mb-6",children:Ue?y.jsx(vj,{file:le,comments:Ne,diffMode:l,reviewedFiles:it,onToggleReviewed:Ge,collapsedFiles:J,onToggleCollapsed:Gt,onToggleAllCollapsed:Fn,onAddComment:Fi,onGeneratePrompt:ao,onRemoveComment:Ee,onUpdateComment:Ve,onOpenInEditor:Rr?oo:void 0,syntaxTheme:ye.syntaxTheme,baseCommitish:e.baseCommitish,targetCommitish:e.targetCommitish,cursor:Wt?.fileIndex===ve?Wt:null,fileIndex:ve,onLineClick:Bi,commentTrigger:no?.fileIndex===ve?no:null,onCommentTriggerHandled:io,mergedChunks:we,expandLines:It,expandAllBetweenChunks:Je,prefetchFileContent:$n,isExpandLoading:xt}):y.jsx("div",{className:"bg-github-bg-secondary border border-github-border rounded-md px-4 py-3",children:y.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y.jsxs("div",{className:"min-w-0",children:[y.jsx("div",{className:"text-xs uppercase tracking-wide text-github-text-muted",children:"Deferred Rendering"}),y.jsx("div",{className:"text-sm font-mono text-github-text-primary truncate",children:le.path})]}),y.jsx("button",{type:"button",onClick:()=>oe(le.path),className:"px-3 py-1.5 text-xs rounded border border-github-border text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary",children:"Load now"})]})})},le.path)})})]}),Bt&&y.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-20 bg-github-bg-secondary border-t border-github-border px-4 py-2 flex justify-end",children:y.jsx(qb,{commentsCount:de.length,isCopiedAll:b,onCopyAll:Ii,onDeleteAll:Ke,onViewAll:()=>B(!0),direction:"up",compact:!0})}),y.jsx(_j,{isOpen:w,onClose:()=>N(!1),settings:ye,onSettingsChange:pe}),y.jsx(Ej,{isOpen:lo,onClose:()=>zi(!1)}),y.jsx(ME,{isOpen:Y,onClose:()=>B(!1),onNavigate:ku,comments:de.map(le=>({id:le.id,file:le.filePath,line:typeof le.position.line=="number"?le.position.line:[le.position.line.start,le.position.line.end],body:le.body,timestamp:le.createdAt,codeContent:le.codeSnapshot?.content})),onRemoveComment:Ee,onGeneratePrompt:le=>ze(le.id),onUpdateComment:Ve,syntaxTheme:ye.syntaxTheme})]})})}const bv=document.getElementById("root");if(!bv)throw new Error("Root element not found");BS.createRoot(bv).render(y.jsx(Jt.StrictMode,{children:y.jsx(ZS,{initiallyActiveScopes:["navigation"],children:y.jsx(cR,{})})}));export{lu as g};
|