difit 3.1.2 → 3.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,67 @@
1
+ function p2(e,r){for(var l=0;l<r.length;l++){const a=r[l];if(typeof a!="string"&&!Array.isArray(a)){for(const s in a)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(a,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>a[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"]'))a(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"&&a(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 a(s){if(s.ep)return;s.ep=!0;const u=l(s);fetch(s.href,u)}})();function Zs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Af={exports:{}},ka={};var Eb;function m2(){if(Eb)return ka;Eb=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function l(a,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:a,key:c,ref:s!==void 0?s:null,props:u}}return ka.Fragment=r,ka.jsx=l,ka.jsxs=l,ka}var Cb;function g2(){return Cb||(Cb=1,Af.exports=m2()),Af.exports}var y=g2(),Nf={exports:{}},_e={};var Ab;function b2(){if(Ab)return _e;Ab=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),a=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"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function x(L){return L===null||typeof L!="object"?null:(L=v&&L[v]||L["@@iterator"],typeof L=="function"?L:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,A={};function E(L,H,N){this.props=L,this.context=H,this.refs=A,this.updater=N||w}E.prototype.isReactComponent={},E.prototype.setState=function(L,H){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,H,"setState")},E.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function C(){}C.prototype=E.prototype;function T(L,H,N){this.props=L,this.context=H,this.refs=A,this.updater=N||w}var B=T.prototype=new C;B.constructor=T,k(B,E.prototype),B.isPureReactComponent=!0;var q=Array.isArray;function D(){}var U={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function G(L,H,N){var re=N.ref;return{$$typeof:e,type:L,key:H,ref:re!==void 0?re:null,props:N}}function M(L,H){return G(L.type,H,L.props)}function $(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function Y(L){var H={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(N){return H[N]})}var J=/\/+/g;function I(L,H){return typeof L=="object"&&L!==null&&L.key!=null?Y(""+L.key):H.toString(36)}function X(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(D,D):(L.status="pending",L.then(function(H){L.status==="pending"&&(L.status="fulfilled",L.value=H)},function(H){L.status==="pending"&&(L.status="rejected",L.reason=H)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function F(L,H,N,re,ce){var de=typeof L;(de==="undefined"||de==="boolean")&&(L=null);var pe=!1;if(L===null)pe=!0;else switch(de){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(L.$$typeof){case e:case r:pe=!0;break;case b:return pe=L._init,F(pe(L._payload),H,N,re,ce)}}if(pe)return ce=ce(L),pe=re===""?"."+I(L,0):re,q(ce)?(N="",pe!=null&&(N=pe.replace(J,"$&/")+"/"),F(ce,H,N,"",function(ve){return ve})):ce!=null&&($(ce)&&(ce=M(ce,N+(ce.key==null||L&&L.key===ce.key?"":(""+ce.key).replace(J,"$&/")+"/")+pe)),H.push(ce)),1;pe=0;var ge=re===""?".":re+":";if(q(L))for(var fe=0;fe<L.length;fe++)re=L[fe],de=ge+I(re,fe),pe+=F(re,H,N,de,ce);else if(fe=x(L),typeof fe=="function")for(L=fe.call(L),fe=0;!(re=L.next()).done;)re=re.value,de=ge+I(re,fe++),pe+=F(re,H,N,de,ce);else if(de==="object"){if(typeof L.then=="function")return F(X(L),H,N,re,ce);throw H=String(L),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return pe}function O(L,H,N){if(L==null)return L;var re=[],ce=0;return F(L,re,"","",function(de){return H.call(N,de,ce++)}),re}function z(L){if(L._status===-1){var H=L._result;H=H(),H.then(function(N){(L._status===0||L._status===-1)&&(L._status=1,L._result=N)},function(N){(L._status===0||L._status===-1)&&(L._status=2,L._result=N)}),L._status===-1&&(L._status=0,L._result=H)}if(L._status===1)return L._result.default;throw L._result}var Q=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},R={map:O,forEach:function(L,H,N){O(L,function(){H.apply(this,arguments)},N)},count:function(L){var H=0;return O(L,function(){H++}),H},toArray:function(L){return O(L,function(H){return H})||[]},only:function(L){if(!$(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return _e.Activity=g,_e.Children=R,_e.Component=E,_e.Fragment=l,_e.Profiler=s,_e.PureComponent=T,_e.StrictMode=a,_e.Suspense=p,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,_e.__COMPILER_RUNTIME={__proto__:null,c:function(L){return U.H.useMemoCache(L)}},_e.cache=function(L){return function(){return L.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(L,H,N){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var re=k({},L.props),ce=L.key;if(H!=null)for(de in H.key!==void 0&&(ce=""+H.key),H)!V.call(H,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&H.ref===void 0||(re[de]=H[de]);var de=arguments.length-2;if(de===1)re.children=N;else if(1<de){for(var pe=Array(de),ge=0;ge<de;ge++)pe[ge]=arguments[ge+2];re.children=pe}return G(L.type,ce,re)},_e.createContext=function(L){return L={$$typeof:c,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:u,_context:L},L},_e.createElement=function(L,H,N){var re,ce={},de=null;if(H!=null)for(re in H.key!==void 0&&(de=""+H.key),H)V.call(H,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(ce[re]=H[re]);var pe=arguments.length-2;if(pe===1)ce.children=N;else if(1<pe){for(var ge=Array(pe),fe=0;fe<pe;fe++)ge[fe]=arguments[fe+2];ce.children=ge}if(L&&L.defaultProps)for(re in pe=L.defaultProps,pe)ce[re]===void 0&&(ce[re]=pe[re]);return G(L,de,ce)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(L){return{$$typeof:f,render:L}},_e.isValidElement=$,_e.lazy=function(L){return{$$typeof:b,_payload:{_status:-1,_result:L},_init:z}},_e.memo=function(L,H){return{$$typeof:h,type:L,compare:H===void 0?null:H}},_e.startTransition=function(L){var H=U.T,N={};U.T=N;try{var re=L(),ce=U.S;ce!==null&&ce(N,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(D,Q)}catch(de){Q(de)}finally{H!==null&&N.types!==null&&(H.types=N.types),U.T=H}},_e.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},_e.use=function(L){return U.H.use(L)},_e.useActionState=function(L,H,N){return U.H.useActionState(L,H,N)},_e.useCallback=function(L,H){return U.H.useCallback(L,H)},_e.useContext=function(L){return U.H.useContext(L)},_e.useDebugValue=function(){},_e.useDeferredValue=function(L,H){return U.H.useDeferredValue(L,H)},_e.useEffect=function(L,H){return U.H.useEffect(L,H)},_e.useEffectEvent=function(L){return U.H.useEffectEvent(L)},_e.useId=function(){return U.H.useId()},_e.useImperativeHandle=function(L,H,N){return U.H.useImperativeHandle(L,H,N)},_e.useInsertionEffect=function(L,H){return U.H.useInsertionEffect(L,H)},_e.useLayoutEffect=function(L,H){return U.H.useLayoutEffect(L,H)},_e.useMemo=function(L,H){return U.H.useMemo(L,H)},_e.useOptimistic=function(L,H){return U.H.useOptimistic(L,H)},_e.useReducer=function(L,H,N){return U.H.useReducer(L,H,N)},_e.useRef=function(L){return U.H.useRef(L)},_e.useState=function(L){return U.H.useState(L)},_e.useSyncExternalStore=function(L,H,N){return U.H.useSyncExternalStore(L,H,N)},_e.useTransition=function(){return U.H.useTransition()},_e.version="19.2.3",_e}var Nb;function th(){return Nb||(Nb=1,Nf.exports=b2()),Nf.exports}var j=th();const Xt=Zs(j),Rx=p2({__proto__:null,default:Xt},[j]);var Tf={exports:{}},Ea={},jf={exports:{}},Rf={};var Tb;function y2(){return Tb||(Tb=1,(function(e){function r(F,O){var z=F.length;F.push(O);e:for(;0<z;){var Q=z-1>>>1,R=F[Q];if(0<s(R,O))F[Q]=O,F[z]=R,z=Q;else break e}}function l(F){return F.length===0?null:F[0]}function a(F){if(F.length===0)return null;var O=F[0],z=F.pop();if(z!==O){F[0]=z;e:for(var Q=0,R=F.length,L=R>>>1;Q<L;){var H=2*(Q+1)-1,N=F[H],re=H+1,ce=F[re];if(0>s(N,z))re<R&&0>s(ce,N)?(F[Q]=ce,F[re]=z,Q=re):(F[Q]=N,F[H]=z,Q=H);else if(re<R&&0>s(ce,z))F[Q]=ce,F[re]=z,Q=re;else break e}}return O}function s(F,O){var z=F.sortIndex-O.sortIndex;return z!==0?z:F.id-O.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 p=[],h=[],b=1,g=null,v=3,x=!1,w=!1,k=!1,A=!1,E=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function B(F){for(var O=l(h);O!==null;){if(O.callback===null)a(h);else if(O.startTime<=F)a(h),O.sortIndex=O.expirationTime,r(p,O);else break;O=l(h)}}function q(F){if(k=!1,B(F),!w)if(l(p)!==null)w=!0,D||(D=!0,Y());else{var O=l(h);O!==null&&X(q,O.startTime-F)}}var D=!1,U=-1,V=5,G=-1;function M(){return A?!0:!(e.unstable_now()-G<V)}function $(){if(A=!1,D){var F=e.unstable_now();G=F;var O=!0;try{e:{w=!1,k&&(k=!1,C(U),U=-1),x=!0;var z=v;try{t:{for(B(F),g=l(p);g!==null&&!(g.expirationTime>F&&M());){var Q=g.callback;if(typeof Q=="function"){g.callback=null,v=g.priorityLevel;var R=Q(g.expirationTime<=F);if(F=e.unstable_now(),typeof R=="function"){g.callback=R,B(F),O=!0;break t}g===l(p)&&a(p),B(F)}else a(p);g=l(p)}if(g!==null)O=!0;else{var L=l(h);L!==null&&X(q,L.startTime-F),O=!1}}break e}finally{g=null,v=z,x=!1}O=void 0}}finally{O?Y():D=!1}}}var Y;if(typeof T=="function")Y=function(){T($)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,I=J.port2;J.port1.onmessage=$,Y=function(){I.postMessage(null)}}else Y=function(){E($,0)};function X(F,O){U=E(function(){F(e.unstable_now())},O)}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"):V=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 O=3;break;default:O=v}var z=v;v=O;try{return F()}finally{v=z}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(F,O){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var z=v;v=F;try{return O()}finally{v=z}},e.unstable_scheduleCallback=function(F,O,z){var Q=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?Q+z:Q):z=Q,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=z+R,F={id:b++,callback:O,priorityLevel:F,startTime:z,expirationTime:R,sortIndex:-1},z>Q?(F.sortIndex=z,r(h,F),l(p)===null&&F===l(h)&&(k?(C(U),U=-1):k=!0,X(q,z-Q))):(F.sortIndex=R,r(p,F),w||x||(w=!0,D||(D=!0,Y()))),F},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(F){var O=v;return function(){var z=v;v=O;try{return F.apply(this,arguments)}finally{v=z}}}})(Rf)),Rf}var jb;function x2(){return jb||(jb=1,jf.exports=y2()),jf.exports}var _f={exports:{}},Bt={};var Rb;function v2(){if(Rb)return Bt;Rb=1;var e=th();function r(p){var h="https://react.dev/errors/"+p;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var a={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(p,h,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:p,containerInfo:h,implementation:b}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,h){if(p==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Bt.createPortal=function(p,h){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(r(299));return u(p,h,null,b)},Bt.flushSync=function(p){var h=c.T,b=a.p;try{if(c.T=null,a.p=2,p)return p()}finally{c.T=h,a.p=b,a.d.f()}},Bt.preconnect=function(p,h){typeof p=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(p,h))},Bt.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},Bt.preinit=function(p,h){if(typeof p=="string"&&h&&typeof h.as=="string"){var b=h.as,g=f(b,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?a.d.S(p,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:x}):b==="script"&&a.d.X(p,{crossOrigin:g,integrity:v,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Bt.preinitModule=function(p,h){if(typeof p=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=f(h.as,h.crossOrigin);a.d.M(p,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(p)},Bt.preload=function(p,h){if(typeof p=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,g=f(b,h.crossOrigin);a.d.L(p,b,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Bt.preloadModule=function(p,h){if(typeof p=="string")if(h){var b=f(h.as,h.crossOrigin);a.d.m(p,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(p)},Bt.requestFormReset=function(p){a.d.r(p)},Bt.unstable_batchedUpdates=function(p,h){return p(h)},Bt.useFormState=function(p,h,b){return c.H.useFormState(p,h,b)},Bt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Bt.version="19.2.3",Bt}var _b;function _x(){if(_b)return _f.exports;_b=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(),_f.exports=v2(),_f.exports}var Lb;function w2(){if(Lb)return Ea;Lb=1;var e=x2(),r=th(),l=_x();function a(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i])}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,i=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(i=n.return),t=n.return;while(t)}return n.tag===3?i: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 p(t){if(u(t)!==t)throw Error(a(188))}function h(t){var n=t.alternate;if(!n){if(n=u(t),n===null)throw Error(a(188));return n!==t?null:t}for(var i=t,o=n;;){var d=i.return;if(d===null)break;var m=d.alternate;if(m===null){if(o=d.return,o!==null){i=o;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===i)return p(d),t;if(m===o)return p(d),n;m=m.sibling}throw Error(a(188))}if(i.return!==o.return)i=d,o=m;else{for(var S=!1,_=d.child;_;){if(_===i){S=!0,i=d,o=m;break}if(_===o){S=!0,o=d,i=m;break}_=_.sibling}if(!S){for(_=m.child;_;){if(_===i){S=!0,i=m,o=d;break}if(_===o){S=!0,o=m,i=d;break}_=_.sibling}if(!S)throw Error(a(189))}}if(i.alternate!==o)throw Error(a(190))}if(i.tag!==3)throw Error(a(188));return i.stateNode.current===i?t:n}function b(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=b(t),n!==null)return n;t=t.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),T=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),M=Symbol.for("react.memo_cache_sentinel"),$=Symbol.iterator;function Y(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 k:return"Fragment";case E:return"Profiler";case A:return"StrictMode";case q:return"Suspense";case D:return"SuspenseList";case G:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case w:return"Portal";case T:return t.displayName||"Context";case C:return(t._context.displayName||"Context")+".Consumer";case B:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case U:return n=t.displayName||null,n!==null?n:I(t.type)||"Memo";case V:n=t._payload,t=t._init;try{return I(t(n))}catch{}}return null}var X=Array.isArray,F=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z={pending:!1,data:null,method:null,action:null},Q=[],R=-1;function L(t){return{current:t}}function H(t){0>R||(t.current=Q[R],Q[R]=null,R--)}function N(t,n){R++,Q[R]=t.current,t.current=n}var re=L(null),ce=L(null),de=L(null),pe=L(null);function ge(t,n){switch(N(de,n),N(ce,t),N(re,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?Yg(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=Yg(n),t=Xg(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}H(re),N(re,t)}function fe(){H(re),H(ce),H(de)}function ve(t){t.memoizedState!==null&&N(pe,t);var n=re.current,i=Xg(n,t.type);n!==i&&(N(ce,t),N(re,i))}function xe(t){ce.current===t&&(H(re),H(ce)),pe.current===t&&(H(pe),xa._currentValue=z)}var ye,ke;function Ne(t){if(ye===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);ye=n&&n[1]||"",ke=-1<i.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+ye+t+ke}var Ve=!1;function et(t,n){if(!t||Ve)return"";Ve=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(ne){var te=ne}Reflect.construct(t,[],ue)}else{try{ue.call()}catch(ne){te=ne}t.call(ue.prototype)}}else{try{throw Error()}catch(ne){te=ne}(ue=t())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ne){if(ne&&te&&typeof ne.stack=="string")return[ne.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 m=o.DetermineComponentFrameRoot(),S=m[0],_=m[1];if(S&&_){var P=S.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 ie=`
6
+ `+P[o].replace(" at new "," at ");return t.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",t.displayName)),ie}while(1<=o&&0<=d);break}}}finally{Ve=!1,Error.prepareStackTrace=i}return(i=t?t.displayName||t.name:"")?Ne(i):""}function He(t,n){switch(t.tag){case 26:case 27:case 5:return Ne(t.type);case 16:return Ne("Lazy");case 13:return t.child!==n&&n!==null?Ne("Suspense Fallback"):Ne("Suspense");case 19:return Ne("SuspenseList");case 0:case 15:return et(t.type,!1);case 11:return et(t.type.render,!1);case 1:return et(t.type,!0);case 31:return Ne("Activity");default:return""}}function Ke(t){try{var n="",i=null;do n+=He(t,i),i=t,t=t.return;while(t);return n}catch(o){return`
7
+ Error generating stack: `+o.message+`
8
+ `+o.stack}}var gt=Object.prototype.hasOwnProperty,pt=e.unstable_scheduleCallback,_t=e.unstable_cancelCallback,Zt=e.unstable_shouldYield,Pt=e.unstable_requestPaint,it=e.unstable_now,wr=e.unstable_getCurrentPriorityLevel,ae=e.unstable_ImmediatePriority,me=e.unstable_UserBlockingPriority,Re=e.unstable_NormalPriority,De=e.unstable_LowPriority,Pe=e.unstable_IdlePriority,$t=e.log,sn=e.unstable_setDisableYieldValue,Nt=null,mt=null;function zt(t){if(typeof $t=="function"&&sn(t),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(Nt,t)}catch{}}var Qe=Math.clz32?Math.clz32:Ka,Sn=Math.log,un=Math.LN2;function Ka(t){return t>>>=0,t===0?32:31-(Sn(t)/un|0)|0}var tl=256,kn=262144,Tl=4194304;function Hn(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 Kn(t,n,i){var o=t.pendingLanes;if(o===0)return 0;var d=0,m=t.suspendedLanes,S=t.pingedLanes;t=t.warmLanes;var _=o&134217727;return _!==0?(o=_&~m,o!==0?d=Hn(o):(S&=_,S!==0?d=Hn(S):i||(i=_&~t,i!==0&&(d=Hn(i))))):(_=o&~m,_!==0?d=Hn(_):S!==0?d=Hn(S):i||(i=o&~t,i!==0&&(d=Hn(i)))),d===0?0:n!==0&&n!==d&&(n&m)===0&&(m=d&-d,i=n&-n,m>=i||m===32&&(i&4194048)!==0)?n:d}function nl(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function gu(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 Ja(){var t=Tl;return Tl<<=1,(Tl&62914560)===0&&(Tl=4194304),t}function ji(t){for(var n=[],i=0;31>i;i++)n.push(t);return n}function zn(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Wa(t,n,i,o,d,m){var S=t.pendingLanes;t.pendingLanes=i,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=i,t.entangledLanes&=i,t.errorRecoveryDisabledLanes&=i,t.shellSuspendCounter=0;var _=t.entanglements,P=t.expirationTimes,ee=t.hiddenUpdates;for(i=S&~i;0<i;){var ie=31-Qe(i),ue=1<<ie;_[ie]=0,P[ie]=-1;var te=ee[ie];if(te!==null)for(ee[ie]=null,ie=0;ie<te.length;ie++){var ne=te[ie];ne!==null&&(ne.lane&=-536870913)}i&=~ue}o!==0&&Ri(t,o,0),m!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=m&~(S&~n))}function Ri(t,n,i){t.pendingLanes|=n,t.suspendedLanes&=~n;var o=31-Qe(n);t.entangledLanes|=n,t.entanglements[o]=t.entanglements[o]|1073741824|i&261930}function eo(t,n){var i=t.entangledLanes|=n;for(t=t.entanglements;i;){var o=31-Qe(i),d=1<<o;d&n|t[o]&n&&(t[o]|=n),i&=~d}}function _i(t,n){var i=n&-n;return i=(i&42)!==0?1:Li(i),(i&(t.suspendedLanes|n))!==0?0:i}function Li(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 Di(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function to(){var t=O.p;return t!==0?t:(t=window.event,t===void 0?32:bb(t.type))}function no(t,n){var i=O.p;try{return O.p=t,n()}finally{O.p=i}}var le=Math.random().toString(36).slice(2),be="__reactFiber$"+le,Ee="__reactProps$"+le,Ce="__reactContainer$"+le,at="__reactEvents$"+le,jl="__reactListeners$"+le,Rl="__reactHandles$"+le,Oh="__reactResources$"+le,Oi="__reactMarker$"+le;function bu(t){delete t[be],delete t[Ee],delete t[at],delete t[jl],delete t[Rl]}function _l(t){var n=t[be];if(n)return n;for(var i=t.parentNode;i;){if(n=i[Ce]||i[be]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(t=tb(t);t!==null;){if(i=t[be])return i;t=tb(t)}return n}t=i,i=t.parentNode}return null}function Ll(t){if(t=t[be]||t[Ce]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function Mi(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(a(33))}function Dl(t){var n=t[Oh];return n||(n=t[Oh]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function jt(t){t[Oi]=!0}var Mh=new Set,zh={};function rl(t,n){Ol(t,n),Ol(t+"Capture",n)}function Ol(t,n){for(zh[t]=n,t=0;t<n.length;t++)Mh.add(n[t])}var iv=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]*$"),Bh={},Fh={};function av(t){return gt.call(Fh,t)?!0:gt.call(Bh,t)?!1:iv.test(t)?Fh[t]=!0:(Bh[t]=!0,!1)}function ro(t,n,i){if(av(n))if(i===null)t.removeAttribute(n);else{switch(typeof i){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,""+i)}}function lo(t,n,i){if(i===null)t.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+i)}}function Jn(t,n,i,o){if(o===null)t.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttributeNS(n,i,""+o)}}function En(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Ih(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ov(t,n,i){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,m=o.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return d.call(this)},set:function(S){i=""+S,m.call(this,S)}}),Object.defineProperty(t,n,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(S){i=""+S},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function yu(t){if(!t._valueTracker){var n=Ih(t)?"checked":"value";t._valueTracker=ov(t,n,""+t[n])}}function Uh(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var i=n.getValue(),o="";return t&&(o=Ih(t)?t.checked?"true":"false":t.value),t=o,t!==i?(n.setValue(t),!0):!1}function io(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 sv=/[\n"\\]/g;function Cn(t){return t.replace(sv,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function xu(t,n,i,o,d,m,S,_){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.type=S:t.removeAttribute("type"),n!=null?S==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+En(n)):t.value!==""+En(n)&&(t.value=""+En(n)):S!=="submit"&&S!=="reset"||t.removeAttribute("value"),n!=null?vu(t,S,En(n)):i!=null?vu(t,S,En(i)):o!=null&&t.removeAttribute("value"),d==null&&m!=null&&(t.defaultChecked=!!m),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+En(_):t.removeAttribute("name")}function Hh(t,n,i,o,d,m,S,_){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),n!=null||i!=null){if(!(m!=="submit"&&m!=="reset"||n!=null)){yu(t);return}i=i!=null?""+En(i):"",n=n!=null?""+En(n):i,_||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,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(t.name=S),yu(t)}function vu(t,n,i){n==="number"&&io(t.ownerDocument)===t||t.defaultValue===""+i||(t.defaultValue=""+i)}function Ml(t,n,i,o){if(t=t.options,n){n={};for(var d=0;d<i.length;d++)n["$"+i[d]]=!0;for(i=0;i<t.length;i++)d=n.hasOwnProperty("$"+t[i].value),t[i].selected!==d&&(t[i].selected=d),d&&o&&(t[i].defaultSelected=!0)}else{for(i=""+En(i),n=null,d=0;d<t.length;d++){if(t[d].value===i){t[d].selected=!0,o&&(t[d].defaultSelected=!0);return}n!==null||t[d].disabled||(n=t[d])}n!==null&&(n.selected=!0)}}function qh(t,n,i){if(n!=null&&(n=""+En(n),n!==t.value&&(t.value=n),i==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=i!=null?""+En(i):""}function Ph(t,n,i,o){if(n==null){if(o!=null){if(i!=null)throw Error(a(92));if(X(o)){if(1<o.length)throw Error(a(93));o=o[0]}i=o}i==null&&(i=""),n=i}i=En(n),t.defaultValue=i,o=t.textContent,o===i&&o!==""&&o!==null&&(t.value=o),yu(t)}function zl(t,n){if(n){var i=t.firstChild;if(i&&i===t.lastChild&&i.nodeType===3){i.nodeValue=n;return}}t.textContent=n}var uv=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 $h(t,n,i){var o=n.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?o?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":o?t.setProperty(n,i):typeof i!="number"||i===0||uv.has(n)?n==="float"?t.cssFloat=i:t[n]=(""+i).trim():t[n]=i+"px"}function Vh(t,n,i){if(n!=null&&typeof n!="object")throw Error(a(62));if(t=t.style,i!=null){for(var o in i)!i.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)&&i[d]!==o&&$h(t,d,o)}else for(var m in n)n.hasOwnProperty(m)&&$h(t,m,n[m])}function wu(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 cv=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"]]),fv=/^[\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 ao(t){return fv.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Wn(){}var Su=null;function ku(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Bl=null,Fl=null;function Gh(t){var n=Ll(t);if(n&&(t=n.stateNode)){var i=t[Ee]||null;e:switch(t=n.stateNode,n.type){case"input":if(xu(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),n=i.name,i.type==="radio"&&n!=null){for(i=t;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Cn(""+n)+'"][type="radio"]'),n=0;n<i.length;n++){var o=i[n];if(o!==t&&o.form===t.form){var d=o[Ee]||null;if(!d)throw Error(a(90));xu(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<i.length;n++)o=i[n],o.form===t.form&&Uh(o)}break e;case"textarea":qh(t,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&Ml(t,!!i.multiple,n,!1)}}}var Eu=!1;function Yh(t,n,i){if(Eu)return t(n,i);Eu=!0;try{var o=t(n);return o}finally{if(Eu=!1,(Bl!==null||Fl!==null)&&(Xo(),Bl&&(n=Bl,t=Fl,Fl=Bl=null,Gh(n),t)))for(n=0;n<t.length;n++)Gh(t[n])}}function zi(t,n){var i=t.stateNode;if(i===null)return null;var o=i[Ee]||null;if(o===null)return null;i=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(i&&typeof i!="function")throw Error(a(231,n,typeof i));return i}var er=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cu=!1;if(er)try{var Bi={};Object.defineProperty(Bi,"passive",{get:function(){Cu=!0}}),window.addEventListener("test",Bi,Bi),window.removeEventListener("test",Bi,Bi)}catch{Cu=!1}var Sr=null,Au=null,oo=null;function Xh(){if(oo)return oo;var t,n=Au,i=n.length,o,d="value"in Sr?Sr.value:Sr.textContent,m=d.length;for(t=0;t<i&&n[t]===d[t];t++);var S=i-t;for(o=1;o<=S&&n[i-o]===d[m-o];o++);return oo=d.slice(t,1<o?1-o:void 0)}function so(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 uo(){return!0}function Zh(){return!1}function Qt(t){function n(i,o,d,m,S){this._reactName=i,this._targetInst=d,this.type=o,this.nativeEvent=m,this.target=S,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(i=t[_],this[_]=i?i(m):m[_]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?uo:Zh,this.isPropagationStopped=Zh,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=uo)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=uo)},persist:function(){},isPersistent:uo}),n}var ll={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},co=Qt(ll),Fi=g({},ll,{view:0,detail:0}),dv=Qt(Fi),Nu,Tu,Ii,fo=g({},Fi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ru,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!==Ii&&(Ii&&t.type==="mousemove"?(Nu=t.screenX-Ii.screenX,Tu=t.screenY-Ii.screenY):Tu=Nu=0,Ii=t),Nu)},movementY:function(t){return"movementY"in t?t.movementY:Tu}}),Qh=Qt(fo),hv=g({},fo,{dataTransfer:0}),pv=Qt(hv),mv=g({},Fi,{relatedTarget:0}),ju=Qt(mv),gv=g({},ll,{animationName:0,elapsedTime:0,pseudoElement:0}),bv=Qt(gv),yv=g({},ll,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),xv=Qt(yv),vv=g({},ll,{data:0}),Kh=Qt(vv),wv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sv={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"},kv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ev(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=kv[t])?!!n[t]:!1}function Ru(){return Ev}var Cv=g({},Fi,{key:function(t){if(t.key){var n=wv[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=so(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Sv[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ru,charCode:function(t){return t.type==="keypress"?so(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?so(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Av=Qt(Cv),Nv=g({},fo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jh=Qt(Nv),Tv=g({},Fi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ru}),jv=Qt(Tv),Rv=g({},ll,{propertyName:0,elapsedTime:0,pseudoElement:0}),_v=Qt(Rv),Lv=g({},fo,{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}),Dv=Qt(Lv),Ov=g({},ll,{newState:0,oldState:0}),Mv=Qt(Ov),zv=[9,13,27,32],_u=er&&"CompositionEvent"in window,Ui=null;er&&"documentMode"in document&&(Ui=document.documentMode);var Bv=er&&"TextEvent"in window&&!Ui,Wh=er&&(!_u||Ui&&8<Ui&&11>=Ui),ep=" ",tp=!1;function np(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 rp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Il=!1;function Fv(t,n){switch(t){case"compositionend":return rp(n);case"keypress":return n.which!==32?null:(tp=!0,ep);case"textInput":return t=n.data,t===ep&&tp?null:t;default:return null}}function Iv(t,n){if(Il)return t==="compositionend"||!_u&&np(t,n)?(t=Xh(),oo=Au=Sr=null,Il=!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 Wh&&n.locale!=="ko"?null:n.data;default:return null}}var Uv={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 lp(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!Uv[t.type]:n==="textarea"}function ip(t,n,i,o){Bl?Fl?Fl.push(o):Fl=[o]:Bl=o,n=ts(n,"onChange"),0<n.length&&(i=new co("onChange","change",null,i,o),t.push({event:i,listeners:n}))}var Hi=null,qi=null;function Hv(t){Hg(t,0)}function ho(t){var n=Mi(t);if(Uh(n))return t}function ap(t,n){if(t==="change")return n}var op=!1;if(er){var Lu;if(er){var Du="oninput"in document;if(!Du){var sp=document.createElement("div");sp.setAttribute("oninput","return;"),Du=typeof sp.oninput=="function"}Lu=Du}else Lu=!1;op=Lu&&(!document.documentMode||9<document.documentMode)}function up(){Hi&&(Hi.detachEvent("onpropertychange",cp),qi=Hi=null)}function cp(t){if(t.propertyName==="value"&&ho(qi)){var n=[];ip(n,qi,t,ku(t)),Yh(Hv,n)}}function qv(t,n,i){t==="focusin"?(up(),Hi=n,qi=i,Hi.attachEvent("onpropertychange",cp)):t==="focusout"&&up()}function Pv(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ho(qi)}function $v(t,n){if(t==="click")return ho(n)}function Vv(t,n){if(t==="input"||t==="change")return ho(n)}function Gv(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var cn=typeof Object.is=="function"?Object.is:Gv;function Pi(t,n){if(cn(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var i=Object.keys(t),o=Object.keys(n);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var d=i[o];if(!gt.call(n,d)||!cn(t[d],n[d]))return!1}return!0}function fp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function dp(t,n){var i=fp(t);t=0;for(var o;i;){if(i.nodeType===3){if(o=t+i.textContent.length,t<=n&&o>=n)return{node:i,offset:n-t};t=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=fp(i)}}function hp(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?hp(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function pp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=io(t.document);n instanceof t.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)t=n.contentWindow;else break;n=io(t.document)}return n}function Ou(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 Yv=er&&"documentMode"in document&&11>=document.documentMode,Ul=null,Mu=null,$i=null,zu=!1;function mp(t,n,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;zu||Ul==null||Ul!==io(o)||(o=Ul,"selectionStart"in o&&Ou(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}),$i&&Pi($i,o)||($i=o,o=ts(Mu,"onSelect"),0<o.length&&(n=new co("onSelect","select",null,n,i),t.push({event:n,listeners:o}),n.target=Ul)))}function il(t,n){var i={};return i[t.toLowerCase()]=n.toLowerCase(),i["Webkit"+t]="webkit"+n,i["Moz"+t]="moz"+n,i}var Hl={animationend:il("Animation","AnimationEnd"),animationiteration:il("Animation","AnimationIteration"),animationstart:il("Animation","AnimationStart"),transitionrun:il("Transition","TransitionRun"),transitionstart:il("Transition","TransitionStart"),transitioncancel:il("Transition","TransitionCancel"),transitionend:il("Transition","TransitionEnd")},Bu={},gp={};er&&(gp=document.createElement("div").style,"AnimationEvent"in window||(delete Hl.animationend.animation,delete Hl.animationiteration.animation,delete Hl.animationstart.animation),"TransitionEvent"in window||delete Hl.transitionend.transition);function al(t){if(Bu[t])return Bu[t];if(!Hl[t])return t;var n=Hl[t],i;for(i in n)if(n.hasOwnProperty(i)&&i in gp)return Bu[t]=n[i];return t}var bp=al("animationend"),yp=al("animationiteration"),xp=al("animationstart"),Xv=al("transitionrun"),Zv=al("transitionstart"),Qv=al("transitioncancel"),vp=al("transitionend"),wp=new Map,Fu="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(" ");Fu.push("scrollEnd");function Bn(t,n){wp.set(t,n),rl(n,[t])}var po=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)},An=[],ql=0,Iu=0;function mo(){for(var t=ql,n=Iu=ql=0;n<t;){var i=An[n];An[n++]=null;var o=An[n];An[n++]=null;var d=An[n];An[n++]=null;var m=An[n];if(An[n++]=null,o!==null&&d!==null){var S=o.pending;S===null?d.next=d:(d.next=S.next,S.next=d),o.pending=d}m!==0&&Sp(i,d,m)}}function go(t,n,i,o){An[ql++]=t,An[ql++]=n,An[ql++]=i,An[ql++]=o,Iu|=o,t.lanes|=o,t=t.alternate,t!==null&&(t.lanes|=o)}function Uu(t,n,i,o){return go(t,n,i,o),bo(t)}function ol(t,n){return go(t,null,null,n),bo(t)}function Sp(t,n,i){t.lanes|=i;var o=t.alternate;o!==null&&(o.lanes|=i);for(var d=!1,m=t.return;m!==null;)m.childLanes|=i,o=m.alternate,o!==null&&(o.childLanes|=i),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(d=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,d&&n!==null&&(d=31-Qe(i),t=m.hiddenUpdates,o=t[d],o===null?t[d]=[n]:o.push(n),n.lane=i|536870912),m):null}function bo(t){if(50<da)throw da=0,Zc=null,Error(a(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var Pl={};function Kv(t,n,i,o){this.tag=t,this.key=i,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 fn(t,n,i,o){return new Kv(t,n,i,o)}function Hu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function tr(t,n){var i=t.alternate;return i===null?(i=fn(t.tag,n,t.key,t.mode),i.elementType=t.elementType,i.type=t.type,i.stateNode=t.stateNode,i.alternate=t,t.alternate=i):(i.pendingProps=n,i.type=t.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=t.flags&65011712,i.childLanes=t.childLanes,i.lanes=t.lanes,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,n=t.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=t.sibling,i.index=t.index,i.ref=t.ref,i.refCleanup=t.refCleanup,i}function kp(t,n){t.flags&=65011714;var i=t.alternate;return i===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=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,t.type=i.type,n=i.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function yo(t,n,i,o,d,m){var S=0;if(o=t,typeof t=="function")Hu(t)&&(S=1);else if(typeof t=="string")S=n2(t,i,re.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case G:return t=fn(31,i,n,d),t.elementType=G,t.lanes=m,t;case k:return sl(i.children,d,m,n);case A:S=8,d|=24;break;case E:return t=fn(12,i,n,d|2),t.elementType=E,t.lanes=m,t;case q:return t=fn(13,i,n,d),t.elementType=q,t.lanes=m,t;case D:return t=fn(19,i,n,d),t.elementType=D,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case T:S=10;break e;case C:S=9;break e;case B:S=11;break e;case U:S=14;break e;case V:S=16,o=null;break e}S=29,i=Error(a(130,t===null?"null":typeof t,"")),o=null}return n=fn(S,i,n,d),n.elementType=t,n.type=o,n.lanes=m,n}function sl(t,n,i,o){return t=fn(7,t,o,n),t.lanes=i,t}function qu(t,n,i){return t=fn(6,t,null,n),t.lanes=i,t}function Ep(t){var n=fn(18,null,null,0);return n.stateNode=t,n}function Pu(t,n,i){return n=fn(4,t.children!==null?t.children:[],t.key,n),n.lanes=i,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var Cp=new WeakMap;function Nn(t,n){if(typeof t=="object"&&t!==null){var i=Cp.get(t);return i!==void 0?i:(n={value:t,source:n,stack:Ke(n)},Cp.set(t,n),n)}return{value:t,source:n,stack:Ke(n)}}var $l=[],Vl=0,xo=null,Vi=0,Tn=[],jn=0,kr=null,qn=1,Pn="";function nr(t,n){$l[Vl++]=Vi,$l[Vl++]=xo,xo=t,Vi=n}function Ap(t,n,i){Tn[jn++]=qn,Tn[jn++]=Pn,Tn[jn++]=kr,kr=t;var o=qn;t=Pn;var d=32-Qe(o)-1;o&=~(1<<d),i+=1;var m=32-Qe(n)+d;if(30<m){var S=d-d%5;m=(o&(1<<S)-1).toString(32),o>>=S,d-=S,qn=1<<32-Qe(n)+d|i<<d|o,Pn=m+t}else qn=1<<m|i<<d|o,Pn=t}function $u(t){t.return!==null&&(nr(t,1),Ap(t,1,0))}function Vu(t){for(;t===xo;)xo=$l[--Vl],$l[Vl]=null,Vi=$l[--Vl],$l[Vl]=null;for(;t===kr;)kr=Tn[--jn],Tn[jn]=null,Pn=Tn[--jn],Tn[jn]=null,qn=Tn[--jn],Tn[jn]=null}function Np(t,n){Tn[jn++]=qn,Tn[jn++]=Pn,Tn[jn++]=kr,qn=n.id,Pn=n.overflow,kr=t}var Lt=null,ft=null,qe=!1,Er=null,Rn=!1,Gu=Error(a(519));function Cr(t){var n=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gi(Nn(n,t)),Gu}function Tp(t){var n=t.stateNode,i=t.type,o=t.memoizedProps;switch(n[be]=t,n[Ee]=o,i){case"dialog":Be("cancel",n),Be("close",n);break;case"iframe":case"object":case"embed":Be("load",n);break;case"video":case"audio":for(i=0;i<pa.length;i++)Be(pa[i],n);break;case"source":Be("error",n);break;case"img":case"image":case"link":Be("error",n),Be("load",n);break;case"details":Be("toggle",n);break;case"input":Be("invalid",n),Hh(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Be("invalid",n);break;case"textarea":Be("invalid",n),Ph(n,o.value,o.defaultValue,o.children)}i=o.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||n.textContent===""+i||o.suppressHydrationWarning===!0||Vg(n.textContent,i)?(o.popover!=null&&(Be("beforetoggle",n),Be("toggle",n)),o.onScroll!=null&&Be("scroll",n),o.onScrollEnd!=null&&Be("scrollend",n),o.onClick!=null&&(n.onclick=Wn),n=!0):n=!1,n||Cr(t,!0)}function jp(t){for(Lt=t.return;Lt;)switch(Lt.tag){case 5:case 31:case 13:Rn=!1;return;case 27:case 3:Rn=!0;return;default:Lt=Lt.return}}function Gl(t){if(t!==Lt)return!1;if(!qe)return jp(t),qe=!0,!1;var n=t.tag,i;if((i=n!==3&&n!==27)&&((i=n===5)&&(i=t.type,i=!(i!=="form"&&i!=="button")||ff(t.type,t.memoizedProps)),i=!i),i&&ft&&Cr(t),jp(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));ft=eb(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));ft=eb(t)}else n===27?(n=ft,Ir(t.type)?(t=gf,gf=null,ft=t):ft=n):ft=Lt?Ln(t.stateNode.nextSibling):null;return!0}function ul(){ft=Lt=null,qe=!1}function Yu(){var t=Er;return t!==null&&(en===null?en=t:en.push.apply(en,t),Er=null),t}function Gi(t){Er===null?Er=[t]:Er.push(t)}var Xu=L(null),cl=null,rr=null;function Ar(t,n,i){N(Xu,n._currentValue),n._currentValue=i}function lr(t){t._currentValue=Xu.current,H(Xu)}function Zu(t,n,i){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===i)break;t=t.return}}function Qu(t,n,i,o){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var m=d.dependencies;if(m!==null){var S=d.child;m=m.firstContext;e:for(;m!==null;){var _=m;m=d;for(var P=0;P<n.length;P++)if(_.context===n[P]){m.lanes|=i,_=m.alternate,_!==null&&(_.lanes|=i),Zu(m.return,i,t),o||(S=null);break e}m=_.next}}else if(d.tag===18){if(S=d.return,S===null)throw Error(a(341));S.lanes|=i,m=S.alternate,m!==null&&(m.lanes|=i),Zu(S,i,t),S=null}else S=d.child;if(S!==null)S.return=d;else for(S=d;S!==null;){if(S===t){S=null;break}if(d=S.sibling,d!==null){d.return=S.return,S=d;break}S=S.return}d=S}}function Yl(t,n,i,o){t=null;for(var d=n,m=!1;d!==null;){if(!m){if((d.flags&524288)!==0)m=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var S=d.alternate;if(S===null)throw Error(a(387));if(S=S.memoizedProps,S!==null){var _=d.type;cn(d.pendingProps.value,S.value)||(t!==null?t.push(_):t=[_])}}else if(d===pe.current){if(S=d.alternate,S===null)throw Error(a(387));S.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(xa):t=[xa])}d=d.return}t!==null&&Qu(n,t,i,o),n.flags|=262144}function vo(t){for(t=t.firstContext;t!==null;){if(!cn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function fl(t){cl=t,rr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Dt(t){return Rp(cl,t)}function wo(t,n){return cl===null&&fl(t),Rp(t,n)}function Rp(t,n){var i=n._currentValue;if(n={context:n,memoizedValue:i,next:null},rr===null){if(t===null)throw Error(a(308));rr=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else rr=rr.next=n;return i}var Jv=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(i,o){t.push(o)}};this.abort=function(){n.aborted=!0,t.forEach(function(i){return i()})}},Wv=e.unstable_scheduleCallback,ew=e.unstable_NormalPriority,wt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ku(){return{controller:new Jv,data:new Map,refCount:0}}function Yi(t){t.refCount--,t.refCount===0&&Wv(ew,function(){t.controller.abort()})}var Xi=null,Ju=0,Xl=0,Zl=null;function tw(t,n){if(Xi===null){var i=Xi=[];Ju=0,Xl=tf(),Zl={status:"pending",value:void 0,then:function(o){i.push(o)}}}return Ju++,n.then(_p,_p),n}function _p(){if(--Ju===0&&Xi!==null){Zl!==null&&(Zl.status="fulfilled");var t=Xi;Xi=null,Xl=0,Zl=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function nw(t,n){var i=[],o={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return t.then(function(){o.status="fulfilled",o.value=n;for(var d=0;d<i.length;d++)(0,i[d])(n)},function(d){for(o.status="rejected",o.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),o}var Lp=F.S;F.S=function(t,n){mg=it(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&tw(t,n),Lp!==null&&Lp(t,n)};var dl=L(null);function Wu(){var t=dl.current;return t!==null?t:ot.pooledCache}function So(t,n){n===null?N(dl,dl.current):N(dl,n.pool)}function Dp(){var t=Wu();return t===null?null:{parent:wt._currentValue,pool:t}}var Ql=Error(a(460)),ec=Error(a(474)),ko=Error(a(542)),Eo={then:function(){}};function Op(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Mp(t,n,i){switch(i=t[i],i===void 0?t.push(n):i!==n&&(n.then(Wn,Wn),n=i),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,Bp(t),t;default:if(typeof n.status=="string")n.then(Wn,Wn);else{if(t=ot,t!==null&&100<t.shellSuspendCounter)throw Error(a(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,Bp(t),t}throw pl=n,Ql}}function hl(t){try{var n=t._init;return n(t._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(pl=i,Ql):i}}var pl=null;function zp(){if(pl===null)throw Error(a(459));var t=pl;return pl=null,t}function Bp(t){if(t===Ql||t===ko)throw Error(a(483))}var Kl=null,Zi=0;function Co(t){var n=Zi;return Zi+=1,Kl===null&&(Kl=[]),Mp(Kl,t,n)}function Qi(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function Ao(t,n){throw n.$$typeof===v?Error(a(525)):(t=Object.prototype.toString.call(n),Error(a(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function Fp(t){function n(K,Z){if(t){var W=K.deletions;W===null?(K.deletions=[Z],K.flags|=16):W.push(Z)}}function i(K,Z){if(!t)return null;for(;Z!==null;)n(K,Z),Z=Z.sibling;return null}function o(K){for(var Z=new Map;K!==null;)K.key!==null?Z.set(K.key,K):Z.set(K.index,K),K=K.sibling;return Z}function d(K,Z){return K=tr(K,Z),K.index=0,K.sibling=null,K}function m(K,Z,W){return K.index=W,t?(W=K.alternate,W!==null?(W=W.index,W<Z?(K.flags|=67108866,Z):W):(K.flags|=67108866,Z)):(K.flags|=1048576,Z)}function S(K){return t&&K.alternate===null&&(K.flags|=67108866),K}function _(K,Z,W,oe){return Z===null||Z.tag!==6?(Z=qu(W,K.mode,oe),Z.return=K,Z):(Z=d(Z,W),Z.return=K,Z)}function P(K,Z,W,oe){var Ae=W.type;return Ae===k?ie(K,Z,W.props.children,oe,W.key):Z!==null&&(Z.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===V&&hl(Ae)===Z.type)?(Z=d(Z,W.props),Qi(Z,W),Z.return=K,Z):(Z=yo(W.type,W.key,W.props,null,K.mode,oe),Qi(Z,W),Z.return=K,Z)}function ee(K,Z,W,oe){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==W.containerInfo||Z.stateNode.implementation!==W.implementation?(Z=Pu(W,K.mode,oe),Z.return=K,Z):(Z=d(Z,W.children||[]),Z.return=K,Z)}function ie(K,Z,W,oe,Ae){return Z===null||Z.tag!==7?(Z=sl(W,K.mode,oe,Ae),Z.return=K,Z):(Z=d(Z,W),Z.return=K,Z)}function ue(K,Z,W){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=qu(""+Z,K.mode,W),Z.return=K,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case x:return W=yo(Z.type,Z.key,Z.props,null,K.mode,W),Qi(W,Z),W.return=K,W;case w:return Z=Pu(Z,K.mode,W),Z.return=K,Z;case V:return Z=hl(Z),ue(K,Z,W)}if(X(Z)||Y(Z))return Z=sl(Z,K.mode,W,null),Z.return=K,Z;if(typeof Z.then=="function")return ue(K,Co(Z),W);if(Z.$$typeof===T)return ue(K,wo(K,Z),W);Ao(K,Z)}return null}function te(K,Z,W,oe){var Ae=Z!==null?Z.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Ae!==null?null:_(K,Z,""+W,oe);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case x:return W.key===Ae?P(K,Z,W,oe):null;case w:return W.key===Ae?ee(K,Z,W,oe):null;case V:return W=hl(W),te(K,Z,W,oe)}if(X(W)||Y(W))return Ae!==null?null:ie(K,Z,W,oe,null);if(typeof W.then=="function")return te(K,Z,Co(W),oe);if(W.$$typeof===T)return te(K,Z,wo(K,W),oe);Ao(K,W)}return null}function ne(K,Z,W,oe,Ae){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return K=K.get(W)||null,_(Z,K,""+oe,Ae);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case x:return K=K.get(oe.key===null?W:oe.key)||null,P(Z,K,oe,Ae);case w:return K=K.get(oe.key===null?W:oe.key)||null,ee(Z,K,oe,Ae);case V:return oe=hl(oe),ne(K,Z,W,oe,Ae)}if(X(oe)||Y(oe))return K=K.get(W)||null,ie(Z,K,oe,Ae,null);if(typeof oe.then=="function")return ne(K,Z,W,Co(oe),Ae);if(oe.$$typeof===T)return ne(K,Z,W,wo(Z,oe),Ae);Ao(Z,oe)}return null}function we(K,Z,W,oe){for(var Ae=null,Ye=null,Se=Z,Oe=Z=0,Ue=null;Se!==null&&Oe<W.length;Oe++){Se.index>Oe?(Ue=Se,Se=null):Ue=Se.sibling;var Xe=te(K,Se,W[Oe],oe);if(Xe===null){Se===null&&(Se=Ue);break}t&&Se&&Xe.alternate===null&&n(K,Se),Z=m(Xe,Z,Oe),Ye===null?Ae=Xe:Ye.sibling=Xe,Ye=Xe,Se=Ue}if(Oe===W.length)return i(K,Se),qe&&nr(K,Oe),Ae;if(Se===null){for(;Oe<W.length;Oe++)Se=ue(K,W[Oe],oe),Se!==null&&(Z=m(Se,Z,Oe),Ye===null?Ae=Se:Ye.sibling=Se,Ye=Se);return qe&&nr(K,Oe),Ae}for(Se=o(Se);Oe<W.length;Oe++)Ue=ne(Se,K,Oe,W[Oe],oe),Ue!==null&&(t&&Ue.alternate!==null&&Se.delete(Ue.key===null?Oe:Ue.key),Z=m(Ue,Z,Oe),Ye===null?Ae=Ue:Ye.sibling=Ue,Ye=Ue);return t&&Se.forEach(function($r){return n(K,$r)}),qe&&nr(K,Oe),Ae}function je(K,Z,W,oe){if(W==null)throw Error(a(151));for(var Ae=null,Ye=null,Se=Z,Oe=Z=0,Ue=null,Xe=W.next();Se!==null&&!Xe.done;Oe++,Xe=W.next()){Se.index>Oe?(Ue=Se,Se=null):Ue=Se.sibling;var $r=te(K,Se,Xe.value,oe);if($r===null){Se===null&&(Se=Ue);break}t&&Se&&$r.alternate===null&&n(K,Se),Z=m($r,Z,Oe),Ye===null?Ae=$r:Ye.sibling=$r,Ye=$r,Se=Ue}if(Xe.done)return i(K,Se),qe&&nr(K,Oe),Ae;if(Se===null){for(;!Xe.done;Oe++,Xe=W.next())Xe=ue(K,Xe.value,oe),Xe!==null&&(Z=m(Xe,Z,Oe),Ye===null?Ae=Xe:Ye.sibling=Xe,Ye=Xe);return qe&&nr(K,Oe),Ae}for(Se=o(Se);!Xe.done;Oe++,Xe=W.next())Xe=ne(Se,K,Oe,Xe.value,oe),Xe!==null&&(t&&Xe.alternate!==null&&Se.delete(Xe.key===null?Oe:Xe.key),Z=m(Xe,Z,Oe),Ye===null?Ae=Xe:Ye.sibling=Xe,Ye=Xe);return t&&Se.forEach(function(h2){return n(K,h2)}),qe&&nr(K,Oe),Ae}function rt(K,Z,W,oe){if(typeof W=="object"&&W!==null&&W.type===k&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case x:e:{for(var Ae=W.key;Z!==null;){if(Z.key===Ae){if(Ae=W.type,Ae===k){if(Z.tag===7){i(K,Z.sibling),oe=d(Z,W.props.children),oe.return=K,K=oe;break e}}else if(Z.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===V&&hl(Ae)===Z.type){i(K,Z.sibling),oe=d(Z,W.props),Qi(oe,W),oe.return=K,K=oe;break e}i(K,Z);break}else n(K,Z);Z=Z.sibling}W.type===k?(oe=sl(W.props.children,K.mode,oe,W.key),oe.return=K,K=oe):(oe=yo(W.type,W.key,W.props,null,K.mode,oe),Qi(oe,W),oe.return=K,K=oe)}return S(K);case w:e:{for(Ae=W.key;Z!==null;){if(Z.key===Ae)if(Z.tag===4&&Z.stateNode.containerInfo===W.containerInfo&&Z.stateNode.implementation===W.implementation){i(K,Z.sibling),oe=d(Z,W.children||[]),oe.return=K,K=oe;break e}else{i(K,Z);break}else n(K,Z);Z=Z.sibling}oe=Pu(W,K.mode,oe),oe.return=K,K=oe}return S(K);case V:return W=hl(W),rt(K,Z,W,oe)}if(X(W))return we(K,Z,W,oe);if(Y(W)){if(Ae=Y(W),typeof Ae!="function")throw Error(a(150));return W=Ae.call(W),je(K,Z,W,oe)}if(typeof W.then=="function")return rt(K,Z,Co(W),oe);if(W.$$typeof===T)return rt(K,Z,wo(K,W),oe);Ao(K,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,Z!==null&&Z.tag===6?(i(K,Z.sibling),oe=d(Z,W),oe.return=K,K=oe):(i(K,Z),oe=qu(W,K.mode,oe),oe.return=K,K=oe),S(K)):i(K,Z)}return function(K,Z,W,oe){try{Zi=0;var Ae=rt(K,Z,W,oe);return Kl=null,Ae}catch(Se){if(Se===Ql||Se===ko)throw Se;var Ye=fn(29,Se,null,K.mode);return Ye.lanes=oe,Ye.return=K,Ye}}}var ml=Fp(!0),Ip=Fp(!1),Nr=!1;function tc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nc(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 Tr(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function jr(t,n,i){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(Ze&2)!==0){var d=o.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),o.pending=n,n=bo(t),Sp(t,null,i),n}return go(t,o,n,i),bo(t)}function Ki(t,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194048)!==0)){var o=n.lanes;o&=t.pendingLanes,i|=o,n.lanes=i,eo(t,i)}}function rc(t,n){var i=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var d=null,m=null;if(i=i.firstBaseUpdate,i!==null){do{var S={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};m===null?d=m=S:m=m.next=S,i=i.next}while(i!==null);m===null?d=m=n:m=m.next=n}else d=m=n;i={baseState:o.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:o.shared,callbacks:o.callbacks},t.updateQueue=i;return}t=i.lastBaseUpdate,t===null?i.firstBaseUpdate=n:t.next=n,i.lastBaseUpdate=n}var lc=!1;function Ji(){if(lc){var t=Zl;if(t!==null)throw t}}function Wi(t,n,i,o){lc=!1;var d=t.updateQueue;Nr=!1;var m=d.firstBaseUpdate,S=d.lastBaseUpdate,_=d.shared.pending;if(_!==null){d.shared.pending=null;var P=_,ee=P.next;P.next=null,S===null?m=ee:S.next=ee,S=P;var ie=t.alternate;ie!==null&&(ie=ie.updateQueue,_=ie.lastBaseUpdate,_!==S&&(_===null?ie.firstBaseUpdate=ee:_.next=ee,ie.lastBaseUpdate=P))}if(m!==null){var ue=d.baseState;S=0,ie=ee=P=null,_=m;do{var te=_.lane&-536870913,ne=te!==_.lane;if(ne?(Ie&te)===te:(o&te)===te){te!==0&&te===Xl&&(lc=!0),ie!==null&&(ie=ie.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var we=t,je=_;te=n;var rt=i;switch(je.tag){case 1:if(we=je.payload,typeof we=="function"){ue=we.call(rt,ue,te);break e}ue=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=je.payload,te=typeof we=="function"?we.call(rt,ue,te):we,te==null)break e;ue=g({},ue,te);break e;case 2:Nr=!0}}te=_.callback,te!==null&&(t.flags|=64,ne&&(t.flags|=8192),ne=d.callbacks,ne===null?d.callbacks=[te]:ne.push(te))}else ne={lane:te,tag:_.tag,payload:_.payload,callback:_.callback,next:null},ie===null?(ee=ie=ne,P=ue):ie=ie.next=ne,S|=te;if(_=_.next,_===null){if(_=d.shared.pending,_===null)break;ne=_,_=ne.next,ne.next=null,d.lastBaseUpdate=ne,d.shared.pending=null}}while(!0);ie===null&&(P=ue),d.baseState=P,d.firstBaseUpdate=ee,d.lastBaseUpdate=ie,m===null&&(d.shared.lanes=0),Or|=S,t.lanes=S,t.memoizedState=ue}}function Up(t,n){if(typeof t!="function")throw Error(a(191,t));t.call(n)}function Hp(t,n){var i=t.callbacks;if(i!==null)for(t.callbacks=null,t=0;t<i.length;t++)Up(i[t],n)}var Jl=L(null),No=L(0);function qp(t,n){t=hr,N(No,t),N(Jl,n),hr=t|n.baseLanes}function ic(){N(No,hr),N(Jl,Jl.current)}function ac(){hr=No.current,H(Jl),H(No)}var dn=L(null),_n=null;function Rr(t){var n=t.alternate;N(xt,xt.current&1),N(dn,t),_n===null&&(n===null||Jl.current!==null||n.memoizedState!==null)&&(_n=t)}function oc(t){N(xt,xt.current),N(dn,t),_n===null&&(_n=t)}function Pp(t){t.tag===22?(N(xt,xt.current),N(dn,t),_n===null&&(_n=t)):_r()}function _r(){N(xt,xt.current),N(dn,dn.current)}function hn(t){H(dn),_n===t&&(_n=null),H(xt)}var xt=L(0);function To(t){for(var n=t;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||pf(i)||mf(i)))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 ir=0,Le=null,tt=null,St=null,jo=!1,Wl=!1,gl=!1,Ro=0,ea=0,ei=null,rw=0;function bt(){throw Error(a(321))}function sc(t,n){if(n===null)return!1;for(var i=0;i<n.length&&i<t.length;i++)if(!cn(t[i],n[i]))return!1;return!0}function uc(t,n,i,o,d,m){return ir=m,Le=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,F.H=t===null||t.memoizedState===null?Am:Ec,gl=!1,m=i(o,d),gl=!1,Wl&&(m=Vp(n,i,o,d)),$p(t),m}function $p(t){F.H=ra;var n=tt!==null&&tt.next!==null;if(ir=0,St=tt=Le=null,jo=!1,ea=0,ei=null,n)throw Error(a(300));t===null||kt||(t=t.dependencies,t!==null&&vo(t)&&(kt=!0))}function Vp(t,n,i,o){Le=t;var d=0;do{if(Wl&&(ei=null),ea=0,Wl=!1,25<=d)throw Error(a(301));if(d+=1,St=tt=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}F.H=Nm,m=n(i,o)}while(Wl);return m}function lw(){var t=F.H,n=t.useState()[0];return n=typeof n.then=="function"?ta(n):n,t=t.useState()[0],(tt!==null?tt.memoizedState:null)!==t&&(Le.flags|=1024),n}function cc(){var t=Ro!==0;return Ro=0,t}function fc(t,n,i){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~i}function dc(t){if(jo){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}jo=!1}ir=0,St=tt=Le=null,Wl=!1,ea=Ro=0,ei=null}function Vt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?Le.memoizedState=St=t:St=St.next=t,St}function vt(){if(tt===null){var t=Le.alternate;t=t!==null?t.memoizedState:null}else t=tt.next;var n=St===null?Le.memoizedState:St.next;if(n!==null)St=n,tt=t;else{if(t===null)throw Le.alternate===null?Error(a(467)):Error(a(310));tt=t,t={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},St===null?Le.memoizedState=St=t:St=St.next=t}return St}function _o(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ta(t){var n=ea;return ea+=1,ei===null&&(ei=[]),t=Mp(ei,t,n),n=Le,(St===null?n.memoizedState:St.next)===null&&(n=n.alternate,F.H=n===null||n.memoizedState===null?Am:Ec),t}function Lo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ta(t);if(t.$$typeof===T)return Dt(t)}throw Error(a(438,String(t)))}function hc(t){var n=null,i=Le.updateQueue;if(i!==null&&(n=i.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}),i===null&&(i=_o(),Le.updateQueue=i),i.memoCache=n,i=n.data[n.index],i===void 0)for(i=n.data[n.index]=Array(t),o=0;o<t;o++)i[o]=M;return n.index++,i}function ar(t,n){return typeof n=="function"?n(t):n}function Do(t){var n=vt();return pc(n,tt,t)}function pc(t,n,i){var o=t.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=i;var d=t.baseQueue,m=o.pending;if(m!==null){if(d!==null){var S=d.next;d.next=m.next,m.next=S}n.baseQueue=d=m,o.pending=null}if(m=t.baseState,d===null)t.memoizedState=m;else{n=d.next;var _=S=null,P=null,ee=n,ie=!1;do{var ue=ee.lane&-536870913;if(ue!==ee.lane?(Ie&ue)===ue:(ir&ue)===ue){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}),ue===Xl&&(ie=!0);else if((ir&te)===te){ee=ee.next,te===Xl&&(ie=!0);continue}else ue={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},P===null?(_=P=ue,S=m):P=P.next=ue,Le.lanes|=te,Or|=te;ue=ee.action,gl&&i(m,ue),m=ee.hasEagerState?ee.eagerState:i(m,ue)}else te={lane:ue,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},P===null?(_=P=te,S=m):P=P.next=te,Le.lanes|=ue,Or|=ue;ee=ee.next}while(ee!==null&&ee!==n);if(P===null?S=m:P.next=_,!cn(m,t.memoizedState)&&(kt=!0,ie&&(i=Zl,i!==null)))throw i;t.memoizedState=m,t.baseState=S,t.baseQueue=P,o.lastRenderedState=m}return d===null&&(o.lanes=0),[t.memoizedState,o.dispatch]}function mc(t){var n=vt(),i=n.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=t;var o=i.dispatch,d=i.pending,m=n.memoizedState;if(d!==null){i.pending=null;var S=d=d.next;do m=t(m,S.action),S=S.next;while(S!==d);cn(m,n.memoizedState)||(kt=!0),n.memoizedState=m,n.baseQueue===null&&(n.baseState=m),i.lastRenderedState=m}return[m,o]}function Gp(t,n,i){var o=Le,d=vt(),m=qe;if(m){if(i===void 0)throw Error(a(407));i=i()}else i=n();var S=!cn((tt||d).memoizedState,i);if(S&&(d.memoizedState=i,kt=!0),d=d.queue,yc(Zp.bind(null,o,d,t),[t]),d.getSnapshot!==n||S||St!==null&&St.memoizedState.tag&1){if(o.flags|=2048,ti(9,{destroy:void 0},Xp.bind(null,o,d,i,n),null),ot===null)throw Error(a(349));m||(ir&127)!==0||Yp(o,n,i)}return i}function Yp(t,n,i){t.flags|=16384,t={getSnapshot:n,value:i},n=Le.updateQueue,n===null?(n=_o(),Le.updateQueue=n,n.stores=[t]):(i=n.stores,i===null?n.stores=[t]:i.push(t))}function Xp(t,n,i,o){n.value=i,n.getSnapshot=o,Qp(n)&&Kp(t)}function Zp(t,n,i){return i(function(){Qp(n)&&Kp(t)})}function Qp(t){var n=t.getSnapshot;t=t.value;try{var i=n();return!cn(t,i)}catch{return!0}}function Kp(t){var n=ol(t,2);n!==null&&tn(n,t,2)}function gc(t){var n=Vt();if(typeof t=="function"){var i=t;if(t=i(),gl){zt(!0);try{i()}finally{zt(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ar,lastRenderedState:t},n}function Jp(t,n,i,o){return t.baseState=i,pc(t,tt,typeof o=="function"?o:ar)}function iw(t,n,i,o,d){if(zo(t))throw Error(a(485));if(t=n.action,t!==null){var m={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){m.listeners.push(S)}};F.T!==null?i(!0):m.isTransition=!1,o(m),i=n.pending,i===null?(m.next=n.pending=m,Wp(n,m)):(m.next=i.next,n.pending=i.next=m)}}function Wp(t,n){var i=n.action,o=n.payload,d=t.state;if(n.isTransition){var m=F.T,S={};F.T=S;try{var _=i(d,o),P=F.S;P!==null&&P(S,_),em(t,n,_)}catch(ee){bc(t,n,ee)}finally{m!==null&&S.types!==null&&(m.types=S.types),F.T=m}}else try{m=i(d,o),em(t,n,m)}catch(ee){bc(t,n,ee)}}function em(t,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){tm(t,n,o)},function(o){return bc(t,n,o)}):tm(t,n,i)}function tm(t,n,i){n.status="fulfilled",n.value=i,nm(n),t.state=i,n=t.pending,n!==null&&(i=n.next,i===n?t.pending=null:(i=i.next,n.next=i,Wp(t,i)))}function bc(t,n,i){var o=t.pending;if(t.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=i,nm(n),n=n.next;while(n!==o)}t.action=null}function nm(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function rm(t,n){return n}function lm(t,n){if(qe){var i=ot.formState;if(i!==null){e:{var o=Le;if(qe){if(ft){t:{for(var d=ft,m=Rn;d.nodeType!==8;){if(!m){d=null;break t}if(d=Ln(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m==="F!"||m==="F"?d:null}if(d){ft=Ln(d.nextSibling),o=d.data==="F!";break e}}Cr(o)}o=!1}o&&(n=i[0])}}return i=Vt(),i.memoizedState=i.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rm,lastRenderedState:n},i.queue=o,i=km.bind(null,Le,o),o.dispatch=i,o=gc(!1),m=kc.bind(null,Le,!1,o.queue),o=Vt(),d={state:n,dispatch:null,action:t,pending:null},o.queue=d,i=iw.bind(null,Le,d,m,i),d.dispatch=i,o.memoizedState=t,[n,i,!1]}function im(t){var n=vt();return am(n,tt,t)}function am(t,n,i){if(n=pc(t,n,rm)[0],t=Do(ar)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=ta(n)}catch(S){throw S===Ql?ko:S}else o=n;n=vt();var d=n.queue,m=d.dispatch;return i!==n.memoizedState&&(Le.flags|=2048,ti(9,{destroy:void 0},aw.bind(null,d,i),null)),[o,m,t]}function aw(t,n){t.action=n}function om(t){var n=vt(),i=tt;if(i!==null)return am(n,i,t);vt(),n=n.memoizedState,i=vt();var o=i.queue.dispatch;return i.memoizedState=t,[n,o,!1]}function ti(t,n,i,o){return t={tag:t,create:i,deps:o,inst:n,next:null},n=Le.updateQueue,n===null&&(n=_o(),Le.updateQueue=n),i=n.lastEffect,i===null?n.lastEffect=t.next=t:(o=i.next,i.next=t,t.next=o,n.lastEffect=t),t}function sm(){return vt().memoizedState}function Oo(t,n,i,o){var d=Vt();Le.flags|=t,d.memoizedState=ti(1|n,{destroy:void 0},i,o===void 0?null:o)}function Mo(t,n,i,o){var d=vt();o=o===void 0?null:o;var m=d.memoizedState.inst;tt!==null&&o!==null&&sc(o,tt.memoizedState.deps)?d.memoizedState=ti(n,m,i,o):(Le.flags|=t,d.memoizedState=ti(1|n,m,i,o))}function um(t,n){Oo(8390656,8,t,n)}function yc(t,n){Mo(2048,8,t,n)}function ow(t){Le.flags|=4;var n=Le.updateQueue;if(n===null)n=_o(),Le.updateQueue=n,n.events=[t];else{var i=n.events;i===null?n.events=[t]:i.push(t)}}function cm(t){var n=vt().memoizedState;return ow({ref:n,nextImpl:t}),function(){if((Ze&2)!==0)throw Error(a(440));return n.impl.apply(void 0,arguments)}}function fm(t,n){return Mo(4,2,t,n)}function dm(t,n){return Mo(4,4,t,n)}function hm(t,n){if(typeof n=="function"){t=t();var i=n(t);return function(){typeof i=="function"?i():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function pm(t,n,i){i=i!=null?i.concat([t]):null,Mo(4,4,hm.bind(null,n,t),i)}function xc(){}function mm(t,n){var i=vt();n=n===void 0?null:n;var o=i.memoizedState;return n!==null&&sc(n,o[1])?o[0]:(i.memoizedState=[t,n],t)}function gm(t,n){var i=vt();n=n===void 0?null:n;var o=i.memoizedState;if(n!==null&&sc(n,o[1]))return o[0];if(o=t(),gl){zt(!0);try{t()}finally{zt(!1)}}return i.memoizedState=[o,n],o}function vc(t,n,i){return i===void 0||(ir&1073741824)!==0&&(Ie&261930)===0?t.memoizedState=n:(t.memoizedState=i,t=bg(),Le.lanes|=t,Or|=t,i)}function bm(t,n,i,o){return cn(i,n)?i:Jl.current!==null?(t=vc(t,i,o),cn(t,n)||(kt=!0),t):(ir&42)===0||(ir&1073741824)!==0&&(Ie&261930)===0?(kt=!0,t.memoizedState=i):(t=bg(),Le.lanes|=t,Or|=t,n)}function ym(t,n,i,o,d){var m=O.p;O.p=m!==0&&8>m?m:8;var S=F.T,_={};F.T=_,kc(t,!1,n,i);try{var P=d(),ee=F.S;if(ee!==null&&ee(_,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var ie=nw(P,o);na(t,n,ie,gn(t))}else na(t,n,o,gn(t))}catch(ue){na(t,n,{then:function(){},status:"rejected",reason:ue},gn())}finally{O.p=m,S!==null&&_.types!==null&&(S.types=_.types),F.T=S}}function sw(){}function wc(t,n,i,o){if(t.tag!==5)throw Error(a(476));var d=xm(t).queue;ym(t,d,n,z,i===null?sw:function(){return vm(t),i(o)})}function xm(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ar,lastRenderedState:z},next:null};var i={};return n.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ar,lastRenderedState:i},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function vm(t){var n=xm(t);n.next===null&&(n=t.alternate.memoizedState),na(t,n.next.queue,{},gn())}function Sc(){return Dt(xa)}function wm(){return vt().memoizedState}function Sm(){return vt().memoizedState}function uw(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var i=gn();t=Tr(i);var o=jr(n,t,i);o!==null&&(tn(o,n,i),Ki(o,n,i)),n={cache:Ku()},t.payload=n;return}n=n.return}}function cw(t,n,i){var o=gn();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},zo(t)?Em(n,i):(i=Uu(t,n,i,o),i!==null&&(tn(i,t,o),Cm(i,n,o)))}function km(t,n,i){var o=gn();na(t,n,i,o)}function na(t,n,i,o){var d={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(zo(t))Em(n,d);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null))try{var S=n.lastRenderedState,_=m(S,i);if(d.hasEagerState=!0,d.eagerState=_,cn(_,S))return go(t,n,d,0),ot===null&&mo(),!1}catch{}if(i=Uu(t,n,d,o),i!==null)return tn(i,t,o),Cm(i,n,o),!0}return!1}function kc(t,n,i,o){if(o={lane:2,revertLane:tf(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},zo(t)){if(n)throw Error(a(479))}else n=Uu(t,i,o,2),n!==null&&tn(n,t,2)}function zo(t){var n=t.alternate;return t===Le||n!==null&&n===Le}function Em(t,n){Wl=jo=!0;var i=t.pending;i===null?n.next=n:(n.next=i.next,i.next=n),t.pending=n}function Cm(t,n,i){if((i&4194048)!==0){var o=n.lanes;o&=t.pendingLanes,i|=o,n.lanes=i,eo(t,i)}}var ra={readContext:Dt,use:Lo,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};ra.useEffectEvent=bt;var Am={readContext:Dt,use:Lo,useCallback:function(t,n){return Vt().memoizedState=[t,n===void 0?null:n],t},useContext:Dt,useEffect:um,useImperativeHandle:function(t,n,i){i=i!=null?i.concat([t]):null,Oo(4194308,4,hm.bind(null,n,t),i)},useLayoutEffect:function(t,n){return Oo(4194308,4,t,n)},useInsertionEffect:function(t,n){Oo(4,2,t,n)},useMemo:function(t,n){var i=Vt();n=n===void 0?null:n;var o=t();if(gl){zt(!0);try{t()}finally{zt(!1)}}return i.memoizedState=[o,n],o},useReducer:function(t,n,i){var o=Vt();if(i!==void 0){var d=i(n);if(gl){zt(!0);try{i(n)}finally{zt(!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=cw.bind(null,Le,t),[o.memoizedState,t]},useRef:function(t){var n=Vt();return t={current:t},n.memoizedState=t},useState:function(t){t=gc(t);var n=t.queue,i=km.bind(null,Le,n);return n.dispatch=i,[t.memoizedState,i]},useDebugValue:xc,useDeferredValue:function(t,n){var i=Vt();return vc(i,t,n)},useTransition:function(){var t=gc(!1);return t=ym.bind(null,Le,t.queue,!0,!1),Vt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,i){var o=Le,d=Vt();if(qe){if(i===void 0)throw Error(a(407));i=i()}else{if(i=n(),ot===null)throw Error(a(349));(Ie&127)!==0||Yp(o,n,i)}d.memoizedState=i;var m={value:i,getSnapshot:n};return d.queue=m,um(Zp.bind(null,o,m,t),[t]),o.flags|=2048,ti(9,{destroy:void 0},Xp.bind(null,o,m,i,n),null),i},useId:function(){var t=Vt(),n=ot.identifierPrefix;if(qe){var i=Pn,o=qn;i=(o&~(1<<32-Qe(o)-1)).toString(32)+i,n="_"+n+"R_"+i,i=Ro++,0<i&&(n+="H"+i.toString(32)),n+="_"}else i=rw++,n="_"+n+"r_"+i.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:Sc,useFormState:lm,useActionState:lm,useOptimistic:function(t){var n=Vt();n.memoizedState=n.baseState=t;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=i,n=kc.bind(null,Le,!0,i),i.dispatch=n,[t,n]},useMemoCache:hc,useCacheRefresh:function(){return Vt().memoizedState=uw.bind(null,Le)},useEffectEvent:function(t){var n=Vt(),i={impl:t};return n.memoizedState=i,function(){if((Ze&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},Ec={readContext:Dt,use:Lo,useCallback:mm,useContext:Dt,useEffect:yc,useImperativeHandle:pm,useInsertionEffect:fm,useLayoutEffect:dm,useMemo:gm,useReducer:Do,useRef:sm,useState:function(){return Do(ar)},useDebugValue:xc,useDeferredValue:function(t,n){var i=vt();return bm(i,tt.memoizedState,t,n)},useTransition:function(){var t=Do(ar)[0],n=vt().memoizedState;return[typeof t=="boolean"?t:ta(t),n]},useSyncExternalStore:Gp,useId:wm,useHostTransitionStatus:Sc,useFormState:im,useActionState:im,useOptimistic:function(t,n){var i=vt();return Jp(i,tt,t,n)},useMemoCache:hc,useCacheRefresh:Sm};Ec.useEffectEvent=cm;var Nm={readContext:Dt,use:Lo,useCallback:mm,useContext:Dt,useEffect:yc,useImperativeHandle:pm,useInsertionEffect:fm,useLayoutEffect:dm,useMemo:gm,useReducer:mc,useRef:sm,useState:function(){return mc(ar)},useDebugValue:xc,useDeferredValue:function(t,n){var i=vt();return tt===null?vc(i,t,n):bm(i,tt.memoizedState,t,n)},useTransition:function(){var t=mc(ar)[0],n=vt().memoizedState;return[typeof t=="boolean"?t:ta(t),n]},useSyncExternalStore:Gp,useId:wm,useHostTransitionStatus:Sc,useFormState:om,useActionState:om,useOptimistic:function(t,n){var i=vt();return tt!==null?Jp(i,tt,t,n):(i.baseState=t,[t,i.queue.dispatch])},useMemoCache:hc,useCacheRefresh:Sm};Nm.useEffectEvent=cm;function Cc(t,n,i,o){n=t.memoizedState,i=i(o,n),i=i==null?n:g({},n,i),t.memoizedState=i,t.lanes===0&&(t.updateQueue.baseState=i)}var Ac={enqueueSetState:function(t,n,i){t=t._reactInternals;var o=gn(),d=Tr(o);d.payload=n,i!=null&&(d.callback=i),n=jr(t,d,o),n!==null&&(tn(n,t,o),Ki(n,t,o))},enqueueReplaceState:function(t,n,i){t=t._reactInternals;var o=gn(),d=Tr(o);d.tag=1,d.payload=n,i!=null&&(d.callback=i),n=jr(t,d,o),n!==null&&(tn(n,t,o),Ki(n,t,o))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var i=gn(),o=Tr(i);o.tag=2,n!=null&&(o.callback=n),n=jr(t,o,i),n!==null&&(tn(n,t,i),Ki(n,t,i))}};function Tm(t,n,i,o,d,m,S){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(o,m,S):n.prototype&&n.prototype.isPureReactComponent?!Pi(i,o)||!Pi(d,m):!0}function jm(t,n,i,o){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,o),n.state!==t&&Ac.enqueueReplaceState(n,n.state,null)}function bl(t,n){var i=n;if("ref"in n){i={};for(var o in n)o!=="ref"&&(i[o]=n[o])}if(t=t.defaultProps){i===n&&(i=g({},i));for(var d in t)i[d]===void 0&&(i[d]=t[d])}return i}function Rm(t){po(t)}function _m(t){console.error(t)}function Lm(t){po(t)}function Bo(t,n){try{var i=t.onUncaughtError;i(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function Dm(t,n,i){try{var o=t.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Nc(t,n,i){return i=Tr(i),i.tag=3,i.payload={element:null},i.callback=function(){Bo(t,n)},i}function Om(t){return t=Tr(t),t.tag=3,t}function Mm(t,n,i,o){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var m=o.value;t.payload=function(){return d(m)},t.callback=function(){Dm(n,i,o)}}var S=i.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(t.callback=function(){Dm(n,i,o),typeof d!="function"&&(Mr===null?Mr=new Set([this]):Mr.add(this));var _=o.stack;this.componentDidCatch(o.value,{componentStack:_!==null?_:""})})}function fw(t,n,i,o,d){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=i.alternate,n!==null&&Yl(n,i,d,!0),i=dn.current,i!==null){switch(i.tag){case 31:case 13:return _n===null?Zo():i.alternate===null&&yt===0&&(yt=3),i.flags&=-257,i.flags|=65536,i.lanes=d,o===Eo?i.flags|=16384:(n=i.updateQueue,n===null?i.updateQueue=new Set([o]):n.add(o),Jc(t,o,d)),!1;case 22:return i.flags|=65536,o===Eo?i.flags|=16384:(n=i.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},i.updateQueue=n):(i=n.retryQueue,i===null?n.retryQueue=new Set([o]):i.add(o)),Jc(t,o,d)),!1}throw Error(a(435,i.tag))}return Jc(t,o,d),Zo(),!1}if(qe)return n=dn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,o!==Gu&&(t=Error(a(422),{cause:o}),Gi(Nn(t,i)))):(o!==Gu&&(n=Error(a(423),{cause:o}),Gi(Nn(n,i))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,o=Nn(o,i),d=Nc(t.stateNode,o,d),rc(t,d),yt!==4&&(yt=2)),!1;var m=Error(a(520),{cause:o});if(m=Nn(m,i),fa===null?fa=[m]:fa.push(m),yt!==4&&(yt=2),n===null)return!0;o=Nn(o,i),i=n;do{switch(i.tag){case 3:return i.flags|=65536,t=d&-d,i.lanes|=t,t=Nc(i.stateNode,o,t),rc(i,t),!1;case 1:if(n=i.type,m=i.stateNode,(i.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Mr===null||!Mr.has(m))))return i.flags|=65536,d&=-d,i.lanes|=d,d=Om(d),Mm(d,t,i,o),rc(i,d),!1}i=i.return}while(i!==null);return!1}var Tc=Error(a(461)),kt=!1;function Ot(t,n,i,o){n.child=t===null?Ip(n,null,i,o):ml(n,t.child,i,o)}function zm(t,n,i,o,d){i=i.render;var m=n.ref;if("ref"in o){var S={};for(var _ in o)_!=="ref"&&(S[_]=o[_])}else S=o;return fl(n),o=uc(t,n,i,S,m,d),_=cc(),t!==null&&!kt?(fc(t,n,d),or(t,n,d)):(qe&&_&&$u(n),n.flags|=1,Ot(t,n,o,d),n.child)}function Bm(t,n,i,o,d){if(t===null){var m=i.type;return typeof m=="function"&&!Hu(m)&&m.defaultProps===void 0&&i.compare===null?(n.tag=15,n.type=m,Fm(t,n,m,o,d)):(t=yo(i.type,null,o,n,n.mode,d),t.ref=n.ref,t.return=n,n.child=t)}if(m=t.child,!zc(t,d)){var S=m.memoizedProps;if(i=i.compare,i=i!==null?i:Pi,i(S,o)&&t.ref===n.ref)return or(t,n,d)}return n.flags|=1,t=tr(m,o),t.ref=n.ref,t.return=n,n.child=t}function Fm(t,n,i,o,d){if(t!==null){var m=t.memoizedProps;if(Pi(m,o)&&t.ref===n.ref)if(kt=!1,n.pendingProps=o=m,zc(t,d))(t.flags&131072)!==0&&(kt=!0);else return n.lanes=t.lanes,or(t,n,d)}return jc(t,n,i,o,d)}function Im(t,n,i,o){var d=o.children,m=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(m=m!==null?m.baseLanes|i:i,t!==null){for(o=n.child=t.child,d=0;o!==null;)d=d|o.lanes|o.childLanes,o=o.sibling;o=d&~m}else o=0,n.child=null;return Um(t,n,m,i,o)}if((i&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&So(n,m!==null?m.cachePool:null),m!==null?qp(n,m):ic(),Pp(n);else return o=n.lanes=536870912,Um(t,n,m!==null?m.baseLanes|i:i,i,o)}else m!==null?(So(n,m.cachePool),qp(n,m),_r(),n.memoizedState=null):(t!==null&&So(n,null),ic(),_r());return Ot(t,n,d,i),n.child}function la(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Um(t,n,i,o,d){var m=Wu();return m=m===null?null:{parent:wt._currentValue,pool:m},n.memoizedState={baseLanes:i,cachePool:m},t!==null&&So(n,null),ic(),Pp(n),t!==null&&Yl(t,n,o,!0),n.childLanes=d,null}function Fo(t,n){return n=Uo({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function Hm(t,n,i){return ml(n,t.child,null,i),t=Fo(n,n.pendingProps),t.flags|=2,hn(n),n.memoizedState=null,t}function dw(t,n,i){var o=n.pendingProps,d=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(qe){if(o.mode==="hidden")return t=Fo(n,o),n.lanes=536870912,la(null,t);if(oc(n),(t=ft)?(t=Wg(t,Rn),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:kr!==null?{id:qn,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},i=Ep(t),i.return=n,n.child=i,Lt=n,ft=null)):t=null,t===null)throw Cr(n);return n.lanes=536870912,null}return Fo(n,o)}var m=t.memoizedState;if(m!==null){var S=m.dehydrated;if(oc(n),d)if(n.flags&256)n.flags&=-257,n=Hm(t,n,i);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(a(558));else if(kt||Yl(t,n,i,!1),d=(i&t.childLanes)!==0,kt||d){if(o=ot,o!==null&&(S=_i(o,i),S!==0&&S!==m.retryLane))throw m.retryLane=S,ol(t,S),tn(o,t,S),Tc;Zo(),n=Hm(t,n,i)}else t=m.treeContext,ft=Ln(S.nextSibling),Lt=n,qe=!0,Er=null,Rn=!1,t!==null&&Np(n,t),n=Fo(n,o),n.flags|=4096;return n}return t=tr(t.child,{mode:o.mode,children:o.children}),t.ref=n.ref,n.child=t,t.return=n,t}function Io(t,n){var i=n.ref;if(i===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(a(284));(t===null||t.ref!==i)&&(n.flags|=4194816)}}function jc(t,n,i,o,d){return fl(n),i=uc(t,n,i,o,void 0,d),o=cc(),t!==null&&!kt?(fc(t,n,d),or(t,n,d)):(qe&&o&&$u(n),n.flags|=1,Ot(t,n,i,d),n.child)}function qm(t,n,i,o,d,m){return fl(n),n.updateQueue=null,i=Vp(n,o,i,d),$p(t),o=cc(),t!==null&&!kt?(fc(t,n,m),or(t,n,m)):(qe&&o&&$u(n),n.flags|=1,Ot(t,n,i,m),n.child)}function Pm(t,n,i,o,d){if(fl(n),n.stateNode===null){var m=Pl,S=i.contextType;typeof S=="object"&&S!==null&&(m=Dt(S)),m=new i(o,m),n.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Ac,n.stateNode=m,m._reactInternals=n,m=n.stateNode,m.props=o,m.state=n.memoizedState,m.refs={},tc(n),S=i.contextType,m.context=typeof S=="object"&&S!==null?Dt(S):Pl,m.state=n.memoizedState,S=i.getDerivedStateFromProps,typeof S=="function"&&(Cc(n,i,S,o),m.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(S=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),S!==m.state&&Ac.enqueueReplaceState(m,m.state,null),Wi(n,o,m,d),Ji(),m.state=n.memoizedState),typeof m.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(t===null){m=n.stateNode;var _=n.memoizedProps,P=bl(i,_);m.props=P;var ee=m.context,ie=i.contextType;S=Pl,typeof ie=="object"&&ie!==null&&(S=Dt(ie));var ue=i.getDerivedStateFromProps;ie=typeof ue=="function"||typeof m.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,ie||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(_||ee!==S)&&jm(n,m,o,S),Nr=!1;var te=n.memoizedState;m.state=te,Wi(n,o,m,d),Ji(),ee=n.memoizedState,_||te!==ee||Nr?(typeof ue=="function"&&(Cc(n,i,ue,o),ee=n.memoizedState),(P=Nr||Tm(n,i,P,o,te,ee,S))?(ie||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(n.flags|=4194308)):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=ee),m.props=o,m.state=ee,m.context=S,o=P):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{m=n.stateNode,nc(t,n),S=n.memoizedProps,ie=bl(i,S),m.props=ie,ue=n.pendingProps,te=m.context,ee=i.contextType,P=Pl,typeof ee=="object"&&ee!==null&&(P=Dt(ee)),_=i.getDerivedStateFromProps,(ee=typeof _=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S!==ue||te!==P)&&jm(n,m,o,P),Nr=!1,te=n.memoizedState,m.state=te,Wi(n,o,m,d),Ji();var ne=n.memoizedState;S!==ue||te!==ne||Nr||t!==null&&t.dependencies!==null&&vo(t.dependencies)?(typeof _=="function"&&(Cc(n,i,_,o),ne=n.memoizedState),(ie=Nr||Tm(n,i,ie,o,te,ne,P)||t!==null&&t.dependencies!==null&&vo(t.dependencies))?(ee||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(o,ne,P),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(o,ne,P)),typeof m.componentDidUpdate=="function"&&(n.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof m.componentDidUpdate!="function"||S===t.memoizedProps&&te===t.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&te===t.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=ne),m.props=o,m.state=ne,m.context=P,o=ie):(typeof m.componentDidUpdate!="function"||S===t.memoizedProps&&te===t.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&te===t.memoizedState||(n.flags|=1024),o=!1)}return m=o,Io(t,n),o=(n.flags&128)!==0,m||o?(m=n.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:m.render(),n.flags|=1,t!==null&&o?(n.child=ml(n,t.child,null,d),n.child=ml(n,null,i,d)):Ot(t,n,i,d),n.memoizedState=m.state,t=n.child):t=or(t,n,d),t}function $m(t,n,i,o){return ul(),n.flags|=256,Ot(t,n,i,o),n.child}var Rc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _c(t){return{baseLanes:t,cachePool:Dp()}}function Lc(t,n,i){return t=t!==null?t.childLanes&~i:0,n&&(t|=mn),t}function Vm(t,n,i){var o=n.pendingProps,d=!1,m=(n.flags&128)!==0,S;if((S=m)||(S=t!==null&&t.memoizedState===null?!1:(xt.current&2)!==0),S&&(d=!0,n.flags&=-129),S=(n.flags&32)!==0,n.flags&=-33,t===null){if(qe){if(d?Rr(n):_r(),(t=ft)?(t=Wg(t,Rn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:kr!==null?{id:qn,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},i=Ep(t),i.return=n,n.child=i,Lt=n,ft=null)):t=null,t===null)throw Cr(n);return mf(t)?n.lanes=32:n.lanes=536870912,null}var _=o.children;return o=o.fallback,d?(_r(),d=n.mode,_=Uo({mode:"hidden",children:_},d),o=sl(o,d,i,null),_.return=n,o.return=n,_.sibling=o,n.child=_,o=n.child,o.memoizedState=_c(i),o.childLanes=Lc(t,S,i),n.memoizedState=Rc,la(null,o)):(Rr(n),Dc(n,_))}var P=t.memoizedState;if(P!==null&&(_=P.dehydrated,_!==null)){if(m)n.flags&256?(Rr(n),n.flags&=-257,n=Oc(t,n,i)):n.memoizedState!==null?(_r(),n.child=t.child,n.flags|=128,n=null):(_r(),_=o.fallback,d=n.mode,o=Uo({mode:"visible",children:o.children},d),_=sl(_,d,i,null),_.flags|=2,o.return=n,_.return=n,o.sibling=_,n.child=o,ml(n,t.child,null,i),o=n.child,o.memoizedState=_c(i),o.childLanes=Lc(t,S,i),n.memoizedState=Rc,n=la(null,o));else if(Rr(n),mf(_)){if(S=_.nextSibling&&_.nextSibling.dataset,S)var ee=S.dgst;S=ee,o=Error(a(419)),o.stack="",o.digest=S,Gi({value:o,source:null,stack:null}),n=Oc(t,n,i)}else if(kt||Yl(t,n,i,!1),S=(i&t.childLanes)!==0,kt||S){if(S=ot,S!==null&&(o=_i(S,i),o!==0&&o!==P.retryLane))throw P.retryLane=o,ol(t,o),tn(S,t,o),Tc;pf(_)||Zo(),n=Oc(t,n,i)}else pf(_)?(n.flags|=192,n.child=t.child,n=null):(t=P.treeContext,ft=Ln(_.nextSibling),Lt=n,qe=!0,Er=null,Rn=!1,t!==null&&Np(n,t),n=Dc(n,o.children),n.flags|=4096);return n}return d?(_r(),_=o.fallback,d=n.mode,P=t.child,ee=P.sibling,o=tr(P,{mode:"hidden",children:o.children}),o.subtreeFlags=P.subtreeFlags&65011712,ee!==null?_=tr(ee,_):(_=sl(_,d,i,null),_.flags|=2),_.return=n,o.return=n,o.sibling=_,n.child=o,la(null,o),o=n.child,_=t.child.memoizedState,_===null?_=_c(i):(d=_.cachePool,d!==null?(P=wt._currentValue,d=d.parent!==P?{parent:P,pool:P}:d):d=Dp(),_={baseLanes:_.baseLanes|i,cachePool:d}),o.memoizedState=_,o.childLanes=Lc(t,S,i),n.memoizedState=Rc,la(t.child,o)):(Rr(n),i=t.child,t=i.sibling,i=tr(i,{mode:"visible",children:o.children}),i.return=n,i.sibling=null,t!==null&&(S=n.deletions,S===null?(n.deletions=[t],n.flags|=16):S.push(t)),n.child=i,n.memoizedState=null,i)}function Dc(t,n){return n=Uo({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Uo(t,n){return t=fn(22,t,null,n),t.lanes=0,t}function Oc(t,n,i){return ml(n,t.child,null,i),t=Dc(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function Gm(t,n,i){t.lanes|=n;var o=t.alternate;o!==null&&(o.lanes|=n),Zu(t.return,n,i)}function Mc(t,n,i,o,d,m){var S=t.memoizedState;S===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:d,treeForkCount:m}:(S.isBackwards=n,S.rendering=null,S.renderingStartTime=0,S.last=o,S.tail=i,S.tailMode=d,S.treeForkCount=m)}function Ym(t,n,i){var o=n.pendingProps,d=o.revealOrder,m=o.tail;o=o.children;var S=xt.current,_=(S&2)!==0;if(_?(S=S&1|2,n.flags|=128):S&=1,N(xt,S),Ot(t,n,o,i),o=qe?Vi:0,!_&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Gm(t,i,n);else if(t.tag===19)Gm(t,i,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(i=n.child,d=null;i!==null;)t=i.alternate,t!==null&&To(t)===null&&(d=i),i=i.sibling;i=d,i===null?(d=n.child,n.child=null):(d=i.sibling,i.sibling=null),Mc(n,!1,d,i,m,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=n.child,n.child=null;d!==null;){if(t=d.alternate,t!==null&&To(t)===null){n.child=d;break}t=d.sibling,d.sibling=i,i=d,d=t}Mc(n,!0,i,null,m,o);break;case"together":Mc(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function or(t,n,i){if(t!==null&&(n.dependencies=t.dependencies),Or|=n.lanes,(i&n.childLanes)===0)if(t!==null){if(Yl(t,n,i,!1),(i&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(a(153));if(n.child!==null){for(t=n.child,i=tr(t,t.pendingProps),n.child=i,i.return=n;t.sibling!==null;)t=t.sibling,i=i.sibling=tr(t,t.pendingProps),i.return=n;i.sibling=null}return n.child}function zc(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&vo(t)))}function hw(t,n,i){switch(n.tag){case 3:ge(n,n.stateNode.containerInfo),Ar(n,wt,t.memoizedState.cache),ul();break;case 27:case 5:ve(n);break;case 4:ge(n,n.stateNode.containerInfo);break;case 10:Ar(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,oc(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(Rr(n),n.flags|=128,null):(i&n.child.childLanes)!==0?Vm(t,n,i):(Rr(n),t=or(t,n,i),t!==null?t.sibling:null);Rr(n);break;case 19:var d=(t.flags&128)!==0;if(o=(i&n.childLanes)!==0,o||(Yl(t,n,i,!1),o=(i&n.childLanes)!==0),d){if(o)return Ym(t,n,i);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),N(xt,xt.current),o)break;return null;case 22:return n.lanes=0,Im(t,n,i,n.pendingProps);case 24:Ar(n,wt,t.memoizedState.cache)}return or(t,n,i)}function Xm(t,n,i){if(t!==null)if(t.memoizedProps!==n.pendingProps)kt=!0;else{if(!zc(t,i)&&(n.flags&128)===0)return kt=!1,hw(t,n,i);kt=(t.flags&131072)!==0}else kt=!1,qe&&(n.flags&1048576)!==0&&Ap(n,Vi,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(t=hl(n.elementType),n.type=t,typeof t=="function")Hu(t)?(o=bl(t,o),n.tag=1,n=Pm(null,n,t,o,i)):(n.tag=0,n=jc(null,n,t,o,i));else{if(t!=null){var d=t.$$typeof;if(d===B){n.tag=11,n=zm(null,n,t,o,i);break e}else if(d===U){n.tag=14,n=Bm(null,n,t,o,i);break e}}throw n=I(t)||t,Error(a(306,n,""))}}return n;case 0:return jc(t,n,n.type,n.pendingProps,i);case 1:return o=n.type,d=bl(o,n.pendingProps),Pm(t,n,o,d,i);case 3:e:{if(ge(n,n.stateNode.containerInfo),t===null)throw Error(a(387));o=n.pendingProps;var m=n.memoizedState;d=m.element,nc(t,n),Wi(n,o,null,i);var S=n.memoizedState;if(o=S.cache,Ar(n,wt,o),o!==m.cache&&Qu(n,[wt],i,!0),Ji(),o=S.element,m.isDehydrated)if(m={element:o,isDehydrated:!1,cache:S.cache},n.updateQueue.baseState=m,n.memoizedState=m,n.flags&256){n=$m(t,n,o,i);break e}else if(o!==d){d=Nn(Error(a(424)),n),Gi(d),n=$m(t,n,o,i);break e}else for(t=n.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,ft=Ln(t.firstChild),Lt=n,qe=!0,Er=null,Rn=!0,i=Ip(n,null,o,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ul(),o===d){n=or(t,n,i);break e}Ot(t,n,o,i)}n=n.child}return n;case 26:return Io(t,n),t===null?(i=ib(n.type,null,n.pendingProps,null))?n.memoizedState=i:qe||(i=n.type,t=n.pendingProps,o=ns(de.current).createElement(i),o[be]=n,o[Ee]=t,Mt(o,i,t),jt(o),n.stateNode=o):n.memoizedState=ib(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return ve(n),t===null&&qe&&(o=n.stateNode=nb(n.type,n.pendingProps,de.current),Lt=n,Rn=!0,d=ft,Ir(n.type)?(gf=d,ft=Ln(o.firstChild)):ft=d),Ot(t,n,n.pendingProps.children,i),Io(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&qe&&((d=o=ft)&&(o=Pw(o,n.type,n.pendingProps,Rn),o!==null?(n.stateNode=o,Lt=n,ft=Ln(o.firstChild),Rn=!1,d=!0):d=!1),d||Cr(n)),ve(n),d=n.type,m=n.pendingProps,S=t!==null?t.memoizedProps:null,o=m.children,ff(d,m)?o=null:S!==null&&ff(d,S)&&(n.flags|=32),n.memoizedState!==null&&(d=uc(t,n,lw,null,null,i),xa._currentValue=d),Io(t,n),Ot(t,n,o,i),n.child;case 6:return t===null&&qe&&((t=i=ft)&&(i=$w(i,n.pendingProps,Rn),i!==null?(n.stateNode=i,Lt=n,ft=null,t=!0):t=!1),t||Cr(n)),null;case 13:return Vm(t,n,i);case 4:return ge(n,n.stateNode.containerInfo),o=n.pendingProps,t===null?n.child=ml(n,null,o,i):Ot(t,n,o,i),n.child;case 11:return zm(t,n,n.type,n.pendingProps,i);case 7:return Ot(t,n,n.pendingProps,i),n.child;case 8:return Ot(t,n,n.pendingProps.children,i),n.child;case 12:return Ot(t,n,n.pendingProps.children,i),n.child;case 10:return o=n.pendingProps,Ar(n,n.type,o.value),Ot(t,n,o.children,i),n.child;case 9:return d=n.type._context,o=n.pendingProps.children,fl(n),d=Dt(d),o=o(d),n.flags|=1,Ot(t,n,o,i),n.child;case 14:return Bm(t,n,n.type,n.pendingProps,i);case 15:return Fm(t,n,n.type,n.pendingProps,i);case 19:return Ym(t,n,i);case 31:return dw(t,n,i);case 22:return Im(t,n,i,n.pendingProps);case 24:return fl(n),o=Dt(wt),t===null?(d=Wu(),d===null&&(d=ot,m=Ku(),d.pooledCache=m,m.refCount++,m!==null&&(d.pooledCacheLanes|=i),d=m),n.memoizedState={parent:o,cache:d},tc(n),Ar(n,wt,d)):((t.lanes&i)!==0&&(nc(t,n),Wi(n,null,null,i),Ji()),d=t.memoizedState,m=n.memoizedState,d.parent!==o?(d={parent:o,cache:o},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),Ar(n,wt,o)):(o=m.cache,Ar(n,wt,o),o!==d.cache&&Qu(n,[wt],i,!0))),Ot(t,n,n.pendingProps.children,i),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function sr(t){t.flags|=4}function Bc(t,n,i,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(wg())t.flags|=8192;else throw pl=Eo,ec}else t.flags&=-16777217}function Zm(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!cb(n))if(wg())t.flags|=8192;else throw pl=Eo,ec}function Ho(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?Ja():536870912,t.lanes|=n,ii|=n)}function ia(t,n){if(!qe)switch(t.tailMode){case"hidden":n=t.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t.tail=null:i.sibling=null;break;case"collapsed":i=t.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.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,i=0,o=0;if(n)for(var d=t.child;d!==null;)i|=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;)i|=d.lanes|d.childLanes,o|=d.subtreeFlags,o|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=o,t.childLanes=i,n}function pw(t,n,i){var o=n.pendingProps;switch(Vu(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 i=n.stateNode,o=null,t!==null&&(o=t.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),lr(wt),fe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(Gl(n)?sr(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Yu())),dt(n),null;case 26:var d=n.type,m=n.memoizedState;return t===null?(sr(n),m!==null?(dt(n),Zm(n,m)):(dt(n),Bc(n,d,null,o,i))):m?m!==t.memoizedState?(sr(n),dt(n),Zm(n,m)):(dt(n),n.flags&=-16777217):(t=t.memoizedProps,t!==o&&sr(n),dt(n),Bc(n,d,t,o,i)),null;case 27:if(xe(n),i=de.current,d=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==o&&sr(n);else{if(!o){if(n.stateNode===null)throw Error(a(166));return dt(n),null}t=re.current,Gl(n)?Tp(n):(t=nb(d,o,i),n.stateNode=t,sr(n))}return dt(n),null;case 5:if(xe(n),d=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==o&&sr(n);else{if(!o){if(n.stateNode===null)throw Error(a(166));return dt(n),null}if(m=re.current,Gl(n))Tp(n);else{var S=ns(de.current);switch(m){case 1:m=S.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:m=S.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":m=S.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":m=S.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":m=S.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof o.is=="string"?S.createElement("select",{is:o.is}):S.createElement("select"),o.multiple?m.multiple=!0:o.size&&(m.size=o.size);break;default:m=typeof o.is=="string"?S.createElement(d,{is:o.is}):S.createElement(d)}}m[be]=n,m[Ee]=o;e:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)m.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break e;for(;S.sibling===null;){if(S.return===null||S.return===n)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=m;e:switch(Mt(m,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&&sr(n)}}return dt(n),Bc(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,i),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==o&&sr(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(a(166));if(t=de.current,Gl(n)){if(t=n.stateNode,i=n.memoizedProps,o=null,d=Lt,d!==null)switch(d.tag){case 27:case 5:o=d.memoizedProps}t[be]=n,t=!!(t.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||Vg(t.nodeValue,i)),t||Cr(n,!0)}else t=ns(t).createTextNode(o),t[be]=n,n.stateNode=t}return dt(n),null;case 31:if(i=n.memoizedState,t===null||t.memoizedState!==null){if(o=Gl(n),i!==null){if(t===null){if(!o)throw Error(a(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(557));t[be]=n}else ul(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),t=!1}else i=Yu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),t=!0;if(!t)return n.flags&256?(hn(n),n):(hn(n),null);if((n.flags&128)!==0)throw Error(a(558))}return dt(n),null;case 13:if(o=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=Gl(n),o!==null&&o.dehydrated!==null){if(t===null){if(!d)throw Error(a(318));if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));d[be]=n}else ul(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),d=!1}else d=Yu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(hn(n),n):(hn(n),null)}return hn(n),(n.flags&128)!==0?(n.lanes=i,n):(i=o!==null,t=t!==null&&t.memoizedState!==null,i&&(o=n.child,d=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(d=o.alternate.memoizedState.cachePool.pool),m=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(m=o.memoizedState.cachePool.pool),m!==d&&(o.flags|=2048)),i!==t&&i&&(n.child.flags|=8192),Ho(n,n.updateQueue),dt(n),null);case 4:return fe(),t===null&&af(n.stateNode.containerInfo),dt(n),null;case 10:return lr(n.type),dt(n),null;case 19:if(H(xt),o=n.memoizedState,o===null)return dt(n),null;if(d=(n.flags&128)!==0,m=o.rendering,m===null)if(d)ia(o,!1);else{if(yt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(m=To(t),m!==null){for(n.flags|=128,ia(o,!1),t=m.updateQueue,n.updateQueue=t,Ho(n,t),n.subtreeFlags=0,t=i,i=n.child;i!==null;)kp(i,t),i=i.sibling;return N(xt,xt.current&1|2),qe&&nr(n,o.treeForkCount),n.child}t=t.sibling}o.tail!==null&&it()>Go&&(n.flags|=128,d=!0,ia(o,!1),n.lanes=4194304)}else{if(!d)if(t=To(m),t!==null){if(n.flags|=128,d=!0,t=t.updateQueue,n.updateQueue=t,Ho(n,t),ia(o,!0),o.tail===null&&o.tailMode==="hidden"&&!m.alternate&&!qe)return dt(n),null}else 2*it()-o.renderingStartTime>Go&&i!==536870912&&(n.flags|=128,d=!0,ia(o,!1),n.lanes=4194304);o.isBackwards?(m.sibling=n.child,n.child=m):(t=o.last,t!==null?t.sibling=m:n.child=m,o.last=m)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=it(),t.sibling=null,i=xt.current,N(xt,d?i&1|2:i&1),qe&&nr(n,o.treeForkCount),t):(dt(n),null);case 22:case 23:return hn(n),ac(),o=n.memoizedState!==null,t!==null?t.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(i&536870912)!==0&&(n.flags&128)===0&&(dt(n),n.subtreeFlags&6&&(n.flags|=8192)):dt(n),i=n.updateQueue,i!==null&&Ho(n,i.retryQueue),i=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==i&&(n.flags|=2048),t!==null&&H(dl),null;case 24:return i=null,t!==null&&(i=t.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),lr(wt),dt(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function mw(t,n){switch(Vu(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return lr(wt),fe(),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(hn(n),n.alternate===null)throw Error(a(340));ul()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(hn(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(a(340));ul()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return H(xt),null;case 4:return fe(),null;case 10:return lr(n.type),null;case 22:case 23:return hn(n),ac(),t!==null&&H(dl),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return lr(wt),null;case 25:return null;default:return null}}function Qm(t,n){switch(Vu(n),n.tag){case 3:lr(wt),fe();break;case 26:case 27:case 5:xe(n);break;case 4:fe();break;case 31:n.memoizedState!==null&&hn(n);break;case 13:hn(n);break;case 19:H(xt);break;case 10:lr(n.type);break;case 22:case 23:hn(n),ac(),t!==null&&H(dl);break;case 24:lr(wt)}}function aa(t,n){try{var i=n.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var d=o.next;i=d;do{if((i.tag&t)===t){o=void 0;var m=i.create,S=i.inst;o=m(),S.destroy=o}i=i.next}while(i!==d)}}catch(_){We(n,n.return,_)}}function Lr(t,n,i){try{var o=n.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var m=d.next;o=m;do{if((o.tag&t)===t){var S=o.inst,_=S.destroy;if(_!==void 0){S.destroy=void 0,d=n;var P=i,ee=_;try{ee()}catch(ie){We(d,P,ie)}}}o=o.next}while(o!==m)}}catch(ie){We(n,n.return,ie)}}function Km(t){var n=t.updateQueue;if(n!==null){var i=t.stateNode;try{Hp(n,i)}catch(o){We(t,t.return,o)}}}function Jm(t,n,i){i.props=bl(t.type,t.memoizedProps),i.state=t.memoizedState;try{i.componentWillUnmount()}catch(o){We(t,n,o)}}function oa(t,n){try{var i=t.ref;if(i!==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 i=="function"?t.refCleanup=i(o):i.current=o}}catch(d){We(t,n,d)}}function $n(t,n){var i=t.ref,o=t.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(d){We(t,n,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){We(t,n,d)}else i.current=null}function Wm(t){var n=t.type,i=t.memoizedProps,o=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break e;case"img":i.src?o.src=i.src:i.srcSet&&(o.srcset=i.srcSet)}}catch(d){We(t,t.return,d)}}function Fc(t,n,i){try{var o=t.stateNode;Bw(o,t.type,i,n),o[Ee]=n}catch(d){We(t,t.return,d)}}function eg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ir(t.type)||t.tag===4}function Ic(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||eg(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&&Ir(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 Uc(t,n,i){var o=t.tag;if(o===5||o===6)t=t.stateNode,n?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(t,n):(n=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,n.appendChild(t),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=Wn));else if(o!==4&&(o===27&&Ir(t.type)&&(i=t.stateNode,n=null),t=t.child,t!==null))for(Uc(t,n,i),t=t.sibling;t!==null;)Uc(t,n,i),t=t.sibling}function qo(t,n,i){var o=t.tag;if(o===5||o===6)t=t.stateNode,n?i.insertBefore(t,n):i.appendChild(t);else if(o!==4&&(o===27&&Ir(t.type)&&(i=t.stateNode),t=t.child,t!==null))for(qo(t,n,i),t=t.sibling;t!==null;)qo(t,n,i),t=t.sibling}function tg(t){var n=t.stateNode,i=t.memoizedProps;try{for(var o=t.type,d=n.attributes;d.length;)n.removeAttributeNode(d[0]);Mt(n,o,i),n[be]=t,n[Ee]=i}catch(m){We(t,t.return,m)}}var ur=!1,Et=!1,Hc=!1,ng=typeof WeakSet=="function"?WeakSet:Set,Rt=null;function gw(t,n){if(t=t.containerInfo,uf=us,t=pp(t),Ou(t)){if("selectionStart"in t)var i={start:t.selectionStart,end:t.selectionEnd};else e:{i=(i=t.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var d=o.anchorOffset,m=o.focusNode;o=o.focusOffset;try{i.nodeType,m.nodeType}catch{i=null;break e}var S=0,_=-1,P=-1,ee=0,ie=0,ue=t,te=null;t:for(;;){for(var ne;ue!==i||d!==0&&ue.nodeType!==3||(_=S+d),ue!==m||o!==0&&ue.nodeType!==3||(P=S+o),ue.nodeType===3&&(S+=ue.nodeValue.length),(ne=ue.firstChild)!==null;)te=ue,ue=ne;for(;;){if(ue===t)break t;if(te===i&&++ee===d&&(_=S),te===m&&++ie===o&&(P=S),(ne=ue.nextSibling)!==null)break;ue=te,te=ue.parentNode}ue=ne}i=_===-1||P===-1?null:{start:_,end:P}}else i=null}i=i||{start:0,end:0}}else i=null;for(cf={focusedElem:t,selectionRange:i},us=!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,m=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(i=0;i<t.length;i++)d=t[i],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,i=n,d=m.memoizedProps,m=m.memoizedState,o=i.stateNode;try{var we=bl(i.type,d);t=o.getSnapshotBeforeUpdate(we,m),o.__reactInternalSnapshotBeforeUpdate=t}catch(je){We(i,i.return,je)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,i=t.nodeType,i===9)hf(t);else if(i===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":hf(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(a(163))}if(t=n.sibling,t!==null){t.return=n.return,Rt=t;break}Rt=n.return}}function rg(t,n,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:fr(t,i),o&4&&aa(5,i);break;case 1:if(fr(t,i),o&4)if(t=i.stateNode,n===null)try{t.componentDidMount()}catch(S){We(i,i.return,S)}else{var d=bl(i.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(d,n,t.__reactInternalSnapshotBeforeUpdate)}catch(S){We(i,i.return,S)}}o&64&&Km(i),o&512&&oa(i,i.return);break;case 3:if(fr(t,i),o&64&&(t=i.updateQueue,t!==null)){if(n=null,i.child!==null)switch(i.child.tag){case 27:case 5:n=i.child.stateNode;break;case 1:n=i.child.stateNode}try{Hp(t,n)}catch(S){We(i,i.return,S)}}break;case 27:n===null&&o&4&&tg(i);case 26:case 5:fr(t,i),n===null&&o&4&&Wm(i),o&512&&oa(i,i.return);break;case 12:fr(t,i);break;case 31:fr(t,i),o&4&&ag(t,i);break;case 13:fr(t,i),o&4&&og(t,i),o&64&&(t=i.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(i=Cw.bind(null,i),Vw(t,i))));break;case 22:if(o=i.memoizedState!==null||ur,!o){n=n!==null&&n.memoizedState!==null||Et,d=ur;var m=Et;ur=o,(Et=n)&&!m?dr(t,i,(i.subtreeFlags&8772)!==0):fr(t,i),ur=d,Et=m}break;case 30:break;default:fr(t,i)}}function lg(t){var n=t.alternate;n!==null&&(t.alternate=null,lg(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&bu(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,Kt=!1;function cr(t,n,i){for(i=i.child;i!==null;)ig(t,n,i),i=i.sibling}function ig(t,n,i){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(Nt,i)}catch{}switch(i.tag){case 26:Et||$n(i,n),cr(t,n,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Et||$n(i,n);var o=ht,d=Kt;Ir(i.type)&&(ht=i.stateNode,Kt=!1),cr(t,n,i),ga(i.stateNode),ht=o,Kt=d;break;case 5:Et||$n(i,n);case 6:if(o=ht,d=Kt,ht=null,cr(t,n,i),ht=o,Kt=d,ht!==null)if(Kt)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(i.stateNode)}catch(m){We(i,n,m)}else try{ht.removeChild(i.stateNode)}catch(m){We(i,n,m)}break;case 18:ht!==null&&(Kt?(t=ht,Kg(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,i.stateNode),hi(t)):Kg(ht,i.stateNode));break;case 4:o=ht,d=Kt,ht=i.stateNode.containerInfo,Kt=!0,cr(t,n,i),ht=o,Kt=d;break;case 0:case 11:case 14:case 15:Lr(2,i,n),Et||Lr(4,i,n),cr(t,n,i);break;case 1:Et||($n(i,n),o=i.stateNode,typeof o.componentWillUnmount=="function"&&Jm(i,n,o)),cr(t,n,i);break;case 21:cr(t,n,i);break;case 22:Et=(o=Et)||i.memoizedState!==null,cr(t,n,i),Et=o;break;default:cr(t,n,i)}}function ag(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{hi(t)}catch(i){We(n,n.return,i)}}}function og(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{hi(t)}catch(i){We(n,n.return,i)}}function bw(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new ng),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new ng),n;default:throw Error(a(435,t.tag))}}function Po(t,n){var i=bw(t);n.forEach(function(o){if(!i.has(o)){i.add(o);var d=Aw.bind(null,t,o);o.then(d,d)}})}function Jt(t,n){var i=n.deletions;if(i!==null)for(var o=0;o<i.length;o++){var d=i[o],m=t,S=n,_=S;e:for(;_!==null;){switch(_.tag){case 27:if(Ir(_.type)){ht=_.stateNode,Kt=!1;break e}break;case 5:ht=_.stateNode,Kt=!1;break e;case 3:case 4:ht=_.stateNode.containerInfo,Kt=!0;break e}_=_.return}if(ht===null)throw Error(a(160));ig(m,S,d),ht=null,Kt=!1,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)sg(n,t),n=n.sibling}var Fn=null;function sg(t,n){var i=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Jt(n,t),Wt(t),o&4&&(Lr(3,t,t.return),aa(3,t),Lr(5,t,t.return));break;case 1:Jt(n,t),Wt(t),o&512&&(Et||i===null||$n(i,i.return)),o&64&&ur&&(t=t.updateQueue,t!==null&&(o=t.callbacks,o!==null&&(i=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=i===null?o:i.concat(o))));break;case 26:var d=Fn;if(Jt(n,t),Wt(t),o&512&&(Et||i===null||$n(i,i.return)),o&4){var m=i!==null?i.memoizedState:null;if(o=t.memoizedState,i===null)if(o===null)if(t.stateNode===null){e:{o=t.type,i=t.memoizedProps,d=d.ownerDocument||d;t:switch(o){case"title":m=d.getElementsByTagName("title")[0],(!m||m[Oi]||m[be]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=d.createElement(o),d.head.insertBefore(m,d.querySelector("head > title"))),Mt(m,o,i),m[be]=t,jt(m),o=m;break e;case"link":var S=sb("link","href",d).get(o+(i.href||""));if(S){for(var _=0;_<S.length;_++)if(m=S[_],m.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&m.getAttribute("rel")===(i.rel==null?null:i.rel)&&m.getAttribute("title")===(i.title==null?null:i.title)&&m.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){S.splice(_,1);break t}}m=d.createElement(o),Mt(m,o,i),d.head.appendChild(m);break;case"meta":if(S=sb("meta","content",d).get(o+(i.content||""))){for(_=0;_<S.length;_++)if(m=S[_],m.getAttribute("content")===(i.content==null?null:""+i.content)&&m.getAttribute("name")===(i.name==null?null:i.name)&&m.getAttribute("property")===(i.property==null?null:i.property)&&m.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&m.getAttribute("charset")===(i.charSet==null?null:i.charSet)){S.splice(_,1);break t}}m=d.createElement(o),Mt(m,o,i),d.head.appendChild(m);break;default:throw Error(a(468,o))}m[be]=t,jt(m),o=m}t.stateNode=o}else ub(d,t.type,t.stateNode);else t.stateNode=ob(d,o,t.memoizedProps);else m!==o?(m===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):m.count--,o===null?ub(d,t.type,t.stateNode):ob(d,o,t.memoizedProps)):o===null&&t.stateNode!==null&&Fc(t,t.memoizedProps,i.memoizedProps)}break;case 27:Jt(n,t),Wt(t),o&512&&(Et||i===null||$n(i,i.return)),i!==null&&o&4&&Fc(t,t.memoizedProps,i.memoizedProps);break;case 5:if(Jt(n,t),Wt(t),o&512&&(Et||i===null||$n(i,i.return)),t.flags&32){d=t.stateNode;try{zl(d,"")}catch(we){We(t,t.return,we)}}o&4&&t.stateNode!=null&&(d=t.memoizedProps,Fc(t,d,i!==null?i.memoizedProps:d)),o&1024&&(Hc=!0);break;case 6:if(Jt(n,t),Wt(t),o&4){if(t.stateNode===null)throw Error(a(162));o=t.memoizedProps,i=t.stateNode;try{i.nodeValue=o}catch(we){We(t,t.return,we)}}break;case 3:if(is=null,d=Fn,Fn=rs(n.containerInfo),Jt(n,t),Fn=d,Wt(t),o&4&&i!==null&&i.memoizedState.isDehydrated)try{hi(n.containerInfo)}catch(we){We(t,t.return,we)}Hc&&(Hc=!1,ug(t));break;case 4:o=Fn,Fn=rs(t.stateNode.containerInfo),Jt(n,t),Wt(t),Fn=o;break;case 12:Jt(n,t),Wt(t);break;case 31:Jt(n,t),Wt(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Po(t,o)));break;case 13:Jt(n,t),Wt(t),t.child.flags&8192&&t.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Vo=it()),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Po(t,o)));break;case 22:d=t.memoizedState!==null;var P=i!==null&&i.memoizedState!==null,ee=ur,ie=Et;if(ur=ee||d,Et=ie||P,Jt(n,t),Et=ie,ur=ee,Wt(t),o&8192)e:for(n=t.stateNode,n._visibility=d?n._visibility&-2:n._visibility|1,d&&(i===null||P||ur||Et||yl(t)),i=null,n=t;;){if(n.tag===5||n.tag===26){if(i===null){P=i=n;try{if(m=P.stateNode,d)S=m.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{_=P.stateNode;var ue=P.memoizedProps.style,te=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;_.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(we){We(P,P.return,we)}}}else if(n.tag===6){if(i===null){P=n;try{P.stateNode.nodeValue=d?"":P.memoizedProps}catch(we){We(P,P.return,we)}}}else if(n.tag===18){if(i===null){P=n;try{var ne=P.stateNode;d?Jg(ne,!0):Jg(P.stateNode,!1)}catch(we){We(P,P.return,we)}}}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;i===n&&(i=null),n=n.return}i===n&&(i=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=t.updateQueue,o!==null&&(i=o.retryQueue,i!==null&&(o.retryQueue=null,Po(t,i))));break;case 19:Jt(n,t),Wt(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Po(t,o)));break;case 30:break;case 21:break;default:Jt(n,t),Wt(t)}}function Wt(t){var n=t.flags;if(n&2){try{for(var i,o=t.return;o!==null;){if(eg(o)){i=o;break}o=o.return}if(i==null)throw Error(a(160));switch(i.tag){case 27:var d=i.stateNode,m=Ic(t);qo(t,m,d);break;case 5:var S=i.stateNode;i.flags&32&&(zl(S,""),i.flags&=-33);var _=Ic(t);qo(t,_,S);break;case 3:case 4:var P=i.stateNode.containerInfo,ee=Ic(t);Uc(t,ee,P);break;default:throw Error(a(161))}}catch(ie){We(t,t.return,ie)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function ug(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;ug(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function fr(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)rg(t,n.alternate,n),n=n.sibling}function yl(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:Lr(4,n,n.return),yl(n);break;case 1:$n(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&Jm(n,n.return,i),yl(n);break;case 27:ga(n.stateNode);case 26:case 5:$n(n,n.return),yl(n);break;case 22:n.memoizedState===null&&yl(n);break;case 30:yl(n);break;default:yl(n)}t=t.sibling}}function dr(t,n,i){for(i=i&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,d=t,m=n,S=m.flags;switch(m.tag){case 0:case 11:case 15:dr(d,m,i),aa(4,m);break;case 1:if(dr(d,m,i),o=m,d=o.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(ee){We(o,o.return,ee)}if(o=m,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++)Up(P[d],_)}catch(ee){We(o,o.return,ee)}}i&&S&64&&Km(m),oa(m,m.return);break;case 27:tg(m);case 26:case 5:dr(d,m,i),i&&o===null&&S&4&&Wm(m),oa(m,m.return);break;case 12:dr(d,m,i);break;case 31:dr(d,m,i),i&&S&4&&ag(d,m);break;case 13:dr(d,m,i),i&&S&4&&og(d,m);break;case 22:m.memoizedState===null&&dr(d,m,i),oa(m,m.return);break;case 30:break;default:dr(d,m,i)}n=n.sibling}}function qc(t,n){var i=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==i&&(t!=null&&t.refCount++,i!=null&&Yi(i))}function Pc(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Yi(t))}function In(t,n,i,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)cg(t,n,i,o),n=n.sibling}function cg(t,n,i,o){var d=n.flags;switch(n.tag){case 0:case 11:case 15:In(t,n,i,o),d&2048&&aa(9,n);break;case 1:In(t,n,i,o);break;case 3:In(t,n,i,o),d&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Yi(t)));break;case 12:if(d&2048){In(t,n,i,o),t=n.stateNode;try{var m=n.memoizedProps,S=m.id,_=m.onPostCommit;typeof _=="function"&&_(S,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(P){We(n,n.return,P)}}else In(t,n,i,o);break;case 31:In(t,n,i,o);break;case 13:In(t,n,i,o);break;case 23:break;case 22:m=n.stateNode,S=n.alternate,n.memoizedState!==null?m._visibility&2?In(t,n,i,o):sa(t,n):m._visibility&2?In(t,n,i,o):(m._visibility|=2,ni(t,n,i,o,(n.subtreeFlags&10256)!==0||!1)),d&2048&&qc(S,n);break;case 24:In(t,n,i,o),d&2048&&Pc(n.alternate,n);break;default:In(t,n,i,o)}}function ni(t,n,i,o,d){for(d=d&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var m=t,S=n,_=i,P=o,ee=S.flags;switch(S.tag){case 0:case 11:case 15:ni(m,S,_,P,d),aa(8,S);break;case 23:break;case 22:var ie=S.stateNode;S.memoizedState!==null?ie._visibility&2?ni(m,S,_,P,d):sa(m,S):(ie._visibility|=2,ni(m,S,_,P,d)),d&&ee&2048&&qc(S.alternate,S);break;case 24:ni(m,S,_,P,d),d&&ee&2048&&Pc(S.alternate,S);break;default:ni(m,S,_,P,d)}n=n.sibling}}function sa(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var i=t,o=n,d=o.flags;switch(o.tag){case 22:sa(i,o),d&2048&&qc(o.alternate,o);break;case 24:sa(i,o),d&2048&&Pc(o.alternate,o);break;default:sa(i,o)}n=n.sibling}}var ua=8192;function ri(t,n,i){if(t.subtreeFlags&ua)for(t=t.child;t!==null;)fg(t,n,i),t=t.sibling}function fg(t,n,i){switch(t.tag){case 26:ri(t,n,i),t.flags&ua&&t.memoizedState!==null&&r2(i,Fn,t.memoizedState,t.memoizedProps);break;case 5:ri(t,n,i);break;case 3:case 4:var o=Fn;Fn=rs(t.stateNode.containerInfo),ri(t,n,i),Fn=o;break;case 22:t.memoizedState===null&&(o=t.alternate,o!==null&&o.memoizedState!==null?(o=ua,ua=16777216,ri(t,n,i),ua=o):ri(t,n,i));break;default:ri(t,n,i)}}function dg(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 ca(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var o=n[i];Rt=o,pg(o,t)}dg(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)hg(t),t=t.sibling}function hg(t){switch(t.tag){case 0:case 11:case 15:ca(t),t.flags&2048&&Lr(9,t,t.return);break;case 3:ca(t);break;case 12:ca(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,$o(t)):ca(t);break;default:ca(t)}}function $o(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var o=n[i];Rt=o,pg(o,t)}dg(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:Lr(8,n,n.return),$o(n);break;case 22:i=n.stateNode,i._visibility&2&&(i._visibility&=-3,$o(n));break;default:$o(n)}t=t.sibling}}function pg(t,n){for(;Rt!==null;){var i=Rt;switch(i.tag){case 0:case 11:case 15:Lr(8,i,n);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var o=i.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Yi(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,Rt=o;else e:for(i=t;Rt!==null;){o=Rt;var d=o.sibling,m=o.return;if(lg(o),o===i){Rt=null;break e}if(d!==null){d.return=m,Rt=d;break e}Rt=m}}}var yw={getCacheForType:function(t){var n=Dt(wt),i=n.data.get(t);return i===void 0&&(i=t(),n.data.set(t,i)),i},cacheSignal:function(){return Dt(wt).controller.signal}},xw=typeof WeakMap=="function"?WeakMap:Map,Ze=0,ot=null,ze=null,Ie=0,Je=0,pn=null,Dr=!1,li=!1,$c=!1,hr=0,yt=0,Or=0,xl=0,Vc=0,mn=0,ii=0,fa=null,en=null,Gc=!1,Vo=0,mg=0,Go=1/0,Yo=null,Mr=null,Tt=0,zr=null,ai=null,pr=0,Yc=0,Xc=null,gg=null,da=0,Zc=null;function gn(){return(Ze&2)!==0&&Ie!==0?Ie&-Ie:F.T!==null?tf():to()}function bg(){if(mn===0)if((Ie&536870912)===0||qe){var t=kn;kn<<=1,(kn&3932160)===0&&(kn=262144),mn=t}else mn=536870912;return t=dn.current,t!==null&&(t.flags|=32),mn}function tn(t,n,i){(t===ot&&(Je===2||Je===9)||t.cancelPendingCommit!==null)&&(oi(t,0),Br(t,Ie,mn,!1)),zn(t,i),((Ze&2)===0||t!==ot)&&(t===ot&&((Ze&2)===0&&(xl|=i),yt===4&&Br(t,Ie,mn,!1)),Vn(t))}function yg(t,n,i){if((Ze&6)!==0)throw Error(a(327));var o=!i&&(n&127)===0&&(n&t.expiredLanes)===0||nl(t,n),d=o?Sw(t,n):Kc(t,n,!0),m=o;do{if(d===0){li&&!o&&Br(t,n,0,!1);break}else{if(i=t.current.alternate,m&&!vw(i)){d=Kc(t,n,!1),m=!1;continue}if(d===2){if(m=n,t.errorRecoveryDisabledLanes&m)var S=0;else S=t.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){n=S;e:{var _=t;d=fa;var P=_.current.memoizedState.isDehydrated;if(P&&(oi(_,S).flags|=256),S=Kc(_,S,!1),S!==2){if($c&&!P){_.errorRecoveryDisabledLanes|=m,xl|=m,d=4;break e}m=en,en=d,m!==null&&(en===null?en=m:en.push.apply(en,m))}d=S}if(m=!1,d!==2)continue}}if(d===1){oi(t,0),Br(t,n,0,!0);break}e:{switch(o=t,m=d,m){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:Br(o,n,mn,!Dr);break e;case 2:en=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(d=Vo+300-it(),10<d)){if(Br(o,n,mn,!Dr),Kn(o,0,!0)!==0)break e;pr=n,o.timeoutHandle=Zg(xg.bind(null,o,i,en,Yo,Gc,n,mn,xl,ii,Dr,m,"Throttled",-0,0),d);break e}xg(o,i,en,Yo,Gc,n,mn,xl,ii,Dr,m,null,-0,0)}}break}while(!0);Vn(t)}function xg(t,n,i,o,d,m,S,_,P,ee,ie,ue,te,ne){if(t.timeoutHandle=-1,ue=n.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Wn},fg(n,m,ue);var we=(m&62914560)===m?Vo-it():(m&4194048)===m?mg-it():0;if(we=l2(ue,we),we!==null){pr=m,t.cancelPendingCommit=we(Ng.bind(null,t,n,m,i,o,d,S,_,P,ie,ue,null,te,ne)),Br(t,m,S,!ee);return}}Ng(t,n,m,i,o,d,S,_,P)}function vw(t){for(var n=t;;){var i=n.tag;if((i===0||i===11||i===15)&&n.flags&16384&&(i=n.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var o=0;o<i.length;o++){var d=i[o],m=d.getSnapshot;d=d.value;try{if(!cn(m(),d))return!1}catch{return!1}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;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 Br(t,n,i,o){n&=~Vc,n&=~xl,t.suspendedLanes|=n,t.pingedLanes&=~n,o&&(t.warmLanes|=n),o=t.expirationTimes;for(var d=n;0<d;){var m=31-Qe(d),S=1<<m;o[m]=-1,d&=~S}i!==0&&Ri(t,i,n)}function Xo(){return(Ze&6)===0?(ha(0),!1):!0}function Qc(){if(ze!==null){if(Je===0)var t=ze.return;else t=ze,rr=cl=null,dc(t),Kl=null,Zi=0,t=ze;for(;t!==null;)Qm(t.alternate,t),t=t.return;ze=null}}function oi(t,n){var i=t.timeoutHandle;i!==-1&&(t.timeoutHandle=-1,Uw(i)),i=t.cancelPendingCommit,i!==null&&(t.cancelPendingCommit=null,i()),pr=0,Qc(),ot=t,ze=i=tr(t.current,null),Ie=n,Je=0,pn=null,Dr=!1,li=nl(t,n),$c=!1,ii=mn=Vc=xl=Or=yt=0,en=fa=null,Gc=!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-Qe(o),m=1<<d;n|=t[d],o&=~m}return hr=n,mo(),i}function vg(t,n){Le=null,F.H=ra,n===Ql||n===ko?(n=zp(),Je=3):n===ec?(n=zp(),Je=4):Je=n===Tc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,pn=n,ze===null&&(yt=1,Bo(t,Nn(n,t.current)))}function wg(){var t=dn.current;return t===null?!0:(Ie&4194048)===Ie?_n===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?t===_n:!1}function Sg(){var t=F.H;return F.H=ra,t===null?ra:t}function kg(){var t=F.A;return F.A=yw,t}function Zo(){yt=4,Dr||(Ie&4194048)!==Ie&&dn.current!==null||(li=!0),(Or&134217727)===0&&(xl&134217727)===0||ot===null||Br(ot,Ie,mn,!1)}function Kc(t,n,i){var o=Ze;Ze|=2;var d=Sg(),m=kg();(ot!==t||Ie!==n)&&(Yo=null,oi(t,n)),n=!1;var S=yt;e:do try{if(Je!==0&&ze!==null){var _=ze,P=pn;switch(Je){case 8:Qc(),S=6;break e;case 3:case 2:case 9:case 6:dn.current===null&&(n=!0);var ee=Je;if(Je=0,pn=null,si(t,_,P,ee),i&&li){S=0;break e}break;default:ee=Je,Je=0,pn=null,si(t,_,P,ee)}}ww(),S=yt;break}catch(ie){vg(t,ie)}while(!0);return n&&t.shellSuspendCounter++,rr=cl=null,Ze=o,F.H=d,F.A=m,ze===null&&(ot=null,Ie=0,mo()),S}function ww(){for(;ze!==null;)Eg(ze)}function Sw(t,n){var i=Ze;Ze|=2;var o=Sg(),d=kg();ot!==t||Ie!==n?(Yo=null,Go=it()+500,oi(t,n)):li=nl(t,n);e:do try{if(Je!==0&&ze!==null){n=ze;var m=pn;t:switch(Je){case 1:Je=0,pn=null,si(t,n,m,1);break;case 2:case 9:if(Op(m)){Je=0,pn=null,Cg(n);break}n=function(){Je!==2&&Je!==9||ot!==t||(Je=7),Vn(t)},m.then(n,n);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:Op(m)?(Je=0,pn=null,Cg(n)):(Je=0,pn=null,si(t,n,m,7));break;case 5:var S=null;switch(ze.tag){case 26:S=ze.memoizedState;case 5:case 27:var _=ze;if(S?cb(S):_.stateNode.complete){Je=0,pn=null;var P=_.sibling;if(P!==null)ze=P;else{var ee=_.return;ee!==null?(ze=ee,Qo(ee)):ze=null}break t}}Je=0,pn=null,si(t,n,m,5);break;case 6:Je=0,pn=null,si(t,n,m,6);break;case 8:Qc(),yt=6;break e;default:throw Error(a(462))}}kw();break}catch(ie){vg(t,ie)}while(!0);return rr=cl=null,F.H=o,F.A=d,Ze=i,ze!==null?0:(ot=null,Ie=0,mo(),yt)}function kw(){for(;ze!==null&&!Zt();)Eg(ze)}function Eg(t){var n=Xm(t.alternate,t,hr);t.memoizedProps=t.pendingProps,n===null?Qo(t):ze=n}function Cg(t){var n=t,i=n.alternate;switch(n.tag){case 15:case 0:n=qm(i,n,n.pendingProps,n.type,void 0,Ie);break;case 11:n=qm(i,n,n.pendingProps,n.type.render,n.ref,Ie);break;case 5:dc(n);default:Qm(i,n),n=ze=kp(n,hr),n=Xm(i,n,hr)}t.memoizedProps=t.pendingProps,n===null?Qo(t):ze=n}function si(t,n,i,o){rr=cl=null,dc(n),Kl=null,Zi=0;var d=n.return;try{if(fw(t,d,n,i,Ie)){yt=1,Bo(t,Nn(i,t.current)),ze=null;return}}catch(m){if(d!==null)throw ze=d,m;yt=1,Bo(t,Nn(i,t.current)),ze=null;return}n.flags&32768?(qe||o===1?t=!0:li||(Ie&536870912)!==0?t=!1:(Dr=t=!0,(o===2||o===9||o===3||o===6)&&(o=dn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Ag(n,t)):Qo(n)}function Qo(t){var n=t;do{if((n.flags&32768)!==0){Ag(n,Dr);return}t=n.return;var i=pw(n.alternate,n,hr);if(i!==null){ze=i;return}if(n=n.sibling,n!==null){ze=n;return}ze=n=t}while(n!==null);yt===0&&(yt=5)}function Ag(t,n){do{var i=mw(t.alternate,t);if(i!==null){i.flags&=32767,ze=i;return}if(i=t.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!n&&(t=t.sibling,t!==null)){ze=t;return}ze=t=i}while(t!==null);yt=6,ze=null}function Ng(t,n,i,o,d,m,S,_,P){t.cancelPendingCommit=null;do Ko();while(Tt!==0);if((Ze&6)!==0)throw Error(a(327));if(n!==null){if(n===t.current)throw Error(a(177));if(m=n.lanes|n.childLanes,m|=Iu,Wa(t,i,m,S,_,P),t===ot&&(ze=ot=null,Ie=0),ai=n,zr=t,pr=i,Yc=m,Xc=d,gg=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Nw(Re,function(){return Lg(),null})):(t.callbackNode=null,t.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=F.T,F.T=null,d=O.p,O.p=2,S=Ze,Ze|=4;try{gw(t,n,i)}finally{Ze=S,O.p=d,F.T=o}}Tt=1,Tg(),jg(),Rg()}}function Tg(){if(Tt===1){Tt=0;var t=zr,n=ai,i=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||i){i=F.T,F.T=null;var o=O.p;O.p=2;var d=Ze;Ze|=4;try{sg(n,t);var m=cf,S=pp(t.containerInfo),_=m.focusedElem,P=m.selectionRange;if(S!==_&&_&&_.ownerDocument&&hp(_.ownerDocument.documentElement,_)){if(P!==null&&Ou(_)){var ee=P.start,ie=P.end;if(ie===void 0&&(ie=ee),"selectionStart"in _)_.selectionStart=ee,_.selectionEnd=Math.min(ie,_.value.length);else{var ue=_.ownerDocument||document,te=ue&&ue.defaultView||window;if(te.getSelection){var ne=te.getSelection(),we=_.textContent.length,je=Math.min(P.start,we),rt=P.end===void 0?je:Math.min(P.end,we);!ne.extend&&je>rt&&(S=rt,rt=je,je=S);var K=dp(_,je),Z=dp(_,rt);if(K&&Z&&(ne.rangeCount!==1||ne.anchorNode!==K.node||ne.anchorOffset!==K.offset||ne.focusNode!==Z.node||ne.focusOffset!==Z.offset)){var W=ue.createRange();W.setStart(K.node,K.offset),ne.removeAllRanges(),je>rt?(ne.addRange(W),ne.extend(Z.node,Z.offset)):(W.setEnd(Z.node,Z.offset),ne.addRange(W))}}}}for(ue=[],ne=_;ne=ne.parentNode;)ne.nodeType===1&&ue.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<ue.length;_++){var oe=ue[_];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}us=!!uf,cf=uf=null}finally{Ze=d,O.p=o,F.T=i}}t.current=n,Tt=2}}function jg(){if(Tt===2){Tt=0;var t=zr,n=ai,i=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||i){i=F.T,F.T=null;var o=O.p;O.p=2;var d=Ze;Ze|=4;try{rg(t,n.alternate,n)}finally{Ze=d,O.p=o,F.T=i}}Tt=3}}function Rg(){if(Tt===4||Tt===3){Tt=0,Pt();var t=zr,n=ai,i=pr,o=gg;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Tt=5:(Tt=0,ai=zr=null,_g(t,t.pendingLanes));var d=t.pendingLanes;if(d===0&&(Mr=null),Di(i),n=n.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(Nt,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=F.T,d=O.p,O.p=2,F.T=null;try{for(var m=t.onRecoverableError,S=0;S<o.length;S++){var _=o[S];m(_.value,{componentStack:_.stack})}}finally{F.T=n,O.p=d}}(pr&3)!==0&&Ko(),Vn(t),d=t.pendingLanes,(i&261930)!==0&&(d&42)!==0?t===Zc?da++:(da=0,Zc=t):da=0,ha(0)}}function _g(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Yi(n)))}function Ko(){return Tg(),jg(),Rg(),Lg()}function Lg(){if(Tt!==5)return!1;var t=zr,n=Yc;Yc=0;var i=Di(pr),o=F.T,d=O.p;try{O.p=32>i?32:i,F.T=null,i=Xc,Xc=null;var m=zr,S=pr;if(Tt=0,ai=zr=null,pr=0,(Ze&6)!==0)throw Error(a(331));var _=Ze;if(Ze|=4,hg(m.current),cg(m,m.current,S,i),Ze=_,ha(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(Nt,m)}catch{}return!0}finally{O.p=d,F.T=o,_g(t,n)}}function Dg(t,n,i){n=Nn(i,n),n=Nc(t.stateNode,n,2),t=jr(t,n,2),t!==null&&(zn(t,2),Vn(t))}function We(t,n,i){if(t.tag===3)Dg(t,t,i);else for(;n!==null;){if(n.tag===3){Dg(n,t,i);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Mr===null||!Mr.has(o))){t=Nn(i,t),i=Om(2),o=jr(n,i,2),o!==null&&(Mm(i,o,n,t),zn(o,2),Vn(o));break}}n=n.return}}function Jc(t,n,i){var o=t.pingCache;if(o===null){o=t.pingCache=new xw;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(i)||($c=!0,d.add(i),t=Ew.bind(null,t,n,i),n.then(t,t))}function Ew(t,n,i){var o=t.pingCache;o!==null&&o.delete(n),t.pingedLanes|=t.suspendedLanes&i,t.warmLanes&=~i,ot===t&&(Ie&i)===i&&(yt===4||yt===3&&(Ie&62914560)===Ie&&300>it()-Vo?(Ze&2)===0&&oi(t,0):Vc|=i,ii===Ie&&(ii=0)),Vn(t)}function Og(t,n){n===0&&(n=Ja()),t=ol(t,n),t!==null&&(zn(t,n),Vn(t))}function Cw(t){var n=t.memoizedState,i=0;n!==null&&(i=n.retryLane),Og(t,i)}function Aw(t,n){var i=0;switch(t.tag){case 31:case 13:var o=t.stateNode,d=t.memoizedState;d!==null&&(i=d.retryLane);break;case 19:o=t.stateNode;break;case 22:o=t.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(n),Og(t,i)}function Nw(t,n){return pt(t,n)}var Jo=null,ui=null,Wc=!1,Wo=!1,ef=!1,Fr=0;function Vn(t){t!==ui&&t.next===null&&(ui===null?Jo=ui=t:ui=ui.next=t),Wo=!0,Wc||(Wc=!0,jw())}function ha(t,n){if(!ef&&Wo){ef=!0;do for(var i=!1,o=Jo;o!==null;){if(t!==0){var d=o.pendingLanes;if(d===0)var m=0;else{var S=o.suspendedLanes,_=o.pingedLanes;m=(1<<31-Qe(42|t)+1)-1,m&=d&~(S&~_),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(i=!0,Fg(o,m))}else m=Ie,m=Kn(o,o===ot?m:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(m&3)===0||nl(o,m)||(i=!0,Fg(o,m));o=o.next}while(i);ef=!1}}function Tw(){Mg()}function Mg(){Wo=Wc=!1;var t=0;Fr!==0&&Iw()&&(t=Fr);for(var n=it(),i=null,o=Jo;o!==null;){var d=o.next,m=zg(o,n);m===0?(o.next=null,i===null?Jo=d:i.next=d,d===null&&(ui=i)):(i=o,(t!==0||(m&3)!==0)&&(Wo=!0)),o=d}Tt!==0&&Tt!==5||ha(t),Fr!==0&&(Fr=0)}function zg(t,n){for(var i=t.suspendedLanes,o=t.pingedLanes,d=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var S=31-Qe(m),_=1<<S,P=d[S];P===-1?((_&i)===0||(_&o)!==0)&&(d[S]=gu(_,n)):P<=n&&(t.expiredLanes|=_),m&=~_}if(n=ot,i=Ie,i=Kn(t,t===n?i:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o=t.callbackNode,i===0||t===n&&(Je===2||Je===9)||t.cancelPendingCommit!==null)return o!==null&&o!==null&&_t(o),t.callbackNode=null,t.callbackPriority=0;if((i&3)===0||nl(t,i)){if(n=i&-i,n===t.callbackPriority)return n;switch(o!==null&&_t(o),Di(i)){case 2:case 8:i=me;break;case 32:i=Re;break;case 268435456:i=Pe;break;default:i=Re}return o=Bg.bind(null,t),i=pt(i,o),t.callbackPriority=n,t.callbackNode=i,n}return o!==null&&o!==null&&_t(o),t.callbackPriority=2,t.callbackNode=null,2}function Bg(t,n){if(Tt!==0&&Tt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var i=t.callbackNode;if(Ko()&&t.callbackNode!==i)return null;var o=Ie;return o=Kn(t,t===ot?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o===0?null:(yg(t,o,n),zg(t,it()),t.callbackNode!=null&&t.callbackNode===i?Bg.bind(null,t):null)}function Fg(t,n){if(Ko())return null;yg(t,n,!0)}function jw(){Hw(function(){(Ze&6)!==0?pt(ae,Tw):Mg()})}function tf(){if(Fr===0){var t=Xl;t===0&&(t=tl,tl<<=1,(tl&261888)===0&&(tl=256)),Fr=t}return Fr}function Ig(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ao(""+t)}function Ug(t,n){var i=n.ownerDocument.createElement("input");return i.name=n.name,i.value=n.value,t.id&&i.setAttribute("form",t.id),n.parentNode.insertBefore(i,n),t=new FormData(t),i.parentNode.removeChild(i),t}function Rw(t,n,i,o,d){if(n==="submit"&&i&&i.stateNode===d){var m=Ig((d[Ee]||null).action),S=o.submitter;S&&(n=(n=S[Ee]||null)?Ig(n.formAction):S.getAttribute("formAction"),n!==null&&(m=n,S=null));var _=new co("action","action",null,o,d);t.push({event:_,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Fr!==0){var P=S?Ug(d,S):new FormData(d);wc(i,{pending:!0,data:P,method:d.method,action:m},null,P)}}else typeof m=="function"&&(_.preventDefault(),P=S?Ug(d,S):new FormData(d),wc(i,{pending:!0,data:P,method:d.method,action:m},m,P))},currentTarget:d}]})}}for(var nf=0;nf<Fu.length;nf++){var rf=Fu[nf],_w=rf.toLowerCase(),Lw=rf[0].toUpperCase()+rf.slice(1);Bn(_w,"on"+Lw)}Bn(bp,"onAnimationEnd"),Bn(yp,"onAnimationIteration"),Bn(xp,"onAnimationStart"),Bn("dblclick","onDoubleClick"),Bn("focusin","onFocus"),Bn("focusout","onBlur"),Bn(Xv,"onTransitionRun"),Bn(Zv,"onTransitionStart"),Bn(Qv,"onTransitionCancel"),Bn(vp,"onTransitionEnd"),Ol("onMouseEnter",["mouseout","mouseover"]),Ol("onMouseLeave",["mouseout","mouseover"]),Ol("onPointerEnter",["pointerout","pointerover"]),Ol("onPointerLeave",["pointerout","pointerover"]),rl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rl("onBeforeInput",["compositionend","keypress","textInput","paste"]),rl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pa="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(" "),Dw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(pa));function Hg(t,n){n=(n&4)!==0;for(var i=0;i<t.length;i++){var o=t[i],d=o.event;o=o.listeners;e:{var m=void 0;if(n)for(var S=o.length-1;0<=S;S--){var _=o[S],P=_.instance,ee=_.currentTarget;if(_=_.listener,P!==m&&d.isPropagationStopped())break e;m=_,d.currentTarget=ee;try{m(d)}catch(ie){po(ie)}d.currentTarget=null,m=P}else for(S=0;S<o.length;S++){if(_=o[S],P=_.instance,ee=_.currentTarget,_=_.listener,P!==m&&d.isPropagationStopped())break e;m=_,d.currentTarget=ee;try{m(d)}catch(ie){po(ie)}d.currentTarget=null,m=P}}}}function Be(t,n){var i=n[at];i===void 0&&(i=n[at]=new Set);var o=t+"__bubble";i.has(o)||(qg(n,t,2,!1),i.add(o))}function lf(t,n,i){var o=0;n&&(o|=4),qg(i,t,o,n)}var es="_reactListening"+Math.random().toString(36).slice(2);function af(t){if(!t[es]){t[es]=!0,Mh.forEach(function(i){i!=="selectionchange"&&(Dw.has(i)||lf(i,!1,t),lf(i,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[es]||(n[es]=!0,lf("selectionchange",!1,n))}}function qg(t,n,i,o){switch(bb(n)){case 2:var d=o2;break;case 8:d=s2;break;default:d=wf}i=d.bind(null,n,i,t),d=void 0,!Cu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),o?d!==void 0?t.addEventListener(n,i,{capture:!0,passive:d}):t.addEventListener(n,i,!0):d!==void 0?t.addEventListener(n,i,{passive:d}):t.addEventListener(n,i,!1)}function of(t,n,i,o,d){var m=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var S=o.tag;if(S===3||S===4){var _=o.stateNode.containerInfo;if(_===d)break;if(S===4)for(S=o.return;S!==null;){var P=S.tag;if((P===3||P===4)&&S.stateNode.containerInfo===d)return;S=S.return}for(;_!==null;){if(S=_l(_),S===null)return;if(P=S.tag,P===5||P===6||P===26||P===27){o=m=S;continue e}_=_.parentNode}}o=o.return}Yh(function(){var ee=m,ie=ku(i),ue=[];e:{var te=wp.get(t);if(te!==void 0){var ne=co,we=t;switch(t){case"keypress":if(so(i)===0)break e;case"keydown":case"keyup":ne=Av;break;case"focusin":we="focus",ne=ju;break;case"focusout":we="blur",ne=ju;break;case"beforeblur":case"afterblur":ne=ju;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=Qh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=pv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=jv;break;case bp:case yp:case xp:ne=bv;break;case vp:ne=_v;break;case"scroll":case"scrollend":ne=dv;break;case"wheel":ne=Dv;break;case"copy":case"cut":case"paste":ne=xv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Jh;break;case"toggle":case"beforetoggle":ne=Mv}var je=(n&4)!==0,rt=!je&&(t==="scroll"||t==="scrollend"),K=je?te!==null?te+"Capture":null:te;je=[];for(var Z=ee,W;Z!==null;){var oe=Z;if(W=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||W===null||K===null||(oe=zi(Z,K),oe!=null&&je.push(ma(Z,oe,W))),rt)break;Z=Z.return}0<je.length&&(te=new ne(te,we,null,i,ie),ue.push({event:te,listeners:je}))}}if((n&7)===0){e:{if(te=t==="mouseover"||t==="pointerover",ne=t==="mouseout"||t==="pointerout",te&&i!==Su&&(we=i.relatedTarget||i.fromElement)&&(_l(we)||we[Ce]))break e;if((ne||te)&&(te=ie.window===ie?ie:(te=ie.ownerDocument)?te.defaultView||te.parentWindow:window,ne?(we=i.relatedTarget||i.toElement,ne=ee,we=we?_l(we):null,we!==null&&(rt=u(we),je=we.tag,we!==rt||je!==5&&je!==27&&je!==6)&&(we=null)):(ne=null,we=ee),ne!==we)){if(je=Qh,oe="onMouseLeave",K="onMouseEnter",Z="mouse",(t==="pointerout"||t==="pointerover")&&(je=Jh,oe="onPointerLeave",K="onPointerEnter",Z="pointer"),rt=ne==null?te:Mi(ne),W=we==null?te:Mi(we),te=new je(oe,Z+"leave",ne,i,ie),te.target=rt,te.relatedTarget=W,oe=null,_l(ie)===ee&&(je=new je(K,Z+"enter",we,i,ie),je.target=W,je.relatedTarget=rt,oe=je),rt=oe,ne&&we)t:{for(je=Ow,K=ne,Z=we,W=0,oe=K;oe;oe=je(oe))W++;oe=0;for(var Ae=Z;Ae;Ae=je(Ae))oe++;for(;0<W-oe;)K=je(K),W--;for(;0<oe-W;)Z=je(Z),oe--;for(;W--;){if(K===Z||Z!==null&&K===Z.alternate){je=K;break t}K=je(K),Z=je(Z)}je=null}else je=null;ne!==null&&Pg(ue,te,ne,je,!1),we!==null&&rt!==null&&Pg(ue,rt,we,je,!0)}}e:{if(te=ee?Mi(ee):window,ne=te.nodeName&&te.nodeName.toLowerCase(),ne==="select"||ne==="input"&&te.type==="file")var Ye=ap;else if(lp(te))if(op)Ye=Vv;else{Ye=Pv;var Se=qv}else ne=te.nodeName,!ne||ne.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?ee&&wu(ee.elementType)&&(Ye=ap):Ye=$v;if(Ye&&(Ye=Ye(t,ee))){ip(ue,Ye,i,ie);break e}Se&&Se(t,te,ee),t==="focusout"&&ee&&te.type==="number"&&ee.memoizedProps.value!=null&&vu(te,"number",te.value)}switch(Se=ee?Mi(ee):window,t){case"focusin":(lp(Se)||Se.contentEditable==="true")&&(Ul=Se,Mu=ee,$i=null);break;case"focusout":$i=Mu=Ul=null;break;case"mousedown":zu=!0;break;case"contextmenu":case"mouseup":case"dragend":zu=!1,mp(ue,i,ie);break;case"selectionchange":if(Yv)break;case"keydown":case"keyup":mp(ue,i,ie)}var Oe;if(_u)e:{switch(t){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Il?np(t,i)&&(Ue="onCompositionEnd"):t==="keydown"&&i.keyCode===229&&(Ue="onCompositionStart");Ue&&(Wh&&i.locale!=="ko"&&(Il||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Il&&(Oe=Xh()):(Sr=ie,Au="value"in Sr?Sr.value:Sr.textContent,Il=!0)),Se=ts(ee,Ue),0<Se.length&&(Ue=new Kh(Ue,t,null,i,ie),ue.push({event:Ue,listeners:Se}),Oe?Ue.data=Oe:(Oe=rp(i),Oe!==null&&(Ue.data=Oe)))),(Oe=Bv?Fv(t,i):Iv(t,i))&&(Ue=ts(ee,"onBeforeInput"),0<Ue.length&&(Se=new Kh("onBeforeInput","beforeinput",null,i,ie),ue.push({event:Se,listeners:Ue}),Se.data=Oe)),Rw(ue,t,ee,i,ie)}Hg(ue,n)})}function ma(t,n,i){return{instance:t,listener:n,currentTarget:i}}function ts(t,n){for(var i=n+"Capture",o=[];t!==null;){var d=t,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=zi(t,i),d!=null&&o.unshift(ma(t,d,m)),d=zi(t,n),d!=null&&o.push(ma(t,d,m))),t.tag===3)return o;t=t.return}return[]}function Ow(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Pg(t,n,i,o,d){for(var m=n._reactName,S=[];i!==null&&i!==o;){var _=i,P=_.alternate,ee=_.stateNode;if(_=_.tag,P!==null&&P===o)break;_!==5&&_!==26&&_!==27||ee===null||(P=ee,d?(ee=zi(i,m),ee!=null&&S.unshift(ma(i,ee,P))):d||(ee=zi(i,m),ee!=null&&S.push(ma(i,ee,P)))),i=i.return}S.length!==0&&t.push({event:n,listeners:S})}var Mw=/\r\n?/g,zw=/\u0000|\uFFFD/g;function $g(t){return(typeof t=="string"?t:""+t).replace(Mw,`
9
+ `).replace(zw,"")}function Vg(t,n){return n=$g(n),$g(t)===n}function nt(t,n,i,o,d,m){switch(i){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||zl(t,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&zl(t,""+o);break;case"className":lo(t,"class",o);break;case"tabIndex":lo(t,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":lo(t,i,o);break;case"style":Vh(t,o,m);break;case"data":if(n!=="object"){lo(t,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||i!=="href")){t.removeAttribute(i);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(i);break}o=ao(""+o),t.setAttribute(i,o);break;case"action":case"formAction":if(typeof o=="function"){t.setAttribute(i,"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 m=="function"&&(i==="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(i);break}o=ao(""+o),t.setAttribute(i,o);break;case"onClick":o!=null&&(t.onclick=Wn);break;case"onScroll":o!=null&&Be("scroll",t);break;case"onScrollEnd":o!=null&&Be("scrollend",t);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(i=o.__html,i!=null){if(d.children!=null)throw Error(a(60));t.innerHTML=i}}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}i=ao(""+o),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);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(i,""+o):t.removeAttribute(i);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(i,""):t.removeAttribute(i);break;case"capture":case"download":o===!0?t.setAttribute(i,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(i,o):t.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?t.setAttribute(i,o):t.removeAttribute(i);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?t.removeAttribute(i):t.setAttribute(i,o);break;case"popover":Be("beforetoggle",t),Be("toggle",t),ro(t,"popover",o);break;case"xlinkActuate":Jn(t,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Jn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Jn(t,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Jn(t,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Jn(t,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Jn(t,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Jn(t,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Jn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Jn(t,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ro(t,"is",o);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=cv.get(i)||i,ro(t,i,o))}}function sf(t,n,i,o,d,m){switch(i){case"style":Vh(t,o,m);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(i=o.__html,i!=null){if(d.children!=null)throw Error(a(60));t.innerHTML=i}}break;case"children":typeof o=="string"?zl(t,o):(typeof o=="number"||typeof o=="bigint")&&zl(t,""+o);break;case"onScroll":o!=null&&Be("scroll",t);break;case"onScrollEnd":o!=null&&Be("scrollend",t);break;case"onClick":o!=null&&(t.onclick=Wn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zh.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),n=i.slice(2,d?i.length-7:void 0),m=t[Ee]||null,m=m!=null?m[i]:null,typeof m=="function"&&t.removeEventListener(n,m,d),typeof o=="function")){typeof m!="function"&&m!==null&&(i in t?t[i]=null:t.hasAttribute(i)&&t.removeAttribute(i)),t.addEventListener(n,o,d);break e}i in t?t[i]=o:o===!0?t.setAttribute(i,""):ro(t,i,o)}}}function Mt(t,n,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",t),Be("load",t);var o=!1,d=!1,m;for(m in i)if(i.hasOwnProperty(m)){var S=i[m];if(S!=null)switch(m){case"src":o=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:nt(t,n,m,S,i,null)}}d&&nt(t,n,"srcSet",i.srcSet,i,null),o&&nt(t,n,"src",i.src,i,null);return;case"input":Be("invalid",t);var _=m=S=d=null,P=null,ee=null;for(o in i)if(i.hasOwnProperty(o)){var ie=i[o];if(ie!=null)switch(o){case"name":d=ie;break;case"type":S=ie;break;case"checked":P=ie;break;case"defaultChecked":ee=ie;break;case"value":m=ie;break;case"defaultValue":_=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,n));break;default:nt(t,n,o,ie,i,null)}}Hh(t,m,_,P,ee,S,d,!1);return;case"select":Be("invalid",t),o=S=m=null;for(d in i)if(i.hasOwnProperty(d)&&(_=i[d],_!=null))switch(d){case"value":m=_;break;case"defaultValue":S=_;break;case"multiple":o=_;default:nt(t,n,d,_,i,null)}n=m,i=S,t.multiple=!!o,n!=null?Ml(t,!!o,n,!1):i!=null&&Ml(t,!!o,i,!0);return;case"textarea":Be("invalid",t),m=d=o=null;for(S in i)if(i.hasOwnProperty(S)&&(_=i[S],_!=null))switch(S){case"value":o=_;break;case"defaultValue":d=_;break;case"children":m=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(a(91));break;default:nt(t,n,S,_,i,null)}Ph(t,o,d,m);return;case"option":for(P in i)i.hasOwnProperty(P)&&(o=i[P],o!=null)&&(P==="selected"?t.selected=o&&typeof o!="function"&&typeof o!="symbol":nt(t,n,P,o,i,null));return;case"dialog":Be("beforetoggle",t),Be("toggle",t),Be("cancel",t),Be("close",t);break;case"iframe":case"object":Be("load",t);break;case"video":case"audio":for(o=0;o<pa.length;o++)Be(pa[o],t);break;case"image":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"embed":case"source":case"link":Be("error",t),Be("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 i)if(i.hasOwnProperty(ee)&&(o=i[ee],o!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:nt(t,n,ee,o,i,null)}return;default:if(wu(n)){for(ie in i)i.hasOwnProperty(ie)&&(o=i[ie],o!==void 0&&sf(t,n,ie,o,i,void 0));return}}for(_ in i)i.hasOwnProperty(_)&&(o=i[_],o!=null&&nt(t,n,_,o,i,null))}function Bw(t,n,i,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,m=null,S=null,_=null,P=null,ee=null,ie=null;for(ne in i){var ue=i[ne];if(i.hasOwnProperty(ne)&&ue!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":P=ue;default:o.hasOwnProperty(ne)||nt(t,n,ne,null,o,ue)}}for(var te in o){var ne=o[te];if(ue=i[te],o.hasOwnProperty(te)&&(ne!=null||ue!=null))switch(te){case"type":m=ne;break;case"name":d=ne;break;case"checked":ee=ne;break;case"defaultChecked":ie=ne;break;case"value":S=ne;break;case"defaultValue":_=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(a(137,n));break;default:ne!==ue&&nt(t,n,te,ne,o,ue)}}xu(t,S,_,P,ee,ie,m,d);return;case"select":ne=S=_=te=null;for(m in i)if(P=i[m],i.hasOwnProperty(m)&&P!=null)switch(m){case"value":break;case"multiple":ne=P;default:o.hasOwnProperty(m)||nt(t,n,m,null,o,P)}for(d in o)if(m=o[d],P=i[d],o.hasOwnProperty(d)&&(m!=null||P!=null))switch(d){case"value":te=m;break;case"defaultValue":_=m;break;case"multiple":S=m;default:m!==P&&nt(t,n,d,m,o,P)}n=_,i=S,o=ne,te!=null?Ml(t,!!i,te,!1):!!o!=!!i&&(n!=null?Ml(t,!!i,n,!0):Ml(t,!!i,i?[]:"",!1));return;case"textarea":ne=te=null;for(_ in i)if(d=i[_],i.hasOwnProperty(_)&&d!=null&&!o.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:nt(t,n,_,null,o,d)}for(S in o)if(d=o[S],m=i[S],o.hasOwnProperty(S)&&(d!=null||m!=null))switch(S){case"value":te=d;break;case"defaultValue":ne=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(a(91));break;default:d!==m&&nt(t,n,S,d,o,m)}qh(t,te,ne);return;case"option":for(var we in i)te=i[we],i.hasOwnProperty(we)&&te!=null&&!o.hasOwnProperty(we)&&(we==="selected"?t.selected=!1:nt(t,n,we,null,o,te));for(P in o)te=o[P],ne=i[P],o.hasOwnProperty(P)&&te!==ne&&(te!=null||ne!=null)&&(P==="selected"?t.selected=te&&typeof te!="function"&&typeof te!="symbol":nt(t,n,P,te,o,ne));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 i)te=i[je],i.hasOwnProperty(je)&&te!=null&&!o.hasOwnProperty(je)&&nt(t,n,je,null,o,te);for(ee in o)if(te=o[ee],ne=i[ee],o.hasOwnProperty(ee)&&te!==ne&&(te!=null||ne!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(a(137,n));break;default:nt(t,n,ee,te,o,ne)}return;default:if(wu(n)){for(var rt in i)te=i[rt],i.hasOwnProperty(rt)&&te!==void 0&&!o.hasOwnProperty(rt)&&sf(t,n,rt,void 0,o,te);for(ie in o)te=o[ie],ne=i[ie],!o.hasOwnProperty(ie)||te===ne||te===void 0&&ne===void 0||sf(t,n,ie,te,o,ne);return}}for(var K in i)te=i[K],i.hasOwnProperty(K)&&te!=null&&!o.hasOwnProperty(K)&&nt(t,n,K,null,o,te);for(ue in o)te=o[ue],ne=i[ue],!o.hasOwnProperty(ue)||te===ne||te==null&&ne==null||nt(t,n,ue,te,o,ne)}function Gg(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Fw(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var d=i[o],m=d.transferSize,S=d.initiatorType,_=d.duration;if(m&&_&&Gg(S)){for(S=0,_=d.responseEnd,o+=1;o<i.length;o++){var P=i[o],ee=P.startTime;if(ee>_)break;var ie=P.transferSize,ue=P.initiatorType;ie&&Gg(ue)&&(P=P.responseEnd,S+=ie*(P<_?1:(_-ee)/(P-ee)))}if(--o,n+=8*(m+S)/(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 uf=null,cf=null;function ns(t){return t.nodeType===9?t:t.ownerDocument}function Yg(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 Xg(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 ff(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 df=null;function Iw(){var t=window.event;return t&&t.type==="popstate"?t===df?!1:(df=t,!0):(df=null,!1)}var Zg=typeof setTimeout=="function"?setTimeout:void 0,Uw=typeof clearTimeout=="function"?clearTimeout:void 0,Qg=typeof Promise=="function"?Promise:void 0,Hw=typeof queueMicrotask=="function"?queueMicrotask:typeof Qg<"u"?function(t){return Qg.resolve(null).then(t).catch(qw)}:Zg;function qw(t){setTimeout(function(){throw t})}function Ir(t){return t==="head"}function Kg(t,n){var i=n,o=0;do{var d=i.nextSibling;if(t.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"||i==="/&"){if(o===0){t.removeChild(d),hi(n);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")ga(t.ownerDocument.documentElement);else if(i==="head"){i=t.ownerDocument.head,ga(i);for(var m=i.firstChild;m;){var S=m.nextSibling,_=m.nodeName;m[Oi]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&m.rel.toLowerCase()==="stylesheet"||i.removeChild(m),m=S}}else i==="body"&&ga(t.ownerDocument.body);i=d}while(i);hi(n)}function Jg(t,n){var i=t;t=0;do{var o=i.nextSibling;if(i.nodeType===1?n?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(n?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),o&&o.nodeType===8)if(i=o.data,i==="/$"){if(t===0)break;t--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||t++;i=o}while(i)}function hf(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var i=n;switch(n=n.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":hf(i),bu(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}t.removeChild(i)}}function Pw(t,n,i,o){for(;t.nodeType===1;){var d=i;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(o){if(!t[Oi])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==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(m=t.getAttribute("src"),(m!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=Ln(t.nextSibling),t===null)break}return null}function $w(t,n,i){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=Ln(t.nextSibling),t===null))return null;return t}function Wg(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Ln(t.nextSibling),t===null))return null;return t}function pf(t){return t.data==="$?"||t.data==="$~"}function mf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Vw(t,n){var i=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||i.readyState!=="loading")n();else{var o=function(){n(),i.removeEventListener("DOMContentLoaded",o)};i.addEventListener("DOMContentLoaded",o),t._reactRetry=o}}function Ln(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 gf=null;function eb(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var i=t.data;if(i==="/$"||i==="/&"){if(n===0)return Ln(t.nextSibling);n--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||n++}t=t.nextSibling}return null}function tb(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var i=t.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(n===0)return t;n--}else i!=="/$"&&i!=="/&"||n++}t=t.previousSibling}return null}function nb(t,n,i){switch(n=ns(i),t){case"html":if(t=n.documentElement,!t)throw Error(a(452));return t;case"head":if(t=n.head,!t)throw Error(a(453));return t;case"body":if(t=n.body,!t)throw Error(a(454));return t;default:throw Error(a(451))}}function ga(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);bu(t)}var Dn=new Map,rb=new Set;function rs(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var mr=O.d;O.d={f:Gw,r:Yw,D:Xw,C:Zw,L:Qw,m:Kw,X:Ww,S:Jw,M:e2};function Gw(){var t=mr.f(),n=Xo();return t||n}function Yw(t){var n=Ll(t);n!==null&&n.tag===5&&n.type==="form"?vm(n):mr.r(t)}var ci=typeof document>"u"?null:document;function lb(t,n,i){var o=ci;if(o&&typeof n=="string"&&n){var d=Cn(n);d='link[rel="'+t+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),rb.has(d)||(rb.add(d),t={rel:t,crossOrigin:i,href:n},o.querySelector(d)===null&&(n=o.createElement("link"),Mt(n,"link",t),jt(n),o.head.appendChild(n)))}}function Xw(t){mr.D(t),lb("dns-prefetch",t,null)}function Zw(t,n){mr.C(t,n),lb("preconnect",t,n)}function Qw(t,n,i){mr.L(t,n,i);var o=ci;if(o&&t&&n){var d='link[rel="preload"][as="'+Cn(n)+'"]';n==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+Cn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+Cn(i.imageSizes)+'"]')):d+='[href="'+Cn(t)+'"]';var m=d;switch(n){case"style":m=fi(t);break;case"script":m=di(t)}Dn.has(m)||(t=g({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:t,as:n},i),Dn.set(m,t),o.querySelector(d)!==null||n==="style"&&o.querySelector(ba(m))||n==="script"&&o.querySelector(ya(m))||(n=o.createElement("link"),Mt(n,"link",t),jt(n),o.head.appendChild(n)))}}function Kw(t,n){mr.m(t,n);var i=ci;if(i&&t){var o=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+Cn(o)+'"][href="'+Cn(t)+'"]',m=d;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=di(t)}if(!Dn.has(m)&&(t=g({rel:"modulepreload",href:t},n),Dn.set(m,t),i.querySelector(d)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(ya(m)))return}o=i.createElement("link"),Mt(o,"link",t),jt(o),i.head.appendChild(o)}}}function Jw(t,n,i){mr.S(t,n,i);var o=ci;if(o&&t){var d=Dl(o).hoistableStyles,m=fi(t);n=n||"default";var S=d.get(m);if(!S){var _={loading:0,preload:null};if(S=o.querySelector(ba(m)))_.loading=5;else{t=g({rel:"stylesheet",href:t,"data-precedence":n},i),(i=Dn.get(m))&&bf(t,i);var P=S=o.createElement("link");jt(P),Mt(P,"link",t),P._p=new Promise(function(ee,ie){P.onload=ee,P.onerror=ie}),P.addEventListener("load",function(){_.loading|=1}),P.addEventListener("error",function(){_.loading|=2}),_.loading|=4,ls(S,n,o)}S={type:"stylesheet",instance:S,count:1,state:_},d.set(m,S)}}}function Ww(t,n){mr.X(t,n);var i=ci;if(i&&t){var o=Dl(i).hoistableScripts,d=di(t),m=o.get(d);m||(m=i.querySelector(ya(d)),m||(t=g({src:t,async:!0},n),(n=Dn.get(d))&&yf(t,n),m=i.createElement("script"),jt(m),Mt(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(d,m))}}function e2(t,n){mr.M(t,n);var i=ci;if(i&&t){var o=Dl(i).hoistableScripts,d=di(t),m=o.get(d);m||(m=i.querySelector(ya(d)),m||(t=g({src:t,async:!0,type:"module"},n),(n=Dn.get(d))&&yf(t,n),m=i.createElement("script"),jt(m),Mt(m,"link",t),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(d,m))}}function ib(t,n,i,o){var d=(d=de.current)?rs(d):null;if(!d)throw Error(a(446));switch(t){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(n=fi(i.href),i=Dl(d).hoistableStyles,o=i.get(n),o||(o={type:"style",instance:null,count:0,state:null},i.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){t=fi(i.href);var m=Dl(d).hoistableStyles,S=m.get(t);if(S||(d=d.ownerDocument||d,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,S),(m=d.querySelector(ba(t)))&&!m._p&&(S.instance=m,S.state.loading=5),Dn.has(t)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Dn.set(t,i),m||t2(d,t,i,S.state))),n&&o===null)throw Error(a(528,""));return S}if(n&&o!==null)throw Error(a(529,""));return null;case"script":return n=i.async,i=i.src,typeof i=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=di(i),i=Dl(d).hoistableScripts,o=i.get(n),o||(o={type:"script",instance:null,count:0,state:null},i.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,t))}}function fi(t){return'href="'+Cn(t)+'"'}function ba(t){return'link[rel="stylesheet"]['+t+"]"}function ab(t){return g({},t,{"data-precedence":t.precedence,precedence:null})}function t2(t,n,i,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",i),jt(n),t.head.appendChild(n))}function di(t){return'[src="'+Cn(t)+'"]'}function ya(t){return"script[async]"+t}function ob(t,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var o=t.querySelector('style[data-href~="'+Cn(i.href)+'"]');if(o)return n.instance=o,jt(o),o;var d=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),jt(o),Mt(o,"style",d),ls(o,i.precedence,t),n.instance=o;case"stylesheet":d=fi(i.href);var m=t.querySelector(ba(d));if(m)return n.state.loading|=4,n.instance=m,jt(m),m;o=ab(i),(d=Dn.get(d))&&bf(o,d),m=(t.ownerDocument||t).createElement("link"),jt(m);var S=m;return S._p=new Promise(function(_,P){S.onload=_,S.onerror=P}),Mt(m,"link",o),n.state.loading|=4,ls(m,i.precedence,t),n.instance=m;case"script":return m=di(i.src),(d=t.querySelector(ya(m)))?(n.instance=d,jt(d),d):(o=i,(d=Dn.get(m))&&(o=g({},i),yf(o,d)),t=t.ownerDocument||t,d=t.createElement("script"),jt(d),Mt(d,"link",o),t.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error(a(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,ls(o,i.precedence,t));return n.instance}function ls(t,n,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=o.length?o[o.length-1]:null,m=d,S=0;S<o.length;S++){var _=o[S];if(_.dataset.precedence===n)m=_;else if(m!==d)break}m?m.parentNode.insertBefore(t,m.nextSibling):(n=i.nodeType===9?i.head:i,n.insertBefore(t,n.firstChild))}function bf(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function yf(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var is=null;function sb(t,n,i){if(is===null){var o=new Map,d=is=new Map;d.set(i,o)}else d=is,o=d.get(i),o||(o=new Map,d.set(i,o));if(o.has(t))return o;for(o.set(t,null),i=i.getElementsByTagName(t),d=0;d<i.length;d++){var m=i[d];if(!(m[Oi]||m[be]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var S=m.getAttribute(n)||"";S=t+S;var _=o.get(S);_?_.push(m):o.set(S,[m])}}return o}function ub(t,n,i){t=t.ownerDocument||t,t.head.insertBefore(i,n==="title"?t.querySelector("head > title"):null)}function n2(t,n,i){if(i===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 cb(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function r2(t,n,i,o){if(i.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var d=fi(o.href),m=n.querySelector(ba(d));if(m){n=m._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=as.bind(t),n.then(t,t)),i.state.loading|=4,i.instance=m,jt(m);return}m=n.ownerDocument||n,o=ab(o),(d=Dn.get(d))&&bf(o,d),m=m.createElement("link"),jt(m);var S=m;S._p=new Promise(function(_,P){S.onload=_,S.onerror=P}),Mt(m,"link",o),i.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(i,n),(n=i.state.preload)&&(i.state.loading&3)===0&&(t.count++,i=as.bind(t),n.addEventListener("load",i),n.addEventListener("error",i))}}var xf=0;function l2(t,n){return t.stylesheets&&t.count===0&&ss(t,t.stylesheets),0<t.count||0<t.imgCount?function(i){var o=setTimeout(function(){if(t.stylesheets&&ss(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+n);0<t.imgBytes&&xf===0&&(xf=62500*Fw());var d=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&ss(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>xf?50:800)+n);return t.unsuspend=i,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(d)}}:null}function as(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ss(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var os=null;function ss(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,os=new Map,n.forEach(i2,t),os=null,as.call(t))}function i2(t,n){if(!(n.state.loading&4)){var i=os.get(t);if(i)var o=i.get(null);else{i=new Map,os.set(t,i);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var S=d[m];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(i.set(S.dataset.precedence,S),o=S)}o&&i.set(null,o)}d=n.instance,S=d.getAttribute("data-precedence"),m=i.get(S)||o,m===o&&i.set(null,d),i.set(S,d),this.count++,o=as.bind(this),d.addEventListener("load",o),d.addEventListener("error",o),m?m.parentNode.insertBefore(d,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),n.state.loading|=4}}var xa={$$typeof:T,Provider:null,Consumer:null,_currentValue:z,_currentValue2:z,_threadCount:0};function a2(t,n,i,o,d,m,S,_,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=ji(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ji(0),this.hiddenUpdates=ji(null),this.identifierPrefix=o,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=P,this.incompleteTransitions=new Map}function fb(t,n,i,o,d,m,S,_,P,ee,ie,ue){return t=new a2(t,n,i,S,P,ee,ie,ue,_),n=1,m===!0&&(n|=24),m=fn(3,null,null,n),t.current=m,m.stateNode=t,n=Ku(),n.refCount++,t.pooledCache=n,n.refCount++,m.memoizedState={element:o,isDehydrated:i,cache:n},tc(m),t}function db(t){return t?(t=Pl,t):Pl}function hb(t,n,i,o,d,m){d=db(d),o.context===null?o.context=d:o.pendingContext=d,o=Tr(n),o.payload={element:i},m=m===void 0?null:m,m!==null&&(o.callback=m),i=jr(t,o,n),i!==null&&(tn(i,t,n),Ki(i,t,n))}function pb(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var i=t.retryLane;t.retryLane=i!==0&&i<n?i:n}}function vf(t,n){pb(t,n),(t=t.alternate)&&pb(t,n)}function mb(t){if(t.tag===13||t.tag===31){var n=ol(t,67108864);n!==null&&tn(n,t,67108864),vf(t,67108864)}}function gb(t){if(t.tag===13||t.tag===31){var n=gn();n=Li(n);var i=ol(t,n);i!==null&&tn(i,t,n),vf(t,n)}}var us=!0;function o2(t,n,i,o){var d=F.T;F.T=null;var m=O.p;try{O.p=2,wf(t,n,i,o)}finally{O.p=m,F.T=d}}function s2(t,n,i,o){var d=F.T;F.T=null;var m=O.p;try{O.p=8,wf(t,n,i,o)}finally{O.p=m,F.T=d}}function wf(t,n,i,o){if(us){var d=Sf(o);if(d===null)of(t,n,o,cs,i),yb(t,o);else if(c2(d,t,n,i,o))o.stopPropagation();else if(yb(t,o),n&4&&-1<u2.indexOf(t)){for(;d!==null;){var m=Ll(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var S=Hn(m.pendingLanes);if(S!==0){var _=m;for(_.pendingLanes|=2,_.entangledLanes|=2;S;){var P=1<<31-Qe(S);_.entanglements[1]|=P,S&=~P}Vn(m),(Ze&6)===0&&(Go=it()+500,ha(0))}}break;case 31:case 13:_=ol(m,2),_!==null&&tn(_,m,2),Xo(),vf(m,2)}if(m=Sf(o),m===null&&of(t,n,o,cs,i),m===d)break;d=m}d!==null&&o.stopPropagation()}else of(t,n,o,null,i)}}function Sf(t){return t=ku(t),kf(t)}var cs=null;function kf(t){if(cs=null,t=_l(t),t!==null){var n=u(t);if(n===null)t=null;else{var i=n.tag;if(i===13){if(t=c(n),t!==null)return t;t=null}else if(i===31){if(t=f(n),t!==null)return t;t=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return cs=t,null}function bb(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(wr()){case ae:return 2;case me:return 8;case Re:case De:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var Ef=!1,Ur=null,Hr=null,qr=null,va=new Map,wa=new Map,Pr=[],u2="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 yb(t,n){switch(t){case"focusin":case"focusout":Ur=null;break;case"dragenter":case"dragleave":Hr=null;break;case"mouseover":case"mouseout":qr=null;break;case"pointerover":case"pointerout":va.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":wa.delete(n.pointerId)}}function Sa(t,n,i,o,d,m){return t===null||t.nativeEvent!==m?(t={blockedOn:n,domEventName:i,eventSystemFlags:o,nativeEvent:m,targetContainers:[d]},n!==null&&(n=Ll(n),n!==null&&mb(n)),t):(t.eventSystemFlags|=o,n=t.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),t)}function c2(t,n,i,o,d){switch(n){case"focusin":return Ur=Sa(Ur,t,n,i,o,d),!0;case"dragenter":return Hr=Sa(Hr,t,n,i,o,d),!0;case"mouseover":return qr=Sa(qr,t,n,i,o,d),!0;case"pointerover":var m=d.pointerId;return va.set(m,Sa(va.get(m)||null,t,n,i,o,d)),!0;case"gotpointercapture":return m=d.pointerId,wa.set(m,Sa(wa.get(m)||null,t,n,i,o,d)),!0}return!1}function xb(t){var n=_l(t.target);if(n!==null){var i=u(n);if(i!==null){if(n=i.tag,n===13){if(n=c(i),n!==null){t.blockedOn=n,no(t.priority,function(){gb(i)});return}}else if(n===31){if(n=f(i),n!==null){t.blockedOn=n,no(t.priority,function(){gb(i)});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){t.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}t.blockedOn=null}function fs(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var i=Sf(t.nativeEvent);if(i===null){i=t.nativeEvent;var o=new i.constructor(i.type,i);Su=o,i.target.dispatchEvent(o),Su=null}else return n=Ll(i),n!==null&&mb(n),t.blockedOn=i,!1;n.shift()}return!0}function vb(t,n,i){fs(t)&&i.delete(n)}function f2(){Ef=!1,Ur!==null&&fs(Ur)&&(Ur=null),Hr!==null&&fs(Hr)&&(Hr=null),qr!==null&&fs(qr)&&(qr=null),va.forEach(vb),wa.forEach(vb)}function ds(t,n){t.blockedOn===n&&(t.blockedOn=null,Ef||(Ef=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,f2)))}var hs=null;function wb(t){hs!==t&&(hs=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){hs===t&&(hs=null);for(var n=0;n<t.length;n+=3){var i=t[n],o=t[n+1],d=t[n+2];if(typeof o!="function"){if(kf(o||i)===null)continue;break}var m=Ll(i);m!==null&&(t.splice(n,3),n-=3,wc(m,{pending:!0,data:d,method:i.method,action:o},o,d))}}))}function hi(t){function n(P){return ds(P,t)}Ur!==null&&ds(Ur,t),Hr!==null&&ds(Hr,t),qr!==null&&ds(qr,t),va.forEach(n),wa.forEach(n);for(var i=0;i<Pr.length;i++){var o=Pr[i];o.blockedOn===t&&(o.blockedOn=null)}for(;0<Pr.length&&(i=Pr[0],i.blockedOn===null);)xb(i),i.blockedOn===null&&Pr.shift();if(i=(t.ownerDocument||t).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var d=i[o],m=i[o+1],S=d[Ee]||null;if(typeof m=="function")S||wb(i);else if(S){var _=null;if(m&&m.hasAttribute("formAction")){if(d=m,S=m[Ee]||null)_=S.formAction;else if(kf(d)!==null)continue}else _=S.action;typeof _=="function"?i[o+1]=_:(i.splice(o,3),o-=3),wb(i)}}}function Sb(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(S){return d=S})},focusReset:"manual",scroll:"manual"})}function n(){d!==null&&(d(),d=null),o||setTimeout(i,20)}function i(){if(!o&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.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(i,100),function(){o=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),d!==null&&(d(),d=null)}}}function Cf(t){this._internalRoot=t}ps.prototype.render=Cf.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(a(409));var i=n.current,o=gn();hb(i,o,t,n,null,null)},ps.prototype.unmount=Cf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;hb(t.current,2,null,t,null,null),Xo(),n[Ce]=null}};function ps(t){this._internalRoot=t}ps.prototype.unstable_scheduleHydration=function(t){if(t){var n=to();t={blockedOn:null,target:t,priority:n};for(var i=0;i<Pr.length&&n!==0&&n<Pr[i].priority;i++);Pr.splice(i,0,t),i===0&&xb(t)}};var kb=r.version;if(kb!=="19.2.3")throw Error(a(527,kb,"19.2.3"));O.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(a(188)):(t=Object.keys(t).join(","),Error(a(268,t)));return t=h(n),t=t!==null?b(t):null,t=t===null?null:t.stateNode,t};var d2={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ms=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ms.isDisabled&&ms.supportsFiber)try{Nt=ms.inject(d2),mt=ms}catch{}}return Ea.createRoot=function(t,n){if(!s(t))throw Error(a(299));var i=!1,o="",d=Rm,m=_m,S=Lm;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(S=n.onRecoverableError)),n=fb(t,1,!1,null,null,i,o,null,d,m,S,Sb),t[Ce]=n.current,af(t),new Cf(n)},Ea.hydrateRoot=function(t,n,i){if(!s(t))throw Error(a(299));var o=!1,d="",m=Rm,S=_m,_=Lm,P=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(S=i.onCaughtError),i.onRecoverableError!==void 0&&(_=i.onRecoverableError),i.formState!==void 0&&(P=i.formState)),n=fb(t,1,!0,n,i??null,o,d,P,m,S,_,Sb),n.context=db(null),i=n.current,o=gn(),o=Li(o),d=Tr(o),d.callback=null,jr(i,d,o),i=o,n.current.lanes=i,zn(n,i),Vn(n),t[Ce]=n.current,af(t),new ps(n)},Ea.version="19.2.3",Ea}var Db;function S2(){if(Db)return Tf.exports;Db=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(),Tf.exports=w2(),Tf.exports}var k2=S2();const E2=Zs(k2),Lx=["shift","alt","meta","mod","ctrl","control"],C2={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 Kr(e){return(C2[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function Dx(e){return Lx.includes(e)}function Lf(e,r=","){return e.toLowerCase().split(r)}function Df(e,r="+",l=">",a=!1,s){let u=[],c=!1;e=e.trim(),e.includes(l)?(c=!0,u=e.toLocaleLowerCase().split(l).map(h=>Kr(h))):u=e.toLocaleLowerCase().split(r).map(h=>Kr(h));const f={alt:u.includes("alt"),ctrl:u.includes("ctrl")||u.includes("control"),shift:u.includes("shift"),meta:u.includes("meta"),mod:u.includes("mod"),useKey:a},p=u.filter(h=>!Lx.includes(h));return{...f,keys:p,description:s,isSequence:c,hotkey:e}}typeof document<"u"&&(document.addEventListener("keydown",e=>{e.code!==void 0&&Ox([Kr(e.code)])}),document.addEventListener("keyup",e=>{e.code!==void 0&&Mx([Kr(e.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{br.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{br.clear()},0)}));const br=new Set;function nh(e){return Array.isArray(e)}function A2(e,r=","){return(nh(e)?e:e.split(r)).every(l=>br.has(l.trim().toLowerCase()))}function Ox(e){const r=Array.isArray(e)?e:[e];br.has("meta")&&br.forEach(l=>!Dx(l)&&br.delete(l.toLowerCase())),r.forEach(l=>br.add(l.toLowerCase()))}function Mx(e){const r=Array.isArray(e)?e:[e];e==="meta"?br.clear():r.forEach(l=>br.delete(l.toLowerCase()))}function N2(e,r,l){(typeof l=="function"&&l(e,r)||l===!0)&&e.preventDefault()}function T2(e,r,l){return typeof l=="function"?l(e,r):l===!0||l===void 0}const j2=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function R2(e){return zx(e,j2)}function zx(e,r=!1){const{target:l,composed:a}=e;let s,u;return _2(l)&&a?(s=e.composedPath()[0]&&e.composedPath()[0].tagName,u=e.composedPath()[0]&&e.composedPath()[0].role):(s=l&&l.tagName,u=l&&l.role),nh(r)?!!(s&&r&&r.some(c=>c.toLowerCase()===s.toLowerCase()||c===u)):!!(s&&r&&r)}function _2(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function L2(e,r){return e.length===0&&r?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):r?e.some(l=>r.includes(l))||e.includes("*"):!0}const D2=(e,r,l=!1)=>{const{alt:a,meta:s,mod:u,shift:c,ctrl:f,keys:p,useKey:h}=r,{code:b,key:g,ctrlKey:v,metaKey:x,shiftKey:w,altKey:k}=e,A=Kr(b);if(h&&p?.length===1&&p.includes(g))return!0;if(!p?.includes(A)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(A))return!1;if(!l){if(a!==k&&A!=="alt"||c!==w&&A!=="shift")return!1;if(u){if(!x&&!v)return!1}else if(s!==x&&A!=="meta"&&A!=="os"||f!==v&&A!=="ctrl"&&A!=="control")return!1}return p&&p.length===1&&p.includes(A)?!0:p?A2(p):!p},Bx=j.createContext(void 0),O2=()=>j.useContext(Bx);function M2({addHotkey:e,removeHotkey:r,children:l}){return y.jsx(Bx.Provider,{value:{addHotkey:e,removeHotkey:r},children:l})}function rh(e,r){return e&&r&&typeof e=="object"&&typeof r=="object"?Object.keys(e).length===Object.keys(r).length&&Object.keys(e).reduce((l,a)=>l&&rh(e[a],r[a]),!0):e===r}const Fx=j.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Pa=()=>j.useContext(Fx),z2=({initiallyActiveScopes:e=["*"],children:r})=>{const[l,a]=j.useState(e),[s,u]=j.useState([]),c=j.useCallback(g=>{a(v=>v.includes("*")?[g]:Array.from(new Set([...v,g])))},[]),f=j.useCallback(g=>{a(v=>v.filter(x=>x!==g))},[]),p=j.useCallback(g=>{a(v=>v.includes(g)?v.filter(x=>x!==g):v.includes("*")?[g]:Array.from(new Set([...v,g])))},[]),h=j.useCallback(g=>{u(v=>[...v,g])},[]),b=j.useCallback(g=>{u(v=>v.filter(x=>!rh(x,g)))},[]);return y.jsx(Fx.Provider,{value:{activeScopes:l,hotkeys:s,enableScope:c,disableScope:f,toggleScope:p},children:y.jsx(M2,{addHotkey:h,removeHotkey:b,children:r})})};function B2(e){const r=j.useRef(void 0);return rh(r.current,e)||(r.current=e),r.current}const Ob=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},F2=typeof window<"u"?j.useLayoutEffect:j.useEffect;function lt(e,r,l,a){const s=j.useRef(null),u=j.useRef(!1),c=Array.isArray(l)?Array.isArray(a)?void 0:a:l,f=nh(e)?e.join(c?.delimiter):e,p=Array.isArray(l)?l:Array.isArray(a)?a:void 0,h=j.useCallback(r,p??[]),b=j.useRef(h);p?b.current=h:b.current=r;const g=B2(c),{activeScopes:v}=Pa(),x=O2();return F2(()=>{if(g?.enabled===!1||!L2(v,g?.scopes))return;let w=[],k;const A=(B,q=!1)=>{if(!(R2(B)&&!zx(B,g?.enableOnFormTags))){if(s.current!==null){const D=s.current.getRootNode();if((D instanceof Document||D instanceof ShadowRoot)&&D.activeElement!==s.current&&!s.current.contains(D.activeElement)){Ob(B);return}}B.target?.isContentEditable&&!g?.enableOnContentEditable||Lf(f,g?.delimiter).forEach(D=>{if(D.includes(g?.splitKey??"+")&&D.includes(g?.sequenceSplitKey??">")){console.warn(`Hotkey ${D} contains both ${g?.splitKey??"+"} and ${g?.sequenceSplitKey??">"} which is not supported.`);return}const U=Df(D,g?.splitKey,g?.sequenceSplitKey,g?.useKey,g?.description);if(U.isSequence){k=setTimeout(()=>{w=[]},g?.sequenceTimeoutMs??1e3);const V=U.useKey?B.key:Kr(B.code);if(Dx(V.toLowerCase()))return;w.push(V);const G=U.keys?.[w.length-1];if(V!==G){w=[],k&&clearTimeout(k);return}w.length===U.keys?.length&&(b.current(B,U),k&&clearTimeout(k),w=[])}else if(D2(B,U,g?.ignoreModifiers)||U.keys?.includes("*")){if(g?.ignoreEventWhen?.(B)||q&&u.current)return;if(N2(B,U,g?.preventDefault),!T2(B,U,g?.enabled)){Ob(B);return}b.current(B,U),q||(u.current=!0)}})}},E=B=>{B.code!==void 0&&(Ox(Kr(B.code)),(g?.keydown===void 0&&g?.keyup!==!0||g?.keydown)&&A(B))},C=B=>{B.code!==void 0&&(Mx(Kr(B.code)),u.current=!1,g?.keyup&&A(B,!0))},T=s.current||c?.document||document;return T.addEventListener("keyup",C,c?.eventListenerOptions),T.addEventListener("keydown",E,c?.eventListenerOptions),x&&Lf(f,g?.delimiter).forEach(B=>x.addHotkey(Df(B,g?.splitKey,g?.sequenceSplitKey,g?.useKey,g?.description))),()=>{T.removeEventListener("keyup",C,c?.eventListenerOptions),T.removeEventListener("keydown",E,c?.eventListenerOptions),x&&Lf(f,g?.delimiter).forEach(B=>x.removeHotkey(Df(B,g?.splitKey,g?.sequenceSplitKey,g?.useKey,g?.description))),w=[],k&&clearTimeout(k)}},[f,g,v]),s}const I2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),U2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,l,a)=>a?a.toUpperCase():l.toLowerCase()),Mb=e=>{const r=U2(e);return r.charAt(0).toUpperCase()+r.slice(1)},Ix=(...e)=>e.filter((r,l,a)=>!!r&&r.trim()!==""&&a.indexOf(r)===l).join(" ").trim(),H2=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var q2={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 P2=j.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:l=2,absoluteStrokeWidth:a,className:s="",children:u,iconNode:c,...f},p)=>j.createElement("svg",{ref:p,...q2,width:r,height:r,stroke:e,strokeWidth:a?Number(l)*24/Number(r):l,className:Ix("lucide",s),...!u&&!H2(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,b])=>j.createElement(h,b)),...Array.isArray(u)?u:[u]]));const Ge=(e,r)=>{const l=j.forwardRef(({className:a,...s},u)=>j.createElement(P2,{ref:u,iconNode:r,className:Ix(`lucide-${I2(Mb(e))}`,`lucide-${e}`,a),...s}));return l.displayName=Mb(e),l};const $2=[["path",{d:"M19 3H5",key:"1236rx"}],["path",{d:"M12 21V7",key:"gj6g52"}],["path",{d:"m6 15 6 6 6-6",key:"h15q88"}]],V2=Ge("arrow-down-from-line",$2);const G2=[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]],Y2=Ge("arrow-up-from-line",G2);const X2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Fa=Ge("check",X2);const Z2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],$a=Ge("chevron-down",Z2);const Q2=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],K2=Ge("chevron-left",Q2);const J2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ux=Ge("chevron-right",J2);const W2=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],eS=Ge("chevrons-down-up",W2);const tS=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],nS=Ge("chevrons-up-down",tS);const rS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],lS=Ge("columns-2",rS);const iS=[["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"}]],Hx=Ge("copy",iS);const aS=[["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"}]],oS=Ge("eraser",aS);const sS=[["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"}]],uS=Ge("external-link",sS);const cS=[["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"}]],Ts=Ge("eye",cS);const fS=[["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"}]],Qs=Ge("file-diff",fS);const dS=[["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"}]],qx=Ge("file-pen",dS);const hS=[["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"}]],Px=Ge("file-plus",hS);const pS=[["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"}]],$x=Ge("file-x",pS);const mS=[["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"}]],gS=Ge("folder-open",mS);const bS=[["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"}]],yS=Ge("folder",bS);const xS=[["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"}]],vS=Ge("keyboard",xS);const wS=[["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"}]],SS=Ge("list",wS);const kS=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ES=Ge("loader-circle",kS);const CS=[["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"}]],Vx=Ge("message-square",CS);const AS=[["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"}]],NS=Ge("panel-left-close",AS);const TS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],jS=Ge("panel-left",TS);const RS=[["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"}]],_S=Ge("pen",RS);const LS=[["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"}]],DS=Ge("refresh-cw",LS);const OS=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],MS=Ge("search",OS);const zS=[["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"}]],Gx=Ge("settings",zS);const BS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],FS=Ge("square",BS);const IS=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],US=Ge("text-align-start",IS);const HS=[["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"}]],qS=Ge("unfold-vertical",HS);const PS=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ks=Ge("x",PS),Va="split";function $S(e){switch(e){case"split":case"side-by-side":return"split";case"unified":case"inline":return"unified";default:return Va}}function Yx({checked:e,onChange:r,label:l,className:a="",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 ${a}`,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(Fa,{size:10,className:"text-white"})}),l&&y.jsx("span",{className:"select-none",children:l})]})}function VS({commentsCount:e,isCopiedAll:r,onCopyAll:l,onDeleteAll:a,onViewAll:s}){const[u,c]=j.useState(!1),f=j.useRef(null);j.useEffect(()=>{const g=v=>{f.current&&!f.current.contains(v.target)&&c(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]);const p=()=>{l(),c(!1)},h=()=>{a(),c(!1)},b=()=>{s?.(),c(!1)};return y.jsxs("div",{className:"relative",ref:f,children:[y.jsxs("div",{className:"flex",children:[y.jsxs("button",{onClick:p,className:"text-xs px-3 py-1.5 pr-2 rounded-l transition-all whitespace-nowrap flex items-center gap-1.5",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)",borderRight:"none"},onMouseEnter:g=>{g.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",g.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:g=>{g.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",g.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:`Copy all ${e} comments to AI coding agent`,children:[r?y.jsx(Fa,{size:12}):y.jsx(Hx,{size:12}),r?"Copied All!":`Copy All Prompt (${e})`]}),y.jsx("button",{onClick:()=>c(!u),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:g=>{g.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",g.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:g=>{g.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",g.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:"More options",children:y.jsx($a,{size:12,className:`transition-transform duration-200 ${u?"rotate-180":""}`})})]}),u&&y.jsxs("div",{className:"absolute left-0 right-0 bg-github-bg-primary border border-github-border rounded-b z-50 pb-px",style:{borderTop:"none"},children:[s&&y.jsxs("button",{onClick:b,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(SS,{size:12}),"View All Comments"]}),y.jsxs("button",{onClick:h,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(oS,{size:12}),"Cleanup All Prompt"]})]})]})}function lh({comment:e,onGeneratePrompt:r,onRemoveComment:l,onUpdateComment:a,onClick:s}){const[u,c]=j.useState(!1),[f,p]=j.useState(!1),[h,b]=j.useState(e.body),g=async E=>{E.stopPropagation();try{const C=r(e);await navigator.clipboard.writeText(C),c(!0),setTimeout(()=>c(!1),2e3)}catch(C){console.error("Failed to copy prompt:",C)}},v=E=>{E.stopPropagation(),p(!0),b(e.body)},x=()=>{p(!1),b(e.body)},w=E=>{E?.stopPropagation(),h.trim()!==e.body&&a(e.id,h.trim()),p(!1)},k=E=>{E.stopPropagation(),l(e.id)},A=E=>{E.key==="Enter"&&(E.metaKey||E.ctrlKey)?(E.preventDefault(),w()):E.key==="Escape"&&(E.preventDefault(),x())};return lt("escape",()=>{f&&x()},{enableOnFormTags:["textarea"],enabled:f},[f]),lt("mod+enter",()=>{f&&w()},{enableOnFormTags:["textarea"],enabled:f},[f,h,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:!f&&y.jsxs(y.Fragment,{children:[y.jsx("button",{onClick:g,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:E=>{E.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",E.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:E=>{E.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",E.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:"Copy prompt for AI coding agent",children:u?"Copied!":"Copy Prompt"}),y.jsx("button",{onClick:v,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(_S,{size:12})}),y.jsx("button",{onClick:k,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(Fa,{size:12})})]})})]}),f?y.jsxs("div",{children:[y.jsx("textarea",{value:h,onChange:E=>b(E.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,h.split(`
10
+ `).length),placeholder:"Edit your comment...",autoFocus:!0,onClick:E=>E.stopPropagation(),onKeyDown:E=>{E.stopPropagation(),A(E)}}),y.jsxs("div",{className:"flex gap-2 justify-end mt-2",children:[y.jsx("button",{type:"button",onClick:x,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:w,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:E=>{E.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",E.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:E=>{E.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",E.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},disabled:!h.trim(),children:"Submit"})]})]}):y.jsx("div",{className:"text-github-text-primary text-sm leading-6 whitespace-pre-wrap",children:e.body})]})}function GS({isOpen:e,onClose:r,onNavigate:l,comments:a,onRemoveComment:s,onGeneratePrompt:u,onUpdateComment:c}){const[f,p]=j.useState(0),h=j.useRef([]),{enableScope:b,disableScope:g}=Pa(),v=[...a].sort((A,E)=>{const C=A.file.localeCompare(E.file);if(C!==0)return C;const T=Array.isArray(A.line)?A.line[0]:A.line,B=Array.isArray(E.line)?E.line[0]:E.line;return T-B}),x=j.useCallback(A=>{l(A),r()},[l,r]),w=j.useCallback(A=>{confirm(`Delete this comment?
11
+
12
+ "${A.body}"`)&&(s(A.id),f>=v.length-1&&f>0&&p(f-1))},[s,f,v.length]);j.useEffect(()=>(e?(b("comments-list"),g("navigation")):(b("navigation"),g("comments-list"),p(0)),()=>{b("navigation"),g("comments-list")}),[e,b,g]);const k={scopes:"comments-list",enableOnFormTags:!1};return lt("escape",()=>r(),k,[r]),lt("j, down",()=>p(A=>Math.min(A+1,v.length-1)),k,[v.length]),lt("k, up",()=>p(A=>Math.max(A-1,0)),k,[]),lt("enter",()=>{v[f]&&x(v[f])},k,[f,v,x]),lt("d",()=>{v[f]&&w(v[f])},k,[f,v,w]),j.useEffect(()=>{h.current[f]&&h.current[f]?.scrollIntoView({behavior:"smooth",block:"nearest"})},[f]),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(Ks,{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:v.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:v.map((A,E)=>y.jsx("div",{ref:C=>{h.current[E]=C},className:`${f===E?"ring-2 ring-blue-500 rounded":""}`,children:y.jsx(lh,{comment:A,onGeneratePrompt:u,onRemoveComment:s,onUpdateComment:c,onClick:C=>{C.stopPropagation(),p(E),x(A)}})},A.id))}),v.length>0&&y.jsxs("div",{className:"mt-4 pt-4 border-t border-github-border text-xs text-github-text-secondary text-center",children:[f+1," of ",v.length," comments"]})]})})})]})]}):null}function Js(){return typeof window<"u"}function Wr(e){return ih(e)?(e.nodeName||"").toLowerCase():"#document"}function an(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function Zn(e){var r;return(r=(ih(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function ih(e){return Js()?e instanceof Node||e instanceof an(e).Node:!1}function ct(e){return Js()?e instanceof Element||e instanceof an(e).Element:!1}function At(e){return Js()?e instanceof HTMLElement||e instanceof an(e).HTMLElement:!1}function js(e){return!Js()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof an(e).ShadowRoot}const YS=new Set(["inline","contents"]);function Ga(e){const{overflow:r,overflowX:l,overflowY:a,display:s}=Mn(e);return/auto|scroll|overlay|hidden|clip/.test(r+a+l)&&!YS.has(s)}const XS=new Set(["table","td","th"]);function ZS(e){return XS.has(Wr(e))}const QS=[":popover-open",":modal"];function Ws(e){return QS.some(r=>{try{return e.matches(r)}catch{return!1}})}const KS=["transform","translate","scale","rotate","perspective"],JS=["transform","translate","scale","rotate","perspective","filter"],WS=["paint","layout","strict","content"];function ah(e){const r=eu(),l=ct(e)?Mn(e):e;return KS.some(a=>l[a]?l[a]!=="none":!1)||(l.containerType?l.containerType!=="normal":!1)||!r&&(l.backdropFilter?l.backdropFilter!=="none":!1)||!r&&(l.filter?l.filter!=="none":!1)||JS.some(a=>(l.willChange||"").includes(a))||WS.some(a=>(l.contain||"").includes(a))}function ek(e){let r=xr(e);for(;At(r)&&!yr(r);){if(ah(r))return r;if(Ws(r))return null;r=xr(r)}return null}function eu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const tk=new Set(["html","body","#document"]);function yr(e){return tk.has(Wr(e))}function Mn(e){return an(e).getComputedStyle(e)}function tu(e){return ct(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xr(e){if(Wr(e)==="html")return e;const r=e.assignedSlot||e.parentNode||js(e)&&e.host||Zn(e);return js(r)?r.host:r}function Xx(e){const r=xr(e);return yr(r)?e.ownerDocument?e.ownerDocument.body:e.body:At(r)&&Ga(r)?r:Xx(r)}function Jr(e,r,l){var a;r===void 0&&(r=[]),l===void 0&&(l=!0);const s=Xx(e),u=s===((a=e.ownerDocument)==null?void 0:a.body),c=an(s);if(u){const f=yd(c);return r.concat(c,c.visualViewport||[],Ga(s)?s:[],f&&l?Jr(f):[])}return r.concat(s,Jr(s,[],l))}function yd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Rs=Math.min,Sl=Math.max,_s=Math.round,gs=Math.floor,Yn=e=>({x:e,y:e}),nk={left:"right",right:"left",bottom:"top",top:"bottom"},rk={start:"end",end:"start"};function zb(e,r,l){return Sl(e,Rs(r,l))}function nu(e,r){return typeof e=="function"?e(r):e}function kl(e){return e.split("-")[0]}function ru(e){return e.split("-")[1]}function Zx(e){return e==="x"?"y":"x"}function Qx(e){return e==="y"?"height":"width"}const lk=new Set(["top","bottom"]);function Zr(e){return lk.has(kl(e))?"y":"x"}function Kx(e){return Zx(Zr(e))}function ik(e,r,l){l===void 0&&(l=!1);const a=ru(e),s=Kx(e),u=Qx(s);let c=s==="x"?a===(l?"end":"start")?"right":"left":a==="start"?"bottom":"top";return r.reference[u]>r.floating[u]&&(c=Ls(c)),[c,Ls(c)]}function ak(e){const r=Ls(e);return[xd(e),r,xd(r)]}function xd(e){return e.replace(/start|end/g,r=>rk[r])}const Bb=["left","right"],Fb=["right","left"],ok=["top","bottom"],sk=["bottom","top"];function uk(e,r,l){switch(e){case"top":case"bottom":return l?r?Fb:Bb:r?Bb:Fb;case"left":case"right":return r?ok:sk;default:return[]}}function ck(e,r,l,a){const s=ru(e);let u=uk(kl(e),l==="start",a);return s&&(u=u.map(c=>c+"-"+s),r&&(u=u.concat(u.map(xd)))),u}function Ls(e){return e.replace(/left|right|bottom|top/g,r=>nk[r])}function fk(e){return{top:0,right:0,bottom:0,left:0,...e}}function dk(e){return typeof e!="number"?fk(e):{top:e,right:e,bottom:e,left:e}}function Ds(e){const{x:r,y:l,width:a,height:s}=e;return{width:a,height:s,top:l,left:r,right:r+a,bottom:l+s,x:r,y:l}}var hk=["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] *)"],Os=hk.join(","),Jx=typeof Element>"u",Ei=Jx?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ms=!Jx&&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},zs=function(r,l){var a;l===void 0&&(l=!0);var s=r==null||(a=r.getAttribute)===null||a===void 0?void 0:a.call(r,"inert"),u=s===""||s==="true",c=u||l&&r&&(typeof r.closest=="function"?r.closest("[inert]"):zs(r.parentNode));return c},pk=function(r){var l,a=r==null||(l=r.getAttribute)===null||l===void 0?void 0:l.call(r,"contenteditable");return a===""||a==="true"},Wx=function(r,l,a){if(zs(r))return[];var s=Array.prototype.slice.apply(r.querySelectorAll(Os));return l&&Ei.call(r,Os)&&s.unshift(r),s=s.filter(a),s},Bs=function(r,l,a){for(var s=[],u=Array.from(r);u.length;){var c=u.shift();if(!zs(c,!1))if(c.tagName==="SLOT"){var f=c.assignedElements(),p=f.length?f:c.children,h=Bs(p,!0,a);a.flatten?s.push.apply(s,h):s.push({scopeParent:c,candidates:h})}else{var b=Ei.call(c,Os);b&&a.filter(c)&&(l||!r.includes(c))&&s.push(c);var g=c.shadowRoot||typeof a.getShadowRoot=="function"&&a.getShadowRoot(c),v=!zs(g,!1)&&(!a.shadowRootFilter||a.shadowRootFilter(c));if(g&&v){var x=Bs(g===!0?c.children:g.children,!0,a);a.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))},t1=function(r){if(!r)throw new Error("No node provided");return r.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(r.tagName)||pk(r))&&!e1(r)?0:r.tabIndex},mk=function(r,l){var a=t1(r);return a<0&&l&&!e1(r)?0:a},gk=function(r,l){return r.tabIndex===l.tabIndex?r.documentOrder-l.documentOrder:r.tabIndex-l.tabIndex},n1=function(r){return r.tagName==="INPUT"},bk=function(r){return n1(r)&&r.type==="hidden"},yk=function(r){var l=r.tagName==="DETAILS"&&Array.prototype.slice.apply(r.children).some(function(a){return a.tagName==="SUMMARY"});return l},xk=function(r,l){for(var a=0;a<r.length;a++)if(r[a].checked&&r[a].form===l)return r[a]},vk=function(r){if(!r.name)return!0;var l=r.form||Ms(r),a=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=a(window.CSS.escape(r.name));else try{s=a(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=xk(s,r.form);return!u||u===r},wk=function(r){return n1(r)&&r.type==="radio"},Sk=function(r){return wk(r)&&!vk(r)},kk=function(r){var l,a=r&&Ms(r),s=(l=a)===null||l===void 0?void 0:l.host,u=!1;if(a&&a!==r){var c,f,p;for(u=!!((c=s)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(s)||r!=null&&(p=r.ownerDocument)!==null&&p!==void 0&&p.contains(r));!u&&s;){var h,b,g;a=Ms(s),s=(h=a)===null||h===void 0?void 0:h.host,u=!!((b=s)!==null&&b!==void 0&&(g=b.ownerDocument)!==null&&g!==void 0&&g.contains(s))}}return u},Ib=function(r){var l=r.getBoundingClientRect(),a=l.width,s=l.height;return a===0&&s===0},Ek=function(r,l){var a=l.displayCheck,s=l.getShadowRoot;if(a==="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=Ei.call(r,"details>summary:first-of-type"),f=c?r.parentElement:r;if(Ei.call(f,"details:not([open]) *"))return!0;if(!a||a==="full"||a==="full-native"||a==="legacy-full"){if(typeof s=="function"){for(var p=r;r;){var h=r.parentElement,b=Ms(r);if(h&&!h.shadowRoot&&s(h)===!0)return Ib(r);r.assignedSlot?r=r.assignedSlot:!h&&b!==r.ownerDocument?r=b.host:r=h}r=p}if(kk(r))return!r.getClientRects().length;if(a!=="legacy-full")return!0}else if(a==="non-zero-area")return Ib(r);return!1},Ck=function(r){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(r.tagName))for(var l=r.parentElement;l;){if(l.tagName==="FIELDSET"&&l.disabled){for(var a=0;a<l.children.length;a++){var s=l.children.item(a);if(s.tagName==="LEGEND")return Ei.call(l,"fieldset[disabled] *")?!0:!s.contains(r)}return!0}l=l.parentElement}return!1},vd=function(r,l){return!(l.disabled||bk(l)||Ek(l,r)||yk(l)||Ck(l))},wd=function(r,l){return!(Sk(l)||t1(l)<0||!vd(r,l))},Ak=function(r){var l=parseInt(r.getAttribute("tabindex"),10);return!!(isNaN(l)||l>=0)},r1=function(r){var l=[],a=[];return r.forEach(function(s,u){var c=!!s.scopeParent,f=c?s.scopeParent:s,p=mk(f,c),h=c?r1(s.candidates):f;p===0?c?l.push.apply(l,h):l.push(f):a.push({documentOrder:u,tabIndex:p,item:s,isScope:c,content:h})}),a.sort(gk).reduce(function(s,u){return u.isScope?s.push.apply(s,u.content):s.push(u.content),s},[]).concat(l)},lu=function(r,l){l=l||{};var a;return l.getShadowRoot?a=Bs([r],l.includeContainer,{filter:wd.bind(null,l),flatten:!1,getShadowRoot:l.getShadowRoot,shadowRootFilter:Ak}):a=Wx(r,l.includeContainer,wd.bind(null,l)),r1(a)},Nk=function(r,l){l=l||{};var a;return l.getShadowRoot?a=Bs([r],l.includeContainer,{filter:vd.bind(null,l),flatten:!0,getShadowRoot:l.getShadowRoot}):a=Wx(r,l.includeContainer,vd.bind(null,l)),a},l1=function(r,l){if(l=l||{},!r)throw new Error("No node provided");return Ei.call(r,Os)===!1?!1:wd(l,r)};function i1(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function a1(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(r=>{let{brand:l,version:a}=r;return l+"/"+a}).join(" "):navigator.userAgent}function o1(){return/apple/i.test(navigator.vendor)}function Sd(){const e=/android/i;return e.test(i1())||e.test(a1())}function Tk(){return i1().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function s1(){return a1().includes("jsdom/")}const Ub="data-floating-ui-focusable",jk="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Xr(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 It(e,r){if(!e||!r)return!1;const l=r.getRootNode==null?void 0:r.getRootNode();if(e.contains(r))return!0;if(l&&js(l)){let a=r;for(;a;){if(e===a)return!0;a=a.parentNode||a.host}}return!1}function gr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Of(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 Rk(e){return e.matches("html,body")}function Ut(e){return e?.ownerDocument||document}function oh(e){return At(e)&&e.matches(jk)}function Hb(e){return e?e.getAttribute("role")==="combobox"&&oh(e):!1}function _k(e){if(!e||s1())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function kd(e){return e?e.hasAttribute(Ub)?e:e.querySelector("["+Ub+"]")||e:null}function vi(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,...vi(e,s.id,l)])}function qb(e,r){var l;let a=[],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&&(a=a.concat(u))}return a}function Mf(e){e.preventDefault(),e.stopPropagation()}function Lk(e){return"nativeEvent"in e}function Dk(e){return e.mozInputSource===0&&e.isTrusted?!0:Sd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Ok(e){return s1()?!1:!Sd()&&e.width===0&&e.height===0||Sd()&&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 Ia(e,r){const l=["mouse","pen"];return r||l.push("",void 0),l.includes(e)}var Mk=typeof document<"u",zk=function(){},ln=Mk?j.useLayoutEffect:zk;const Bk={...Rx};function wl(e){const r=j.useRef(e);return ln(()=>{r.current=e}),r}const Fk=Bk.useInsertionEffect,Ik=Fk||(e=>e());function rn(e){const r=j.useRef(()=>{});return Ik(()=>{r.current=e}),j.useCallback(function(){for(var l=arguments.length,a=new Array(l),s=0;s<l;s++)a[s]=arguments[s];return r.current==null?void 0:r.current(...a)},[])}const Ya=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function u1(e,r){const l=lu(e,Ya()),a=l.length;if(a===0)return;const s=Xr(Ut(e)),u=l.indexOf(s),c=u===-1?r===1?0:a-1:u+r;return l[c]}function c1(e){return u1(Ut(e).body,1)||e}function f1(e){return u1(Ut(e).body,-1)||e}function La(e,r){const l=r||e.currentTarget,a=e.relatedTarget;return!a||!It(l,a)}function Uk(e){lu(e,Ya()).forEach(l=>{l.dataset.tabindex=l.getAttribute("tabindex")||"",l.setAttribute("tabindex","-1")})}function Pb(e){e.querySelectorAll("[data-tabindex]").forEach(l=>{const a=l.dataset.tabindex;delete l.dataset.tabindex,a?l.setAttribute("tabindex",a):l.removeAttribute("tabindex")})}var d1=_x();function $b(e,r,l){let{reference:a,floating:s}=e;const u=Zr(r),c=Kx(r),f=Qx(c),p=kl(r),h=u==="y",b=a.x+a.width/2-s.width/2,g=a.y+a.height/2-s.height/2,v=a[f]/2-s[f]/2;let x;switch(p){case"top":x={x:b,y:a.y-s.height};break;case"bottom":x={x:b,y:a.y+a.height};break;case"right":x={x:a.x+a.width,y:g};break;case"left":x={x:a.x-s.width,y:g};break;default:x={x:a.x,y:a.y}}switch(ru(r)){case"start":x[c]-=v*(l&&h?-1:1);break;case"end":x[c]+=v*(l&&h?-1:1);break}return x}const Hk=async(e,r,l)=>{const{placement:a="bottom",strategy:s="absolute",middleware:u=[],platform:c}=l,f=u.filter(Boolean),p=await(c.isRTL==null?void 0:c.isRTL(r));let h=await c.getElementRects({reference:e,floating:r,strategy:s}),{x:b,y:g}=$b(h,a,p),v=a,x={},w=0;for(let k=0;k<f.length;k++){const{name:A,fn:E}=f[k],{x:C,y:T,data:B,reset:q}=await E({x:b,y:g,initialPlacement:a,placement:v,strategy:s,middlewareData:x,rects:h,platform:c,elements:{reference:e,floating:r}});b=C??b,g=T??g,x={...x,[A]:{...x[A],...B}},q&&w<=50&&(w++,typeof q=="object"&&(q.placement&&(v=q.placement),q.rects&&(h=q.rects===!0?await c.getElementRects({reference:e,floating:r,strategy:s}):q.rects),{x:b,y:g}=$b(h,v,p)),k=-1)}return{x:b,y:g,placement:v,strategy:s,middlewareData:x}};async function h1(e,r){var l;r===void 0&&(r={});const{x:a,y:s,platform:u,rects:c,elements:f,strategy:p}=e,{boundary:h="clippingAncestors",rootBoundary:b="viewport",elementContext:g="floating",altBoundary:v=!1,padding:x=0}=nu(r,e),w=dk(x),A=f[v?g==="floating"?"reference":"floating":g],E=Ds(await u.getClippingRect({element:(l=await(u.isElement==null?void 0:u.isElement(A)))==null||l?A:A.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(f.floating)),boundary:h,rootBoundary:b,strategy:p})),C=g==="floating"?{x:a,y:s,width:c.floating.width,height:c.floating.height}:c.reference,T=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f.floating)),B=await(u.isElement==null?void 0:u.isElement(T))?await(u.getScale==null?void 0:u.getScale(T))||{x:1,y:1}:{x:1,y:1},q=Ds(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:C,offsetParent:T,strategy:p}):C);return{top:(E.top-q.top+w.top)/B.y,bottom:(q.bottom-E.bottom+w.bottom)/B.y,left:(E.left-q.left+w.left)/B.x,right:(q.right-E.right+w.right)/B.x}}const qk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var l,a;const{placement:s,middlewareData:u,rects:c,initialPlacement:f,platform:p,elements:h}=r,{mainAxis:b=!0,crossAxis:g=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:k=!0,...A}=nu(e,r);if((l=u.arrow)!=null&&l.alignmentOffset)return{};const E=kl(s),C=Zr(f),T=kl(f)===f,B=await(p.isRTL==null?void 0:p.isRTL(h.floating)),q=v||(T||!k?[Ls(f)]:ak(f)),D=w!=="none";!v&&D&&q.push(...ck(f,k,w,B));const U=[f,...q],V=await h1(r,A),G=[];let M=((a=u.flip)==null?void 0:a.overflows)||[];if(b&&G.push(V[E]),g){const I=ik(s,c,B);G.push(V[I[0]],V[I[1]])}if(M=[...M,{placement:s,overflows:G}],!G.every(I=>I<=0)){var $,Y;const I=((($=u.flip)==null?void 0:$.index)||0)+1,X=U[I];if(X&&(!(g==="alignment"?C!==Zr(X):!1)||M.every(z=>Zr(z.placement)===C?z.overflows[0]>0:!0)))return{data:{index:I,overflows:M},reset:{placement:X}};let F=(Y=M.filter(O=>O.overflows[0]<=0).sort((O,z)=>O.overflows[1]-z.overflows[1])[0])==null?void 0:Y.placement;if(!F)switch(x){case"bestFit":{var J;const O=(J=M.filter(z=>{if(D){const Q=Zr(z.placement);return Q===C||Q==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(Q=>Q>0).reduce((Q,R)=>Q+R,0)]).sort((z,Q)=>z[1]-Q[1])[0])==null?void 0:J[0];O&&(F=O);break}case"initialPlacement":F=f;break}if(s!==F)return{reset:{placement:F}}}return{}}}},Pk=new Set(["left","top"]);async function $k(e,r){const{placement:l,platform:a,elements:s}=e,u=await(a.isRTL==null?void 0:a.isRTL(s.floating)),c=kl(l),f=ru(l),p=Zr(l)==="y",h=Pk.has(c)?-1:1,b=u&&p?-1:1,g=nu(r,e);let{mainAxis:v,crossAxis:x,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof w=="number"&&(x=f==="end"?w*-1:w),p?{x:x*b,y:v*h}:{x:v*h,y:x*b}}const Vk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var l,a;const{x:s,y:u,placement:c,middlewareData:f}=r,p=await $k(r,e);return c===((l=f.offset)==null?void 0:l.placement)&&(a=f.arrow)!=null&&a.alignmentOffset?{}:{x:s+p.x,y:u+p.y,data:{...p,placement:c}}}}},Gk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:l,y:a,placement:s}=r,{mainAxis:u=!0,crossAxis:c=!1,limiter:f={fn:A=>{let{x:E,y:C}=A;return{x:E,y:C}}},...p}=nu(e,r),h={x:l,y:a},b=await h1(r,p),g=Zr(kl(s)),v=Zx(g);let x=h[v],w=h[g];if(u){const A=v==="y"?"top":"left",E=v==="y"?"bottom":"right",C=x+b[A],T=x-b[E];x=zb(C,x,T)}if(c){const A=g==="y"?"top":"left",E=g==="y"?"bottom":"right",C=w+b[A],T=w-b[E];w=zb(C,w,T)}const k=f.fn({...r,[v]:x,[g]:w});return{...k,data:{x:k.x-l,y:k.y-a,enabled:{[v]:u,[g]:c}}}}}};function p1(e){const r=Mn(e);let l=parseFloat(r.width)||0,a=parseFloat(r.height)||0;const s=At(e),u=s?e.offsetWidth:l,c=s?e.offsetHeight:a,f=_s(l)!==u||_s(a)!==c;return f&&(l=u,a=c),{width:l,height:a,$:f}}function sh(e){return ct(e)?e:e.contextElement}function wi(e){const r=sh(e);if(!At(r))return Yn(1);const l=r.getBoundingClientRect(),{width:a,height:s,$:u}=p1(r);let c=(u?_s(l.width):l.width)/a,f=(u?_s(l.height):l.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const Yk=Yn(0);function m1(e){const r=an(e);return!eu()||!r.visualViewport?Yk:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function Xk(e,r,l){return r===void 0&&(r=!1),!l||r&&l!==an(e)?!1:r}function El(e,r,l,a){r===void 0&&(r=!1),l===void 0&&(l=!1);const s=e.getBoundingClientRect(),u=sh(e);let c=Yn(1);r&&(a?ct(a)&&(c=wi(a)):c=wi(e));const f=Xk(u,l,a)?m1(u):Yn(0);let p=(s.left+f.x)/c.x,h=(s.top+f.y)/c.y,b=s.width/c.x,g=s.height/c.y;if(u){const v=an(u),x=a&&ct(a)?an(a):a;let w=v,k=yd(w);for(;k&&a&&x!==w;){const A=wi(k),E=k.getBoundingClientRect(),C=Mn(k),T=E.left+(k.clientLeft+parseFloat(C.paddingLeft))*A.x,B=E.top+(k.clientTop+parseFloat(C.paddingTop))*A.y;p*=A.x,h*=A.y,b*=A.x,g*=A.y,p+=T,h+=B,w=an(k),k=yd(w)}}return Ds({width:b,height:g,x:p,y:h})}function iu(e,r){const l=tu(e).scrollLeft;return r?r.left+l:El(Zn(e)).left+l}function g1(e,r){const l=e.getBoundingClientRect(),a=l.left+r.scrollLeft-iu(e,l),s=l.top+r.scrollTop;return{x:a,y:s}}function Zk(e){let{elements:r,rect:l,offsetParent:a,strategy:s}=e;const u=s==="fixed",c=Zn(a),f=r?Ws(r.floating):!1;if(a===c||f&&u)return l;let p={scrollLeft:0,scrollTop:0},h=Yn(1);const b=Yn(0),g=At(a);if((g||!g&&!u)&&((Wr(a)!=="body"||Ga(c))&&(p=tu(a)),At(a))){const x=El(a);h=wi(a),b.x=x.x+a.clientLeft,b.y=x.y+a.clientTop}const v=c&&!g&&!u?g1(c,p):Yn(0);return{width:l.width*h.x,height:l.height*h.y,x:l.x*h.x-p.scrollLeft*h.x+b.x+v.x,y:l.y*h.y-p.scrollTop*h.y+b.y+v.y}}function Qk(e){return Array.from(e.getClientRects())}function Kk(e){const r=Zn(e),l=tu(e),a=e.ownerDocument.body,s=Sl(r.scrollWidth,r.clientWidth,a.scrollWidth,a.clientWidth),u=Sl(r.scrollHeight,r.clientHeight,a.scrollHeight,a.clientHeight);let c=-l.scrollLeft+iu(e);const f=-l.scrollTop;return Mn(a).direction==="rtl"&&(c+=Sl(r.clientWidth,a.clientWidth)-s),{width:s,height:u,x:c,y:f}}const Vb=25;function Jk(e,r){const l=an(e),a=Zn(e),s=l.visualViewport;let u=a.clientWidth,c=a.clientHeight,f=0,p=0;if(s){u=s.width,c=s.height;const b=eu();(!b||b&&r==="fixed")&&(f=s.offsetLeft,p=s.offsetTop)}const h=iu(a);if(h<=0){const b=a.ownerDocument,g=b.body,v=getComputedStyle(g),x=b.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,w=Math.abs(a.clientWidth-g.clientWidth-x);w<=Vb&&(u-=w)}else h<=Vb&&(u+=h);return{width:u,height:c,x:f,y:p}}const Wk=new Set(["absolute","fixed"]);function eE(e,r){const l=El(e,!0,r==="fixed"),a=l.top+e.clientTop,s=l.left+e.clientLeft,u=At(e)?wi(e):Yn(1),c=e.clientWidth*u.x,f=e.clientHeight*u.y,p=s*u.x,h=a*u.y;return{width:c,height:f,x:p,y:h}}function Gb(e,r,l){let a;if(r==="viewport")a=Jk(e,l);else if(r==="document")a=Kk(Zn(e));else if(ct(r))a=eE(r,l);else{const s=m1(e);a={x:r.x-s.x,y:r.y-s.y,width:r.width,height:r.height}}return Ds(a)}function b1(e,r){const l=xr(e);return l===r||!ct(l)||yr(l)?!1:Mn(l).position==="fixed"||b1(l,r)}function tE(e,r){const l=r.get(e);if(l)return l;let a=Jr(e,[],!1).filter(f=>ct(f)&&Wr(f)!=="body"),s=null;const u=Mn(e).position==="fixed";let c=u?xr(e):e;for(;ct(c)&&!yr(c);){const f=Mn(c),p=ah(c);!p&&f.position==="fixed"&&(s=null),(u?!p&&!s:!p&&f.position==="static"&&!!s&&Wk.has(s.position)||Ga(c)&&!p&&b1(e,c))?a=a.filter(b=>b!==c):s=f,c=xr(c)}return r.set(e,a),a}function nE(e){let{element:r,boundary:l,rootBoundary:a,strategy:s}=e;const c=[...l==="clippingAncestors"?Ws(r)?[]:tE(r,this._c):[].concat(l),a],f=c[0],p=c.reduce((h,b)=>{const g=Gb(r,b,s);return h.top=Sl(g.top,h.top),h.right=Rs(g.right,h.right),h.bottom=Rs(g.bottom,h.bottom),h.left=Sl(g.left,h.left),h},Gb(r,f,s));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function rE(e){const{width:r,height:l}=p1(e);return{width:r,height:l}}function lE(e,r,l){const a=At(r),s=Zn(r),u=l==="fixed",c=El(e,!0,u,r);let f={scrollLeft:0,scrollTop:0};const p=Yn(0);function h(){p.x=iu(s)}if(a||!a&&!u)if((Wr(r)!=="body"||Ga(s))&&(f=tu(r)),a){const x=El(r,!0,u,r);p.x=x.x+r.clientLeft,p.y=x.y+r.clientTop}else s&&h();u&&!a&&s&&h();const b=s&&!a&&!u?g1(s,f):Yn(0),g=c.left+f.scrollLeft-p.x-b.x,v=c.top+f.scrollTop-p.y-b.y;return{x:g,y:v,width:c.width,height:c.height}}function zf(e){return Mn(e).position==="static"}function Yb(e,r){if(!At(e)||Mn(e).position==="fixed")return null;if(r)return r(e);let l=e.offsetParent;return Zn(e)===l&&(l=l.ownerDocument.body),l}function y1(e,r){const l=an(e);if(Ws(e))return l;if(!At(e)){let s=xr(e);for(;s&&!yr(s);){if(ct(s)&&!zf(s))return s;s=xr(s)}return l}let a=Yb(e,r);for(;a&&ZS(a)&&zf(a);)a=Yb(a,r);return a&&yr(a)&&zf(a)&&!ah(a)?l:a||ek(e)||l}const iE=async function(e){const r=this.getOffsetParent||y1,l=this.getDimensions,a=await l(e.floating);return{reference:lE(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function aE(e){return Mn(e).direction==="rtl"}const oE={convertOffsetParentRelativeRectToViewportRelativeRect:Zk,getDocumentElement:Zn,getClippingRect:nE,getOffsetParent:y1,getElementRects:iE,getClientRects:Qk,getDimensions:rE,getScale:wi,isElement:ct,isRTL:aE};function x1(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function sE(e,r){let l=null,a;const s=Zn(e);function u(){var f;clearTimeout(a),(f=l)==null||f.disconnect(),l=null}function c(f,p){f===void 0&&(f=!1),p===void 0&&(p=1),u();const h=e.getBoundingClientRect(),{left:b,top:g,width:v,height:x}=h;if(f||r(),!v||!x)return;const w=gs(g),k=gs(s.clientWidth-(b+v)),A=gs(s.clientHeight-(g+x)),E=gs(b),T={rootMargin:-w+"px "+-k+"px "+-A+"px "+-E+"px",threshold:Sl(0,Rs(1,p))||1};let B=!0;function q(D){const U=D[0].intersectionRatio;if(U!==p){if(!B)return c();U?c(!1,U):a=setTimeout(()=>{c(!1,1e-7)},1e3)}U===1&&!x1(h,e.getBoundingClientRect())&&c(),B=!1}try{l=new IntersectionObserver(q,{...T,root:s.ownerDocument})}catch{l=new IntersectionObserver(q,T)}l.observe(e)}return c(!0),u}function Ed(e,r,l,a){a===void 0&&(a={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:p=!1}=a,h=sh(e),b=s||u?[...h?Jr(h):[],...Jr(r)]:[];b.forEach(E=>{s&&E.addEventListener("scroll",l,{passive:!0}),u&&E.addEventListener("resize",l)});const g=h&&f?sE(h,l):null;let v=-1,x=null;c&&(x=new ResizeObserver(E=>{let[C]=E;C&&C.target===h&&x&&(x.unobserve(r),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var T;(T=x)==null||T.observe(r)})),l()}),h&&!p&&x.observe(h),x.observe(r));let w,k=p?El(e):null;p&&A();function A(){const E=El(e);k&&!x1(k,E)&&l(),k=E,w=requestAnimationFrame(A)}return l(),()=>{var E;b.forEach(C=>{s&&C.removeEventListener("scroll",l),u&&C.removeEventListener("resize",l)}),g?.(),(E=x)==null||E.disconnect(),x=null,p&&cancelAnimationFrame(w)}}const uE=Vk,cE=Gk,fE=qk,dE=(e,r,l)=>{const a=new Map,s={platform:oE,...l},u={...s.platform,_c:a};return Hk(e,r,{...s,platform:u})};var hE=typeof document<"u",pE=function(){},As=hE?j.useLayoutEffect:pE;function Fs(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,a,s;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(l=e.length,l!==r.length)return!1;for(a=l;a--!==0;)if(!Fs(e[a],r[a]))return!1;return!0}if(s=Object.keys(e),l=s.length,l!==Object.keys(r).length)return!1;for(a=l;a--!==0;)if(!{}.hasOwnProperty.call(r,s[a]))return!1;for(a=l;a--!==0;){const u=s[a];if(!(u==="_owner"&&e.$$typeof)&&!Fs(e[u],r[u]))return!1}return!0}return e!==e&&r!==r}function v1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xb(e,r){const l=v1(e);return Math.round(r*l)/l}function Bf(e){const r=j.useRef(e);return As(()=>{r.current=e}),r}function mE(e){e===void 0&&(e={});const{placement:r="bottom",strategy:l="absolute",middleware:a=[],platform:s,elements:{reference:u,floating:c}={},transform:f=!0,whileElementsMounted:p,open:h}=e,[b,g]=j.useState({x:0,y:0,strategy:l,placement:r,middlewareData:{},isPositioned:!1}),[v,x]=j.useState(a);Fs(v,a)||x(a);const[w,k]=j.useState(null),[A,E]=j.useState(null),C=j.useCallback(z=>{z!==D.current&&(D.current=z,k(z))},[]),T=j.useCallback(z=>{z!==U.current&&(U.current=z,E(z))},[]),B=u||w,q=c||A,D=j.useRef(null),U=j.useRef(null),V=j.useRef(b),G=p!=null,M=Bf(p),$=Bf(s),Y=Bf(h),J=j.useCallback(()=>{if(!D.current||!U.current)return;const z={placement:r,strategy:l,middleware:v};$.current&&(z.platform=$.current),dE(D.current,U.current,z).then(Q=>{const R={...Q,isPositioned:Y.current!==!1};I.current&&!Fs(V.current,R)&&(V.current=R,d1.flushSync(()=>{g(R)}))})},[v,r,l,$,Y]);As(()=>{h===!1&&V.current.isPositioned&&(V.current.isPositioned=!1,g(z=>({...z,isPositioned:!1})))},[h]);const I=j.useRef(!1);As(()=>(I.current=!0,()=>{I.current=!1}),[]),As(()=>{if(B&&(D.current=B),q&&(U.current=q),B&&q){if(M.current)return M.current(B,q,J);J()}},[B,q,J,M,G]);const X=j.useMemo(()=>({reference:D,floating:U,setReference:C,setFloating:T}),[C,T]),F=j.useMemo(()=>({reference:B,floating:q}),[B,q]),O=j.useMemo(()=>{const z={position:l,left:0,top:0};if(!F.floating)return z;const Q=Xb(F.floating,b.x),R=Xb(F.floating,b.y);return f?{...z,transform:"translate("+Q+"px, "+R+"px)",...v1(F.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:Q,top:R}},[l,f,F.floating,b.x,b.y]);return j.useMemo(()=>({...b,update:J,refs:X,elements:F,floatingStyles:O}),[b,J,X,F,O])}const Cd=(e,r)=>({...uE(e),options:[e,r]}),Ad=(e,r)=>({...cE(e),options:[e,r]}),Nd=(e,r)=>({...fE(e),options:[e,r]}),gE="data-floating-ui-focusable",Zb="active",Qb="selected",bE={...Rx};let Kb=!1,yE=0;const Jb=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+yE++;function xE(){const[e,r]=j.useState(()=>Kb?Jb():void 0);return ln(()=>{e==null&&r(Jb())},[]),j.useEffect(()=>{Kb=!0},[]),e}const vE=bE.useId,uh=vE||xE;function wE(){const e=new Map;return{emit(r,l){var a;(a=e.get(r))==null||a.forEach(s=>s(l))},on(r,l){e.has(r)||e.set(r,new Set),e.get(r).add(l)},off(r,l){var a;(a=e.get(r))==null||a.delete(l)}}}const SE=j.createContext(null),kE=j.createContext(null),ch=()=>{var e;return((e=j.useContext(SE))==null?void 0:e.id)||null},au=()=>j.useContext(kE);function Cl(e){return"data-floating-ui-"+e}function Gt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Wb=Cl("safe-polygon");function Ff(e,r,l){if(l&&!Ia(l))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const a=e();return typeof a=="number"?a:a?.[r]}return e?.[r]}function If(e){return typeof e=="function"?e():e}function Td(e,r){r===void 0&&(r={});const{open:l,onOpenChange:a,dataRef:s,events:u,elements:c}=e,{enabled:f=!0,delay:p=0,handleClose:h=null,mouseOnly:b=!1,restMs:g=0,move:v=!0}=r,x=au(),w=ch(),k=wl(h),A=wl(p),E=wl(l),C=wl(g),T=j.useRef(),B=j.useRef(-1),q=j.useRef(),D=j.useRef(-1),U=j.useRef(!0),V=j.useRef(!1),G=j.useRef(()=>{}),M=j.useRef(!1),$=rn(()=>{var O;const z=(O=s.current.openEvent)==null?void 0:O.type;return z?.includes("mouse")&&z!=="mousedown"});j.useEffect(()=>{if(!f)return;function O(z){let{open:Q}=z;Q||(Gt(B),Gt(D),U.current=!0,M.current=!1)}return u.on("openchange",O),()=>{u.off("openchange",O)}},[f,u]),j.useEffect(()=>{if(!f||!k.current||!l)return;function O(Q){$()&&a(!1,Q,"hover")}const z=Ut(c.floating).documentElement;return z.addEventListener("mouseleave",O),()=>{z.removeEventListener("mouseleave",O)}},[c.floating,l,a,f,k,$]);const Y=j.useCallback(function(O,z,Q){z===void 0&&(z=!0),Q===void 0&&(Q="hover");const R=Ff(A.current,"close",T.current);R&&!q.current?(Gt(B),B.current=window.setTimeout(()=>a(!1,O,Q),R)):z&&(Gt(B),a(!1,O,Q))},[A,a]),J=rn(()=>{G.current(),q.current=void 0}),I=rn(()=>{if(V.current){const O=Ut(c.floating).body;O.style.pointerEvents="",O.removeAttribute(Wb),V.current=!1}}),X=rn(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);j.useEffect(()=>{if(!f)return;function O(H){if(Gt(B),U.current=!1,b&&!Ia(T.current)||If(C.current)>0&&!Ff(A.current,"open"))return;const N=Ff(A.current,"open",T.current);N?B.current=window.setTimeout(()=>{E.current||a(!0,H,"hover")},N):l||a(!0,H,"hover")}function z(H){if(X()){I();return}G.current();const N=Ut(c.floating);if(Gt(D),M.current=!1,k.current&&s.current.floatingContext){l||Gt(B),q.current=k.current({...s.current.floatingContext,tree:x,x:H.clientX,y:H.clientY,onClose(){I(),J(),X()||Y(H,!0,"safe-polygon")}});const ce=q.current;N.addEventListener("mousemove",ce),G.current=()=>{N.removeEventListener("mousemove",ce)};return}(T.current!=="touch"||!It(c.floating,H.relatedTarget))&&Y(H)}function Q(H){X()||s.current.floatingContext&&(k.current==null||k.current({...s.current.floatingContext,tree:x,x:H.clientX,y:H.clientY,onClose(){I(),J(),X()||Y(H)}})(H))}function R(){Gt(B)}function L(H){X()||Y(H,!1)}if(ct(c.domReference)){const H=c.domReference,N=c.floating;return l&&H.addEventListener("mouseleave",Q),v&&H.addEventListener("mousemove",O,{once:!0}),H.addEventListener("mouseenter",O),H.addEventListener("mouseleave",z),N&&(N.addEventListener("mouseleave",Q),N.addEventListener("mouseenter",R),N.addEventListener("mouseleave",L)),()=>{l&&H.removeEventListener("mouseleave",Q),v&&H.removeEventListener("mousemove",O),H.removeEventListener("mouseenter",O),H.removeEventListener("mouseleave",z),N&&(N.removeEventListener("mouseleave",Q),N.removeEventListener("mouseenter",R),N.removeEventListener("mouseleave",L))}}},[c,f,e,b,v,Y,J,I,a,l,E,x,A,k,s,X,C]),ln(()=>{var O;if(f&&l&&(O=k.current)!=null&&(O=O.__options)!=null&&O.blockPointerEvents&&$()){V.current=!0;const Q=c.floating;if(ct(c.domReference)&&Q){var z;const R=Ut(c.floating).body;R.setAttribute(Wb,"");const L=c.domReference,H=x==null||(z=x.nodesRef.current.find(N=>N.id===w))==null||(z=z.context)==null?void 0:z.elements.floating;return H&&(H.style.pointerEvents=""),R.style.pointerEvents="none",L.style.pointerEvents="auto",Q.style.pointerEvents="auto",()=>{R.style.pointerEvents="",L.style.pointerEvents="",Q.style.pointerEvents=""}}}},[f,l,w,c,x,k,$]),ln(()=>{l||(T.current=void 0,M.current=!1,J(),I())},[l,J,I]),j.useEffect(()=>()=>{J(),Gt(B),Gt(D),I()},[f,c.domReference,J,I]);const F=j.useMemo(()=>{function O(z){T.current=z.pointerType}return{onPointerDown:O,onPointerEnter:O,onMouseMove(z){const{nativeEvent:Q}=z;function R(){!U.current&&!E.current&&a(!0,Q,"hover")}b&&!Ia(T.current)||l||If(C.current)===0||M.current&&z.movementX**2+z.movementY**2<2||(Gt(D),T.current==="touch"?R():(M.current=!0,D.current=window.setTimeout(R,If(C.current))))}}},[b,a,l,E,C]);return j.useMemo(()=>f?{reference:F}:{},[f,F])}let ey=0;function pi(e,r){r===void 0&&(r={});const{preventScroll:l=!1,cancelPrevious:a=!0,sync:s=!1}=r;a&&cancelAnimationFrame(ey);const u=()=>e?.focus({preventScroll:l});s?u():ey=requestAnimationFrame(u)}function Uf(e,r){if(!e||!r)return!1;const l=r.getRootNode==null?void 0:r.getRootNode();if(e.contains(r))return!0;if(l&&js(l)){let a=r;for(;a;){if(e===a)return!0;a=a.parentNode||a.host}}return!1}function EE(e){return"composedPath"in e?e.composedPath()[0]:e.target}function CE(e){return e?.ownerDocument||document}const Si={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function ty(e){return e==="inert"?Si.inert:e==="aria-hidden"?Si["aria-hidden"]:Si.none}let bs=new WeakSet,ys={},Hf=0;const AE=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,w1=e=>e&&(e.host||w1(e.parentNode)),NE=(e,r)=>r.map(l=>{if(e.contains(l))return l;const a=w1(l);return e.contains(a)?a:null}).filter(l=>l!=null);function TE(e,r,l,a){const s="data-floating-ui-inert",u=a?"inert":l?"aria-hidden":null,c=NE(r,e),f=new Set,p=new Set(c),h=[];ys[s]||(ys[s]=new WeakMap);const b=ys[s];c.forEach(g),v(r),f.clear();function g(x){!x||f.has(x)||(f.add(x),x.parentNode&&g(x.parentNode))}function v(x){!x||p.has(x)||[].forEach.call(x.children,w=>{if(Wr(w)!=="script")if(f.has(w))v(w);else{const k=u?w.getAttribute(u):null,A=k!==null&&k!=="false",E=ty(u),C=(E.get(w)||0)+1,T=(b.get(w)||0)+1;E.set(w,C),b.set(w,T),h.push(w),C===1&&A&&bs.add(w),T===1&&w.setAttribute(s,""),!A&&u&&w.setAttribute(u,u==="inert"?"":"true")}})}return Hf++,()=>{h.forEach(x=>{const w=ty(u),A=(w.get(x)||0)-1,E=(b.get(x)||0)-1;w.set(x,A),b.set(x,E),A||(!bs.has(x)&&u&&x.removeAttribute(u),bs.delete(x)),E||x.removeAttribute(s)}),Hf--,Hf||(Si.inert=new WeakMap,Si["aria-hidden"]=new WeakMap,Si.none=new WeakMap,bs=new WeakSet,ys={})}}function ny(e,r,l){r===void 0&&(r=!1),l===void 0&&(l=!1);const a=CE(e[0]).body;return TE(e.concat(Array.from(a.querySelectorAll('[aria-live],[role="status"],output'))),a,r,l)}const ou={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},Is=j.forwardRef(function(r,l){const[a,s]=j.useState();ln(()=>{o1()&&s("button")},[]);const u={ref:l,tabIndex:0,role:a,"aria-hidden":a?void 0:!0,[Cl("focus-guard")]:"",style:ou};return y.jsx("span",{...r,...u})}),S1=j.createContext(null),ry=Cl("portal");function jE(e){e===void 0&&(e={});const{id:r,root:l}=e,a=uh(),s=k1(),[u,c]=j.useState(null),f=j.useRef(null);return ln(()=>()=>{u?.remove(),queueMicrotask(()=>{f.current=null})},[u]),ln(()=>{if(!a||f.current)return;const p=r?document.getElementById(r):null;if(!p)return;const h=document.createElement("div");h.id=a,h.setAttribute(ry,""),p.appendChild(h),f.current=h,c(h)},[r,a]),ln(()=>{if(l===null||!a||f.current)return;let p=l||s?.portalNode;p&&!ih(p)&&(p=p.current),p=p||document.body;let h=null;r&&(h=document.createElement("div"),h.id=r,p.appendChild(h));const b=document.createElement("div");b.id=a,b.setAttribute(ry,""),p=h||p,p.appendChild(b),f.current=b,c(b)},[r,l,a,s]),u}function jd(e){const{children:r,id:l,root:a,preserveTabOrder:s=!0}=e,u=jE({id:l,root:a}),[c,f]=j.useState(null),p=j.useRef(null),h=j.useRef(null),b=j.useRef(null),g=j.useRef(null),v=c?.modal,x=c?.open,w=!!c&&!c.modal&&c.open&&s&&!!(a||u);return j.useEffect(()=>{if(!u||!s||v)return;function k(A){u&&La(A)&&(A.type==="focusin"?Pb:Uk)(u)}return u.addEventListener("focusin",k,!0),u.addEventListener("focusout",k,!0),()=>{u.removeEventListener("focusin",k,!0),u.removeEventListener("focusout",k,!0)}},[u,s,v]),j.useEffect(()=>{u&&(x||Pb(u))},[x,u]),y.jsxs(S1.Provider,{value:j.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:p,afterOutsideRef:h,beforeInsideRef:b,afterInsideRef:g,portalNode:u,setFocusManagerState:f}),[s,u]),children:[w&&u&&y.jsx(Is,{"data-type":"outside",ref:p,onFocus:k=>{if(La(k,u)){var A;(A=b.current)==null||A.focus()}else{const E=c?c.domReference:null,C=f1(E);C?.focus()}}}),w&&u&&y.jsx("span",{"aria-owns":u.id,style:ou}),u&&d1.createPortal(r,u),w&&u&&y.jsx(Is,{"data-type":"outside",ref:h,onFocus:k=>{if(La(k,u)){var A;(A=g.current)==null||A.focus()}else{const E=c?c.domReference:null,C=c1(E);C?.focus(),c?.closeOnFocusOut&&c?.onOpenChange(!1,k.nativeEvent,"focus-out")}}})]})}const k1=()=>j.useContext(S1);function ly(e){return j.useMemo(()=>r=>{e.forEach(l=>{l&&(l.current=r)})},e)}const RE=20;let Qr=[];function fh(){Qr=Qr.filter(e=>e.isConnected)}function _E(e){fh(),e&&Wr(e)!=="body"&&(Qr.push(e),Qr.length>RE&&(Qr=Qr.slice(-20)))}function iy(){return fh(),Qr[Qr.length-1]}function LE(e){const r=Ya();return l1(e,r)?e:lu(e,r)[0]||e}function ay(e,r){var l;if(!r.current.includes("floating")&&!((l=e.getAttribute("role"))!=null&&l.includes("dialog")))return;const a=Ya(),u=Nk(e,a).filter(f=>{const p=f.getAttribute("data-tabindex")||"";return l1(f,a)||f.hasAttribute("data-tabindex")&&!p.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 DE=j.forwardRef(function(r,l){return y.jsx("button",{...r,type:"button",ref:l,tabIndex:-1,style:ou})});function OE(e){const{context:r,children:l,disabled:a=!1,order:s=["content"],guards:u=!0,initialFocus:c=0,returnFocus:f=!0,restoreFocus:p=!1,modal:h=!0,visuallyHiddenDismiss:b=!1,closeOnFocusOut:g=!0,outsideElementsInert:v=!1,getInsideElements:x=()=>[]}=e,{open:w,onOpenChange:k,events:A,dataRef:E,elements:{domReference:C,floating:T}}=r,B=rn(()=>{var ye;return(ye=E.current.floatingContext)==null?void 0:ye.nodeId}),q=rn(x),D=typeof c=="number"&&c<0,U=Hb(C)&&D,V=AE(),G=V?u:!0,M=!G||V&&v,$=wl(s),Y=wl(c),J=wl(f),I=au(),X=k1(),F=j.useRef(null),O=j.useRef(null),z=j.useRef(!1),Q=j.useRef(!1),R=j.useRef(-1),L=j.useRef(-1),H=X!=null,N=kd(T),re=rn(function(ye){return ye===void 0&&(ye=N),ye?lu(ye,Ya()):[]}),ce=rn(ye=>{const ke=re(ye);return $.current.map(Ne=>C&&Ne==="reference"?C:N&&Ne==="floating"?N:ke).filter(Boolean).flat()});j.useEffect(()=>{if(a||!h)return;function ye(Ne){if(Ne.key==="Tab"){It(N,Xr(Ut(N)))&&re().length===0&&!U&&Mf(Ne);const Ve=ce(),et=gr(Ne);$.current[0]==="reference"&&et===C&&(Mf(Ne),Ne.shiftKey?pi(Ve[Ve.length-1]):pi(Ve[1])),$.current[1]==="floating"&&et===N&&Ne.shiftKey&&(Mf(Ne),pi(Ve[0]))}}const ke=Ut(N);return ke.addEventListener("keydown",ye),()=>{ke.removeEventListener("keydown",ye)}},[a,C,N,h,$,U,re,ce]),j.useEffect(()=>{if(a||!T)return;function ye(ke){const Ne=gr(ke),et=re().indexOf(Ne);et!==-1&&(R.current=et)}return T.addEventListener("focusin",ye),()=>{T.removeEventListener("focusin",ye)}},[a,T,re]),j.useEffect(()=>{if(a||!g)return;function ye(){Q.current=!0,setTimeout(()=>{Q.current=!1})}function ke(et){const He=et.relatedTarget,Ke=et.currentTarget,gt=gr(et);queueMicrotask(()=>{const pt=B(),_t=!(It(C,He)||It(T,He)||It(He,T)||It(X?.portalNode,He)||He!=null&&He.hasAttribute(Cl("focus-guard"))||I&&(vi(I.nodesRef.current,pt).find(Zt=>{var Pt,it;return It((Pt=Zt.context)==null?void 0:Pt.elements.floating,He)||It((it=Zt.context)==null?void 0:it.elements.domReference,He)})||qb(I.nodesRef.current,pt).find(Zt=>{var Pt,it,wr;return[(Pt=Zt.context)==null?void 0:Pt.elements.floating,kd((it=Zt.context)==null?void 0:it.elements.floating)].includes(He)||((wr=Zt.context)==null?void 0:wr.elements.domReference)===He})));if(Ke===C&&N&&ay(N,$),p&&Ke!==C&&!(gt!=null&&gt.isConnected)&&Xr(Ut(N))===Ut(N).body){At(N)&&N.focus();const Zt=R.current,Pt=re(),it=Pt[Zt]||Pt[Pt.length-1]||N;At(it)&&it.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}(U||!h)&&He&&_t&&!Q.current&&He!==iy()&&(z.current=!0,k(!1,et,"focus-out"))})}const Ne=!!(!I&&X);function Ve(){Gt(L),E.current.insideReactTree=!0,L.current=window.setTimeout(()=>{E.current.insideReactTree=!1})}if(T&&At(C))return C.addEventListener("focusout",ke),C.addEventListener("pointerdown",ye),T.addEventListener("focusout",ke),Ne&&T.addEventListener("focusout",Ve,!0),()=>{C.removeEventListener("focusout",ke),C.removeEventListener("pointerdown",ye),T.removeEventListener("focusout",ke),Ne&&T.removeEventListener("focusout",Ve,!0)}},[a,C,T,N,h,I,X,k,g,p,re,U,B,$,E]);const de=j.useRef(null),pe=j.useRef(null),ge=ly([de,X?.beforeInsideRef]),fe=ly([pe,X?.afterInsideRef]);j.useEffect(()=>{var ye,ke;if(a||!T)return;const Ne=Array.from((X==null||(ye=X.portalNode)==null?void 0:ye.querySelectorAll("["+Cl("portal")+"]"))||[]),et=(ke=(I?qb(I.nodesRef.current,B()):[]).find(gt=>{var pt;return Hb(((pt=gt.context)==null?void 0:pt.elements.domReference)||null)}))==null||(ke=ke.context)==null?void 0:ke.elements.domReference,He=[T,et,...Ne,...q(),F.current,O.current,de.current,pe.current,X?.beforeOutsideRef.current,X?.afterOutsideRef.current,$.current.includes("reference")||U?C:null].filter(gt=>gt!=null),Ke=h||U?ny(He,!M,M):ny(He);return()=>{Ke()}},[a,C,T,h,$,X,U,G,M,I,B,q]),ln(()=>{if(a||!At(N))return;const ye=Ut(N),ke=Xr(ye);queueMicrotask(()=>{const Ne=ce(N),Ve=Y.current,et=(typeof Ve=="number"?Ne[Ve]:Ve.current)||N,He=It(N,ke);!D&&!He&&w&&pi(et,{preventScroll:et===N})})},[a,w,N,D,ce,Y]),ln(()=>{if(a||!N)return;const ye=Ut(N),ke=Xr(ye);_E(ke);function Ne(He){let{reason:Ke,event:gt,nested:pt}=He;if(["hover","safe-polygon"].includes(Ke)&&gt.type==="mouseleave"&&(z.current=!0),Ke==="outside-press")if(pt)z.current=!1;else if(Dk(gt)||Ok(gt))z.current=!1;else{let _t=!1;document.createElement("div").focus({get preventScroll(){return _t=!0,!1}}),_t?z.current=!1:z.current=!0}}A.on("openchange",Ne);const Ve=ye.createElement("span");Ve.setAttribute("tabindex","-1"),Ve.setAttribute("aria-hidden","true"),Object.assign(Ve.style,ou),H&&C&&C.insertAdjacentElement("afterend",Ve);function et(){if(typeof J.current=="boolean"){const He=C||iy();return He&&He.isConnected?He:Ve}return J.current.current||Ve}return()=>{A.off("openchange",Ne);const He=Xr(ye),Ke=It(T,He)||I&&vi(I.nodesRef.current,B(),!1).some(pt=>{var _t;return It((_t=pt.context)==null?void 0:_t.elements.floating,He)}),gt=et();queueMicrotask(()=>{const pt=LE(gt);J.current&&!z.current&&At(pt)&&(!(pt!==He&&He!==ye.body)||Ke)&&pt.focus({preventScroll:!0}),Ve.remove()})}},[a,T,N,J,E,A,I,H,C,B]),j.useEffect(()=>(queueMicrotask(()=>{z.current=!1}),()=>{queueMicrotask(fh)}),[a]),ln(()=>{if(!a&&X)return X.setFocusManagerState({modal:h,closeOnFocusOut:g,open:w,onOpenChange:k,domReference:C}),()=>{X.setFocusManagerState(null)}},[a,X,h,w,k,g,C]),ln(()=>{a||N&&ay(N,$)},[a,N,$]);function ve(ye){return a||!b||!h?null:y.jsx(DE,{ref:ye==="start"?F:O,onClick:ke=>k(!1,ke.nativeEvent),children:typeof b=="string"?b:"Dismiss"})}const xe=!a&&G&&(h?!U:!0)&&(H||h);return y.jsxs(y.Fragment,{children:[xe&&y.jsx(Is,{"data-type":"inside",ref:ge,onFocus:ye=>{if(h){const Ne=ce();pi(s[0]==="reference"?Ne[0]:Ne[Ne.length-1])}else if(X!=null&&X.preserveTabOrder&&X.portalNode)if(z.current=!1,La(ye,X.portalNode)){const Ne=c1(C);Ne?.focus()}else{var ke;(ke=X.beforeOutsideRef.current)==null||ke.focus()}}}),!U&&ve("start"),l,ve("end"),xe&&y.jsx(Is,{"data-type":"inside",ref:fe,onFocus:ye=>{if(h)pi(ce()[0]);else if(X!=null&&X.preserveTabOrder&&X.portalNode)if(g&&(z.current=!0),La(ye,X.portalNode)){const Ne=f1(C);Ne?.focus()}else{var ke;(ke=X.afterOutsideRef.current)==null||ke.focus()}}})]})}function oy(e){return At(e.target)&&e.target.tagName==="BUTTON"}function ME(e){return At(e.target)&&e.target.tagName==="A"}function sy(e){return oh(e)}function Rd(e,r){r===void 0&&(r={});const{open:l,onOpenChange:a,dataRef:s,elements:{domReference:u}}=e,{enabled:c=!0,event:f="click",toggle:p=!0,ignoreMouse:h=!1,keyboardHandlers:b=!0,stickIfOpen:g=!0}=r,v=j.useRef(),x=j.useRef(!1),w=j.useMemo(()=>({onPointerDown(k){v.current=k.pointerType},onMouseDown(k){const A=v.current;k.button===0&&f!=="click"&&(Ia(A,!0)&&h||(l&&p&&(!(s.current.openEvent&&g)||s.current.openEvent.type==="mousedown")?a(!1,k.nativeEvent,"click"):(k.preventDefault(),a(!0,k.nativeEvent,"click"))))},onClick(k){const A=v.current;if(f==="mousedown"&&v.current){v.current=void 0;return}Ia(A,!0)&&h||(l&&p&&(!(s.current.openEvent&&g)||s.current.openEvent.type==="click")?a(!1,k.nativeEvent,"click"):a(!0,k.nativeEvent,"click"))},onKeyDown(k){v.current=void 0,!(k.defaultPrevented||!b||oy(k))&&(k.key===" "&&!sy(u)&&(k.preventDefault(),x.current=!0),!ME(k)&&k.key==="Enter"&&a(!(l&&p),k.nativeEvent,"click"))},onKeyUp(k){k.defaultPrevented||!b||oy(k)||sy(u)||k.key===" "&&x.current&&(x.current=!1,a(!(l&&p),k.nativeEvent,"click"))}}),[s,u,f,h,b,a,l,g,p]);return j.useMemo(()=>c?{reference:w}:{},[c,w])}const zE={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},BE={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},uy=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 _d(e,r){r===void 0&&(r={});const{open:l,onOpenChange:a,elements:s,dataRef:u}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:h="pointerdown",referencePress:b=!1,referencePressEvent:g="pointerdown",ancestorScroll:v=!1,bubbles:x,capture:w}=r,k=au(),A=rn(typeof p=="function"?p:()=>!1),E=typeof p=="function"?A:p,C=j.useRef(!1),{escapeKey:T,outsidePress:B}=uy(x),{escapeKey:q,outsidePress:D}=uy(w),U=j.useRef(!1),V=rn(I=>{var X;if(!l||!c||!f||I.key!=="Escape"||U.current)return;const F=(X=u.current.floatingContext)==null?void 0:X.nodeId,O=k?vi(k.nodesRef.current,F):[];if(!T&&(I.stopPropagation(),O.length>0)){let z=!0;if(O.forEach(Q=>{var R;if((R=Q.context)!=null&&R.open&&!Q.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}a(!1,Lk(I)?I.nativeEvent:I,"escape-key")}),G=rn(I=>{var X;const F=()=>{var O;V(I),(O=gr(I))==null||O.removeEventListener("keydown",F)};(X=gr(I))==null||X.addEventListener("keydown",F)}),M=rn(I=>{var X;const F=u.current.insideReactTree;u.current.insideReactTree=!1;const O=C.current;if(C.current=!1,h==="click"&&O||F||typeof E=="function"&&!E(I))return;const z=gr(I),Q="["+Cl("inert")+"]",R=Ut(s.floating).querySelectorAll(Q);let L=ct(z)?z:null;for(;L&&!yr(L);){const ce=xr(L);if(yr(ce)||!ct(ce))break;L=ce}if(R.length&&ct(z)&&!Rk(z)&&!It(z,s.floating)&&Array.from(R).every(ce=>!It(L,ce)))return;if(At(z)&&J){const ce=yr(z),de=Mn(z),pe=/auto|scroll/,ge=ce||pe.test(de.overflowX),fe=ce||pe.test(de.overflowY),ve=ge&&z.clientWidth>0&&z.scrollWidth>z.clientWidth,xe=fe&&z.clientHeight>0&&z.scrollHeight>z.clientHeight,ye=de.direction==="rtl",ke=xe&&(ye?I.offsetX<=z.offsetWidth-z.clientWidth:I.offsetX>z.clientWidth),Ne=ve&&I.offsetY>z.clientHeight;if(ke||Ne)return}const H=(X=u.current.floatingContext)==null?void 0:X.nodeId,N=k&&vi(k.nodesRef.current,H).some(ce=>{var de;return Of(I,(de=ce.context)==null?void 0:de.elements.floating)});if(Of(I,s.floating)||Of(I,s.domReference)||N)return;const re=k?vi(k.nodesRef.current,H):[];if(re.length>0){let ce=!0;if(re.forEach(de=>{var pe;if((pe=de.context)!=null&&pe.open&&!de.context.dataRef.current.__outsidePressBubbles){ce=!1;return}}),!ce)return}a(!1,I,"outside-press")}),$=rn(I=>{var X;const F=()=>{var O;M(I),(O=gr(I))==null||O.removeEventListener(h,F)};(X=gr(I))==null||X.addEventListener(h,F)});j.useEffect(()=>{if(!l||!c)return;u.current.__escapeKeyBubbles=T,u.current.__outsidePressBubbles=B;let I=-1;function X(R){a(!1,R,"ancestor-scroll")}function F(){window.clearTimeout(I),U.current=!0}function O(){I=window.setTimeout(()=>{U.current=!1},eu()?5:0)}const z=Ut(s.floating);f&&(z.addEventListener("keydown",q?G:V,q),z.addEventListener("compositionstart",F),z.addEventListener("compositionend",O)),E&&z.addEventListener(h,D?$:M,D);let Q=[];return v&&(ct(s.domReference)&&(Q=Jr(s.domReference)),ct(s.floating)&&(Q=Q.concat(Jr(s.floating))),!ct(s.reference)&&s.reference&&s.reference.contextElement&&(Q=Q.concat(Jr(s.reference.contextElement)))),Q=Q.filter(R=>{var L;return R!==((L=z.defaultView)==null?void 0:L.visualViewport)}),Q.forEach(R=>{R.addEventListener("scroll",X,{passive:!0})}),()=>{f&&(z.removeEventListener("keydown",q?G:V,q),z.removeEventListener("compositionstart",F),z.removeEventListener("compositionend",O)),E&&z.removeEventListener(h,D?$:M,D),Q.forEach(R=>{R.removeEventListener("scroll",X)}),window.clearTimeout(I)}},[u,s,f,E,h,l,a,v,c,T,B,V,q,G,M,D,$]),j.useEffect(()=>{u.current.insideReactTree=!1},[u,E,h]);const Y=j.useMemo(()=>({onKeyDown:V,...b&&{[zE[g]]:I=>{a(!1,I.nativeEvent,"reference-press")},...g!=="click"&&{onClick(I){a(!1,I.nativeEvent,"reference-press")}}}}),[V,a,b,g]),J=j.useMemo(()=>({onKeyDown:V,onMouseDown(){C.current=!0},onMouseUp(){C.current=!0},[BE[h]]:()=>{u.current.insideReactTree=!0}}),[V,h,u]);return j.useMemo(()=>c?{reference:Y,floating:J}:{},[c,Y,J])}function FE(e){const{open:r=!1,onOpenChange:l,elements:a}=e,s=uh(),u=j.useRef({}),[c]=j.useState(()=>wE()),f=ch()!=null,[p,h]=j.useState(a.reference),b=rn((x,w,k)=>{u.current.openEvent=x?w:void 0,c.emit("openchange",{open:x,event:w,reason:k,nested:f}),l?.(x,w,k)}),g=j.useMemo(()=>({setPositionReference:h}),[]),v=j.useMemo(()=>({reference:p||a.reference||null,floating:a.floating||null,domReference:a.reference}),[p,a.reference,a.floating]);return j.useMemo(()=>({dataRef:u,open:r,onOpenChange:b,elements:v,events:c,floatingId:s,refs:g}),[r,b,v,c,s,g])}function Ld(e){e===void 0&&(e={});const{nodeId:r}=e,l=FE({...e,elements:{reference:null,floating:null,...e.elements}}),a=e.rootContext||l,s=a.elements,[u,c]=j.useState(null),[f,p]=j.useState(null),b=s?.domReference||u,g=j.useRef(null),v=au();ln(()=>{b&&(g.current=b)},[b]);const x=mE({...e,elements:{...s,...f&&{reference:f}}}),w=j.useCallback(T=>{const B=ct(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),getClientRects:()=>T.getClientRects(),contextElement:T}:T;p(B),x.refs.setReference(B)},[x.refs]),k=j.useCallback(T=>{(ct(T)||T===null)&&(g.current=T,c(T)),(ct(x.refs.reference.current)||x.refs.reference.current===null||T!==null&&!ct(T))&&x.refs.setReference(T)},[x.refs]),A=j.useMemo(()=>({...x.refs,setReference:k,setPositionReference:w,domReference:g}),[x.refs,k,w]),E=j.useMemo(()=>({...x.elements,domReference:b}),[x.elements,b]),C=j.useMemo(()=>({...x,...a,refs:A,elements:E,nodeId:r}),[x,A,E,r,a]);return ln(()=>{a.dataRef.current.floatingContext=C;const T=v?.nodesRef.current.find(B=>B.id===r);T&&(T.context=C)}),j.useMemo(()=>({...x,context:C,refs:A,elements:E}),[x,A,E,C])}function qf(){return Tk()&&o1()}function IE(e,r){r===void 0&&(r={});const{open:l,onOpenChange:a,events:s,dataRef:u,elements:c}=e,{enabled:f=!0,visibleOnly:p=!0}=r,h=j.useRef(!1),b=j.useRef(-1),g=j.useRef(!0);j.useEffect(()=>{if(!f)return;const x=an(c.domReference);function w(){!l&&At(c.domReference)&&c.domReference===Xr(Ut(c.domReference))&&(h.current=!0)}function k(){g.current=!0}function A(){g.current=!1}return x.addEventListener("blur",w),qf()&&(x.addEventListener("keydown",k,!0),x.addEventListener("pointerdown",A,!0)),()=>{x.removeEventListener("blur",w),qf()&&(x.removeEventListener("keydown",k,!0),x.removeEventListener("pointerdown",A,!0))}},[c.domReference,l,f]),j.useEffect(()=>{if(!f)return;function x(w){let{reason:k}=w;(k==="reference-press"||k==="escape-key")&&(h.current=!0)}return s.on("openchange",x),()=>{s.off("openchange",x)}},[s,f]),j.useEffect(()=>()=>{Gt(b)},[]);const v=j.useMemo(()=>({onMouseLeave(){h.current=!1},onFocus(x){if(h.current)return;const w=gr(x.nativeEvent);if(p&&ct(w)){if(qf()&&!x.relatedTarget){if(!g.current&&!oh(w))return}else if(!_k(w))return}a(!0,x.nativeEvent,"focus")},onBlur(x){h.current=!1;const w=x.relatedTarget,k=x.nativeEvent,A=ct(w)&&w.hasAttribute(Cl("focus-guard"))&&w.getAttribute("data-type")==="outside";b.current=window.setTimeout(()=>{var E;const C=Xr(c.domReference?c.domReference.ownerDocument:document);!w&&C===c.domReference||It((E=u.current.floatingContext)==null?void 0:E.refs.floating.current,C)||It(c.domReference,C)||A||a(!1,k,"focus")})}}),[u,c.domReference,a,p]);return j.useMemo(()=>f?{reference:v}:{},[f,v])}function Pf(e,r,l){const a=new Map,s=l==="item";let u=e;if(s&&e){const{[Zb]:c,[Qb]:f,...p}=e;u=p}return{...l==="floating"&&{tabIndex:-1,[gE]:""},...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(p=>{let[h,b]=p;if(!(s&&[Zb,Qb].includes(h)))if(h.indexOf("on")===0){if(a.has(h)||a.set(h,[]),typeof b=="function"){var g;(g=a.get(h))==null||g.push(b),c[h]=function(){for(var v,x=arguments.length,w=new Array(x),k=0;k<x;k++)w[k]=arguments[k];return(v=a.get(h))==null?void 0:v.map(A=>A(...w)).find(A=>A!==void 0)}}}else c[h]=b}),c),{})}}function Dd(e){e===void 0&&(e=[]);const r=e.map(f=>f?.reference),l=e.map(f=>f?.floating),a=e.map(f=>f?.item),s=j.useCallback(f=>Pf(f,e,"reference"),r),u=j.useCallback(f=>Pf(f,e,"floating"),l),c=j.useCallback(f=>Pf(f,e,"item"),a);return j.useMemo(()=>({getReferenceProps:s,getFloatingProps:u,getItemProps:c}),[s,u,c])}const UE=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Od(e,r){var l,a;r===void 0&&(r={});const{open:s,elements:u,floatingId:c}=e,{enabled:f=!0,role:p="dialog"}=r,h=uh(),b=((l=u.domReference)==null?void 0:l.id)||h,g=j.useMemo(()=>{var C;return((C=kd(u.floating))==null?void 0:C.id)||c},[u.floating,c]),v=(a=UE.get(p))!=null?a:p,w=ch()!=null,k=j.useMemo(()=>v==="tooltip"||p==="label"?{["aria-"+(p==="label"?"labelledby":"describedby")]:s?g:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":v==="alertdialog"?"dialog":v,"aria-controls":s?g:void 0,...v==="listbox"&&{role:"combobox"},...v==="menu"&&{id:b},...v==="menu"&&w&&{role:"menuitem"},...p==="select"&&{"aria-autocomplete":"none"},...p==="combobox"&&{"aria-autocomplete":"list"}},[v,g,w,s,b,p]),A=j.useMemo(()=>{const C={id:g,...v&&{role:v}};return v==="tooltip"||p==="label"?C:{...C,...v==="menu"&&{"aria-labelledby":b}}},[v,g,b,p]),E=j.useCallback(C=>{let{active:T,selected:B}=C;const q={role:"option",...T&&{id:g+"-fui-option"}};switch(p){case"select":case"combobox":return{...q,"aria-selected":B}}return{}},[g,p]);return j.useMemo(()=>f?{reference:k,floating:A,item:E}:{},[f,k,A,E])}function E1(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,...E1(e,s.id,l)])}function cy(e,r){const[l,a]=e;let s=!1;const u=r.length;for(let c=0,f=u-1;c<u;f=c++){const[p,h]=r[c]||[0,0],[b,g]=r[f]||[0,0];h>=a!=g>=a&&l<=(b-p)*(a-h)/(g-h)+p&&(s=!s)}return s}function HE(e,r){return e[0]>=r.x&&e[0]<=r.x+r.width&&e[1]>=r.y&&e[1]<=r.y+r.height}function Md(e){e===void 0&&(e={});const{buffer:r=.5,blockPointerEvents:l=!1,requireIntent:a=!0}=e,s={current:-1};let u=!1,c=null,f=null,p=typeof performance<"u"?performance.now():0;function h(g,v){const x=performance.now(),w=x-p;if(c===null||f===null||w===0)return c=g,f=v,p=x,null;const k=g-c,A=v-f,C=Math.sqrt(k*k+A*A)/w;return c=g,f=v,p=x,C}const b=g=>{let{x:v,y:x,placement:w,elements:k,onClose:A,nodeId:E,tree:C}=g;return function(B){function q(){Gt(s),A()}if(Gt(s),!k.domReference||!k.floating||w==null||v==null||x==null)return;const{clientX:D,clientY:U}=B,V=[D,U],G=EE(B),M=B.type==="mouseleave",$=Uf(k.floating,G),Y=Uf(k.domReference,G),J=k.domReference.getBoundingClientRect(),I=k.floating.getBoundingClientRect(),X=w.split("-")[0],F=v>I.right-I.width/2,O=x>I.bottom-I.height/2,z=HE(V,J),Q=I.width>J.width,R=I.height>J.height,L=(Q?J:I).left,H=(Q?J:I).right,N=(R?J:I).top,re=(R?J:I).bottom;if($&&(u=!0,!M))return;if(Y&&(u=!1),Y&&!M){u=!0;return}if(M&&ct(B.relatedTarget)&&Uf(k.floating,B.relatedTarget)||C&&E1(C.nodesRef.current,E).length)return;if(X==="top"&&x>=J.bottom-1||X==="bottom"&&x<=J.top+1||X==="left"&&v>=J.right-1||X==="right"&&v<=J.left+1)return q();let ce=[];switch(X){case"top":ce=[[L,J.top+1],[L,I.bottom-1],[H,I.bottom-1],[H,J.top+1]];break;case"bottom":ce=[[L,I.top+1],[L,J.bottom-1],[H,J.bottom-1],[H,I.top+1]];break;case"left":ce=[[I.right-1,re],[I.right-1,N],[J.left+1,N],[J.left+1,re]];break;case"right":ce=[[J.right-1,re],[J.right-1,N],[I.left+1,N],[I.left+1,re]];break}function de(pe){let[ge,fe]=pe;switch(X){case"top":{const ve=[Q?ge+r/2:F?ge+r*4:ge-r*4,fe+r+1],xe=[Q?ge-r/2:F?ge+r*4:ge-r*4,fe+r+1],ye=[[I.left,F||Q?I.bottom-r:I.top],[I.right,F?Q?I.bottom-r:I.top:I.bottom-r]];return[ve,xe,...ye]}case"bottom":{const ve=[Q?ge+r/2:F?ge+r*4:ge-r*4,fe-r],xe=[Q?ge-r/2:F?ge+r*4:ge-r*4,fe-r],ye=[[I.left,F||Q?I.top+r:I.bottom],[I.right,F?Q?I.top+r:I.bottom:I.top+r]];return[ve,xe,...ye]}case"left":{const ve=[ge+r+1,R?fe+r/2:O?fe+r*4:fe-r*4],xe=[ge+r+1,R?fe-r/2:O?fe+r*4:fe-r*4];return[...[[O||R?I.right-r:I.left,I.top],[O?R?I.right-r:I.left:I.right-r,I.bottom]],ve,xe]}case"right":{const ve=[ge-r,R?fe+r/2:O?fe+r*4:fe-r*4],xe=[ge-r,R?fe-r/2:O?fe+r*4:fe-r*4],ye=[[O||R?I.left+r:I.right,I.top],[O?R?I.left+r:I.right:I.left+r,I.bottom]];return[ve,xe,...ye]}}}if(!cy([D,U],ce)){if(u&&!z)return q();if(!M&&a){const pe=h(B.clientX,B.clientY);if(pe!==null&&pe<.1)return q()}cy([D,U],de([v,x]))?!u&&a&&(s.current=window.setTimeout(q,40)):q()}}};return b.__options={blockPointerEvents:l},b}const qE={".":"Uncommitted Changes",staged:"Staging Area",working:"Working Directory"},fy=(e,r)=>r?`${e.shortHash}^`:e.shortHash,dy=(e,r,l)=>{if(!r)return"Select...";const a=r.endsWith("^"),s=a?r.slice(0,-1):r;if(s.startsWith("HEAD"))return r;const u=qE[r];if(u)return u;const c=e.specialOptions.find(h=>h.value===r);if(c)return c.label;const f=e.branches.find(h=>h.name===s);if(f)return a?`${f.name}^`:f.name;const p=e.commits.find(h=>h.shortHash===s||h.hash===s);if(p)return fy(p,a);if(l){const h=e.commits.find(b=>b.shortHash===l||b.hash===l);if(h)return fy(h,!1)}return r};function PE({options:e,baseRevision:r,targetRevision:l,resolvedBaseRevision:a,resolvedTargetRevision:s,onSelectDiff:u,onOpenAdvanced:c}){const[f,p]=j.useState(!1),[h,b]=j.useState(!1),{refs:g,floatingStyles:v,context:x}=Ld({open:f||h,onOpenChange:L=>{!L&&h||p(L)},placement:"bottom-end",middleware:[Cd(6),Nd(),Ad({padding:8})],whileElementsMounted:Ed}),w=Td(x,{handleClose:Md()}),k=Rd(x),A=_d(x),E=Od(x,{role:"menu"}),{getReferenceProps:C,getFloatingProps:T}=Dd([w,k,A,E]),{refs:B,floatingStyles:q,context:D}=Ld({open:h,onOpenChange:L=>{L&&p(!0),b(L)},placement:"left-start",middleware:[Cd(0),Nd(),Ad({padding:8})],whileElementsMounted:Ed}),U=Td(D,{handleClose:Md()}),V=Rd(D),G=_d(D),M=Od(D,{role:"menu"}),{getReferenceProps:$,getFloatingProps:Y}=Dd([U,V,G,M]);j.useEffect(()=>{f||b(!1)},[f]);const J=j.useMemo(()=>{const L=e.commits.find(re=>{const ce=l===re.shortHash||l===re.hash,de=r===`${re.shortHash}^`||r===`${re.hash}^`;return ce&&de});if(L)return`${L.shortHash} ${L.message}`;const H=dy(e,r,a),N=dy(e,l,s);return`${H}...${N}`},[e,r,l,a,s]),I=j.useMemo(()=>e.branches.find(L=>L.name==="main")||e.branches.find(L=>L.name==="master"),[e.branches]),X=!!I,F=(L,H)=>{u(L,H),b(!1),p(!1)},O=()=>{b(!1),p(!1),c()},z=(L,H)=>["w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors",L?"hover:bg-diff-selected-bg focus:bg-diff-selected-bg":"hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary",L?"bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2":"",H?"opacity-50 cursor-not-allowed":"cursor-pointer"].join(" "),Q=(L,H)=>r===L&&l===H,R=L=>{const H=l===L.shortHash||l===L.hash,N=r===`${L.shortHash}^`||r===`${L.hash}^`;return H&&N};return y.jsxs("div",{className:"relative",children:[y.jsx("button",{ref:g.setReference,type:"button",className:"flex items-center gap-1.5 cursor-pointer group","aria-haspopup":"menu","aria-expanded":f,...C(),children: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:J}),y.jsx($a,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]})}),f&&y.jsx(jd,{children:y.jsxs("div",{ref:g.setFloating,style:v,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[260px] max-h-[360px] overflow-y-auto",...T(),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:()=>F("HEAD","."),className:z(Q("HEAD","."),!1),children:"HEAD...Uncommitted"}),y.jsx("button",{onClick:()=>F("HEAD","staged"),className:z(Q("HEAD","staged"),!1),children:"HEAD...Staging"}),y.jsx("button",{onClick:()=>F("staged","working"),className:z(Q("staged","working"),!1),children:"Staging...Working"}),X&&I&&y.jsxs(y.Fragment,{children:[y.jsxs("button",{onClick:()=>F(I.name,"."),className:z(Q(I.name,"."),!1),children:[I.name,"...Uncommitted"]}),y.jsxs("button",{onClick:()=>F(I.name,"HEAD"),className:z(Q(I.name,"HEAD"),!1),children:[I.name,"...HEAD"]})]})]}),y.jsx("div",{className:"border-b border-github-border",children:y.jsx("button",{ref:e.commits.length>0?B.setReference:void 0,className:z(!1,e.commits.length===0),...e.commits.length>0?$():{},disabled:e.commits.length===0,type:"button",children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(K2,{size:12,className:"text-github-text-secondary"}),y.jsx("span",{children:"Pick Commit..."})]})})}),y.jsx("div",{children:y.jsx("button",{onClick:O,className:z(!1,!1),type:"button",children:"Detailed..."})})]})}),h&&e.commits.length>0&&y.jsx(jd,{children:y.jsxs("div",{ref:B.setFloating,style:q,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[360px] overflow-y-auto",...Y(),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(L=>y.jsx("button",{onClick:()=>F(`${L.shortHash}^`,L.shortHash),className:z(R(L),!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:L.shortHash}),y.jsx("span",{className:"text-xs text-github-text-secondary flex-1 break-words",children:L.message})]})},L.hash))]})})]})}function su(e){return e&&e.split(".").pop()?.toLowerCase()||null}function $E(e){return e&&e.split("/").pop()||""}const VE=["jpg","jpeg","png","gif","bmp","svg","webp","ico","tiff","tif","avif","heic","heif"];function GE(e){if(!e)return!1;const r=su(e);return r?VE.includes(r):!1}const YE=["md","markdown"];function XE(e){if(!e)return!1;const r=su(e);return r?YE.includes(r):!1}const ZE=["ipynb"];function QE(e){if(!e)return!1;const r=su(e);return r?ZE.includes(r):!1}function KE({file:e,diffMode:r,baseCommitish:l,targetCommitish:a}){const s=r??Va,u=e.status==="deleted",c=e.status==="added",f=e.status==="modified"||e.status==="renamed",p=l||"HEAD~1",h=a||"HEAD",[b,g]=j.useState({}),[v,x]=j.useState({}),w=async(C,T)=>{try{const B=C.naturalWidth,q=C.naturalHeight,V=(await(await fetch(C.src)).blob()).size;T({width:B,height:q,size:V})}catch(B){console.error("Failed to get image info:",B)}},k=C=>C?C<1024?`${C} B`:C<1024*1024?`${(C/1024).toFixed(1)} KB`:`${(C/(1024*1024)).toFixed(1)} MB`:"",A=C=>!C.width||!C.height?"":`W: ${C.width}px | H: ${C.height}px`,E={backgroundImage:`
13
+ linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%),
14
+ linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%)
15
+ `,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=${p}`,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=>w(C.currentTarget,g),onError:C=>{const T=C.target;T.style.display="none",T.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(b.width||b.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[A(b),A(b)&&k(b.size)&&" | ",k(b.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=${h}`,alt:`New image ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>w(C.currentTarget,x),onError:C=>{const T=C.target;T.style.display="none",T.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:[A(v),A(v)&&k(v.size)&&" | ",k(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=${p}`,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=>w(C.currentTarget,g),onError:C=>{const T=C.target;T.style.display="none",T.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(b.width||b.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[A(b),A(b)&&k(b.size)&&" | ",k(b.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=${h}`,alt:`Current version of ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>w(C.currentTarget,x),onError:C=>{const T=C.target;T.style.display="none",T.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:[A(v),A(v)&&k(v.size)&&" | ",k(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=${p}`,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=>w(C.currentTarget,g),onError:C=>{const T=C.target;T.style.display="none",T.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(b.width||b.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[A(b),A(b)&&k(b.size)&&" | ",k(b.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=${h}`,alt:`Current version of ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>w(C.currentTarget,x),onError:C=>{const T=C.target;T.style.display="none",T.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:[A(v),A(v)&&k(v.size)&&" | ",k(v.size)]})]})})]})]}):null}function JE(e,r){const l={};return(e[e.length-1]===""?[...e,""]:e).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const WE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tC={};function hy(e,r){return(tC.jsx?eC:WE).test(e)}const nC=/[ \t\n\f\r]/g;function rC(e){return typeof e=="object"?e.type==="text"?py(e.value):!1:py(e)}function py(e){return e.replace(nC,"")===""}class Xa{constructor(r,l,a){this.normal=l,this.property=r,a&&(this.space=a)}}Xa.prototype.normal={};Xa.prototype.property={};Xa.prototype.space=void 0;function C1(e,r){const l={},a={};for(const s of e)Object.assign(l,s.property),Object.assign(a,s.normal);return new Xa(l,a,r)}function zd(e){return e.toLowerCase()}class on{constructor(r,l){this.attribute=l,this.property=r}}on.prototype.attribute="";on.prototype.booleanish=!1;on.prototype.boolean=!1;on.prototype.commaOrSpaceSeparated=!1;on.prototype.commaSeparated=!1;on.prototype.defined=!1;on.prototype.mustUseProperty=!1;on.prototype.number=!1;on.prototype.overloadedBoolean=!1;on.prototype.property="";on.prototype.spaceSeparated=!1;on.prototype.space=void 0;let lC=0;const Me=Nl(),Ct=Nl(),Bd=Nl(),he=Nl(),ut=Nl(),ki=Nl(),yn=Nl();function Nl(){return 2**++lC}const Fd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Me,booleanish:Ct,commaOrSpaceSeparated:yn,commaSeparated:ki,number:he,overloadedBoolean:Bd,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),$f=Object.keys(Fd);class dh extends on{constructor(r,l,a,s){let u=-1;if(super(r,l),my(this,"space",s),typeof a=="number")for(;++u<$f.length;){const c=$f[u];my(this,$f[u],(a&Fd[c])===Fd[c])}}}dh.prototype.defined=!0;function my(e,r,l){l&&(e[r]=l)}function Ni(e){const r={},l={};for(const[a,s]of Object.entries(e.properties)){const u=new dh(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(u.mustUseProperty=!0),r[a]=u,l[zd(a)]=a,l[zd(u.attribute)]=a}return new Xa(r,l,e.space)}const A1=Ni({properties:{ariaActiveDescendant:null,ariaAtomic:Ct,ariaAutoComplete:null,ariaBusy:Ct,ariaChecked:Ct,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:Ct,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:Ct,ariaFlowTo:ut,ariaGrabbed:Ct,ariaHasPopup:null,ariaHidden:Ct,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:he,ariaLive:null,ariaModal:Ct,ariaMultiLine:Ct,ariaMultiSelectable:Ct,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Ct,ariaReadOnly:Ct,ariaRelevant:null,ariaRequired:Ct,ariaRoleDescription:ut,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Ct,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 N1(e,r){return r in e?e[r]:r}function T1(e,r){return N1(e,r.toLowerCase())}const iC=Ni({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ki,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:Ct,controls:Me,controlsList:ut,coords:he|ki,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Me,defer:Me,dir:null,dirName:null,disabled:Me,download:Bd,draggable:Ct,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Me,formTarget:null,headers:ut,height:he,hidden:Bd,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:Ct,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:Ct,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:Ct,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:T1}),aC=Ni({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:yn,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:ki,g2:ki,glyphName:ki,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:yn,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:yn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:yn,rev:yn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:yn,requiredFeatures:yn,requiredFonts:yn,requiredFormats:yn,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:yn,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:yn,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:yn,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:N1}),j1=Ni({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()}}),R1=Ni({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:T1}),_1=Ni({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,r){return"xml:"+r.slice(3).toLowerCase()}}),oC={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"},sC=/[A-Z]/g,gy=/-[a-z]/g,uC=/^data[-\w.:]+$/i;function cC(e,r){const l=zd(r);let a=r,s=on;if(l in e.normal)return e.property[e.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&uC.test(r)){if(r.charAt(4)==="-"){const u=r.slice(5).replace(gy,dC);a="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=r.slice(4);if(!gy.test(u)){let c=u.replace(sC,fC);c.charAt(0)!=="-"&&(c="-"+c),r="data"+c}}s=dh}return new s(a,r)}function fC(e){return"-"+e.toLowerCase()}function dC(e){return e.charAt(1).toUpperCase()}const hC=C1([A1,iC,j1,R1,_1],"html"),hh=C1([A1,aC,j1,R1,_1],"svg");function pC(e){return e.join(" ").trim()}var mi={},Vf,by;function mC(){if(by)return Vf;by=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,l=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,p=`
16
+ `,h="/",b="*",g="",v="comment",x="declaration";function w(A,E){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];E=E||{};var C=1,T=1;function B(I){var X=I.match(r);X&&(C+=X.length);var F=I.lastIndexOf(p);T=~F?I.length-F:T+I.length}function q(){var I={line:C,column:T};return function(X){return X.position=new D(I),G(),X}}function D(I){this.start=I,this.end={line:C,column:T},this.source=E.source}D.prototype.content=A;function U(I){var X=new Error(E.source+":"+C+":"+T+": "+I);if(X.reason=I,X.filename=E.source,X.line=C,X.column=T,X.source=A,!E.silent)throw X}function V(I){var X=I.exec(A);if(X){var F=X[0];return B(F),A=A.slice(F.length),X}}function G(){V(l)}function M(I){var X;for(I=I||[];X=$();)X!==!1&&I.push(X);return I}function $(){var I=q();if(!(h!=A.charAt(0)||b!=A.charAt(1))){for(var X=2;g!=A.charAt(X)&&(b!=A.charAt(X)||h!=A.charAt(X+1));)++X;if(X+=2,g===A.charAt(X-1))return U("End of comment missing");var F=A.slice(2,X-2);return T+=2,B(F),A=A.slice(X),T+=2,I({type:v,comment:F})}}function Y(){var I=q(),X=V(a);if(X){if($(),!V(s))return U("property missing ':'");var F=V(u),O=I({type:x,property:k(X[0].replace(e,g)),value:F?k(F[0].replace(e,g)):g});return V(c),O}}function J(){var I=[];M(I);for(var X;X=Y();)X!==!1&&(I.push(X),M(I));return I}return G(),J()}function k(A){return A?A.replace(f,g):g}return Vf=w,Vf}var yy;function gC(){if(yy)return mi;yy=1;var e=mi&&mi.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(mi,"__esModule",{value:!0}),mi.default=l;const r=e(mC());function l(a,s){let u=null;if(!a||typeof a!="string")return u;const c=(0,r.default)(a),f=typeof s=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:h,value:b}=p;f?s(h,b,p):b&&(u=u||{},u[h]=b)}),u}return mi}var Ca={},xy;function bC(){if(xy)return Ca;xy=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,l=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,u=function(h){return!h||l.test(h)||e.test(h)},c=function(h,b){return b.toUpperCase()},f=function(h,b){return"".concat(b,"-")},p=function(h,b){return b===void 0&&(b={}),u(h)?h:(h=h.toLowerCase(),b.reactCompat?h=h.replace(s,f):h=h.replace(a,f),h.replace(r,c))};return Ca.camelCase=p,Ca}var Aa,vy;function yC(){if(vy)return Aa;vy=1;var e=Aa&&Aa.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},r=e(gC()),l=bC();function a(s,u){var c={};return!s||typeof s!="string"||(0,r.default)(s,function(f,p){f&&p&&(c[(0,l.camelCase)(f,u)]=p)}),c}return a.default=a,Aa=a,Aa}var xC=yC();const vC=Zs(xC),L1=D1("end"),ph=D1("start");function D1(e){return r;function r(l){const a=l&&l.position&&l.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function wC(e){const r=ph(e),l=L1(e);if(r&&l)return{start:r,end:l}}function Da(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?wy(e.position):"start"in e||"end"in e?wy(e):"line"in e||"column"in e?Id(e):""}function Id(e){return Sy(e&&e.line)+":"+Sy(e&&e.column)}function wy(e){return Id(e&&e.start)+"-"+Id(e&&e.end)}function Sy(e){return e&&typeof e=="number"?e:1}class qt extends Error{constructor(r,l,a){super(),typeof l=="string"&&(a=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 a=="string"){const p=a.indexOf(":");p===-1?u.ruleId=a:(u.source=a.slice(0,p),u.ruleId=a.slice(p+1))}if(!u.place&&u.ancestors&&u.ancestors){const p=u.ancestors[u.ancestors.length-1];p&&(u.place=p.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=Da(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}}qt.prototype.file="";qt.prototype.name="";qt.prototype.reason="";qt.prototype.message="";qt.prototype.stack="";qt.prototype.column=void 0;qt.prototype.line=void 0;qt.prototype.ancestors=void 0;qt.prototype.cause=void 0;qt.prototype.fatal=void 0;qt.prototype.place=void 0;qt.prototype.ruleId=void 0;qt.prototype.source=void 0;const mh={}.hasOwnProperty,SC=new Map,kC=/[A-Z]/g,EC=new Set(["table","tbody","thead","tfoot","tr"]),CC=new Set(["td","th"]),O1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function AC(e,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const l=r.filePath||void 0;let a;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=OC(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");a=DC(l,r.jsx,r.jsxs)}const s={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:a,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"?hh:hC,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},u=M1(s,e,void 0);return u&&typeof u!="string"?u:s.create(e,s.Fragment,{children:u||void 0},void 0)}function M1(e,r,l){if(r.type==="element")return NC(e,r,l);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return TC(e,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return RC(e,r,l);if(r.type==="mdxjsEsm")return jC(e,r);if(r.type==="root")return _C(e,r,l);if(r.type==="text")return LC(e,r)}function NC(e,r,l){const a=e.schema;let s=a;r.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=hh,e.schema=s),e.ancestors.push(r);const u=B1(e,r.tagName,!1),c=MC(e,r);let f=bh(e,r);return EC.has(r.tagName)&&(f=f.filter(function(p){return typeof p=="string"?!rC(p):!0})),z1(e,c,u,r),gh(c,f),e.ancestors.pop(),e.schema=a,e.create(r,u,c,l)}function TC(e,r){if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}Ua(e,r.position)}function jC(e,r){if(r.data&&r.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(r.data.estree);Ua(e,r.position)}function RC(e,r,l){const a=e.schema;let s=a;r.name==="svg"&&a.space==="html"&&(s=hh,e.schema=s),e.ancestors.push(r);const u=r.name===null?e.Fragment:B1(e,r.name,!0),c=zC(e,r),f=bh(e,r);return z1(e,c,u,r),gh(c,f),e.ancestors.pop(),e.schema=a,e.create(r,u,c,l)}function _C(e,r,l){const a={};return gh(a,bh(e,r)),e.create(r,e.Fragment,a,l)}function LC(e,r){return r.value}function z1(e,r,l,a){typeof l!="string"&&l!==e.Fragment&&e.passNode&&(r.node=a)}function gh(e,r){if(r.length>0){const l=r.length>1?r:r[0];l&&(e.children=l)}}function DC(e,r,l){return a;function a(s,u,c,f){const h=Array.isArray(c.children)?l:r;return f?h(u,c,f):h(u,c)}}function OC(e,r){return l;function l(a,s,u,c){const f=Array.isArray(u.children),p=ph(a);return r(s,u,c,f,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function MC(e,r){const l={};let a,s;for(s in r.properties)if(s!=="children"&&mh.call(r.properties,s)){const u=BC(e,s,r.properties[s]);if(u){const[c,f]=u;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&CC.has(r.tagName)?a=f:l[c]=f}}if(a){const u=l.style||(l.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return l}function zC(e,r){const l={};for(const a of r.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const u=a.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 Ua(e,r.position);else{const s=a.name;let u;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else Ua(e,r.position);else u=a.value===null?!0:a.value;l[s]=u}return l}function bh(e,r){const l=[];let a=-1;const s=e.passKeys?new Map:SC;for(;++a<r.children.length;){const u=r.children[a];let c;if(e.passKeys){const p=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(p){const h=s.get(p)||0;c=p+"-"+h,s.set(p,h+1)}}const f=M1(e,u,c);f!==void 0&&l.push(f)}return l}function BC(e,r,l){const a=cC(e.schema,r);if(!(l==null||typeof l=="number"&&Number.isNaN(l))){if(Array.isArray(l)&&(l=a.commaSeparated?JE(l):pC(l)),a.property==="style"){let s=typeof l=="object"?l:FC(e,String(l));return e.stylePropertyNameCase==="css"&&(s=IC(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?oC[a.property]||a.property:a.attribute,l]}}function FC(e,r){try{return vC(r,{reactCompat:!0})}catch(l){if(e.ignoreInvalidStyle)return{};const a=l,s=new qt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=O1+"#cannot-parse-style-attribute",s}}function B1(e,r,l){let a;if(!l)a={type:"Literal",value:r};else if(r.includes(".")){const s=r.split(".");let u=-1,c;for(;++u<s.length;){const f=hy(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}a=c}else a=hy(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(a.type==="Literal"){const s=a.value;return mh.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);Ua(e)}function Ua(e,r){const l=new qt("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=O1+"#cannot-handle-mdx-estrees-without-createevaluater",l}function IC(e){const r={};let l;for(l in e)mh.call(e,l)&&(r[UC(l)]=e[l]);return r}function UC(e){let r=e.replace(kC,HC);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function HC(e){return"-"+e.toLowerCase()}const Gf={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"]},qC={};function yh(e,r){const l=qC,a=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,s=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return F1(e,a,s)}function F1(e,r,l){if(PC(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 ky(e.children,r,l)}return Array.isArray(e)?ky(e,r,l):""}function ky(e,r,l){const a=[];let s=-1;for(;++s<e.length;)a[s]=F1(e[s],r,l);return a.join("")}function PC(e){return!!(e&&typeof e=="object")}const Ey=document.createElement("i");function xh(e){const r="&"+e+";";Ey.innerHTML=r;const l=Ey.textContent;return l.charCodeAt(l.length-1)===59&&e!=="semi"||l===r?!1:l}function wn(e,r,l,a){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,a.length<1e4)c=Array.from(a),c.unshift(r,l),e.splice(...c);else for(l&&e.splice(r,l);u<a.length;)c=a.slice(u,u+1e4),c.unshift(r,0),e.splice(...c),u+=1e4,r+=1e4}function On(e,r){return e.length>0?(wn(e,e.length,0,r),e):r}const Cy={}.hasOwnProperty;function I1(e){const r={};let l=-1;for(;++l<e.length;)$C(r,e[l]);return r}function $C(e,r){let l;for(l in r){const s=(Cy.call(e,l)?e[l]:void 0)||(e[l]={}),u=r[l];let c;if(u)for(c in u){Cy.call(s,c)||(s[c]=[]);const f=u[c];VC(s[c],Array.isArray(f)?f:f?[f]:[])}}}function VC(e,r){let l=-1;const a=[];for(;++l<r.length;)(r[l].add==="after"?e:a).push(r[l]);wn(e,0,0,a)}function U1(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 Un(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Yt=el(/[A-Za-z]/),Ht=el(/[\dA-Za-z]/),GC=el(/[#-'*+\--9=?A-Z^-~]/);function Us(e){return e!==null&&(e<32||e===127)}const Ud=el(/\d/),YC=el(/[\dA-Fa-f]/),XC=el(/[!-/:-@[-`{-~]/);function Te(e){return e!==null&&e<-2}function st(e){return e!==null&&(e<0||e===32)}function Fe(e){return e===-2||e===-1||e===32}const uu=el(new RegExp("\\p{P}|\\p{S}","u")),Al=el(/\s/);function el(e){return r;function r(l){return l!==null&&l>-1&&e.test(String.fromCharCode(l))}}function Ti(e){const r=[];let l=-1,a=0,s=0;for(;++l<e.length;){const u=e.charCodeAt(l);let c="";if(u===37&&Ht(e.charCodeAt(l+1))&&Ht(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(a,l),encodeURIComponent(c)),a=l+s+1,c=""),s&&(l+=s,s=0)}return r.join("")+e.slice(a)}function $e(e,r,l,a){const s=a?a-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(p){return Fe(p)?(e.enter(l),f(p)):r(p)}function f(p){return Fe(p)&&u++<s?(e.consume(p),f):(e.exit(l),r(p))}}const ZC={tokenize:QC};function QC(e){const r=e.attempt(this.parser.constructs.contentInitial,a,s);let l;return r;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),$e(e,r,"linePrefix")}function s(f){return e.enter("paragraph"),u(f)}function u(f){const p=e.enter("chunkText",{contentType:"text",previous:l});return l&&(l.next=p),l=p,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 KC={tokenize:JC},Ay={tokenize:WC};function JC(e){const r=this,l=[];let a=0,s,u,c;return f;function f(T){if(a<l.length){const B=l[a];return r.containerState=B[1],e.attempt(B[0].continuation,p,h)(T)}return h(T)}function p(T){if(a++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,s&&C();const B=r.events.length;let q=B,D;for(;q--;)if(r.events[q][0]==="exit"&&r.events[q][1].type==="chunkFlow"){D=r.events[q][1].end;break}E(a);let U=B;for(;U<r.events.length;)r.events[U][1].end={...D},U++;return wn(r.events,q+1,0,r.events.slice(B)),r.events.length=U,h(T)}return f(T)}function h(T){if(a===l.length){if(!s)return v(T);if(s.currentConstruct&&s.currentConstruct.concrete)return w(T);r.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return r.containerState={},e.check(Ay,b,g)(T)}function b(T){return s&&C(),E(a),v(T)}function g(T){return r.parser.lazy[r.now().line]=a!==l.length,c=r.now().offset,w(T)}function v(T){return r.containerState={},e.attempt(Ay,x,w)(T)}function x(T){return a++,l.push([r.currentConstruct,r.containerState]),v(T)}function w(T){if(T===null){s&&C(),E(0),e.consume(T);return}return s=s||r.parser.flow(r.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:u}),k(T)}function k(T){if(T===null){A(e.exit("chunkFlow"),!0),E(0),e.consume(T);return}return Te(T)?(e.consume(T),A(e.exit("chunkFlow")),a=0,r.interrupt=void 0,f):(e.consume(T),k)}function A(T,B){const q=r.sliceStream(T);if(B&&q.push(null),T.previous=u,u&&(u.next=T),u=T,s.defineSkip(T.start),s.write(q),r.parser.lazy[T.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<c&&(!s.events[D][1].end||s.events[D][1].end.offset>c))return;const U=r.events.length;let V=U,G,M;for(;V--;)if(r.events[V][0]==="exit"&&r.events[V][1].type==="chunkFlow"){if(G){M=r.events[V][1].end;break}G=!0}for(E(a),D=U;D<r.events.length;)r.events[D][1].end={...M},D++;wn(r.events,V+1,0,r.events.slice(U)),r.events.length=D}}function E(T){let B=l.length;for(;B-- >T;){const q=l[B];r.containerState=q[1],q[0].exit.call(r,e)}l.length=T}function C(){s.write([null]),u=void 0,s=void 0,r.containerState._closeFlow=void 0}}function WC(e,r,l){return $e(e,e.attempt(this.parser.constructs.document,r,l),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ci(e){if(e===null||st(e)||Al(e))return 1;if(uu(e))return 2}function cu(e,r,l){const a=[];let s=-1;for(;++s<e.length;){const u=e[s].resolveAll;u&&!a.includes(u)&&(r=u(r,l),a.push(u))}return r}const Hd={name:"attention",resolveAll:e3,tokenize:t3};function e3(e,r){let l=-1,a,s,u,c,f,p,h,b;for(;++l<e.length;)if(e[l][0]==="enter"&&e[l][1].type==="attentionSequence"&&e[l][1]._close){for(a=l;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&r.sliceSerialize(e[a][1]).charCodeAt(0)===r.sliceSerialize(e[l][1]).charCodeAt(0)){if((e[a][1]._close||e[l][1]._open)&&(e[l][1].end.offset-e[l][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[l][1].end.offset-e[l][1].start.offset)%3))continue;p=e[a][1].end.offset-e[a][1].start.offset>1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1;const g={...e[a][1].end},v={...e[l][1].start};Ny(g,-p),Ny(v,p),c={type:p>1?"strongSequence":"emphasisSequence",start:g,end:{...e[a][1].end}},f={type:p>1?"strongSequence":"emphasisSequence",start:{...e[l][1].start},end:v},u={type:p>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[l][1].start}},s={type:p>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[l][1].start={...f.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=On(h,[["enter",e[a][1],r],["exit",e[a][1],r]])),h=On(h,[["enter",s,r],["enter",c,r],["exit",c,r],["enter",u,r]]),h=On(h,cu(r.parser.constructs.insideSpan.null,e.slice(a+1,l),r)),h=On(h,[["exit",u,r],["enter",f,r],["exit",f,r],["exit",s,r]]),e[l][1].end.offset-e[l][1].start.offset?(b=2,h=On(h,[["enter",e[l][1],r],["exit",e[l][1],r]])):b=0,wn(e,a-1,l-a+3,h),l=a+h.length-b-2;break}}for(l=-1;++l<e.length;)e[l][1].type==="attentionSequence"&&(e[l][1].type="data");return e}function t3(e,r){const l=this.parser.constructs.attentionMarkers.null,a=this.previous,s=Ci(a);let u;return c;function c(p){return u=p,e.enter("attentionSequence"),f(p)}function f(p){if(p===u)return e.consume(p),f;const h=e.exit("attentionSequence"),b=Ci(p),g=!b||b===2&&s||l.includes(p),v=!s||s===2&&b||l.includes(a);return h._open=!!(u===42?g:g&&(s||!v)),h._close=!!(u===42?v:v&&(b||!g)),r(p)}}function Ny(e,r){e.column+=r,e.offset+=r,e._bufferIndex+=r}const n3={name:"autolink",tokenize:r3};function r3(e,r,l){let a=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 Yt(x)?(e.consume(x),c):x===64?l(x):h(x)}function c(x){return x===43||x===45||x===46||Ht(x)?(a=1,f(x)):h(x)}function f(x){return x===58?(e.consume(x),a=0,p):(x===43||x===45||x===46||Ht(x))&&a++<32?(e.consume(x),f):(a=0,h(x))}function p(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||Us(x)?l(x):(e.consume(x),p)}function h(x){return x===64?(e.consume(x),b):GC(x)?(e.consume(x),h):l(x)}function b(x){return Ht(x)?g(x):l(x)}function g(x){return x===46?(e.consume(x),a=0,b):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||Ht(x))&&a++<63){const w=x===45?v:g;return e.consume(x),w}return l(x)}}const Za={partial:!0,tokenize:l3};function l3(e,r,l){return a;function a(u){return Fe(u)?$e(e,s,"linePrefix")(u):s(u)}function s(u){return u===null||Te(u)?r(u):l(u)}}const H1={continuation:{tokenize:a3},exit:o3,name:"blockQuote",tokenize:i3};function i3(e,r,l){const a=this;return s;function s(c){if(c===62){const f=a.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 Fe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),r):(e.exit("blockQuotePrefix"),r(c))}}function a3(e,r,l){const a=this;return s;function s(c){return Fe(c)?$e(e,u,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(H1,r,l)(c)}}function o3(e){e.exit("blockQuote")}const q1={name:"characterEscape",tokenize:s3};function s3(e,r,l){return a;function a(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),s}function s(u){return XC(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),r):l(u)}}const P1={name:"characterReference",tokenize:u3};function u3(e,r,l){const a=this;let s=0,u,c;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),p}function p(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),u=31,c=Ht,b(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=YC,b):(e.enter("characterReferenceValue"),u=7,c=Ud,b(g))}function b(g){if(g===59&&s){const v=e.exit("characterReferenceValue");return c===Ht&&!xh(a.sliceSerialize(v))?l(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),r)}return c(g)&&s++<u?(e.consume(g),b):l(g)}}const Ty={partial:!0,tokenize:f3},jy={concrete:!0,name:"codeFenced",tokenize:c3};function c3(e,r,l){const a=this,s={partial:!0,tokenize:q};let u=0,c=0,f;return p;function p(D){return h(D)}function h(D){const U=a.events[a.events.length-1];return u=U&&U[1].type==="linePrefix"?U[2].sliceSerialize(U[1],!0).length:0,f=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),b(D)}function b(D){return D===f?(c++,e.consume(D),b):c<3?l(D):(e.exit("codeFencedFenceSequence"),Fe(D)?$e(e,g,"whitespace")(D):g(D))}function g(D){return D===null||Te(D)?(e.exit("codeFencedFence"),a.interrupt?r(D):e.check(Ty,k,B)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(D))}function v(D){return D===null||Te(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(D)):Fe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),$e(e,x,"whitespace")(D)):D===96&&D===f?l(D):(e.consume(D),v)}function x(D){return D===null||Te(D)?g(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(D))}function w(D){return D===null||Te(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(D)):D===96&&D===f?l(D):(e.consume(D),w)}function k(D){return e.attempt(s,B,A)(D)}function A(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),E}function E(D){return u>0&&Fe(D)?$e(e,C,"linePrefix",u+1)(D):C(D)}function C(D){return D===null||Te(D)?e.check(Ty,k,B)(D):(e.enter("codeFlowValue"),T(D))}function T(D){return D===null||Te(D)?(e.exit("codeFlowValue"),C(D)):(e.consume(D),T)}function B(D){return e.exit("codeFenced"),r(D)}function q(D,U,V){let G=0;return M;function M(X){return D.enter("lineEnding"),D.consume(X),D.exit("lineEnding"),$}function $(X){return D.enter("codeFencedFence"),Fe(X)?$e(D,Y,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):Y(X)}function Y(X){return X===f?(D.enter("codeFencedFenceSequence"),J(X)):V(X)}function J(X){return X===f?(G++,D.consume(X),J):G>=c?(D.exit("codeFencedFenceSequence"),Fe(X)?$e(D,I,"whitespace")(X):I(X)):V(X)}function I(X){return X===null||Te(X)?(D.exit("codeFencedFence"),U(X)):V(X)}}}function f3(e,r,l){const a=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 a.parser.lazy[a.now().line]?l(c):r(c)}}const Yf={name:"codeIndented",tokenize:h3},d3={partial:!0,tokenize:p3};function h3(e,r,l){const a=this;return s;function s(h){return e.enter("codeIndented"),$e(e,u,"linePrefix",5)(h)}function u(h){const b=a.events[a.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?c(h):l(h)}function c(h){return h===null?p(h):Te(h)?e.attempt(d3,c,p)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Te(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function p(h){return e.exit("codeIndented"),r(h)}}function p3(e,r,l){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?l(c):Te(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):$e(e,u,"linePrefix",5)(c)}function u(c){const f=a.events[a.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 m3={name:"codeText",previous:b3,resolve:g3,tokenize:y3};function g3(e){let r=e.length-4,l=3,a,s;if((e[l][1].type==="lineEnding"||e[l][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(a=l;++a<r;)if(e[a][1].type==="codeTextData"){e[l][1].type="codeTextPadding",e[r][1].type="codeTextPadding",l+=2,r-=2;break}}for(a=l-1,r++;++a<=r;)s===void 0?a!==r&&e[a][1].type!=="lineEnding"&&(s=a):(a===r||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),r-=a-s-2,a=s+2),s=void 0);return e}function b3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function y3(e,r,l){let a=0,s,u;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),a++,f):(e.exit("codeTextSequence"),p(g))}function p(g){return g===null?l(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),p):g===96?(u=e.enter("codeTextSequence"),s=0,b(g)):Te(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),p):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Te(g)?(e.exit("codeTextData"),p(g)):(e.consume(g),h)}function b(g){return g===96?(e.consume(g),s++,b):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),r(g)):(u.type="codeTextData",h(g))}}class x3{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 a=l??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(r,a):r>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(r,l,a){const s=l||0;this.setCursor(Math.trunc(r));const u=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&Na(this.left,a),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),Na(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Na(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);Na(this.right,l.reverse())}else{const l=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);Na(this.left,l.reverse())}}}function Na(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 $1(e){const r={};let l=-1,a,s,u,c,f,p,h;const b=new x3(e);for(;++l<b.length;){for(;l in r;)l=r[l];if(a=b.get(l),l&&a[1].type==="chunkFlow"&&b.get(l-1)[1].type==="listItemPrefix"&&(p=a[1]._tokenizer.events,u=0,u<p.length&&p[u][1].type==="lineEndingBlank"&&(u+=2),u<p.length&&p[u][1].type==="content"))for(;++u<p.length&&p[u][1].type!=="content";)p[u][1].type==="chunkText"&&(p[u][1]._isInFirstContentOfListItem=!0,u++);if(a[0]==="enter")a[1].contentType&&(Object.assign(r,v3(b,l)),l=r[l],h=!0);else if(a[1]._container){for(u=l,s=void 0;u--;)if(c=b.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(b.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...b.get(s)[1].start},f=b.slice(s,l),f.unshift(a),b.splice(s,l-s+1,f))}}return wn(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!h}function v3(e,r){const l=e.get(r)[1],a=e.get(r)[2];let s=r-1;const u=[];let c=l._tokenizer;c||(c=a.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,p=[],h={};let b,g,v=-1,x=l,w=0,k=0;const A=[k];for(;x;){for(;e.get(++s)[1]!==x;);u.push(s),x._tokenizer||(b=a.sliceStream(x),x.next||b.push(null),g&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(b),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=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&&(k=v+1,A.push(k),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):A.pop(),v=A.length;v--;){const E=f.slice(A[v],A[v+1]),C=u.pop();p.push([C,C+E.length-1]),e.splice(C,2,E)}for(p.reverse(),v=-1;++v<p.length;)h[w+p[v][0]]=w+p[v][1],w+=p[v][1]-p[v][0]-1;return h}const w3={resolve:k3,tokenize:E3},S3={partial:!0,tokenize:C3};function k3(e){return $1(e),e}function E3(e,r){let l;return a;function a(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(S3,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 C3(e,r,l){const a=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),$e(e,u,"linePrefix")}function u(c){if(c===null||Te(c))return l(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?r(c):e.interrupt(a.parser.constructs.flow,l,r)(c)}}function V1(e,r,l,a,s,u,c,f,p){const h=p||Number.POSITIVE_INFINITY;let b=0;return g;function g(E){return E===60?(e.enter(a),e.enter(s),e.enter(u),e.consume(E),e.exit(u),v):E===null||E===32||E===41||Us(E)?l(E):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),k(E))}function v(E){return E===62?(e.enter(u),e.consume(E),e.exit(u),e.exit(s),e.exit(a),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?w:x)}function w(E){return E===60||E===62||E===92?(e.consume(E),x):x(E)}function k(E){return!b&&(E===null||E===41||st(E))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),r(E)):b<h&&E===40?(e.consume(E),b++,k):E===41?(e.consume(E),b--,k):E===null||E===32||E===40||Us(E)?l(E):(e.consume(E),E===92?A:k)}function A(E){return E===40||E===41||E===92?(e.consume(E),k):k(E)}}function G1(e,r,l,a,s,u){const c=this;let f=0,p;return h;function h(x){return e.enter(a),e.enter(s),e.consume(x),e.exit(s),e.enter(u),b}function b(x){return f>999||x===null||x===91||x===93&&!p||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(a),r):Te(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),b):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||x===91||x===93||Te(x)||f++>999?(e.exit("chunkString"),b(x)):(e.consume(x),p||(p=!Fe(x)),x===92?v:g)}function v(x){return x===91||x===92||x===93?(e.consume(x),f++,g):g(x)}}function Y1(e,r,l,a,s,u){let c;return f;function f(v){return v===34||v===39||v===40?(e.enter(a),e.enter(s),e.consume(v),e.exit(s),c=v===40?41:v,p):l(v)}function p(v){return v===c?(e.enter(s),e.consume(v),e.exit(s),e.exit(a),r):(e.enter(u),h(v))}function h(v){return v===c?(e.exit(u),p(c)):v===null?l(v):Te(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),$e(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===c||v===null||Te(v)?(e.exit("chunkString"),h(v)):(e.consume(v),v===92?g:b)}function g(v){return v===c||v===92?(e.consume(v),b):b(v)}}function Oa(e,r){let l;return a;function a(s){return Te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),l=!0,a):Fe(s)?$e(e,a,l?"linePrefix":"lineSuffix")(s):r(s)}}const A3={name:"definition",tokenize:T3},N3={partial:!0,tokenize:j3};function T3(e,r,l){const a=this;let s;return u;function u(x){return e.enter("definition"),c(x)}function c(x){return G1.call(a,e,f,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function f(x){return s=Un(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),p):l(x)}function p(x){return st(x)?Oa(e,h)(x):h(x)}function h(x){return V1(e,b,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function b(x){return e.attempt(N3,g,g)(x)}function g(x){return Fe(x)?$e(e,v,"whitespace")(x):v(x)}function v(x){return x===null||Te(x)?(e.exit("definition"),a.parser.defined.push(s),r(x)):l(x)}}function j3(e,r,l){return a;function a(f){return st(f)?Oa(e,s)(f):l(f)}function s(f){return Y1(e,u,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return Fe(f)?$e(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Te(f)?r(f):l(f)}}const R3={name:"hardBreakEscape",tokenize:_3};function _3(e,r,l){return a;function a(u){return e.enter("hardBreakEscape"),e.consume(u),s}function s(u){return Te(u)?(e.exit("hardBreakEscape"),r(u)):l(u)}}const L3={name:"headingAtx",resolve:D3,tokenize:O3};function D3(e,r){let l=e.length-2,a=3,s,u;return e[a][1].type==="whitespace"&&(a+=2),l-2>a&&e[l][1].type==="whitespace"&&(l-=2),e[l][1].type==="atxHeadingSequence"&&(a===l-1||l-4>a&&e[l-2][1].type==="whitespace")&&(l-=a+1===l?2:4),l>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[l][1].end},u={type:"chunkText",start:e[a][1].start,end:e[l][1].end,contentType:"text"},wn(e,a,l-a+1,[["enter",s,r],["enter",u,r],["exit",u,r],["exit",s,r]])),e}function O3(e,r,l){let a=0;return s;function s(b){return e.enter("atxHeading"),u(b)}function u(b){return e.enter("atxHeadingSequence"),c(b)}function c(b){return b===35&&a++<6?(e.consume(b),c):b===null||st(b)?(e.exit("atxHeadingSequence"),f(b)):l(b)}function f(b){return b===35?(e.enter("atxHeadingSequence"),p(b)):b===null||Te(b)?(e.exit("atxHeading"),r(b)):Fe(b)?$e(e,f,"whitespace")(b):(e.enter("atxHeadingText"),h(b))}function p(b){return b===35?(e.consume(b),p):(e.exit("atxHeadingSequence"),f(b))}function h(b){return b===null||b===35||st(b)?(e.exit("atxHeadingText"),f(b)):(e.consume(b),h)}}const M3=["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"],Ry=["pre","script","style","textarea"],z3={concrete:!0,name:"htmlFlow",resolveTo:I3,tokenize:U3},B3={partial:!0,tokenize:q3},F3={partial:!0,tokenize:H3};function I3(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 U3(e,r,l){const a=this;let s,u,c,f,p;return h;function h(N){return b(N)}function b(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),g}function g(N){return N===33?(e.consume(N),v):N===47?(e.consume(N),u=!0,k):N===63?(e.consume(N),s=3,a.interrupt?r:R):Yt(N)?(e.consume(N),c=String.fromCharCode(N),A):l(N)}function v(N){return N===45?(e.consume(N),s=2,x):N===91?(e.consume(N),s=5,f=0,w):Yt(N)?(e.consume(N),s=4,a.interrupt?r:R):l(N)}function x(N){return N===45?(e.consume(N),a.interrupt?r:R):l(N)}function w(N){const re="CDATA[";return N===re.charCodeAt(f++)?(e.consume(N),f===re.length?a.interrupt?r:Y:w):l(N)}function k(N){return Yt(N)?(e.consume(N),c=String.fromCharCode(N),A):l(N)}function A(N){if(N===null||N===47||N===62||st(N)){const re=N===47,ce=c.toLowerCase();return!re&&!u&&Ry.includes(ce)?(s=1,a.interrupt?r(N):Y(N)):M3.includes(c.toLowerCase())?(s=6,re?(e.consume(N),E):a.interrupt?r(N):Y(N)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?l(N):u?C(N):T(N))}return N===45||Ht(N)?(e.consume(N),c+=String.fromCharCode(N),A):l(N)}function E(N){return N===62?(e.consume(N),a.interrupt?r:Y):l(N)}function C(N){return Fe(N)?(e.consume(N),C):M(N)}function T(N){return N===47?(e.consume(N),M):N===58||N===95||Yt(N)?(e.consume(N),B):Fe(N)?(e.consume(N),T):M(N)}function B(N){return N===45||N===46||N===58||N===95||Ht(N)?(e.consume(N),B):q(N)}function q(N){return N===61?(e.consume(N),D):Fe(N)?(e.consume(N),q):T(N)}function D(N){return N===null||N===60||N===61||N===62||N===96?l(N):N===34||N===39?(e.consume(N),p=N,U):Fe(N)?(e.consume(N),D):V(N)}function U(N){return N===p?(e.consume(N),p=null,G):N===null||Te(N)?l(N):(e.consume(N),U)}function V(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||st(N)?q(N):(e.consume(N),V)}function G(N){return N===47||N===62||Fe(N)?T(N):l(N)}function M(N){return N===62?(e.consume(N),$):l(N)}function $(N){return N===null||Te(N)?Y(N):Fe(N)?(e.consume(N),$):l(N)}function Y(N){return N===45&&s===2?(e.consume(N),F):N===60&&s===1?(e.consume(N),O):N===62&&s===4?(e.consume(N),L):N===63&&s===3?(e.consume(N),R):N===93&&s===5?(e.consume(N),Q):Te(N)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(B3,H,J)(N)):N===null||Te(N)?(e.exit("htmlFlowData"),J(N)):(e.consume(N),Y)}function J(N){return e.check(F3,I,H)(N)}function I(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),X}function X(N){return N===null||Te(N)?J(N):(e.enter("htmlFlowData"),Y(N))}function F(N){return N===45?(e.consume(N),R):Y(N)}function O(N){return N===47?(e.consume(N),c="",z):Y(N)}function z(N){if(N===62){const re=c.toLowerCase();return Ry.includes(re)?(e.consume(N),L):Y(N)}return Yt(N)&&c.length<8?(e.consume(N),c+=String.fromCharCode(N),z):Y(N)}function Q(N){return N===93?(e.consume(N),R):Y(N)}function R(N){return N===62?(e.consume(N),L):N===45&&s===2?(e.consume(N),R):Y(N)}function L(N){return N===null||Te(N)?(e.exit("htmlFlowData"),H(N)):(e.consume(N),L)}function H(N){return e.exit("htmlFlow"),r(N)}}function H3(e,r,l){const a=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 a.parser.lazy[a.now().line]?l(c):r(c)}}function q3(e,r,l){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Za,r,l)}}const P3={name:"htmlText",tokenize:$3};function $3(e,r,l){const a=this;let s,u,c;return f;function f(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),p}function p(R){return R===33?(e.consume(R),h):R===47?(e.consume(R),q):R===63?(e.consume(R),T):Yt(R)?(e.consume(R),V):l(R)}function h(R){return R===45?(e.consume(R),b):R===91?(e.consume(R),u=0,w):Yt(R)?(e.consume(R),C):l(R)}function b(R){return R===45?(e.consume(R),x):l(R)}function g(R){return R===null?l(R):R===45?(e.consume(R),v):Te(R)?(c=g,O(R)):(e.consume(R),g)}function v(R){return R===45?(e.consume(R),x):g(R)}function x(R){return R===62?F(R):R===45?v(R):g(R)}function w(R){const L="CDATA[";return R===L.charCodeAt(u++)?(e.consume(R),u===L.length?k:w):l(R)}function k(R){return R===null?l(R):R===93?(e.consume(R),A):Te(R)?(c=k,O(R)):(e.consume(R),k)}function A(R){return R===93?(e.consume(R),E):k(R)}function E(R){return R===62?F(R):R===93?(e.consume(R),E):k(R)}function C(R){return R===null||R===62?F(R):Te(R)?(c=C,O(R)):(e.consume(R),C)}function T(R){return R===null?l(R):R===63?(e.consume(R),B):Te(R)?(c=T,O(R)):(e.consume(R),T)}function B(R){return R===62?F(R):T(R)}function q(R){return Yt(R)?(e.consume(R),D):l(R)}function D(R){return R===45||Ht(R)?(e.consume(R),D):U(R)}function U(R){return Te(R)?(c=U,O(R)):Fe(R)?(e.consume(R),U):F(R)}function V(R){return R===45||Ht(R)?(e.consume(R),V):R===47||R===62||st(R)?G(R):l(R)}function G(R){return R===47?(e.consume(R),F):R===58||R===95||Yt(R)?(e.consume(R),M):Te(R)?(c=G,O(R)):Fe(R)?(e.consume(R),G):F(R)}function M(R){return R===45||R===46||R===58||R===95||Ht(R)?(e.consume(R),M):$(R)}function $(R){return R===61?(e.consume(R),Y):Te(R)?(c=$,O(R)):Fe(R)?(e.consume(R),$):G(R)}function Y(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=Y,O(R)):Fe(R)?(e.consume(R),Y):(e.consume(R),I)}function J(R){return R===s?(e.consume(R),s=void 0,X):R===null?l(R):Te(R)?(c=J,O(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)?G(R):(e.consume(R),I)}function X(R){return R===47||R===62||st(R)?G(R):l(R)}function F(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),r):l(R)}function O(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),z}function z(R){return Fe(R)?$e(e,Q,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):Q(R)}function Q(R){return e.enter("htmlTextData"),c(R)}}const vh={name:"labelEnd",resolveAll:X3,resolveTo:Z3,tokenize:Q3},V3={tokenize:K3},G3={tokenize:J3},Y3={tokenize:W3};function X3(e){let r=-1;const l=[];for(;++r<e.length;){const a=e[r][1];if(l.push(e[r]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",r+=s}}return e.length!==l.length&&wn(e,0,e.length,l),e}function Z3(e,r){let l=e.length,a=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")){a=2;break}}else s.type==="labelEnd"&&(c=l);const p={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[u][1].start},end:{...e[c][1].end}},b={type:"labelText",start:{...e[u+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",p,r],["enter",h,r]],f=On(f,e.slice(u+1,u+a+3)),f=On(f,[["enter",b,r]]),f=On(f,cu(r.parser.constructs.insideSpan.null,e.slice(u+a+4,c-3),r)),f=On(f,[["exit",b,r],e[c-2],e[c-1],["exit",h,r]]),f=On(f,e.slice(c+1)),f=On(f,[["exit",p,r]]),wn(e,u,e.length,f),e}function Q3(e,r,l){const a=this;let s=a.events.length,u,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){u=a.events[s][1];break}return f;function f(v){return u?u._inactive?g(v):(c=a.parser.defined.includes(Un(a.sliceSerialize({start:u.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),p):l(v)}function p(v){return v===40?e.attempt(V3,b,c?b:g)(v):v===91?e.attempt(G3,b,c?h:g)(v):c?b(v):g(v)}function h(v){return e.attempt(Y3,b,g)(v)}function b(v){return r(v)}function g(v){return u._balanced=!0,l(v)}}function K3(e,r,l){return a;function a(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),s}function s(g){return st(g)?Oa(e,u)(g):u(g)}function u(g){return g===41?b(g):V1(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return st(g)?Oa(e,p)(g):b(g)}function f(g){return l(g)}function p(g){return g===34||g===39||g===40?Y1(e,h,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):b(g)}function h(g){return st(g)?Oa(e,b)(g):b(g)}function b(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),r):l(g)}}function J3(e,r,l){const a=this;return s;function s(f){return G1.call(a,e,u,c,"reference","referenceMarker","referenceString")(f)}function u(f){return a.parser.defined.includes(Un(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?r(f):l(f)}function c(f){return l(f)}}function W3(e,r,l){return a;function a(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 e4={name:"labelStartImage",resolveAll:vh.resolveAll,tokenize:t4};function t4(e,r,l){const a=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 a.parser.constructs?l(f):r(f)}}const n4={name:"labelStartLink",resolveAll:vh.resolveAll,tokenize:r4};function r4(e,r,l){const a=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 a.parser.constructs?l(c):r(c)}}const Xf={name:"lineEnding",tokenize:l4};function l4(e,r){return l;function l(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),$e(e,r,"linePrefix")}}const Ns={name:"thematicBreak",tokenize:i4};function i4(e,r,l){let a=0,s;return u;function u(h){return e.enter("thematicBreak"),c(h)}function c(h){return s=h,f(h)}function f(h){return h===s?(e.enter("thematicBreakSequence"),p(h)):a>=3&&(h===null||Te(h))?(e.exit("thematicBreak"),r(h)):l(h)}function p(h){return h===s?(e.consume(h),a++,p):(e.exit("thematicBreakSequence"),Fe(h)?$e(e,f,"whitespace")(h):f(h))}}const nn={continuation:{tokenize:u4},exit:f4,name:"list",tokenize:s4},a4={partial:!0,tokenize:d4},o4={partial:!0,tokenize:c4};function s4(e,r,l){const a=this,s=a.events[a.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 w=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:Ud(x)){if(a.containerState.type||(a.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Ns,l,h)(x):h(x);if(!a.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(x)}return l(x)}function p(x){return Ud(x)&&++c<10?(e.consume(x),p):(!a.interrupt||c<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),h(x)):l(x)}function h(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||x,e.check(Za,a.interrupt?l:b,e.attempt(a4,v,g))}function b(x){return a.containerState.initialBlankLine=!0,u++,v(x)}function g(x){return Fe(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),v):l(x)}function v(x){return a.containerState.size=u+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(x)}}function u4(e,r,l){const a=this;return a.containerState._closeFlow=void 0,e.check(Za,s,u);function s(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,$e(e,r,"listItemIndent",a.containerState.size+1)(f)}function u(f){return a.containerState.furtherBlankLines||!Fe(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(o4,r,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,$e(e,e.attempt(nn,r,l),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function c4(e,r,l){const a=this;return $e(e,s,"listItemIndent",a.containerState.size+1);function s(u){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?r(u):l(u)}}function f4(e){e.exit(this.containerState.type)}function d4(e,r,l){const a=this;return $e(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(u){const c=a.events[a.events.length-1];return!Fe(u)&&c&&c[1].type==="listItemPrefixWhitespace"?r(u):l(u)}}const _y={name:"setextUnderline",resolveTo:h4,tokenize:p4};function h4(e,r){let l=e.length,a,s,u;for(;l--;)if(e[l][0]==="enter"){if(e[l][1].type==="content"){a=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[a][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[a][1],r]),e[a][1].end={...e[u][1].end}):e[a][1]=c,e.push(["exit",c,r]),e}function p4(e,r,l){const a=this;let s;return u;function u(h){let b=a.events.length,g;for(;b--;)if(a.events[b][1].type!=="lineEnding"&&a.events[b][1].type!=="linePrefix"&&a.events[b][1].type!=="content"){g=a.events[b][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||g)?(e.enter("setextHeadingLine"),s=h,c(h)):l(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===s?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Fe(h)?$e(e,p,"lineSuffix")(h):p(h))}function p(h){return h===null||Te(h)?(e.exit("setextHeadingLine"),r(h)):l(h)}}const m4={tokenize:g4};function g4(e){const r=this,l=e.attempt(Za,a,e.attempt(this.parser.constructs.flowInitial,s,$e(e,e.attempt(this.parser.constructs.flow,s,e.attempt(w3,s)),"linePrefix")));return l;function a(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 b4={resolveAll:Z1()},y4=X1("string"),x4=X1("text");function X1(e){return{resolveAll:Z1(e==="text"?v4:void 0),tokenize:r};function r(l){const a=this,s=this.parser.constructs[e],u=l.attempt(s,c,f);return c;function c(b){return h(b)?u(b):f(b)}function f(b){if(b===null){l.consume(b);return}return l.enter("data"),l.consume(b),p}function p(b){return h(b)?(l.exit("data"),u(b)):(l.consume(b),p)}function h(b){if(b===null)return!0;const g=s[b];let v=-1;if(g)for(;++v<g.length;){const x=g[v];if(!x.previous||x.previous.call(a,a.previous))return!0}return!1}}}function Z1(e){return r;function r(l,a){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,a):l}}function v4(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 a=e[l-1][1],s=r.sliceStream(a);let u=s.length,c=-1,f=0,p;for(;u--;){const h=s[u];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)p=!0,f++;else if(h!==-1){u++;break}}if(r._contentTypeTextTrailing&&l===e.length&&(f=0),f){const h={type:l===e.length||p||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:a.start._bufferIndex+c,_index:a.start._index+u,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(l,0,["enter",h,r],["exit",h,r]),l+=2)}l++}return e}const w4={42:nn,43:nn,45:nn,48:nn,49:nn,50:nn,51:nn,52:nn,53:nn,54:nn,55:nn,56:nn,57:nn,62:H1},S4={91:A3},k4={[-2]:Yf,[-1]:Yf,32:Yf},E4={35:L3,42:Ns,45:[_y,Ns],60:z3,61:_y,95:Ns,96:jy,126:jy},C4={38:P1,92:q1},A4={[-5]:Xf,[-4]:Xf,[-3]:Xf,33:e4,38:P1,42:Hd,60:[n3,P3],91:n4,92:[R3,q1],93:vh,95:Hd,96:m3},N4={null:[Hd,b4]},T4={null:[42,95]},j4={null:[]},R4=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:T4,contentInitial:S4,disable:j4,document:w4,flow:E4,flowInitial:k4,insideSpan:N4,string:C4,text:A4},Symbol.toStringTag,{value:"Module"}));function _4(e,r,l){let a={_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 p={attempt:U(q),check:U(D),consume:C,enter:T,exit:B,interrupt:U(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:k,events:[],now:w,parser:e,previous:null,sliceSerialize:v,sliceStream:x,write:g};let b=r.tokenize.call(h,p);return r.resolveAll&&u.push(r),h;function g($){return c=On(c,$),A(),c[c.length-1]!==null?[]:(V(r,0),h.events=cu(u,h.events,h),h.events)}function v($,Y){return D4(x($),Y)}function x($){return L4(c,$)}function w(){const{_bufferIndex:$,_index:Y,line:J,column:I,offset:X}=a;return{_bufferIndex:$,_index:Y,line:J,column:I,offset:X}}function k($){s[$.line]=$.column,M()}function A(){let $;for(;a._index<c.length;){const Y=c[a._index];if(typeof Y=="string")for($=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===$&&a._bufferIndex<Y.length;)E(Y.charCodeAt(a._bufferIndex));else E(Y)}}function E($){b=b($)}function C($){Te($)?(a.line++,a.column=1,a.offset+=$===-3?2:1,M()):$!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=$}function T($,Y){const J=Y||{};return J.type=$,J.start=w(),h.events.push(["enter",J,h]),f.push(J),J}function B($){const Y=f.pop();return Y.end=w(),h.events.push(["exit",Y,h]),Y}function q($,Y){V($,Y.from)}function D($,Y){Y.restore()}function U($,Y){return J;function J(I,X,F){let O,z,Q,R;return Array.isArray(I)?H(I):"tokenize"in I?H([I]):L(I);function L(de){return pe;function pe(ge){const fe=ge!==null&&de[ge],ve=ge!==null&&de.null,xe=[...Array.isArray(fe)?fe:fe?[fe]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return H(xe)(ge)}}function H(de){return O=de,z=0,de.length===0?F:N(de[z])}function N(de){return pe;function pe(ge){return R=G(),Q=de,de.partial||(h.currentConstruct=de),de.name&&h.parser.constructs.disable.null.includes(de.name)?ce():de.tokenize.call(Y?Object.assign(Object.create(h),Y):h,p,re,ce)(ge)}}function re(de){return $(Q,R),X}function ce(de){return R.restore(),++z<O.length?N(O[z]):F}}}function V($,Y){$.resolveAll&&!u.includes($)&&u.push($),$.resolve&&wn(h.events,Y,h.events.length-Y,$.resolve(h.events.slice(Y),h)),$.resolveTo&&(h.events=$.resolveTo(h.events,h))}function G(){const $=w(),Y=h.previous,J=h.currentConstruct,I=h.events.length,X=Array.from(f);return{from:I,restore:F};function F(){a=$,h.previous=Y,h.currentConstruct=J,h.events.length=I,f=X,M()}}function M(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function L4(e,r){const l=r.start._index,a=r.start._bufferIndex,s=r.end._index,u=r.end._bufferIndex;let c;if(l===s)c=[e[l].slice(a,u)];else{if(c=e.slice(l,s),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}u>0&&c.push(e[s].slice(0,u))}return c}function D4(e,r){let l=-1;const a=[];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=`
17
+ `;break}case-3:{c=`\r
18
+ `;break}case-2:{c=r?" ":" ";break}case-1:{if(!r&&s)continue;c=" ";break}default:c=String.fromCharCode(u)}s=u===-2,a.push(c)}return a.join("")}function O4(e){const a={constructs:I1([R4,...(e||{}).extensions||[]]),content:s(ZC),defined:[],document:s(KC),flow:s(m4),lazy:{},string:s(y4),text:s(x4)};return a;function s(u){return c;function c(f){return _4(a,u,f)}}}function M4(e){for(;!$1(e););return e}const Ly=/[\0\t\n\r]/g;function z4(){let e=1,r="",l=!0,a;return s;function s(u,c,f){const p=[];let h,b,g,v,x;for(u=r+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),g=0,r="",l&&(u.charCodeAt(0)===65279&&g++,l=void 0);g<u.length;){if(Ly.lastIndex=g,h=Ly.exec(u),v=h&&h.index!==void 0?h.index:u.length,x=u.charCodeAt(v),!h){r=u.slice(g);break}if(x===10&&g===v&&a)p.push(-3),a=void 0;else switch(a&&(p.push(-5),a=void 0),g<v&&(p.push(u.slice(g,v)),e+=v-g),x){case 0:{p.push(65533),e++;break}case 9:{for(b=Math.ceil(e/4)*4,p.push(-2);e++<b;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:a=!0,e=1}g=v+1}return f&&(a&&p.push(-5),r&&p.push(r),p.push(null)),p}}const B4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function F4(e){return e.replace(B4,I4)}function I4(e,r,l){if(r)return r;if(l.charCodeAt(0)===35){const s=l.charCodeAt(1),u=s===120||s===88;return U1(l.slice(u?2:1),u?16:10)}return xh(l)||e}const Q1={}.hasOwnProperty;function U4(e,r,l){return typeof r!="string"&&(l=r,r=void 0),H4(l)(M4(O4(l).document().write(z4()(e,r,!0))))}function H4(e){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(gt),autolinkProtocol:G,autolinkEmail:G,atxHeading:u(Ve),blockQuote:u(ve),characterEscape:G,characterReference:G,codeFenced:u(xe),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(xe,c),codeText:u(ye,c),codeTextData:G,data:G,codeFlowValue:G,definition:u(ke),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(Ne),hardBreakEscape:u(et),hardBreakTrailing:u(et),htmlFlow:u(He,c),htmlFlowData:G,htmlText:u(He,c),htmlTextData:G,image:u(Ke),label:c,link:u(gt),listItem:u(_t),listItemValue:v,listOrdered:u(pt,g),listUnordered:u(pt),paragraph:u(Zt),reference:N,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(Ve),strong:u(Pt),thematicBreak:u(wr)},exit:{atxHeading:p(),atxHeadingSequence:q,autolink:p(),autolinkEmail:fe,autolinkProtocol:ge,blockQuote:p(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:de,characterReference:pe,codeFenced:p(A),codeFencedFence:k,codeFencedFenceInfo:x,codeFencedFenceMeta:w,codeFlowValue:M,codeIndented:p(E),codeText:p(X),codeTextData:M,data:M,definition:p(),definitionDestinationString:B,definitionLabelString:C,definitionTitleString:T,emphasis:p(),hardBreakEscape:p(Y),hardBreakTrailing:p(Y),htmlFlow:p(J),htmlFlowData:M,htmlText:p(I),htmlTextData:M,image:p(O),label:Q,labelText:z,lineEnding:$,link:p(F),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:re,resourceDestinationString:R,resourceTitleString:L,resource:H,setextHeading:p(V),setextHeadingLineSequence:U,setextHeadingText:D,strong:p(),thematicBreak:p()}};K1(r,(e||{}).mdastExtensions||[]);const l={};return a;function a(ae){let me={type:"root",children:[]};const Re={stack:[me],tokenStack:[],config:r,enter:f,exit:h,buffer:c,resume:b,data:l},De=[];let Pe=-1;for(;++Pe<ae.length;)if(ae[Pe][1].type==="listOrdered"||ae[Pe][1].type==="listUnordered")if(ae[Pe][0]==="enter")De.push(Pe);else{const $t=De.pop();Pe=s(ae,$t,Pe)}for(Pe=-1;++Pe<ae.length;){const $t=r[ae[Pe][0]];Q1.call($t,ae[Pe][1].type)&&$t[ae[Pe][1].type].call(Object.assign({sliceSerialize:ae[Pe][2].sliceSerialize},Re),ae[Pe][1])}if(Re.tokenStack.length>0){const $t=Re.tokenStack[Re.tokenStack.length-1];($t[1]||Dy).call(Re,void 0,$t[0])}for(me.position={start:Vr(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:Vr(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},Pe=-1;++Pe<r.transforms.length;)me=r.transforms[Pe](me)||me;return me}function s(ae,me,Re){let De=me-1,Pe=-1,$t=!1,sn,Nt,mt,zt;for(;++De<=Re;){const Qe=ae[De];switch(Qe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Qe[0]==="enter"?Pe++:Pe--,zt=void 0;break}case"lineEndingBlank":{Qe[0]==="enter"&&(sn&&!zt&&!Pe&&!mt&&(mt=De),zt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:zt=void 0}if(!Pe&&Qe[0]==="enter"&&Qe[1].type==="listItemPrefix"||Pe===-1&&Qe[0]==="exit"&&(Qe[1].type==="listUnordered"||Qe[1].type==="listOrdered")){if(sn){let Sn=De;for(Nt=void 0;Sn--;){const un=ae[Sn];if(un[1].type==="lineEnding"||un[1].type==="lineEndingBlank"){if(un[0]==="exit")continue;Nt&&(ae[Nt][1].type="lineEndingBlank",$t=!0),un[1].type="lineEnding",Nt=Sn}else if(!(un[1].type==="linePrefix"||un[1].type==="blockQuotePrefix"||un[1].type==="blockQuotePrefixWhitespace"||un[1].type==="blockQuoteMarker"||un[1].type==="listItemIndent"))break}mt&&(!Nt||mt<Nt)&&(sn._spread=!0),sn.end=Object.assign({},Nt?ae[Nt][1].start:Qe[1].end),ae.splice(Nt||De,0,["exit",sn,Qe[2]]),De++,Re++}if(Qe[1].type==="listItemPrefix"){const Sn={type:"listItem",_spread:!1,start:Object.assign({},Qe[1].start),end:void 0};sn=Sn,ae.splice(De,0,["enter",Sn,Qe[2]]),De++,Re++,mt=void 0,zt=!0}}}return ae[me][1]._spread=$t,Re}function u(ae,me){return Re;function Re(De){f.call(this,ae(De),De),me&&me.call(this,De)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ae,me,Re){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([me,Re||void 0]),ae.position={start:Vr(me.start),end:void 0}}function p(ae){return me;function me(Re){ae&&ae.call(this,Re),h.call(this,Re)}}function h(ae,me){const Re=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==ae.type&&(me?me.call(this,ae,De[0]):(De[1]||Dy).call(this,ae,De[0]));else throw new Error("Cannot close `"+ae.type+"` ("+Da({start:ae.start,end:ae.end})+"): it’s not open");Re.position.end=Vr(ae.end)}function b(){return yh(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function v(ae){if(this.data.expectingFirstListItemValue){const me=this.stack[this.stack.length-2];me.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function x(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.lang=ae}function w(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.meta=ae}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.value=ae.replace(/(\r?\n|\r)$/g,"")}function C(ae){const me=this.resume(),Re=this.stack[this.stack.length-1];Re.label=me,Re.identifier=Un(this.sliceSerialize(ae)).toLowerCase()}function T(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.title=ae}function B(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.url=ae}function q(ae){const me=this.stack[this.stack.length-1];if(!me.depth){const Re=this.sliceSerialize(ae).length;me.depth=Re}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function U(ae){const me=this.stack[this.stack.length-1];me.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function G(ae){const Re=this.stack[this.stack.length-1].children;let De=Re[Re.length-1];(!De||De.type!=="text")&&(De=it(),De.position={start:Vr(ae.start),end:void 0},Re.push(De)),this.stack.push(De)}function M(ae){const me=this.stack.pop();me.value+=this.sliceSerialize(ae),me.position.end=Vr(ae.end)}function $(ae){const me=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Re=me.children[me.children.length-1];Re.position.end=Vr(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(me.type)&&(G.call(this,ae),M.call(this,ae))}function Y(){this.data.atHardBreak=!0}function J(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.value=ae}function I(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.value=ae}function X(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.value=ae}function F(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=me,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function O(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=me,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function z(ae){const me=this.sliceSerialize(ae),Re=this.stack[this.stack.length-2];Re.label=F4(me),Re.identifier=Un(me).toLowerCase()}function Q(){const ae=this.stack[this.stack.length-1],me=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){const De=ae.children;Re.children=De}else Re.alt=me}function R(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.url=ae}function L(){const ae=this.resume(),me=this.stack[this.stack.length-1];me.title=ae}function H(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function re(ae){const me=this.resume(),Re=this.stack[this.stack.length-1];Re.label=me,Re.identifier=Un(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function ce(ae){this.data.characterReferenceType=ae.type}function de(ae){const me=this.sliceSerialize(ae),Re=this.data.characterReferenceType;let De;Re?(De=U1(me,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=xh(me);const Pe=this.stack[this.stack.length-1];Pe.value+=De}function pe(ae){const me=this.stack.pop();me.position.end=Vr(ae.end)}function ge(ae){M.call(this,ae);const me=this.stack[this.stack.length-1];me.url=this.sliceSerialize(ae)}function fe(ae){M.call(this,ae);const me=this.stack[this.stack.length-1];me.url="mailto:"+this.sliceSerialize(ae)}function ve(){return{type:"blockquote",children:[]}}function xe(){return{type:"code",lang:null,meta:null,value:""}}function ye(){return{type:"inlineCode",value:""}}function ke(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ne(){return{type:"emphasis",children:[]}}function Ve(){return{type:"heading",depth:0,children:[]}}function et(){return{type:"break"}}function He(){return{type:"html",value:""}}function Ke(){return{type:"image",title:null,url:"",alt:null}}function gt(){return{type:"link",title:null,url:"",children:[]}}function pt(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function _t(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function Zt(){return{type:"paragraph",children:[]}}function Pt(){return{type:"strong",children:[]}}function it(){return{type:"text",value:""}}function wr(){return{type:"thematicBreak"}}}function Vr(e){return{line:e.line,column:e.column,offset:e.offset}}function K1(e,r){let l=-1;for(;++l<r.length;){const a=r[l];Array.isArray(a)?K1(e,a):q4(e,a)}}function q4(e,r){let l;for(l in r)if(Q1.call(r,l))switch(l){case"canContainEols":{const a=r[l];a&&e[l].push(...a);break}case"transforms":{const a=r[l];a&&e[l].push(...a);break}case"enter":case"exit":{const a=r[l];a&&Object.assign(e[l],a);break}}}function Dy(e,r){throw e?new Error("Cannot close `"+e.type+"` ("+Da({start:e.start,end:e.end})+"): a different token (`"+r.type+"`, "+Da({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Da({start:r.start,end:r.end})+") is still open")}function P4(e){const r=this;r.parser=l;function l(a){return U4(a,{...r.data("settings"),...e,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function $4(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 V4(e,r){const l={type:"element",tagName:"br",properties:{},children:[]};return e.patch(r,l),[e.applyData(r,l),{type:"text",value:`
19
+ `}]}function G4(e,r){const l=r.value?r.value+`
20
+ `:"",a={},s=r.lang?r.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let u={type:"element",tagName:"code",properties:a,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 Y4(e,r){const l={type:"element",tagName:"del",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function X4(e,r){const l={type:"element",tagName:"em",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function Z4(e,r){const l=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(r.identifier).toUpperCase(),s=Ti(a.toLowerCase()),u=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=u+1,f+=1,e.footnoteCounts.set(a,f);const p={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,p);const h={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(r,h),e.applyData(r,h)}function Q4(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 K4(e,r){if(e.options.allowDangerousHtml){const l={type:"raw",value:r.value};return e.patch(r,l),e.applyData(r,l)}}function J1(e,r){const l=r.referenceType;let a="]";if(l==="collapsed"?a+="[]":l==="full"&&(a+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+a}];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+=a:s.push({type:"text",value:a}),s}function J4(e,r){const l=String(r.identifier).toUpperCase(),a=e.definitionById.get(l);if(!a)return J1(e,r);const s={src:Ti(a.url||""),alt:r.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const u={type:"element",tagName:"img",properties:s,children:[]};return e.patch(r,u),e.applyData(r,u)}function W4(e,r){const l={src:Ti(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 a={type:"element",tagName:"img",properties:l,children:[]};return e.patch(r,a),e.applyData(r,a)}function eA(e,r){const l={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};e.patch(r,l);const a={type:"element",tagName:"code",properties:{},children:[l]};return e.patch(r,a),e.applyData(r,a)}function tA(e,r){const l=String(r.identifier).toUpperCase(),a=e.definitionById.get(l);if(!a)return J1(e,r);const s={href:Ti(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const u={type:"element",tagName:"a",properties:s,children:e.all(r)};return e.patch(r,u),e.applyData(r,u)}function nA(e,r){const l={href:Ti(r.url)};r.title!==null&&r.title!==void 0&&(l.title=r.title);const a={type:"element",tagName:"a",properties:l,children:e.all(r)};return e.patch(r,a),e.applyData(r,a)}function rA(e,r,l){const a=e.all(r),s=l?lA(l):W1(r),u={},c=[];if(typeof r.checked=="boolean"){const b=a[0];let g;b&&b.type==="element"&&b.tagName==="p"?g=b:(g={type:"element",tagName:"p",properties:{},children:[]},a.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.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<a.length;){const b=a[f];(s||f!==0||b.type!=="element"||b.tagName!=="p")&&c.push({type:"text",value:`
21
+ `}),b.type==="element"&&b.tagName==="p"&&!s?c.push(...b.children):c.push(b)}const p=a[a.length-1];p&&(s||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
22
+ `});const h={type:"element",tagName:"li",properties:u,children:c};return e.patch(r,h),e.applyData(r,h)}function lA(e){let r=!1;if(e.type==="list"){r=e.spread||!1;const l=e.children;let a=-1;for(;!r&&++a<l.length;)r=W1(l[a])}return r}function W1(e){const r=e.spread;return r??e.children.length>1}function iA(e,r){const l={},a=e.all(r);let s=-1;for(typeof r.start=="number"&&r.start!==1&&(l.start=r.start);++s<a.length;){const c=a[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(a,!0)};return e.patch(r,u),e.applyData(r,u)}function aA(e,r){const l={type:"element",tagName:"p",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function oA(e,r){const l={type:"root",children:e.wrap(e.all(r))};return e.patch(r,l),e.applyData(r,l)}function sA(e,r){const l={type:"element",tagName:"strong",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function uA(e,r){const l=e.all(r),a=l.shift(),s=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!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=ph(r.children[1]),p=L1(r.children[r.children.length-1]);f&&p&&(c.position={start:f,end:p}),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 cA(e,r,l){const a=l?l.children:void 0,u=(a?a.indexOf(r):1)===0?"th":"td",c=l&&l.type==="table"?l.align:void 0,f=c?c.length:r.children.length;let p=-1;const h=[];for(;++p<f;){const g=r.children[p],v={},x=c?c[p]:void 0;x&&(v.align=x);let w={type:"element",tagName:u,properties:v,children:[]};g&&(w.children=e.all(g),e.patch(g,w),w=e.applyData(g,w)),h.push(w)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(r,b),e.applyData(r,b)}function fA(e,r){const l={type:"element",tagName:"td",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}const Oy=9,My=32;function dA(e){const r=String(e),l=/\r?\n|\r/g;let a=l.exec(r),s=0;const u=[];for(;a;)u.push(zy(r.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=l.exec(r);return u.push(zy(r.slice(s),s>0,!1)),u.join("")}function zy(e,r,l){let a=0,s=e.length;if(r){let u=e.codePointAt(a);for(;u===Oy||u===My;)a++,u=e.codePointAt(a)}if(l){let u=e.codePointAt(s-1);for(;u===Oy||u===My;)s--,u=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function hA(e,r){const l={type:"text",value:dA(String(r.value))};return e.patch(r,l),e.applyData(r,l)}function pA(e,r){const l={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(r,l),e.applyData(r,l)}const mA={blockquote:$4,break:V4,code:G4,delete:Y4,emphasis:X4,footnoteReference:Z4,heading:Q4,html:K4,imageReference:J4,image:W4,inlineCode:eA,linkReference:tA,link:nA,listItem:rA,list:iA,paragraph:aA,root:oA,strong:sA,table:uA,tableCell:fA,tableRow:cA,text:hA,thematicBreak:pA,toml:xs,yaml:xs,definition:xs,footnoteDefinition:xs};function xs(){}const e0=-1,fu=0,Ma=1,Hs=2,wh=3,Sh=4,kh=5,Eh=6,t0=7,n0=8,By=typeof self=="object"?self:globalThis,gA=(e,r)=>{const l=(s,u)=>(e.set(u,s),s),a=s=>{if(e.has(s))return e.get(s);const[u,c]=r[s];switch(u){case fu:case e0:return l(c,s);case Ma:{const f=l([],s);for(const p of c)f.push(a(p));return f}case Hs:{const f=l({},s);for(const[p,h]of c)f[a(p)]=a(h);return f}case wh:return l(new Date(c),s);case Sh:{const{source:f,flags:p}=c;return l(new RegExp(f,p),s)}case kh:{const f=l(new Map,s);for(const[p,h]of c)f.set(a(p),a(h));return f}case Eh:{const f=l(new Set,s);for(const p of c)f.add(a(p));return f}case t0:{const{name:f,message:p}=c;return l(new By[f](p),s)}case n0: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 By[u](c),s)};return a},Fy=e=>gA(new Map,e)(0),gi="",{toString:bA}={},{keys:yA}=Object,Ta=e=>{const r=typeof e;if(r!=="object"||!e)return[fu,r];const l=bA.call(e).slice(8,-1);switch(l){case"Array":return[Ma,gi];case"Object":return[Hs,gi];case"Date":return[wh,gi];case"RegExp":return[Sh,gi];case"Map":return[kh,gi];case"Set":return[Eh,gi];case"DataView":return[Ma,l]}return l.includes("Array")?[Ma,l]:l.includes("Error")?[t0,l]:[Hs,l]},vs=([e,r])=>e===fu&&(r==="function"||r==="symbol"),xA=(e,r,l,a)=>{const s=(c,f)=>{const p=a.push(c)-1;return l.set(f,p),p},u=c=>{if(l.has(c))return l.get(c);let[f,p]=Ta(c);switch(f){case fu:{let b=c;switch(p){case"bigint":f=n0,b=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);b=null;break;case"undefined":return s([e0],c)}return s([f,b],c)}case Ma:{if(p){let v=c;return p==="DataView"?v=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(v=new Uint8Array(c)),s([p,[...v]],c)}const b=[],g=s([f,b],c);for(const v of c)b.push(u(v));return g}case Hs:{if(p)switch(p){case"BigInt":return s([p,c.toString()],c);case"Boolean":case"Number":case"String":return s([p,c.valueOf()],c)}if(r&&"toJSON"in c)return u(c.toJSON());const b=[],g=s([f,b],c);for(const v of yA(c))(e||!vs(Ta(c[v])))&&b.push([u(v),u(c[v])]);return g}case wh:return s([f,c.toISOString()],c);case Sh:{const{source:b,flags:g}=c;return s([f,{source:b,flags:g}],c)}case kh:{const b=[],g=s([f,b],c);for(const[v,x]of c)(e||!(vs(Ta(v))||vs(Ta(x))))&&b.push([u(v),u(x)]);return g}case Eh:{const b=[],g=s([f,b],c);for(const v of c)(e||!vs(Ta(v)))&&b.push(u(v));return g}}const{message:h}=c;return s([f,{name:p,message:h}],c)};return u},Iy=(e,{json:r,lossy:l}={})=>{const a=[];return xA(!(r||l),!!r,new Map,a)(e),a},qs=typeof structuredClone=="function"?(e,r)=>r&&("json"in r||"lossy"in r)?Fy(Iy(e,r)):structuredClone(e):(e,r)=>Fy(Iy(e,r));function vA(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 wA(e,r){return"Back to reference "+(e+1)+(r>1?"-"+r:"")}function SA(e){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=e.options.footnoteBackContent||vA,a=e.options.footnoteBackLabel||wA,s=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let p=-1;for(;++p<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[p]);if(!h)continue;const b=e.all(h),g=String(h.identifier).toUpperCase(),v=Ti(g.toLowerCase());let x=0;const w=[],k=e.footnoteCounts.get(g);for(;k!==void 0&&++x<=k;){w.length>0&&w.push({type:"text",value:" "});let C=typeof l=="string"?l:l(p,x);typeof C=="string"&&(C={type:"text",value:C}),w.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+v+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(p,x),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const A=b[b.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const C=A.children[A.children.length-1];C&&C.type==="text"?C.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...w)}else b.push(...w);const E={type:"element",tagName:"li",properties:{id:r+"fn-"+v},children:e.wrap(b,!0)};e.patch(h,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:`
23
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
24
+ `}]}}const du=(function(e){if(e==null)return AA;if(typeof e=="function")return hu(e);if(typeof e=="object")return Array.isArray(e)?kA(e):EA(e);if(typeof e=="string")return CA(e);throw new Error("Expected function, string, or object as test")});function kA(e){const r=[];let l=-1;for(;++l<e.length;)r[l]=du(e[l]);return hu(a);function a(...s){let u=-1;for(;++u<r.length;)if(r[u].apply(this,s))return!0;return!1}}function EA(e){const r=e;return hu(l);function l(a){const s=a;let u;for(u in e)if(s[u]!==r[u])return!1;return!0}}function CA(e){return hu(r);function r(l){return l&&l.type===e}}function hu(e){return r;function r(l,a,s){return!!(NA(l)&&e.call(this,l,typeof a=="number"?a:void 0,s||void 0))}}function AA(){return!0}function NA(e){return e!==null&&typeof e=="object"&&"type"in e}const r0=[],TA=!0,qd=!1,jA="skip";function l0(e,r,l,a){let s;typeof r=="function"&&typeof l!="function"?(a=l,l=r):s=r;const u=du(s),c=a?-1:1;f(e,void 0,[])();function f(p,h,b){const g=p&&typeof p=="object"?p:{};if(typeof g.type=="string"){const x=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(p.type+(x?"<"+x+">":""))+")"})}return v;function v(){let x=r0,w,k,A;if((!r||u(p,h,b[b.length-1]||void 0))&&(x=RA(l(p,b)),x[0]===qd))return x;if("children"in p&&p.children){const E=p;if(E.children&&x[0]!==jA)for(k=(a?E.children.length:-1)+c,A=b.concat(E);k>-1&&k<E.children.length;){const C=E.children[k];if(w=f(C,k,A)(),w[0]===qd)return w;k=typeof w[1]=="number"?w[1]:k+c}}return x}}}function RA(e){return Array.isArray(e)?e:typeof e=="number"?[TA,e]:e==null?r0:[e]}function Ch(e,r,l,a){let s,u,c;typeof r=="function"&&typeof l!="function"?(u=void 0,c=r,s=l):(u=r,c=l,s=a),l0(e,u,f,s);function f(p,h){const b=h[h.length-1],g=b?b.children.indexOf(p):void 0;return c(p,g,b)}}const Pd={}.hasOwnProperty,_A={};function LA(e,r){const l=r||_A,a=new Map,s=new Map,u=new Map,c={...mA,...l.handlers},f={all:h,applyData:OA,definitionById:a,footnoteById:s,footnoteCounts:u,footnoteOrder:[],handlers:c,one:p,options:l,patch:DA,wrap:zA};return Ch(e,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const g=b.type==="definition"?a:s,v=String(b.identifier).toUpperCase();g.has(v)||g.set(v,b)}}),f;function p(b,g){const v=b.type,x=f.handlers[v];if(Pd.call(f.handlers,v)&&x)return x(f,b,g);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in b){const{children:k,...A}=b,E=qs(A);return E.children=f.all(b),E}return qs(b)}return(f.options.unknownHandler||MA)(f,b,g)}function h(b){const g=[];if("children"in b){const v=b.children;let x=-1;for(;++x<v.length;){const w=f.one(v[x],b);if(w){if(x&&v[x-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=Uy(w.value)),!Array.isArray(w)&&w.type==="element")){const k=w.children[0];k&&k.type==="text"&&(k.value=Uy(k.value))}Array.isArray(w)?g.push(...w):g.push(w)}}}return g}}function DA(e,r){e.position&&(r.position=wC(e))}function OA(e,r){let l=r;if(e&&e.data){const a=e.data.hName,s=e.data.hChildren,u=e.data.hProperties;if(typeof a=="string")if(l.type==="element")l.tagName=a;else{const c="children"in l?l.children:[l];l={type:"element",tagName:a,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 MA(e,r){const l=r.data||{},a="value"in r&&!(Pd.call(l,"hProperties")||Pd.call(l,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:e.all(r)};return e.patch(r,a),e.applyData(r,a)}function zA(e,r){const l=[];let a=-1;for(r&&l.push({type:"text",value:`
25
+ `});++a<e.length;)a&&l.push({type:"text",value:`
26
+ `}),l.push(e[a]);return r&&e.length>0&&l.push({type:"text",value:`
27
+ `}),l}function Uy(e){let r=0,l=e.charCodeAt(r);for(;l===9||l===32;)r++,l=e.charCodeAt(r);return e.slice(r)}function Hy(e,r){const l=LA(e,r),a=l.one(e,void 0),s=SA(l),u=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&u.children.push({type:"text",value:`
28
+ `},s),u}function BA(e,r){return e&&"run"in e?async function(l,a){const s=Hy(l,{file:a,...r});await e.run(s,a)}:function(l,a){return Hy(l,{file:a,...e||r})}}function qy(e){if(e)throw e}var Zf,Py;function FA(){if(Py)return Zf;Py=1;var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,l=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):r.call(h)==="[object Array]"},u=function(h){if(!h||r.call(h)!=="[object Object]")return!1;var b=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!b&&!g)return!1;var v;for(v in h);return typeof v>"u"||e.call(h,v)},c=function(h,b){l&&b.name==="__proto__"?l(h,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):h[b.name]=b.newValue},f=function(h,b){if(b==="__proto__")if(e.call(h,b)){if(a)return a(h,b).value}else return;return h[b]};return Zf=function p(){var h,b,g,v,x,w,k=arguments[0],A=1,E=arguments.length,C=!1;for(typeof k=="boolean"&&(C=k,k=arguments[1]||{},A=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});A<E;++A)if(h=arguments[A],h!=null)for(b in h)g=f(k,b),v=f(h,b),k!==v&&(C&&v&&(u(v)||(x=s(v)))?(x?(x=!1,w=g&&s(g)?g:[]):w=g&&u(g)?g:{},c(k,{name:b,newValue:p(C,w,v)})):typeof v<"u"&&c(k,{name:b,newValue:v}));return k},Zf}var IA=FA();const Qf=Zs(IA);function $d(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 UA(){const e=[],r={run:l,use:a};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(p,...h){const b=e[++u];let g=-1;if(p){c(p);return}for(;++g<s.length;)(h[g]===null||h[g]===void 0)&&(h[g]=s[g]);s=h,b?HA(b,f)(...h):c(null,...h)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),r}}function HA(e,r){let l;return a;function a(...c){const f=e.length>c.length;let p;f&&c.push(s);try{p=e.apply(this,c)}catch(h){const b=h;if(f&&l)throw b;return s(b)}f||(p&&p.then&&typeof p.then=="function"?p.then(u,s):p instanceof Error?s(p):u(p))}function s(c,...f){l||(l=!0,r(c,...f))}function u(c){s(null,c)}}const Gn={basename:qA,dirname:PA,extname:$A,join:VA,sep:"/"};function qA(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');Qa(e);let l=0,a=-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 a<0&&(u=!0,a=s+1);return a<0?"":e.slice(l,a)}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&&(a=s):(f=-1,a=c));return l===a?a=c:a<0&&(a=e.length),e.slice(l,a)}function PA(e){if(Qa(e),e.length===0)return".";let r=-1,l=e.length,a;for(;--l;)if(e.codePointAt(l)===47){if(a){r=l;break}}else a||(a=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)}function $A(e){Qa(e);let r=e.length,l=-1,a=0,s=-1,u=0,c;for(;r--;){const f=e.codePointAt(r);if(f===47){if(c){a=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===a+1?"":e.slice(s,l)}function VA(...e){let r=-1,l;for(;++r<e.length;)Qa(e[r]),e[r]&&(l=l===void 0?e[r]:l+"/"+e[r]);return l===void 0?".":GA(l)}function GA(e){Qa(e);const r=e.codePointAt(0)===47;let l=YA(e,!r);return l.length===0&&!r&&(l="."),l.length>0&&e.codePointAt(e.length-1)===47&&(l+="/"),r?"/"+l:l}function YA(e,r){let l="",a=0,s=-1,u=0,c=-1,f,p;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||a!==2||l.codePointAt(l.length-1)!==46||l.codePointAt(l.length-2)!==46){if(l.length>2){if(p=l.lastIndexOf("/"),p!==l.length-1){p<0?(l="",a=0):(l=l.slice(0,p),a=l.length-1-l.lastIndexOf("/")),s=c,u=0;continue}}else if(l.length>0){l="",a=0,s=c,u=0;continue}}r&&(l=l.length>0?l+"/..":"..",a=2)}else l.length>0?l+="/"+e.slice(s+1,c):l=e.slice(s+1,c),a=c-s-1;s=c,u=0}else f===46&&u>-1?u++:u=-1}return l}function Qa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const XA={cwd:ZA};function ZA(){return"/"}function Vd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function QA(e){if(typeof e=="string")e=new URL(e);else if(!Vd(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 KA(e)}function KA(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const r=e.pathname;let l=-1;for(;++l<r.length;)if(r.codePointAt(l)===37&&r.codePointAt(l+1)===50){const a=r.codePointAt(l+2);if(a===70||a===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 Kf=["history","path","basename","stem","extname","dirname"];class i0{constructor(r){let l;r?Vd(r)?l={path:r}:typeof r=="string"||JA(r)?l={value:r}:l=r:l={},this.cwd="cwd"in l?"":XA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Kf.length;){const u=Kf[a];u in l&&l[u]!==void 0&&l[u]!==null&&(this[u]=u==="history"?[...l[u]]:l[u])}let s;for(s in l)Kf.includes(s)||(this[s]=l[s])}get basename(){return typeof this.path=="string"?Gn.basename(this.path):void 0}set basename(r){Wf(r,"basename"),Jf(r,"basename"),this.path=Gn.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?Gn.dirname(this.path):void 0}set dirname(r){$y(this.basename,"dirname"),this.path=Gn.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?Gn.extname(this.path):void 0}set extname(r){if(Jf(r,"extname"),$y(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=Gn.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){Vd(r)&&(r=QA(r)),Wf(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?Gn.basename(this.path,this.extname):void 0}set stem(r){Wf(r,"stem"),Jf(r,"stem"),this.path=Gn.join(this.dirname||"",r+(this.extname||""))}fail(r,l,a){const s=this.message(r,l,a);throw s.fatal=!0,s}info(r,l,a){const s=this.message(r,l,a);return s.fatal=void 0,s}message(r,l,a){const s=new qt(r,l,a);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 Jf(e,r){if(e&&e.includes(Gn.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+Gn.sep+"`")}function Wf(e,r){if(!e)throw new Error("`"+r+"` cannot be empty")}function $y(e,r){if(!e)throw new Error("Setting `"+r+"` requires `path` to be set too")}function JA(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const WA=(function(e){const a=this.constructor.prototype,s=a[e],u=function(){return s.apply(u,arguments)};return Object.setPrototypeOf(u,a),u}),eN={}.hasOwnProperty;class Ah extends WA{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=UA()}copy(){const r=new Ah;let l=-1;for(;++l<this.attachers.length;){const a=this.attachers[l];r.use(...a)}return r.data(Qf(!0,{},this.namespace)),r}data(r,l){return typeof r=="string"?arguments.length===2?(nd("data",this.frozen),this.namespace[r]=l,this):eN.call(this.namespace,r)&&this.namespace[r]||void 0:r?(nd("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,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=l.call(r,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const l=ws(r),a=this.parser||this.Parser;return ed("parse",a),a(String(l),l)}process(r,l){const a=this;return this.freeze(),ed("process",this.parser||this.Parser),td("process",this.compiler||this.Compiler),l?s(void 0,l):new Promise(s);function s(u,c){const f=ws(r),p=a.parse(f);a.run(p,f,function(b,g,v){if(b||!g||!v)return h(b);const x=g,w=a.stringify(x,v);rN(w)?v.value=w:v.result=w,h(b,v)});function h(b,g){b||!g?c(b):u?u(g):l(void 0,g)}}}processSync(r){let l=!1,a;return this.freeze(),ed("processSync",this.parser||this.Parser),td("processSync",this.compiler||this.Compiler),this.process(r,s),Gy("processSync","process",l),a;function s(u,c){l=!0,qy(u),a=c}}run(r,l,a){Vy(r),this.freeze();const s=this.transformers;return!a&&typeof l=="function"&&(a=l,l=void 0),a?u(void 0,a):new Promise(u);function u(c,f){const p=ws(l);s.run(r,p,h);function h(b,g,v){const x=g||r;b?f(b):c?c(x):a(void 0,x,v)}}}runSync(r,l){let a=!1,s;return this.run(r,l,u),Gy("runSync","run",a),s;function u(c,f){qy(c),s=f,a=!0}}stringify(r,l){this.freeze();const a=ws(l),s=this.compiler||this.Compiler;return td("stringify",s),Vy(r),s(r,a)}use(r,...l){const a=this.attachers,s=this.namespace;if(nd("use",this.frozen),r!=null)if(typeof r=="function")p(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(h){if(typeof h=="function")p(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[b,...g]=h;p(b,g)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))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(h.plugins),h.settings&&(s.settings=Qf(!0,s.settings,h.settings))}function f(h){let b=-1;if(h!=null)if(Array.isArray(h))for(;++b<h.length;){const g=h[b];u(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function p(h,b){let g=-1,v=-1;for(;++g<a.length;)if(a[g][0]===h){v=g;break}if(v===-1)a.push([h,...b]);else if(b.length>0){let[x,...w]=b;const k=a[v][1];$d(k)&&$d(x)&&(x=Qf(!0,k,x)),a[v]=[h,x,...w]}}}}const tN=new Ah().freeze();function ed(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function td(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function nd(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 Vy(e){if(!$d(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Gy(e,r,l){if(!l)throw new Error("`"+e+"` finished async. Use `"+r+"` instead")}function ws(e){return nN(e)?e:new i0(e)}function nN(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function rN(e){return typeof e=="string"||lN(e)}function lN(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const iN="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Yy=[],Xy={allowDangerousHtml:!0},aN=/^(https?|ircs?|mailto|xmpp)$/i,oN=[{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 Nh(e){const r=sN(e),l=uN(e);return cN(r.runSync(r.parse(l),l),e)}function sN(e){const r=e.rehypePlugins||Yy,l=e.remarkPlugins||Yy,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Xy}:Xy;return tN().use(P4).use(l).use(BA,a).use(r)}function uN(e){const r=e.children||"",l=new i0;return typeof r=="string"&&(l.value=r),l}function cN(e,r){const l=r.allowedElements,a=r.allowElement,s=r.components,u=r.disallowedElements,c=r.skipHtml,f=r.unwrapDisallowed,p=r.urlTransform||fN;for(const b of oN)Object.hasOwn(r,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+iN+b.id,void 0);return Ch(e,h),AC(e,{Fragment:y.Fragment,components:s,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function h(b,g,v){if(b.type==="raw"&&v&&typeof g=="number")return c?v.children.splice(g,1):v.children[g]={type:"text",value:b.value},g;if(b.type==="element"){let x;for(x in Gf)if(Object.hasOwn(Gf,x)&&Object.hasOwn(b.properties,x)){const w=b.properties[x],k=Gf[x];(k===null||k.includes(b.tagName))&&(b.properties[x]=p(String(w||""),x,b))}}if(b.type==="element"){let x=l?!l.includes(b.tagName):u?u.includes(b.tagName):!1;if(!x&&a&&typeof g=="number"&&(x=!a(b,g,v)),x&&v&&typeof g=="number")return f&&b.children?v.children.splice(g,1,...b.children):v.children.splice(g,1),g}}}function fN(e){const r=e.indexOf(":"),l=e.indexOf("?"),a=e.indexOf("#"),s=e.indexOf("/");return r===-1||s!==-1&&r>s||l!==-1&&r>l||a!==-1&&r>a||aN.test(e.slice(0,r))?e:""}function Zy(e,r){const l=String(e);if(typeof r!="string")throw new TypeError("Expected character");let a=0,s=l.indexOf(r);for(;s!==-1;)a++,s=l.indexOf(r,s+r.length);return a}function dN(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function hN(e,r,l){const s=du((l||{}).ignore||[]),u=pN(r);let c=-1;for(;++c<u.length;)l0(e,"text",f);function f(h,b){let g=-1,v;for(;++g<b.length;){const x=b[g],w=v?v.children:void 0;if(s(x,w?w.indexOf(x):void 0,v))return;v=x}if(v)return p(h,b)}function p(h,b){const g=b[b.length-1],v=u[c][0],x=u[c][1];let w=0;const A=g.children.indexOf(h);let E=!1,C=[];v.lastIndex=0;let T=v.exec(h.value);for(;T;){const B=T.index,q={index:T.index,input:T.input,stack:[...b,h]};let D=x(...T,q);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?v.lastIndex=B+1:(w!==B&&C.push({type:"text",value:h.value.slice(w,B)}),Array.isArray(D)?C.push(...D):D&&C.push(D),w=B+T[0].length,E=!0),!v.global)break;T=v.exec(h.value)}return E?(w<h.value.length&&C.push({type:"text",value:h.value.slice(w)}),g.children.splice(A,1,...C)):C=[h],A+C.length}}function pN(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 a=-1;for(;++a<l.length;){const s=l[a];r.push([mN(s[0]),gN(s[1])])}return r}function mN(e){return typeof e=="string"?new RegExp(dN(e),"g"):e}function gN(e){return typeof e=="function"?e:function(){return e}}const rd="phrasing",ld=["autolink","link","image","label"];function bN(){return{transforms:[EN],enter:{literalAutolink:xN,literalAutolinkEmail:id,literalAutolinkHttp:id,literalAutolinkWww:id},exit:{literalAutolink:kN,literalAutolinkEmail:SN,literalAutolinkHttp:vN,literalAutolinkWww:wN}}}function yN(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:rd,notInConstruct:ld},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:rd,notInConstruct:ld},{character:":",before:"[ps]",after:"\\/",inConstruct:rd,notInConstruct:ld}]}}function xN(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function id(e){this.config.enter.autolinkProtocol.call(this,e)}function vN(e){this.config.exit.autolinkProtocol.call(this,e)}function wN(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 SN(e){this.config.exit.autolinkEmail.call(this,e)}function kN(e){this.exit(e)}function EN(e){hN(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,CN],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),AN]],{ignore:["link","linkReference"]})}function CN(e,r,l,a,s){let u="";if(!a0(s)||(/^w/i.test(r)&&(l=r+l,r="",u="http://"),!NN(l)))return!1;const c=TN(l+a);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 AN(e,r,l,a){return!a0(a,!0)||/[-\d_]$/.test(l)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+l,children:[{type:"text",value:r+"@"+l}]}}function NN(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 TN(e){const r=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!r)return[e,void 0];e=e.slice(0,r.index);let l=r[0],a=l.indexOf(")");const s=Zy(e,"(");let u=Zy(e,")");for(;a!==-1&&s>u;)e+=l.slice(0,a+1),l=l.slice(a+1),a=l.indexOf(")"),u++;return[e,l]}function a0(e,r){const l=e.input.charCodeAt(e.index-1);return(e.index===0||Al(l)||uu(l))&&(!r||l!==47)}o0.peek=BN;function jN(){this.buffer()}function RN(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function _N(){this.buffer()}function LN(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function DN(e){const r=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=Un(this.sliceSerialize(e)).toLowerCase(),l.label=r}function ON(e){this.exit(e)}function MN(e){const r=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=Un(this.sliceSerialize(e)).toLowerCase(),l.label=r}function zN(e){this.exit(e)}function BN(){return"["}function o0(e,r,l,a){const s=l.createTracker(a);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 FN(){return{enter:{gfmFootnoteCallString:jN,gfmFootnoteCall:RN,gfmFootnoteDefinitionLabelString:_N,gfmFootnoteDefinition:LN},exit:{gfmFootnoteCallString:DN,gfmFootnoteCall:ON,gfmFootnoteDefinitionLabelString:MN,gfmFootnoteDefinition:zN}}}function IN(e){let r=!1;return e&&e.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:l,footnoteReference:o0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(a,s,u,c){const f=u.createTracker(c);let p=f.move("[^");const h=u.enter("footnoteDefinition"),b=u.enter("label");return p+=f.move(u.safe(u.associationId(a),{before:p,after:"]"})),b(),p+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),p+=f.move((r?`
29
+ `:" ")+u.indentLines(u.containerFlow(a,f.current()),r?s0:UN))),h(),p}}function UN(e,r,l){return r===0?e:s0(e,r,l)}function s0(e,r,l){return(l?"":" ")+e}const HN=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];u0.peek=GN;function qN(){return{canContainEols:["delete"],enter:{strikethrough:$N},exit:{strikethrough:VN}}}function PN(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:HN}],handlers:{delete:u0}}}function $N(e){this.enter({type:"delete",children:[]},e)}function VN(e){this.exit(e)}function u0(e,r,l,a){const s=l.createTracker(a),u=l.enter("strikethrough");let c=s.move("~~");return c+=l.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),u(),c}function GN(){return"~"}function YN(e){return e.length}function XN(e,r){const l=r||{},a=(l.align||[]).concat(),s=l.stringLength||YN,u=[],c=[],f=[],p=[];let h=0,b=-1;for(;++b<e.length;){const k=[],A=[];let E=-1;for(e[b].length>h&&(h=e[b].length);++E<e[b].length;){const C=ZN(e[b][E]);if(l.alignDelimiters!==!1){const T=s(C);A[E]=T,(p[E]===void 0||T>p[E])&&(p[E]=T)}k.push(C)}c[b]=k,f[b]=A}let g=-1;if(typeof a=="object"&&"length"in a)for(;++g<h;)u[g]=Qy(a[g]);else{const k=Qy(a);for(;++g<h;)u[g]=k}g=-1;const v=[],x=[];for(;++g<h;){const k=u[g];let A="",E="";k===99?(A=":",E=":"):k===108?A=":":k===114&&(E=":");let C=l.alignDelimiters===!1?1:Math.max(1,p[g]-A.length-E.length);const T=A+"-".repeat(C)+E;l.alignDelimiters!==!1&&(C=A.length+C+E.length,C>p[g]&&(p[g]=C),x[g]=C),v[g]=T}c.splice(1,0,v),f.splice(1,0,x),b=-1;const w=[];for(;++b<c.length;){const k=c[b],A=f[b];g=-1;const E=[];for(;++g<h;){const C=k[g]||"";let T="",B="";if(l.alignDelimiters!==!1){const q=p[g]-(A[g]||0),D=u[g];D===114?T=" ".repeat(q):D===99?q%2?(T=" ".repeat(q/2+.5),B=" ".repeat(q/2-.5)):(T=" ".repeat(q/2),B=T):B=" ".repeat(q)}l.delimiterStart!==!1&&!g&&E.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&C==="")&&(l.delimiterStart!==!1||g)&&E.push(" "),l.alignDelimiters!==!1&&E.push(T),E.push(C),l.alignDelimiters!==!1&&E.push(B),l.padding!==!1&&E.push(" "),(l.delimiterEnd!==!1||g!==h-1)&&E.push("|")}w.push(l.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return w.join(`
30
+ `)}function ZN(e){return e==null?"":String(e)}function Qy(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 QN(e,r,l,a){const s=l.enter("blockquote"),u=l.createTracker(a);u.move("> "),u.shift(2);const c=l.indentLines(l.containerFlow(e,u.current()),KN);return s(),c}function KN(e,r,l){return">"+(l?"":" ")+e}function JN(e,r){return Ky(e,r.inConstruct,!0)&&!Ky(e,r.notInConstruct,!1)}function Ky(e,r,l){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return l;let a=-1;for(;++a<r.length;)if(e.includes(r[a]))return!0;return!1}function Jy(e,r,l,a){let s=-1;for(;++s<l.unsafe.length;)if(l.unsafe[s].character===`
31
+ `&&JN(l.stack,l.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
32
+ `}function WN(e,r){const l=String(e);let a=l.indexOf(r),s=a,u=0,c=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++u>c&&(c=u):u=1,s=a+r.length,a=l.indexOf(r,s);return c}function eT(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 tT(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 nT(e,r,l,a){const s=tT(l),u=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(eT(e,l)){const g=l.enter("codeIndented"),v=l.indentLines(u,rT);return g(),v}const f=l.createTracker(a),p=s.repeat(Math.max(WN(u,s)+1,3)),h=l.enter("codeFenced");let b=f.move(p);if(e.lang){const g=l.enter(`codeFencedLang${c}`);b+=f.move(l.safe(e.lang,{before:b,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=l.enter(`codeFencedMeta${c}`);b+=f.move(" "),b+=f.move(l.safe(e.meta,{before:b,after:`
33
+ `,encode:["`"],...f.current()})),g()}return b+=f.move(`
34
+ `),u&&(b+=f.move(u+`
35
+ `)),b+=f.move(p),h(),b}function rT(e,r,l){return(l?"":" ")+e}function Th(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 lT(e,r,l,a){const s=Th(l),u=s==='"'?"Quote":"Apostrophe",c=l.enter("definition");let f=l.enter("label");const p=l.createTracker(a);let h=p.move("[");return h+=p.move(l.safe(l.associationId(e),{before:h,after:"]",...p.current()})),h+=p.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=l.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(l.safe(e.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(f=l.enter("destinationRaw"),h+=p.move(l.safe(e.url,{before:h,after:e.title?" ":`
36
+ `,...p.current()}))),f(),e.title&&(f=l.enter(`title${u}`),h+=p.move(" "+s),h+=p.move(l.safe(e.title,{before:h,after:s,...p.current()})),h+=p.move(s),f()),c(),h}function iT(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 Ha(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ps(e,r,l){const a=Ci(e),s=Ci(r);return a===void 0?s===void 0?l==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===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}}c0.peek=aT;function c0(e,r,l,a){const s=iT(l),u=l.enter("emphasis"),c=l.createTracker(a),f=c.move(s);let p=c.move(l.containerPhrasing(e,{after:s,before:f,...c.current()}));const h=p.charCodeAt(0),b=Ps(a.before.charCodeAt(a.before.length-1),h,s);b.inside&&(p=Ha(h)+p.slice(1));const g=p.charCodeAt(p.length-1),v=Ps(a.after.charCodeAt(0),g,s);v.inside&&(p=p.slice(0,-1)+Ha(g));const x=c.move(s);return u(),l.attentionEncodeSurroundingInfo={after:v.outside,before:b.outside},f+p+x}function aT(e,r,l){return l.options.emphasis||"*"}function oT(e,r){let l=!1;return Ch(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return l=!0,qd}),!!((!e.depth||e.depth<3)&&yh(e)&&(r.options.setext||l))}function sT(e,r,l,a){const s=Math.max(Math.min(6,e.depth||1),1),u=l.createTracker(a);if(oT(e,l)){const b=l.enter("headingSetext"),g=l.enter("phrasing"),v=l.containerPhrasing(e,{...u.current(),before:`
37
+ `,after:`
38
+ `});return g(),b(),v+`
39
+ `+(s===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
40
+ `))+1))}const c="#".repeat(s),f=l.enter("headingAtx"),p=l.enter("phrasing");u.move(c+" ");let h=l.containerPhrasing(e,{before:"# ",after:`
41
+ `,...u.current()});return/^[\t ]/.test(h)&&(h=Ha(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,l.options.closeAtx&&(h+=" "+c),p(),f(),h}f0.peek=uT;function f0(e){return e.value||""}function uT(){return"<"}d0.peek=cT;function d0(e,r,l,a){const s=Th(l),u=s==='"'?"Quote":"Apostrophe",c=l.enter("image");let f=l.enter("label");const p=l.createTracker(a);let h=p.move("![");return h+=p.move(l.safe(e.alt,{before:h,after:"]",...p.current()})),h+=p.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=l.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(l.safe(e.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(f=l.enter("destinationRaw"),h+=p.move(l.safe(e.url,{before:h,after:e.title?" ":")",...p.current()}))),f(),e.title&&(f=l.enter(`title${u}`),h+=p.move(" "+s),h+=p.move(l.safe(e.title,{before:h,after:s,...p.current()})),h+=p.move(s),f()),h+=p.move(")"),c(),h}function cT(){return"!"}h0.peek=fT;function h0(e,r,l,a){const s=e.referenceType,u=l.enter("imageReference");let c=l.enter("label");const f=l.createTracker(a);let p=f.move("![");const h=l.safe(e.alt,{before:p,after:"]",...f.current()});p+=f.move(h+"]["),c();const b=l.stack;l.stack=[],c=l.enter("reference");const g=l.safe(l.associationId(e),{before:p,after:"]",...f.current()});return c(),l.stack=b,u(),s==="full"||!h||h!==g?p+=f.move(g+"]"):s==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function fT(){return"!"}p0.peek=dT;function p0(e,r,l){let a=e.value||"",s="`",u=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++u<l.unsafe.length;){const c=l.unsafe[u],f=l.compilePattern(c);let p;if(c.atBreak)for(;p=f.exec(a);){let h=p.index;a.charCodeAt(h)===10&&a.charCodeAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(p.index+1)}}return s+a+s}function dT(){return"`"}function m0(e,r){const l=yh(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))}g0.peek=hT;function g0(e,r,l,a){const s=Th(l),u=s==='"'?"Quote":"Apostrophe",c=l.createTracker(a);let f,p;if(m0(e,l)){const b=l.stack;l.stack=[],f=l.enter("autolink");let g=c.move("<");return g+=c.move(l.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),f(),l.stack=b,g}f=l.enter("link"),p=l.enter("label");let h=c.move("[");return h+=c.move(l.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),p(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(p=l.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(l.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(p=l.enter("destinationRaw"),h+=c.move(l.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),p(),e.title&&(p=l.enter(`title${u}`),h+=c.move(" "+s),h+=c.move(l.safe(e.title,{before:h,after:s,...c.current()})),h+=c.move(s),p()),h+=c.move(")"),f(),h}function hT(e,r,l){return m0(e,l)?"<":"["}b0.peek=pT;function b0(e,r,l,a){const s=e.referenceType,u=l.enter("linkReference");let c=l.enter("label");const f=l.createTracker(a);let p=f.move("[");const h=l.containerPhrasing(e,{before:p,after:"]",...f.current()});p+=f.move(h+"]["),c();const b=l.stack;l.stack=[],c=l.enter("reference");const g=l.safe(l.associationId(e),{before:p,after:"]",...f.current()});return c(),l.stack=b,u(),s==="full"||!h||h!==g?p+=f.move(g+"]"):s==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function pT(){return"["}function jh(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 mT(e){const r=jh(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 gT(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 y0(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 bT(e,r,l,a){const s=l.enter("list"),u=l.bulletCurrent;let c=e.ordered?gT(l):jh(l);const f=e.ordered?c==="."?")":".":mT(l);let p=r&&l.bulletLastUsed?c===l.bulletLastUsed:!1;if(!e.ordered){const b=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&b&&(!b.children||!b.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&&(p=!0),y0(l)===c&&b){let g=-1;for(;++g<e.children.length;){const v=e.children[g];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(c=f),l.bulletCurrent=c;const h=l.containerFlow(e,a);return l.bulletLastUsed=c,l.bulletCurrent=u,s(),h}function yT(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 xT(e,r,l,a){const s=yT(l);let u=l.bulletCurrent||jh(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(a);f.move(u+" ".repeat(c-u.length)),f.shift(c);const p=l.enter("listItem"),h=l.indentLines(l.containerFlow(e,f.current()),b);return p(),h;function b(g,v,x){return v?(x?"":" ".repeat(c))+g:(x?u:u+" ".repeat(c-u.length))+g}}function vT(e,r,l,a){const s=l.enter("paragraph"),u=l.enter("phrasing"),c=l.containerPhrasing(e,a);return u(),s(),c}const wT=du(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ST(e,r,l,a){return(e.children.some(function(c){return wT(c)})?l.containerPhrasing:l.containerFlow).call(l,e,a)}function kT(e){const r=e.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}x0.peek=ET;function x0(e,r,l,a){const s=kT(l),u=l.enter("strong"),c=l.createTracker(a),f=c.move(s+s);let p=c.move(l.containerPhrasing(e,{after:s,before:f,...c.current()}));const h=p.charCodeAt(0),b=Ps(a.before.charCodeAt(a.before.length-1),h,s);b.inside&&(p=Ha(h)+p.slice(1));const g=p.charCodeAt(p.length-1),v=Ps(a.after.charCodeAt(0),g,s);v.inside&&(p=p.slice(0,-1)+Ha(g));const x=c.move(s+s);return u(),l.attentionEncodeSurroundingInfo={after:v.outside,before:b.outside},f+p+x}function ET(e,r,l){return l.options.strong||"*"}function CT(e,r,l,a){return l.safe(e.value,a)}function AT(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 NT(e,r,l){const a=(y0(l)+(l.options.ruleSpaces?" ":"")).repeat(AT(l));return l.options.ruleSpaces?a.slice(0,-1):a}const v0={blockquote:QN,break:Jy,code:nT,definition:lT,emphasis:c0,hardBreak:Jy,heading:sT,html:f0,image:d0,imageReference:h0,inlineCode:p0,link:g0,linkReference:b0,list:bT,listItem:xT,paragraph:vT,root:ST,strong:x0,text:CT,thematicBreak:NT};function TT(){return{enter:{table:jT,tableData:Wy,tableHeader:Wy,tableRow:_T},exit:{codeText:LT,table:RT,tableData:ad,tableHeader:ad,tableRow:ad}}}function jT(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 RT(e){this.exit(e),this.data.inTable=void 0}function _T(e){this.enter({type:"tableRow",children:[]},e)}function ad(e){this.exit(e)}function Wy(e){this.enter({type:"tableCell",children:[]},e)}function LT(e){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,DT));const l=this.stack[this.stack.length-1];l.type,l.value=r,this.exit(e)}function DT(e,r){return r==="|"?r:e}function OT(e){const r=e||{},l=r.tableCellPadding,a=r.tablePipeAlign,s=r.stringLength,u=l?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
42
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:c,tableCell:p,tableRow:f}};function c(x,w,k,A){return h(b(x,k,A),x.align)}function f(x,w,k,A){const E=g(x,k,A),C=h([E]);return C.slice(0,C.indexOf(`
43
+ `))}function p(x,w,k,A){const E=k.enter("tableCell"),C=k.enter("phrasing"),T=k.containerPhrasing(x,{...A,before:u,after:u});return C(),E(),T}function h(x,w){return XN(x,{align:w,alignDelimiters:a,padding:l,stringLength:s})}function b(x,w,k){const A=x.children;let E=-1;const C=[],T=w.enter("table");for(;++E<A.length;)C[E]=g(A[E],w,k);return T(),C}function g(x,w,k){const A=x.children;let E=-1;const C=[],T=w.enter("tableRow");for(;++E<A.length;)C[E]=p(A[E],x,w,k);return T(),C}function v(x,w,k){let A=v0.inlineCode(x,w,k);return k.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function MT(){return{exit:{taskListCheckValueChecked:ex,taskListCheckValueUnchecked:ex,paragraph:BT}}}function zT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:FT}}}function ex(e){const r=this.stack[this.stack.length-2];r.type,r.checked=e.type==="taskListCheckValueChecked"}function BT(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 a=l.children[0];if(a&&a.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&&(a.value=a.value.slice(1),a.value.length===0?l.children.shift():l.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,l.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function FT(e,r,l,a){const s=e.children[0],u=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=l.createTracker(a);u&&f.move(c);let p=v0.listItem(e,r,l,{...a,...f.current()});return u&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),p;function h(b){return b+c}}function IT(){return[bN(),FN(),qN(),TT(),MT()]}function UT(e){return{extensions:[yN(),IN(e),PN(),OT(e),zT()]}}const HT={tokenize:YT,partial:!0},w0={tokenize:XT,partial:!0},S0={tokenize:ZT,partial:!0},k0={tokenize:QT,partial:!0},qT={tokenize:KT,partial:!0},E0={name:"wwwAutolink",tokenize:VT,previous:A0},C0={name:"protocolAutolink",tokenize:GT,previous:N0},vr={name:"emailAutolink",tokenize:$T,previous:T0},Qn={};function PT(){return{text:Qn}}let vl=48;for(;vl<123;)Qn[vl]=vr,vl++,vl===58?vl=65:vl===91&&(vl=97);Qn[43]=vr;Qn[45]=vr;Qn[46]=vr;Qn[95]=vr;Qn[72]=[vr,C0];Qn[104]=[vr,C0];Qn[87]=[vr,E0];Qn[119]=[vr,E0];function $T(e,r,l){const a=this;let s,u;return c;function c(g){return!Gd(g)||!T0.call(a,a.previous)||Rh(a.events)?l(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return Gd(g)?(e.consume(g),f):g===64?(e.consume(g),p):l(g)}function p(g){return g===46?e.check(qT,b,h)(g):g===45||g===95||Ht(g)?(u=!0,e.consume(g),p):b(g)}function h(g){return e.consume(g),s=!0,p}function b(g){return u&&s&&Yt(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),r(g)):l(g)}}function VT(e,r,l){const a=this;return s;function s(c){return c!==87&&c!==119||!A0.call(a,a.previous)||Rh(a.events)?l(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(HT,e.attempt(w0,e.attempt(S0,u),l),l)(c))}function u(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),r(c)}}function GT(e,r,l){const a=this;let s="",u=!1;return c;function c(g){return(g===72||g===104)&&N0.call(a,a.previous)&&!Rh(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),f):l(g)}function f(g){if(Yt(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const v=s.toLowerCase();if(v==="http"||v==="https")return e.consume(g),p}return l(g)}function p(g){return g===47?(e.consume(g),u?h:(u=!0,p)):l(g)}function h(g){return g===null||Us(g)||st(g)||Al(g)||uu(g)?l(g):e.attempt(w0,e.attempt(S0,b),l)(g)}function b(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),r(g)}}function YT(e,r,l){let a=0;return s;function s(c){return(c===87||c===119)&&a<3?(a++,e.consume(c),s):c===46&&a===3?(e.consume(c),u):l(c)}function u(c){return c===null?l(c):r(c)}}function XT(e,r,l){let a,s,u;return c;function c(h){return h===46||h===95?e.check(k0,p,f)(h):h===null||st(h)||Al(h)||h!==45&&uu(h)?p(h):(u=!0,e.consume(h),c)}function f(h){return h===95?a=!0:(s=a,a=void 0),e.consume(h),c}function p(h){return s||a||!u?l(h):r(h)}}function ZT(e,r){let l=0,a=0;return s;function s(c){return c===40?(l++,e.consume(c),s):c===41&&a<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(k0,r,u)(c):c===null||st(c)||Al(c)?r(c):(e.consume(c),s)}function u(c){return c===41&&a++,e.consume(c),s}}function QT(e,r,l){return a;function a(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),a):f===38?(e.consume(f),u):f===93?(e.consume(f),s):f===60||f===null||st(f)||Al(f)?r(f):l(f)}function s(f){return f===null||f===40||f===91||st(f)||Al(f)?r(f):a(f)}function u(f){return Yt(f)?c(f):l(f)}function c(f){return f===59?(e.consume(f),a):Yt(f)?(e.consume(f),c):l(f)}}function KT(e,r,l){return a;function a(u){return e.consume(u),s}function s(u){return Ht(u)?l(u):r(u)}}function A0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function N0(e){return!Yt(e)}function T0(e){return!(e===47||Gd(e))}function Gd(e){return e===43||e===45||e===46||e===95||Ht(e)}function Rh(e){let r=e.length,l=!1;for(;r--;){const a=e[r][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){l=!0;break}if(a._gfmAutolinkLiteralWalkedInto){l=!1;break}}return e.length>0&&!l&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),l}const JT={tokenize:a6,partial:!0};function WT(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:r6,continuation:{tokenize:l6},exit:i6}},text:{91:{name:"gfmFootnoteCall",tokenize:n6},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:e6,resolveTo:t6}}}}function e6(e,r,l){const a=this;let s=a.events.length;const u=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const p=a.events[s][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return f;function f(p){if(!c||!c._balanced)return l(p);const h=Un(a.sliceSerialize({start:c.end,end:a.now()}));return h.codePointAt(0)!==94||!u.includes(h.slice(1))?l(p):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),r(p))}}function t6(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 a={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",a,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",a,r]];return e.splice(l,e.length-l+1,...f),e}function n6(e,r,l){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let u=0,c;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),p}function p(g){return g!==94?l(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(u>999||g===93&&!c||g===null||g===91||st(g))return l(g);if(g===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return s.includes(Un(a.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),r):l(g)}return st(g)||(c=!0),u++,e.consume(g),g===92?b:h}function b(g){return g===91||g===92||g===93?(e.consume(g),u++,h):h(g)}}function r6(e,r,l){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let u,c=0,f;return p;function p(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",b):l(w)}function b(w){if(c>999||w===93&&!f||w===null||w===91||st(w))return l(w);if(w===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return u=Un(a.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return st(w)||(f=!0),c++,e.consume(w),w===92?g:b}function g(w){return w===91||w===92||w===93?(e.consume(w),c++,b):b(w)}function v(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),s.includes(u)||s.push(u),$e(e,x,"gfmFootnoteDefinitionWhitespace")):l(w)}function x(w){return r(w)}}function l6(e,r,l){return e.check(Za,r,e.attempt(JT,r,l))}function i6(e){e.exit("gfmFootnoteDefinition")}function a6(e,r,l){const a=this;return $e(e,s,"gfmFootnoteDefinitionIndent",5);function s(u){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?r(u):l(u)}}function o6(e){let l=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:u,resolveAll:s};return l==null&&(l=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(c,f){let p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let h=p;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[p][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[p][1].end)},g={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[p][1].start)},v=[["enter",b,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",g,f]],x=f.parser.constructs.insideSpan.null;x&&wn(v,v.length,0,cu(x,c.slice(h+1,p),f)),wn(v,v.length,0,[["exit",g,f],["enter",c[p][1],f],["exit",c[p][1],f],["exit",b,f]]),wn(c,h-1,p-h+3,v),p=h+v.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function u(c,f,p){const h=this.previous,b=this.events;let g=0;return v;function v(w){return h===126&&b[b.length-1][1].type!=="characterEscape"?p(w):(c.enter("strikethroughSequenceTemporary"),x(w))}function x(w){const k=Ci(h);if(w===126)return g>1?p(w):(c.consume(w),g++,x);if(g<2&&!l)return p(w);const A=c.exit("strikethroughSequenceTemporary"),E=Ci(w);return A._open=!E||E===2&&!!k,A._close=!k||k===2&&!!E,f(w)}}}class s6{constructor(){this.map=[]}add(r,l,a){u6(this,r,l,a)}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 a=[];for(;l>0;)l-=1,a.push(r.slice(this.map[l][0]+this.map[l][1]),this.map[l][2]),r.length=this.map[l][0];a.push(r.slice()),r.length=0;let s=a.pop();for(;s;){for(const u of s)r.push(u);s=a.pop()}this.map.length=0}}function u6(e,r,l,a){let s=0;if(!(l===0&&a.length===0)){for(;s<e.map.length;){if(e.map[s][0]===r){e.map[s][1]+=l,e.map[s][2].push(...a);return}s+=1}e.map.push([r,l,a])}}function c6(e,r){let l=!1;const a=[];for(;r<e.length;){const s=e[r];if(l){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(e[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[r-1][1].type==="tableDelimiterMarker"){const u=a.length-1;a[u]=a[u]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(l=!0);r+=1}return a}function f6(){return{flow:{null:{name:"table",tokenize:d6,resolveAll:h6}}}}function d6(e,r,l){const a=this;let s=0,u=0,c;return f;function f(M){let $=a.events.length-1;for(;$>-1;){const I=a.events[$][1].type;if(I==="lineEnding"||I==="linePrefix")$--;else break}const Y=$>-1?a.events[$][1].type:null,J=Y==="tableHead"||Y==="tableRow"?D:p;return J===D&&a.parser.lazy[a.now().line]?l(M):J(M)}function p(M){return e.enter("tableHead"),e.enter("tableRow"),h(M)}function h(M){return M===124||(c=!0,u+=1),b(M)}function b(M){return M===null?l(M):Te(M)?u>1?(u=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),x):l(M):Fe(M)?$e(e,b,"whitespace")(M):(u+=1,c&&(c=!1,s+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),c=!0,b):(e.enter("data"),g(M)))}function g(M){return M===null||M===124||st(M)?(e.exit("data"),b(M)):(e.consume(M),M===92?v:g)}function v(M){return M===92||M===124?(e.consume(M),g):g(M)}function x(M){return a.interrupt=!1,a.parser.lazy[a.now().line]?l(M):(e.enter("tableDelimiterRow"),c=!1,Fe(M)?$e(e,w,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):w(M))}function w(M){return M===45||M===58?A(M):M===124?(c=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),k):q(M)}function k(M){return Fe(M)?$e(e,A,"whitespace")(M):A(M)}function A(M){return M===58?(u+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),E):M===45?(u+=1,E(M)):M===null||Te(M)?B(M):q(M)}function E(M){return M===45?(e.enter("tableDelimiterFiller"),C(M)):q(M)}function C(M){return M===45?(e.consume(M),C):M===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(M))}function T(M){return Fe(M)?$e(e,B,"whitespace")(M):B(M)}function B(M){return M===124?w(M):M===null||Te(M)?!c||s!==u?q(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),r(M)):q(M)}function q(M){return l(M)}function D(M){return e.enter("tableRow"),U(M)}function U(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),U):M===null||Te(M)?(e.exit("tableRow"),r(M)):Fe(M)?$e(e,U,"whitespace")(M):(e.enter("data"),V(M))}function V(M){return M===null||M===124||st(M)?(e.exit("data"),U(M)):(e.consume(M),M===92?G:V)}function G(M){return M===92||M===124?(e.consume(M),V):V(M)}}function h6(e,r){let l=-1,a=!0,s=0,u=[0,0,0,0],c=[0,0,0,0],f=!1,p=0,h,b,g;const v=new s6;for(;++l<e.length;){const x=e[l],w=x[1];x[0]==="enter"?w.type==="tableHead"?(f=!1,p!==0&&(tx(v,r,p,h,b),b=void 0,p=0),h={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},v.add(l,0,[["enter",h,r]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(a=!0,g=void 0,u=[0,0,0,0],c=[0,l+1,0,0],f&&(f=!1,b={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},v.add(l,0,[["enter",b,r]])),s=w.type==="tableDelimiterRow"?2:b?3:1):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],g=Ss(v,r,u,s,void 0,g),u=[0,0,0,0]),c[2]=l)):w.type==="tableCellDivider"&&(a?a=!1:(u[1]!==0&&(c[0]=c[1],g=Ss(v,r,u,s,void 0,g)),u=c,c=[u[1],l,0,0])):w.type==="tableHead"?(f=!0,p=l):w.type==="tableRow"||w.type==="tableDelimiterRow"?(p=l,u[1]!==0?(c[0]=c[1],g=Ss(v,r,u,s,l,g)):c[1]!==0&&(g=Ss(v,r,c,s,l,g)),s=0):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(c[3]=l)}for(p!==0&&tx(v,r,p,h,b),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=c6(r.events,l))}return e}function Ss(e,r,l,a,s,u){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";l[0]!==0&&(u.end=Object.assign({},xi(r.events,l[0])),e.add(l[0],0,[["exit",u,r]]));const p=xi(r.events,l[1]);if(u={type:c,start:Object.assign({},p),end:Object.assign({},p)},e.add(l[1],0,[["enter",u,r]]),l[2]!==0){const h=xi(r.events,l[2]),b=xi(r.events,l[3]),g={type:f,start:Object.assign({},h),end:Object.assign({},b)};if(e.add(l[2],0,[["enter",g,r]]),a!==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 w=l[2]+1,k=l[3]-l[2]-1;e.add(w,k,[])}}e.add(l[3]+1,0,[["exit",g,r]])}return s!==void 0&&(u.end=Object.assign({},xi(r.events,s)),e.add(s,0,[["exit",u,r]]),u=void 0),u}function tx(e,r,l,a,s){const u=[],c=xi(r.events,l);s&&(s.end=Object.assign({},c),u.push(["exit",s,r])),a.end=Object.assign({},c),u.push(["exit",a,r]),e.add(l+1,0,u)}function xi(e,r){const l=e[r],a=l[0]==="enter"?"start":"end";return l[1][a]}const p6={name:"tasklistCheck",tokenize:g6};function m6(){return{text:{91:p6}}}function g6(e,r,l){const a=this;return s;function s(p){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?l(p):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),u)}function u(p){return st(p)?(e.enter("taskListCheckValueUnchecked"),e.consume(p),e.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(e.enter("taskListCheckValueChecked"),e.consume(p),e.exit("taskListCheckValueChecked"),c):l(p)}function c(p){return p===93?(e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):l(p)}function f(p){return Te(p)?r(p):Fe(p)?e.check({tokenize:b6},r,l)(p):l(p)}}function b6(e,r,l){return $e(e,a,"whitespace");function a(s){return s===null?l(s):r(s)}}function y6(e){return I1([PT(),WT(),o6(e),f6(),m6()])}const x6={};function _h(e){const r=this,l=e||x6,a=r.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),u=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(y6(l)),u.push(IT()),c.push(UT(l))}function j0(e){var r,l,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(r=0;r<s;r++)e[r]&&(l=j0(e[r]))&&(a&&(a+=" "),a+=l)}else for(l in e)e[l]&&(a&&(a+=" "),a+=l);return a}function R0(){for(var e,r,l=0,a="",s=arguments.length;l<s;l++)(e=arguments[l])&&(r=j0(e))&&(a&&(a+=" "),a+=r);return a}var v6=Object.create,pu=Object.defineProperty,w6=Object.defineProperties,S6=Object.getOwnPropertyDescriptor,k6=Object.getOwnPropertyDescriptors,_0=Object.getOwnPropertyNames,$s=Object.getOwnPropertySymbols,E6=Object.getPrototypeOf,Lh=Object.prototype.hasOwnProperty,L0=Object.prototype.propertyIsEnumerable,nx=(e,r,l)=>r in e?pu(e,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[r]=l,Xn=(e,r)=>{for(var l in r||(r={}))Lh.call(r,l)&&nx(e,l,r[l]);if($s)for(var l of $s(r))L0.call(r,l)&&nx(e,l,r[l]);return e},mu=(e,r)=>w6(e,k6(r)),D0=(e,r)=>{var l={};for(var a in e)Lh.call(e,a)&&r.indexOf(a)<0&&(l[a]=e[a]);if(e!=null&&$s)for(var a of $s(e))r.indexOf(a)<0&&L0.call(e,a)&&(l[a]=e[a]);return l},C6=(e,r)=>function(){return r||(0,e[_0(e)[0]])((r={exports:{}}).exports,r),r.exports},A6=(e,r)=>{for(var l in r)pu(e,l,{get:r[l],enumerable:!0})},N6=(e,r,l,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of _0(r))!Lh.call(e,s)&&s!==l&&pu(e,s,{get:()=>r[s],enumerable:!(a=S6(r,s))||a.enumerable});return e},T6=(e,r,l)=>(l=e!=null?v6(E6(e)):{},N6(!e||!e.__esModule?pu(l,"default",{value:e,enumerable:!0}):l,e)),j6=C6({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,r){var l=(function(){var a=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,s=0,u={},c={util:{encode:function w(k){return k instanceof f?new f(k.type,w(k.content),k.alias):Array.isArray(k)?k.map(w):k.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(w){return Object.prototype.toString.call(w).slice(8,-1)},objId:function(w){return w.__id||Object.defineProperty(w,"__id",{value:++s}),w.__id},clone:function w(k,A){A=A||{};var E,C;switch(c.util.type(k)){case"Object":if(C=c.util.objId(k),A[C])return A[C];E={},A[C]=E;for(var T in k)k.hasOwnProperty(T)&&(E[T]=w(k[T],A));return E;case"Array":return C=c.util.objId(k),A[C]?A[C]:(E=[],A[C]=E,k.forEach(function(B,q){E[q]=w(B,A)}),E);default:return k}},getLanguage:function(w){for(;w;){var k=a.exec(w.className);if(k)return k[1].toLowerCase();w=w.parentElement}return"none"},setLanguage:function(w,k){w.className=w.className.replace(RegExp(a,"gi"),""),w.classList.add("language-"+k)},isActive:function(w,k,A){for(var E="no-"+k;w;){var C=w.classList;if(C.contains(k))return!0;if(C.contains(E))return!1;w=w.parentElement}return!!A}},languages:{plain:u,plaintext:u,text:u,txt:u,extend:function(w,k){var A=c.util.clone(c.languages[w]);for(var E in k)A[E]=k[E];return A},insertBefore:function(w,k,A,E){E=E||c.languages;var C=E[w],T={};for(var B in C)if(C.hasOwnProperty(B)){if(B==k)for(var q in A)A.hasOwnProperty(q)&&(T[q]=A[q]);A.hasOwnProperty(B)||(T[B]=C[B])}var D=E[w];return E[w]=T,c.languages.DFS(c.languages,function(U,V){V===D&&U!=w&&(this[U]=T)}),T},DFS:function w(k,A,E,C){C=C||{};var T=c.util.objId;for(var B in k)if(k.hasOwnProperty(B)){A.call(k,B,k[B],E||B);var q=k[B],D=c.util.type(q);D==="Object"&&!C[T(q)]?(C[T(q)]=!0,w(q,A,null,C)):D==="Array"&&!C[T(q)]&&(C[T(q)]=!0,w(q,A,B,C))}}},plugins:{},highlight:function(w,k,A){var E={code:w,grammar:k,language:A};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(w,k){var A=k.rest;if(A){for(var E in A)k[E]=A[E];delete k.rest}var C=new b;return g(C,C.head,w),h(w,C,k,C.head,0),x(C)},hooks:{all:{},add:function(w,k){var A=c.hooks.all;A[w]=A[w]||[],A[w].push(k)},run:function(w,k){var A=c.hooks.all[w];if(!(!A||!A.length))for(var E=0,C;C=A[E++];)C(k)}},Token:f};function f(w,k,A,E){this.type=w,this.content=k,this.alias=A,this.length=(E||"").length|0}f.stringify=function w(k,A){if(typeof k=="string")return k;if(Array.isArray(k)){var E="";return k.forEach(function(D){E+=w(D,A)}),E}var C={type:k.type,content:w(k.content,A),tag:"span",classes:["token",k.type],attributes:{},language:A},T=k.alias;T&&(Array.isArray(T)?Array.prototype.push.apply(C.classes,T):C.classes.push(T)),c.hooks.run("wrap",C);var B="";for(var q in C.attributes)B+=" "+q+'="'+(C.attributes[q]||"").replace(/"/g,"&quot;")+'"';return"<"+C.tag+' class="'+C.classes.join(" ")+'"'+B+">"+C.content+"</"+C.tag+">"};function p(w,k,A,E){w.lastIndex=k;var C=w.exec(A);if(C&&E&&C[1]){var T=C[1].length;C.index+=T,C[0]=C[0].slice(T)}return C}function h(w,k,A,E,C,T){for(var B in A)if(!(!A.hasOwnProperty(B)||!A[B])){var q=A[B];q=Array.isArray(q)?q:[q];for(var D=0;D<q.length;++D){if(T&&T.cause==B+","+D)return;var U=q[D],V=U.inside,G=!!U.lookbehind,M=!!U.greedy,$=U.alias;if(M&&!U.pattern.global){var Y=U.pattern.toString().match(/[imsuy]*$/)[0];U.pattern=RegExp(U.pattern.source,Y+"g")}for(var J=U.pattern||U,I=E.next,X=C;I!==k.tail&&!(T&&X>=T.reach);X+=I.value.length,I=I.next){var F=I.value;if(k.length>w.length)return;if(!(F instanceof f)){var O=1,z;if(M){if(z=p(J,X,w,G),!z||z.index>=w.length)break;var H=z.index,Q=z.index+z[0].length,R=X;for(R+=I.value.length;H>=R;)I=I.next,R+=I.value.length;if(R-=I.value.length,X=R,I.value instanceof f)continue;for(var L=I;L!==k.tail&&(R<Q||typeof L.value=="string");L=L.next)O++,R+=L.value.length;O--,F=w.slice(X,R),z.index-=X}else if(z=p(J,0,F,G),!z)continue;var H=z.index,N=z[0],re=F.slice(0,H),ce=F.slice(H+N.length),de=X+F.length;T&&de>T.reach&&(T.reach=de);var pe=I.prev;re&&(pe=g(k,pe,re),X+=re.length),v(k,pe,O);var ge=new f(B,V?c.tokenize(N,V):N,$,N);if(I=g(k,pe,ge),ce&&g(k,I,ce),O>1){var fe={cause:B+","+D,reach:de};h(w,k,A,I.prev,X,fe),T&&fe.reach>T.reach&&(T.reach=fe.reach)}}}}}}function b(){var w={value:null,prev:null,next:null},k={value:null,prev:w,next:null};w.next=k,this.head=w,this.tail=k,this.length=0}function g(w,k,A){var E=k.next,C={value:A,prev:k,next:E};return k.next=C,E.prev=C,w.length++,C}function v(w,k,A){for(var E=k.next,C=0;C<A&&E!==w.tail;C++)E=E.next;k.next=E,E.prev=k,w.length-=C}function x(w){for(var k=[],A=w.head.next;A!==w.tail;)k.push(A.value),A=A.next;return k}return c})();r.exports=l,l.default=l}}),se=T6(j6());se.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]},se.languages.markup.tag.inside["attr-value"].inside.entity=se.languages.markup.entity,se.languages.markup.doctype.inside["internal-subset"].inside=se.languages.markup,se.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(se.languages.markup.tag,"addInlined",{value:function(e,a){var l={},l=(l["language-"+a]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:se.languages[a]},l.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:l}}),a=(l["language-"+a]={pattern:/[\s\S]+/,inside:se.languages[a]},{});a[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:l},se.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(se.languages.markup.tag,"addAttribute",{value:function(e,r){se.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:se.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),se.languages.html=se.languages.markup,se.languages.mathml=se.languages.markup,se.languages.svg=se.languages.markup,se.languages.xml=se.languages.extend("markup",{}),se.languages.ssml=se.languages.xml,se.languages.atom=se.languages.xml,se.languages.rss=se.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]|.)/,a="(?:[^\\\\-]|"+l.source+")",a=RegExp(a+"-"+a),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:a,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"}}})(se),se.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:/[{}[\];(),.:]/},se.languages.javascript=se.languages.extend("clike",{"class-name":[se.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}|\?\?=?|\?\.?|[~:]/}),se.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,se.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:se.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:se.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:se.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:se.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:se.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),se.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:se.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"}}),se.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),se.languages.markup&&(se.languages.markup.tag.addInlined("script","javascript"),se.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")),se.languages.js=se.languages.javascript,se.languages.actionscript=se.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:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),se.languages.actionscript["class-name"].alias="function",delete se.languages.actionscript.parameter,delete se.languages.actionscript["literal-property"],se.languages.markup&&se.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:se.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})(se),(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,a){(l=typeof l=="string"?[l]:l).forEach(function(s){var u=function(g){g.inside||(g.inside={}),g.inside.rest=a},c="doc-comment";if(f=e.languages[s]){var f,p=f[c];if((p=p||(f=e.languages.insertBefore(s,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[c])instanceof RegExp&&(p=f[c]={pattern:p}),Array.isArray(p))for(var h=0,b=p.length;h<b;h++)p[h]instanceof RegExp&&(p[h]={pattern:p[h]}),u(p[h]);else u(p)}})}}),r.addSupport(["java","javascript","php"],r)})(se),(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"))})(se),(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})})(se),(function(e){var r=/[*&][^\s[\]{},]+/,l=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,a="(?:"+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,p){p=(p||"").replace(/m/g,"")+"m";var h=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return a}).replace(/<<value>>/g,function(){return f});return RegExp(h,p)}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 a})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return a}).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})(se),(function(e){var r=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function l(h){return h=h.replace(/<inner>/g,function(){return r}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+h+")")}var a=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,s=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return a}),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(a),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(a),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(h){["url","bold","italic","strike","code-snippet"].forEach(function(b){h!==b&&(e.languages.markdown[h].inside.content.inside[b]=e.languages.markdown[b])})}),e.hooks.add("after-tokenize",function(h){h.language!=="markdown"&&h.language!=="md"||(function b(g){if(g&&typeof g!="string")for(var v=0,x=g.length;v<x;v++){var w,k=g[v];k.type!=="code"?b(k.content):(w=k.content[1],k=k.content[3],w&&k&&w.type==="code-language"&&k.type==="code-block"&&typeof w.content=="string"&&(w=w.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),w="language-"+(w=(/[a-z][\w-]*/i.exec(w)||[""])[0].toLowerCase()),k.alias?typeof k.alias=="string"?k.alias=[k.alias,w]:k.alias.push(w):k.alias=[w]))}})(h.tokens)}),e.hooks.add("wrap",function(h){if(h.type==="code-block"){for(var b="",g=0,v=h.classes.length;g<v;g++){var x=h.classes[g],x=/language-(.+)/.exec(x);if(x){b=x[1];break}}var w,k=e.languages[b];k?h.content=e.highlight((function(A){return A=A.replace(c,""),A=A.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(E,C){var T;return(C=C.toLowerCase())[0]==="#"?(T=C[1]==="x"?parseInt(C.slice(2),16):Number(C.slice(1)),p(T)):f[C]||E})})(h.content),k,b):b&&b!=="none"&&e.plugins.autoloader&&(w="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),h.attributes.id=w,e.plugins.autoloader.loadLanguages(b,function(){var A=document.getElementById(w);A&&(A.innerHTML=e.highlight(A.textContent,e.languages[b],b))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),f={amp:"&",lt:"<",gt:">",quot:'"'},p=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown})(se),se.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:se.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+/},se.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var r=e.tokens.filter(function(w){return typeof w!="string"&&w.type!=="comment"&&w.type!=="scalar"}),l=0;l<r.length;){var a=r[l++];if(a.type==="keyword"&&a.content==="mutation"){var s=[];if(g(["definition-mutation","punctuation"])&&b(1).content==="("){l+=2;var u=v(/^\($/,/^\)$/);if(u===-1)continue;for(;l<u;l++){var c=b(0);c.type==="variable"&&(x(c,"variable-input"),s.push(c.content))}l=u+1}if(g(["punctuation","property-query"])&&b(0).content==="{"&&(l++,x(b(0),"property-mutation"),0<s.length)){var f=v(/^\{$/,/^\}$/);if(f!==-1)for(var p=l;p<f;p++){var h=r[p];h.type==="variable"&&0<=s.indexOf(h.content)&&x(h,"variable-input")}}}}function b(w){return r[l+w]}function g(w,k){k=k||0;for(var A=0;A<w.length;A++){var E=b(A+k);if(!E||E.type!==w[A])return}return 1}function v(w,k){for(var A=1,E=l;E<r.length;E++){var C=r[E],T=C.content;if(C.type==="punctuation"&&typeof T=="string"){if(w.test(T))A++;else if(k.test(T)&&--A===0)return E}}return-1}function x(w,k){var A=w.alias;A?Array.isArray(A)||(w.alias=A=[A]):w.alias=A=[],A.push(k)}}),se.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,a=r.inside.interpolation,s=a.inside["interpolation-punctuation"],u=a.pattern.source;function c(g,v){if(e.languages[g])return{pattern:RegExp("((?:"+v+")\\s*)"+l),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:g}}}}function f(g,v,x){return g={code:g,grammar:v,language:x},e.hooks.run("before-tokenize",g),g.tokens=e.tokenize(g.code,g.grammar),e.hooks.run("after-tokenize",g),g.tokens}function p(g,v,x){var A=e.tokenize(g,{interpolation:{pattern:RegExp(u),lookbehind:!0}}),w=0,k={},A=f(A.map(function(C){if(typeof C=="string")return C;for(var T,B,C=C.content;g.indexOf((B=w++,T="___"+x.toUpperCase()+"_"+B+"___"))!==-1;);return k[T]=C,T}).join(""),v,x),E=Object.keys(k);return w=0,(function C(T){for(var B=0;B<T.length;B++){if(w>=E.length)return;var q,D,U,V,G,M,$,Y=T[B];typeof Y=="string"||typeof Y.content=="string"?(q=E[w],($=(M=typeof Y=="string"?Y:Y.content).indexOf(q))!==-1&&(++w,D=M.substring(0,$),G=k[q],U=void 0,(V={})["interpolation-punctuation"]=s,(V=e.tokenize(G,V)).length===3&&((U=[1,1]).push.apply(U,f(V[1],e.languages.javascript,"javascript")),V.splice.apply(V,U)),U=new e.Token("interpolation",V,a.alias,G),V=M.substring($+q.length),G=[],D&&G.push(D),G.push(U),V&&(C(M=[V]),G.push.apply(G,M)),typeof Y=="string"?(T.splice.apply(T,[B,1].concat(G)),B+=G.length-1):Y.content=G)):($=Y.content,Array.isArray($)?C($):C([$]))}})(A),new e.Token(x,A,"language-"+x,g)}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 h={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function b(g){return typeof g=="string"?g:Array.isArray(g)?g.map(b).join(""):b(g.content)}e.hooks.add("after-tokenize",function(g){g.language in h&&(function v(x){for(var w=0,k=x.length;w<k;w++){var A,E,C,T=x[w];typeof T!="string"&&(A=T.content,Array.isArray(A)?T.type==="template-string"?(T=A[1],A.length===3&&typeof T!="string"&&T.type==="embedded-code"&&(E=b(T),T=T.alias,T=Array.isArray(T)?T[0]:T,C=e.languages[T])&&(A[1]=p(E,C,T))):v(A):typeof A!="string"&&v([A]))}})(g.tokens)})})(se),(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})(se),(function(e){var r=e.languages.javascript,l=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,a="(@(?:arg|argument|param|property)\\s+(?:"+l+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(a+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(a+/\[(?:(?!\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)})(se),(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})})(se),se.languages.n4js=se.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/}),se.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),se.languages.n4jsd=se.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"],a=0;a<l.length;a++){var u=l[a],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]*/}})(se),(function(e){var r=e.util.clone(e.languages.javascript),l=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,a=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,s=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function u(p,h){return p=p.replace(/<S>/g,function(){return l}).replace(/<BRACES>/g,function(){return a}).replace(/<SPREAD>/g,function(){return s}),RegExp(p,h)}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(p){for(var h=[],b=0;b<p.length;b++){var g=p[b],v=!1;typeof g!="string"&&(g.type==="tag"&&g.content[0]&&g.content[0].type==="tag"?g.content[0].content[0].content==="</"?0<h.length&&h[h.length-1].tagName===f(g.content[0].content[1])&&h.pop():g.content[g.content.length-1].content!=="/>"&&h.push({tagName:f(g.content[0].content[1]),openedBraces:0}):0<h.length&&g.type==="punctuation"&&g.content==="{"?h[h.length-1].openedBraces++:0<h.length&&0<h[h.length-1].openedBraces&&g.type==="punctuation"&&g.content==="}"?h[h.length-1].openedBraces--:v=!0),(v||typeof g=="string")&&0<h.length&&h[h.length-1].openedBraces===0&&(v=f(g),b<p.length-1&&(typeof p[b+1]=="string"||p[b+1].type==="plain-text")&&(v+=f(p[b+1]),p.splice(b+1,1)),0<b&&(typeof p[b-1]=="string"||p[b-1].type==="plain-text")&&(v=f(p[b-1])+v,p.splice(b-1,1),b--),p[b]=new e.Token("plain-text",v,null,v)),g.content&&typeof g.content!="string"&&c(g.content)}}var f=function(p){return p?typeof p=="string"?p:typeof p.content=="string"?p.content:p.content.map(f).join(""):""};e.hooks.add("after-tokenize",function(p){p.language!=="jsx"&&p.language!=="tsx"||c(p.tokens)})})(se),(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})(se),se.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:/[{}[\]();,.:\\]/},se.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=se.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})(se),se.languages.c=se.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|[?:~]|[-+*/%&|^!=<>]=?/}),se.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),se.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},se.languages.c.string],char:se.languages.c.char,comment:se.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:se.languages.c}}}}),se.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 se.languages.c.boolean,se.languages.objectivec=se.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 se.languages.objectivec["class-name"],se.languages.objc=se.languages.objectivec,se.languages.reason=se.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/}),se.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 se.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})(se),se.languages.go=se.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/}),se.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete se.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"])})(se),se.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:/![sra](?=[:}]$)/,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:/[{}[\];(),.:]/},se.languages.python["string-interpolation"].inside.interpolation.inside.rest=se.languages.python,se.languages.py=se.languages.python,se.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"}},se.languages.webmanifest=se.languages.json;var xn={};A6(xn,{dracula:()=>_6,duotoneDark:()=>D6,duotoneLight:()=>M6,github:()=>B6,gruvboxMaterialDark:()=>d5,gruvboxMaterialLight:()=>p5,jettwaveDark:()=>l5,jettwaveLight:()=>a5,nightOwl:()=>I6,nightOwlLight:()=>H6,oceanicNext:()=>P6,okaidia:()=>V6,oneDark:()=>s5,oneLight:()=>c5,palenight:()=>Y6,shadesOfPurple:()=>Z6,synthwave84:()=>K6,ultramin:()=>W6,vsDark:()=>O0,vsLight:()=>n5});var R6={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)"}}]},_6=R6,L6={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"}}]},D6=L6,O6={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"}}]},M6=O6,z6={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"}}]},B6=z6,F6={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)"}}]},I6=F6,U6={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)"}}]},H6=U6,bn={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},q6={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:bn.keyword}},{types:["attr-value"],style:{color:bn.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:bn.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:bn.primitive}},{types:["boolean"],style:{color:bn.boolean}},{types:["tag"],style:{color:bn.tag}},{types:["string"],style:{color:bn.string}},{types:["punctuation"],style:{color:bn.string}},{types:["selector","char","builtin","inserted"],style:{color:bn.char}},{types:["function"],style:{color:bn.function}},{types:["operator","entity","url","variable"],style:{color:bn.variable}},{types:["keyword"],style:{color:bn.keyword}},{types:["atrule","class-name"],style:{color:bn.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},P6=q6,$6={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"}}]},V6=$6,G6={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)"}}]},Y6=G6,X6={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)"}}]},Z6=X6,Q6={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"}}]},K6=Q6,J6={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)"}}]},W6=J6,e5={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)"}}]},O0=e5,t5={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)"}}]},n5=t5,r5={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"}}]},l5=r5,i5={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"}}]},a5=i5,o5={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%)"}}]},s5=o5,u5={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%)"}}]},c5=u5,f5={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"}}]},d5=f5,h5={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"}}]},p5=h5,m5=e=>j.useCallback(r=>{var l=r,{className:a,style:s,line:u}=l,c=D0(l,["className","style","line"]);const f=mu(Xn({},c),{className:R0("token-line",a)});return typeof e=="object"&&"plain"in e&&(f.style=e.plain),typeof s=="object"&&(f.style=Xn(Xn({},f.style||{}),s)),f},[e]),g5=e=>{const r=j.useCallback(({types:l,empty:a})=>{if(e!=null){{if(l.length===1&&l[0]==="plain")return a!=null?{display:"inline-block"}:void 0;if(l.length===1&&a!=null)return e[l[0]]}return Object.assign(a!=null?{display:"inline-block"}:{},...l.map(s=>e[s]))}},[e]);return j.useCallback(l=>{var a=l,{token:s,className:u,style:c}=a,f=D0(a,["token","className","style"]);const p=mu(Xn({},f),{className:R0("token",...s.types,u),children:s.content,style:r(s)});return c!=null&&(p.style=Xn(Xn({},p.style||{}),c)),p},[r])},b5=/\r\n|\r|\n/,rx=e=>{e.length===0?e.push({types:["plain"],content:`
44
+ `,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
45
+ `,e[0].empty=!0)},lx=(e,r)=>{const l=e.length;return l>0&&e[l-1]===r?e:e.concat(r)},y5=e=>{const r=[[]],l=[e],a=[0],s=[e.length];let u=0,c=0,f=[];const p=[f];for(;c>-1;){for(;(u=a[c]++)<s[c];){let h,b=r[c];const v=l[c][u];if(typeof v=="string"?(b=c>0?b:["plain"],h=v):(b=lx(b,v.type),v.alias&&(b=lx(b,v.alias)),h=v.content),typeof h!="string"){c++,r.push(b),l.push(h),a.push(0),s.push(h.length);continue}const x=h.split(b5),w=x.length;f.push({types:b,content:x[0]});for(let k=1;k<w;k++)rx(f),p.push(f=[]),f.push({types:b,content:x[k]})}c--,r.pop(),l.pop(),a.pop(),s.pop()}return rx(f),p},ix=y5,x5=({prism:e,code:r,grammar:l,language:a})=>j.useMemo(()=>{if(l==null)return ix([r]);const s={code:r,grammar:l,language:a,tokens:[]};return e.hooks.run("before-tokenize",s),s.tokens=e.tokenize(r,l),e.hooks.run("after-tokenize",s),ix(s.tokens)},[r,l,a,e]),v5=(e,r)=>{const{plain:l}=e,a=e.styles.reduce((s,u)=>{const{languages:c,style:f}=u;return c&&!c.includes(r)||u.types.forEach(p=>{const h=Xn(Xn({},s[p]),f);s[p]=h}),s},{});return a.root=l,a.plain=mu(Xn({},l),{backgroundColor:void 0}),a},w5=v5,S5=({children:e,language:r,code:l,theme:a,prism:s})=>{const u=r.toLowerCase(),c=w5(a,u),f=m5(c),p=g5(c),h=s.languages[u],b=x5({prism:s,language:u,code:l,grammar:h});return e({tokens:b,className:`prism-code language-${u}`,style:c!=null?c.root:{},getLineProps:f,getTokenProps:p})},k5=e=>j.createElement(S5,mu(Xn({},e),{prism:e.prism||se,theme:e.theme||O0,code:e.code,language:e.language}));const E5="modulepreload",C5=function(e){return"/"+e},ax={},Ft=function(r,l,a){let s=Promise.resolve();if(l&&l.length>0){let p=function(h){return Promise.all(h.map(b=>Promise.resolve(b).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");s=p(l.map(h=>{if(h=C5(h),h in ax)return;ax[h]=!0;const b=h.endsWith(".css"),g=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const v=document.createElement("link");if(v.rel=b?"stylesheet":E5,b||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),b)return new Promise((x,w)=>{v.addEventListener("load",x),v.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${h}`)))})}))}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)})},ks={};function M0(e){if(!ks[e]){const l={bash:()=>Ft(()=>import("./prism-bash-DTkDXsAh.js"),[]),sh:()=>Ft(()=>import("./prism-bash-DTkDXsAh.js"),[]),shell:()=>Ft(()=>import("./prism-bash-DTkDXsAh.js"),[]),php:async()=>(await Ft(()=>import("./prism-markup-templating-Ct1xsyfA.js"),[]),Ft(()=>import("./prism-php-CQOqHyih.js").then(a=>a.p),[])),sql:()=>Ft(()=>import("./prism-sql-AgAyy5H_.js"),[]),ruby:()=>Ft(()=>import("./prism-ruby-8j070hFf.js").then(a=>a.p),[]),java:()=>Ft(()=>import("./prism-java-C8aB84FB.js").then(a=>a.p),[]),scala:async()=>(await M0("java"),Ft(()=>import("./prism-scala-BjNo2HkN.js"),[])),solidity:()=>Ft(()=>import("./prism-solidity-B9-LkboP.js").then(a=>a.p),[]),vim:()=>Ft(()=>import("./prism-vim-uciLQ2PQ.js"),[]),dart:()=>Ft(()=>import("./prism-dart-MjriiaMt.js"),[]),csharp:()=>Ft(()=>import("./prism-csharp-wq1C19Kt.js").then(a=>a.p),[]),protobuf:()=>Ft(()=>import("./prism-protobuf-DiQ_z8B5.js"),[]),hcl:()=>Ft(()=>import("./prism-hcl-DG9S9drO.js").then(a=>a.p),[]),perl:()=>Ft(()=>import("./prism-perl-Gs3lmI1r.js").then(a=>a.p),[])}[e];if(!l)return console.warn(`No loader available for language: ${e}`),Promise.reject(new Error(`Unsupported language: ${e}`));ks[e]=l().then(()=>{}).catch(a=>{throw delete ks[e],console.warn(`Failed to load language: ${e}`,a),a})}return ks[e]}typeof global<"u"?global.Prism=se:typeof window<"u"&&(window.Prism=se);const ox=["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 A5(e,r){const[l,a]=j.useState(()=>ox.includes(r)||!!se.languages[r]);return j.useEffect(()=>{if(!l){if(ox.includes(r)){a(!0);return}M0(r).then(()=>{a(!0)}).catch(()=>{a(!1)})}},[r,l]),{ready:l,actualLang:l?r:"text"}}const sx=[{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"}],ux=[{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"}];function N5(e){return{...e,styles:e.styles.map(r=>({...r,style:{...r.style,background:void 0,backgroundColor:void 0}}))}}function T5(e){let r;switch(e){case"github":r=xn.github;break;case"vsLight":r=xn.vsLight;break;case"oneLight":r=xn.oneLight;break;case"gruvboxMaterialLight":r=xn.gruvboxMaterialLight;break;case"nightOwlLight":r=xn.nightOwlLight;break;case"vsDark":r=xn.vsDark;break;case"oneDark":r=xn.oneDark;break;case"gruvboxMaterialDark":r=xn.gruvboxMaterialDark;break;case"nightOwl":r=xn.nightOwl;break;case"dracula":r=xn.dracula;break;case"okaidia":r=xn.okaidia;break;default:r=xn.vsDark}return N5(r)}function j5(e){const r=$E(e).toLowerCase(),l=su(e),a={dockerfile:"docker",makefile:"makefile",".gitignore":"git",".env":"bash",".bashrc":"bash",".zshrc":"bash",".bash_profile":"bash",".profile":"bash"};return a[r]?a[r]:{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",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"}[l||""]||"text"}const Dh=Xt.memo(function({code:r,language:l,className:a,syntaxTheme:s="vsDark",filename:u="",renderToken:c,onMouseOver:f,onMouseOut:p}){const h=l||(u?j5(u):"text"),{actualLang:b}=A5(r,h),g=T5(s),v=j.useCallback(({style:x,tokens:w,getLineProps:k,getTokenProps:A})=>y.jsx("span",{className:a,style:{...x,background:"transparent",backgroundColor:"transparent"},onMouseOver:f,onMouseOut:p,children:w.map((E,C)=>y.jsx("span",{...k({line:E}),children:E.map((T,B)=>c?c(T,B,A):y.jsx("span",{...A({token:T})},B))},C))}),[a,f,p,c]);return y.jsx(k5,{code:r,language:b,theme:g,prism:se,children:v})});class z0{diff(r,l,a={}){let s;typeof a=="function"?(s=a,a={}):"callback"in a&&(s=a.callback);const u=this.castInput(r,a),c=this.castInput(l,a),f=this.removeEmpty(this.tokenize(u,a)),p=this.removeEmpty(this.tokenize(c,a));return this.diffWithOptionsObj(f,p,a,s)}diffWithOptionsObj(r,l,a,s){var u;const c=C=>{if(C=this.postProcess(C,a),s){setTimeout(function(){s(C)},0);return}else return C},f=l.length,p=r.length;let h=1,b=f+p;a.maxEditLength!=null&&(b=Math.min(b,a.maxEditLength));const g=(u=a.timeout)!==null&&u!==void 0?u:1/0,v=Date.now()+g,x=[{oldPos:-1,lastComponent:void 0}];let w=this.extractCommon(x[0],l,r,0,a);if(x[0].oldPos+1>=p&&w+1>=f)return c(this.buildValues(x[0].lastComponent,l,r));let k=-1/0,A=1/0;const E=()=>{for(let C=Math.max(k,-h);C<=Math.min(A,h);C+=2){let T;const B=x[C-1],q=x[C+1];B&&(x[C-1]=void 0);let D=!1;if(q){const V=q.oldPos-C;D=q&&0<=V&&V<f}const U=B&&B.oldPos+1<p;if(!D&&!U){x[C]=void 0;continue}if(!U||D&&B.oldPos<q.oldPos?T=this.addToPath(q,!0,!1,0,a):T=this.addToPath(B,!1,!0,1,a),w=this.extractCommon(T,l,r,C,a),T.oldPos+1>=p&&w+1>=f)return c(this.buildValues(T.lastComponent,l,r))||!0;x[C]=T,T.oldPos+1>=p&&(A=Math.min(A,C-1)),w+1>=f&&(k=Math.max(k,C+1))}h++};if(s)(function C(){setTimeout(function(){if(h>b||Date.now()>v)return s(void 0);E()||C()},0)})();else for(;h<=b&&Date.now()<=v;){const C=E();if(C)return C}}addToPath(r,l,a,s,u){const c=r.lastComponent;return c&&!u.oneChangePerToken&&c.added===l&&c.removed===a?{oldPos:r.oldPos+s,lastComponent:{count:c.count+1,added:l,removed:a,previousComponent:c.previousComponent}}:{oldPos:r.oldPos+s,lastComponent:{count:1,added:l,removed:a,previousComponent:c}}}extractCommon(r,l,a,s,u){const c=l.length,f=a.length;let p=r.oldPos,h=p-s,b=0;for(;h+1<c&&p+1<f&&this.equals(a[p+1],l[h+1],u);)h++,p++,b++,u.oneChangePerToken&&(r.lastComponent={count:1,previousComponent:r.lastComponent,added:!1,removed:!1});return b&&!u.oneChangePerToken&&(r.lastComponent={count:b,previousComponent:r.lastComponent,added:!1,removed:!1}),r.oldPos=p,h}equals(r,l,a){return a.comparator?a.comparator(r,l):r===l||!!a.ignoreCase&&r.toLowerCase()===l.toLowerCase()}removeEmpty(r){const l=[];for(let a=0;a<r.length;a++)r[a]&&l.push(r[a]);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,a){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,p=0,h=0;for(;f<c;f++){const b=s[f];if(b.removed)b.value=this.join(a.slice(h,h+b.count)),h+=b.count;else{if(!b.added&&this.useLongestToken){let g=l.slice(p,p+b.count);g=g.map(function(v,x){const w=a[h+x];return w.length>v.length?w:v}),b.value=this.join(g)}else b.value=this.join(l.slice(p,p+b.count));p+=b.count,b.added||(h+=b.count)}}return s}}function cx(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 fx(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 Yd(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 Xd(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 ja(e,r){return Yd(e,r,"")}function Es(e,r){return Xd(e,r,"")}function dx(e,r){return r.slice(0,R5(e,r))}function R5(e,r){let l=0;e.length>r.length&&(l=e.length-r.length);let a=r.length;e.length<r.length&&(a=e.length);const s=Array(a);let u=0;s[0]=0;for(let c=1;c<a;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 Ra(e){let r;for(r=e.length-1;r>=0&&e[r].match(/\s/);r--);return e.substring(r+1)}function Gr(e){const r=e.match(/^\s*/);return r?r[0]:""}const hx="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}",_5=new RegExp(`[${hx}]+|\\s+|[^${hx}]`,"ug");class L5 extends z0{equals(r,l,a){return a.ignoreCase&&(r=r.toLowerCase(),l=l.toLowerCase()),r.trim()===l.trim()}tokenize(r,l={}){let a;if(l.intlSegmenter){const c=l.intlSegmenter;if(c.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');a=[];for(const f of Array.from(c.segment(r))){const p=f.segment;a.length&&/\s/.test(a[a.length-1])&&/\s/.test(p)?a[a.length-1]+=p:a.push(p)}}else a=r.match(_5)||[];const s=[];let u=null;return a.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,a)=>a==0?l:l.replace(/^\s+/,"")).join("")}postProcess(r,l){if(!r||l.oneChangePerToken)return r;let a=null,s=null,u=null;return r.forEach(c=>{c.added?s=c:c.removed?u=c:((s||u)&&px(a,u,s,c),a=c,s=null,u=null)}),(s||u)&&px(a,u,s,null),r}}const D5=new L5;function B0(e,r,l){return D5.diff(e,r,l)}function px(e,r,l,a){if(r&&l){const s=Gr(r.value),u=Ra(r.value),c=Gr(l.value),f=Ra(l.value);if(e){const p=cx(s,c);e.value=Xd(e.value,c,p),r.value=ja(r.value,p),l.value=ja(l.value,p)}if(a){const p=fx(u,f);a.value=Yd(a.value,f,p),r.value=Es(r.value,p),l.value=Es(l.value,p)}}else if(l){if(e){const s=Gr(l.value);l.value=l.value.substring(s.length)}if(a){const s=Gr(a.value);a.value=a.value.substring(s.length)}}else if(e&&a){const s=Gr(a.value),u=Gr(r.value),c=Ra(r.value),f=cx(s,u);r.value=ja(r.value,f);const p=fx(ja(s,f),c);r.value=Es(r.value,p),a.value=Yd(a.value,s,p),e.value=Xd(e.value,s,s.slice(0,s.length-p.length))}else if(a){const s=Gr(a.value),u=Ra(r.value),c=dx(u,s);r.value=Es(r.value,c)}else if(e){const s=Ra(e.value),u=Gr(r.value),c=dx(s,u);r.value=ja(r.value,c)}}class O5 extends z0{constructor(){super(...arguments),this.tokenize=B5}equals(r,l,a){return a.ignoreWhitespace?((!a.newlineIsToken||!r.includes(`
46
+ `))&&(r=r.trim()),(!a.newlineIsToken||!l.includes(`
47
+ `))&&(l=l.trim())):a.ignoreNewlineAtEof&&!a.newlineIsToken&&(r.endsWith(`
48
+ `)&&(r=r.slice(0,-1)),l.endsWith(`
49
+ `)&&(l=l.slice(0,-1))),super.equals(r,l,a)}}const M5=new O5;function z5(e,r,l){return M5.diff(e,r,l)}function B5(e,r){r.stripTrailingCr&&(e=e.replace(/\r\n/g,`
50
+ `));const l=[],a=e.split(/(\n|\r\n)/);a[a.length-1]||a.pop();for(let s=0;s<a.length;s++){const u=a[s];s%2&&!r.newlineIsToken?l[l.length-1]+=u:l.push(u)}return l}function F0(e,r){const l=B0(e,r),a=[],s=[];for(const u of l)u.added?s.push({value:u.value,type:"added"}):u.removed?a.push({value:u.value,type:"removed"}):(a.push({value:u.value,type:"unchanged"}),s.push({value:u.value,type:"unchanged"}));return{oldSegments:a,newSegments:s}}function I0(e,r){if(!e.trim()||!r.trim()||e===r)return!1;const l=B0(e,r);let a=0,s=0;for(const c of l)s+=c.value.length,!c.added&&!c.removed&&(a+=c.value.length);return a/s>=.2}function U0({onSubmit:e,onCancel:r}){const[l,a]=j.useState(""),[s,u]=j.useState(!1),c=async h=>{if(h.preventDefault(),!!l.trim()){u(!0);try{await e(l.trim()),a("")}catch(b){console.error("Failed to submit comment:",b)}finally{u(!1)}}},f=h=>{h.key==="Enter"&&(h.metaKey||h.ctrlKey)?c(h):h.key==="Escape"&&r()},p=/Macintosh|Mac OS X/.test(navigator.userAgent)?"Cmd":"Ctrl";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:c,"data-empty":!l.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"}),y.jsxs("span",{className:"text-xs text-github-text-muted",children:[p,"+Enter to submit • Escape to cancel"]})]}),y.jsx("textarea",{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:l,onChange:h=>a(h.target.value),onKeyDown:f,placeholder:"Leave a comment...",rows:3,autoFocus:!0,disabled:s}),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:s,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:h=>{h.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",h.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:h=>{h.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",h.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},disabled:!l.trim()||s,children:s?"Submitting...":"Submit"})]})]})}const Vs=Xt.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:a=>{a.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",a.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:a=>{a.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",a.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},onMouseDown:e,onMouseUp:r,title:l,children:y.jsx(Vx,{className:"w-4 h-4"})}));Vs.displayName="CommentButton";const F5=2,I5=100;function U5(e){return!(e.length<F5||e.length>I5)}function mx(e){return e.toLowerCase()}function gx(e){const r=e.trim();return r?r.match(/^\w+$/)!==null&&U5(r):!1}const H5=200,H0=j.createContext(void 0);function q5({children:e}){const[r,l]=j.useState(null),a=j.useRef(null),s=j.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null)},[]),u=j.useCallback(h=>{const b=h.target;if(!b.classList.contains("word-token"))return;s();const g=b.getAttribute("data-word");g&&(a.current=setTimeout(()=>{l(g)},H5))},[s]),c=j.useCallback(()=>{s(),l(null)},[s]),f=j.useCallback(h=>r?mx(h)===mx(r):!1,[r]);j.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]);const p={highlightedWord:r,handleMouseOver:u,handleMouseOut:c,isWordHighlighted:f};return y.jsx(H0.Provider,{value:p,children:e})}function P5(){const e=j.useContext(H0);if(!e)throw new Error("useWordHighlight must be used within a WordHighlightProvider");return e}const qa=Xt.memo(function(r){const{handleMouseOver:l,handleMouseOut:a,isWordHighlighted:s}=P5(),u=j.useCallback((c,f,p)=>{const h=p({token:c}),b=c.content.split(/( +)/);if(b.length===1&&b[0]&&!gx(b[0]))return y.jsx("span",{...h},f);const g=b.map((v,x)=>{if(!v)return null;if(gx(v)){const w=v.trim(),k=s(w);return y.jsx("span",{className:`word-token ${k?"word-highlight":""}`,"data-word":w,children:v},`${f}-${x}`)}return y.jsx("span",{children:v},`${f}-${x}`)});return y.jsx("span",{...h,children:g},f)},[s]);return y.jsx(Dh,{...r,renderToken:u,onMouseOver:l,onMouseOut:a})}),Gs=Xt.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:a=>{a.currentTarget.style.backgroundColor="var(--color-editor-btn-hover-bg)",a.currentTarget.style.borderColor="var(--color-editor-btn-hover-border)"},onMouseLeave:a=>{a.currentTarget.style.backgroundColor="var(--color-editor-btn-bg)",a.currentTarget.style.borderColor="var(--color-editor-btn-border)"},onMouseDown:a=>{a.stopPropagation()},onClick:a=>{a.stopPropagation(),e(a)},title:r,children:y.jsx(uS,{className:"w-4 h-4 opacity-80"})}));Gs.displayName="OpenInEditorButton";const Zd=Xt.memo(function({segments:r,className:l=""}){const a=j.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:a})}),$5=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"}},V5=e=>{switch(e.type){case"add":return"+";case"delete":return"-";default:return" "}},q0=Xt.memo(({line:e,index:r,lineId:l,isCurrentLine:a=!1,hoveredLineIndex:s,selectedLineStyle:u,onMouseEnter:c,onMouseLeave:f,onMouseMove:p,onCommentButtonMouseDown:h,onCommentButtonMouseUp:b,onOpenInEditor:g,syntaxTheme:v,onClick:x,filename:w,diffSegments:k})=>{const A=e.newLineNumber||e.oldLineNumber,E=s===r&&A,C=a?"keyboard-cursor":"";return y.jsxs("tr",{id:l,className:`group ${$5(e)} relative ${u} ${C} cursor-pointer`,onMouseEnter:c,onMouseLeave:f,onMouseMove:p,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:[g&&y.jsx(Gs,{onClick:g}),y.jsx(Vs,{onMouseDown:h,onMouseUp:b})]})]}),y.jsx("td",{className:"p-0 w-full relative align-top",children:y.jsxs("div",{className:"flex items-center relative min-h-[16px]",children:[y.jsx("span",{className:`w-5 text-center text-github-text-muted flex-shrink-0 bg-github-bg-secondary border-r border-github-border ${e.type==="add"?"text-github-accent bg-diff-addition-bg":e.type==="delete"?"text-github-danger bg-diff-deletion-bg":""}`,children:V5(e)}),k?y.jsx(Zd,{segments:k,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(qa,{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:v,filename:w})]})})]})});q0.displayName="DiffLineRow";const bx=e=>e!==void 0&&"isExpanded"in e&&e.isExpanded===!0,yx=(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 G5({chunk:e,chunkIndex:r,comments:l,onAddComment:a,onGeneratePrompt:s,onRemoveComment:u,onUpdateComment:c,syntaxTheme:f,cursor:p=null,fileIndex:h=0,onLineClick:b,commentTrigger:g,onCommentTriggerHandled:v,filename:x,onOpenInEditor:w}){const[k,A]=j.useState(null),[E,C]=j.useState(null),[T,B]=j.useState(!1),[q,D]=j.useState(null),[U,V]=j.useState(null);j.useEffect(()=>{if(g?.lineIndex!==void 0){const O=e.lines[g.lineIndex];if(O&&O.type!=="delete"){const z=O.newLineNumber;z&&(D({side:"new",lineNumber:z}),v?.())}}},[g,e.lines,v]),j.useEffect(()=>{if(T){const O=()=>{B(!1),A(null),C(null)};return document.addEventListener("mouseup",O),()=>{document.removeEventListener("mouseup",O)}}},[T]);const G=j.useCallback((O,z)=>{q?.side===O&&q?.lineNumber===z?D(null):D({side:O,lineNumber:z})},[q]),M=j.useCallback(()=>{D(null)},[]),$=j.useCallback(async O=>{q!==null&&(await a(q.lineNumber,O,void 0,q.side),D(null))},[q,a]),Y=(O,z)=>l.filter(Q=>{const R=Array.isArray(Q.line)?Q.line[1]===O:Q.line===O,L=!Q.side||Q.side===z;return R&&L}),J=O=>O.oldLine?.type==="delete"&&O.newLine?.type==="add"?O.newLineNumber?"right":"left":O.oldLine?.type==="delete"?"left":O.newLine?.type==="add"?"right":"full",I=(O,z)=>{const Q=O==="old"?z.oldLineNumber:z.newLineNumber;if(!Q)return"";if(T&&k&&E&&k.side===O&&E.side===O){const R=Math.min(k.lineNumber,E.lineNumber),L=Math.max(k.lineNumber,E.lineNumber);if(Q>=R&&Q<=L){let H="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 Q===R&&(H+=" after:border-t-2"),Q===L&&(H+=" after:border-b-2"),H}}if(q&&q.side===O){const R=Array.isArray(q.lineNumber)?q.lineNumber:[q.lineNumber,q.lineNumber],L=R[0],H=R[1];if(L!==void 0&&H!==void 0&&Q>=L&&Q<=H)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""},X=j.useCallback(O=>{const z=[];let Q=e.oldStart,R=e.newStart,L=0;for(;L<O.length;){const H=O[L];if(!H){L++;continue}if(H.type==="normal")z.push({oldLine:H,newLine:{...H},oldLineNumber:H.oldLineNumber??Q,newLineNumber:H.newLineNumber??R,oldLineOriginalIndex:L,newLineOriginalIndex:L}),Q++,R++,L++;else if(H.type==="delete"){let N=L+1;for(;N<O.length&&O[N]?.type==="delete";)N++;const re=O.slice(L,N),ce=L,de=[],pe=N;for(;N<O.length&&O[N]?.type==="add";){const fe=O[N];fe&&de.push(fe),N++}const ge=Math.max(re.length,de.length);for(let fe=0;fe<ge;fe++){const ve=re[fe],xe=de[fe];let ye;ve&&xe&&I0(ve.content,xe.content)&&(ye=F0(ve.content,xe.content)),z.push({oldLine:ve,newLine:xe,oldLineNumber:ve?ve.oldLineNumber??Q+fe:void 0,newLineNumber:xe?xe.newLineNumber??R+fe:void 0,oldLineOriginalIndex:ve?ce+fe:void 0,newLineOriginalIndex:xe?pe+fe:void 0,wordLevelDiff:ye})}Q+=re.length,R+=de.length,L=N}else H.type==="add"&&(z.push({newLine:H,newLineNumber:H.newLineNumber??R,newLineOriginalIndex:L}),R++,L++)}return z},[e.oldStart,e.newStart]),F=j.useMemo(()=>X(e.lines),[e.lines,X]);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:F.map((O,z)=>{const Q=O.oldLineNumber?Y(O.oldLineNumber,"old"):[],R=O.newLineNumber?Y(O.newLineNumber,"new"):[],L=[...Q,...R],H=O.oldLineOriginalIndex??-1,N=O.newLineOriginalIndex??-1,re=p?p.side==="left"&&H>=0?p.chunkIndex===r&&p.lineIndex===H:p.side==="right"&&N>=0?p.chunkIndex===r&&p.lineIndex===N:!1:!1,ce=H>=0?`file-${h}-chunk-${r}-line-${H}-left`:void 0,de=N>=0?`file-${h}-chunk-${r}-line-${N}-right`:void 0,pe=re&&p?.side==="left",ge=re&&p?.side==="right",fe="keyboard-cursor";return y.jsxs(Xt.Fragment,{children:[y.jsxs("tr",{className:"group cursor-pointer",onClick:ve=>{if(!T){const xe=ve.target,ye=xe.closest("td:nth-child(1)")||xe.closest("td:nth-child(2)"),ke=xe.closest("td:nth-child(3)")||xe.closest("td:nth-child(4)");ye&&H>=0?b?.(h,r,H,"left"):ke&&N>=0&&b?.(h,r,N,"right")}},onMouseEnter:ve=>{const xe=ve.target,ye=xe.closest("td:nth-child(1)")||xe.closest("td:nth-child(2)"),ke=xe.closest("td:nth-child(3)")||xe.closest("td:nth-child(4)");ye&&O.oldLineNumber?V({side:"old",lineNumber:O.oldLineNumber}):ke&&O.newLineNumber&&V({side:"new",lineNumber:O.newLineNumber})},onMouseMove:ve=>{const xe=ve.target,ye=xe.closest("td:nth-child(1)")||xe.closest("td:nth-child(2)"),ke=xe.closest("td:nth-child(3)")||xe.closest("td:nth-child(4)");ye&&O.oldLineNumber?(U?.side!=="old"||U?.lineNumber!==O.oldLineNumber)&&V({side:"old",lineNumber:O.oldLineNumber}):ke&&O.newLineNumber&&(U?.side!=="new"||U?.lineNumber!==O.newLineNumber)&&V({side:"new",lineNumber:O.newLineNumber}),T&&k&&(k.side==="old"&&O.oldLineNumber?C({side:"old",lineNumber:O.oldLineNumber}):k.side==="new"&&O.newLineNumber&&C({side:"new",lineNumber:O.newLineNumber}))},onMouseLeave:()=>V(null),children:[y.jsxs("td",{id:ce,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?fe:""}`,children:[y.jsx("span",{children:O.oldLineNumber||""}),U?.side==="old"&&U?.lineNumber===O.oldLineNumber&&y.jsxs(y.Fragment,{children:[w&&O.oldLine?.type!=="delete"&&O.newLineNumber!==void 0&&y.jsx(Gs,{onClick:()=>{const ve=O.newLineNumber;!x||ve===void 0||w(x,ve)}}),y.jsx(Vs,{onMouseDown:ve=>{ve.stopPropagation(),O.oldLineNumber&&(A({side:"old",lineNumber:O.oldLineNumber}),C({side:"old",lineNumber:O.oldLineNumber}),B(!0))},onMouseUp:ve=>{if(ve.stopPropagation(),!O.oldLineNumber||!k){B(!1),A(null),C(null);return}const xe=E&&E.side==="old"?E.lineNumber:O.oldLineNumber;if(k.side!=="old"||k.lineNumber===xe)G("old",O.oldLineNumber);else{const ye=Math.min(k.lineNumber,xe),ke=Math.max(k.lineNumber,xe);G("old",[ye,ke])}B(!1),A(null),C(null)}})]})]}),y.jsx("td",{className:`w-1/2 p-0 align-top border-r border-github-border relative ${yx(O.oldLine,bx(O.oldLine))} ${I("old",O)} ${pe?fe:""}`,children:O.oldLine&&y.jsx("div",{className:"flex items-center relative min-h-[20px] px-3",children:O.wordLevelDiff?y.jsx(Zd,{segments:O.wordLevelDiff.oldSegments,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(qa,{code:O.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:de,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 ${ge?fe:""}`,children:[y.jsx("span",{children:O.newLineNumber||""}),U?.side==="new"&&U?.lineNumber===O.newLineNumber&&y.jsxs(y.Fragment,{children:[w&&y.jsx(Gs,{onClick:()=>{const ve=O.newLineNumber;!x||ve===void 0||w(x,ve)}}),y.jsx(Vs,{onMouseDown:ve=>{ve.stopPropagation(),O.newLineNumber&&(A({side:"new",lineNumber:O.newLineNumber}),C({side:"new",lineNumber:O.newLineNumber}),B(!0))},onMouseUp:ve=>{if(ve.stopPropagation(),!O.newLineNumber||!k){B(!1),A(null),C(null);return}const xe=E&&E.side==="new"?E.lineNumber:O.newLineNumber;if(k.side!=="new"||k.lineNumber===xe)G("new",O.newLineNumber);else{const ye=Math.min(k.lineNumber,xe),ke=Math.max(k.lineNumber,xe);G("new",[ye,ke])}B(!1),A(null),C(null)}})]})]}),y.jsx("td",{className:`w-1/2 p-0 align-top relative ${yx(O.newLine,bx(O.newLine))} ${I("new",O)} ${ge?fe:""}`,children:O.newLine&&y.jsx("div",{className:"flex items-center relative min-h-[20px] px-3",children:O.wordLevelDiff?y.jsx(Zd,{segments:O.wordLevelDiff.newSegments,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(qa,{code:O.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})})})]}),L.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:L.map(ve=>{const xe=ve.side||"new";let ye;return xe==="old"&&O.oldLineNumber?ye="left":xe==="new"&&O.newLineNumber?ye="right":ye=J(O),y.jsx("div",{className:`flex ${ye==="left"?"justify-start":ye==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${ye==="full"?"w-full":"w-1/2"} m-2 mx-4`,children:y.jsx(lh,{comment:ve,onGeneratePrompt:s,onRemoveComment:u,onUpdateComment:c})})},ve.id)})})}),q&&(q.side==="old"&&q.lineNumber===O.oldLineNumber||q.side==="new"&&q.lineNumber===O.newLineNumber||Array.isArray(q.lineNumber)&&(q.side==="new"&&q.lineNumber[1]===O.newLineNumber||q.side==="old"&&q.lineNumber[1]===O.oldLineNumber))&&y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:4,className:"p-0",children:y.jsx("div",{className:`flex ${q.side==="old"?"justify-start":q.side==="new"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:"w-1/2",children:y.jsx(U0,{onSubmit:$,onCancel:M})})})})})]},z)})})})})}const Y5=j.memo(function({chunk:r,chunkIndex:l,comments:a,onAddComment:s,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f,mode:p=Va,syntaxTheme:h,cursor:b=null,fileIndex:g=0,onLineClick:v,commentTrigger:x,onCommentTriggerHandled:w,filename:k,onOpenInEditor:A}){const[E,C]=j.useState(null),[T,B]=j.useState(null),[q,D]=j.useState(!1),[U,V]=j.useState(null),[G,M]=j.useState(null);j.useEffect(()=>{if(x?.lineIndex!==void 0){const z=r.lines[x.lineIndex];if(z){const Q=z.newLineNumber||z.oldLineNumber,R=z.type==="delete"?"old":"new";Q&&(V({side:R,lineNumber:Q}),w?.())}}},[x,r.lines,w]),j.useEffect(()=>{if(q){const z=()=>{D(!1),C(null),B(null)};return document.addEventListener("mouseup",z),()=>{document.removeEventListener("mouseup",z)}}},[q]);const $=j.useCallback((z,Q)=>{U?.side===z&&U?.lineNumber===Q?V(null):V({side:z,lineNumber:Q})},[U]),Y=j.useCallback(()=>{V(null)},[]),J=j.useCallback(async z=>{U!==null&&(await s(U.lineNumber,z,void 0,U.side),V(null))},[U,s]),I=(z,Q)=>a.filter(R=>{const L=Array.isArray(R.line)?R.line[1]===z:R.line===z,H=!R.side||R.side===Q;return L&&H}),X=z=>{if(p==="unified")return"full";switch(z.type){case"delete":return"left";case"add":return"right";default:return"full"}},F=(z,Q)=>{if(!z)return"";if(q&&E&&T){const R=Math.min(E,T),L=Math.max(E,T);if(z>=R&&z<=L){let H="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 z===R&&(H+=" after:border-t-2"),z===L&&(H+=" after:border-b-2"),H}}if(U&&U.side===Q){const R=Array.isArray(U.lineNumber)?U.lineNumber[0]:U.lineNumber,L=Array.isArray(U.lineNumber)?U.lineNumber[1]:U.lineNumber;if(z>=R&&z<=L)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""},O=j.useMemo(()=>{const z=new Map,Q=r.lines;let R=0;for(;R<Q.length;){const L=Q[R];if(!L){R++;continue}if(L.type==="delete"){let H=R+1;for(;H<Q.length&&Q[H]?.type==="delete";)H++;const N=Q.slice(R,H),re=R,ce=[];for(;H<Q.length&&Q[H]?.type==="add";){const pe=Q[H];pe&&ce.push({line:pe,index:H}),H++}const de=Math.max(N.length,ce.length);for(let pe=0;pe<de;pe++){const ge=N[pe],fe=ce[pe];if(ge&&fe&&I0(ge.content,fe.line.content)){const ve=F0(ge.content,fe.line.content);z.set(re+pe,ve.oldSegments),z.set(fe.index,ve.newSegments)}}R=H}else R++}return z},[r.lines]);return p==="split"?y.jsx(G5,{chunk:r,chunkIndex:l,comments:a,onAddComment:s,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f,onOpenInEditor:A,syntaxTheme:h,cursor:b,fileIndex:g,onLineClick:v,filename:k,commentTrigger:x,onCommentTriggerHandled:w}):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((z,Q)=>{const R=z.newLineNumber||z.oldLineNumber||0,L=z.type==="delete"?"old":"new",H=U?Array.isArray(U.lineNumber)?U.lineNumber[1]:U.lineNumber:null,N=z.type==="delete"?z.oldLineNumber:z.newLineNumber,re=z.type==="delete"?"old":"new",ce=N?I(N,re):[],de=`file-${g}-chunk-${l}-line-${Q}`,pe=b&&b.chunkIndex===l&&b.lineIndex===Q;return y.jsxs(Xt.Fragment,{children:[y.jsx(q0,{line:z,index:Q,lineId:de,isCurrentLine:pe||!1,hoveredLineIndex:G,selectedLineStyle:F(z.newLineNumber||z.oldLineNumber,z.type==="delete"?"old":"new"),onMouseEnter:()=>{M(Q)},onMouseLeave:()=>M(null),onMouseMove:()=>{if(q&&E){const ge=z.newLineNumber||z.oldLineNumber;ge&&B(ge)}},onCommentButtonMouseDown:ge=>{ge.stopPropagation();const fe=z.newLineNumber||z.oldLineNumber;fe&&(C(fe),B(fe),D(!0))},onCommentButtonMouseUp:ge=>{ge.stopPropagation();const fe=z.newLineNumber||z.oldLineNumber,ve=z.type==="delete"?"old":"new";if(!fe||!E){D(!1),C(null),B(null);return}const xe=T||fe;if(E===xe)$(ve,fe);else{const ye=Math.min(E,xe),ke=Math.max(E,xe);$(ve,[ye,ke])}D(!1),C(null),B(null)},onOpenInEditor:A&&z.type!=="delete"&&(z.newLineNumber||z.oldLineNumber)?()=>{const ge=z.newLineNumber||z.oldLineNumber;ge&&k&&A(k,ge)}:void 0,syntaxTheme:h,filename:k,diffSegments:O.get(Q),onClick:()=>{const ge=z.type==="delete"?"left":"right";v?.(g,l,Q,ge)}}),ce.map(ge=>{const fe=X(z);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 ${fe==="left"?"justify-start":fe==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${fe==="full"?"w-full":"w-1/2"} m-2 mx-4`,children:y.jsx(lh,{comment:ge,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f})})})})},ge.id)}),U&&U.side===L&&H===R&&y.jsx("tr",{className:"bg-[var(--bg-secondary)]",children:y.jsx("td",{colSpan:3,className:"p-0",children:y.jsx("div",{className:`flex ${X(z)==="left"?"justify-start":X(z)==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${X(z)==="full"?"w-full":"w-1/2"}`,children:y.jsx(U0,{onSubmit:J,onCancel:Y})})})})})]},Q)})})})})}),od=20,sd=j.memo(function({direction:r,hiddenLines:l,onExpandUp:a,onExpandDown:s,onExpandAll:u,isLoading:c=!1}){if(l<=0)return null;const f=`${l} ${l===1?"line":"lines"}`,p=l<=od,h="grid-cols-[var(--line-number-width)_1fr]",b="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",g=[];return p?g.push({key:"all",onClick:u,ariaLabel:`Expand all ${l} hidden lines`,icon:y.jsx(qS,{size:16,"aria-hidden":"true"})}):((r==="up"||r==="both")&&g.push({key:"up",onClick:a,ariaLabel:`Expand ${od} hidden lines above`,icon:y.jsx(Y2,{size:12,"aria-hidden":"true",className:"translate-y-0.5"})}),(r==="down"||r==="both")&&g.push({key:"down",onClick:s,ariaLabel:`Expand ${od} hidden lines below`,icon:y.jsx(V2,{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 ${h}`,children:[y.jsx("div",{className:"flex flex-col items-stretch justify-center gap-0.5 border-r border-github-border",children:c?y.jsx(ES,{size:14,className:"animate-spin text-github-text-muted self-center","aria-hidden":"true"}):g.map(v=>y.jsx("button",{type:"button",onClick:v.onClick,disabled:c||!v.onClick,className:b,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 Ys({file:e,comments:r,diffMode:l,syntaxTheme:a,cursor:s,fileIndex:u,mergedChunks:c,isExpandLoading:f,expandHiddenLines:p,expandAllBetweenChunks:h,onAddComment:b,onGeneratePrompt:g,onRemoveComment:v,onUpdateComment:x,onLineClick:w,onOpenInEditor:k,commentTrigger:A,onCommentTriggerHandled:E}){const C=(T,B,q,D)=>T==="top"&&B.hiddenLinesBefore>0?y.jsx(sd,{direction:"down",hiddenLines:B.hiddenLinesBefore,onExpandDown:()=>p(e,q,"up"),onExpandAll:()=>h(e,q,B.hiddenLinesBefore),isLoading:f}):T==="middle"&&B.hiddenLinesBefore>0?y.jsx(sd,{direction:"both",hiddenLines:B.hiddenLinesBefore,onExpandUp:()=>p(e,q-1,"down"),onExpandDown:()=>p(e,q,"up"),onExpandAll:()=>h(e,q,B.hiddenLinesBefore),isLoading:f}):T==="bottom"&&B.hiddenLinesAfter>0?y.jsx(sd,{direction:"up",hiddenLines:B.hiddenLinesAfter,onExpandUp:()=>p(e,D,"down"),onExpandAll:()=>p(e,D,"down",B.hiddenLinesAfter),isLoading:f}):null;return y.jsx(y.Fragment,{children:c.map((T,B)=>{const q=B===0,D=B===c.length-1,U=T.originalIndices[0]??0,V=T.originalIndices[T.originalIndices.length-1]??0;return y.jsxs(Xt.Fragment,{children:[q&&C("top",T,U,V),!q&&C("middle",T,U,V),y.jsx("div",{id:`chunk-${e.path.replace(/[^a-zA-Z0-9]/g,"-")}-${B}`,children:y.jsx(Y5,{chunk:T,chunkIndex:B,comments:r,onAddComment:b,onGeneratePrompt:g,onRemoveComment:v,onUpdateComment:x,onOpenInEditor:k,mode:l,syntaxTheme:a,cursor:s&&s.chunkIndex===B?s:null,fileIndex:u,onLineClick:w,commentTrigger:A&&A.chunkIndex===B?A:null,onCommentTriggerHandled:E,filename:e.path})}),D&&C("bottom",T,U,V)]},B)})})}const bi=["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"],X5=e=>e.type==="delete"||e.type==="remove",Z5=e=>e.type==="normal"||e.type==="context",Xs=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),Qd=(e,r,l)=>{const a=e[e.length-1];if(a&&a.type===r){a.lines.push(l);return}e.push({type:r,lines:[l]})},ud=(e,r)=>{r.forEach(l=>Qd(e,"delete",l)),r.length=0},Q5=e=>{const r=[],l=[];let a=!1;return e.forEach(s=>{s.lines.forEach(u=>{if(!(u.type==="header"||u.type==="hunk")){if(X5(u)){l.push(u.content);return}if(u.type==="add"){l.length>0&&(ud(r,l),a=!0),Qd(r,a?"change":"add",u.content);return}Z5(u)&&(ud(r,l),a=!1,Qd(r,"context",u.content))}}),ud(r,l),a=!1}),r},K5=e=>Xt.isValidElement(e),J5=e=>Xt.isValidElement(e),Kd=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(Kd).join(""):K5(e)?Kd(e.props.children):"",P0=e=>({h1:({children:r})=>y.jsx("h1",{className:`${bi[0]} mt-6 mb-2 first:mt-0`,children:r}),h2:({children:r})=>y.jsx("h2",{className:`${bi[1]} mt-6 mb-2 first:mt-0`,children:r}),h3:({children:r})=>y.jsx("h3",{className:`${bi[2]} mt-6 mb-2 first:mt-0`,children:r}),h4:({children:r})=>y.jsx("h4",{className:`${bi[3]} mt-6 mb-2 first:mt-0`,children:r}),h5:({children:r})=>y.jsx("h5",{className:`${bi[4]} mt-6 mb-2 first:mt-0`,children:r}),h6:({children:r})=>y.jsx("h6",{className:`${bi[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 a=r??"";if(!a||!Xs(a))return y.jsx("span",{children:l});const s=a.startsWith("http");return y.jsx("a",{href:a,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 a=r??"";return!a||!Xs(a)?null:y.jsx("img",{src:a,alt:l??"",loading:"lazy",className:"max-w-full rounded border border-github-border"})},pre:({children:r})=>{const a=(Array.isArray(r)?r:[r]).find(J5),s=Kd(a??r),c=/language-(\S+)/.exec(a?.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})}),W5=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"}},e8=e=>/^\s*\[[^\]]+\]:\s+\S+/.test(e),t8=e=>/^\s*\[\^[^\]]+\]:\s+/.test(e),n8=e=>/^\s*<!--.*-->\s*$/.test(e),r8=e=>e.trim()===""||e8(e)||t8(e)||n8(e),l8=e=>e.every(r8),i8=({blocks:e,syntaxTheme:r})=>{const l=j.useMemo(()=>P0(r),[r]);return y.jsx("div",{className:"space-y-4",children:e.map((a,s)=>{const c=a.lines.join(`
51
+ `).trim();if(!c)return null;const f=l8(a.lines);return y.jsx("div",{className:`px-4 ${W5(a.type)}`,children:f?y.jsx("pre",{className:"whitespace-pre-wrap text-sm text-github-text-primary font-mono",children:c}):y.jsx(Nh,{remarkPlugins:[_h],urlTransform:p=>Xs(p)?p:"",components:l,children:c})},`preview-block-${s}`)})})},a8=({content:e,syntaxTheme:r})=>{const l=j.useMemo(()=>P0(r),[r]);return y.jsx("div",{className:"space-y-4",children:y.jsx(Nh,{remarkPlugins:[_h],urlTransform:a=>Xs(a)?a:"",components:l,children:e})})};function o8(e){const{file:r,baseCommitish:l,targetCommitish:a,mergedChunks:s,syntaxTheme:u}=e,[c,f]=j.useState("diff-preview"),[p,h]=j.useState(null),[b,g]=j.useState(!1),[v,x]=j.useState(null),[w,k]=j.useState(null),A=j.useMemo(()=>Q5(s),[s]),E=j.useMemo(()=>!l&&!a?null:r.status==="added"?a?{path:r.path,ref:a}:null:r.status==="deleted"?l?{path:r.oldPath||r.path,ref:l}:null:a?{path:r.path,ref:a}:l?{path:r.oldPath||r.path,ref:l}:null,[l,a,r.path,r.oldPath,r.status]),C=j.useMemo(()=>E?`${E.ref}:${E.path}`:null,[E]);return j.useEffect(()=>{if(c!=="full-preview")return;if(!E||!C){h(null),k(null),x(null),g(!1);return}let T=!1;return(C!==w||!p)&&(async()=>{C!==w&&h(null),g(!0),x(null);try{const q=encodeURIComponent(E.path),D=await fetch(`/api/blob/${q}?ref=${encodeURIComponent(E.ref)}`);if(!D.ok)throw new Error(`Failed to fetch preview: ${D.statusText}`);const U=await D.text();T||(h(U),k(C))}catch(q){T||(h(null),k(null),x(q instanceof Error?q.message:"Failed to load preview"))}finally{T||g(!1)}})(),()=>{T=!0}},[p,w,c,E,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(Qs,{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(Ts,{size:14}),"Diff Preview"]}),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(Ts,{size:14}),"Full Preview"]})]})}),c==="diff"&&y.jsx(Ys,{...e}),c==="diff-preview"&&y.jsx("div",{className:"p-4",children:y.jsx(i8,{blocks:A,syntaxTheme:u})}),c==="full-preview"&&y.jsxs("div",{className:"p-4",children:[b&&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}),!b&&!v&&p&&y.jsx(a8,{content:p,syntaxTheme:u}),!b&&!v&&!p&&y.jsx("div",{className:"text-sm text-github-text-muted",children:"Preview unavailable."})]})]})}const yi=["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"],$0={markdown:"Markdown",code:"Code",raw:"Raw",unknown:"Cell"},s8=/"cell_type"\s*:\s*"([^"]+)"/,xx=/"source"\s*:/,u8=/"execution_count"\s*:\s*(null|[0-9]+)/,c8=/"id"\s*:\s*"([^"]+)"/,f8=e=>e.type==="delete"||e.type==="remove",d8=e=>e.type==="normal"||e.type==="context",V0=e=>e.type==="add"?"add":f8(e)?"delete":d8(e)?"context":null,G0=e=>e==="markdown"||e==="code"||e==="raw"?e:"unknown",h8=e=>{const r=e.trim();if(!r.startsWith('"'))return null;let l=r;l.endsWith(",")&&(l=l.slice(0,-1));try{const a=JSON.parse(l);return typeof a=="string"?a:null}catch{return l.replace(/^"/,"").replace(/"$/,"").replace(/\\n/g,`
52
+ `).replace(/\\t/g," ").replace(/\\"/g,'"').replace(/\\\\/g,"\\")}},p8=e=>{const r=e.indexOf('"source"');if(r===-1)return null;const l=e.indexOf(":",r);if(l===-1)return null;let a=e.slice(l+1).trim();if(!a)return null;if(a.endsWith(",")&&(a=a.slice(0,-1).trim()),a.startsWith("[")){const s=a.lastIndexOf("]");if(s===-1)return null;const u=a.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(a.startsWith('"'))try{const s=JSON.parse(a);return typeof s=="string"?[s]:null}catch{return null}return null},m8=e=>{const r=g8(e);if(r)return r;const l=[];let a=null,s=!1,u=!1,c=!1;const f=()=>{a&&(a.status=s&&u?"change":s?"add":u?"delete":"context",l.push(a),a=null,s=!1,u=!1,c=!1)},p=h=>{f(),a={cellType:h,sourceLines:[],status:"context"}};return e.forEach(h=>{h.lines.forEach(b=>{const g=V0(b);if(!g)return;const v=b.content.match(s8);if(v?p(G0(v[1]??"")):!a&&xx.test(b.content)&&p("unknown"),!a)return;if(g==="add"&&(s=!0),g==="delete"&&(u=!0),!a.id){const k=b.content.match(c8);k&&(a.id=k[1])}if(a.executionCount===void 0){const k=b.content.match(u8);k&&(a.executionCount=k[1]==="null"?null:k[1])}if(xx.test(b.content)){const k=p8(b.content);if(k){k.forEach(A=>{a?.sourceLines.push({type:g,content:A})}),c=!1;return}c=!0;return}if(!c)return;if(b.content.trim().startsWith("]")){c=!1;return}const w=h8(b.content);w!==null&&a.sourceLines.push({type:g,content:w})})}),f(),{cells:l}},g8=e=>{const r=vx(e,["add","context"]),l=vx(e,["delete","context"]),a=za(r),s=za(l);if(!a&&!s||a&&a.cells.length===0&&!s)return null;const u=a?.language??s?.language;return{cells:Y0(s?.cells??[],a?.cells??[]),language:u}},vx=(e,r)=>e.flatMap(l=>l.lines).map(l=>{const a=V0(l);return!a||!r.includes(a)?null:l.content}).filter(l=>l!==null).join(`
53
+ `),za=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 a=r.metadata,s=b8(a);return{cells:l.map(u=>y8(u)),language:s}}catch{return null}},b8=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 a=r.kernelspec;if(a&&typeof a=="object"){const s=a.language;if(typeof s=="string"&&s.trim())return s}},y8=e=>{const r=typeof e=="object"&&e?e:{},l=typeof r.cell_type=="string"?r.cell_type:"",a=G0(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=x8(r.source);return{cellType:a,sourceText:f,id:s,executionCount:c}},x8=e=>typeof e=="string"?e:Array.isArray(e)?e.filter(r=>typeof r=="string").join(""):"",Y0=(e,r)=>{const l=[];if(e.some(u=>!!u.id)||r.some(u=>!!u.id)){const u=new Map;e.forEach((f,p)=>{f.id&&u.set(f.id,{cell:f,index:p})});const c=new Set;return r.forEach(f=>{const p=f.id?u.get(f.id):void 0;p&&c.add(p.index),l.push(cd(p?.cell??null,f))}),e.forEach((f,p)=>{c.has(p)||l.push(cd(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(cd(c,f))}return l},cd=(e,r)=>{if(!r&&e)return{cellType:e.cellType,sourceLines:_a(e.sourceText,"delete"),status:"delete",id:e.id,executionCount:e.executionCount};if(r&&!e)return{cellType:r.cellType,sourceLines:_a(r.sourceText,"add"),status:"add",id:r.id,executionCount:r.executionCount};const l=e?.sourceText??"",a=r?.sourceText??"",s=r?.cellType??e?.cellType??"unknown",u=r?.id??e?.id,c=r?.executionCount??e?.executionCount;return l===a&&(e?.cellType??"")===(r?.cellType??"")?{cellType:s,sourceLines:_a(a,"context"),status:"context",id:u,executionCount:c}:{cellType:s,sourceLines:[..._a(l,"delete"),..._a(a,"add")],status:"change",id:u,executionCount:c}},_a=(e,r)=>e?[{type:r,content:e}]:[],fd=e=>!!(e&&e!=="stdin"),dd=async(e,r)=>{const l=encodeURIComponent(e),a=await fetch(`/api/blob/${l}?ref=${encodeURIComponent(r)}`);return a.ok?a.text():null},Ai=(e,r)=>e.filter(l=>r.includes(l.type)).map(l=>l.content).join(""),hd=e=>{if(!e)return[];const r=e.split(`
54
+ `);return r.length>0&&r[r.length-1]===""&&r.pop(),r},X0=(e,r)=>!e&&!r?[]:e?r?z5(e,r).flatMap(l=>{const a=l.added?"add":l.removed?"delete":"context";return hd(l.value).map(s=>({type:a,content:s}))}):hd(e).map(l=>({type:"delete",content:l})):hd(r).map(l=>({type:"add",content:l})),v8=e=>Xt.isValidElement(e),w8=e=>Xt.isValidElement(e),Jd=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(Jd).join(""):v8(e)?Jd(e.props.children):"",S8=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"}},wx=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"}},k8=e=>{switch(e){case"add":return"bg-diff-addition-bg";case"delete":return"bg-diff-deletion-bg";default:return"bg-transparent"}},E8=e=>{switch(e){case"add":return"+";case"delete":return"-";default:return" "}},C8=e=>{switch(e){case"add":return"text-github-accent";case"delete":return"text-github-danger";default:return"text-github-text-muted"}},Wd=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),A8=e=>({h1:({children:r})=>y.jsx("h1",{className:`${yi[0]} mb-2`,children:r}),h2:({children:r})=>y.jsx("h2",{className:`${yi[1]} mb-2`,children:r}),h3:({children:r})=>y.jsx("h3",{className:`${yi[2]} mb-2`,children:r}),h4:({children:r})=>y.jsx("h4",{className:`${yi[3]} mb-2`,children:r}),h5:({children:r})=>y.jsx("h5",{className:`${yi[4]} mb-2`,children:r}),h6:({children:r})=>y.jsx("h6",{className:`${yi[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 a=r??"";if(!a||!Wd(a))return y.jsx("span",{children:l});const s=a.startsWith("http");return y.jsx("a",{href:a,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 a=r??"";return!a||!Wd(a)?null:y.jsx("img",{src:a,alt:l??"",loading:"lazy",className:"max-w-full rounded border border-github-border"})},pre:({children:r})=>{const a=(Array.isArray(r)?r:[r]).find(w8),s=Jd(a??r),c=/language-(\S+)/.exec(a?.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})}),N8=e=>{const r=Ai(e.sourceLines,["context","delete"]),l=Ai(e.sourceLines,["context","add"]),a=[];return e.status==="change"?(r.trim()&&a.push({label:"Before",content:r,tone:"before"}),l.trim()&&a.push({label:"After",content:l,tone:"after"}),a.length===0&&a.push({label:"After",content:l,tone:"after"}),a):e.status==="delete"?(a.push({label:"Before",content:r||l,tone:"before"}),a):(a.push({label:"After",content:l||r,tone:"after"}),a)},Z0=(e,r,l,a)=>{if(!r.trim())return y.jsx("span",{className:"text-xs text-github-text-muted",children:"Empty cell"});if(e==="markdown"){const s=A8(l);return y.jsx(Nh,{remarkPlugins:[_h],urlTransform:u=>Wd(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(qa,{code:r.replace(/\n$/,""),language:a||"python",syntaxTheme:l,className:"font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre"})})},T8=({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((a,s)=>y.jsxs("div",{className:`flex items-start min-h-[16px] ${k8(a.type)}`,children:[y.jsx("span",{className:`w-5 text-center flex-shrink-0 select-none ${C8(a.type)}`,children:E8(a.type)}),y.jsx(qa,{code:a.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}`))})}),j8=({cells:e,syntaxTheme:r,language:l})=>y.jsx("div",{className:"space-y-4",children:e.map((a,s)=>{const u=N8(a),c=a.cellType==="code"&&a.executionCount!==void 0?`In[${a.executionCount??" "}]`:null,f=a.cellType==="code",p=f?X0(Ai(a.sourceLines,["context","delete"]),Ai(a.sourceLines,["context","add"])).filter(h=>h.type!=="context"):[];return f&&p.length===0?null:y.jsxs("div",{className:`rounded border border-github-border bg-github-bg-secondary/40 p-4 ${S8(a.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:$0[a.cellType]}),c&&y.jsx("span",{className:"text-xs font-mono text-github-text-secondary",children:c}),a.id&&y.jsx("span",{className:"text-xs font-mono text-github-text-muted",children:a.id})]})}),y.jsx("div",{className:"space-y-3",children:f?y.jsx("div",{className:`px-4 py-3 ${wx(a.status==="delete"?"before":"after")}`,children:y.jsx(T8,{lines:p,syntaxTheme:r,language:l})}):u.map((h,b)=>y.jsx("div",{className:`px-4 py-3 ${wx(h.tone)}`,children:y.jsx("div",{className:"text-sm text-github-text-primary",children:Z0(a.cellType,h.content,r,l)})},`notebook-cell-${s}-section-${b}`))})]},`notebook-cell-${s}`)})}),R8=({cells:e,syntaxTheme:r,language:l})=>y.jsx("div",{className:"space-y-4",children:e.map((a,s)=>{const u=a.cellType==="code"&&a.executionCount!==void 0?`In[${a.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:$0[a.cellType]}),u&&y.jsx("span",{className:"text-xs font-mono text-github-text-secondary",children:u}),a.id&&y.jsx("span",{className:"text-xs font-mono text-github-text-muted",children:a.id})]}),y.jsx("div",{className:"text-sm text-github-text-primary",children:Z0(a.cellType,a.sourceText,r,l)})]},`notebook-full-cell-${s}`)})});function _8(e){const{file:r,baseCommitish:l,targetCommitish:a}=e,[s,u]=j.useState("diff-preview"),c=j.useMemo(()=>m8(e.mergedChunks),[e.mergedChunks]),[f,p]=j.useState({status:"idle",cells:c.cells,language:c.language}),h=j.useMemo(()=>f.cells.filter(D=>D.status==="context"?!1:D.cellType!=="code"?!0:X0(Ai(D.sourceLines,["context","delete"]),Ai(D.sourceLines,["context","add"])).filter(V=>V.type!=="context").length>0),[f.cells]),[b,g]=j.useState(null),[v,x]=j.useState(c.language),[w,k]=j.useState(!1),[A,E]=j.useState(null),[C,T]=j.useState(null),B=j.useMemo(()=>!l&&!a?null:r.status==="added"?a?{path:r.path,ref:a}:null:r.status==="deleted"?l?{path:r.oldPath||r.path,ref:l}:null:a?{path:r.path,ref:a}:l?{path:r.oldPath||r.path,ref:l}:null,[l,a,r.oldPath,r.path,r.status]),q=j.useMemo(()=>B?`${B.ref}:${B.path}`:null,[B]);return j.useEffect(()=>{let D=!1;return(async()=>{const V=l||"HEAD~1",G=a||"HEAD",M=r.oldPath||r.path,$=r.status!=="added"&&fd(V),Y=r.status!=="deleted"&&fd(G);if(!$&&!Y){p({status:"ready",cells:c.cells,language:c.language,source:"diff",message:"Notebook content could not be loaded, falling back to diff preview."});return}p(J=>({...J,status:"loading"}));try{const[J,I]=await Promise.all([$?dd(M,V):Promise.resolve(null),Y?dd(r.path,G):Promise.resolve(null)]),X=J?za(J):null,F=I?za(I):null;if(!X&&!F){D||p({status:"ready",cells:c.cells,language:c.language,source:"diff",message:"Notebook content could not be parsed, falling back to diff preview."});return}const O=F?.language??X?.language??c.language,z=Y0(X?.cells??[],F?.cells??[]);D||p({status:"ready",cells:z,source:"blob",language:O})}catch(J){D||p({status:"error",cells:c.cells,language:c.language,source:"diff",message:J instanceof Error?J.message:"Failed to load notebook preview."})}})(),()=>{D=!0}},[l,r.oldPath,r.path,r.status,e.mergedChunks,a,c]),j.useEffect(()=>{if(s!=="full-preview")return;if(!B||!q||!fd(B.ref)){g(null),T(null),E(null),k(!1);return}let D=!1;return(q!==C||!b)&&(async()=>{q!==C&&g(null),k(!0),E(null);try{const V=await dd(B.path,B.ref);if(!V)throw new Error("Failed to load preview.");const G=za(V);if(!G)throw new Error("Notebook content could not be parsed.");D||(g(G.cells),x(G.language??c.language),T(q))}catch(V){D||(g(null),T(null),E(V instanceof Error?V.message:"Failed to load preview"))}finally{D||k(!1)}})(),()=>{D=!0}},[c.language,b,C,s,B,q]),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(Qs,{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(Ts,{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(Ts,{size:14}),"Full Preview"]})]})}),s==="diff"&&y.jsx(Ys,{...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}),h.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(Ys,{...e})]}):y.jsx(j8,{cells:h,syntaxTheme:e.syntaxTheme,language:f.language})]}),s==="full-preview"&&y.jsxs("div",{className:"p-4",children:[w&&y.jsx("div",{className:"text-sm text-github-text-muted mb-3",children:"Loading preview..."}),A&&y.jsx("div",{className:"text-sm text-github-danger mb-3",children:A}),!w&&!A&&b&&y.jsx(R8,{cells:b,syntaxTheme:e.syntaxTheme,language:v??c.language}),!w&&!A&&!b&&y.jsx("div",{className:"text-sm text-github-text-muted",children:"Preview unavailable."})]})]})}const pd=[{id:"image",match:e=>GE(e.path),Component:KE,canExpandHiddenLines:()=>!1},{id:"markdown",match:e=>XE(e.path),Component:o8,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"},{id:"notebook",match:e=>QE(e.path),Component:_8,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"},{id:"default",match:()=>!0,Component:Ys,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"}],L8=e=>{const r=pd[pd.length-1];if(!r)throw new Error("No diff viewers registered");return pd.find(l=>l.match(e))??r},D8=e=>{switch(e){case"added":return y.jsx(Px,{size:16,className:"text-github-accent"});case"deleted":return y.jsx($x,{size:16,className:"text-github-danger"});case"renamed":return y.jsx(qx,{size:16,className:"text-github-warning"});default:return y.jsx(Qs,{size:16,className:"text-github-text-secondary"})}},O8=({file:e,isCollapsed:r,isReviewed:l,onToggleCollapsed:a,onToggleAllCollapsed:s,onToggleReviewed:u})=>{const[c,f]=j.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:p=>{p.altKey?s(!r):a(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(Ux,{size:16}):y.jsx($a,{size:16})}),D8(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(p=>{console.error("Failed to copy file path:",p)})},title:"Copy file path",children:c?y.jsx(Fa,{size:14}):y.jsx(Hx,{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(Fa,{size:14}):y.jsx(FS,{size:14}),"Viewed"]})]})]})},M8=e=>{const r={old:[],new:[]};return e.forEach(l=>{const a=l.side??"new",[s,u]=Array.isArray(l.line)?[l.line[0],l.line[1]]:[l.line,l.line];s<=0||u<=0||r[a].push({start:Math.min(s,u),end:Math.max(s,u)})}),r},z8=(e,r)=>e.chunks.map((l,a)=>{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:a}}).filter(l=>!!l),B8=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 a=e[e.length-1];return a&&r.push({type:"after",start:a.end+1,end:Number.POSITIVE_INFINITY,prevChunkIndex:a.index}),r},F8=e=>{const r=new Map;return e.forEach(l=>{const a=l.originalIndices[0];a!==void 0&&r.set(a,l)}),r},I8=e=>{const r=e[e.length-1];return r?.originalIndices[r.originalIndices.length-1]??null},U8=j.memo(function({file:r,comments:l,diffMode:a,reviewedFiles:s,onToggleReviewed:u,collapsedFiles:c,onToggleCollapsed:f,onToggleAllCollapsed:p,onAddComment:h,onGeneratePrompt:b,onRemoveComment:g,onUpdateComment:v,onOpenInEditor:x,syntaxTheme:w,baseCommitish:k,targetCommitish:A,cursor:E=null,fileIndex:C=0,onLineClick:T,commentTrigger:B,onCommentTriggerHandled:q,mergedChunks:D,expandLines:U,expandAllBetweenChunks:V,prefetchFileContent:G,isExpandLoading:M}){const $=c.has(r.path),Y=j.useRef(null),[J,I]=j.useState(!1),X=L8(r),F=X.canExpandHiddenLines?.(r)??!1;j.useEffect(()=>{if(!F)return;const L=Y.current;if(!L)return;const H=new IntersectionObserver(([N])=>{N?.isIntersecting&&I(!0)},{rootMargin:"200px"});return H.observe(L),()=>H.disconnect()},[F]),j.useEffect(()=>{J&&!$&&F&&G(r)},[J,$,F,r,G]);const O=j.useCallback(async(L,H,N,re)=>{try{await h(r.path,L,H,N,re)}catch(ce){console.error("Failed to add comment:",ce)}},[r.path,h]);j.useEffect(()=>{if($||M||!F||l.length===0||r.chunks.length===0||D.length===0)return;const L=M8(l),H=F8(D),N=I8(D),re=D[D.length-1],ce=new Set,de=(pe,ge)=>{ce.has(pe)||(ce.add(pe),ge())};["old","new"].forEach(pe=>{const ge=L[pe];if(ge.length===0)return;const fe=z8(r,pe);B8(fe).forEach(xe=>{if(!ge.some(Ve=>Ve.start<=xe.end&&Ve.end>=xe.start))return;if(xe.type==="after"&&re&&N!==null){re.hiddenLinesAfter>0&&de(`after-${N}`,()=>{U(r,N,"down",re.hiddenLinesAfter)});return}const ke=xe.nextChunkIndex;if(ke===void 0)return;const Ne=H.get(ke);!Ne||Ne.hiddenLinesBefore<=0||(xe.type==="before"?de(`before-${ke}`,()=>{U(r,ke,"up",Ne.hiddenLinesBefore)}):xe.type==="between"&&de(`between-${ke}`,()=>{V(r,ke,Ne.hiddenLinesBefore)}))})})},[l,V,U,r,$,M,D,F]);const z="4em",Q=X.Component,R={file:r,comments:l,diffMode:a,syntaxTheme:w,baseCommitish:k,targetCommitish:A,cursor:E,fileIndex:C,mergedChunks:D,isExpandLoading:M,expandHiddenLines:U,expandAllBetweenChunks:V,onAddComment:O,onGeneratePrompt:b,onRemoveComment:g,onUpdateComment:v,onOpenInEditor:x,onLineClick:T,commentTrigger:B,onCommentTriggerHandled:q};return y.jsxs("div",{ref:Y,className:"bg-github-bg-primary",style:{"--line-number-width":z},children:[y.jsx(O8,{file:r,isCollapsed:$,isReviewed:s.has(r.path),onToggleCollapsed:f,onToggleAllCollapsed:p,onToggleReviewed:u}),!$&&y.jsx("div",{className:"overflow-y-auto",children:y.jsx(Q,{...R})})]})});function H8(e){const r={name:"",path:"",isDirectory:!0,children:[]};e.forEach(a=>{const s=a.path.split("/");let u=r;for(let c=0;c<s.length;c++){const f=s[c];if(!f)continue;const p=c===s.length-1,h=s.slice(0,c+1).join("/");u.children||(u.children=[]);let b=u.children.find(g=>g.name===f);b||(b={name:f,path:h,isDirectory:!p,children:p?void 0:[],file:p?a:void 0},u.children.push(b)),u=b}});const l=a=>{if(!a.isDirectory||!a.children)return a;if(a.children=a.children.map(l),a.children.length===1&&a.children[0]?.isDirectory&&a.children[0]?.children){const s=a.children[0];if(s)return a.name?{...a,name:`${a.name}/${s.name}`,path:s.path,children:s.children}:a}return a};return l(r)}function q8({files:e,onScrollToFile:r,comments:l,reviewedFiles:a,onToggleReviewed:s,selectedFileIndex:u}){const c=H8(e),f=j.useRef(null),p=j.useRef(new Map),h={"--dir-row-height":"calc(var(--spacing, 0.25rem) * 9)"},b=V=>{if(!V.isDirectory||!V.children)return[];const G=[];return V.path&&G.push(V.path),V.children.forEach(M=>{G.push(...b(M))}),G},[g,v]=j.useState(()=>new Set(b(c))),[x,w]=j.useState(""),k=V=>l.filter(G=>G.file===V).length,A=j.useMemo(()=>{const V=G=>{if(!x.trim())return G;if(G.isDirectory&&G.children){const M=G.children.map($=>V($)).filter($=>$!==null);return M.length>0?{...G,children:M}:null}else if(G.file)return G.file.path.toLowerCase().includes(x.toLowerCase())?G:null;return null};return V(c)||{...c,children:[]}},[c,x]),E=V=>{switch(V){case"added":return y.jsx(Px,{size:16,className:"text-github-accent"});case"deleted":return y.jsx($x,{size:16,className:"text-github-danger"});case"renamed":return y.jsx(qx,{size:16,className:"text-github-warning"});default:return y.jsx(Qs,{size:16,className:"text-github-text-secondary"})}},C=V=>{v(G=>{const M=new Set(G);return M.has(V)?M.delete(V):M.add(V),M})},T=b(c),B=g.size===T.length&&T.length>0,q=()=>{v(B?new Set:new Set(T))},D=(V,G)=>{const M=f.current,$=V.currentTarget;if(!M){C(G);return}const Y=M.getBoundingClientRect(),J=$.getBoundingClientRect(),I=Number.parseFloat(getComputedStyle($).top||"0");if(J.top-Y.top<=I+1){const z=p.current.get(G)?.querySelector('[data-tree-row="true"]:not([data-dir-header="true"])'),Q=$.getBoundingClientRect().height||0,R=z??$,L=Number.parseInt(R.dataset.depth||$.dataset.depth||"0",10),H=Q*L,N=Math.max(0,R.offsetTop-H);if(Math.abs(M.scrollTop-N)<=1){C(G);return}M.scrollTo({top:N,behavior:"smooth"});return}C(G)},U=(V,G=0)=>{if(V.isDirectory&&V.children){const M=g.has(V.path);return y.jsxs("div",{"data-dir-container":V.path||void 0,ref:$=>{V.path&&($?p.current.set(V.path,$):p.current.delete(V.path))},children:[V.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":G,style:{paddingLeft:`${G*16+16}px`,top:`calc(${G} * var(--dir-row-height))`,zIndex:1e3-G},onClick:$=>D($,V.path),children:[M?y.jsx($a,{size:16}):y.jsx(Ux,{size:16}),M?y.jsx(gS,{size:16,className:"text-github-text-secondary"}):y.jsx(yS,{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:V.name,children:V.name})]}),(M||!V.name)&&V.children.map($=>U($,V.name?G+1:G))]},V.path)}else if(V.file){const M=V.file,$=k(M.path),Y=a.has(M.path),J=e.findIndex(X=>X.path===M.path),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 ${Y?"opacity-70":""} ${I?"bg-github-bg-tertiary":""}`,"data-file-row":"true","data-tree-row":"true","data-depth":G,style:{paddingLeft:`${G*16+16}px`},onClick:()=>r(M.path),children:[y.jsx(Yx,{checked:Y,onChange:()=>{s(M.path)},title:Y?"Mark as not reviewed":"Mark as reviewed",className:"z-10"}),E(V.file.status),y.jsx("span",{className:`text-sm text-github-text-primary flex-1 overflow-hidden text-ellipsis whitespace-nowrap ${Y?"line-through text-github-text-muted":""}`,title:V.file.path,children:V.name}),$>0&&y.jsxs("span",{className:"text-github-warning text-sm font-medium ml-auto flex items-center gap-1",children:[y.jsx(Vx,{size:14}),$]})]},M.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:q,className:"p-1 hover:bg-github-bg-primary rounded transition-colors",title:B?"Collapse all":"Expand all",children:B?y.jsx(eS,{size:16,className:"text-github-text-secondary"}):y.jsx(nS,{size:16,className:"text-github-text-secondary"})})]}),y.jsxs("div",{className:"relative",children:[y.jsx(MS,{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:x,onChange:V=>w(V.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:h,ref:f,children:A.children?.map(V=>U(V))})]})}function P8({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 $8({isOpen:e,onClose:r}){const{enableScope:l,disableScope:a}=Pa();return lt("escape",()=>r(),{enabled:e},[r,e]),j.useEffect(()=>(e?a("navigation"):l("navigation"),()=>{l("navigation")}),[e,l,a]),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(Ks,{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 V8({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 G8({shouldReload:e,isReloading:r,onReload:l,changeType:a,className:s=""}){if(!e)return null;const u=()=>{switch(a){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:`
55
+ flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md border ${s}
56
+ ${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"}
57
+ `,title:`${u()} - Click to refresh`,children:[y.jsx(DS,{size:12,className:`${r?"animate-spin":""}`}),"Refresh"]})}function Sx({label:e,value:r,resolvedValue:l,onChange:a,options:s,disabledValues:u=[]}){const[c,f]=j.useState(!1),{refs:p,floatingStyles:h,context:b}=Ld({open:c,onOpenChange:f,middleware:[Cd(4),Nd(),Ad({padding:8})],whileElementsMounted:Ed}),g=Td(b,{handleClose:Md()}),v=Rd(b),x=IE(b),w=_d(b),k=Od(b),{getReferenceProps:A,getFloatingProps:E}=Dd([g,v,x,w,k]),C=r==="working"&&u.includes("staged")||r==="staged"&&u.includes("working"),T=()=>{const G=s.specialOptions.find(Y=>Y.value===r);if(G)return G.label;const M=s.branches.find(Y=>Y.name===r);if(M)return`${M.name}${M.current?" (current)":""}`;const $=s.commits.find(Y=>Y.shortHash===r||Y.hash===r);return $?`${$.shortHash} - ${$.message}`:r||"Select..."},B=G=>{a(G),f(!1)},q=G=>u.includes(G),D=(G,M)=>["w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors",G?"hover:bg-diff-selected-bg focus:bg-diff-selected-bg":"hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary",G?"bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2":"",M?"opacity-50 cursor-not-allowed":"cursor-pointer"].join(" "),U=(G,M)=>G===r||M===r?!0:l?G===l||M===l:!1,V=()=>{let G=0;const M=s.specialOptions.findIndex($=>$.value===r);if(M!==-1)return M;if(G+=s.specialOptions.length,!C){const $=s.commits.findIndex(J=>J.shortHash===r);if($!==-1)return G+$;G+=s.commits.length;const Y=s.branches.findIndex(J=>J.name===r);if(Y!==-1)return G+Y}return 0};return y.jsxs(y.Fragment,{children:[y.jsxs("button",{ref:p.setReference,type:"button",className:"flex items-center gap-1.5 cursor-pointer group","aria-haspopup":"listbox","aria-expanded":c,...A(),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:T()}),y.jsx($a,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]})]}),c&&y.jsx(jd,{children:y.jsx(OE,{context:b,modal:!1,initialFocus:V(),children:y.jsxs("div",{ref:p.setFloating,style:h,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(G=>y.jsx("button",{onClick:()=>B(G.value),disabled:q(G.value),className:D(G.value===r,q(G.value)),children:G.label},G.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(G=>y.jsx("button",{onClick:()=>B(G.shortHash),disabled:q(G.shortHash),className:D(U(G.shortHash,G.hash),q(G.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:G.shortHash}),y.jsx("span",{className:"text-xs text-github-text-secondary flex-1 break-words",children:G.message})]})},G.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(G=>y.jsx("button",{onClick:()=>B(G.name),disabled:q(G.name),className:D(G.name===r,q(G.name)),children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-github-text-primary",children:G.name}),G.current&&y.jsx("span",{className:"text-xs text-github-text-muted",children:"(current)"})]})},G.name))]})]})})})]})}function Y8({isOpen:e,onClose:r,options:l,baseRevision:a,targetRevision:s,resolvedBaseRevision:u,resolvedTargetRevision:c,onApply:f}){const[p,h]=j.useState(a),[b,g]=j.useState(s),{enableScope:v,disableScope:x}=Pa();j.useEffect(()=>(e?x("navigation"):v("navigation"),()=>{v("navigation")}),[e,v,x]);const w=j.useMemo(()=>{const E=c||b,C=l.commits.findIndex(B=>B.shortHash===E||B.hash===E);if(C===-1)return b?[b]:[];const T=l.commits.slice(0,C+1).map(B=>B.shortHash);return b&&!T.includes(b)&&T.push(b),T.includes("working")||T.push("working"),T},[b,c,l.commits]),k=j.useMemo(()=>{const E=u||p,C=l.commits.findIndex(B=>B.shortHash===E||B.hash===E);if(C===-1)return p?[p]:[];const T=l.commits.slice(C).map(B=>B.shortHash);return p&&!T.includes(p)&&T.push(p),T},[p,u,l.commits]);if(!e)return null;const A=()=>{f(p,b),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(Ks,{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(Sx,{label:"Base",value:p,resolvedValue:u,onChange:h,options:l,disabledValues:w}),y.jsx("span",{className:"text-github-text-muted",children:"..."}),y.jsx(Sx,{label:"Target",value:b,resolvedValue:c,onChange:g,options:l,disabledValues:k})]}),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:A,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 X8=[{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"]}],Q0="vscode",Z8={fontSize:14,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',theme:"dark",syntaxTheme:"vsDark",editor:Q0},Q8=[{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 K8({isOpen:e,onClose:r,settings:l,onSettingsChange:a}){const[s,u]=j.useState(l),{enableScope:c,disableScope:f}=Pa();j.useEffect(()=>{u(l)},[l]),j.useEffect(()=>{a(s)},[s,a]),j.useEffect(()=>(e?f("navigation"):c("navigation"),()=>{c("navigation")}),[e,c,f]);const p=()=>s.theme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":s.theme,h=()=>p()==="light"?sx:ux,b=v=>{const x={...s,theme:v},k=(v==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":v)==="light"?sx:ux;if(!k.some(E=>E.id===s.syntaxTheme)&&k.length>0){const E=k[0];E&&(x.syntaxTheme=E.id)}u(x)},g=()=>{u(Z8)};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(Gx,{size:20}),"Appearance Settings"]}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary p-1",children:y.jsx(Ks,{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:Q8.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:()=>b(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:h().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:X8.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:g,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 kx={position:"absolute",fontSize:"16px",pointerEvents:"none",zIndex:100,transform:"translateY(20px) scale(0.5)",opacity:0},J8=({isActive:e})=>e?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"animate-sparkle-rise",style:{...kx,left:"-12px",animationDelay:"0s"},children:"✨"}),y.jsx("div",{className:"animate-sparkle-rise",style:{...kx,right:"-12px",animationDelay:"0.3s"},children:"✨"})]}):null,Ex={fontSize:14,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',theme:"dark",syntaxTheme:"vsDark",editor:Q0},Cx="reviewit-appearance-settings";function W8(){const[e,r]=j.useState(()=>{try{const s=localStorage.getItem(Cx);if(s)return{...Ex,...JSON.parse(s)}}catch(s){console.warn("Failed to load appearance settings from localStorage:",s)}return Ex}),l=j.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 j.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(Cx,JSON.stringify(s))}catch(u){console.warn("Failed to save appearance settings to localStorage:",u)}}}}function K0(e,r,l){const a=typeof r=="number"?`L${r}`:Array.isArray(r)?`L${r[0]}-L${r[1]}`:"";return`${e||"<unknown file>"}:${a}
58
+ ${l}`}function ej(e){return e.length===0?"":e.map(l=>K0(l.file,l.line,l.body)).join(`
59
+ =====
60
+ `)}const Cs="difit-storage-v1";class tj{generateStorageKey(r,l){const a=s=>s.replace(/[^a-zA-Z0-9-_]/g,u=>`_${u.charCodeAt(0).toString(16)}_`);return`${a(r)}-${a(l)}`}normalizeCommitish(r,l,a){if(r==="."||r==="working")return"WORKING";if(r==="staged")return"STAGED";if((r==="HEAD"||r==="@")&&l)return l;if(a?.has(r)){const s=a.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,a,s,u){let c,f;l==="."||l==="working"?(c=a||r,f="WORKING"):l==="staged"?(c=a||r,f="STAGED"):(c=this.normalizeCommitish(r,a,s),f=this.normalizeCommitish(l,a,s));const p=this.generateStorageKey(c,f);return u?`${Cs}/${u}/${p}`:`${Cs}/${p}`}getDiffContextData(r,l,a,s,u){try{const c=this.getStorageKey(r,l,a,s,u),f=localStorage.getItem(c);if(!f)return null;const p=JSON.parse(f);return p.version!==1?(console.warn(`Unknown storage version: ${p.version}`),null):p}catch(c){return console.error("Error reading diff context data:",c),null}}saveDiffContextData(r,l,a,s,u,c){try{const f=this.getStorageKey(r,l,s,u,c),p={...a,baseCommitish:r,targetCommitish:l,lastModifiedAt:new Date().toISOString()};localStorage.setItem(f,JSON.stringify(p))}catch(f){f instanceof DOMException&&f.name==="QuotaExceededError"?console.error("localStorage quota exceeded"):console.error("Error saving diff context data:",f)}}getComments(r,l,a,s,u){return this.getDiffContextData(r,l,a,s,u)?.comments||[]}saveComments(r,l,a,s,u,c){const p=this.getDiffContextData(r,l,s,u,c)||{version:1,baseCommitish:r,targetCommitish:l,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),comments:[],viewedFiles:[]};p.comments=a,this.saveDiffContextData(r,l,p,s,u,c)}getViewedFiles(r,l,a,s,u){return this.getDiffContextData(r,l,a,s,u)?.viewedFiles||[]}saveViewedFiles(r,l,a,s,u,c){const p=this.getDiffContextData(r,l,s,u,c)||{version:1,baseCommitish:r,targetCommitish:l,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),comments:[],viewedFiles:[]};p.viewedFiles=a,this.saveDiffContextData(r,l,p,s,u,c)}cleanupOldData(r){const l=new Date;l.setDate(l.getDate()-r);const a=l.getTime(),s=[];for(let u=0;u<localStorage.length;u++){const c=localStorage.key(u);if(c?.startsWith(Cs))try{const f=localStorage.getItem(c);if(!f)continue;const p=JSON.parse(f);new Date(p.lastModifiedAt).getTime()<a&&s.push(c)}catch{}}s.forEach(u=>localStorage.removeItem(u))}getStorageSize(){let r=0;for(let l=0;l<localStorage.length;l++){const a=localStorage.key(l);if(!a?.startsWith(Cs))continue;const s=localStorage.getItem(a);s&&(r+=(a.length+s.length)*2)}return r}}const Ba=new tj;async function Ax(e){try{const l=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",l);return Array.from(new Uint8Array(a)).map(u=>u.toString(16).padStart(2,"0")).join("")}catch{return console.warn("Crypto API not available, using fallback hash"),nj(e)}}function nj(e){let r=0;for(let l=0;l<e.length;l++){const a=e.charCodeAt(l);r=(r<<5)-r+a,r=r&r}return Math.abs(r).toString(16)}function Nx(e){const r=e.chunks.map(l=>{const a=l.lines.filter(s=>s.type!=="hunk"&&s.type!=="header").map(s=>`${s.type}:${s.content}`).join(`
61
+ `);return`${l.header}
62
+ ${a}`}).join(`
63
+
64
+ `);return`${e.path}
65
+ ${e.status}
66
+ ${r}`}function rj(e){const r=e.split(".").pop()?.toLowerCase();return r?{js:"javascript",jsx:"javascript",ts:"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"}[r]:void 0}function lj(e,r,l,a,s){const[u,c]=j.useState([]);j.useEffect(()=>{if(!e||!r)return;const w=Ba.getComments(e,r,l,a,s);c(w)},[e,r,l,a,s]);const f=j.useCallback(w=>{!e||!r||(Ba.saveComments(e,r,w,l,a,s),c(w))},[e,r,l,a,s]),p=j.useCallback(w=>{const k={id:crypto.randomUUID(),filePath:w.filePath,body:w.body,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),position:{side:w.side,line:w.line},codeSnapshot:w.codeSnapshot||{content:"",language:rj(w.filePath)}},A=[...u,k];return f(A),k},[u,f]),h=j.useCallback(w=>{const k=u.filter(A=>A.id!==w);f(k)},[u,f]),b=j.useCallback((w,k)=>{const A=u.map(E=>E.id===w?{...E,body:k,updatedAt:new Date().toISOString()}:E);f(A)},[u,f]),g=j.useCallback(()=>{f([])},[f]),v=j.useCallback(w=>{const k=u.find(E=>E.id===w);if(!k)return"";const A=typeof k.position.line=="number"?k.position.line:[k.position.line.start,k.position.line.end];return K0(k.filePath,A,k.body)},[u]),x=j.useCallback(()=>{const w=u.map(k=>({id:k.id,file:k.filePath,line:typeof k.position.line=="number"?k.position.line:[k.position.line.start,k.position.line.end],body:k.body,timestamp:k.createdAt}));return ej(w)},[u]);return{comments:u,addComment:p,removeComment:h,updateComment:b,clearAllComments:g,generatePrompt:v,generateAllCommentsPrompt:x}}const ij=20;async function Tx(e,r){const l=encodeURIComponent(e),a=await fetch(`/api/blob/${l}?ref=${encodeURIComponent(r)}`);if(!a.ok)throw new Error(`Failed to fetch file content: ${a.statusText}`);const u=(await a.text()).split(`
67
+ `);return u.length>0&&u[u.length-1]===""&&u.pop(),{lines:u,totalLines:u.length}}async function aj(e,r,l,a){const s=encodeURIComponent(e),u=new URLSearchParams;r&&u.set("oldRef",r),l&&u.set("newRef",l),a&&a!==e&&u.set("oldPath",a);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 oj({baseCommitish:e,targetCommitish:r}){const[l,a]=j.useState({}),[s,u]=j.useState(!1),[c,f]=j.useState(null),[p,h]=j.useState(0),b=j.useRef(new Map),g=j.useRef({});g.current=l;const v=j.useCallback(async D=>{const U=b.current.get(D.path);if(U)return U;const V=(async()=>{const G=g.current[D.path];if(G?.oldContent&&G?.newContent)return G;const M={...G,expandedRanges:G?.expandedRanges||[]};if(D.status!=="added"&&e){const $=D.oldPath||D.path;try{const{lines:Y,totalLines:J}=await Tx($,e);M.oldContent=Y,M.oldTotalLines=J}catch(Y){console.error("Failed to fetch old file content:",Y),M.oldContent=[],M.oldTotalLines=0}}if(D.status!=="deleted"&&r)try{const{lines:$,totalLines:Y}=await Tx(D.path,r);M.newContent=$,M.newTotalLines=Y}catch($){console.error("Failed to fetch new file content:",$),M.newContent=[],M.newTotalLines=0}return M})();b.current.set(D.path,V);try{return await V}finally{b.current.delete(D.path)}},[e,r]),x=j.useCallback(D=>{f(D),h(U=>U+1)},[]),w=j.useCallback(async(D,U,V,G=ij)=>{u(!0);try{const M=await v(D);a($=>{const Y=$[D.path],J=Y?.expandedRanges||M.expandedRanges||[],I=J.findIndex(F=>F.chunkIndex===U&&F.direction===V),X=[...J];if(I>=0&&X[I]){const F=X[I];X[I]={chunkIndex:F.chunkIndex,direction:F.direction,count:F.count+G}}else X.push({chunkIndex:U,direction:V,count:G});return{...$,[D.path]:{oldContent:Y?.oldContent??M.oldContent,newContent:Y?.newContent??M.newContent,oldTotalLines:Y?.oldTotalLines??M.oldTotalLines,newTotalLines:Y?.newTotalLines??M.newTotalLines,expandedRanges:X}}}),x(D.path)}finally{u(!1)}},[v,x]),k=j.useCallback(async(D,U,V)=>{u(!0);try{const G=await v(D);a(M=>{const $=M[D.path],J=[...$?.expandedRanges||G.expandedRanges||[]],I=J.findIndex(L=>L.chunkIndex===U&&L.direction==="up"),X=J.findIndex(L=>L.chunkIndex===U-1&&L.direction==="down");let F=0,O=0;I>=0&&J[I]&&(F=J[I].count),X>=0&&J[X]&&(O=J[X].count);const z=F+O+V,Q=J.filter(L=>!(L.chunkIndex===U-1&&L.direction==="down")),R=Q.findIndex(L=>L.chunkIndex===U&&L.direction==="up");return R>=0&&Q[R]?Q[R]={chunkIndex:U,direction:"up",count:z}:Q.push({chunkIndex:U,direction:"up",count:z}),{...M,[D.path]:{oldContent:$?.oldContent??G.oldContent,newContent:$?.newContent??G.newContent,oldTotalLines:$?.oldTotalLines??G.oldTotalLines,newTotalLines:$?.newTotalLines??G.newTotalLines,expandedRanges:Q}}}),x(D.path)}finally{u(!1)}},[v,x]),A=j.useCallback(async D=>{const U=g.current[D.path];if(U?.oldTotalLines!==void 0||U?.newTotalLines!==void 0)return;const V=D.status!=="added"?e:void 0,G=D.status!=="deleted"?r:void 0;if(!(!V&&!G))try{const{oldLineCount:M,newLineCount:$}=await aj(D.path,V,G,D.oldPath);a(Y=>{const J=Y[D.path];return J?.oldTotalLines!==void 0||J?.newTotalLines!==void 0?Y:{...Y,[D.path]:{...J,expandedRanges:J?.expandedRanges||[],oldTotalLines:M,newTotalLines:$}}}),x(D.path)}catch(M){console.error("Failed to prefetch line count:",M)}},[e,r,x]),E=j.useCallback((D,U,V)=>{const G=l[D];return G&&G.expandedRanges.find($=>$.chunkIndex===U&&$.direction===V)?.count||0},[l]),C=j.useCallback((D,U,V)=>{if(D.status==="added"||D.status==="deleted")return 0;const G=D.chunks[V-1];let M;if(!G)M=U.oldStart-1;else{const J=G.oldStart+G.oldLines;M=U.oldStart-J}const $=E(D.path,V,"up"),Y=V>0?E(D.path,V-1,"down"):0;return Math.max(0,M-$-Y)},[E]),T=j.useCallback((D,U,V)=>{if(D.status==="added"||D.status==="deleted")return 0;const G=l[D.path],M=G?.oldTotalLines||G?.newTotalLines;if(M===void 0)return D.chunks[V+1]?0:-1;if(D.chunks[V+1])return 0;const Y=U.oldStart+U.oldLines-1,J=M-Y,I=E(D.path,V,"down");return Math.max(0,J-I)},[l,E]),B=j.useCallback((D,U,V)=>{const G=l[D.path];if(!G)return U;const M=E(D.path,V,"up"),$=E(D.path,V,"down");if(M===0&&$===0)return U;const Y=G.oldContent||[],J=G.newContent||[],I=[];if(M>0){const O=D.chunks[V-1];let z;O?z=O.oldStart+O.oldLines-1:z=Math.max(0,U.oldStart-1-M);const Q=U.oldStart-1,R=U.newStart-1,L=Math.min(M,Q-z),H=Q-L,N=R-L;for(let re=0;re<L;re++){const ce=H+re+1,de=N+re+1,pe=Y[ce-1]??J[de-1]??"";I.push({type:"normal",content:pe,oldLineNumber:ce,newLineNumber:de,isExpanded:!0})}}if(I.push(...U.lines),$>0){const O=U.oldStart+U.oldLines-1,z=U.newStart+U.newLines-1,Q=D.chunks[V+1],R=Q?Q.oldStart-1:G.oldTotalLines||O,L=Math.min($,R-O);for(let H=0;H<L;H++){const N=O+H+1,re=z+H+1,ce=Y[N-1]??J[re-1]??"";I.push({type:"normal",content:ce,oldLineNumber:N,newLineNumber:re,isExpanded:!0})}}const X=I[0],F=I[I.length-1];return{...U,lines:I,oldStart:X?.oldLineNumber??U.oldStart,newStart:X?.newLineNumber??U.newStart,oldLines:(F?.oldLineNumber??U.oldStart+U.oldLines-1)-(X?.oldLineNumber??U.oldStart)+1,newLines:(F?.newLineNumber??U.newStart+U.newLines-1)-(X?.newLineNumber??U.newStart)+1}},[l,E]),q=j.useCallback(D=>{const U=[];for(let V=0;V<D.chunks.length;V++){const G=D.chunks[V];if(!G)continue;const M=B(D,G,V),$=C(D,G,V),Y=T(D,G,V),J=U[U.length-1];if(J&&$===0){J.lines=[...J.lines,...M.lines],J.originalIndices.push(V),J.hiddenLinesAfter=Y;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 U.push({...M,originalIndices:[V],hiddenLinesBefore:$,hiddenLinesAfter:Y})}return U},[B,C,T]);return{expandedState:l,isLoading:s,lastUpdatedFilePath:c,lastUpdatedAt:p,expandLines:w,expandAllBetweenChunks:k,prefetchFileContent:A,getMergedChunks:q,getHiddenLinesBefore:C,getHiddenLinesAfter:T}}var J0=(e=>(e.DEFAULT="default",e.WORKING="working",e.STAGED="staged",e.DOT="dot",e.SPECIFIC="specific",e))(J0||{});function sj(e){const r=j.useRef(null),l=j.useRef(null),a=j.useRef(0),s=5,u=3e3,[c,f]=j.useState({isWatchEnabled:!1,diffMode:J0.DEFAULT,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null,connectionStatus:"disconnected"}),[p,h]=j.useState(null),b=j.useCallback(()=>{if(!r.current)try{const x=new EventSource("/api/watch");r.current=x,x.onopen=()=>{console.log("Connected to file watch service"),f(w=>({...w,connectionStatus:"connected"})),a.current=0,h(null)},x.onmessage=w=>{try{const k=JSON.parse(w.data);switch(k.type){case"connected":f(A=>({...A,isWatchEnabled:!0,diffMode:k.diffMode,connectionStatus:"connected"}));break;case"reload":console.log("File changes detected, showing reload button:",k.changeType),f(A=>({...A,shouldReload:!0,lastChangeTime:new Date,lastChangeType:k.changeType}));break;case"error":console.error("File watch error:",k.message),h(k.message||"File watch error occurred");break}}catch(k){console.error("Error parsing watch event:",k)}},x.onerror=()=>{console.log("File watch connection lost"),f(w=>({...w,connectionStatus:"disconnected"})),r.current&&(r.current.close(),r.current=null),a.current<s?(f(w=>({...w,connectionStatus:"reconnecting"})),a.current+=1,l.current=setTimeout(()=>{console.log(`Attempting to reconnect to file watch service (${a.current}/${s})...`),b()},u)):(console.error("Max reconnection attempts reached"),h("Lost connection to file watch service"))}}catch(x){console.error("Failed to connect to file watch service:",x),h("Failed to connect to file watch service")}},[s,u]),g=j.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),h("Failed to reload diff data"),f(w=>({...w,isReloading:!1}))}}},[e,c.isReloading]),v=()=>{r.current&&(r.current.close(),r.current=null),l.current&&(clearTimeout(l.current),l.current=null)};return j.useEffect(()=>(b(),v),[b]),j.useEffect(()=>v,[]),{shouldReload:c.shouldReload,isConnected:c.connectionStatus==="connected",error:p,reload:g,watchState:c}}const eh={SCROLL_CONTAINER:"main.overflow-y-auto"};function Yr(e,r){const l=`file-${e.fileIndex}-chunk-${e.chunkIndex}-line-${e.lineIndex}`;return r==="split"?`${l}-${e.side}`:l}function W0(e,r){return`${e}:${r}`}function uj(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 vn(e,r){const l=uj(e,r);return l?l==="normal"?!0:l==="delete"?e.side==="left":l==="add"?e.side==="right":!1:!1}function ev(e,r){return vn(e,r)?e:{...e,side:e.side==="left"?"right":"left"}}const jx={VIEWPORT_OFFSET_RATIO:1/3};function cj(e,r,l,a){return{line:s=>{const u=e[s.fileIndex];return!u||a?.has(u.path)?!1:l==="unified"||vn(s,e)},chunk:s=>{const u=e[s.fileIndex];if(!u||a?.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||a?.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 p=W0(u.path,f);return r.has(p)},file:s=>s.chunkIndex===0&&s.lineIndex===0}}function fj(){return e=>{const r=document.getElementById(e);if(!r)return;const l=document.querySelector(eh.SCROLL_CONTAINER);if(!l)throw new Error(`Scrollable container (${eh.SCROLL_CONTAINER}) not found`);const a=r.getBoundingClientRect(),s=l.getBoundingClientRect(),u=l.clientHeight,c=l.scrollTop,f=Math.max(s.top,0),p=Math.min(s.bottom,window.innerHeight);if(!(a.top>=f&&a.bottom<=p)){const k=dj(r,l)-u*jx.VIEWPORT_OFFSET_RATIO;l.scrollTop=Math.max(0,k);return}const b=a.bottom>Math.min(s.bottom,window.innerHeight),v=r.offsetTop-l.offsetTop-u*jx.VIEWPORT_OFFSET_RATIO,x=v>c;b&&x&&(l.scrollTop=Math.max(0,v))}}function dj(e,r){let l=e,a=0;for(;l&&l!==r&&l.offsetParent;)a+=l.offsetTop,l=l.offsetParent;return l&&l!==r&&(a+=l.offsetTop),a}function hj(e){return e||{fileIndex:0,chunkIndex:0,lineIndex:-1,side:"right"}}function pj(e,r,l){return l&&e.fileIndex===r.fileIndex&&e.chunkIndex===r.chunkIndex&&e.lineIndex===r.lineIndex}function mj(e,r,l){let{fileIndex:a,chunkIndex:s,lineIndex:u}=e;const c=l.length;let f=0;if(r==="next")for(u++;f<c;){if(l[a]?.chunks[s]?.lines[u])return{...e,fileIndex:a,chunkIndex:s,lineIndex:u};s++,u=0,l[a]?.chunks[s]||(a++,s=0,u=0,a>=c&&(a=0,f++))}else for(u--;f<c;){if(u<0)if(s--,s<0){a--,a<0&&(a=c-1,f++);const p=l[a];if(p&&p.chunks.length>0){s=p.chunks.length-1;const h=p.chunks[s];u=h&&h.lines.length>0?h.lines.length-1:-1}else s=-1,u=-1}else{const p=l[a]?.chunks[s];u=p&&p.lines.length>0?p.lines.length-1:-1}if(u>=0&&l[a]?.chunks[s]?.lines[u])return{...e,fileIndex:a,chunkIndex:s,lineIndex:u};u<0||u--}return null}function gj(e,r,l,a,s){let u=e,c=!1;for(;u;){const f=mj(u,r,a);if(!f||(u=f,pj(u,e,c)))break;if(c=!0,l(u,a)){const p=ev(u,a);return{position:p,scrollTarget:Yr(p,s)}}}return{position:null,scrollTarget:null}}function bj({files:e,comments:r,viewMode:l=Va,reviewedFiles:a,onToggleReviewed:s,onCreateComment:u,onCopyAllComments:c,onDeleteAllComments:f,onShowCommentsList:p,onRefresh:h}){const[b,g]=j.useState(null),[v,x]=j.useState(!1),w=j.useMemo(()=>fj(),[]),k=j.useMemo(()=>{const $=new Map;return r.forEach(Y=>{const J=Array.isArray(Y.line)?Y.line[0]:Y.line,I=W0(Y.file,J);$.has(I)||$.set(I,[]),$.get(I)?.push(Y)}),$},[r]),A=j.useMemo(()=>cj(e,k,l,a),[e,k,l,a]),E=j.useCallback(($,Y)=>{if(e.length===0)return{position:null,scrollTarget:null};const J=hj(b);return gj(J,$,Y,e,l)},[b,e,l]),C=j.useCallback($=>Y=>{const J=E(Y,$);J.position&&(g(J.position),J.scrollTarget&&w(J.scrollTarget))},[E,w]),T=j.useMemo(()=>C(A.line),[C,A.line]),B=j.useMemo(()=>C(A.chunk),[C,A.chunk]),q=j.useMemo(()=>C(A.file),[C,A.file]),D=j.useMemo(()=>C(A.comment),[C,A.comment]),U=j.useCallback($=>{if(!b||l!=="split")return;let Y={...b,side:$};const J=e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex];if(J){if($==="left"&&J.type==="add"&&b.lineIndex>0){if(e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex-1]?.type==="delete"){Y={...Y,lineIndex:b.lineIndex-1},g(Y),w(Yr(Y,l));return}}else if($==="right"&&J.type==="delete"&&e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex+1]?.type==="add"){Y={...Y,lineIndex:b.lineIndex+1},g(Y),w(Yr(Y,l));return}}if(!vn(Y,e)){const I=e[b.fileIndex];if(!I)return;const X=I.chunks[b.chunkIndex];if(X){for(let F=b.lineIndex+1;F<X.lines.length;F++){const O={...Y,lineIndex:F};if(vn(O,e)){Y=O;break}}if(!vn(Y,e))for(let F=b.lineIndex-1;F>=0;F--){const O={...Y,lineIndex:F};if(vn(O,e)){Y=O;break}}}if(!vn(Y,e)){for(let F=b.chunkIndex+1;F<I.chunks.length;F++){const O=I.chunks[F];if(O){for(let z=0;z<O.lines.length;z++){const Q={...Y,chunkIndex:F,lineIndex:z};if(vn(Q,e)){Y=Q;break}}if(vn(Y,e))break}}if(!vn(Y,e))for(let F=b.chunkIndex-1;F>=0;F--){const O=I.chunks[F];if(O){for(let z=O.lines.length-1;z>=0;z--){const Q={...Y,chunkIndex:F,lineIndex:z};if(vn(Q,e)){Y=Q;break}}if(vn(Y,e))break}}}}g(Y),w(Yr(Y,l))},[b,l,w,e]),V=j.useCallback(()=>{const $=document.querySelector(eh.SCROLL_CONTAINER);if(!$)return;const Y=$.getBoundingClientRect(),J=Y.top+Y.height/2;let I=1/0,X=null;e.forEach((F,O)=>{F.chunks.forEach((z,Q)=>{z.lines.forEach((R,L)=>{const H=l==="split"?["left","right"]:["right"];for(const N of H){const re={fileIndex:O,chunkIndex:Q,lineIndex:L,side:N};if(l==="split"&&!vn(re,e))continue;const ce=Yr(re,l),de=document.getElementById(ce);if(de){const pe=de.getBoundingClientRect(),ge=pe.top+pe.height/2,fe=Math.abs(ge-J);pe.top<Y.bottom&&pe.bottom>Y.top&&fe<I&&(I=fe,X=re)}}})})}),X&&g(X)},[e,l,g]),G=j.useCallback($=>{if(!$){g(null);return}const Y=ev($,e);g(Y),w(Yr(Y,l))},[e,l,w]),M={scopes:"navigation",enableOnFormTags:!1,preventDefault:!0};return lt("j, down",()=>T("next"),M,[T]),lt("k, up",()=>T("prev"),M,[T]),lt("n",()=>B("next"),M,[B]),lt("p",()=>B("prev"),M,[B]),lt("shift+n",()=>D("next"),M,[D]),lt("shift+p",()=>D("prev"),M,[D]),lt("]",()=>q("next"),{...M,useKey:!0},[q]),lt("[",()=>q("prev"),{...M,useKey:!0},[q]),lt("{",()=>{e.length>0&&(g({fileIndex:0,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"}),w(Yr({fileIndex:0,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"},l)))},{...M,useKey:!0},[e,l,w]),lt("}",()=>{if(e.length>0){const $=e.length-1,Y=e[$];Y&&Y.chunks.length>0&&(g({fileIndex:$,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"}),w(Yr({fileIndex:$,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"},l)))}},{...M,useKey:!0},[e,l,w]),lt("h, left",()=>U("left"),{...M,enabled:l==="split"},[U,l]),lt("l, right",()=>U("right"),{...M,enabled:l==="split"},[U,l]),lt("v",()=>{if(b){const $=e[b.fileIndex];$&&s($.path)}},M,[b,e,s]),lt("shift+r",()=>{h&&h()},M,[h]),lt("c",()=>{if(b&&u){const $=e[b.fileIndex]?.chunks[b.chunkIndex]?.lines[b.lineIndex];$&&$.type!=="delete"&&u()}},M,[b,e,u]),lt("?",()=>x(!v),{...M,useKey:!0},[v]),lt(".",$=>{$.ctrlKey||$.altKey||$.shiftKey||$.metaKey||(V(),$.preventDefault())},{...M,useKey:!0,preventDefault:!1},[V]),lt("shift+c",()=>{c&&c()},{...M,scopes:["navigation","comments-list"]},[c]),lt("shift+d",()=>{f&&f()},{...M,scopes:["navigation","comments-list"]},[f]),lt("shift+l",()=>{p&&p()},M,[p]),{cursor:b,isHelpOpen:v,setIsHelpOpen:x,setCursorPosition:G}}function yj(e,r,l,a,s,u){const[c,f]=j.useState([]),[p,h]=j.useState(new Map);j.useEffect(()=>{if(!e||!r)return;const E=Ba.getViewedFiles(e,r,l,a,u);(async()=>{if(s&&s.length>0){const T=[],B=new Set(E.map(q=>q.filePath));for(const q of s)if((q.isGenerated||q.status==="deleted")&&!B.has(q.path))try{const D=Nx(q),U=await Ax(D),V={filePath:q.path,viewedAt:new Date().toISOString(),diffContentHash:U};T.push(V)}catch(D){console.error("Failed to generate hash for auto-collapsed file:",D)}if(T.length>0){const q=[...E,...T];Ba.saveViewedFiles(e,r,q,l,a,u),f(q);return}}f(E)})()},[e,r,l,a,u]);const b=j.useCallback(E=>{!e||!r||(Ba.saveViewedFiles(e,r,E,l,a,u),f(E))},[e,r,l,a,u]),g=j.useMemo(()=>new Set(c.map(E=>E.filePath)),[c]),v=j.useCallback(E=>c.find(C=>C.filePath===E),[c]),x=j.useCallback(async E=>{const C=p.get(E.path);if(C)return C;const T=Nx(E),B=await Ax(T);return h(q=>new Map(q).set(E.path,B)),B},[p]),w=j.useCallback(async(E,C)=>{const T=v(E);if(!T)return!1;const B=await x(C);return T.diffContentHash!==B},[v,x]),k=j.useCallback(async(E,C)=>{if(v(E)){const B=c.filter(q=>q.filePath!==E);b(B)}else{const B=await x(C),q={filePath:E,viewedAt:new Date().toISOString(),diffContentHash:B},D=[...c,q];b(D)}},[c,v,x,b]),A=j.useCallback(()=>{b([]),h(new Map)},[b]);return{viewedFiles:g,toggleFileViewed:k,isFileContentChanged:w,getViewedFileRecord:v,clearViewedFiles:A}}const md=new Map;let xj=0;function gd(e){return md.has(e)||md.set(e,`file-${++xj}`),md.get(e)??""}function vj(e,r,l){for(let a=0;a<e.chunks.length;a++){const s=e.chunks[a];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:a,lineIndex:u,side:c.newLineNumber?"right":"left"}}}return null}function wj(e,r){const l=r.findIndex(u=>u.path===e.file);if(l===-1)return null;const a=r[l];if(!a)return null;const s=Array.isArray(e.line)?e.line[1]:e.line;return vj(a,l,s)}const Sj=[],kj=[],tv="difit.sidebarWidth",nv=200,rv=600,bd=320,Ej=()=>{if(typeof window>"u")return bd;const e=window.localStorage.getItem(tv);if(!e)return bd;const r=Number.parseInt(e,10);return Number.isFinite(r)?Math.min(rv,Math.max(nv,r)):bd};function Cj(){const[e,r]=j.useState(null),[l,a]=j.useState(Va),s=j.useRef(!1),[u,c]=j.useState(!0),[f,p]=j.useState(!0),[h,b]=j.useState(null),[g,v]=j.useState(!1),[x,w]=j.useState(Ej),[k,A]=j.useState(!1),[E,C]=j.useState(!0),[T,B]=j.useState(!1),[q,D]=j.useState(!1),[U,V]=j.useState(!1),[G,M]=j.useState(!1),[$,Y]=j.useState(!1),[J,I]=j.useState(new Set),X=j.useRef(!1),[F,O]=j.useState(null),[z,Q]=j.useState(""),[R,L]=j.useState(""),[H,N]=j.useState(""),[re,ce]=j.useState(""),de=j.useRef(!1),{settings:pe,updateSettings:ge}=W8(),{comments:fe,addComment:ve,removeComment:xe,updateComment:ye,clearAllComments:ke,generatePrompt:Ne,generateAllCommentsPrompt:Ve}=lj(e?.baseCommitish,e?.targetCommitish,e?.commit,void 0,e?.repositoryId),et=j.useMemo(()=>fe.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})),[fe]),He=j.useMemo(()=>{const le=new Map;return et.forEach(be=>{const Ee=le.get(be.file);Ee?Ee.push(be):le.set(be.file,[be])}),le},[et]),{viewedFiles:Ke,toggleFileViewed:gt,clearViewedFiles:pt}=yj(e?.baseCommitish,e?.targetCommitish,e?.commit,void 0,e?.files,e?.repositoryId);j.useEffect(()=>{X.current=!1},[e?.repositoryId,e?.commit]),j.useEffect(()=>{X.current||(I(new Set(Ke)),X.current=!0)},[Ke]);const _t=j.useCallback(async le=>{if(!e)return;const be=e.files.find(Ce=>Ce.path===le);if(!be)return;const Ee=Ke.has(le);await gt(le,be),I(Ce=>{const at=new Set(Ce);return Ee?at.delete(le):at.add(le),at}),Ee||setTimeout(()=>{const Ce=document.getElementById(gd(le));Ce&&Ce.scrollIntoView({behavior:"smooth",block:"start"})},100)},[e,gt,Ke]),Zt=j.useCallback(le=>{I(be=>{const Ee=new Set(be);return Ee.has(le)?Ee.delete(le):Ee.add(le),Ee})},[]),Pt=j.useCallback(le=>{e&&I(le?new Set(e.files.map(be=>be.path)):new Set)},[e]),it=j.useCallback(le=>{s.current=!0,a(le)},[]),{isLoading:wr,expandLines:ae,expandAllBetweenChunks:me,prefetchFileContent:Re,getMergedChunks:De,lastUpdatedFilePath:Pe,lastUpdatedAt:$t}=oj({baseCommitish:e?.baseCommitish,targetCommitish:e?.targetCommitish}),sn=j.useRef(De);j.useEffect(()=>{sn.current=De},[De]);const[Nt,mt]=j.useState(new Map);j.useEffect(()=>{if(!e){mt(new Map);return}const le=new Map;e.files.forEach(be=>{le.set(be.path,sn.current(be))}),mt(le)},[e]),j.useEffect(()=>{if(!e||!Pe)return;const le=e.files.find(be=>be.path===Pe);le&&mt(be=>{const Ee=new Map(be);return Ee.set(le.path,sn.current(le)),Ee})},[e,Pe,$t]);const zt=j.useMemo(()=>e?e.files.map(le=>({...le,chunks:Nt.get(le.path)||le.chunks})):[],[e,Nt]),[Qe,Sn]=j.useState(null),{shouldReload:un,reload:Ka,watchState:tl}=sj(async()=>{await zn()}),{cursor:kn,isHelpOpen:Tl,setIsHelpOpen:Hn,setCursorPosition:Kn}=bj({files:zt,comments:et,viewMode:l,reviewedFiles:Ke,onToggleReviewed:_t,onCreateComment:()=>{kn&&Sn({fileIndex:kn.fileIndex,chunkIndex:kn.chunkIndex,lineIndex:kn.lineIndex})},onCopyAllComments:()=>{fe.length>0&&_i()},onDeleteAllComments:()=>{fe.length>0&&confirm("Delete all comments?")&&ke()},onShowCommentsList:()=>{M(!0)},onRefresh:()=>{Ka()}}),nl=j.useCallback((le,be,Ee,Ce)=>{Kn({fileIndex:le,chunkIndex:be,lineIndex:Ee,side:Ce})},[Kn]),gu=j.useCallback(()=>{Sn(null)},[Sn]),Ja=j.useCallback(le=>Ne(le.id),[Ne]),ji=le=>{le.preventDefault(),B(!0);const be=le.clientX,Ee=x,Ce=jl=>{const Rl=Math.max(nv,Math.min(rv,Ee+(jl.clientX-be)));w(Rl)},at=()=>{B(!1),document.removeEventListener("mousemove",Ce),document.removeEventListener("mouseup",at)};document.addEventListener("mousemove",Ce),document.addEventListener("mouseup",at)},zn=j.useCallback(async(le,be)=>{try{const Ee=new URLSearchParams({ignoreWhitespace:String(u)});le&&Ee.set("base",le),be&&Ee.set("target",be);const Ce=await fetch(`/api/diff?${Ee}`);if(!Ce.ok)throw new Error("Failed to fetch diff data");const at=await Ce.json();if(r(at),at.baseCommitish&&N(at.baseCommitish),at.targetCommitish&&ce(at.targetCommitish),!de.current){const jl=at.requestedBaseCommitish??at.baseCommitish,Rl=at.requestedTargetCommitish??at.targetCommitish;jl&&Q(jl),Rl&&L(Rl)}at.mode&&!s.current&&a($S(at.mode))}catch(Ee){b(Ee instanceof Error?Ee.message:"Unknown error")}finally{p(!1)}},[u]);j.useEffect(()=>{zn()},[zn]),j.useEffect(()=>{try{window.localStorage.setItem(tv,String(x))}catch{}},[x]),j.useEffect(()=>{fetch("/api/revisions").then(le=>le.ok?le.json():null).then(le=>{O(le),le?.resolvedBase&&N(be=>be||le.resolvedBase||""),le?.resolvedTarget&&ce(be=>be||le.resolvedTarget||"")}).catch(()=>O(null))},[]);const Wa=j.useCallback(async(le,be)=>{le===z&&be===R||(de.current=!0,Q(le),L(be),p(!0),b(null),await zn(le,be))},[z,R,zn]),Ri=j.useRef(!1);j.useEffect(()=>{e?.clearComments&&!Ri.current&&(Ri.current=!0,ke(),pt(),console.log("✅ All existing comments and viewed files cleared as requested via --clean flag"))},[e?.clearComments,ke,pt]),j.useEffect(()=>{e&&(Ke.size<e.files.length?V(!1):Ke.size===e.files.length&&!U&&(D(!0),V(!0),setTimeout(()=>{D(!1)},1e3)))},[Ke.size,e,U]),j.useEffect(()=>{if(fe.length>0){const be=fe.map(Ce=>({id:Ce.id,file:Ce.filePath,line:typeof Ce.position.line=="number"?Ce.position.line:[Ce.position.line.start,Ce.position.line.end],body:Ce.body,timestamp:Ce.createdAt,side:Ce.position.side})),Ee=JSON.stringify({comments:be});fetch("/api/comments",{method:"POST",headers:{"Content-Type":"application/json"},body:Ee}).catch(Ce=>{console.error("Failed to sync comments:",Ce)})}const le=()=>{if(fe.length>0){const be=fe.map(Ce=>({id:Ce.id,file:Ce.filePath,line:typeof Ce.position.line=="number"?Ce.position.line:[Ce.position.line.start,Ce.position.line.end],body:Ce.body,timestamp:Ce.createdAt,side:Ce.position.side})),Ee=JSON.stringify({comments:be});navigator.sendBeacon("/api/comments",Ee)}};return window.addEventListener("beforeunload",le),()=>{window.removeEventListener("beforeunload",le)}},[fe]),j.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 eo=j.useCallback((le,be,Ee,Ce,at)=>(ve({filePath:le,body:Ee,side:at||"new",line:typeof be=="number"?be:{start:be[0],end:be[1]},codeSnapshot:Ce?{content:Ce,language:void 0}:void 0}),Promise.resolve()),[ve]),_i=async()=>{try{const le=Ve();await navigator.clipboard.writeText(le),v(!0),setTimeout(()=>v(!1),2e3)}catch(le){console.error("Failed to copy all comments prompt:",le)}},Li=le=>{if(!e)return;const be=wj(le,e.files);be&&Kn(be)},Di=j.useCallback(async(le,be)=>{try{const Ee=await fetch("/api/open-in-editor",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:le,line:be,editor:pe.editor})});if(!Ee.ok){const Ce=await Ee.json().catch(()=>null);let at=Ee.statusText;Ce&&typeof Ce=="object"&&"error"in Ce&&typeof Ce.error=="string"&&(at=Ce.error),console.error("Failed to open file in editor:",at)}}catch(Ee){console.error("Failed to open file in editor:",Ee)}},[pe.editor]),to=le=>{Kn(null);const be=le.target,Ee=be.closest('[data-comment-button="true"]'),Ce=be.closest('[data-open-in-editor-button="true"]');!Ee&&!Ce&&no(le)},no=le=>{document.querySelectorAll('form[data-empty="true"]').forEach(Ee=>{Ee.contains(le.target)||Ee.querySelector('button[type="button"]')?.click()})};return f?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..."})}):h?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:h})]}):e?y.jsx(q5,{children:y.jsxs("div",{className:"h-screen flex flex-col",onClickCapture:to,children:[y.jsxs("header",{className:"bg-github-bg-secondary border-b border-github-border flex items-center",children:[y.jsxs("div",{className:`px-4 py-3 flex items-center justify-between gap-4 ${T?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:E?`${x}px`:"auto",minWidth:E?"200px":"auto",maxWidth:E?"600px":"auto"},children:[y.jsx("h1",{children:y.jsx(V8,{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(NS,{size:18}):y.jsx(jS,{size:18})}),y.jsx("button",{onClick:()=>A(!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(Gx,{size:18})})]})]}),y.jsx("div",{className:`border-r border-github-border ${T?"":"!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 px-4 py-3 flex items-center justify-between gap-4",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsxs("div",{className:"flex bg-github-bg-tertiary border border-github-border rounded-md p-1",children:[y.jsxs("button",{onClick:()=>it("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(lS,{size:14}),"Split"]}),y.jsxs("button",{onClick:()=>it("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(US,{size:14}),"Unified"]})]}),y.jsx(Yx,{checked:u,onChange:c,label:"Ignore Whitespace",title:u?"Show whitespace changes":"Ignore whitespace changes"}),y.jsx(G8,{shouldReload:un,isReloading:tl.isReloading,onReload:Ka,changeType:tl.lastChangeType})]}),y.jsxs("div",{className:"flex items-center gap-4 text-sm text-github-text-secondary",children:[fe.length>0&&y.jsx(VS,{commentsCount:fe.length,isCopiedAll:g,onCopyAll:_i,onDeleteAll:ke,onViewAll:()=>M(!0)}),y.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[y.jsxs("div",{className:"text-xs relative",children:[Ke.size===e.files.length?"All diffs difit-ed!":`${Ke.size} / ${e.files.length} files viewed`,y.jsx(J8,{isActive:q})]}),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-Ke.size)/e.files.length*100}%`,backgroundColor:(()=>{const le=(e.files.length-Ke.size)/e.files.length*100;return le>50?"var(--color-github-accent)":le>20?"var(--color-github-warning)":"var(--color-github-danger)"})()}})})]}),F?y.jsx(PE,{options:F,baseRevision:z,targetRevision:R,resolvedBaseRevision:H,resolvedTargetRevision:re,onSelectDiff:(le,be)=>{Wa(le,be)},onOpenAdvanced:()=>Y(!0)}):y.jsxs("span",{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})]})]})]})]}),F&&y.jsx(Y8,{isOpen:$,onClose:()=>Y(!1),options:F,baseRevision:z,targetRevision:R,resolvedBaseRevision:H,resolvedTargetRevision:re,onApply:(le,be)=>{Wa(le,be)}},$?`${z}:${R}`:"closed"),y.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[y.jsx("div",{className:`relative overflow-hidden ${T?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width: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",style:{width:`${x}px`,minWidth:"200px",maxWidth:"600px",height:"100%"},children:[y.jsx("div",{className:"flex-1 overflow-y-auto",children:y.jsx(q8,{files:e.files,onScrollToFile:le=>{const be=document.getElementById(gd(le));be&&be.scrollIntoView({behavior:"smooth",block:"start"})},comments:fe.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:Ke,onToggleReviewed:_t,selectedFileIndex:kn?.fileIndex??null})}),y.jsxs("div",{className:"p-4 border-t border-github-border flex justify-between items-center",children:[y.jsxs("button",{onClick:()=>Hn(!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(vS,{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(P8,{style:{height:"18px",width:"18px"}})]})]})]})}),y.jsx("div",{className:`bg-github-border hover:bg-github-text-muted cursor-col-resize ${T?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:E?"4px":"0px"},onMouseDown:ji,title:"Drag to resize file list"}),y.jsx("main",{className:"flex-1 overflow-y-auto",children:e.files.map((le,be)=>{const Ee=He.get(le.path)??Sj,Ce=Nt.get(le.path)??kj;return y.jsx("div",{id:gd(le.path),className:"mb-6",children:y.jsx(U8,{file:le,comments:Ee,diffMode:l,reviewedFiles:Ke,onToggleReviewed:_t,collapsedFiles:J,onToggleCollapsed:Zt,onToggleAllCollapsed:Pt,onAddComment:eo,onGeneratePrompt:Ja,onRemoveComment:xe,onUpdateComment:ye,onOpenInEditor:pe.editor==="none"?void 0:Di,syntaxTheme:pe.syntaxTheme,baseCommitish:e.baseCommitish,targetCommitish:e.targetCommitish,cursor:kn?.fileIndex===be?kn:null,fileIndex:be,onLineClick:nl,commentTrigger:Qe?.fileIndex===be?Qe:null,onCommentTriggerHandled:gu,mergedChunks:Ce,expandLines:ae,expandAllBetweenChunks:me,prefetchFileContent:Re,isExpandLoading:wr})},le.path)})})]}),y.jsx(K8,{isOpen:k,onClose:()=>A(!1),settings:pe,onSettingsChange:ge}),y.jsx($8,{isOpen:Tl,onClose:()=>Hn(!1)}),y.jsx(GS,{isOpen:G,onClose:()=>M(!1),onNavigate:Li,comments:fe.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:xe,onGeneratePrompt:le=>Ne(le.id),onUpdateComment:ye})]})}):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 lv=document.getElementById("root");if(!lv)throw new Error("Root element not found");E2.createRoot(lv).render(y.jsx(Xt.StrictMode,{children:y.jsx(z2,{initiallyActiveScopes:["navigation"],children:y.jsx(Cj,{})})}));export{Zs as g};