@jawkx1999/opencr 0.1.0-alpha.2 → 0.1.0-alpha.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.
- package/dist/client/assets/index-C9jeaZcr.css +1 -0
- package/dist/client/assets/index-DF6LDO7P.js +1978 -0
- package/dist/client/index.html +3 -3
- package/dist/server/cli/index.js +32 -1
- package/dist/server/cli/index.js.map +1 -1
- package/dist/server/core/agents/opencode.js +685 -0
- package/dist/server/core/agents/opencode.js.map +1 -0
- package/dist/server/core/reviewDiagnostics.js +116 -0
- package/dist/server/core/reviewDiagnostics.js.map +1 -0
- package/dist/server/core/reviewPayload.js +7 -0
- package/dist/server/core/reviewPayload.js.map +1 -1
- package/dist/server/core/reviewRequest.js +4 -1
- package/dist/server/core/reviewRequest.js.map +1 -1
- package/dist/server/core/reviewSource/commitish.js +1 -1
- package/dist/server/core/reviewSource/commitish.js.map +1 -1
- package/dist/server/core/reviewSource/githubPr.js +31 -0
- package/dist/server/core/reviewSource/githubPr.js.map +1 -1
- package/dist/server/core/reviewSource/index.js +2 -2
- package/dist/server/core/reviewSource/index.js.map +1 -1
- package/dist/server/core/server.js +27 -6
- package/dist/server/core/server.js.map +1 -1
- package/dist/server/core/workspace/identity.js +47 -0
- package/dist/server/core/workspace/identity.js.map +1 -0
- package/dist/server/core/workspace/repository.js +399 -0
- package/dist/server/core/workspace/repository.js.map +1 -0
- package/dist/server/server/app.js +204 -2
- package/dist/server/server/app.js.map +1 -1
- package/dist/server/shared/types.js +1 -1
- package/dist/server/shared/types.js.map +1 -1
- package/package.json +5 -4
- package/dist/client/assets/index-CMvi92Od.js +0 -1974
- package/dist/client/assets/index-dwKNSbA7.css +0 -1
- package/dist/server/cli/utils.js +0 -2
- package/dist/server/cli/utils.js.map +0 -1
|
@@ -0,0 +1,1978 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-B12qg9BL.js","assets/ruby-Dw2BHqvy.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/just-Cw27pwNe.js","assets/perl-C0TMdlhV.js","assets/latex-CWtU0Tv5.js","assets/tex-idrVyKtj.js","assets/liquid-DYVedYrR.js","assets/marko-CnJfTvn9.js","assets/less-B1dDrJ26.js","assets/mdc-BMNejdWA.js","assets/nextflow-Zz6hmt5N.js","assets/nextflow-groovy-BeH2EWoN.js","assets/nginx-BpAMiNFr.js","assets/nim-CVrawwO9.js","assets/php-Dhbhpdrm.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-Uh8Bk_45.js","assets/csharp-COcwbKMJ.js","assets/rst-BrH8l1NY.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-C_ipcX3V.js","assets/templ-P3uqSqPl.js","assets/go-CxLEBnE3.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-DNn4PbVi.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
function wS(t,n){for(var r=0;r<n.length;r++){const a=n[r];if(typeof a!="string"&&!Array.isArray(a)){for(const s in a)if(s!=="default"&&!(s in t)){const u=Object.getOwnPropertyDescriptor(a,s);u&&Object.defineProperty(t,s,u.get?u:{enumerable:!0,get:()=>a[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.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 r(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=r(s);fetch(s.href,u)}})();function dh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Xd={exports:{}},qo={};var Ub;function CS(){if(Ub)return qo;Ub=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(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 h in s)h!=="key"&&(u[h]=s[h])}else u=s;return s=u.ref,{$$typeof:t,type:a,key:c,ref:s!==void 0?s:null,props:u}}return qo.Fragment=n,qo.jsx=r,qo.jsxs=r,qo}var Hb;function AS(){return Hb||(Hb=1,Xd.exports=CS()),Xd.exports}var E=AS(),Wd={exports:{}},Le={};var Bb;function kS(){if(Bb)return Le;Bb=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=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"),h=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function _(L){return L===null||typeof L!="object"?null:(L=v&&L[v]||L["@@iterator"],typeof L=="function"?L:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,O={};function A(L,Y,W){this.props=L,this.context=Y,this.refs=O,this.updater=W||x}A.prototype.isReactComponent={},A.prototype.setState=function(L,Y){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,Y,"setState")},A.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function C(){}C.prototype=A.prototype;function k(L,Y,W){this.props=L,this.context=Y,this.refs=O,this.updater=W||x}var I=k.prototype=new C;I.constructor=k,T(I,A.prototype),I.isPureReactComponent=!0;var M=Array.isArray;function U(){}var H={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function Q(L,Y,W){var re=W.ref;return{$$typeof:t,type:L,key:Y,ref:re!==void 0?re:null,props:W}}function ee(L,Y){return Q(L.type,Y,L.props)}function ie(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function V(L){var Y={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(W){return Y[W]})}var K=/\/+/g;function oe(L,Y){return typeof L=="object"&&L!==null&&L.key!=null?V(""+L.key):Y.toString(36)}function te(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(U,U):(L.status="pending",L.then(function(Y){L.status==="pending"&&(L.status="fulfilled",L.value=Y)},function(Y){L.status==="pending"&&(L.status="rejected",L.reason=Y)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function N(L,Y,W,re,le){var ce=typeof L;(ce==="undefined"||ce==="boolean")&&(L=null);var me=!1;if(L===null)me=!0;else switch(ce){case"bigint":case"string":case"number":me=!0;break;case"object":switch(L.$$typeof){case t:case n:me=!0;break;case b:return me=L._init,N(me(L._payload),Y,W,re,le)}}if(me)return le=le(L),me=re===""?"."+oe(L,0):re,M(le)?(W="",me!=null&&(W=me.replace(K,"$&/")+"/"),N(le,Y,W,"",function(ne){return ne})):le!=null&&(ie(le)&&(le=ee(le,W+(le.key==null||L&&L.key===le.key?"":(""+le.key).replace(K,"$&/")+"/")+me)),Y.push(le)),1;me=0;var ge=re===""?".":re+":";if(M(L))for(var pe=0;pe<L.length;pe++)re=L[pe],ce=ge+oe(re,pe),me+=N(re,Y,W,ce,le);else if(pe=_(L),typeof pe=="function")for(L=pe.call(L),pe=0;!(re=L.next()).done;)re=re.value,ce=ge+oe(re,pe++),me+=N(re,Y,W,ce,le);else if(ce==="object"){if(typeof L.then=="function")return N(te(L),Y,W,re,le);throw Y=String(L),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return me}function P(L,Y,W){if(L==null)return L;var re=[],le=0;return N(L,re,"","",function(ce){return Y.call(W,ce,le++)}),re}function X(L){if(L._status===-1){var Y=L._result;Y=Y(),Y.then(function(W){(L._status===0||L._status===-1)&&(L._status=1,L._result=W)},function(W){(L._status===0||L._status===-1)&&(L._status=2,L._result=W)}),L._status===-1&&(L._status=0,L._result=Y)}if(L._status===1)return L._result.default;throw L._result}var he=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=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(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},Z={map:P,forEach:function(L,Y,W){P(L,function(){Y.apply(this,arguments)},W)},count:function(L){var Y=0;return P(L,function(){Y++}),Y},toArray:function(L){return P(L,function(Y){return Y})||[]},only:function(L){if(!ie(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Le.Activity=g,Le.Children=Z,Le.Component=A,Le.Fragment=r,Le.Profiler=s,Le.PureComponent=k,Le.StrictMode=a,Le.Suspense=d,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,Le.__COMPILER_RUNTIME={__proto__:null,c:function(L){return H.H.useMemoCache(L)}},Le.cache=function(L){return function(){return L.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(L,Y,W){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var re=T({},L.props),le=L.key;if(Y!=null)for(ce in Y.key!==void 0&&(le=""+Y.key),Y)!z.call(Y,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&Y.ref===void 0||(re[ce]=Y[ce]);var ce=arguments.length-2;if(ce===1)re.children=W;else if(1<ce){for(var me=Array(ce),ge=0;ge<ce;ge++)me[ge]=arguments[ge+2];re.children=me}return Q(L.type,le,re)},Le.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},Le.createElement=function(L,Y,W){var re,le={},ce=null;if(Y!=null)for(re in Y.key!==void 0&&(ce=""+Y.key),Y)z.call(Y,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(le[re]=Y[re]);var me=arguments.length-2;if(me===1)le.children=W;else if(1<me){for(var ge=Array(me),pe=0;pe<me;pe++)ge[pe]=arguments[pe+2];le.children=ge}if(L&&L.defaultProps)for(re in me=L.defaultProps,me)le[re]===void 0&&(le[re]=me[re]);return Q(L,ce,le)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(L){return{$$typeof:h,render:L}},Le.isValidElement=ie,Le.lazy=function(L){return{$$typeof:b,_payload:{_status:-1,_result:L},_init:X}},Le.memo=function(L,Y){return{$$typeof:p,type:L,compare:Y===void 0?null:Y}},Le.startTransition=function(L){var Y=H.T,W={};H.T=W;try{var re=L(),le=H.S;le!==null&&le(W,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(U,he)}catch(ce){he(ce)}finally{Y!==null&&W.types!==null&&(Y.types=W.types),H.T=Y}},Le.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},Le.use=function(L){return H.H.use(L)},Le.useActionState=function(L,Y,W){return H.H.useActionState(L,Y,W)},Le.useCallback=function(L,Y){return H.H.useCallback(L,Y)},Le.useContext=function(L){return H.H.useContext(L)},Le.useDebugValue=function(){},Le.useDeferredValue=function(L,Y){return H.H.useDeferredValue(L,Y)},Le.useEffect=function(L,Y){return H.H.useEffect(L,Y)},Le.useEffectEvent=function(L){return H.H.useEffectEvent(L)},Le.useId=function(){return H.H.useId()},Le.useImperativeHandle=function(L,Y,W){return H.H.useImperativeHandle(L,Y,W)},Le.useInsertionEffect=function(L,Y){return H.H.useInsertionEffect(L,Y)},Le.useLayoutEffect=function(L,Y){return H.H.useLayoutEffect(L,Y)},Le.useMemo=function(L,Y){return H.H.useMemo(L,Y)},Le.useOptimistic=function(L,Y){return H.H.useOptimistic(L,Y)},Le.useReducer=function(L,Y,W){return H.H.useReducer(L,Y,W)},Le.useRef=function(L){return H.H.useRef(L)},Le.useState=function(L){return H.H.useState(L)},Le.useSyncExternalStore=function(L,Y,W){return H.H.useSyncExternalStore(L,Y,W)},Le.useTransition=function(){return H.H.useTransition()},Le.version="19.2.4",Le}var Vb;function fh(){return Vb||(Vb=1,Wd.exports=kS()),Wd.exports}var R=fh();const fe=dh(R),Hv=wS({__proto__:null,default:fe},[R]);var Qd={exports:{}},Yo={},Kd={exports:{}},Zd={};var Gb;function TS(){return Gb||(Gb=1,(function(t){function n(N,P){var X=N.length;N.push(P);e:for(;0<X;){var he=X-1>>>1,Z=N[he];if(0<s(Z,P))N[he]=P,N[X]=Z,X=he;else break e}}function r(N){return N.length===0?null:N[0]}function a(N){if(N.length===0)return null;var P=N[0],X=N.pop();if(X!==P){N[0]=X;e:for(var he=0,Z=N.length,L=Z>>>1;he<L;){var Y=2*(he+1)-1,W=N[Y],re=Y+1,le=N[re];if(0>s(W,X))re<Z&&0>s(le,W)?(N[he]=le,N[re]=X,he=re):(N[he]=W,N[Y]=X,he=Y);else if(re<Z&&0>s(le,X))N[he]=le,N[re]=X,he=re;else break e}}return P}function s(N,P){var X=N.sortIndex-P.sortIndex;return X!==0?X:N.id-P.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,h=c.now();t.unstable_now=function(){return c.now()-h}}var d=[],p=[],b=1,g=null,v=3,_=!1,x=!1,T=!1,O=!1,A=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function I(N){for(var P=r(p);P!==null;){if(P.callback===null)a(p);else if(P.startTime<=N)a(p),P.sortIndex=P.expirationTime,n(d,P);else break;P=r(p)}}function M(N){if(T=!1,I(N),!x)if(r(d)!==null)x=!0,U||(U=!0,V());else{var P=r(p);P!==null&&te(M,P.startTime-N)}}var U=!1,H=-1,z=5,Q=-1;function ee(){return O?!0:!(t.unstable_now()-Q<z)}function ie(){if(O=!1,U){var N=t.unstable_now();Q=N;var P=!0;try{e:{x=!1,T&&(T=!1,C(H),H=-1),_=!0;var X=v;try{t:{for(I(N),g=r(d);g!==null&&!(g.expirationTime>N&&ee());){var he=g.callback;if(typeof he=="function"){g.callback=null,v=g.priorityLevel;var Z=he(g.expirationTime<=N);if(N=t.unstable_now(),typeof Z=="function"){g.callback=Z,I(N),P=!0;break t}g===r(d)&&a(d),I(N)}else a(d);g=r(d)}if(g!==null)P=!0;else{var L=r(p);L!==null&&te(M,L.startTime-N),P=!1}}break e}finally{g=null,v=X,_=!1}P=void 0}}finally{P?V():U=!1}}}var V;if(typeof k=="function")V=function(){k(ie)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,oe=K.port2;K.port1.onmessage=ie,V=function(){oe.postMessage(null)}}else V=function(){A(ie,0)};function te(N,P){H=A(function(){N(t.unstable_now())},P)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(N){N.callback=null},t.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<N?Math.floor(1e3/N):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(N){switch(v){case 1:case 2:case 3:var P=3;break;default:P=v}var X=v;v=P;try{return N()}finally{v=X}},t.unstable_requestPaint=function(){O=!0},t.unstable_runWithPriority=function(N,P){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var X=v;v=N;try{return P()}finally{v=X}},t.unstable_scheduleCallback=function(N,P,X){var he=t.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?he+X:he):X=he,N){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=X+Z,N={id:b++,callback:P,priorityLevel:N,startTime:X,expirationTime:Z,sortIndex:-1},X>he?(N.sortIndex=X,n(p,N),r(d)===null&&N===r(p)&&(T?(C(H),H=-1):T=!0,te(M,X-he))):(N.sortIndex=Z,n(d,N),x||_||(x=!0,U||(U=!0,V()))),N},t.unstable_shouldYield=ee,t.unstable_wrapCallback=function(N){var P=v;return function(){var X=v;v=P;try{return N.apply(this,arguments)}finally{v=X}}}})(Zd)),Zd}var $b;function RS(){return $b||($b=1,Kd.exports=TS()),Kd.exports}var Jd={exports:{}},$t={};var qb;function LS(){if(qb)return $t;qb=1;var t=fh();function n(d){var p="https://react.dev/errors/"+d;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+d+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(d,p,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:d,containerInfo:p,implementation:b}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(d,p){if(d==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return $t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,$t.createPortal=function(d,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(n(299));return u(d,p,null,b)},$t.flushSync=function(d){var p=c.T,b=a.p;try{if(c.T=null,a.p=2,d)return d()}finally{c.T=p,a.p=b,a.d.f()}},$t.preconnect=function(d,p){typeof d=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(d,p))},$t.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},$t.preinit=function(d,p){if(typeof d=="string"&&p&&typeof p.as=="string"){var b=p.as,g=h(b,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,_=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?a.d.S(d,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:_}):b==="script"&&a.d.X(d,{crossOrigin:g,integrity:v,fetchPriority:_,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},$t.preinitModule=function(d,p){if(typeof d=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=h(p.as,p.crossOrigin);a.d.M(d,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(d)},$t.preload=function(d,p){if(typeof d=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,g=h(b,p.crossOrigin);a.d.L(d,b,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},$t.preloadModule=function(d,p){if(typeof d=="string")if(p){var b=h(p.as,p.crossOrigin);a.d.m(d,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(d)},$t.requestFormReset=function(d){a.d.r(d)},$t.unstable_batchedUpdates=function(d,p){return d(p)},$t.useFormState=function(d,p,b){return c.H.useFormState(d,p,b)},$t.useFormStatus=function(){return c.H.useHostTransitionStatus()},$t.version="19.2.4",$t}var Yb;function Bv(){if(Yb)return Jd.exports;Yb=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),Jd.exports=LS(),Jd.exports}var Fb;function NS(){if(Fb)return Yo;Fb=1;var t=RS(),n=fh(),r=Bv();function a(e){var i="https://react.dev/errors/"+e;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)i+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+e+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var i=e,o=e;if(e.alternate)for(;i.return;)i=i.return;else{e=i;do i=e,(i.flags&4098)!==0&&(o=i.return),e=i.return;while(e)}return i.tag===3?o:null}function c(e){if(e.tag===13){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function h(e){if(e.tag===31){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function d(e){if(u(e)!==e)throw Error(a(188))}function p(e){var i=e.alternate;if(!i){if(i=u(e),i===null)throw Error(a(188));return i!==e?null:e}for(var o=e,l=i;;){var f=o.return;if(f===null)break;var m=f.alternate;if(m===null){if(l=f.return,l!==null){o=l;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===o)return d(f),e;if(m===l)return d(f),i;m=m.sibling}throw Error(a(188))}if(o.return!==l.return)o=f,l=m;else{for(var y=!1,S=f.child;S;){if(S===o){y=!0,o=f,l=m;break}if(S===l){y=!0,l=f,o=m;break}S=S.sibling}if(!y){for(S=m.child;S;){if(S===o){y=!0,o=m,l=f;break}if(S===l){y=!0,l=m,o=f;break}S=S.sibling}if(!y)throw Error(a(189))}}if(o.alternate!==l)throw Error(a(190))}if(o.tag!==3)throw Error(a(188));return o.stateNode.current===o?e:i}function b(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e;for(e=e.child;e!==null;){if(i=b(e),i!==null)return i;e=e.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),k=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),ee=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function V(e){return e===null||typeof e!="object"?null:(e=ie&&e[ie]||e["@@iterator"],typeof e=="function"?e:null)}var K=Symbol.for("react.client.reference");function oe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===K?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case A:return"Profiler";case O:return"StrictMode";case M:return"Suspense";case U:return"SuspenseList";case Q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case x:return"Portal";case k:return e.displayName||"Context";case C:return(e._context.displayName||"Context")+".Consumer";case I:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return i=e.displayName||null,i!==null?i:oe(e.type)||"Memo";case z:i=e._payload,e=e._init;try{return oe(e(i))}catch{}}return null}var te=Array.isArray,N=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},he=[],Z=-1;function L(e){return{current:e}}function Y(e){0>Z||(e.current=he[Z],he[Z]=null,Z--)}function W(e,i){Z++,he[Z]=e.current,e.current=i}var re=L(null),le=L(null),ce=L(null),me=L(null);function ge(e,i){switch(W(ce,i),W(le,e),W(re,null),i.nodeType){case 9:case 11:e=(e=i.documentElement)&&(e=e.namespaceURI)?sb(e):0;break;default:if(e=i.tagName,i=i.namespaceURI)i=sb(i),e=ub(i,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(re),W(re,e)}function pe(){Y(re),Y(le),Y(ce)}function ne(e){e.memoizedState!==null&&W(me,e);var i=re.current,o=ub(i,e.type);i!==o&&(W(le,e),W(re,o))}function ve(e){le.current===e&&(Y(re),Y(le)),me.current===e&&(Y(me),Bo._currentValue=X)}var Ae,Ee;function Ge(e){if(Ae===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);Ae=i&&i[1]||"",Ee=-1<o.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+Ae+e+Ee}var Xe=!1;function st(e,i){if(!e||Xe)return"";Xe=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(i){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(J){var F=J}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(J){F=J}e.call(ue.prototype)}}else{try{throw Error()}catch(J){F=J}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(J){if(J&&F&&typeof J.stack=="string")return[J.stack,F.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),y=m[0],S=m[1];if(y&&S){var D=y.split(`
|
|
5
|
+
`),q=S.split(`
|
|
6
|
+
`);for(f=l=0;l<D.length&&!D[l].includes("DetermineComponentFrameRoot");)l++;for(;f<q.length&&!q[f].includes("DetermineComponentFrameRoot");)f++;if(l===D.length||f===q.length)for(l=D.length-1,f=q.length-1;1<=l&&0<=f&&D[l]!==q[f];)f--;for(;1<=l&&0<=f;l--,f--)if(D[l]!==q[f]){if(l!==1||f!==1)do if(l--,f--,0>f||D[l]!==q[f]){var ae=`
|
|
7
|
+
`+D[l].replace(" at new "," at ");return e.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",e.displayName)),ae}while(1<=l&&0<=f);break}}}finally{Xe=!1,Error.prepareStackTrace=o}return(o=e?e.displayName||e.name:"")?Ge(o):""}function dt(e,i){switch(e.tag){case 26:case 27:case 5:return Ge(e.type);case 16:return Ge("Lazy");case 13:return e.child!==i&&i!==null?Ge("Suspense Fallback"):Ge("Suspense");case 19:return Ge("SuspenseList");case 0:case 15:return st(e.type,!1);case 11:return st(e.type.render,!1);case 1:return st(e.type,!0);case 31:return Ge("Activity");default:return""}}function Xt(e){try{var i="",o=null;do i+=dt(e,o),o=e,e=e.return;while(e);return i}catch(l){return`
|
|
8
|
+
Error generating stack: `+l.message+`
|
|
9
|
+
`+l.stack}}var G=Object.prototype.hasOwnProperty,we=t.unstable_scheduleCallback,it=t.unstable_cancelCallback,$e=t.unstable_shouldYield,Wt=t.unstable_requestPaint,Ct=t.unstable_now,oi=t.unstable_getCurrentPriorityLevel,Qt=t.unstable_ImmediatePriority,Qn=t.unstable_UserBlockingPriority,fn=t.unstable_NormalPriority,hn=t.unstable_LowPriority,Pt=t.unstable_IdlePriority,pr=t.log,Kn=t.unstable_setDisableYieldValue,li=null,Mt=null;function Kt(e){if(typeof pr=="function"&&Kn(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(li,e)}catch{}}var At=Math.clz32?Math.clz32:mn,Fr=Math.log,Di=Math.LN2;function mn(e){return e>>>=0,e===0?32:31-(Fr(e)/Di|0)|0}var Ii=256,zi=262144,Un=4194304;function Zt(e){var i=e&42;if(i!==0)return i;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Te(e,i,o){var l=e.pendingLanes;if(l===0)return 0;var f=0,m=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var S=l&134217727;return S!==0?(l=S&~m,l!==0?f=Zt(l):(y&=S,y!==0?f=Zt(y):o||(o=S&~e,o!==0&&(f=Zt(o))))):(S=l&~m,S!==0?f=Zt(S):y!==0?f=Zt(y):o||(o=l&~e,o!==0&&(f=Zt(o)))),f===0?0:i!==0&&i!==f&&(i&m)===0&&(m=f&-f,o=i&-i,m>=o||m===32&&(o&4194048)!==0)?i:f}function We(e,i){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&i)===0}function Re(e,i){switch(e){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 ut(){var e=Un;return Un<<=1,(Un&62914560)===0&&(Un=4194304),e}function pn(e){for(var i=[],o=0;31>o;o++)i.push(e);return i}function tt(e,i){e.pendingLanes|=i,i!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Jt(e,i,o,l,f,m){var y=e.pendingLanes;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=o,e.entangledLanes&=o,e.errorRecoveryDisabledLanes&=o,e.shellSuspendCounter=0;var S=e.entanglements,D=e.expirationTimes,q=e.hiddenUpdates;for(o=y&~o;0<o;){var ae=31-At(o),ue=1<<ae;S[ae]=0,D[ae]=-1;var F=q[ae];if(F!==null)for(q[ae]=null,ae=0;ae<F.length;ae++){var J=F[ae];J!==null&&(J.lane&=-536870913)}o&=~ue}l!==0&&gr(e,l,0),m!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=m&~(y&~i))}function gr(e,i,o){e.pendingLanes|=i,e.suspendedLanes&=~i;var l=31-At(i);e.entangledLanes|=i,e.entanglements[l]=e.entanglements[l]|1073741824|o&261930}function en(e,i){var o=e.entangledLanes|=i;for(e=e.entanglements;o;){var l=31-At(o),f=1<<l;f&i|e[l]&i&&(e[l]|=i),o&=~f}}function tn(e,i){var o=i&-i;return o=(o&42)!==0?1:Xr(o),(o&(e.suspendedLanes|i))!==0?0:o}function Xr(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Hn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ju(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:Mb(e.type))}function Xh(e,i){var o=P.p;try{return P.p=e,i()}finally{P.p=o}}var Pi=Math.random().toString(36).slice(2),jt="__reactFiber$"+Pi,nn="__reactProps$"+Pi,Wr="__reactContainer$"+Pi,Uu="__reactEvents$"+Pi,h_="__reactListeners$"+Pi,m_="__reactHandles$"+Pi,Wh="__reactResources$"+Pi,to="__reactMarker$"+Pi;function Hu(e){delete e[jt],delete e[nn],delete e[Uu],delete e[h_],delete e[m_]}function Qr(e){var i=e[jt];if(i)return i;for(var o=e.parentNode;o;){if(i=o[Wr]||o[jt]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(e=gb(e);e!==null;){if(o=e[jt])return o;e=gb(e)}return i}e=o,o=e.parentNode}return null}function Kr(e){if(e=e[jt]||e[Wr]){var i=e.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return e}return null}function no(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e.stateNode;throw Error(a(33))}function Zr(e){var i=e[Wh];return i||(i=e[Wh]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Ot(e){e[to]=!0}var Qh=new Set,Kh={};function br(e,i){Jr(e,i),Jr(e+"Capture",i)}function Jr(e,i){for(Kh[e]=i,e=0;e<i.length;e++)Qh.add(i[e])}var p_=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]*$"),Zh={},Jh={};function g_(e){return G.call(Jh,e)?!0:G.call(Zh,e)?!1:p_.test(e)?Jh[e]=!0:(Zh[e]=!0,!1)}function bl(e,i,o){if(g_(i))if(o===null)e.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":e.removeAttribute(i);return;case"boolean":var l=i.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(i);return}}e.setAttribute(i,""+o)}}function vl(e,i,o){if(o===null)e.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttribute(i,""+o)}}function si(e,i,o,l){if(l===null)e.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(o);return}e.setAttributeNS(i,o,""+l)}}function wn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function em(e){var i=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function b_(e,i,o){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);if(!e.hasOwnProperty(i)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var f=l.get,m=l.set;return Object.defineProperty(e,i,{configurable:!0,get:function(){return f.call(this)},set:function(y){o=""+y,m.call(this,y)}}),Object.defineProperty(e,i,{enumerable:l.enumerable}),{getValue:function(){return o},setValue:function(y){o=""+y},stopTracking:function(){e._valueTracker=null,delete e[i]}}}}function Bu(e){if(!e._valueTracker){var i=em(e)?"checked":"value";e._valueTracker=b_(e,i,""+e[i])}}function tm(e){if(!e)return!1;var i=e._valueTracker;if(!i)return!0;var o=i.getValue(),l="";return e&&(l=em(e)?e.checked?"true":"false":e.value),e=l,e!==o?(i.setValue(e),!0):!1}function yl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var v_=/[\n"\\]/g;function Cn(e){return e.replace(v_,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Vu(e,i,o,l,f,m,y,S){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),i!=null?y==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+wn(i)):e.value!==""+wn(i)&&(e.value=""+wn(i)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),i!=null?Gu(e,y,wn(i)):o!=null?Gu(e,y,wn(o)):l!=null&&e.removeAttribute("value"),f==null&&m!=null&&(e.defaultChecked=!!m),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+wn(S):e.removeAttribute("name")}function nm(e,i,o,l,f,m,y,S){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.type=m),i!=null||o!=null){if(!(m!=="submit"&&m!=="reset"||i!=null)){Bu(e);return}o=o!=null?""+wn(o):"",i=i!=null?""+wn(i):o,S||i===e.value||(e.value=i),e.defaultValue=i}l=l??f,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=S?e.checked:!!l,e.defaultChecked=!!l,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Bu(e)}function Gu(e,i,o){i==="number"&&yl(e.ownerDocument)===e||e.defaultValue===""+o||(e.defaultValue=""+o)}function ea(e,i,o,l){if(e=e.options,i){i={};for(var f=0;f<o.length;f++)i["$"+o[f]]=!0;for(o=0;o<e.length;o++)f=i.hasOwnProperty("$"+e[o].value),e[o].selected!==f&&(e[o].selected=f),f&&l&&(e[o].defaultSelected=!0)}else{for(o=""+wn(o),i=null,f=0;f<e.length;f++){if(e[f].value===o){e[f].selected=!0,l&&(e[f].defaultSelected=!0);return}i!==null||e[f].disabled||(i=e[f])}i!==null&&(i.selected=!0)}}function im(e,i,o){if(i!=null&&(i=""+wn(i),i!==e.value&&(e.value=i),o==null)){e.defaultValue!==i&&(e.defaultValue=i);return}e.defaultValue=o!=null?""+wn(o):""}function rm(e,i,o,l){if(i==null){if(l!=null){if(o!=null)throw Error(a(92));if(te(l)){if(1<l.length)throw Error(a(93));l=l[0]}o=l}o==null&&(o=""),i=o}o=wn(i),e.defaultValue=o,l=e.textContent,l===o&&l!==""&&l!==null&&(e.value=l),Bu(e)}function ta(e,i){if(i){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=i;return}}e.textContent=i}var y_=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 am(e,i,o){var l=i.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?l?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="":l?e.setProperty(i,o):typeof o!="number"||o===0||y_.has(i)?i==="float"?e.cssFloat=o:e[i]=(""+o).trim():e[i]=o+"px"}function om(e,i,o){if(i!=null&&typeof i!="object")throw Error(a(62));if(e=e.style,o!=null){for(var l in o)!o.hasOwnProperty(l)||i!=null&&i.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var f in i)l=i[f],i.hasOwnProperty(f)&&o[f]!==l&&am(e,f,l)}else for(var m in i)i.hasOwnProperty(m)&&am(e,m,i[m])}function $u(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var __=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),x_=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function _l(e){return x_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ui(){}var qu=null;function Yu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var na=null,ia=null;function lm(e){var i=Kr(e);if(i&&(e=i.stateNode)){var o=e[nn]||null;e:switch(e=i.stateNode,i.type){case"input":if(Vu(e,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),i=o.name,o.type==="radio"&&i!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Cn(""+i)+'"][type="radio"]'),i=0;i<o.length;i++){var l=o[i];if(l!==e&&l.form===e.form){var f=l[nn]||null;if(!f)throw Error(a(90));Vu(l,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(i=0;i<o.length;i++)l=o[i],l.form===e.form&&tm(l)}break e;case"textarea":im(e,o.value,o.defaultValue);break e;case"select":i=o.value,i!=null&&ea(e,!!o.multiple,i,!1)}}}var Fu=!1;function sm(e,i,o){if(Fu)return e(i,o);Fu=!0;try{var l=e(i);return l}finally{if(Fu=!1,(na!==null||ia!==null)&&(ls(),na&&(i=na,e=ia,ia=na=null,lm(i),e)))for(i=0;i<e.length;i++)lm(e[i])}}function io(e,i){var o=e.stateNode;if(o===null)return null;var l=o[nn]||null;if(l===null)return null;o=l[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(a(231,i,typeof o));return o}var ci=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xu=!1;if(ci)try{var ro={};Object.defineProperty(ro,"passive",{get:function(){Xu=!0}}),window.addEventListener("test",ro,ro),window.removeEventListener("test",ro,ro)}catch{Xu=!1}var ji=null,Wu=null,xl=null;function um(){if(xl)return xl;var e,i=Wu,o=i.length,l,f="value"in ji?ji.value:ji.textContent,m=f.length;for(e=0;e<o&&i[e]===f[e];e++);var y=o-e;for(l=1;l<=y&&i[o-l]===f[m-l];l++);return xl=f.slice(e,1<l?1-l:void 0)}function Sl(e){var i=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&i===13&&(e=13)):e=i,e===10&&(e=13),32<=e||e===13?e:0}function El(){return!0}function cm(){return!1}function rn(e){function i(o,l,f,m,y){this._reactName=o,this._targetInst=f,this.type=l,this.nativeEvent=m,this.target=y,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(o=e[S],this[S]=o?o(m):m[S]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?El:cm,this.isPropagationStopped=cm,this}return g(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=El)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=El)},persist:function(){},isPersistent:El}),i}var vr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wl=rn(vr),ao=g({},vr,{view:0,detail:0}),S_=rn(ao),Qu,Ku,oo,Cl=g({},ao,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ju,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==oo&&(oo&&e.type==="mousemove"?(Qu=e.screenX-oo.screenX,Ku=e.screenY-oo.screenY):Ku=Qu=0,oo=e),Qu)},movementY:function(e){return"movementY"in e?e.movementY:Ku}}),dm=rn(Cl),E_=g({},Cl,{dataTransfer:0}),w_=rn(E_),C_=g({},ao,{relatedTarget:0}),Zu=rn(C_),A_=g({},vr,{animationName:0,elapsedTime:0,pseudoElement:0}),k_=rn(A_),T_=g({},vr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),R_=rn(T_),L_=g({},vr,{data:0}),fm=rn(L_),N_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},M_={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"},O_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function D_(e){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(e):(e=O_[e])?!!i[e]:!1}function Ju(){return D_}var I_=g({},ao,{key:function(e){if(e.key){var i=N_[e.key]||e.key;if(i!=="Unidentified")return i}return e.type==="keypress"?(e=Sl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?M_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ju,charCode:function(e){return e.type==="keypress"?Sl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Sl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),z_=rn(I_),P_=g({},Cl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hm=rn(P_),j_=g({},ao,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ju}),U_=rn(j_),H_=g({},vr,{propertyName:0,elapsedTime:0,pseudoElement:0}),B_=rn(H_),V_=g({},Cl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),G_=rn(V_),$_=g({},vr,{newState:0,oldState:0}),q_=rn($_),Y_=[9,13,27,32],ec=ci&&"CompositionEvent"in window,lo=null;ci&&"documentMode"in document&&(lo=document.documentMode);var F_=ci&&"TextEvent"in window&&!lo,mm=ci&&(!ec||lo&&8<lo&&11>=lo),pm=" ",gm=!1;function bm(e,i){switch(e){case"keyup":return Y_.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ra=!1;function X_(e,i){switch(e){case"compositionend":return vm(i);case"keypress":return i.which!==32?null:(gm=!0,pm);case"textInput":return e=i.data,e===pm&&gm?null:e;default:return null}}function W_(e,i){if(ra)return e==="compositionend"||!ec&&bm(e,i)?(e=um(),xl=Wu=ji=null,ra=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return mm&&i.locale!=="ko"?null:i.data;default:return null}}var Q_={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 ym(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i==="input"?!!Q_[e.type]:i==="textarea"}function _m(e,i,o,l){na?ia?ia.push(l):ia=[l]:na=l,i=ms(i,"onChange"),0<i.length&&(o=new wl("onChange","change",null,o,l),e.push({event:o,listeners:i}))}var so=null,uo=null;function K_(e){nb(e,0)}function Al(e){var i=no(e);if(tm(i))return e}function xm(e,i){if(e==="change")return i}var Sm=!1;if(ci){var tc;if(ci){var nc="oninput"in document;if(!nc){var Em=document.createElement("div");Em.setAttribute("oninput","return;"),nc=typeof Em.oninput=="function"}tc=nc}else tc=!1;Sm=tc&&(!document.documentMode||9<document.documentMode)}function wm(){so&&(so.detachEvent("onpropertychange",Cm),uo=so=null)}function Cm(e){if(e.propertyName==="value"&&Al(uo)){var i=[];_m(i,uo,e,Yu(e)),sm(K_,i)}}function Z_(e,i,o){e==="focusin"?(wm(),so=i,uo=o,so.attachEvent("onpropertychange",Cm)):e==="focusout"&&wm()}function J_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Al(uo)}function ex(e,i){if(e==="click")return Al(i)}function tx(e,i){if(e==="input"||e==="change")return Al(i)}function nx(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}var gn=typeof Object.is=="function"?Object.is:nx;function co(e,i){if(gn(e,i))return!0;if(typeof e!="object"||e===null||typeof i!="object"||i===null)return!1;var o=Object.keys(e),l=Object.keys(i);if(o.length!==l.length)return!1;for(l=0;l<o.length;l++){var f=o[l];if(!G.call(i,f)||!gn(e[f],i[f]))return!1}return!0}function Am(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function km(e,i){var o=Am(e);e=0;for(var l;o;){if(o.nodeType===3){if(l=e+o.textContent.length,e<=i&&l>=i)return{node:o,offset:i-e};e=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Am(o)}}function Tm(e,i){return e&&i?e===i?!0:e&&e.nodeType===3?!1:i&&i.nodeType===3?Tm(e,i.parentNode):"contains"in e?e.contains(i):e.compareDocumentPosition?!!(e.compareDocumentPosition(i)&16):!1:!1}function Rm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var i=yl(e.document);i instanceof e.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)e=i.contentWindow;else break;i=yl(e.document)}return i}function ic(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i&&(i==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||i==="textarea"||e.contentEditable==="true")}var ix=ci&&"documentMode"in document&&11>=document.documentMode,aa=null,rc=null,fo=null,ac=!1;function Lm(e,i,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;ac||aa==null||aa!==yl(l)||(l=aa,"selectionStart"in l&&ic(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),fo&&co(fo,l)||(fo=l,l=ms(rc,"onSelect"),0<l.length&&(i=new wl("onSelect","select",null,i,o),e.push({event:i,listeners:l}),i.target=aa)))}function yr(e,i){var o={};return o[e.toLowerCase()]=i.toLowerCase(),o["Webkit"+e]="webkit"+i,o["Moz"+e]="moz"+i,o}var oa={animationend:yr("Animation","AnimationEnd"),animationiteration:yr("Animation","AnimationIteration"),animationstart:yr("Animation","AnimationStart"),transitionrun:yr("Transition","TransitionRun"),transitionstart:yr("Transition","TransitionStart"),transitioncancel:yr("Transition","TransitionCancel"),transitionend:yr("Transition","TransitionEnd")},oc={},Nm={};ci&&(Nm=document.createElement("div").style,"AnimationEvent"in window||(delete oa.animationend.animation,delete oa.animationiteration.animation,delete oa.animationstart.animation),"TransitionEvent"in window||delete oa.transitionend.transition);function _r(e){if(oc[e])return oc[e];if(!oa[e])return e;var i=oa[e],o;for(o in i)if(i.hasOwnProperty(o)&&o in Nm)return oc[e]=i[o];return e}var Mm=_r("animationend"),Om=_r("animationiteration"),Dm=_r("animationstart"),rx=_r("transitionrun"),ax=_r("transitionstart"),ox=_r("transitioncancel"),Im=_r("transitionend"),zm=new Map,lc="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(" ");lc.push("scrollEnd");function Bn(e,i){zm.set(e,i),br(i,[e])}var kl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},An=[],la=0,sc=0;function Tl(){for(var e=la,i=sc=la=0;i<e;){var o=An[i];An[i++]=null;var l=An[i];An[i++]=null;var f=An[i];An[i++]=null;var m=An[i];if(An[i++]=null,l!==null&&f!==null){var y=l.pending;y===null?f.next=f:(f.next=y.next,y.next=f),l.pending=f}m!==0&&Pm(o,f,m)}}function Rl(e,i,o,l){An[la++]=e,An[la++]=i,An[la++]=o,An[la++]=l,sc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function uc(e,i,o,l){return Rl(e,i,o,l),Ll(e)}function xr(e,i){return Rl(e,null,null,i),Ll(e)}function Pm(e,i,o){e.lanes|=o;var l=e.alternate;l!==null&&(l.lanes|=o);for(var f=!1,m=e.return;m!==null;)m.childLanes|=o,l=m.alternate,l!==null&&(l.childLanes|=o),m.tag===22&&(e=m.stateNode,e===null||e._visibility&1||(f=!0)),e=m,m=m.return;return e.tag===3?(m=e.stateNode,f&&i!==null&&(f=31-At(o),e=m.hiddenUpdates,l=e[f],l===null?e[f]=[i]:l.push(i),i.lane=o|536870912),m):null}function Ll(e){if(50<Do)throw Do=0,vd=null,Error(a(185));for(var i=e.return;i!==null;)e=i,i=e.return;return e.tag===3?e.stateNode:null}var sa={};function lx(e,i,o,l){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bn(e,i,o,l){return new lx(e,i,o,l)}function cc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function di(e,i){var o=e.alternate;return o===null?(o=bn(e.tag,i,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=i,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&65011712,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,i=e.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o.refCleanup=e.refCleanup,o}function jm(e,i){e.flags&=65011714;var o=e.alternate;return o===null?(e.childLanes=0,e.lanes=i,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=o.childLanes,e.lanes=o.lanes,e.child=o.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=o.memoizedProps,e.memoizedState=o.memoizedState,e.updateQueue=o.updateQueue,e.type=o.type,i=o.dependencies,e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),e}function Nl(e,i,o,l,f,m){var y=0;if(l=e,typeof e=="function")cc(e)&&(y=1);else if(typeof e=="string")y=fS(e,o,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Q:return e=bn(31,o,i,f),e.elementType=Q,e.lanes=m,e;case T:return Sr(o.children,f,m,i);case O:y=8,f|=24;break;case A:return e=bn(12,o,i,f|2),e.elementType=A,e.lanes=m,e;case M:return e=bn(13,o,i,f),e.elementType=M,e.lanes=m,e;case U:return e=bn(19,o,i,f),e.elementType=U,e.lanes=m,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case k:y=10;break e;case C:y=9;break e;case I:y=11;break e;case H:y=14;break e;case z:y=16,l=null;break e}y=29,o=Error(a(130,e===null?"null":typeof e,"")),l=null}return i=bn(y,o,i,f),i.elementType=e,i.type=l,i.lanes=m,i}function Sr(e,i,o,l){return e=bn(7,e,l,i),e.lanes=o,e}function dc(e,i,o){return e=bn(6,e,null,i),e.lanes=o,e}function Um(e){var i=bn(18,null,null,0);return i.stateNode=e,i}function fc(e,i,o){return i=bn(4,e.children!==null?e.children:[],e.key,i),i.lanes=o,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}var Hm=new WeakMap;function kn(e,i){if(typeof e=="object"&&e!==null){var o=Hm.get(e);return o!==void 0?o:(i={value:e,source:i,stack:Xt(i)},Hm.set(e,i),i)}return{value:e,source:i,stack:Xt(i)}}var ua=[],ca=0,Ml=null,ho=0,Tn=[],Rn=0,Ui=null,Zn=1,Jn="";function fi(e,i){ua[ca++]=ho,ua[ca++]=Ml,Ml=e,ho=i}function Bm(e,i,o){Tn[Rn++]=Zn,Tn[Rn++]=Jn,Tn[Rn++]=Ui,Ui=e;var l=Zn;e=Jn;var f=32-At(l)-1;l&=~(1<<f),o+=1;var m=32-At(i)+f;if(30<m){var y=f-f%5;m=(l&(1<<y)-1).toString(32),l>>=y,f-=y,Zn=1<<32-At(i)+f|o<<f|l,Jn=m+e}else Zn=1<<m|o<<f|l,Jn=e}function hc(e){e.return!==null&&(fi(e,1),Bm(e,1,0))}function mc(e){for(;e===Ml;)Ml=ua[--ca],ua[ca]=null,ho=ua[--ca],ua[ca]=null;for(;e===Ui;)Ui=Tn[--Rn],Tn[Rn]=null,Jn=Tn[--Rn],Tn[Rn]=null,Zn=Tn[--Rn],Tn[Rn]=null}function Vm(e,i){Tn[Rn++]=Zn,Tn[Rn++]=Jn,Tn[Rn++]=Ui,Zn=i.id,Jn=i.overflow,Ui=e}var Ut=null,ot=null,Be=!1,Hi=null,Ln=!1,pc=Error(a(519));function Bi(e){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw mo(kn(i,e)),pc}function Gm(e){var i=e.stateNode,o=e.type,l=e.memoizedProps;switch(i[jt]=e,i[nn]=l,o){case"dialog":Pe("cancel",i),Pe("close",i);break;case"iframe":case"object":case"embed":Pe("load",i);break;case"video":case"audio":for(o=0;o<zo.length;o++)Pe(zo[o],i);break;case"source":Pe("error",i);break;case"img":case"image":case"link":Pe("error",i),Pe("load",i);break;case"details":Pe("toggle",i);break;case"input":Pe("invalid",i),nm(i,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Pe("invalid",i);break;case"textarea":Pe("invalid",i),rm(i,l.value,l.defaultValue,l.children)}o=l.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||i.textContent===""+o||l.suppressHydrationWarning===!0||ob(i.textContent,o)?(l.popover!=null&&(Pe("beforetoggle",i),Pe("toggle",i)),l.onScroll!=null&&Pe("scroll",i),l.onScrollEnd!=null&&Pe("scrollend",i),l.onClick!=null&&(i.onclick=ui),i=!0):i=!1,i||Bi(e,!0)}function $m(e){for(Ut=e.return;Ut;)switch(Ut.tag){case 5:case 31:case 13:Ln=!1;return;case 27:case 3:Ln=!0;return;default:Ut=Ut.return}}function da(e){if(e!==Ut)return!1;if(!Be)return $m(e),Be=!0,!1;var i=e.tag,o;if((o=i!==3&&i!==27)&&((o=i===5)&&(o=e.type,o=!(o!=="form"&&o!=="button")||Od(e.type,e.memoizedProps)),o=!o),o&&ot&&Bi(e),$m(e),i===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));ot=pb(e)}else if(i===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));ot=pb(e)}else i===27?(i=ot,tr(e.type)?(e=jd,jd=null,ot=e):ot=i):ot=Ut?Mn(e.stateNode.nextSibling):null;return!0}function Er(){ot=Ut=null,Be=!1}function gc(){var e=Hi;return e!==null&&(sn===null?sn=e:sn.push.apply(sn,e),Hi=null),e}function mo(e){Hi===null?Hi=[e]:Hi.push(e)}var bc=L(null),wr=null,hi=null;function Vi(e,i,o){W(bc,i._currentValue),i._currentValue=o}function mi(e){e._currentValue=bc.current,Y(bc)}function vc(e,i,o){for(;e!==null;){var l=e.alternate;if((e.childLanes&i)!==i?(e.childLanes|=i,l!==null&&(l.childLanes|=i)):l!==null&&(l.childLanes&i)!==i&&(l.childLanes|=i),e===o)break;e=e.return}}function yc(e,i,o,l){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var m=f.dependencies;if(m!==null){var y=f.child;m=m.firstContext;e:for(;m!==null;){var S=m;m=f;for(var D=0;D<i.length;D++)if(S.context===i[D]){m.lanes|=o,S=m.alternate,S!==null&&(S.lanes|=o),vc(m.return,o,e),l||(y=null);break e}m=S.next}}else if(f.tag===18){if(y=f.return,y===null)throw Error(a(341));y.lanes|=o,m=y.alternate,m!==null&&(m.lanes|=o),vc(y,o,e),y=null}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===e){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}}function fa(e,i,o,l){e=null;for(var f=i,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var y=f.alternate;if(y===null)throw Error(a(387));if(y=y.memoizedProps,y!==null){var S=f.type;gn(f.pendingProps.value,y.value)||(e!==null?e.push(S):e=[S])}}else if(f===me.current){if(y=f.alternate,y===null)throw Error(a(387));y.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Bo):e=[Bo])}f=f.return}e!==null&&yc(i,e,o,l),i.flags|=262144}function Ol(e){for(e=e.firstContext;e!==null;){if(!gn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Cr(e){wr=e,hi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ht(e){return qm(wr,e)}function Dl(e,i){return wr===null&&Cr(e),qm(e,i)}function qm(e,i){var o=i._currentValue;if(i={context:i,memoizedValue:o,next:null},hi===null){if(e===null)throw Error(a(308));hi=i,e.dependencies={lanes:0,firstContext:i},e.flags|=524288}else hi=hi.next=i;return o}var sx=typeof AbortController<"u"?AbortController:function(){var e=[],i=this.signal={aborted:!1,addEventListener:function(o,l){e.push(l)}};this.abort=function(){i.aborted=!0,e.forEach(function(o){return o()})}},ux=t.unstable_scheduleCallback,cx=t.unstable_NormalPriority,yt={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _c(){return{controller:new sx,data:new Map,refCount:0}}function po(e){e.refCount--,e.refCount===0&&ux(cx,function(){e.controller.abort()})}var go=null,xc=0,ha=0,ma=null;function dx(e,i){if(go===null){var o=go=[];xc=0,ha=wd(),ma={status:"pending",value:void 0,then:function(l){o.push(l)}}}return xc++,i.then(Ym,Ym),i}function Ym(){if(--xc===0&&go!==null){ma!==null&&(ma.status="fulfilled");var e=go;go=null,ha=0,ma=null;for(var i=0;i<e.length;i++)(0,e[i])()}}function fx(e,i){var o=[],l={status:"pending",value:null,reason:null,then:function(f){o.push(f)}};return e.then(function(){l.status="fulfilled",l.value=i;for(var f=0;f<o.length;f++)(0,o[f])(i)},function(f){for(l.status="rejected",l.reason=f,f=0;f<o.length;f++)(0,o[f])(void 0)}),l}var Fm=N.S;N.S=function(e,i){Lg=Ct(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&dx(e,i),Fm!==null&&Fm(e,i)};var Ar=L(null);function Sc(){var e=Ar.current;return e!==null?e:nt.pooledCache}function Il(e,i){i===null?W(Ar,Ar.current):W(Ar,i.pool)}function Xm(){var e=Sc();return e===null?null:{parent:yt._currentValue,pool:e}}var pa=Error(a(460)),Ec=Error(a(474)),zl=Error(a(542)),Pl={then:function(){}};function Wm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Qm(e,i,o){switch(o=e[o],o===void 0?e.push(i):o!==i&&(i.then(ui,ui),i=o),i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,Zm(e),e;default:if(typeof i.status=="string")i.then(ui,ui);else{if(e=nt,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=i,e.status="pending",e.then(function(l){if(i.status==="pending"){var f=i;f.status="fulfilled",f.value=l}},function(l){if(i.status==="pending"){var f=i;f.status="rejected",f.reason=l}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,Zm(e),e}throw Tr=i,pa}}function kr(e){try{var i=e._init;return i(e._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Tr=o,pa):o}}var Tr=null;function Km(){if(Tr===null)throw Error(a(459));var e=Tr;return Tr=null,e}function Zm(e){if(e===pa||e===zl)throw Error(a(483))}var ga=null,bo=0;function jl(e){var i=bo;return bo+=1,ga===null&&(ga=[]),Qm(ga,e,i)}function vo(e,i){i=i.props.ref,e.ref=i!==void 0?i:null}function Ul(e,i){throw i.$$typeof===v?Error(a(525)):(e=Object.prototype.toString.call(i),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)))}function Jm(e){function i(B,j){if(e){var $=B.deletions;$===null?(B.deletions=[j],B.flags|=16):$.push(j)}}function o(B,j){if(!e)return null;for(;j!==null;)i(B,j),j=j.sibling;return null}function l(B){for(var j=new Map;B!==null;)B.key!==null?j.set(B.key,B):j.set(B.index,B),B=B.sibling;return j}function f(B,j){return B=di(B,j),B.index=0,B.sibling=null,B}function m(B,j,$){return B.index=$,e?($=B.alternate,$!==null?($=$.index,$<j?(B.flags|=67108866,j):$):(B.flags|=67108866,j)):(B.flags|=1048576,j)}function y(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function S(B,j,$,se){return j===null||j.tag!==6?(j=dc($,B.mode,se),j.return=B,j):(j=f(j,$),j.return=B,j)}function D(B,j,$,se){var Ce=$.type;return Ce===T?ae(B,j,$.props.children,se,$.key):j!==null&&(j.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===z&&kr(Ce)===j.type)?(j=f(j,$.props),vo(j,$),j.return=B,j):(j=Nl($.type,$.key,$.props,null,B.mode,se),vo(j,$),j.return=B,j)}function q(B,j,$,se){return j===null||j.tag!==4||j.stateNode.containerInfo!==$.containerInfo||j.stateNode.implementation!==$.implementation?(j=fc($,B.mode,se),j.return=B,j):(j=f(j,$.children||[]),j.return=B,j)}function ae(B,j,$,se,Ce){return j===null||j.tag!==7?(j=Sr($,B.mode,se,Ce),j.return=B,j):(j=f(j,$),j.return=B,j)}function ue(B,j,$){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=dc(""+j,B.mode,$),j.return=B,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case _:return $=Nl(j.type,j.key,j.props,null,B.mode,$),vo($,j),$.return=B,$;case x:return j=fc(j,B.mode,$),j.return=B,j;case z:return j=kr(j),ue(B,j,$)}if(te(j)||V(j))return j=Sr(j,B.mode,$,null),j.return=B,j;if(typeof j.then=="function")return ue(B,jl(j),$);if(j.$$typeof===k)return ue(B,Dl(B,j),$);Ul(B,j)}return null}function F(B,j,$,se){var Ce=j!==null?j.key:null;if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return Ce!==null?null:S(B,j,""+$,se);if(typeof $=="object"&&$!==null){switch($.$$typeof){case _:return $.key===Ce?D(B,j,$,se):null;case x:return $.key===Ce?q(B,j,$,se):null;case z:return $=kr($),F(B,j,$,se)}if(te($)||V($))return Ce!==null?null:ae(B,j,$,se,null);if(typeof $.then=="function")return F(B,j,jl($),se);if($.$$typeof===k)return F(B,j,Dl(B,$),se);Ul(B,$)}return null}function J(B,j,$,se,Ce){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return B=B.get($)||null,S(j,B,""+se,Ce);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case _:return B=B.get(se.key===null?$:se.key)||null,D(j,B,se,Ce);case x:return B=B.get(se.key===null?$:se.key)||null,q(j,B,se,Ce);case z:return se=kr(se),J(B,j,$,se,Ce)}if(te(se)||V(se))return B=B.get($)||null,ae(j,B,se,Ce,null);if(typeof se.then=="function")return J(B,j,$,jl(se),Ce);if(se.$$typeof===k)return J(B,j,$,Dl(j,se),Ce);Ul(j,se)}return null}function ye(B,j,$,se){for(var Ce=null,qe=null,Se=j,Oe=j=0,Ue=null;Se!==null&&Oe<$.length;Oe++){Se.index>Oe?(Ue=Se,Se=null):Ue=Se.sibling;var Ye=F(B,Se,$[Oe],se);if(Ye===null){Se===null&&(Se=Ue);break}e&&Se&&Ye.alternate===null&&i(B,Se),j=m(Ye,j,Oe),qe===null?Ce=Ye:qe.sibling=Ye,qe=Ye,Se=Ue}if(Oe===$.length)return o(B,Se),Be&&fi(B,Oe),Ce;if(Se===null){for(;Oe<$.length;Oe++)Se=ue(B,$[Oe],se),Se!==null&&(j=m(Se,j,Oe),qe===null?Ce=Se:qe.sibling=Se,qe=Se);return Be&&fi(B,Oe),Ce}for(Se=l(Se);Oe<$.length;Oe++)Ue=J(Se,B,Oe,$[Oe],se),Ue!==null&&(e&&Ue.alternate!==null&&Se.delete(Ue.key===null?Oe:Ue.key),j=m(Ue,j,Oe),qe===null?Ce=Ue:qe.sibling=Ue,qe=Ue);return e&&Se.forEach(function(or){return i(B,or)}),Be&&fi(B,Oe),Ce}function ke(B,j,$,se){if($==null)throw Error(a(151));for(var Ce=null,qe=null,Se=j,Oe=j=0,Ue=null,Ye=$.next();Se!==null&&!Ye.done;Oe++,Ye=$.next()){Se.index>Oe?(Ue=Se,Se=null):Ue=Se.sibling;var or=F(B,Se,Ye.value,se);if(or===null){Se===null&&(Se=Ue);break}e&&Se&&or.alternate===null&&i(B,Se),j=m(or,j,Oe),qe===null?Ce=or:qe.sibling=or,qe=or,Se=Ue}if(Ye.done)return o(B,Se),Be&&fi(B,Oe),Ce;if(Se===null){for(;!Ye.done;Oe++,Ye=$.next())Ye=ue(B,Ye.value,se),Ye!==null&&(j=m(Ye,j,Oe),qe===null?Ce=Ye:qe.sibling=Ye,qe=Ye);return Be&&fi(B,Oe),Ce}for(Se=l(Se);!Ye.done;Oe++,Ye=$.next())Ye=J(Se,B,Oe,Ye.value,se),Ye!==null&&(e&&Ye.alternate!==null&&Se.delete(Ye.key===null?Oe:Ye.key),j=m(Ye,j,Oe),qe===null?Ce=Ye:qe.sibling=Ye,qe=Ye);return e&&Se.forEach(function(ES){return i(B,ES)}),Be&&fi(B,Oe),Ce}function et(B,j,$,se){if(typeof $=="object"&&$!==null&&$.type===T&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case _:e:{for(var Ce=$.key;j!==null;){if(j.key===Ce){if(Ce=$.type,Ce===T){if(j.tag===7){o(B,j.sibling),se=f(j,$.props.children),se.return=B,B=se;break e}}else if(j.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===z&&kr(Ce)===j.type){o(B,j.sibling),se=f(j,$.props),vo(se,$),se.return=B,B=se;break e}o(B,j);break}else i(B,j);j=j.sibling}$.type===T?(se=Sr($.props.children,B.mode,se,$.key),se.return=B,B=se):(se=Nl($.type,$.key,$.props,null,B.mode,se),vo(se,$),se.return=B,B=se)}return y(B);case x:e:{for(Ce=$.key;j!==null;){if(j.key===Ce)if(j.tag===4&&j.stateNode.containerInfo===$.containerInfo&&j.stateNode.implementation===$.implementation){o(B,j.sibling),se=f(j,$.children||[]),se.return=B,B=se;break e}else{o(B,j);break}else i(B,j);j=j.sibling}se=fc($,B.mode,se),se.return=B,B=se}return y(B);case z:return $=kr($),et(B,j,$,se)}if(te($))return ye(B,j,$,se);if(V($)){if(Ce=V($),typeof Ce!="function")throw Error(a(150));return $=Ce.call($),ke(B,j,$,se)}if(typeof $.then=="function")return et(B,j,jl($),se);if($.$$typeof===k)return et(B,j,Dl(B,$),se);Ul(B,$)}return typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint"?($=""+$,j!==null&&j.tag===6?(o(B,j.sibling),se=f(j,$),se.return=B,B=se):(o(B,j),se=dc($,B.mode,se),se.return=B,B=se),y(B)):o(B,j)}return function(B,j,$,se){try{bo=0;var Ce=et(B,j,$,se);return ga=null,Ce}catch(Se){if(Se===pa||Se===zl)throw Se;var qe=bn(29,Se,null,B.mode);return qe.lanes=se,qe.return=B,qe}}}var Rr=Jm(!0),ep=Jm(!1),Gi=!1;function wc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Cc(e,i){e=e.updateQueue,i.updateQueue===e&&(i.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function $i(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qi(e,i,o){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Fe&2)!==0){var f=l.pending;return f===null?i.next=i:(i.next=f.next,f.next=i),l.pending=i,i=Ll(e),Pm(e,null,o),i}return Rl(e,l,i,o),Ll(e)}function yo(e,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194048)!==0)){var l=i.lanes;l&=e.pendingLanes,o|=l,i.lanes=o,en(e,o)}}function Ac(e,i){var o=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var f=null,m=null;if(o=o.firstBaseUpdate,o!==null){do{var y={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};m===null?f=m=y:m=m.next=y,o=o.next}while(o!==null);m===null?f=m=i:m=m.next=i}else f=m=i;o={baseState:l.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:l.shared,callbacks:l.callbacks},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=i:e.next=i,o.lastBaseUpdate=i}var kc=!1;function _o(){if(kc){var e=ma;if(e!==null)throw e}}function xo(e,i,o,l){kc=!1;var f=e.updateQueue;Gi=!1;var m=f.firstBaseUpdate,y=f.lastBaseUpdate,S=f.shared.pending;if(S!==null){f.shared.pending=null;var D=S,q=D.next;D.next=null,y===null?m=q:y.next=q,y=D;var ae=e.alternate;ae!==null&&(ae=ae.updateQueue,S=ae.lastBaseUpdate,S!==y&&(S===null?ae.firstBaseUpdate=q:S.next=q,ae.lastBaseUpdate=D))}if(m!==null){var ue=f.baseState;y=0,ae=q=D=null,S=m;do{var F=S.lane&-536870913,J=F!==S.lane;if(J?(je&F)===F:(l&F)===F){F!==0&&F===ha&&(kc=!0),ae!==null&&(ae=ae.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ye=e,ke=S;F=i;var et=o;switch(ke.tag){case 1:if(ye=ke.payload,typeof ye=="function"){ue=ye.call(et,ue,F);break e}ue=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=ke.payload,F=typeof ye=="function"?ye.call(et,ue,F):ye,F==null)break e;ue=g({},ue,F);break e;case 2:Gi=!0}}F=S.callback,F!==null&&(e.flags|=64,J&&(e.flags|=8192),J=f.callbacks,J===null?f.callbacks=[F]:J.push(F))}else J={lane:F,tag:S.tag,payload:S.payload,callback:S.callback,next:null},ae===null?(q=ae=J,D=ue):ae=ae.next=J,y|=F;if(S=S.next,S===null){if(S=f.shared.pending,S===null)break;J=S,S=J.next,J.next=null,f.lastBaseUpdate=J,f.shared.pending=null}}while(!0);ae===null&&(D=ue),f.baseState=D,f.firstBaseUpdate=q,f.lastBaseUpdate=ae,m===null&&(f.shared.lanes=0),Qi|=y,e.lanes=y,e.memoizedState=ue}}function tp(e,i){if(typeof e!="function")throw Error(a(191,e));e.call(i)}function np(e,i){var o=e.callbacks;if(o!==null)for(e.callbacks=null,e=0;e<o.length;e++)tp(o[e],i)}var ba=L(null),Hl=L(0);function ip(e,i){e=Ei,W(Hl,e),W(ba,i),Ei=e|i.baseLanes}function Tc(){W(Hl,Ei),W(ba,ba.current)}function Rc(){Ei=Hl.current,Y(ba),Y(Hl)}var vn=L(null),Nn=null;function Yi(e){var i=e.alternate;W(pt,pt.current&1),W(vn,e),Nn===null&&(i===null||ba.current!==null||i.memoizedState!==null)&&(Nn=e)}function Lc(e){W(pt,pt.current),W(vn,e),Nn===null&&(Nn=e)}function rp(e){e.tag===22?(W(pt,pt.current),W(vn,e),Nn===null&&(Nn=e)):Fi()}function Fi(){W(pt,pt.current),W(vn,vn.current)}function yn(e){Y(vn),Nn===e&&(Nn=null),Y(pt)}var pt=L(0);function Bl(e){for(var i=e;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||zd(o)||Pd(o)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var pi=0,Me=null,Ze=null,_t=null,Vl=!1,va=!1,Lr=!1,Gl=0,So=0,ya=null,hx=0;function ht(){throw Error(a(321))}function Nc(e,i){if(i===null)return!1;for(var o=0;o<i.length&&o<e.length;o++)if(!gn(e[o],i[o]))return!1;return!0}function Mc(e,i,o,l,f,m){return pi=m,Me=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,N.H=e===null||e.memoizedState===null?Bp:Fc,Lr=!1,m=o(l,f),Lr=!1,va&&(m=op(i,o,l,f)),ap(e),m}function ap(e){N.H=Co;var i=Ze!==null&&Ze.next!==null;if(pi=0,_t=Ze=Me=null,Vl=!1,So=0,ya=null,i)throw Error(a(300));e===null||xt||(e=e.dependencies,e!==null&&Ol(e)&&(xt=!0))}function op(e,i,o,l){Me=e;var f=0;do{if(va&&(ya=null),So=0,va=!1,25<=f)throw Error(a(301));if(f+=1,_t=Ze=null,e.updateQueue!=null){var m=e.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}N.H=Vp,m=i(o,l)}while(va);return m}function mx(){var e=N.H,i=e.useState()[0];return i=typeof i.then=="function"?Eo(i):i,e=e.useState()[0],(Ze!==null?Ze.memoizedState:null)!==e&&(Me.flags|=1024),i}function Oc(){var e=Gl!==0;return Gl=0,e}function Dc(e,i,o){i.updateQueue=e.updateQueue,i.flags&=-2053,e.lanes&=~o}function Ic(e){if(Vl){for(e=e.memoizedState;e!==null;){var i=e.queue;i!==null&&(i.pending=null),e=e.next}Vl=!1}pi=0,_t=Ze=Me=null,va=!1,So=Gl=0,ya=null}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _t===null?Me.memoizedState=_t=e:_t=_t.next=e,_t}function gt(){if(Ze===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=Ze.next;var i=_t===null?Me.memoizedState:_t.next;if(i!==null)_t=i,Ze=e;else{if(e===null)throw Me.alternate===null?Error(a(467)):Error(a(310));Ze=e,e={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},_t===null?Me.memoizedState=_t=e:_t=_t.next=e}return _t}function $l(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Eo(e){var i=So;return So+=1,ya===null&&(ya=[]),e=Qm(ya,e,i),i=Me,(_t===null?i.memoizedState:_t.next)===null&&(i=i.alternate,N.H=i===null||i.memoizedState===null?Bp:Fc),e}function ql(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Eo(e);if(e.$$typeof===k)return Ht(e)}throw Error(a(438,String(e)))}function zc(e){var i=null,o=Me.updateQueue;if(o!==null&&(i=o.memoCache),i==null){var l=Me.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(i={data:l.data.map(function(f){return f.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),o===null&&(o=$l(),Me.updateQueue=o),o.memoCache=i,o=i.data[i.index],o===void 0)for(o=i.data[i.index]=Array(e),l=0;l<e;l++)o[l]=ee;return i.index++,o}function gi(e,i){return typeof i=="function"?i(e):i}function Yl(e){var i=gt();return Pc(i,Ze,e)}function Pc(e,i,o){var l=e.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=o;var f=e.baseQueue,m=l.pending;if(m!==null){if(f!==null){var y=f.next;f.next=m.next,m.next=y}i.baseQueue=f=m,l.pending=null}if(m=e.baseState,f===null)e.memoizedState=m;else{i=f.next;var S=y=null,D=null,q=i,ae=!1;do{var ue=q.lane&-536870913;if(ue!==q.lane?(je&ue)===ue:(pi&ue)===ue){var F=q.revertLane;if(F===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),ue===ha&&(ae=!0);else if((pi&F)===F){q=q.next,F===ha&&(ae=!0);continue}else ue={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},D===null?(S=D=ue,y=m):D=D.next=ue,Me.lanes|=F,Qi|=F;ue=q.action,Lr&&o(m,ue),m=q.hasEagerState?q.eagerState:o(m,ue)}else F={lane:ue,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},D===null?(S=D=F,y=m):D=D.next=F,Me.lanes|=ue,Qi|=ue;q=q.next}while(q!==null&&q!==i);if(D===null?y=m:D.next=S,!gn(m,e.memoizedState)&&(xt=!0,ae&&(o=ma,o!==null)))throw o;e.memoizedState=m,e.baseState=y,e.baseQueue=D,l.lastRenderedState=m}return f===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function jc(e){var i=gt(),o=i.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=e;var l=o.dispatch,f=o.pending,m=i.memoizedState;if(f!==null){o.pending=null;var y=f=f.next;do m=e(m,y.action),y=y.next;while(y!==f);gn(m,i.memoizedState)||(xt=!0),i.memoizedState=m,i.baseQueue===null&&(i.baseState=m),o.lastRenderedState=m}return[m,l]}function lp(e,i,o){var l=Me,f=gt(),m=Be;if(m){if(o===void 0)throw Error(a(407));o=o()}else o=i();var y=!gn((Ze||f).memoizedState,o);if(y&&(f.memoizedState=o,xt=!0),f=f.queue,Bc(cp.bind(null,l,f,e),[e]),f.getSnapshot!==i||y||_t!==null&&_t.memoizedState.tag&1){if(l.flags|=2048,_a(9,{destroy:void 0},up.bind(null,l,f,o,i),null),nt===null)throw Error(a(349));m||(pi&127)!==0||sp(l,i,o)}return o}function sp(e,i,o){e.flags|=16384,e={getSnapshot:i,value:o},i=Me.updateQueue,i===null?(i=$l(),Me.updateQueue=i,i.stores=[e]):(o=i.stores,o===null?i.stores=[e]:o.push(e))}function up(e,i,o,l){i.value=o,i.getSnapshot=l,dp(i)&&fp(e)}function cp(e,i,o){return o(function(){dp(i)&&fp(e)})}function dp(e){var i=e.getSnapshot;e=e.value;try{var o=i();return!gn(e,o)}catch{return!0}}function fp(e){var i=xr(e,2);i!==null&&un(i,e,2)}function Uc(e){var i=Ft();if(typeof e=="function"){var o=e;if(e=o(),Lr){Kt(!0);try{o()}finally{Kt(!1)}}}return i.memoizedState=i.baseState=e,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:e},i}function hp(e,i,o,l){return e.baseState=o,Pc(e,Ze,typeof l=="function"?l:gi)}function px(e,i,o,l,f){if(Wl(e))throw Error(a(485));if(e=i.action,e!==null){var m={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){m.listeners.push(y)}};N.T!==null?o(!0):m.isTransition=!1,l(m),o=i.pending,o===null?(m.next=i.pending=m,mp(i,m)):(m.next=o.next,i.pending=o.next=m)}}function mp(e,i){var o=i.action,l=i.payload,f=e.state;if(i.isTransition){var m=N.T,y={};N.T=y;try{var S=o(f,l),D=N.S;D!==null&&D(y,S),pp(e,i,S)}catch(q){Hc(e,i,q)}finally{m!==null&&y.types!==null&&(m.types=y.types),N.T=m}}else try{m=o(f,l),pp(e,i,m)}catch(q){Hc(e,i,q)}}function pp(e,i,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(l){gp(e,i,l)},function(l){return Hc(e,i,l)}):gp(e,i,o)}function gp(e,i,o){i.status="fulfilled",i.value=o,bp(i),e.state=o,i=e.pending,i!==null&&(o=i.next,o===i?e.pending=null:(o=o.next,i.next=o,mp(e,o)))}function Hc(e,i,o){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do i.status="rejected",i.reason=o,bp(i),i=i.next;while(i!==l)}e.action=null}function bp(e){e=e.listeners;for(var i=0;i<e.length;i++)(0,e[i])()}function vp(e,i){return i}function yp(e,i){if(Be){var o=nt.formState;if(o!==null){e:{var l=Me;if(Be){if(ot){t:{for(var f=ot,m=Ln;f.nodeType!==8;){if(!m){f=null;break t}if(f=Mn(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){ot=Mn(f.nextSibling),l=f.data==="F!";break e}}Bi(l)}l=!1}l&&(i=o[0])}}return o=Ft(),o.memoizedState=o.baseState=i,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vp,lastRenderedState:i},o.queue=l,o=jp.bind(null,Me,l),l.dispatch=o,l=Uc(!1),m=Yc.bind(null,Me,!1,l.queue),l=Ft(),f={state:i,dispatch:null,action:e,pending:null},l.queue=f,o=px.bind(null,Me,f,m,o),f.dispatch=o,l.memoizedState=e,[i,o,!1]}function _p(e){var i=gt();return xp(i,Ze,e)}function xp(e,i,o){if(i=Pc(e,i,vp)[0],e=Yl(gi)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var l=Eo(i)}catch(y){throw y===pa?zl:y}else l=i;i=gt();var f=i.queue,m=f.dispatch;return o!==i.memoizedState&&(Me.flags|=2048,_a(9,{destroy:void 0},gx.bind(null,f,o),null)),[l,m,e]}function gx(e,i){e.action=i}function Sp(e){var i=gt(),o=Ze;if(o!==null)return xp(i,o,e);gt(),i=i.memoizedState,o=gt();var l=o.queue.dispatch;return o.memoizedState=e,[i,l,!1]}function _a(e,i,o,l){return e={tag:e,create:o,deps:l,inst:i,next:null},i=Me.updateQueue,i===null&&(i=$l(),Me.updateQueue=i),o=i.lastEffect,o===null?i.lastEffect=e.next=e:(l=o.next,o.next=e,e.next=l,i.lastEffect=e),e}function Ep(){return gt().memoizedState}function Fl(e,i,o,l){var f=Ft();Me.flags|=e,f.memoizedState=_a(1|i,{destroy:void 0},o,l===void 0?null:l)}function Xl(e,i,o,l){var f=gt();l=l===void 0?null:l;var m=f.memoizedState.inst;Ze!==null&&l!==null&&Nc(l,Ze.memoizedState.deps)?f.memoizedState=_a(i,m,o,l):(Me.flags|=e,f.memoizedState=_a(1|i,m,o,l))}function wp(e,i){Fl(8390656,8,e,i)}function Bc(e,i){Xl(2048,8,e,i)}function bx(e){Me.flags|=4;var i=Me.updateQueue;if(i===null)i=$l(),Me.updateQueue=i,i.events=[e];else{var o=i.events;o===null?i.events=[e]:o.push(e)}}function Cp(e){var i=gt().memoizedState;return bx({ref:i,nextImpl:e}),function(){if((Fe&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function Ap(e,i){return Xl(4,2,e,i)}function kp(e,i){return Xl(4,4,e,i)}function Tp(e,i){if(typeof i=="function"){e=e();var o=i(e);return function(){typeof o=="function"?o():i(null)}}if(i!=null)return e=e(),i.current=e,function(){i.current=null}}function Rp(e,i,o){o=o!=null?o.concat([e]):null,Xl(4,4,Tp.bind(null,i,e),o)}function Vc(){}function Lp(e,i){var o=gt();i=i===void 0?null:i;var l=o.memoizedState;return i!==null&&Nc(i,l[1])?l[0]:(o.memoizedState=[e,i],e)}function Np(e,i){var o=gt();i=i===void 0?null:i;var l=o.memoizedState;if(i!==null&&Nc(i,l[1]))return l[0];if(l=e(),Lr){Kt(!0);try{e()}finally{Kt(!1)}}return o.memoizedState=[l,i],l}function Gc(e,i,o){return o===void 0||(pi&1073741824)!==0&&(je&261930)===0?e.memoizedState=i:(e.memoizedState=o,e=Mg(),Me.lanes|=e,Qi|=e,o)}function Mp(e,i,o,l){return gn(o,i)?o:ba.current!==null?(e=Gc(e,o,l),gn(e,i)||(xt=!0),e):(pi&42)===0||(pi&1073741824)!==0&&(je&261930)===0?(xt=!0,e.memoizedState=o):(e=Mg(),Me.lanes|=e,Qi|=e,i)}function Op(e,i,o,l,f){var m=P.p;P.p=m!==0&&8>m?m:8;var y=N.T,S={};N.T=S,Yc(e,!1,i,o);try{var D=f(),q=N.S;if(q!==null&&q(S,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var ae=fx(D,l);wo(e,i,ae,Sn(e))}else wo(e,i,l,Sn(e))}catch(ue){wo(e,i,{then:function(){},status:"rejected",reason:ue},Sn())}finally{P.p=m,y!==null&&S.types!==null&&(y.types=S.types),N.T=y}}function vx(){}function $c(e,i,o,l){if(e.tag!==5)throw Error(a(476));var f=Dp(e).queue;Op(e,f,i,X,o===null?vx:function(){return Ip(e),o(l)})}function Dp(e){var i=e.memoizedState;if(i!==null)return i;i={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:X},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:o},next:null},e.memoizedState=i,e=e.alternate,e!==null&&(e.memoizedState=i),i}function Ip(e){var i=Dp(e);i.next===null&&(i=e.alternate.memoizedState),wo(e,i.next.queue,{},Sn())}function qc(){return Ht(Bo)}function zp(){return gt().memoizedState}function Pp(){return gt().memoizedState}function yx(e){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var o=Sn();e=$i(o);var l=qi(i,e,o);l!==null&&(un(l,i,o),yo(l,i,o)),i={cache:_c()},e.payload=i;return}i=i.return}}function _x(e,i,o){var l=Sn();o={lane:l,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Wl(e)?Up(i,o):(o=uc(e,i,o,l),o!==null&&(un(o,e,l),Hp(o,i,l)))}function jp(e,i,o){var l=Sn();wo(e,i,o,l)}function wo(e,i,o,l){var f={lane:l,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Wl(e))Up(i,f);else{var m=e.alternate;if(e.lanes===0&&(m===null||m.lanes===0)&&(m=i.lastRenderedReducer,m!==null))try{var y=i.lastRenderedState,S=m(y,o);if(f.hasEagerState=!0,f.eagerState=S,gn(S,y))return Rl(e,i,f,0),nt===null&&Tl(),!1}catch{}if(o=uc(e,i,f,l),o!==null)return un(o,e,l),Hp(o,i,l),!0}return!1}function Yc(e,i,o,l){if(l={lane:2,revertLane:wd(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Wl(e)){if(i)throw Error(a(479))}else i=uc(e,o,l,2),i!==null&&un(i,e,2)}function Wl(e){var i=e.alternate;return e===Me||i!==null&&i===Me}function Up(e,i){va=Vl=!0;var o=e.pending;o===null?i.next=i:(i.next=o.next,o.next=i),e.pending=i}function Hp(e,i,o){if((o&4194048)!==0){var l=i.lanes;l&=e.pendingLanes,o|=l,i.lanes=o,en(e,o)}}var Co={readContext:Ht,use:ql,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useLayoutEffect:ht,useInsertionEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useSyncExternalStore:ht,useId:ht,useHostTransitionStatus:ht,useFormState:ht,useActionState:ht,useOptimistic:ht,useMemoCache:ht,useCacheRefresh:ht};Co.useEffectEvent=ht;var Bp={readContext:Ht,use:ql,useCallback:function(e,i){return Ft().memoizedState=[e,i===void 0?null:i],e},useContext:Ht,useEffect:wp,useImperativeHandle:function(e,i,o){o=o!=null?o.concat([e]):null,Fl(4194308,4,Tp.bind(null,i,e),o)},useLayoutEffect:function(e,i){return Fl(4194308,4,e,i)},useInsertionEffect:function(e,i){Fl(4,2,e,i)},useMemo:function(e,i){var o=Ft();i=i===void 0?null:i;var l=e();if(Lr){Kt(!0);try{e()}finally{Kt(!1)}}return o.memoizedState=[l,i],l},useReducer:function(e,i,o){var l=Ft();if(o!==void 0){var f=o(i);if(Lr){Kt(!0);try{o(i)}finally{Kt(!1)}}}else f=i;return l.memoizedState=l.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},l.queue=e,e=e.dispatch=_x.bind(null,Me,e),[l.memoizedState,e]},useRef:function(e){var i=Ft();return e={current:e},i.memoizedState=e},useState:function(e){e=Uc(e);var i=e.queue,o=jp.bind(null,Me,i);return i.dispatch=o,[e.memoizedState,o]},useDebugValue:Vc,useDeferredValue:function(e,i){var o=Ft();return Gc(o,e,i)},useTransition:function(){var e=Uc(!1);return e=Op.bind(null,Me,e.queue,!0,!1),Ft().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,i,o){var l=Me,f=Ft();if(Be){if(o===void 0)throw Error(a(407));o=o()}else{if(o=i(),nt===null)throw Error(a(349));(je&127)!==0||sp(l,i,o)}f.memoizedState=o;var m={value:o,getSnapshot:i};return f.queue=m,wp(cp.bind(null,l,m,e),[e]),l.flags|=2048,_a(9,{destroy:void 0},up.bind(null,l,m,o,i),null),o},useId:function(){var e=Ft(),i=nt.identifierPrefix;if(Be){var o=Jn,l=Zn;o=(l&~(1<<32-At(l)-1)).toString(32)+o,i="_"+i+"R_"+o,o=Gl++,0<o&&(i+="H"+o.toString(32)),i+="_"}else o=hx++,i="_"+i+"r_"+o.toString(32)+"_";return e.memoizedState=i},useHostTransitionStatus:qc,useFormState:yp,useActionState:yp,useOptimistic:function(e){var i=Ft();i.memoizedState=i.baseState=e;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=o,i=Yc.bind(null,Me,!0,o),o.dispatch=i,[e,i]},useMemoCache:zc,useCacheRefresh:function(){return Ft().memoizedState=yx.bind(null,Me)},useEffectEvent:function(e){var i=Ft(),o={impl:e};return i.memoizedState=o,function(){if((Fe&2)!==0)throw Error(a(440));return o.impl.apply(void 0,arguments)}}},Fc={readContext:Ht,use:ql,useCallback:Lp,useContext:Ht,useEffect:Bc,useImperativeHandle:Rp,useInsertionEffect:Ap,useLayoutEffect:kp,useMemo:Np,useReducer:Yl,useRef:Ep,useState:function(){return Yl(gi)},useDebugValue:Vc,useDeferredValue:function(e,i){var o=gt();return Mp(o,Ze.memoizedState,e,i)},useTransition:function(){var e=Yl(gi)[0],i=gt().memoizedState;return[typeof e=="boolean"?e:Eo(e),i]},useSyncExternalStore:lp,useId:zp,useHostTransitionStatus:qc,useFormState:_p,useActionState:_p,useOptimistic:function(e,i){var o=gt();return hp(o,Ze,e,i)},useMemoCache:zc,useCacheRefresh:Pp};Fc.useEffectEvent=Cp;var Vp={readContext:Ht,use:ql,useCallback:Lp,useContext:Ht,useEffect:Bc,useImperativeHandle:Rp,useInsertionEffect:Ap,useLayoutEffect:kp,useMemo:Np,useReducer:jc,useRef:Ep,useState:function(){return jc(gi)},useDebugValue:Vc,useDeferredValue:function(e,i){var o=gt();return Ze===null?Gc(o,e,i):Mp(o,Ze.memoizedState,e,i)},useTransition:function(){var e=jc(gi)[0],i=gt().memoizedState;return[typeof e=="boolean"?e:Eo(e),i]},useSyncExternalStore:lp,useId:zp,useHostTransitionStatus:qc,useFormState:Sp,useActionState:Sp,useOptimistic:function(e,i){var o=gt();return Ze!==null?hp(o,Ze,e,i):(o.baseState=e,[e,o.queue.dispatch])},useMemoCache:zc,useCacheRefresh:Pp};Vp.useEffectEvent=Cp;function Xc(e,i,o,l){i=e.memoizedState,o=o(l,i),o=o==null?i:g({},i,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var Wc={enqueueSetState:function(e,i,o){e=e._reactInternals;var l=Sn(),f=$i(l);f.payload=i,o!=null&&(f.callback=o),i=qi(e,f,l),i!==null&&(un(i,e,l),yo(i,e,l))},enqueueReplaceState:function(e,i,o){e=e._reactInternals;var l=Sn(),f=$i(l);f.tag=1,f.payload=i,o!=null&&(f.callback=o),i=qi(e,f,l),i!==null&&(un(i,e,l),yo(i,e,l))},enqueueForceUpdate:function(e,i){e=e._reactInternals;var o=Sn(),l=$i(o);l.tag=2,i!=null&&(l.callback=i),i=qi(e,l,o),i!==null&&(un(i,e,o),yo(i,e,o))}};function Gp(e,i,o,l,f,m,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,m,y):i.prototype&&i.prototype.isPureReactComponent?!co(o,l)||!co(f,m):!0}function $p(e,i,o,l){e=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,l),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,l),i.state!==e&&Wc.enqueueReplaceState(i,i.state,null)}function Nr(e,i){var o=i;if("ref"in i){o={};for(var l in i)l!=="ref"&&(o[l]=i[l])}if(e=e.defaultProps){o===i&&(o=g({},o));for(var f in e)o[f]===void 0&&(o[f]=e[f])}return o}function qp(e){kl(e)}function Yp(e){console.error(e)}function Fp(e){kl(e)}function Ql(e,i){try{var o=e.onUncaughtError;o(i.value,{componentStack:i.stack})}catch(l){setTimeout(function(){throw l})}}function Xp(e,i,o){try{var l=e.onCaughtError;l(o.value,{componentStack:o.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Qc(e,i,o){return o=$i(o),o.tag=3,o.payload={element:null},o.callback=function(){Ql(e,i)},o}function Wp(e){return e=$i(e),e.tag=3,e}function Qp(e,i,o,l){var f=o.type.getDerivedStateFromError;if(typeof f=="function"){var m=l.value;e.payload=function(){return f(m)},e.callback=function(){Xp(i,o,l)}}var y=o.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Xp(i,o,l),typeof f!="function"&&(Ki===null?Ki=new Set([this]):Ki.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function xx(e,i,o,l,f){if(o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(i=o.alternate,i!==null&&fa(i,o,f,!0),o=vn.current,o!==null){switch(o.tag){case 31:case 13:return Nn===null?ss():o.alternate===null&&mt===0&&(mt=3),o.flags&=-257,o.flags|=65536,o.lanes=f,l===Pl?o.flags|=16384:(i=o.updateQueue,i===null?o.updateQueue=new Set([l]):i.add(l),xd(e,l,f)),!1;case 22:return o.flags|=65536,l===Pl?o.flags|=16384:(i=o.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([l])},o.updateQueue=i):(o=i.retryQueue,o===null?i.retryQueue=new Set([l]):o.add(l)),xd(e,l,f)),!1}throw Error(a(435,o.tag))}return xd(e,l,f),ss(),!1}if(Be)return i=vn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=f,l!==pc&&(e=Error(a(422),{cause:l}),mo(kn(e,o)))):(l!==pc&&(i=Error(a(423),{cause:l}),mo(kn(i,o))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,l=kn(l,o),f=Qc(e.stateNode,l,f),Ac(e,f),mt!==4&&(mt=2)),!1;var m=Error(a(520),{cause:l});if(m=kn(m,o),Oo===null?Oo=[m]:Oo.push(m),mt!==4&&(mt=2),i===null)return!0;l=kn(l,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,e=f&-f,o.lanes|=e,e=Qc(o.stateNode,l,e),Ac(o,e),!1;case 1:if(i=o.type,m=o.stateNode,(o.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Ki===null||!Ki.has(m))))return o.flags|=65536,f&=-f,o.lanes|=f,f=Wp(f),Qp(f,e,o,l),Ac(o,f),!1}o=o.return}while(o!==null);return!1}var Kc=Error(a(461)),xt=!1;function Bt(e,i,o,l){i.child=e===null?ep(i,null,o,l):Rr(i,e.child,o,l)}function Kp(e,i,o,l,f){o=o.render;var m=i.ref;if("ref"in l){var y={};for(var S in l)S!=="ref"&&(y[S]=l[S])}else y=l;return Cr(i),l=Mc(e,i,o,y,m,f),S=Oc(),e!==null&&!xt?(Dc(e,i,f),bi(e,i,f)):(Be&&S&&hc(i),i.flags|=1,Bt(e,i,l,f),i.child)}function Zp(e,i,o,l,f){if(e===null){var m=o.type;return typeof m=="function"&&!cc(m)&&m.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=m,Jp(e,i,m,l,f)):(e=Nl(o.type,null,l,i,i.mode,f),e.ref=i.ref,e.return=i,i.child=e)}if(m=e.child,!ad(e,f)){var y=m.memoizedProps;if(o=o.compare,o=o!==null?o:co,o(y,l)&&e.ref===i.ref)return bi(e,i,f)}return i.flags|=1,e=di(m,l),e.ref=i.ref,e.return=i,i.child=e}function Jp(e,i,o,l,f){if(e!==null){var m=e.memoizedProps;if(co(m,l)&&e.ref===i.ref)if(xt=!1,i.pendingProps=l=m,ad(e,f))(e.flags&131072)!==0&&(xt=!0);else return i.lanes=e.lanes,bi(e,i,f)}return Zc(e,i,o,l,f)}function eg(e,i,o,l){var f=l.children,m=e!==null?e.memoizedState:null;if(e===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((i.flags&128)!==0){if(m=m!==null?m.baseLanes|o:o,e!==null){for(l=i.child=e.child,f=0;l!==null;)f=f|l.lanes|l.childLanes,l=l.sibling;l=f&~m}else l=0,i.child=null;return tg(e,i,m,o,l)}if((o&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},e!==null&&Il(i,m!==null?m.cachePool:null),m!==null?ip(i,m):Tc(),rp(i);else return l=i.lanes=536870912,tg(e,i,m!==null?m.baseLanes|o:o,o,l)}else m!==null?(Il(i,m.cachePool),ip(i,m),Fi(),i.memoizedState=null):(e!==null&&Il(i,null),Tc(),Fi());return Bt(e,i,f,o),i.child}function Ao(e,i){return e!==null&&e.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function tg(e,i,o,l,f){var m=Sc();return m=m===null?null:{parent:yt._currentValue,pool:m},i.memoizedState={baseLanes:o,cachePool:m},e!==null&&Il(i,null),Tc(),rp(i),e!==null&&fa(e,i,l,!0),i.childLanes=f,null}function Kl(e,i){return i=Jl({mode:i.mode,children:i.children},e.mode),i.ref=e.ref,e.child=i,i.return=e,i}function ng(e,i,o){return Rr(i,e.child,null,o),e=Kl(i,i.pendingProps),e.flags|=2,yn(i),i.memoizedState=null,e}function Sx(e,i,o){var l=i.pendingProps,f=(i.flags&128)!==0;if(i.flags&=-129,e===null){if(Be){if(l.mode==="hidden")return e=Kl(i,l),i.lanes=536870912,Ao(null,e);if(Lc(i),(e=ot)?(e=mb(e,Ln),e=e!==null&&e.data==="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Ui!==null?{id:Zn,overflow:Jn}:null,retryLane:536870912,hydrationErrors:null},o=Um(e),o.return=i,i.child=o,Ut=i,ot=null)):e=null,e===null)throw Bi(i);return i.lanes=536870912,null}return Kl(i,l)}var m=e.memoizedState;if(m!==null){var y=m.dehydrated;if(Lc(i),f)if(i.flags&256)i.flags&=-257,i=ng(e,i,o);else if(i.memoizedState!==null)i.child=e.child,i.flags|=128,i=null;else throw Error(a(558));else if(xt||fa(e,i,o,!1),f=(o&e.childLanes)!==0,xt||f){if(l=nt,l!==null&&(y=tn(l,o),y!==0&&y!==m.retryLane))throw m.retryLane=y,xr(e,y),un(l,e,y),Kc;ss(),i=ng(e,i,o)}else e=m.treeContext,ot=Mn(y.nextSibling),Ut=i,Be=!0,Hi=null,Ln=!1,e!==null&&Vm(i,e),i=Kl(i,l),i.flags|=4096;return i}return e=di(e.child,{mode:l.mode,children:l.children}),e.ref=i.ref,i.child=e,e.return=i,e}function Zl(e,i){var o=i.ref;if(o===null)e!==null&&e.ref!==null&&(i.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(a(284));(e===null||e.ref!==o)&&(i.flags|=4194816)}}function Zc(e,i,o,l,f){return Cr(i),o=Mc(e,i,o,l,void 0,f),l=Oc(),e!==null&&!xt?(Dc(e,i,f),bi(e,i,f)):(Be&&l&&hc(i),i.flags|=1,Bt(e,i,o,f),i.child)}function ig(e,i,o,l,f,m){return Cr(i),i.updateQueue=null,o=op(i,l,o,f),ap(e),l=Oc(),e!==null&&!xt?(Dc(e,i,m),bi(e,i,m)):(Be&&l&&hc(i),i.flags|=1,Bt(e,i,o,m),i.child)}function rg(e,i,o,l,f){if(Cr(i),i.stateNode===null){var m=sa,y=o.contextType;typeof y=="object"&&y!==null&&(m=Ht(y)),m=new o(l,m),i.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Wc,i.stateNode=m,m._reactInternals=i,m=i.stateNode,m.props=l,m.state=i.memoizedState,m.refs={},wc(i),y=o.contextType,m.context=typeof y=="object"&&y!==null?Ht(y):sa,m.state=i.memoizedState,y=o.getDerivedStateFromProps,typeof y=="function"&&(Xc(i,o,y,l),m.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(y=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),y!==m.state&&Wc.enqueueReplaceState(m,m.state,null),xo(i,l,m,f),_o(),m.state=i.memoizedState),typeof m.componentDidMount=="function"&&(i.flags|=4194308),l=!0}else if(e===null){m=i.stateNode;var S=i.memoizedProps,D=Nr(o,S);m.props=D;var q=m.context,ae=o.contextType;y=sa,typeof ae=="object"&&ae!==null&&(y=Ht(ae));var ue=o.getDerivedStateFromProps;ae=typeof ue=="function"||typeof m.getSnapshotBeforeUpdate=="function",S=i.pendingProps!==S,ae||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S||q!==y)&&$p(i,m,l,y),Gi=!1;var F=i.memoizedState;m.state=F,xo(i,l,m,f),_o(),q=i.memoizedState,S||F!==q||Gi?(typeof ue=="function"&&(Xc(i,o,ue,l),q=i.memoizedState),(D=Gi||Gp(i,o,D,l,F,q,y))?(ae||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"&&(i.flags|=4194308)):(typeof m.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=l,i.memoizedState=q),m.props=l,m.state=q,m.context=y,l=D):(typeof m.componentDidMount=="function"&&(i.flags|=4194308),l=!1)}else{m=i.stateNode,Cc(e,i),y=i.memoizedProps,ae=Nr(o,y),m.props=ae,ue=i.pendingProps,F=m.context,q=o.contextType,D=sa,typeof q=="object"&&q!==null&&(D=Ht(q)),S=o.getDerivedStateFromProps,(q=typeof S=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(y!==ue||F!==D)&&$p(i,m,l,D),Gi=!1,F=i.memoizedState,m.state=F,xo(i,l,m,f),_o();var J=i.memoizedState;y!==ue||F!==J||Gi||e!==null&&e.dependencies!==null&&Ol(e.dependencies)?(typeof S=="function"&&(Xc(i,o,S,l),J=i.memoizedState),(ae=Gi||Gp(i,o,ae,l,F,J,D)||e!==null&&e.dependencies!==null&&Ol(e.dependencies))?(q||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,J,D),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,J,D)),typeof m.componentDidUpdate=="function"&&(i.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof m.componentDidUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(i.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(i.flags|=1024),i.memoizedProps=l,i.memoizedState=J),m.props=l,m.state=J,m.context=D,l=ae):(typeof m.componentDidUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(i.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(i.flags|=1024),l=!1)}return m=l,Zl(e,i),l=(i.flags&128)!==0,m||l?(m=i.stateNode,o=l&&typeof o.getDerivedStateFromError!="function"?null:m.render(),i.flags|=1,e!==null&&l?(i.child=Rr(i,e.child,null,f),i.child=Rr(i,null,o,f)):Bt(e,i,o,f),i.memoizedState=m.state,e=i.child):e=bi(e,i,f),e}function ag(e,i,o,l){return Er(),i.flags|=256,Bt(e,i,o,l),i.child}var Jc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ed(e){return{baseLanes:e,cachePool:Xm()}}function td(e,i,o){return e=e!==null?e.childLanes&~o:0,i&&(e|=xn),e}function og(e,i,o){var l=i.pendingProps,f=!1,m=(i.flags&128)!==0,y;if((y=m)||(y=e!==null&&e.memoizedState===null?!1:(pt.current&2)!==0),y&&(f=!0,i.flags&=-129),y=(i.flags&32)!==0,i.flags&=-33,e===null){if(Be){if(f?Yi(i):Fi(),(e=ot)?(e=mb(e,Ln),e=e!==null&&e.data!=="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:Ui!==null?{id:Zn,overflow:Jn}:null,retryLane:536870912,hydrationErrors:null},o=Um(e),o.return=i,i.child=o,Ut=i,ot=null)):e=null,e===null)throw Bi(i);return Pd(e)?i.lanes=32:i.lanes=536870912,null}var S=l.children;return l=l.fallback,f?(Fi(),f=i.mode,S=Jl({mode:"hidden",children:S},f),l=Sr(l,f,o,null),S.return=i,l.return=i,S.sibling=l,i.child=S,l=i.child,l.memoizedState=ed(o),l.childLanes=td(e,y,o),i.memoizedState=Jc,Ao(null,l)):(Yi(i),nd(i,S))}var D=e.memoizedState;if(D!==null&&(S=D.dehydrated,S!==null)){if(m)i.flags&256?(Yi(i),i.flags&=-257,i=id(e,i,o)):i.memoizedState!==null?(Fi(),i.child=e.child,i.flags|=128,i=null):(Fi(),S=l.fallback,f=i.mode,l=Jl({mode:"visible",children:l.children},f),S=Sr(S,f,o,null),S.flags|=2,l.return=i,S.return=i,l.sibling=S,i.child=l,Rr(i,e.child,null,o),l=i.child,l.memoizedState=ed(o),l.childLanes=td(e,y,o),i.memoizedState=Jc,i=Ao(null,l));else if(Yi(i),Pd(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var q=y.dgst;y=q,l=Error(a(419)),l.stack="",l.digest=y,mo({value:l,source:null,stack:null}),i=id(e,i,o)}else if(xt||fa(e,i,o,!1),y=(o&e.childLanes)!==0,xt||y){if(y=nt,y!==null&&(l=tn(y,o),l!==0&&l!==D.retryLane))throw D.retryLane=l,xr(e,l),un(y,e,l),Kc;zd(S)||ss(),i=id(e,i,o)}else zd(S)?(i.flags|=192,i.child=e.child,i=null):(e=D.treeContext,ot=Mn(S.nextSibling),Ut=i,Be=!0,Hi=null,Ln=!1,e!==null&&Vm(i,e),i=nd(i,l.children),i.flags|=4096);return i}return f?(Fi(),S=l.fallback,f=i.mode,D=e.child,q=D.sibling,l=di(D,{mode:"hidden",children:l.children}),l.subtreeFlags=D.subtreeFlags&65011712,q!==null?S=di(q,S):(S=Sr(S,f,o,null),S.flags|=2),S.return=i,l.return=i,l.sibling=S,i.child=l,Ao(null,l),l=i.child,S=e.child.memoizedState,S===null?S=ed(o):(f=S.cachePool,f!==null?(D=yt._currentValue,f=f.parent!==D?{parent:D,pool:D}:f):f=Xm(),S={baseLanes:S.baseLanes|o,cachePool:f}),l.memoizedState=S,l.childLanes=td(e,y,o),i.memoizedState=Jc,Ao(e.child,l)):(Yi(i),o=e.child,e=o.sibling,o=di(o,{mode:"visible",children:l.children}),o.return=i,o.sibling=null,e!==null&&(y=i.deletions,y===null?(i.deletions=[e],i.flags|=16):y.push(e)),i.child=o,i.memoizedState=null,o)}function nd(e,i){return i=Jl({mode:"visible",children:i},e.mode),i.return=e,e.child=i}function Jl(e,i){return e=bn(22,e,null,i),e.lanes=0,e}function id(e,i,o){return Rr(i,e.child,null,o),e=nd(i,i.pendingProps.children),e.flags|=2,i.memoizedState=null,e}function lg(e,i,o){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i),vc(e.return,i,o)}function rd(e,i,o,l,f,m){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:f,treeForkCount:m}:(y.isBackwards=i,y.rendering=null,y.renderingStartTime=0,y.last=l,y.tail=o,y.tailMode=f,y.treeForkCount=m)}function sg(e,i,o){var l=i.pendingProps,f=l.revealOrder,m=l.tail;l=l.children;var y=pt.current,S=(y&2)!==0;if(S?(y=y&1|2,i.flags|=128):y&=1,W(pt,y),Bt(e,i,l,o),l=Be?ho:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=i.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lg(e,o,i);else if(e.tag===19)lg(e,o,i);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break e;for(;e.sibling===null;){if(e.return===null||e.return===i)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(o=i.child,f=null;o!==null;)e=o.alternate,e!==null&&Bl(e)===null&&(f=o),o=o.sibling;o=f,o===null?(f=i.child,i.child=null):(f=o.sibling,o.sibling=null),rd(i,!1,f,o,m,l);break;case"backwards":case"unstable_legacy-backwards":for(o=null,f=i.child,i.child=null;f!==null;){if(e=f.alternate,e!==null&&Bl(e)===null){i.child=f;break}e=f.sibling,f.sibling=o,o=f,f=e}rd(i,!0,o,null,m,l);break;case"together":rd(i,!1,null,null,void 0,l);break;default:i.memoizedState=null}return i.child}function bi(e,i,o){if(e!==null&&(i.dependencies=e.dependencies),Qi|=i.lanes,(o&i.childLanes)===0)if(e!==null){if(fa(e,i,o,!1),(o&i.childLanes)===0)return null}else return null;if(e!==null&&i.child!==e.child)throw Error(a(153));if(i.child!==null){for(e=i.child,o=di(e,e.pendingProps),i.child=o,o.return=i;e.sibling!==null;)e=e.sibling,o=o.sibling=di(e,e.pendingProps),o.return=i;o.sibling=null}return i.child}function ad(e,i){return(e.lanes&i)!==0?!0:(e=e.dependencies,!!(e!==null&&Ol(e)))}function Ex(e,i,o){switch(i.tag){case 3:ge(i,i.stateNode.containerInfo),Vi(i,yt,e.memoizedState.cache),Er();break;case 27:case 5:ne(i);break;case 4:ge(i,i.stateNode.containerInfo);break;case 10:Vi(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Lc(i),null;break;case 13:var l=i.memoizedState;if(l!==null)return l.dehydrated!==null?(Yi(i),i.flags|=128,null):(o&i.child.childLanes)!==0?og(e,i,o):(Yi(i),e=bi(e,i,o),e!==null?e.sibling:null);Yi(i);break;case 19:var f=(e.flags&128)!==0;if(l=(o&i.childLanes)!==0,l||(fa(e,i,o,!1),l=(o&i.childLanes)!==0),f){if(l)return sg(e,i,o);i.flags|=128}if(f=i.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),W(pt,pt.current),l)break;return null;case 22:return i.lanes=0,eg(e,i,o,i.pendingProps);case 24:Vi(i,yt,e.memoizedState.cache)}return bi(e,i,o)}function ug(e,i,o){if(e!==null)if(e.memoizedProps!==i.pendingProps)xt=!0;else{if(!ad(e,o)&&(i.flags&128)===0)return xt=!1,Ex(e,i,o);xt=(e.flags&131072)!==0}else xt=!1,Be&&(i.flags&1048576)!==0&&Bm(i,ho,i.index);switch(i.lanes=0,i.tag){case 16:e:{var l=i.pendingProps;if(e=kr(i.elementType),i.type=e,typeof e=="function")cc(e)?(l=Nr(e,l),i.tag=1,i=rg(null,i,e,l,o)):(i.tag=0,i=Zc(null,i,e,l,o));else{if(e!=null){var f=e.$$typeof;if(f===I){i.tag=11,i=Kp(null,i,e,l,o);break e}else if(f===H){i.tag=14,i=Zp(null,i,e,l,o);break e}}throw i=oe(e)||e,Error(a(306,i,""))}}return i;case 0:return Zc(e,i,i.type,i.pendingProps,o);case 1:return l=i.type,f=Nr(l,i.pendingProps),rg(e,i,l,f,o);case 3:e:{if(ge(i,i.stateNode.containerInfo),e===null)throw Error(a(387));l=i.pendingProps;var m=i.memoizedState;f=m.element,Cc(e,i),xo(i,l,null,o);var y=i.memoizedState;if(l=y.cache,Vi(i,yt,l),l!==m.cache&&yc(i,[yt],o,!0),_o(),l=y.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:y.cache},i.updateQueue.baseState=m,i.memoizedState=m,i.flags&256){i=ag(e,i,l,o);break e}else if(l!==f){f=kn(Error(a(424)),i),mo(f),i=ag(e,i,l,o);break e}else for(e=i.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ot=Mn(e.firstChild),Ut=i,Be=!0,Hi=null,Ln=!0,o=ep(i,null,l,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Er(),l===f){i=bi(e,i,o);break e}Bt(e,i,l,o)}i=i.child}return i;case 26:return Zl(e,i),e===null?(o=_b(i.type,null,i.pendingProps,null))?i.memoizedState=o:Be||(o=i.type,e=i.pendingProps,l=ps(ce.current).createElement(o),l[jt]=i,l[nn]=e,Vt(l,o,e),Ot(l),i.stateNode=l):i.memoizedState=_b(i.type,e.memoizedProps,i.pendingProps,e.memoizedState),null;case 27:return ne(i),e===null&&Be&&(l=i.stateNode=bb(i.type,i.pendingProps,ce.current),Ut=i,Ln=!0,f=ot,tr(i.type)?(jd=f,ot=Mn(l.firstChild)):ot=f),Bt(e,i,i.pendingProps.children,o),Zl(e,i),e===null&&(i.flags|=4194304),i.child;case 5:return e===null&&Be&&((f=l=ot)&&(l=Jx(l,i.type,i.pendingProps,Ln),l!==null?(i.stateNode=l,Ut=i,ot=Mn(l.firstChild),Ln=!1,f=!0):f=!1),f||Bi(i)),ne(i),f=i.type,m=i.pendingProps,y=e!==null?e.memoizedProps:null,l=m.children,Od(f,m)?l=null:y!==null&&Od(f,y)&&(i.flags|=32),i.memoizedState!==null&&(f=Mc(e,i,mx,null,null,o),Bo._currentValue=f),Zl(e,i),Bt(e,i,l,o),i.child;case 6:return e===null&&Be&&((e=o=ot)&&(o=eS(o,i.pendingProps,Ln),o!==null?(i.stateNode=o,Ut=i,ot=null,e=!0):e=!1),e||Bi(i)),null;case 13:return og(e,i,o);case 4:return ge(i,i.stateNode.containerInfo),l=i.pendingProps,e===null?i.child=Rr(i,null,l,o):Bt(e,i,l,o),i.child;case 11:return Kp(e,i,i.type,i.pendingProps,o);case 7:return Bt(e,i,i.pendingProps,o),i.child;case 8:return Bt(e,i,i.pendingProps.children,o),i.child;case 12:return Bt(e,i,i.pendingProps.children,o),i.child;case 10:return l=i.pendingProps,Vi(i,i.type,l.value),Bt(e,i,l.children,o),i.child;case 9:return f=i.type._context,l=i.pendingProps.children,Cr(i),f=Ht(f),l=l(f),i.flags|=1,Bt(e,i,l,o),i.child;case 14:return Zp(e,i,i.type,i.pendingProps,o);case 15:return Jp(e,i,i.type,i.pendingProps,o);case 19:return sg(e,i,o);case 31:return Sx(e,i,o);case 22:return eg(e,i,o,i.pendingProps);case 24:return Cr(i),l=Ht(yt),e===null?(f=Sc(),f===null&&(f=nt,m=_c(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=o),f=m),i.memoizedState={parent:l,cache:f},wc(i),Vi(i,yt,f)):((e.lanes&o)!==0&&(Cc(e,i),xo(i,null,null,o),_o()),f=e.memoizedState,m=i.memoizedState,f.parent!==l?(f={parent:l,cache:l},i.memoizedState=f,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=f),Vi(i,yt,l)):(l=m.cache,Vi(i,yt,l),l!==f.cache&&yc(i,[yt],o,!0))),Bt(e,i,i.pendingProps.children,o),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function vi(e){e.flags|=4}function od(e,i,o,l,f){if((i=(e.mode&32)!==0)&&(i=!1),i){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(zg())e.flags|=8192;else throw Tr=Pl,Ec}else e.flags&=-16777217}function cg(e,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Cb(i))if(zg())e.flags|=8192;else throw Tr=Pl,Ec}function es(e,i){i!==null&&(e.flags|=4),e.flags&16384&&(i=e.tag!==22?ut():536870912,e.lanes|=i,wa|=i)}function ko(e,i){if(!Be)switch(e.tailMode){case"hidden":i=e.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function lt(e){var i=e.alternate!==null&&e.alternate.child===e.child,o=0,l=0;if(i)for(var f=e.child;f!==null;)o|=f.lanes|f.childLanes,l|=f.subtreeFlags&65011712,l|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)o|=f.lanes|f.childLanes,l|=f.subtreeFlags,l|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=l,e.childLanes=o,i}function wx(e,i,o){var l=i.pendingProps;switch(mc(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(i),null;case 1:return lt(i),null;case 3:return o=i.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),mi(yt),pe(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(da(i)?vi(i):e===null||e.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,gc())),lt(i),null;case 26:var f=i.type,m=i.memoizedState;return e===null?(vi(i),m!==null?(lt(i),cg(i,m)):(lt(i),od(i,f,null,l,o))):m?m!==e.memoizedState?(vi(i),lt(i),cg(i,m)):(lt(i),i.flags&=-16777217):(e=e.memoizedProps,e!==l&&vi(i),lt(i),od(i,f,e,l,o)),null;case 27:if(ve(i),o=ce.current,f=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==l&&vi(i);else{if(!l){if(i.stateNode===null)throw Error(a(166));return lt(i),null}e=re.current,da(i)?Gm(i):(e=bb(f,l,o),i.stateNode=e,vi(i))}return lt(i),null;case 5:if(ve(i),f=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==l&&vi(i);else{if(!l){if(i.stateNode===null)throw Error(a(166));return lt(i),null}if(m=re.current,da(i))Gm(i);else{var y=ps(ce.current);switch(m){case 1:m=y.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=y.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=y.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=y.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=y.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof l.is=="string"?y.createElement("select",{is:l.is}):y.createElement("select"),l.multiple?m.multiple=!0:l.size&&(m.size=l.size);break;default:m=typeof l.is=="string"?y.createElement(f,{is:l.is}):y.createElement(f)}}m[jt]=i,m[nn]=l;e:for(y=i.child;y!==null;){if(y.tag===5||y.tag===6)m.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===i)break e;for(;y.sibling===null;){if(y.return===null||y.return===i)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}i.stateNode=m;e:switch(Vt(m,f,l),f){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&vi(i)}}return lt(i),od(i,i.type,e===null?null:e.memoizedProps,i.pendingProps,o),null;case 6:if(e&&i.stateNode!=null)e.memoizedProps!==l&&vi(i);else{if(typeof l!="string"&&i.stateNode===null)throw Error(a(166));if(e=ce.current,da(i)){if(e=i.stateNode,o=i.memoizedProps,l=null,f=Ut,f!==null)switch(f.tag){case 27:case 5:l=f.memoizedProps}e[jt]=i,e=!!(e.nodeValue===o||l!==null&&l.suppressHydrationWarning===!0||ob(e.nodeValue,o)),e||Bi(i,!0)}else e=ps(e).createTextNode(l),e[jt]=i,i.stateNode=e}return lt(i),null;case 31:if(o=i.memoizedState,e===null||e.memoizedState!==null){if(l=da(i),o!==null){if(e===null){if(!l)throw Error(a(318));if(e=i.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(557));e[jt]=i}else Er(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;lt(i),e=!1}else o=gc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),e=!0;if(!e)return i.flags&256?(yn(i),i):(yn(i),null);if((i.flags&128)!==0)throw Error(a(558))}return lt(i),null;case 13:if(l=i.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=da(i),l!==null&&l.dehydrated!==null){if(e===null){if(!f)throw Error(a(318));if(f=i.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[jt]=i}else Er(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;lt(i),f=!1}else f=gc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return i.flags&256?(yn(i),i):(yn(i),null)}return yn(i),(i.flags&128)!==0?(i.lanes=o,i):(o=l!==null,e=e!==null&&e.memoizedState!==null,o&&(l=i.child,f=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(f=l.alternate.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==f&&(l.flags|=2048)),o!==e&&o&&(i.child.flags|=8192),es(i,i.updateQueue),lt(i),null);case 4:return pe(),e===null&&Td(i.stateNode.containerInfo),lt(i),null;case 10:return mi(i.type),lt(i),null;case 19:if(Y(pt),l=i.memoizedState,l===null)return lt(i),null;if(f=(i.flags&128)!==0,m=l.rendering,m===null)if(f)ko(l,!1);else{if(mt!==0||e!==null&&(e.flags&128)!==0)for(e=i.child;e!==null;){if(m=Bl(e),m!==null){for(i.flags|=128,ko(l,!1),e=m.updateQueue,i.updateQueue=e,es(i,e),i.subtreeFlags=0,e=o,o=i.child;o!==null;)jm(o,e),o=o.sibling;return W(pt,pt.current&1|2),Be&&fi(i,l.treeForkCount),i.child}e=e.sibling}l.tail!==null&&Ct()>as&&(i.flags|=128,f=!0,ko(l,!1),i.lanes=4194304)}else{if(!f)if(e=Bl(m),e!==null){if(i.flags|=128,f=!0,e=e.updateQueue,i.updateQueue=e,es(i,e),ko(l,!0),l.tail===null&&l.tailMode==="hidden"&&!m.alternate&&!Be)return lt(i),null}else 2*Ct()-l.renderingStartTime>as&&o!==536870912&&(i.flags|=128,f=!0,ko(l,!1),i.lanes=4194304);l.isBackwards?(m.sibling=i.child,i.child=m):(e=l.last,e!==null?e.sibling=m:i.child=m,l.last=m)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Ct(),e.sibling=null,o=pt.current,W(pt,f?o&1|2:o&1),Be&&fi(i,l.treeForkCount),e):(lt(i),null);case 22:case 23:return yn(i),Rc(),l=i.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(i.flags|=8192):l&&(i.flags|=8192),l?(o&536870912)!==0&&(i.flags&128)===0&&(lt(i),i.subtreeFlags&6&&(i.flags|=8192)):lt(i),o=i.updateQueue,o!==null&&es(i,o.retryQueue),o=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),l=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),l!==o&&(i.flags|=2048),e!==null&&Y(Ar),null;case 24:return o=null,e!==null&&(o=e.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),mi(yt),lt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function Cx(e,i){switch(mc(i),i.tag){case 1:return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 3:return mi(yt),pe(),e=i.flags,(e&65536)!==0&&(e&128)===0?(i.flags=e&-65537|128,i):null;case 26:case 27:case 5:return ve(i),null;case 31:if(i.memoizedState!==null){if(yn(i),i.alternate===null)throw Error(a(340));Er()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 13:if(yn(i),e=i.memoizedState,e!==null&&e.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Er()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 19:return Y(pt),null;case 4:return pe(),null;case 10:return mi(i.type),null;case 22:case 23:return yn(i),Rc(),e!==null&&Y(Ar),e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 24:return mi(yt),null;case 25:return null;default:return null}}function dg(e,i){switch(mc(i),i.tag){case 3:mi(yt),pe();break;case 26:case 27:case 5:ve(i);break;case 4:pe();break;case 31:i.memoizedState!==null&&yn(i);break;case 13:yn(i);break;case 19:Y(pt);break;case 10:mi(i.type);break;case 22:case 23:yn(i),Rc(),e!==null&&Y(Ar);break;case 24:mi(yt)}}function To(e,i){try{var o=i.updateQueue,l=o!==null?o.lastEffect:null;if(l!==null){var f=l.next;o=f;do{if((o.tag&e)===e){l=void 0;var m=o.create,y=o.inst;l=m(),y.destroy=l}o=o.next}while(o!==f)}}catch(S){Ke(i,i.return,S)}}function Xi(e,i,o){try{var l=i.updateQueue,f=l!==null?l.lastEffect:null;if(f!==null){var m=f.next;l=m;do{if((l.tag&e)===e){var y=l.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,f=i;var D=o,q=S;try{q()}catch(ae){Ke(f,D,ae)}}}l=l.next}while(l!==m)}}catch(ae){Ke(i,i.return,ae)}}function fg(e){var i=e.updateQueue;if(i!==null){var o=e.stateNode;try{np(i,o)}catch(l){Ke(e,e.return,l)}}}function hg(e,i,o){o.props=Nr(e.type,e.memoizedProps),o.state=e.memoizedState;try{o.componentWillUnmount()}catch(l){Ke(e,i,l)}}function Ro(e,i){try{var o=e.ref;if(o!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof o=="function"?e.refCleanup=o(l):o.current=l}}catch(f){Ke(e,i,f)}}function ei(e,i){var o=e.ref,l=e.refCleanup;if(o!==null)if(typeof l=="function")try{l()}catch(f){Ke(e,i,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(f){Ke(e,i,f)}else o.current=null}function mg(e){var i=e.type,o=e.memoizedProps,l=e.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":o.autoFocus&&l.focus();break e;case"img":o.src?l.src=o.src:o.srcSet&&(l.srcset=o.srcSet)}}catch(f){Ke(e,e.return,f)}}function ld(e,i,o){try{var l=e.stateNode;Fx(l,e.type,o,i),l[nn]=i}catch(f){Ke(e,e.return,f)}}function pg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&tr(e.type)||e.tag===4}function sd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||pg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&tr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ud(e,i,o){var l=e.tag;if(l===5||l===6)e=e.stateNode,i?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(e,i):(i=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,i.appendChild(e),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=ui));else if(l!==4&&(l===27&&tr(e.type)&&(o=e.stateNode,i=null),e=e.child,e!==null))for(ud(e,i,o),e=e.sibling;e!==null;)ud(e,i,o),e=e.sibling}function ts(e,i,o){var l=e.tag;if(l===5||l===6)e=e.stateNode,i?o.insertBefore(e,i):o.appendChild(e);else if(l!==4&&(l===27&&tr(e.type)&&(o=e.stateNode),e=e.child,e!==null))for(ts(e,i,o),e=e.sibling;e!==null;)ts(e,i,o),e=e.sibling}function gg(e){var i=e.stateNode,o=e.memoizedProps;try{for(var l=e.type,f=i.attributes;f.length;)i.removeAttributeNode(f[0]);Vt(i,l,o),i[jt]=e,i[nn]=o}catch(m){Ke(e,e.return,m)}}var yi=!1,St=!1,cd=!1,bg=typeof WeakSet=="function"?WeakSet:Set,Dt=null;function Ax(e,i){if(e=e.containerInfo,Nd=Ss,e=Rm(e),ic(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var f=l.anchorOffset,m=l.focusNode;l=l.focusOffset;try{o.nodeType,m.nodeType}catch{o=null;break e}var y=0,S=-1,D=-1,q=0,ae=0,ue=e,F=null;t:for(;;){for(var J;ue!==o||f!==0&&ue.nodeType!==3||(S=y+f),ue!==m||l!==0&&ue.nodeType!==3||(D=y+l),ue.nodeType===3&&(y+=ue.nodeValue.length),(J=ue.firstChild)!==null;)F=ue,ue=J;for(;;){if(ue===e)break t;if(F===o&&++q===f&&(S=y),F===m&&++ae===l&&(D=y),(J=ue.nextSibling)!==null)break;ue=F,F=ue.parentNode}ue=J}o=S===-1||D===-1?null:{start:S,end:D}}else o=null}o=o||{start:0,end:0}}else o=null;for(Md={focusedElem:e,selectionRange:o},Ss=!1,Dt=i;Dt!==null;)if(i=Dt,e=i.child,(i.subtreeFlags&1028)!==0&&e!==null)e.return=i,Dt=e;else for(;Dt!==null;){switch(i=Dt,m=i.alternate,e=i.flags,i.tag){case 0:if((e&4)!==0&&(e=i.updateQueue,e=e!==null?e.events:null,e!==null))for(o=0;o<e.length;o++)f=e[o],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&m!==null){e=void 0,o=i,f=m.memoizedProps,m=m.memoizedState,l=o.stateNode;try{var ye=Nr(o.type,f);e=l.getSnapshotBeforeUpdate(ye,m),l.__reactInternalSnapshotBeforeUpdate=e}catch(ke){Ke(o,o.return,ke)}}break;case 3:if((e&1024)!==0){if(e=i.stateNode.containerInfo,o=e.nodeType,o===9)Id(e);else if(o===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Id(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(a(163))}if(e=i.sibling,e!==null){e.return=i.return,Dt=e;break}Dt=i.return}}function vg(e,i,o){var l=o.flags;switch(o.tag){case 0:case 11:case 15:xi(e,o),l&4&&To(5,o);break;case 1:if(xi(e,o),l&4)if(e=o.stateNode,i===null)try{e.componentDidMount()}catch(y){Ke(o,o.return,y)}else{var f=Nr(o.type,i.memoizedProps);i=i.memoizedState;try{e.componentDidUpdate(f,i,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Ke(o,o.return,y)}}l&64&&fg(o),l&512&&Ro(o,o.return);break;case 3:if(xi(e,o),l&64&&(e=o.updateQueue,e!==null)){if(i=null,o.child!==null)switch(o.child.tag){case 27:case 5:i=o.child.stateNode;break;case 1:i=o.child.stateNode}try{np(e,i)}catch(y){Ke(o,o.return,y)}}break;case 27:i===null&&l&4&&gg(o);case 26:case 5:xi(e,o),i===null&&l&4&&mg(o),l&512&&Ro(o,o.return);break;case 12:xi(e,o);break;case 31:xi(e,o),l&4&&xg(e,o);break;case 13:xi(e,o),l&4&&Sg(e,o),l&64&&(e=o.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(o=Ix.bind(null,o),tS(e,o))));break;case 22:if(l=o.memoizedState!==null||yi,!l){i=i!==null&&i.memoizedState!==null||St,f=yi;var m=St;yi=l,(St=i)&&!m?Si(e,o,(o.subtreeFlags&8772)!==0):xi(e,o),yi=f,St=m}break;case 30:break;default:xi(e,o)}}function yg(e){var i=e.alternate;i!==null&&(e.alternate=null,yg(i)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(i=e.stateNode,i!==null&&Hu(i)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ct=null,an=!1;function _i(e,i,o){for(o=o.child;o!==null;)_g(e,i,o),o=o.sibling}function _g(e,i,o){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(li,o)}catch{}switch(o.tag){case 26:St||ei(o,i),_i(e,i,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:St||ei(o,i);var l=ct,f=an;tr(o.type)&&(ct=o.stateNode,an=!1),_i(e,i,o),jo(o.stateNode),ct=l,an=f;break;case 5:St||ei(o,i);case 6:if(l=ct,f=an,ct=null,_i(e,i,o),ct=l,an=f,ct!==null)if(an)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(o.stateNode)}catch(m){Ke(o,i,m)}else try{ct.removeChild(o.stateNode)}catch(m){Ke(o,i,m)}break;case 18:ct!==null&&(an?(e=ct,fb(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,o.stateNode),Ma(e)):fb(ct,o.stateNode));break;case 4:l=ct,f=an,ct=o.stateNode.containerInfo,an=!0,_i(e,i,o),ct=l,an=f;break;case 0:case 11:case 14:case 15:Xi(2,o,i),St||Xi(4,o,i),_i(e,i,o);break;case 1:St||(ei(o,i),l=o.stateNode,typeof l.componentWillUnmount=="function"&&hg(o,i,l)),_i(e,i,o);break;case 21:_i(e,i,o);break;case 22:St=(l=St)||o.memoizedState!==null,_i(e,i,o),St=l;break;default:_i(e,i,o)}}function xg(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ma(e)}catch(o){Ke(i,i.return,o)}}}function Sg(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ma(e)}catch(o){Ke(i,i.return,o)}}function kx(e){switch(e.tag){case 31:case 13:case 19:var i=e.stateNode;return i===null&&(i=e.stateNode=new bg),i;case 22:return e=e.stateNode,i=e._retryCache,i===null&&(i=e._retryCache=new bg),i;default:throw Error(a(435,e.tag))}}function ns(e,i){var o=kx(e);i.forEach(function(l){if(!o.has(l)){o.add(l);var f=zx.bind(null,e,l);l.then(f,f)}})}function on(e,i){var o=i.deletions;if(o!==null)for(var l=0;l<o.length;l++){var f=o[l],m=e,y=i,S=y;e:for(;S!==null;){switch(S.tag){case 27:if(tr(S.type)){ct=S.stateNode,an=!1;break e}break;case 5:ct=S.stateNode,an=!1;break e;case 3:case 4:ct=S.stateNode.containerInfo,an=!0;break e}S=S.return}if(ct===null)throw Error(a(160));_g(m,y,f),ct=null,an=!1,m=f.alternate,m!==null&&(m.return=null),f.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Eg(i,e),i=i.sibling}var Vn=null;function Eg(e,i){var o=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:on(i,e),ln(e),l&4&&(Xi(3,e,e.return),To(3,e),Xi(5,e,e.return));break;case 1:on(i,e),ln(e),l&512&&(St||o===null||ei(o,o.return)),l&64&&yi&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(o=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=o===null?l:o.concat(l))));break;case 26:var f=Vn;if(on(i,e),ln(e),l&512&&(St||o===null||ei(o,o.return)),l&4){var m=o!==null?o.memoizedState:null;if(l=e.memoizedState,o===null)if(l===null)if(e.stateNode===null){e:{l=e.type,o=e.memoizedProps,f=f.ownerDocument||f;t:switch(l){case"title":m=f.getElementsByTagName("title")[0],(!m||m[to]||m[jt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=f.createElement(l),f.head.insertBefore(m,f.querySelector("head > title"))),Vt(m,l,o),m[jt]=e,Ot(m),l=m;break e;case"link":var y=Eb("link","href",f).get(l+(o.href||""));if(y){for(var S=0;S<y.length;S++)if(m=y[S],m.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&m.getAttribute("rel")===(o.rel==null?null:o.rel)&&m.getAttribute("title")===(o.title==null?null:o.title)&&m.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){y.splice(S,1);break t}}m=f.createElement(l),Vt(m,l,o),f.head.appendChild(m);break;case"meta":if(y=Eb("meta","content",f).get(l+(o.content||""))){for(S=0;S<y.length;S++)if(m=y[S],m.getAttribute("content")===(o.content==null?null:""+o.content)&&m.getAttribute("name")===(o.name==null?null:o.name)&&m.getAttribute("property")===(o.property==null?null:o.property)&&m.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&m.getAttribute("charset")===(o.charSet==null?null:o.charSet)){y.splice(S,1);break t}}m=f.createElement(l),Vt(m,l,o),f.head.appendChild(m);break;default:throw Error(a(468,l))}m[jt]=e,Ot(m),l=m}e.stateNode=l}else wb(f,e.type,e.stateNode);else e.stateNode=Sb(f,l,e.memoizedProps);else m!==l?(m===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):m.count--,l===null?wb(f,e.type,e.stateNode):Sb(f,l,e.memoizedProps)):l===null&&e.stateNode!==null&&ld(e,e.memoizedProps,o.memoizedProps)}break;case 27:on(i,e),ln(e),l&512&&(St||o===null||ei(o,o.return)),o!==null&&l&4&&ld(e,e.memoizedProps,o.memoizedProps);break;case 5:if(on(i,e),ln(e),l&512&&(St||o===null||ei(o,o.return)),e.flags&32){f=e.stateNode;try{ta(f,"")}catch(ye){Ke(e,e.return,ye)}}l&4&&e.stateNode!=null&&(f=e.memoizedProps,ld(e,f,o!==null?o.memoizedProps:f)),l&1024&&(cd=!0);break;case 6:if(on(i,e),ln(e),l&4){if(e.stateNode===null)throw Error(a(162));l=e.memoizedProps,o=e.stateNode;try{o.nodeValue=l}catch(ye){Ke(e,e.return,ye)}}break;case 3:if(vs=null,f=Vn,Vn=gs(i.containerInfo),on(i,e),Vn=f,ln(e),l&4&&o!==null&&o.memoizedState.isDehydrated)try{Ma(i.containerInfo)}catch(ye){Ke(e,e.return,ye)}cd&&(cd=!1,wg(e));break;case 4:l=Vn,Vn=gs(e.stateNode.containerInfo),on(i,e),ln(e),Vn=l;break;case 12:on(i,e),ln(e);break;case 31:on(i,e),ln(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ns(e,l)));break;case 13:on(i,e),ln(e),e.child.flags&8192&&e.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(rs=Ct()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ns(e,l)));break;case 22:f=e.memoizedState!==null;var D=o!==null&&o.memoizedState!==null,q=yi,ae=St;if(yi=q||f,St=ae||D,on(i,e),St=ae,yi=q,ln(e),l&8192)e:for(i=e.stateNode,i._visibility=f?i._visibility&-2:i._visibility|1,f&&(o===null||D||yi||St||Mr(e)),o=null,i=e;;){if(i.tag===5||i.tag===26){if(o===null){D=o=i;try{if(m=D.stateNode,f)y=m.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{S=D.stateNode;var ue=D.memoizedProps.style,F=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;S.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(ye){Ke(D,D.return,ye)}}}else if(i.tag===6){if(o===null){D=i;try{D.stateNode.nodeValue=f?"":D.memoizedProps}catch(ye){Ke(D,D.return,ye)}}}else if(i.tag===18){if(o===null){D=i;try{var J=D.stateNode;f?hb(J,!0):hb(D.stateNode,!1)}catch(ye){Ke(D,D.return,ye)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===e)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break e;for(;i.sibling===null;){if(i.return===null||i.return===e)break e;o===i&&(o=null),i=i.return}o===i&&(o=null),i.sibling.return=i.return,i=i.sibling}l&4&&(l=e.updateQueue,l!==null&&(o=l.retryQueue,o!==null&&(l.retryQueue=null,ns(e,o))));break;case 19:on(i,e),ln(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ns(e,l)));break;case 30:break;case 21:break;default:on(i,e),ln(e)}}function ln(e){var i=e.flags;if(i&2){try{for(var o,l=e.return;l!==null;){if(pg(l)){o=l;break}l=l.return}if(o==null)throw Error(a(160));switch(o.tag){case 27:var f=o.stateNode,m=sd(e);ts(e,m,f);break;case 5:var y=o.stateNode;o.flags&32&&(ta(y,""),o.flags&=-33);var S=sd(e);ts(e,S,y);break;case 3:case 4:var D=o.stateNode.containerInfo,q=sd(e);ud(e,q,D);break;default:throw Error(a(161))}}catch(ae){Ke(e,e.return,ae)}e.flags&=-3}i&4096&&(e.flags&=-4097)}function wg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var i=e;wg(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),e=e.sibling}}function xi(e,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)vg(e,i.alternate,i),i=i.sibling}function Mr(e){for(e=e.child;e!==null;){var i=e;switch(i.tag){case 0:case 11:case 14:case 15:Xi(4,i,i.return),Mr(i);break;case 1:ei(i,i.return);var o=i.stateNode;typeof o.componentWillUnmount=="function"&&hg(i,i.return,o),Mr(i);break;case 27:jo(i.stateNode);case 26:case 5:ei(i,i.return),Mr(i);break;case 22:i.memoizedState===null&&Mr(i);break;case 30:Mr(i);break;default:Mr(i)}e=e.sibling}}function Si(e,i,o){for(o=o&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var l=i.alternate,f=e,m=i,y=m.flags;switch(m.tag){case 0:case 11:case 15:Si(f,m,o),To(4,m);break;case 1:if(Si(f,m,o),l=m,f=l.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(q){Ke(l,l.return,q)}if(l=m,f=l.updateQueue,f!==null){var S=l.stateNode;try{var D=f.shared.hiddenCallbacks;if(D!==null)for(f.shared.hiddenCallbacks=null,f=0;f<D.length;f++)tp(D[f],S)}catch(q){Ke(l,l.return,q)}}o&&y&64&&fg(m),Ro(m,m.return);break;case 27:gg(m);case 26:case 5:Si(f,m,o),o&&l===null&&y&4&&mg(m),Ro(m,m.return);break;case 12:Si(f,m,o);break;case 31:Si(f,m,o),o&&y&4&&xg(f,m);break;case 13:Si(f,m,o),o&&y&4&&Sg(f,m);break;case 22:m.memoizedState===null&&Si(f,m,o),Ro(m,m.return);break;case 30:break;default:Si(f,m,o)}i=i.sibling}}function dd(e,i){var o=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),e=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(e=i.memoizedState.cachePool.pool),e!==o&&(e!=null&&e.refCount++,o!=null&&po(o))}function fd(e,i){e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&po(e))}function Gn(e,i,o,l){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Cg(e,i,o,l),i=i.sibling}function Cg(e,i,o,l){var f=i.flags;switch(i.tag){case 0:case 11:case 15:Gn(e,i,o,l),f&2048&&To(9,i);break;case 1:Gn(e,i,o,l);break;case 3:Gn(e,i,o,l),f&2048&&(e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&po(e)));break;case 12:if(f&2048){Gn(e,i,o,l),e=i.stateNode;try{var m=i.memoizedProps,y=m.id,S=m.onPostCommit;typeof S=="function"&&S(y,i.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(D){Ke(i,i.return,D)}}else Gn(e,i,o,l);break;case 31:Gn(e,i,o,l);break;case 13:Gn(e,i,o,l);break;case 23:break;case 22:m=i.stateNode,y=i.alternate,i.memoizedState!==null?m._visibility&2?Gn(e,i,o,l):Lo(e,i):m._visibility&2?Gn(e,i,o,l):(m._visibility|=2,xa(e,i,o,l,(i.subtreeFlags&10256)!==0||!1)),f&2048&&dd(y,i);break;case 24:Gn(e,i,o,l),f&2048&&fd(i.alternate,i);break;default:Gn(e,i,o,l)}}function xa(e,i,o,l,f){for(f=f&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var m=e,y=i,S=o,D=l,q=y.flags;switch(y.tag){case 0:case 11:case 15:xa(m,y,S,D,f),To(8,y);break;case 23:break;case 22:var ae=y.stateNode;y.memoizedState!==null?ae._visibility&2?xa(m,y,S,D,f):Lo(m,y):(ae._visibility|=2,xa(m,y,S,D,f)),f&&q&2048&&dd(y.alternate,y);break;case 24:xa(m,y,S,D,f),f&&q&2048&&fd(y.alternate,y);break;default:xa(m,y,S,D,f)}i=i.sibling}}function Lo(e,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var o=e,l=i,f=l.flags;switch(l.tag){case 22:Lo(o,l),f&2048&&dd(l.alternate,l);break;case 24:Lo(o,l),f&2048&&fd(l.alternate,l);break;default:Lo(o,l)}i=i.sibling}}var No=8192;function Sa(e,i,o){if(e.subtreeFlags&No)for(e=e.child;e!==null;)Ag(e,i,o),e=e.sibling}function Ag(e,i,o){switch(e.tag){case 26:Sa(e,i,o),e.flags&No&&e.memoizedState!==null&&hS(o,Vn,e.memoizedState,e.memoizedProps);break;case 5:Sa(e,i,o);break;case 3:case 4:var l=Vn;Vn=gs(e.stateNode.containerInfo),Sa(e,i,o),Vn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=No,No=16777216,Sa(e,i,o),No=l):Sa(e,i,o));break;default:Sa(e,i,o)}}function kg(e){var i=e.alternate;if(i!==null&&(e=i.child,e!==null)){i.child=null;do i=e.sibling,e.sibling=null,e=i;while(e!==null)}}function Mo(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var l=i[o];Dt=l,Rg(l,e)}kg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Tg(e),e=e.sibling}function Tg(e){switch(e.tag){case 0:case 11:case 15:Mo(e),e.flags&2048&&Xi(9,e,e.return);break;case 3:Mo(e);break;case 12:Mo(e);break;case 22:var i=e.stateNode;e.memoizedState!==null&&i._visibility&2&&(e.return===null||e.return.tag!==13)?(i._visibility&=-3,is(e)):Mo(e);break;default:Mo(e)}}function is(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var l=i[o];Dt=l,Rg(l,e)}kg(e)}for(e=e.child;e!==null;){switch(i=e,i.tag){case 0:case 11:case 15:Xi(8,i,i.return),is(i);break;case 22:o=i.stateNode,o._visibility&2&&(o._visibility&=-3,is(i));break;default:is(i)}e=e.sibling}}function Rg(e,i){for(;Dt!==null;){var o=Dt;switch(o.tag){case 0:case 11:case 15:Xi(8,o,i);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var l=o.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:po(o.memoizedState.cache)}if(l=o.child,l!==null)l.return=o,Dt=l;else e:for(o=e;Dt!==null;){l=Dt;var f=l.sibling,m=l.return;if(yg(l),l===o){Dt=null;break e}if(f!==null){f.return=m,Dt=f;break e}Dt=m}}}var Tx={getCacheForType:function(e){var i=Ht(yt),o=i.data.get(e);return o===void 0&&(o=e(),i.data.set(e,o)),o},cacheSignal:function(){return Ht(yt).controller.signal}},Rx=typeof WeakMap=="function"?WeakMap:Map,Fe=0,nt=null,ze=null,je=0,Qe=0,_n=null,Wi=!1,Ea=!1,hd=!1,Ei=0,mt=0,Qi=0,Or=0,md=0,xn=0,wa=0,Oo=null,sn=null,pd=!1,rs=0,Lg=0,as=1/0,os=null,Ki=null,kt=0,Zi=null,Ca=null,wi=0,gd=0,bd=null,Ng=null,Do=0,vd=null;function Sn(){return(Fe&2)!==0&&je!==0?je&-je:N.T!==null?wd():ju()}function Mg(){if(xn===0)if((je&536870912)===0||Be){var e=zi;zi<<=1,(zi&3932160)===0&&(zi=262144),xn=e}else xn=536870912;return e=vn.current,e!==null&&(e.flags|=32),xn}function un(e,i,o){(e===nt&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)&&(Aa(e,0),Ji(e,je,xn,!1)),tt(e,o),((Fe&2)===0||e!==nt)&&(e===nt&&((Fe&2)===0&&(Or|=o),mt===4&&Ji(e,je,xn,!1)),ti(e))}function Og(e,i,o){if((Fe&6)!==0)throw Error(a(327));var l=!o&&(i&127)===0&&(i&e.expiredLanes)===0||We(e,i),f=l?Mx(e,i):_d(e,i,!0),m=l;do{if(f===0){Ea&&!l&&Ji(e,i,0,!1);break}else{if(o=e.current.alternate,m&&!Lx(o)){f=_d(e,i,!1),m=!1;continue}if(f===2){if(m=i,e.errorRecoveryDisabledLanes&m)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){i=y;e:{var S=e;f=Oo;var D=S.current.memoizedState.isDehydrated;if(D&&(Aa(S,y).flags|=256),y=_d(S,y,!1),y!==2){if(hd&&!D){S.errorRecoveryDisabledLanes|=m,Or|=m,f=4;break e}m=sn,sn=f,m!==null&&(sn===null?sn=m:sn.push.apply(sn,m))}f=y}if(m=!1,f!==2)continue}}if(f===1){Aa(e,0),Ji(e,i,0,!0);break}e:{switch(l=e,m=f,m){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:Ji(l,i,xn,!Wi);break e;case 2:sn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(f=rs+300-Ct(),10<f)){if(Ji(l,i,xn,!Wi),Te(l,0,!0)!==0)break e;wi=i,l.timeoutHandle=cb(Dg.bind(null,l,o,sn,os,pd,i,xn,Or,wa,Wi,m,"Throttled",-0,0),f);break e}Dg(l,o,sn,os,pd,i,xn,Or,wa,Wi,m,null,-0,0)}}break}while(!0);ti(e)}function Dg(e,i,o,l,f,m,y,S,D,q,ae,ue,F,J){if(e.timeoutHandle=-1,ue=i.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ui},Ag(i,m,ue);var ye=(m&62914560)===m?rs-Ct():(m&4194048)===m?Lg-Ct():0;if(ye=mS(ue,ye),ye!==null){wi=m,e.cancelPendingCommit=ye(Vg.bind(null,e,i,m,o,l,f,y,S,D,ae,ue,null,F,J)),Ji(e,m,y,!q);return}}Vg(e,i,m,o,l,f,y,S,D)}function Lx(e){for(var i=e;;){var o=i.tag;if((o===0||o===11||o===15)&&i.flags&16384&&(o=i.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var l=0;l<o.length;l++){var f=o[l],m=f.getSnapshot;f=f.value;try{if(!gn(m(),f))return!1}catch{return!1}}if(o=i.child,i.subtreeFlags&16384&&o!==null)o.return=i,i=o;else{if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Ji(e,i,o,l){i&=~md,i&=~Or,e.suspendedLanes|=i,e.pingedLanes&=~i,l&&(e.warmLanes|=i),l=e.expirationTimes;for(var f=i;0<f;){var m=31-At(f),y=1<<m;l[m]=-1,f&=~y}o!==0&&gr(e,o,i)}function ls(){return(Fe&6)===0?(Io(0),!1):!0}function yd(){if(ze!==null){if(Qe===0)var e=ze.return;else e=ze,hi=wr=null,Ic(e),ga=null,bo=0,e=ze;for(;e!==null;)dg(e.alternate,e),e=e.return;ze=null}}function Aa(e,i){var o=e.timeoutHandle;o!==-1&&(e.timeoutHandle=-1,Qx(o)),o=e.cancelPendingCommit,o!==null&&(e.cancelPendingCommit=null,o()),wi=0,yd(),nt=e,ze=o=di(e.current,null),je=i,Qe=0,_n=null,Wi=!1,Ea=We(e,i),hd=!1,wa=xn=md=Or=Qi=mt=0,sn=Oo=null,pd=!1,(i&8)!==0&&(i|=i&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=i;0<l;){var f=31-At(l),m=1<<f;i|=e[f],l&=~m}return Ei=i,Tl(),o}function Ig(e,i){Me=null,N.H=Co,i===pa||i===zl?(i=Km(),Qe=3):i===Ec?(i=Km(),Qe=4):Qe=i===Kc?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,_n=i,ze===null&&(mt=1,Ql(e,kn(i,e.current)))}function zg(){var e=vn.current;return e===null?!0:(je&4194048)===je?Nn===null:(je&62914560)===je||(je&536870912)!==0?e===Nn:!1}function Pg(){var e=N.H;return N.H=Co,e===null?Co:e}function jg(){var e=N.A;return N.A=Tx,e}function ss(){mt=4,Wi||(je&4194048)!==je&&vn.current!==null||(Ea=!0),(Qi&134217727)===0&&(Or&134217727)===0||nt===null||Ji(nt,je,xn,!1)}function _d(e,i,o){var l=Fe;Fe|=2;var f=Pg(),m=jg();(nt!==e||je!==i)&&(os=null,Aa(e,i)),i=!1;var y=mt;e:do try{if(Qe!==0&&ze!==null){var S=ze,D=_n;switch(Qe){case 8:yd(),y=6;break e;case 3:case 2:case 9:case 6:vn.current===null&&(i=!0);var q=Qe;if(Qe=0,_n=null,ka(e,S,D,q),o&&Ea){y=0;break e}break;default:q=Qe,Qe=0,_n=null,ka(e,S,D,q)}}Nx(),y=mt;break}catch(ae){Ig(e,ae)}while(!0);return i&&e.shellSuspendCounter++,hi=wr=null,Fe=l,N.H=f,N.A=m,ze===null&&(nt=null,je=0,Tl()),y}function Nx(){for(;ze!==null;)Ug(ze)}function Mx(e,i){var o=Fe;Fe|=2;var l=Pg(),f=jg();nt!==e||je!==i?(os=null,as=Ct()+500,Aa(e,i)):Ea=We(e,i);e:do try{if(Qe!==0&&ze!==null){i=ze;var m=_n;t:switch(Qe){case 1:Qe=0,_n=null,ka(e,i,m,1);break;case 2:case 9:if(Wm(m)){Qe=0,_n=null,Hg(i);break}i=function(){Qe!==2&&Qe!==9||nt!==e||(Qe=7),ti(e)},m.then(i,i);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:Wm(m)?(Qe=0,_n=null,Hg(i)):(Qe=0,_n=null,ka(e,i,m,7));break;case 5:var y=null;switch(ze.tag){case 26:y=ze.memoizedState;case 5:case 27:var S=ze;if(y?Cb(y):S.stateNode.complete){Qe=0,_n=null;var D=S.sibling;if(D!==null)ze=D;else{var q=S.return;q!==null?(ze=q,us(q)):ze=null}break t}}Qe=0,_n=null,ka(e,i,m,5);break;case 6:Qe=0,_n=null,ka(e,i,m,6);break;case 8:yd(),mt=6;break e;default:throw Error(a(462))}}Ox();break}catch(ae){Ig(e,ae)}while(!0);return hi=wr=null,N.H=l,N.A=f,Fe=o,ze!==null?0:(nt=null,je=0,Tl(),mt)}function Ox(){for(;ze!==null&&!$e();)Ug(ze)}function Ug(e){var i=ug(e.alternate,e,Ei);e.memoizedProps=e.pendingProps,i===null?us(e):ze=i}function Hg(e){var i=e,o=i.alternate;switch(i.tag){case 15:case 0:i=ig(o,i,i.pendingProps,i.type,void 0,je);break;case 11:i=ig(o,i,i.pendingProps,i.type.render,i.ref,je);break;case 5:Ic(i);default:dg(o,i),i=ze=jm(i,Ei),i=ug(o,i,Ei)}e.memoizedProps=e.pendingProps,i===null?us(e):ze=i}function ka(e,i,o,l){hi=wr=null,Ic(i),ga=null,bo=0;var f=i.return;try{if(xx(e,f,i,o,je)){mt=1,Ql(e,kn(o,e.current)),ze=null;return}}catch(m){if(f!==null)throw ze=f,m;mt=1,Ql(e,kn(o,e.current)),ze=null;return}i.flags&32768?(Be||l===1?e=!0:Ea||(je&536870912)!==0?e=!1:(Wi=e=!0,(l===2||l===9||l===3||l===6)&&(l=vn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Bg(i,e)):us(i)}function us(e){var i=e;do{if((i.flags&32768)!==0){Bg(i,Wi);return}e=i.return;var o=wx(i.alternate,i,Ei);if(o!==null){ze=o;return}if(i=i.sibling,i!==null){ze=i;return}ze=i=e}while(i!==null);mt===0&&(mt=5)}function Bg(e,i){do{var o=Cx(e.alternate,e);if(o!==null){o.flags&=32767,ze=o;return}if(o=e.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!i&&(e=e.sibling,e!==null)){ze=e;return}ze=e=o}while(e!==null);mt=6,ze=null}function Vg(e,i,o,l,f,m,y,S,D){e.cancelPendingCommit=null;do cs();while(kt!==0);if((Fe&6)!==0)throw Error(a(327));if(i!==null){if(i===e.current)throw Error(a(177));if(m=i.lanes|i.childLanes,m|=sc,Jt(e,o,m,y,S,D),e===nt&&(ze=nt=null,je=0),Ca=i,Zi=e,wi=o,gd=m,bd=f,Ng=l,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Px(fn,function(){return Fg(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||l){l=N.T,N.T=null,f=P.p,P.p=2,y=Fe,Fe|=4;try{Ax(e,i,o)}finally{Fe=y,P.p=f,N.T=l}}kt=1,Gg(),$g(),qg()}}function Gg(){if(kt===1){kt=0;var e=Zi,i=Ca,o=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||o){o=N.T,N.T=null;var l=P.p;P.p=2;var f=Fe;Fe|=4;try{Eg(i,e);var m=Md,y=Rm(e.containerInfo),S=m.focusedElem,D=m.selectionRange;if(y!==S&&S&&S.ownerDocument&&Tm(S.ownerDocument.documentElement,S)){if(D!==null&&ic(S)){var q=D.start,ae=D.end;if(ae===void 0&&(ae=q),"selectionStart"in S)S.selectionStart=q,S.selectionEnd=Math.min(ae,S.value.length);else{var ue=S.ownerDocument||document,F=ue&&ue.defaultView||window;if(F.getSelection){var J=F.getSelection(),ye=S.textContent.length,ke=Math.min(D.start,ye),et=D.end===void 0?ke:Math.min(D.end,ye);!J.extend&&ke>et&&(y=et,et=ke,ke=y);var B=km(S,ke),j=km(S,et);if(B&&j&&(J.rangeCount!==1||J.anchorNode!==B.node||J.anchorOffset!==B.offset||J.focusNode!==j.node||J.focusOffset!==j.offset)){var $=ue.createRange();$.setStart(B.node,B.offset),J.removeAllRanges(),ke>et?(J.addRange($),J.extend(j.node,j.offset)):($.setEnd(j.node,j.offset),J.addRange($))}}}}for(ue=[],J=S;J=J.parentNode;)J.nodeType===1&&ue.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<ue.length;S++){var se=ue[S];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Ss=!!Nd,Md=Nd=null}finally{Fe=f,P.p=l,N.T=o}}e.current=i,kt=2}}function $g(){if(kt===2){kt=0;var e=Zi,i=Ca,o=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||o){o=N.T,N.T=null;var l=P.p;P.p=2;var f=Fe;Fe|=4;try{vg(e,i.alternate,i)}finally{Fe=f,P.p=l,N.T=o}}kt=3}}function qg(){if(kt===4||kt===3){kt=0,Wt();var e=Zi,i=Ca,o=wi,l=Ng;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?kt=5:(kt=0,Ca=Zi=null,Yg(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Ki=null),Hn(o),i=i.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(li,i,void 0,(i.current.flags&128)===128)}catch{}if(l!==null){i=N.T,f=P.p,P.p=2,N.T=null;try{for(var m=e.onRecoverableError,y=0;y<l.length;y++){var S=l[y];m(S.value,{componentStack:S.stack})}}finally{N.T=i,P.p=f}}(wi&3)!==0&&cs(),ti(e),f=e.pendingLanes,(o&261930)!==0&&(f&42)!==0?e===vd?Do++:(Do=0,vd=e):Do=0,Io(0)}}function Yg(e,i){(e.pooledCacheLanes&=i)===0&&(i=e.pooledCache,i!=null&&(e.pooledCache=null,po(i)))}function cs(){return Gg(),$g(),qg(),Fg()}function Fg(){if(kt!==5)return!1;var e=Zi,i=gd;gd=0;var o=Hn(wi),l=N.T,f=P.p;try{P.p=32>o?32:o,N.T=null,o=bd,bd=null;var m=Zi,y=wi;if(kt=0,Ca=Zi=null,wi=0,(Fe&6)!==0)throw Error(a(331));var S=Fe;if(Fe|=4,Tg(m.current),Cg(m,m.current,y,o),Fe=S,Io(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(li,m)}catch{}return!0}finally{P.p=f,N.T=l,Yg(e,i)}}function Xg(e,i,o){i=kn(o,i),i=Qc(e.stateNode,i,2),e=qi(e,i,2),e!==null&&(tt(e,2),ti(e))}function Ke(e,i,o){if(e.tag===3)Xg(e,e,o);else for(;i!==null;){if(i.tag===3){Xg(i,e,o);break}else if(i.tag===1){var l=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ki===null||!Ki.has(l))){e=kn(o,e),o=Wp(2),l=qi(i,o,2),l!==null&&(Qp(o,l,i,e),tt(l,2),ti(l));break}}i=i.return}}function xd(e,i,o){var l=e.pingCache;if(l===null){l=e.pingCache=new Rx;var f=new Set;l.set(i,f)}else f=l.get(i),f===void 0&&(f=new Set,l.set(i,f));f.has(o)||(hd=!0,f.add(o),e=Dx.bind(null,e,i,o),i.then(e,e))}function Dx(e,i,o){var l=e.pingCache;l!==null&&l.delete(i),e.pingedLanes|=e.suspendedLanes&o,e.warmLanes&=~o,nt===e&&(je&o)===o&&(mt===4||mt===3&&(je&62914560)===je&&300>Ct()-rs?(Fe&2)===0&&Aa(e,0):md|=o,wa===je&&(wa=0)),ti(e)}function Wg(e,i){i===0&&(i=ut()),e=xr(e,i),e!==null&&(tt(e,i),ti(e))}function Ix(e){var i=e.memoizedState,o=0;i!==null&&(o=i.retryLane),Wg(e,o)}function zx(e,i){var o=0;switch(e.tag){case 31:case 13:var l=e.stateNode,f=e.memoizedState;f!==null&&(o=f.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(a(314))}l!==null&&l.delete(i),Wg(e,o)}function Px(e,i){return we(e,i)}var ds=null,Ta=null,Sd=!1,fs=!1,Ed=!1,er=0;function ti(e){e!==Ta&&e.next===null&&(Ta===null?ds=Ta=e:Ta=Ta.next=e),fs=!0,Sd||(Sd=!0,Ux())}function Io(e,i){if(!Ed&&fs){Ed=!0;do for(var o=!1,l=ds;l!==null;){if(e!==0){var f=l.pendingLanes;if(f===0)var m=0;else{var y=l.suspendedLanes,S=l.pingedLanes;m=(1<<31-At(42|e)+1)-1,m&=f&~(y&~S),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(o=!0,Jg(l,m))}else m=je,m=Te(l,l===nt?m:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(m&3)===0||We(l,m)||(o=!0,Jg(l,m));l=l.next}while(o);Ed=!1}}function jx(){Qg()}function Qg(){fs=Sd=!1;var e=0;er!==0&&Wx()&&(e=er);for(var i=Ct(),o=null,l=ds;l!==null;){var f=l.next,m=Kg(l,i);m===0?(l.next=null,o===null?ds=f:o.next=f,f===null&&(Ta=o)):(o=l,(e!==0||(m&3)!==0)&&(fs=!0)),l=f}kt!==0&&kt!==5||Io(e),er!==0&&(er=0)}function Kg(e,i){for(var o=e.suspendedLanes,l=e.pingedLanes,f=e.expirationTimes,m=e.pendingLanes&-62914561;0<m;){var y=31-At(m),S=1<<y,D=f[y];D===-1?((S&o)===0||(S&l)!==0)&&(f[y]=Re(S,i)):D<=i&&(e.expiredLanes|=S),m&=~S}if(i=nt,o=je,o=Te(e,e===i?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,o===0||e===i&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&it(l),e.callbackNode=null,e.callbackPriority=0;if((o&3)===0||We(e,o)){if(i=o&-o,i===e.callbackPriority)return i;switch(l!==null&&it(l),Hn(o)){case 2:case 8:o=Qn;break;case 32:o=fn;break;case 268435456:o=Pt;break;default:o=fn}return l=Zg.bind(null,e),o=we(o,l),e.callbackPriority=i,e.callbackNode=o,i}return l!==null&&l!==null&&it(l),e.callbackPriority=2,e.callbackNode=null,2}function Zg(e,i){if(kt!==0&&kt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var o=e.callbackNode;if(cs()&&e.callbackNode!==o)return null;var l=je;return l=Te(e,e===nt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Og(e,l,i),Kg(e,Ct()),e.callbackNode!=null&&e.callbackNode===o?Zg.bind(null,e):null)}function Jg(e,i){if(cs())return null;Og(e,i,!0)}function Ux(){Kx(function(){(Fe&6)!==0?we(Qt,jx):Qg()})}function wd(){if(er===0){var e=ha;e===0&&(e=Ii,Ii<<=1,(Ii&261888)===0&&(Ii=256)),er=e}return er}function eb(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:_l(""+e)}function tb(e,i){var o=i.ownerDocument.createElement("input");return o.name=i.name,o.value=i.value,e.id&&o.setAttribute("form",e.id),i.parentNode.insertBefore(o,i),e=new FormData(e),o.parentNode.removeChild(o),e}function Hx(e,i,o,l,f){if(i==="submit"&&o&&o.stateNode===f){var m=eb((f[nn]||null).action),y=l.submitter;y&&(i=(i=y[nn]||null)?eb(i.formAction):y.getAttribute("formAction"),i!==null&&(m=i,y=null));var S=new wl("action","action",null,l,f);e.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(er!==0){var D=y?tb(f,y):new FormData(f);$c(o,{pending:!0,data:D,method:f.method,action:m},null,D)}}else typeof m=="function"&&(S.preventDefault(),D=y?tb(f,y):new FormData(f),$c(o,{pending:!0,data:D,method:f.method,action:m},m,D))},currentTarget:f}]})}}for(var Cd=0;Cd<lc.length;Cd++){var Ad=lc[Cd],Bx=Ad.toLowerCase(),Vx=Ad[0].toUpperCase()+Ad.slice(1);Bn(Bx,"on"+Vx)}Bn(Mm,"onAnimationEnd"),Bn(Om,"onAnimationIteration"),Bn(Dm,"onAnimationStart"),Bn("dblclick","onDoubleClick"),Bn("focusin","onFocus"),Bn("focusout","onBlur"),Bn(rx,"onTransitionRun"),Bn(ax,"onTransitionStart"),Bn(ox,"onTransitionCancel"),Bn(Im,"onTransitionEnd"),Jr("onMouseEnter",["mouseout","mouseover"]),Jr("onMouseLeave",["mouseout","mouseover"]),Jr("onPointerEnter",["pointerout","pointerover"]),Jr("onPointerLeave",["pointerout","pointerover"]),br("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),br("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),br("onBeforeInput",["compositionend","keypress","textInput","paste"]),br("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),br("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),br("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zo="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(" "),Gx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zo));function nb(e,i){i=(i&4)!==0;for(var o=0;o<e.length;o++){var l=e[o],f=l.event;l=l.listeners;e:{var m=void 0;if(i)for(var y=l.length-1;0<=y;y--){var S=l[y],D=S.instance,q=S.currentTarget;if(S=S.listener,D!==m&&f.isPropagationStopped())break e;m=S,f.currentTarget=q;try{m(f)}catch(ae){kl(ae)}f.currentTarget=null,m=D}else for(y=0;y<l.length;y++){if(S=l[y],D=S.instance,q=S.currentTarget,S=S.listener,D!==m&&f.isPropagationStopped())break e;m=S,f.currentTarget=q;try{m(f)}catch(ae){kl(ae)}f.currentTarget=null,m=D}}}}function Pe(e,i){var o=i[Uu];o===void 0&&(o=i[Uu]=new Set);var l=e+"__bubble";o.has(l)||(ib(i,e,2,!1),o.add(l))}function kd(e,i,o){var l=0;i&&(l|=4),ib(o,e,l,i)}var hs="_reactListening"+Math.random().toString(36).slice(2);function Td(e){if(!e[hs]){e[hs]=!0,Qh.forEach(function(o){o!=="selectionchange"&&(Gx.has(o)||kd(o,!1,e),kd(o,!0,e))});var i=e.nodeType===9?e:e.ownerDocument;i===null||i[hs]||(i[hs]=!0,kd("selectionchange",!1,i))}}function ib(e,i,o,l){switch(Mb(i)){case 2:var f=bS;break;case 8:f=vS;break;default:f=Gd}o=f.bind(null,i,o,e),f=void 0,!Xu||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(f=!0),l?f!==void 0?e.addEventListener(i,o,{capture:!0,passive:f}):e.addEventListener(i,o,!0):f!==void 0?e.addEventListener(i,o,{passive:f}):e.addEventListener(i,o,!1)}function Rd(e,i,o,l,f){var m=l;if((i&1)===0&&(i&2)===0&&l!==null)e:for(;;){if(l===null)return;var y=l.tag;if(y===3||y===4){var S=l.stateNode.containerInfo;if(S===f)break;if(y===4)for(y=l.return;y!==null;){var D=y.tag;if((D===3||D===4)&&y.stateNode.containerInfo===f)return;y=y.return}for(;S!==null;){if(y=Qr(S),y===null)return;if(D=y.tag,D===5||D===6||D===26||D===27){l=m=y;continue e}S=S.parentNode}}l=l.return}sm(function(){var q=m,ae=Yu(o),ue=[];e:{var F=zm.get(e);if(F!==void 0){var J=wl,ye=e;switch(e){case"keypress":if(Sl(o)===0)break e;case"keydown":case"keyup":J=z_;break;case"focusin":ye="focus",J=Zu;break;case"focusout":ye="blur",J=Zu;break;case"beforeblur":case"afterblur":J=Zu;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":J=dm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=w_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=U_;break;case Mm:case Om:case Dm:J=k_;break;case Im:J=B_;break;case"scroll":case"scrollend":J=S_;break;case"wheel":J=G_;break;case"copy":case"cut":case"paste":J=R_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=hm;break;case"toggle":case"beforetoggle":J=q_}var ke=(i&4)!==0,et=!ke&&(e==="scroll"||e==="scrollend"),B=ke?F!==null?F+"Capture":null:F;ke=[];for(var j=q,$;j!==null;){var se=j;if($=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||$===null||B===null||(se=io(j,B),se!=null&&ke.push(Po(j,se,$))),et)break;j=j.return}0<ke.length&&(F=new J(F,ye,null,o,ae),ue.push({event:F,listeners:ke}))}}if((i&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",F&&o!==qu&&(ye=o.relatedTarget||o.fromElement)&&(Qr(ye)||ye[Wr]))break e;if((J||F)&&(F=ae.window===ae?ae:(F=ae.ownerDocument)?F.defaultView||F.parentWindow:window,J?(ye=o.relatedTarget||o.toElement,J=q,ye=ye?Qr(ye):null,ye!==null&&(et=u(ye),ke=ye.tag,ye!==et||ke!==5&&ke!==27&&ke!==6)&&(ye=null)):(J=null,ye=q),J!==ye)){if(ke=dm,se="onMouseLeave",B="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(ke=hm,se="onPointerLeave",B="onPointerEnter",j="pointer"),et=J==null?F:no(J),$=ye==null?F:no(ye),F=new ke(se,j+"leave",J,o,ae),F.target=et,F.relatedTarget=$,se=null,Qr(ae)===q&&(ke=new ke(B,j+"enter",ye,o,ae),ke.target=$,ke.relatedTarget=et,se=ke),et=se,J&&ye)t:{for(ke=$x,B=J,j=ye,$=0,se=B;se;se=ke(se))$++;se=0;for(var Ce=j;Ce;Ce=ke(Ce))se++;for(;0<$-se;)B=ke(B),$--;for(;0<se-$;)j=ke(j),se--;for(;$--;){if(B===j||j!==null&&B===j.alternate){ke=B;break t}B=ke(B),j=ke(j)}ke=null}else ke=null;J!==null&&rb(ue,F,J,ke,!1),ye!==null&&et!==null&&rb(ue,et,ye,ke,!0)}}e:{if(F=q?no(q):window,J=F.nodeName&&F.nodeName.toLowerCase(),J==="select"||J==="input"&&F.type==="file")var qe=xm;else if(ym(F))if(Sm)qe=tx;else{qe=J_;var Se=Z_}else J=F.nodeName,!J||J.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?q&&$u(q.elementType)&&(qe=xm):qe=ex;if(qe&&(qe=qe(e,q))){_m(ue,qe,o,ae);break e}Se&&Se(e,F,q),e==="focusout"&&q&&F.type==="number"&&q.memoizedProps.value!=null&&Gu(F,"number",F.value)}switch(Se=q?no(q):window,e){case"focusin":(ym(Se)||Se.contentEditable==="true")&&(aa=Se,rc=q,fo=null);break;case"focusout":fo=rc=aa=null;break;case"mousedown":ac=!0;break;case"contextmenu":case"mouseup":case"dragend":ac=!1,Lm(ue,o,ae);break;case"selectionchange":if(ix)break;case"keydown":case"keyup":Lm(ue,o,ae)}var Oe;if(ec)e:{switch(e){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else ra?bm(e,o)&&(Ue="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(Ue="onCompositionStart");Ue&&(mm&&o.locale!=="ko"&&(ra||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&ra&&(Oe=um()):(ji=ae,Wu="value"in ji?ji.value:ji.textContent,ra=!0)),Se=ms(q,Ue),0<Se.length&&(Ue=new fm(Ue,e,null,o,ae),ue.push({event:Ue,listeners:Se}),Oe?Ue.data=Oe:(Oe=vm(o),Oe!==null&&(Ue.data=Oe)))),(Oe=F_?X_(e,o):W_(e,o))&&(Ue=ms(q,"onBeforeInput"),0<Ue.length&&(Se=new fm("onBeforeInput","beforeinput",null,o,ae),ue.push({event:Se,listeners:Ue}),Se.data=Oe)),Hx(ue,e,q,o,ae)}nb(ue,i)})}function Po(e,i,o){return{instance:e,listener:i,currentTarget:o}}function ms(e,i){for(var o=i+"Capture",l=[];e!==null;){var f=e,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=io(e,o),f!=null&&l.unshift(Po(e,f,m)),f=io(e,i),f!=null&&l.push(Po(e,f,m))),e.tag===3)return l;e=e.return}return[]}function $x(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function rb(e,i,o,l,f){for(var m=i._reactName,y=[];o!==null&&o!==l;){var S=o,D=S.alternate,q=S.stateNode;if(S=S.tag,D!==null&&D===l)break;S!==5&&S!==26&&S!==27||q===null||(D=q,f?(q=io(o,m),q!=null&&y.unshift(Po(o,q,D))):f||(q=io(o,m),q!=null&&y.push(Po(o,q,D)))),o=o.return}y.length!==0&&e.push({event:i,listeners:y})}var qx=/\r\n?/g,Yx=/\u0000|\uFFFD/g;function ab(e){return(typeof e=="string"?e:""+e).replace(qx,`
|
|
10
|
+
`).replace(Yx,"")}function ob(e,i){return i=ab(i),ab(e)===i}function Je(e,i,o,l,f,m){switch(o){case"children":typeof l=="string"?i==="body"||i==="textarea"&&l===""||ta(e,l):(typeof l=="number"||typeof l=="bigint")&&i!=="body"&&ta(e,""+l);break;case"className":vl(e,"class",l);break;case"tabIndex":vl(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":vl(e,o,l);break;case"style":om(e,l,m);break;case"data":if(i!=="object"){vl(e,"data",l);break}case"src":case"href":if(l===""&&(i!=="a"||o!=="href")){e.removeAttribute(o);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(o);break}l=_l(""+l),e.setAttribute(o,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(o,"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"&&(o==="formAction"?(i!=="input"&&Je(e,i,"name",f.name,f,null),Je(e,i,"formEncType",f.formEncType,f,null),Je(e,i,"formMethod",f.formMethod,f,null),Je(e,i,"formTarget",f.formTarget,f,null)):(Je(e,i,"encType",f.encType,f,null),Je(e,i,"method",f.method,f,null),Je(e,i,"target",f.target,f,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(o);break}l=_l(""+l),e.setAttribute(o,l);break;case"onClick":l!=null&&(e.onclick=ui);break;case"onScroll":l!=null&&Pe("scroll",e);break;case"onScrollEnd":l!=null&&Pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(o=l.__html,o!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=o}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}o=_l(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(o,""+l):e.removeAttribute(o);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(o,""):e.removeAttribute(o);break;case"capture":case"download":l===!0?e.setAttribute(o,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(o,l):e.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(o,l):e.removeAttribute(o);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(o):e.setAttribute(o,l);break;case"popover":Pe("beforetoggle",e),Pe("toggle",e),bl(e,"popover",l);break;case"xlinkActuate":si(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":si(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":si(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":si(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":si(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":si(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":si(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":si(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":si(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":bl(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=__.get(o)||o,bl(e,o,l))}}function Ld(e,i,o,l,f,m){switch(o){case"style":om(e,l,m);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(a(61));if(o=l.__html,o!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=o}}break;case"children":typeof l=="string"?ta(e,l):(typeof l=="number"||typeof l=="bigint")&&ta(e,""+l);break;case"onScroll":l!=null&&Pe("scroll",e);break;case"onScrollEnd":l!=null&&Pe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=ui);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Kh.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(f=o.endsWith("Capture"),i=o.slice(2,f?o.length-7:void 0),m=e[nn]||null,m=m!=null?m[o]:null,typeof m=="function"&&e.removeEventListener(i,m,f),typeof l=="function")){typeof m!="function"&&m!==null&&(o in e?e[o]=null:e.hasAttribute(o)&&e.removeAttribute(o)),e.addEventListener(i,l,f);break e}o in e?e[o]=l:l===!0?e.setAttribute(o,""):bl(e,o,l)}}}function Vt(e,i,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Pe("error",e),Pe("load",e);var l=!1,f=!1,m;for(m in o)if(o.hasOwnProperty(m)){var y=o[m];if(y!=null)switch(m){case"src":l=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Je(e,i,m,y,o,null)}}f&&Je(e,i,"srcSet",o.srcSet,o,null),l&&Je(e,i,"src",o.src,o,null);return;case"input":Pe("invalid",e);var S=m=y=f=null,D=null,q=null;for(l in o)if(o.hasOwnProperty(l)){var ae=o[l];if(ae!=null)switch(l){case"name":f=ae;break;case"type":y=ae;break;case"checked":D=ae;break;case"defaultChecked":q=ae;break;case"value":m=ae;break;case"defaultValue":S=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(a(137,i));break;default:Je(e,i,l,ae,o,null)}}nm(e,m,S,D,q,y,f,!1);return;case"select":Pe("invalid",e),l=y=m=null;for(f in o)if(o.hasOwnProperty(f)&&(S=o[f],S!=null))switch(f){case"value":m=S;break;case"defaultValue":y=S;break;case"multiple":l=S;default:Je(e,i,f,S,o,null)}i=m,o=y,e.multiple=!!l,i!=null?ea(e,!!l,i,!1):o!=null&&ea(e,!!l,o,!0);return;case"textarea":Pe("invalid",e),m=f=l=null;for(y in o)if(o.hasOwnProperty(y)&&(S=o[y],S!=null))switch(y){case"value":l=S;break;case"defaultValue":f=S;break;case"children":m=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(a(91));break;default:Je(e,i,y,S,o,null)}rm(e,l,f,m);return;case"option":for(D in o)o.hasOwnProperty(D)&&(l=o[D],l!=null)&&(D==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Je(e,i,D,l,o,null));return;case"dialog":Pe("beforetoggle",e),Pe("toggle",e),Pe("cancel",e),Pe("close",e);break;case"iframe":case"object":Pe("load",e);break;case"video":case"audio":for(l=0;l<zo.length;l++)Pe(zo[l],e);break;case"image":Pe("error",e),Pe("load",e);break;case"details":Pe("toggle",e);break;case"embed":case"source":case"link":Pe("error",e),Pe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(q in o)if(o.hasOwnProperty(q)&&(l=o[q],l!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Je(e,i,q,l,o,null)}return;default:if($u(i)){for(ae in o)o.hasOwnProperty(ae)&&(l=o[ae],l!==void 0&&Ld(e,i,ae,l,o,void 0));return}}for(S in o)o.hasOwnProperty(S)&&(l=o[S],l!=null&&Je(e,i,S,l,o,null))}function Fx(e,i,o,l){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,y=null,S=null,D=null,q=null,ae=null;for(J in o){var ue=o[J];if(o.hasOwnProperty(J)&&ue!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":D=ue;default:l.hasOwnProperty(J)||Je(e,i,J,null,l,ue)}}for(var F in l){var J=l[F];if(ue=o[F],l.hasOwnProperty(F)&&(J!=null||ue!=null))switch(F){case"type":m=J;break;case"name":f=J;break;case"checked":q=J;break;case"defaultChecked":ae=J;break;case"value":y=J;break;case"defaultValue":S=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(a(137,i));break;default:J!==ue&&Je(e,i,F,J,l,ue)}}Vu(e,y,S,D,q,ae,m,f);return;case"select":J=y=S=F=null;for(m in o)if(D=o[m],o.hasOwnProperty(m)&&D!=null)switch(m){case"value":break;case"multiple":J=D;default:l.hasOwnProperty(m)||Je(e,i,m,null,l,D)}for(f in l)if(m=l[f],D=o[f],l.hasOwnProperty(f)&&(m!=null||D!=null))switch(f){case"value":F=m;break;case"defaultValue":S=m;break;case"multiple":y=m;default:m!==D&&Je(e,i,f,m,l,D)}i=S,o=y,l=J,F!=null?ea(e,!!o,F,!1):!!l!=!!o&&(i!=null?ea(e,!!o,i,!0):ea(e,!!o,o?[]:"",!1));return;case"textarea":J=F=null;for(S in o)if(f=o[S],o.hasOwnProperty(S)&&f!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Je(e,i,S,null,l,f)}for(y in l)if(f=l[y],m=o[y],l.hasOwnProperty(y)&&(f!=null||m!=null))switch(y){case"value":F=f;break;case"defaultValue":J=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(a(91));break;default:f!==m&&Je(e,i,y,f,l,m)}im(e,F,J);return;case"option":for(var ye in o)F=o[ye],o.hasOwnProperty(ye)&&F!=null&&!l.hasOwnProperty(ye)&&(ye==="selected"?e.selected=!1:Je(e,i,ye,null,l,F));for(D in l)F=l[D],J=o[D],l.hasOwnProperty(D)&&F!==J&&(F!=null||J!=null)&&(D==="selected"?e.selected=F&&typeof F!="function"&&typeof F!="symbol":Je(e,i,D,F,l,J));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 ke in o)F=o[ke],o.hasOwnProperty(ke)&&F!=null&&!l.hasOwnProperty(ke)&&Je(e,i,ke,null,l,F);for(q in l)if(F=l[q],J=o[q],l.hasOwnProperty(q)&&F!==J&&(F!=null||J!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(a(137,i));break;default:Je(e,i,q,F,l,J)}return;default:if($u(i)){for(var et in o)F=o[et],o.hasOwnProperty(et)&&F!==void 0&&!l.hasOwnProperty(et)&&Ld(e,i,et,void 0,l,F);for(ae in l)F=l[ae],J=o[ae],!l.hasOwnProperty(ae)||F===J||F===void 0&&J===void 0||Ld(e,i,ae,F,l,J);return}}for(var B in o)F=o[B],o.hasOwnProperty(B)&&F!=null&&!l.hasOwnProperty(B)&&Je(e,i,B,null,l,F);for(ue in l)F=l[ue],J=o[ue],!l.hasOwnProperty(ue)||F===J||F==null&&J==null||Je(e,i,ue,F,l,J)}function lb(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Xx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,i=0,o=performance.getEntriesByType("resource"),l=0;l<o.length;l++){var f=o[l],m=f.transferSize,y=f.initiatorType,S=f.duration;if(m&&S&&lb(y)){for(y=0,S=f.responseEnd,l+=1;l<o.length;l++){var D=o[l],q=D.startTime;if(q>S)break;var ae=D.transferSize,ue=D.initiatorType;ae&&lb(ue)&&(D=D.responseEnd,y+=ae*(D<S?1:(S-q)/(D-q)))}if(--l,i+=8*(m+y)/(f.duration/1e3),e++,10<e)break}}if(0<e)return i/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Nd=null,Md=null;function ps(e){return e.nodeType===9?e:e.ownerDocument}function sb(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ub(e,i){if(e===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&i==="foreignObject"?0:e}function Od(e,i){return e==="textarea"||e==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Dd=null;function Wx(){var e=window.event;return e&&e.type==="popstate"?e===Dd?!1:(Dd=e,!0):(Dd=null,!1)}var cb=typeof setTimeout=="function"?setTimeout:void 0,Qx=typeof clearTimeout=="function"?clearTimeout:void 0,db=typeof Promise=="function"?Promise:void 0,Kx=typeof queueMicrotask=="function"?queueMicrotask:typeof db<"u"?function(e){return db.resolve(null).then(e).catch(Zx)}:cb;function Zx(e){setTimeout(function(){throw e})}function tr(e){return e==="head"}function fb(e,i){var o=i,l=0;do{var f=o.nextSibling;if(e.removeChild(o),f&&f.nodeType===8)if(o=f.data,o==="/$"||o==="/&"){if(l===0){e.removeChild(f),Ma(i);return}l--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")l++;else if(o==="html")jo(e.ownerDocument.documentElement);else if(o==="head"){o=e.ownerDocument.head,jo(o);for(var m=o.firstChild;m;){var y=m.nextSibling,S=m.nodeName;m[to]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&m.rel.toLowerCase()==="stylesheet"||o.removeChild(m),m=y}}else o==="body"&&jo(e.ownerDocument.body);o=f}while(o);Ma(i)}function hb(e,i){var o=e;e=0;do{var l=o.nextSibling;if(o.nodeType===1?i?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(i?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),l&&l.nodeType===8)if(o=l.data,o==="/$"){if(e===0)break;e--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||e++;o=l}while(o)}function Id(e){var i=e.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var o=i;switch(i=i.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Id(o),Hu(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}e.removeChild(o)}}function Jx(e,i,o,l){for(;e.nodeType===1;){var f=o;if(e.nodeName.toLowerCase()!==i.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[to])switch(i){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(m=e.getAttribute("rel"),m==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(m!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(m=e.getAttribute("src"),(m!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(i==="input"&&e.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===m)return e}else return e;if(e=Mn(e.nextSibling),e===null)break}return null}function eS(e,i,o){if(i==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!o||(e=Mn(e.nextSibling),e===null))return null;return e}function mb(e,i){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Mn(e.nextSibling),e===null))return null;return e}function zd(e){return e.data==="$?"||e.data==="$~"}function Pd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function tS(e,i){var o=e.ownerDocument;if(e.data==="$~")e._reactRetry=i;else if(e.data!=="$?"||o.readyState!=="loading")i();else{var l=function(){i(),o.removeEventListener("DOMContentLoaded",l)};o.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Mn(e){for(;e!=null;e=e.nextSibling){var i=e.nodeType;if(i===1||i===3)break;if(i===8){if(i=e.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return e}var jd=null;function pb(e){e=e.nextSibling;for(var i=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"||o==="/&"){if(i===0)return Mn(e.nextSibling);i--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||i++}e=e.nextSibling}return null}function gb(e){e=e.previousSibling;for(var i=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(i===0)return e;i--}else o!=="/$"&&o!=="/&"||i++}e=e.previousSibling}return null}function bb(e,i,o){switch(i=ps(o),e){case"html":if(e=i.documentElement,!e)throw Error(a(452));return e;case"head":if(e=i.head,!e)throw Error(a(453));return e;case"body":if(e=i.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function jo(e){for(var i=e.attributes;i.length;)e.removeAttributeNode(i[0]);Hu(e)}var On=new Map,vb=new Set;function gs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ci=P.d;P.d={f:nS,r:iS,D:rS,C:aS,L:oS,m:lS,X:uS,S:sS,M:cS};function nS(){var e=Ci.f(),i=ls();return e||i}function iS(e){var i=Kr(e);i!==null&&i.tag===5&&i.type==="form"?Ip(i):Ci.r(e)}var Ra=typeof document>"u"?null:document;function yb(e,i,o){var l=Ra;if(l&&typeof i=="string"&&i){var f=Cn(i);f='link[rel="'+e+'"][href="'+f+'"]',typeof o=="string"&&(f+='[crossorigin="'+o+'"]'),vb.has(f)||(vb.add(f),e={rel:e,crossOrigin:o,href:i},l.querySelector(f)===null&&(i=l.createElement("link"),Vt(i,"link",e),Ot(i),l.head.appendChild(i)))}}function rS(e){Ci.D(e),yb("dns-prefetch",e,null)}function aS(e,i){Ci.C(e,i),yb("preconnect",e,i)}function oS(e,i,o){Ci.L(e,i,o);var l=Ra;if(l&&e&&i){var f='link[rel="preload"][as="'+Cn(i)+'"]';i==="image"&&o&&o.imageSrcSet?(f+='[imagesrcset="'+Cn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(f+='[imagesizes="'+Cn(o.imageSizes)+'"]')):f+='[href="'+Cn(e)+'"]';var m=f;switch(i){case"style":m=La(e);break;case"script":m=Na(e)}On.has(m)||(e=g({rel:"preload",href:i==="image"&&o&&o.imageSrcSet?void 0:e,as:i},o),On.set(m,e),l.querySelector(f)!==null||i==="style"&&l.querySelector(Uo(m))||i==="script"&&l.querySelector(Ho(m))||(i=l.createElement("link"),Vt(i,"link",e),Ot(i),l.head.appendChild(i)))}}function lS(e,i){Ci.m(e,i);var o=Ra;if(o&&e){var l=i&&typeof i.as=="string"?i.as:"script",f='link[rel="modulepreload"][as="'+Cn(l)+'"][href="'+Cn(e)+'"]',m=f;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Na(e)}if(!On.has(m)&&(e=g({rel:"modulepreload",href:e},i),On.set(m,e),o.querySelector(f)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Ho(m)))return}l=o.createElement("link"),Vt(l,"link",e),Ot(l),o.head.appendChild(l)}}}function sS(e,i,o){Ci.S(e,i,o);var l=Ra;if(l&&e){var f=Zr(l).hoistableStyles,m=La(e);i=i||"default";var y=f.get(m);if(!y){var S={loading:0,preload:null};if(y=l.querySelector(Uo(m)))S.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":i},o),(o=On.get(m))&&Ud(e,o);var D=y=l.createElement("link");Ot(D),Vt(D,"link",e),D._p=new Promise(function(q,ae){D.onload=q,D.onerror=ae}),D.addEventListener("load",function(){S.loading|=1}),D.addEventListener("error",function(){S.loading|=2}),S.loading|=4,bs(y,i,l)}y={type:"stylesheet",instance:y,count:1,state:S},f.set(m,y)}}}function uS(e,i){Ci.X(e,i);var o=Ra;if(o&&e){var l=Zr(o).hoistableScripts,f=Na(e),m=l.get(f);m||(m=o.querySelector(Ho(f)),m||(e=g({src:e,async:!0},i),(i=On.get(f))&&Hd(e,i),m=o.createElement("script"),Ot(m),Vt(m,"link",e),o.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function cS(e,i){Ci.M(e,i);var o=Ra;if(o&&e){var l=Zr(o).hoistableScripts,f=Na(e),m=l.get(f);m||(m=o.querySelector(Ho(f)),m||(e=g({src:e,async:!0,type:"module"},i),(i=On.get(f))&&Hd(e,i),m=o.createElement("script"),Ot(m),Vt(m,"link",e),o.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(f,m))}}function _b(e,i,o,l){var f=(f=ce.current)?gs(f):null;if(!f)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(i=La(o.href),o=Zr(f).hoistableStyles,l=o.get(i),l||(l={type:"style",instance:null,count:0,state:null},o.set(i,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){e=La(o.href);var m=Zr(f).hoistableStyles,y=m.get(e);if(y||(f=f.ownerDocument||f,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(e,y),(m=f.querySelector(Uo(e)))&&!m._p&&(y.instance=m,y.state.loading=5),On.has(e)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},On.set(e,o),m||dS(f,e,o,y.state))),i&&l===null)throw Error(a(528,""));return y}if(i&&l!==null)throw Error(a(529,""));return null;case"script":return i=o.async,o=o.src,typeof o=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Na(o),o=Zr(f).hoistableScripts,l=o.get(i),l||(l={type:"script",instance:null,count:0,state:null},o.set(i,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function La(e){return'href="'+Cn(e)+'"'}function Uo(e){return'link[rel="stylesheet"]['+e+"]"}function xb(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function dS(e,i,o,l){e.querySelector('link[rel="preload"][as="style"]['+i+"]")?l.loading=1:(i=e.createElement("link"),l.preload=i,i.addEventListener("load",function(){return l.loading|=1}),i.addEventListener("error",function(){return l.loading|=2}),Vt(i,"link",o),Ot(i),e.head.appendChild(i))}function Na(e){return'[src="'+Cn(e)+'"]'}function Ho(e){return"script[async]"+e}function Sb(e,i,o){if(i.count++,i.instance===null)switch(i.type){case"style":var l=e.querySelector('style[data-href~="'+Cn(o.href)+'"]');if(l)return i.instance=l,Ot(l),l;var f=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ot(l),Vt(l,"style",f),bs(l,o.precedence,e),i.instance=l;case"stylesheet":f=La(o.href);var m=e.querySelector(Uo(f));if(m)return i.state.loading|=4,i.instance=m,Ot(m),m;l=xb(o),(f=On.get(f))&&Ud(l,f),m=(e.ownerDocument||e).createElement("link"),Ot(m);var y=m;return y._p=new Promise(function(S,D){y.onload=S,y.onerror=D}),Vt(m,"link",l),i.state.loading|=4,bs(m,o.precedence,e),i.instance=m;case"script":return m=Na(o.src),(f=e.querySelector(Ho(m)))?(i.instance=f,Ot(f),f):(l=o,(f=On.get(m))&&(l=g({},o),Hd(l,f)),e=e.ownerDocument||e,f=e.createElement("script"),Ot(f),Vt(f,"link",l),e.head.appendChild(f),i.instance=f);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(l=i.instance,i.state.loading|=4,bs(l,o.precedence,e));return i.instance}function bs(e,i,o){for(var l=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=l.length?l[l.length-1]:null,m=f,y=0;y<l.length;y++){var S=l[y];if(S.dataset.precedence===i)m=S;else if(m!==f)break}m?m.parentNode.insertBefore(e,m.nextSibling):(i=o.nodeType===9?o.head:o,i.insertBefore(e,i.firstChild))}function Ud(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.title==null&&(e.title=i.title)}function Hd(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.integrity==null&&(e.integrity=i.integrity)}var vs=null;function Eb(e,i,o){if(vs===null){var l=new Map,f=vs=new Map;f.set(o,l)}else f=vs,l=f.get(o),l||(l=new Map,f.set(o,l));if(l.has(e))return l;for(l.set(e,null),o=o.getElementsByTagName(e),f=0;f<o.length;f++){var m=o[f];if(!(m[to]||m[jt]||e==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var y=m.getAttribute(i)||"";y=e+y;var S=l.get(y);S?S.push(m):l.set(y,[m])}}return l}function wb(e,i,o){e=e.ownerDocument||e,e.head.insertBefore(o,i==="title"?e.querySelector("head > title"):null)}function fS(e,i,o){if(o===1||i.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(e=i.disabled,typeof i.precedence=="string"&&e==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Cb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function hS(e,i,o,l){if(o.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var f=La(l.href),m=i.querySelector(Uo(f));if(m){i=m._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(e.count++,e=ys.bind(e),i.then(e,e)),o.state.loading|=4,o.instance=m,Ot(m);return}m=i.ownerDocument||i,l=xb(l),(f=On.get(f))&&Ud(l,f),m=m.createElement("link"),Ot(m);var y=m;y._p=new Promise(function(S,D){y.onload=S,y.onerror=D}),Vt(m,"link",l),o.instance=m}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(o,i),(i=o.state.preload)&&(o.state.loading&3)===0&&(e.count++,o=ys.bind(e),i.addEventListener("load",o),i.addEventListener("error",o))}}var Bd=0;function mS(e,i){return e.stylesheets&&e.count===0&&xs(e,e.stylesheets),0<e.count||0<e.imgCount?function(o){var l=setTimeout(function(){if(e.stylesheets&&xs(e,e.stylesheets),e.unsuspend){var m=e.unsuspend;e.unsuspend=null,m()}},6e4+i);0<e.imgBytes&&Bd===0&&(Bd=62500*Xx());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&xs(e,e.stylesheets),e.unsuspend)){var m=e.unsuspend;e.unsuspend=null,m()}},(e.imgBytes>Bd?50:800)+i);return e.unsuspend=o,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(f)}}:null}function ys(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var _s=null;function xs(e,i){e.stylesheets=null,e.unsuspend!==null&&(e.count++,_s=new Map,i.forEach(pS,e),_s=null,ys.call(e))}function pS(e,i){if(!(i.state.loading&4)){var o=_s.get(e);if(o)var l=o.get(null);else{o=new Map,_s.set(e,o);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var y=f[m];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(o.set(y.dataset.precedence,y),l=y)}l&&o.set(null,l)}f=i.instance,y=f.getAttribute("data-precedence"),m=o.get(y)||l,m===l&&o.set(null,f),o.set(y,f),this.count++,l=ys.bind(this),f.addEventListener("load",l),f.addEventListener("error",l),m?m.parentNode.insertBefore(f,m.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),i.state.loading|=4}}var Bo={$$typeof:k,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function gS(e,i,o,l,f,m,y,S,D){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=pn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pn(0),this.hiddenUpdates=pn(null),this.identifierPrefix=l,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function Ab(e,i,o,l,f,m,y,S,D,q,ae,ue){return e=new gS(e,i,o,y,D,q,ae,ue,S),i=1,m===!0&&(i|=24),m=bn(3,null,null,i),e.current=m,m.stateNode=e,i=_c(),i.refCount++,e.pooledCache=i,i.refCount++,m.memoizedState={element:l,isDehydrated:o,cache:i},wc(m),e}function kb(e){return e?(e=sa,e):sa}function Tb(e,i,o,l,f,m){f=kb(f),l.context===null?l.context=f:l.pendingContext=f,l=$i(i),l.payload={element:o},m=m===void 0?null:m,m!==null&&(l.callback=m),o=qi(e,l,i),o!==null&&(un(o,e,i),yo(o,e,i))}function Rb(e,i){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<i?o:i}}function Vd(e,i){Rb(e,i),(e=e.alternate)&&Rb(e,i)}function Lb(e){if(e.tag===13||e.tag===31){var i=xr(e,67108864);i!==null&&un(i,e,67108864),Vd(e,67108864)}}function Nb(e){if(e.tag===13||e.tag===31){var i=Sn();i=Xr(i);var o=xr(e,i);o!==null&&un(o,e,i),Vd(e,i)}}var Ss=!0;function bS(e,i,o,l){var f=N.T;N.T=null;var m=P.p;try{P.p=2,Gd(e,i,o,l)}finally{P.p=m,N.T=f}}function vS(e,i,o,l){var f=N.T;N.T=null;var m=P.p;try{P.p=8,Gd(e,i,o,l)}finally{P.p=m,N.T=f}}function Gd(e,i,o,l){if(Ss){var f=$d(l);if(f===null)Rd(e,i,l,Es,o),Ob(e,l);else if(_S(f,e,i,o,l))l.stopPropagation();else if(Ob(e,l),i&4&&-1<yS.indexOf(e)){for(;f!==null;){var m=Kr(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var y=Zt(m.pendingLanes);if(y!==0){var S=m;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var D=1<<31-At(y);S.entanglements[1]|=D,y&=~D}ti(m),(Fe&6)===0&&(as=Ct()+500,Io(0))}}break;case 31:case 13:S=xr(m,2),S!==null&&un(S,m,2),ls(),Vd(m,2)}if(m=$d(l),m===null&&Rd(e,i,l,Es,o),m===f)break;f=m}f!==null&&l.stopPropagation()}else Rd(e,i,l,null,o)}}function $d(e){return e=Yu(e),qd(e)}var Es=null;function qd(e){if(Es=null,e=Qr(e),e!==null){var i=u(e);if(i===null)e=null;else{var o=i.tag;if(o===13){if(e=c(i),e!==null)return e;e=null}else if(o===31){if(e=h(i),e!==null)return e;e=null}else if(o===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;e=null}else i!==e&&(e=null)}}return Es=e,null}function Mb(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(oi()){case Qt:return 2;case Qn:return 8;case fn:case hn:return 32;case Pt:return 268435456;default:return 32}default:return 32}}var Yd=!1,nr=null,ir=null,rr=null,Vo=new Map,Go=new Map,ar=[],yS="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 Ob(e,i){switch(e){case"focusin":case"focusout":nr=null;break;case"dragenter":case"dragleave":ir=null;break;case"mouseover":case"mouseout":rr=null;break;case"pointerover":case"pointerout":Vo.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Go.delete(i.pointerId)}}function $o(e,i,o,l,f,m){return e===null||e.nativeEvent!==m?(e={blockedOn:i,domEventName:o,eventSystemFlags:l,nativeEvent:m,targetContainers:[f]},i!==null&&(i=Kr(i),i!==null&&Lb(i)),e):(e.eventSystemFlags|=l,i=e.targetContainers,f!==null&&i.indexOf(f)===-1&&i.push(f),e)}function _S(e,i,o,l,f){switch(i){case"focusin":return nr=$o(nr,e,i,o,l,f),!0;case"dragenter":return ir=$o(ir,e,i,o,l,f),!0;case"mouseover":return rr=$o(rr,e,i,o,l,f),!0;case"pointerover":var m=f.pointerId;return Vo.set(m,$o(Vo.get(m)||null,e,i,o,l,f)),!0;case"gotpointercapture":return m=f.pointerId,Go.set(m,$o(Go.get(m)||null,e,i,o,l,f)),!0}return!1}function Db(e){var i=Qr(e.target);if(i!==null){var o=u(i);if(o!==null){if(i=o.tag,i===13){if(i=c(o),i!==null){e.blockedOn=i,Xh(e.priority,function(){Nb(o)});return}}else if(i===31){if(i=h(o),i!==null){e.blockedOn=i,Xh(e.priority,function(){Nb(o)});return}}else if(i===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ws(e){if(e.blockedOn!==null)return!1;for(var i=e.targetContainers;0<i.length;){var o=$d(e.nativeEvent);if(o===null){o=e.nativeEvent;var l=new o.constructor(o.type,o);qu=l,o.target.dispatchEvent(l),qu=null}else return i=Kr(o),i!==null&&Lb(i),e.blockedOn=o,!1;i.shift()}return!0}function Ib(e,i,o){ws(e)&&o.delete(i)}function xS(){Yd=!1,nr!==null&&ws(nr)&&(nr=null),ir!==null&&ws(ir)&&(ir=null),rr!==null&&ws(rr)&&(rr=null),Vo.forEach(Ib),Go.forEach(Ib)}function Cs(e,i){e.blockedOn===i&&(e.blockedOn=null,Yd||(Yd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,xS)))}var As=null;function zb(e){As!==e&&(As=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){As===e&&(As=null);for(var i=0;i<e.length;i+=3){var o=e[i],l=e[i+1],f=e[i+2];if(typeof l!="function"){if(qd(l||o)===null)continue;break}var m=Kr(o);m!==null&&(e.splice(i,3),i-=3,$c(m,{pending:!0,data:f,method:o.method,action:l},l,f))}}))}function Ma(e){function i(D){return Cs(D,e)}nr!==null&&Cs(nr,e),ir!==null&&Cs(ir,e),rr!==null&&Cs(rr,e),Vo.forEach(i),Go.forEach(i);for(var o=0;o<ar.length;o++){var l=ar[o];l.blockedOn===e&&(l.blockedOn=null)}for(;0<ar.length&&(o=ar[0],o.blockedOn===null);)Db(o),o.blockedOn===null&&ar.shift();if(o=(e.ownerDocument||e).$$reactFormReplay,o!=null)for(l=0;l<o.length;l+=3){var f=o[l],m=o[l+1],y=f[nn]||null;if(typeof m=="function")y||zb(o);else if(y){var S=null;if(m&&m.hasAttribute("formAction")){if(f=m,y=m[nn]||null)S=y.formAction;else if(qd(f)!==null)continue}else S=y.action;typeof S=="function"?o[l+1]=S:(o.splice(l,3),l-=3),zb(o)}}}function Pb(){function e(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(y){return f=y})},focusReset:"manual",scroll:"manual"})}function i(){f!==null&&(f(),f=null),l||setTimeout(o,20)}function o(){if(!l&&!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 l=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(o,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),f!==null&&(f(),f=null)}}}function Fd(e){this._internalRoot=e}ks.prototype.render=Fd.prototype.render=function(e){var i=this._internalRoot;if(i===null)throw Error(a(409));var o=i.current,l=Sn();Tb(o,l,e,i,null,null)},ks.prototype.unmount=Fd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var i=e.containerInfo;Tb(e.current,2,null,e,null,null),ls(),i[Wr]=null}};function ks(e){this._internalRoot=e}ks.prototype.unstable_scheduleHydration=function(e){if(e){var i=ju();e={blockedOn:null,target:e,priority:i};for(var o=0;o<ar.length&&i!==0&&i<ar[o].priority;o++);ar.splice(o,0,e),o===0&&Db(e)}};var jb=n.version;if(jb!=="19.2.4")throw Error(a(527,jb,"19.2.4"));P.findDOMNode=function(e){var i=e._reactInternals;if(i===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=p(i),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var SS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ts=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ts.isDisabled&&Ts.supportsFiber)try{li=Ts.inject(SS),Mt=Ts}catch{}}return Yo.createRoot=function(e,i){if(!s(e))throw Error(a(299));var o=!1,l="",f=qp,m=Yp,y=Fp;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(l=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(m=i.onCaughtError),i.onRecoverableError!==void 0&&(y=i.onRecoverableError)),i=Ab(e,1,!1,null,null,o,l,null,f,m,y,Pb),e[Wr]=i.current,Td(e),new Fd(i)},Yo.hydrateRoot=function(e,i,o){if(!s(e))throw Error(a(299));var l=!1,f="",m=qp,y=Yp,S=Fp,D=null;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onUncaughtError!==void 0&&(m=o.onUncaughtError),o.onCaughtError!==void 0&&(y=o.onCaughtError),o.onRecoverableError!==void 0&&(S=o.onRecoverableError),o.formState!==void 0&&(D=o.formState)),i=Ab(e,1,!0,i,o??null,l,f,D,m,y,S,Pb),i.context=kb(null),o=i.current,l=Sn(),l=Xr(l),f=$i(l),f.callback=null,qi(o,f,l),o=l,i.current.lanes=o,tt(i,o),ti(i),e[Wr]=i.current,Td(e),new ks(i)},Yo.version="19.2.4",Yo}var Xb;function MS(){if(Xb)return Qd.exports;Xb=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),Qd.exports=NS(),Qd.exports}var OS=MS();const DS=dh(OS);const Vv=(...t)=>t.filter((n,r,a)=>!!n&&n.trim()!==""&&a.indexOf(n)===r).join(" ").trim();const IS=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const zS=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,a)=>a?a.toUpperCase():r.toLowerCase());const Wb=t=>{const n=zS(t);return n.charAt(0).toUpperCase()+n.slice(1)};var PS={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 jS=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1};const US=R.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:s="",children:u,iconNode:c,...h},d)=>R.createElement("svg",{ref:d,...PS,width:n,height:n,stroke:t,strokeWidth:a?Number(r)*24/Number(n):r,className:Vv("lucide",s),...!u&&!jS(h)&&{"aria-hidden":"true"},...h},[...c.map(([p,b])=>R.createElement(p,b)),...Array.isArray(u)?u:[u]]));const at=(t,n)=>{const r=R.forwardRef(({className:a,...s},u)=>R.createElement(US,{ref:u,iconNode:n,className:Vv(`lucide-${IS(Wb(t))}`,`lucide-${t}`,a),...s}));return r.displayName=Wb(t),r};const HS=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],nu=at("bot",HS);const BS=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Gv=at("check",BS);const VS=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],$v=at("chevron-down",VS);const GS=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],qv=at("chevron-left",GS);const $S=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Qb=at("chevron-right",$S);const qS=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],YS=at("chevron-up",qS);const FS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],el=at("circle-alert",FS);const XS=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]],WS=at("clipboard-copy",XS);const QS=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],KS=at("code-xml",QS);const ZS=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],JS=at("columns-2",ZS);const eE=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],tE=at("file-code-corner",eE);const nE=[["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"}]],iE=at("file",nE);const rE=[["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"}]],aE=at("folder",rE);const oE=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],lE=at("git-branch",oE);const sE=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],uE=at("git-pull-request",sE);const cE=[["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"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],dE=at("message-square-plus",cE);const fE=[["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"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],If=at("message-square-text",fE);const hE=[["path",{d:"M18 5h4",key:"1lhgn2"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],mE=at("moon-star",hE);const pE=[["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"}]],gE=at("refresh-cw",pE);const bE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],vE=at("rows-3",bE);const yE=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],_E=at("search",yE);const xE=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],SE=at("send",xE);const EE=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],wE=at("sun",EE);const CE=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],AE=at("terminal",CE);const kE=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],TE=at("trash-2",kE);const RE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],LE=at("x",RE);function Yv(){return typeof window<"u"}function Fv(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function NE(t){return Yv()?t instanceof HTMLElement||t instanceof Fv(t).HTMLElement:!1}function ME(t){return!Yv()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Fv(t).ShadowRoot}const Kb={};function Vr(t,n){const r=R.useRef(Kb);return r.current===Kb&&(r.current=t(n)),r}const ef=Hv[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],OE=ef&&ef!==R.useLayoutEffect?ef:t=>t();function Gt(t){const n=Vr(DE).current;return n.next=t,OE(n.effect),n.trampoline}function DE(){const t={next:void 0,callback:IE,trampoline:(...n)=>t.callback?.(...n),effect:()=>{t.callback=t.next}};return t}function IE(){}const zE={...Hv},PE=()=>{},ft=typeof document<"u"?R.useLayoutEffect:PE;function zf(t,n){if(t&&!n)return t;if(!t&&n)return n;if(t||n)return{...t,...n}}const tl={};function Xv(t,n,r,a,s){let u={...Pf(t,tl)};return n&&(u=Ws(u,n)),r&&(u=Ws(u,r)),a&&(u=Ws(u,a)),u}function jE(t){if(t.length===0)return tl;if(t.length===1)return Pf(t[0],tl);let n={...Pf(t[0],tl)};for(let r=1;r<t.length;r+=1)n=Ws(n,t[r]);return n}function Ws(t,n){return Wv(n)?n(t):UE(t,n)}function UE(t,n){if(!n)return t;for(const r in n){const a=n[r];switch(r){case"style":{t[r]=zf(t.style,a);break}case"className":{t[r]=Qv(t.className,a);break}default:HE(r,a)?t[r]=BE(t[r],a):t[r]=a}}return t}function HE(t,n){const r=t.charCodeAt(0),a=t.charCodeAt(1),s=t.charCodeAt(2);return r===111&&a===110&&s>=65&&s<=90&&(typeof n=="function"||typeof n>"u")}function Wv(t){return typeof t=="function"}function Pf(t,n){return Wv(t)?t(n):t??tl}function BE(t,n){return n?t?r=>{if(VE(r)){const s=r;jf(s);const u=n(s);return s.baseUIHandlerPrevented||t?.(s),u}const a=n(r);return t?.(r),a}:n:t}function jf(t){return t.preventBaseUIHandler=()=>{t.baseUIHandlerPrevented=!0},t}function Qv(t,n){return n?t?n+" "+t:n:t}function VE(t){return t!=null&&typeof t=="object"&&"nativeEvent"in t}function GE(t,n){return function(a,...s){const u=new URL(t);return u.searchParams.set("code",a.toString()),s.forEach(c=>u.searchParams.append("args[]",c)),`${n} error #${a}; visit ${u} for the full message.`}}const $r=GE("https://base-ui.com/production-error","Base UI"),$E=R.createContext(void 0);function qE(t=!1){const n=R.useContext($E);if(n===void 0&&!t)throw new Error($r(16));return n}function YE(t){const{focusableWhenDisabled:n,disabled:r,composite:a=!1,tabIndex:s=0,isNativeButton:u}=t,c=a&&n!==!1,h=a&&n===!1;return{props:R.useMemo(()=>{const p={onKeyDown(b){r&&n&&b.key!=="Tab"&&b.preventDefault()}};return a||(p.tabIndex=s,!u&&r&&(p.tabIndex=n?s:-1)),(u&&(n||c)||!u&&r)&&(p["aria-disabled"]=r),u&&(!n||h)&&(p.disabled=r),p},[a,r,n,c,h,u,s])}}function Kv(t={}){const{disabled:n=!1,focusableWhenDisabled:r,tabIndex:a=0,native:s=!0,composite:u}=t,c=R.useRef(null),h=qE(!0),d=u??h!==void 0,{props:p}=YE({focusableWhenDisabled:r,disabled:n,composite:d,tabIndex:a,isNativeButton:s}),b=R.useCallback(()=>{const _=c.current;tf(_)&&d&&n&&p.disabled===void 0&&_.disabled&&(_.disabled=!1)},[n,p.disabled,d]);ft(b,[b]);const g=R.useCallback((_={})=>{const{onClick:x,onMouseDown:T,onKeyUp:O,onKeyDown:A,onPointerDown:C,...k}=_;return Xv({type:s?"button":void 0,onClick(M){if(n){M.preventDefault();return}x?.(M)},onMouseDown(M){n||T?.(M)},onKeyDown(M){if(n||(jf(M),A?.(M),M.baseUIHandlerPrevented))return;const U=M.target===M.currentTarget,H=M.currentTarget,z=tf(H),Q=!s&&FE(H),ee=U&&(s?z:!Q),ie=M.key==="Enter",V=M.key===" ",K=H.getAttribute("role"),oe=K?.startsWith("menuitem")||K==="option"||K==="gridcell";if(U&&d&&V){if(M.defaultPrevented&&oe)return;M.preventDefault(),Q||s&&z?(H.click(),M.preventBaseUIHandler()):ee&&(x?.(M),M.preventBaseUIHandler());return}ee&&(!s&&(V||ie)&&M.preventDefault(),!s&&ie&&x?.(M))},onKeyUp(M){if(!n){if(jf(M),O?.(M),M.target===M.currentTarget&&s&&d&&tf(M.currentTarget)&&M.key===" "){M.preventDefault();return}M.baseUIHandlerPrevented||M.target===M.currentTarget&&!s&&!d&&M.key===" "&&x?.(M)}},onPointerDown(M){if(n){M.preventDefault();return}C?.(M)}},s?void 0:{role:"button"},p,k)},[n,p,d,s]),v=Gt(_=>{c.current=_,b()});return{getButtonProps:g,buttonRef:v}}function tf(t){return NE(t)&&t.tagName==="BUTTON"}function FE(t){return!!(t?.tagName==="A"&&t?.href)}function iu(t,n,r,a){const s=Vr(Zv).current;return WE(s,t,n,r,a)&&Jv(s,[t,n,r,a]),s.callback}function XE(t){const n=Vr(Zv).current;return QE(n,t)&&Jv(n,t),n.callback}function Zv(){return{callback:null,cleanup:null,refs:[]}}function WE(t,n,r,a,s){return t.refs[0]!==n||t.refs[1]!==r||t.refs[2]!==a||t.refs[3]!==s}function QE(t,n){return t.refs.length!==n.length||t.refs.some((r,a)=>r!==n[a])}function Jv(t,n){if(t.refs=n,n.every(r=>r==null)){t.callback=null;return}t.callback=r=>{if(t.cleanup&&(t.cleanup(),t.cleanup=null),r!=null){const a=Array(n.length).fill(null);for(let s=0;s<n.length;s+=1){const u=n[s];if(u!=null)switch(typeof u){case"function":{const c=u(r);typeof c=="function"&&(a[s]=c);break}case"object":{u.current=r;break}}}t.cleanup=()=>{for(let s=0;s<n.length;s+=1){const u=n[s];if(u!=null)switch(typeof u){case"function":{const c=a[s];typeof c=="function"?c():u(null);break}case"object":{u.current=null;break}}}}}}}const KE=parseInt(R.version,10);function ZE(t){return KE>=t}function Zb(t){if(!R.isValidElement(t))return null;const n=t,r=n.props;return(ZE(19)?r?.ref:n.ref)??null}function JE(t,n){const r={};for(const a in t){const s=t[a];if(n?.hasOwnProperty(a)){const u=n[a](s);u!=null&&Object.assign(r,u);continue}s===!0?r[`data-${a.toLowerCase()}`]="":s&&(r[`data-${a.toLowerCase()}`]=s.toString())}return r}function ew(t,n){return typeof t=="function"?t(n):t}function tw(t,n){return typeof t=="function"?t(n):t}const Pr=Object.freeze({});function Wn(t,n,r={}){const a=n.render,s=nw(n,r);if(r.enabled===!1)return null;const u=r.state??Pr;return rw(t,a,s,u)}function nw(t,n={}){const{className:r,style:a,render:s}=t,{state:u=Pr,ref:c,props:h,stateAttributesMapping:d,enabled:p=!0}=n,b=p?ew(r,u):void 0,g=p?tw(a,u):void 0,v=p?JE(u,d):Pr,_=p?zf(v,Array.isArray(h)?jE(h):h)??Pr:Pr;return typeof document<"u"&&(p?Array.isArray(c)?_.ref=XE([_.ref,Zb(s),...c]):_.ref=iu(_.ref,Zb(s),c):iu(null,null)),p?(b!==void 0&&(_.className=Qv(_.className,b)),g!==void 0&&(_.style=zf(_.style,g)),_):Pr}const iw=Symbol.for("react.lazy");function rw(t,n,r,a){if(n){if(typeof n=="function")return n(r,a);const s=Xv(r,n.props);s.ref=r.ref;let u=n;return u?.$$typeof===iw&&(u=R.Children.toArray(n)[0]),R.cloneElement(u,s)}if(t&&typeof t=="string")return aw(t,r);throw new Error($r(8))}function aw(t,n){return t==="button"?R.createElement("button",{type:"button",...n,key:n.key}):t==="img"?R.createElement("img",{alt:"",...n,key:n.key}):R.createElement(t,n)}const ow=R.forwardRef(function(n,r){const{render:a,className:s,disabled:u=!1,focusableWhenDisabled:c=!1,nativeButton:h=!0,...d}=n,{getButtonProps:p,buttonRef:b}=Kv({disabled:u,focusableWhenDisabled:c,native:h});return Wn("button",n,{state:{disabled:u},ref:[r,b],props:[d,p]})});function ey(t){var n,r,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(n=0;n<s;n++)t[n]&&(r=ey(t[n]))&&(a&&(a+=" "),a+=r)}else for(r in t)t[r]&&(a&&(a+=" "),a+=r);return a}function ty(){for(var t,n,r=0,a="",s=arguments.length;r<s;r++)(t=arguments[r])&&(n=ey(t))&&(a&&(a+=" "),a+=n);return a}const Jb=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,e0=ty,ny=(t,n)=>r=>{var a;if(n?.variants==null)return e0(t,r?.class,r?.className);const{variants:s,defaultVariants:u}=n,c=Object.keys(s).map(p=>{const b=r?.[p],g=u?.[p];if(b===null)return null;const v=Jb(b)||Jb(g);return s[p][v]}),h=r&&Object.entries(r).reduce((p,b)=>{let[g,v]=b;return v===void 0||(p[g]=v),p},{}),d=n==null||(a=n.compoundVariants)===null||a===void 0?void 0:a.reduce((p,b)=>{let{class:g,className:v,..._}=b;return Object.entries(_).every(x=>{let[T,O]=x;return Array.isArray(O)?O.includes({...u,...h}[T]):{...u,...h}[T]===O})?[...p,g,v]:p},[]);return e0(t,c,d,r?.class,r?.className)},lw=(t,n)=>{const r=new Array(t.length+n.length);for(let a=0;a<t.length;a++)r[a]=t[a];for(let a=0;a<n.length;a++)r[t.length+a]=n[a];return r},sw=(t,n)=>({classGroupId:t,validator:n}),iy=(t=new Map,n=null,r)=>({nextPart:t,validators:n,classGroupId:r}),ru="-",t0=[],uw="arbitrary..",cw=t=>{const n=fw(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=t;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return dw(c);const h=c.split(ru),d=h[0]===""&&h.length>1?1:0;return ry(h,d,n)},getConflictingClassGroupIds:(c,h)=>{if(h){const d=a[c],p=r[c];return d?p?lw(p,d):d:p||t0}return r[c]||t0}}},ry=(t,n,r)=>{if(t.length-n===0)return r.classGroupId;const s=t[n],u=r.nextPart.get(s);if(u){const p=ry(t,n+1,u);if(p)return p}const c=r.validators;if(c===null)return;const h=n===0?t.join(ru):t.slice(n).join(ru),d=c.length;for(let p=0;p<d;p++){const b=c[p];if(b.validator(h))return b.classGroupId}},dw=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=t.slice(1,-1),r=n.indexOf(":"),a=n.slice(0,r);return a?uw+a:void 0})(),fw=t=>{const{theme:n,classGroups:r}=t;return hw(r,n)},hw=(t,n)=>{const r=iy();for(const a in t){const s=t[a];hh(s,r,a,n)}return r},hh=(t,n,r,a)=>{const s=t.length;for(let u=0;u<s;u++){const c=t[u];mw(c,n,r,a)}},mw=(t,n,r,a)=>{if(typeof t=="string"){pw(t,n,r);return}if(typeof t=="function"){gw(t,n,r,a);return}bw(t,n,r,a)},pw=(t,n,r)=>{const a=t===""?n:ay(n,t);a.classGroupId=r},gw=(t,n,r,a)=>{if(vw(t)){hh(t(a),n,r,a);return}n.validators===null&&(n.validators=[]),n.validators.push(sw(r,t))},bw=(t,n,r,a)=>{const s=Object.entries(t),u=s.length;for(let c=0;c<u;c++){const[h,d]=s[c];hh(d,ay(n,h),r,a)}},ay=(t,n)=>{let r=t;const a=n.split(ru),s=a.length;for(let u=0;u<s;u++){const c=a[u];let h=r.nextPart.get(c);h||(h=iy(),r.nextPart.set(c,h)),r=h}return r},vw=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,yw=t=>{if(t<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),a=Object.create(null);const s=(u,c)=>{r[u]=c,n++,n>t&&(n=0,a=r,r=Object.create(null))};return{get(u){let c=r[u];if(c!==void 0)return c;if((c=a[u])!==void 0)return s(u,c),c},set(u,c){u in r?r[u]=c:s(u,c)}}},Uf="!",n0=":",_w=[],i0=(t,n,r,a,s)=>({modifiers:t,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:a,isExternal:s}),xw=t=>{const{prefix:n,experimentalParseClassName:r}=t;let a=s=>{const u=[];let c=0,h=0,d=0,p;const b=s.length;for(let T=0;T<b;T++){const O=s[T];if(c===0&&h===0){if(O===n0){u.push(s.slice(d,T)),d=T+1;continue}if(O==="/"){p=T;continue}}O==="["?c++:O==="]"?c--:O==="("?h++:O===")"&&h--}const g=u.length===0?s:s.slice(d);let v=g,_=!1;g.endsWith(Uf)?(v=g.slice(0,-1),_=!0):g.startsWith(Uf)&&(v=g.slice(1),_=!0);const x=p&&p>d?p-d:void 0;return i0(u,_,v,x)};if(n){const s=n+n0,u=a;a=c=>c.startsWith(s)?u(c.slice(s.length)):i0(_w,!1,c,void 0,!0)}if(r){const s=a;a=u=>r({className:u,parseClassName:s})}return a},Sw=t=>{const n=new Map;return t.orderSensitiveModifiers.forEach((r,a)=>{n.set(r,1e6+a)}),r=>{const a=[];let s=[];for(let u=0;u<r.length;u++){const c=r[u],h=c[0]==="[",d=n.has(c);h||d?(s.length>0&&(s.sort(),a.push(...s),s=[]),a.push(c)):s.push(c)}return s.length>0&&(s.sort(),a.push(...s)),a}},Ew=t=>({cache:yw(t.cacheSize),parseClassName:xw(t),sortModifiers:Sw(t),...cw(t)}),ww=/\s+/,Cw=(t,n)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:u}=n,c=[],h=t.trim().split(ww);let d="";for(let p=h.length-1;p>=0;p-=1){const b=h[p],{isExternal:g,modifiers:v,hasImportantModifier:_,baseClassName:x,maybePostfixModifierPosition:T}=r(b);if(g){d=b+(d.length>0?" "+d:d);continue}let O=!!T,A=a(O?x.substring(0,T):x);if(!A){if(!O){d=b+(d.length>0?" "+d:d);continue}if(A=a(x),!A){d=b+(d.length>0?" "+d:d);continue}O=!1}const C=v.length===0?"":v.length===1?v[0]:u(v).join(":"),k=_?C+Uf:C,I=k+A;if(c.indexOf(I)>-1)continue;c.push(I);const M=s(A,O);for(let U=0;U<M.length;++U){const H=M[U];c.push(k+H)}d=b+(d.length>0?" "+d:d)}return d},Aw=(...t)=>{let n=0,r,a,s="";for(;n<t.length;)(r=t[n++])&&(a=oy(r))&&(s&&(s+=" "),s+=a);return s},oy=t=>{if(typeof t=="string")return t;let n,r="";for(let a=0;a<t.length;a++)t[a]&&(n=oy(t[a]))&&(r&&(r+=" "),r+=n);return r},kw=(t,...n)=>{let r,a,s,u;const c=d=>{const p=n.reduce((b,g)=>g(b),t());return r=Ew(p),a=r.cache.get,s=r.cache.set,u=h,h(d)},h=d=>{const p=a(d);if(p)return p;const b=Cw(d,r);return s(d,b),b};return u=c,(...d)=>u(Aw(...d))},Tw=[],Tt=t=>{const n=r=>r[t]||Tw;return n.isThemeGetter=!0,n},ly=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Rw=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Lw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Nw=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Mw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ow=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Dw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,lr=t=>Rw.test(t),Ie=t=>!!t&&!Number.isNaN(Number(t)),sr=t=>!!t&&Number.isInteger(Number(t)),nf=t=>t.endsWith("%")&&Ie(t.slice(0,-1)),Ai=t=>Lw.test(t),uy=()=>!0,Iw=t=>Nw.test(t)&&!Mw.test(t),mh=()=>!1,zw=t=>Ow.test(t),Pw=t=>Dw.test(t),jw=t=>!_e(t)&&!xe(t),Uw=t=>mr(t,fy,mh),_e=t=>ly.test(t),Dr=t=>mr(t,hy,Iw),r0=t=>mr(t,Fw,Ie),Hw=t=>mr(t,py,uy),Bw=t=>mr(t,my,mh),a0=t=>mr(t,cy,mh),Vw=t=>mr(t,dy,Pw),Rs=t=>mr(t,gy,zw),xe=t=>sy.test(t),Fo=t=>qr(t,hy),Gw=t=>qr(t,my),o0=t=>qr(t,cy),$w=t=>qr(t,fy),qw=t=>qr(t,dy),Ls=t=>qr(t,gy,!0),Yw=t=>qr(t,py,!0),mr=(t,n,r)=>{const a=ly.exec(t);return a?a[1]?n(a[1]):r(a[2]):!1},qr=(t,n,r=!1)=>{const a=sy.exec(t);return a?a[1]?n(a[1]):r:!1},cy=t=>t==="position"||t==="percentage",dy=t=>t==="image"||t==="url",fy=t=>t==="length"||t==="size"||t==="bg-size",hy=t=>t==="length",Fw=t=>t==="number",my=t=>t==="family-name",py=t=>t==="number"||t==="weight",gy=t=>t==="shadow",Xw=()=>{const t=Tt("color"),n=Tt("font"),r=Tt("text"),a=Tt("font-weight"),s=Tt("tracking"),u=Tt("leading"),c=Tt("breakpoint"),h=Tt("container"),d=Tt("spacing"),p=Tt("radius"),b=Tt("shadow"),g=Tt("inset-shadow"),v=Tt("text-shadow"),_=Tt("drop-shadow"),x=Tt("blur"),T=Tt("perspective"),O=Tt("aspect"),A=Tt("ease"),C=Tt("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...I(),xe,_e],U=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto","contain","none"],z=()=>[xe,_e,d],Q=()=>[lr,"full","auto",...z()],ee=()=>[sr,"none","subgrid",xe,_e],ie=()=>["auto",{span:["full",sr,xe,_e]},sr,xe,_e],V=()=>[sr,"auto",xe,_e],K=()=>["auto","min","max","fr",xe,_e],oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...z()],P=()=>[lr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],X=()=>[lr,"screen","full","dvw","lvw","svw","min","max","fit",...z()],he=()=>[lr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],Z=()=>[t,xe,_e],L=()=>[...I(),o0,a0,{position:[xe,_e]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",$w,Uw,{size:[xe,_e]}],re=()=>[nf,Fo,Dr],le=()=>["","none","full",p,xe,_e],ce=()=>["",Ie,Fo,Dr],me=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],pe=()=>[Ie,nf,o0,a0],ne=()=>["","none",x,xe,_e],ve=()=>["none",Ie,xe,_e],Ae=()=>["none",Ie,xe,_e],Ee=()=>[Ie,xe,_e],Ge=()=>[lr,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ai],breakpoint:[Ai],color:[uy],container:[Ai],"drop-shadow":[Ai],ease:["in","out","in-out"],font:[jw],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ai],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ai],shadow:[Ai],spacing:["px",Ie],text:[Ai],"text-shadow":[Ai],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",lr,_e,xe,O]}],container:["container"],columns:[{columns:[Ie,_e,xe,h]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{"inset-s":Q(),start:Q()}],end:[{"inset-e":Q(),end:Q()}],"inset-bs":[{"inset-bs":Q()}],"inset-be":[{"inset-be":Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[sr,"auto",xe,_e]}],basis:[{basis:[lr,"full","auto",h,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ie,lr,"auto","initial","none",_e]}],grow:[{grow:["",Ie,xe,_e]}],shrink:[{shrink:["",Ie,xe,_e]}],order:[{order:[sr,"first","last","none",xe,_e]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:ie()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:ie()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...oe(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...oe()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":oe()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],"inline-size":[{inline:["auto",...X()]}],"min-inline-size":[{"min-inline":["auto",...X()]}],"max-inline-size":[{"max-inline":["none",...X()]}],"block-size":[{block:["auto",...he()]}],"min-block-size":[{"min-block":["auto",...he()]}],"max-block-size":[{"max-block":["none",...he()]}],w:[{w:[h,"screen",...P()]}],"min-w":[{"min-w":[h,"screen","none",...P()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[c]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",r,Fo,Dr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Yw,Hw]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",nf,_e]}],"font-family":[{font:[Gw,Bw,n]}],"font-features":[{"font-features":[_e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,xe,_e]}],"line-clamp":[{"line-clamp":[Ie,"none",xe,r0]}],leading:[{leading:[u,...z()]}],"list-image":[{"list-image":["none",xe,_e]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xe,_e]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Z()}],"text-color":[{text:Z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ie,"from-font","auto",xe,Dr]}],"text-decoration-color":[{decoration:Z()}],"underline-offset":[{"underline-offset":[Ie,"auto",xe,_e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe,_e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xe,_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},sr,xe,_e],radial:["",xe,_e],conic:[sr,xe,_e]},qw,Vw]}],"bg-color":[{bg:Z()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:Z()}],"gradient-via":[{via:Z()}],"gradient-to":[{to:Z()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:Z()}],"border-color-x":[{"border-x":Z()}],"border-color-y":[{"border-y":Z()}],"border-color-s":[{"border-s":Z()}],"border-color-e":[{"border-e":Z()}],"border-color-bs":[{"border-bs":Z()}],"border-color-be":[{"border-be":Z()}],"border-color-t":[{"border-t":Z()}],"border-color-r":[{"border-r":Z()}],"border-color-b":[{"border-b":Z()}],"border-color-l":[{"border-l":Z()}],"divide-color":[{divide:Z()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ie,xe,_e]}],"outline-w":[{outline:["",Ie,Fo,Dr]}],"outline-color":[{outline:Z()}],shadow:[{shadow:["","none",b,Ls,Rs]}],"shadow-color":[{shadow:Z()}],"inset-shadow":[{"inset-shadow":["none",g,Ls,Rs]}],"inset-shadow-color":[{"inset-shadow":Z()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Z()}],"ring-offset-w":[{"ring-offset":[Ie,Dr]}],"ring-offset-color":[{"ring-offset":Z()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":Z()}],"text-shadow":[{"text-shadow":["none",v,Ls,Rs]}],"text-shadow-color":[{"text-shadow":Z()}],opacity:[{opacity:[Ie,xe,_e]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ie]}],"mask-image-linear-from-pos":[{"mask-linear-from":pe()}],"mask-image-linear-to-pos":[{"mask-linear-to":pe()}],"mask-image-linear-from-color":[{"mask-linear-from":Z()}],"mask-image-linear-to-color":[{"mask-linear-to":Z()}],"mask-image-t-from-pos":[{"mask-t-from":pe()}],"mask-image-t-to-pos":[{"mask-t-to":pe()}],"mask-image-t-from-color":[{"mask-t-from":Z()}],"mask-image-t-to-color":[{"mask-t-to":Z()}],"mask-image-r-from-pos":[{"mask-r-from":pe()}],"mask-image-r-to-pos":[{"mask-r-to":pe()}],"mask-image-r-from-color":[{"mask-r-from":Z()}],"mask-image-r-to-color":[{"mask-r-to":Z()}],"mask-image-b-from-pos":[{"mask-b-from":pe()}],"mask-image-b-to-pos":[{"mask-b-to":pe()}],"mask-image-b-from-color":[{"mask-b-from":Z()}],"mask-image-b-to-color":[{"mask-b-to":Z()}],"mask-image-l-from-pos":[{"mask-l-from":pe()}],"mask-image-l-to-pos":[{"mask-l-to":pe()}],"mask-image-l-from-color":[{"mask-l-from":Z()}],"mask-image-l-to-color":[{"mask-l-to":Z()}],"mask-image-x-from-pos":[{"mask-x-from":pe()}],"mask-image-x-to-pos":[{"mask-x-to":pe()}],"mask-image-x-from-color":[{"mask-x-from":Z()}],"mask-image-x-to-color":[{"mask-x-to":Z()}],"mask-image-y-from-pos":[{"mask-y-from":pe()}],"mask-image-y-to-pos":[{"mask-y-to":pe()}],"mask-image-y-from-color":[{"mask-y-from":Z()}],"mask-image-y-to-color":[{"mask-y-to":Z()}],"mask-image-radial":[{"mask-radial":[xe,_e]}],"mask-image-radial-from-pos":[{"mask-radial-from":pe()}],"mask-image-radial-to-pos":[{"mask-radial-to":pe()}],"mask-image-radial-from-color":[{"mask-radial-from":Z()}],"mask-image-radial-to-color":[{"mask-radial-to":Z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":I()}],"mask-image-conic-pos":[{"mask-conic":[Ie]}],"mask-image-conic-from-pos":[{"mask-conic-from":pe()}],"mask-image-conic-to-pos":[{"mask-conic-to":pe()}],"mask-image-conic-from-color":[{"mask-conic-from":Z()}],"mask-image-conic-to-color":[{"mask-conic-to":Z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xe,_e]}],filter:[{filter:["","none",xe,_e]}],blur:[{blur:ne()}],brightness:[{brightness:[Ie,xe,_e]}],contrast:[{contrast:[Ie,xe,_e]}],"drop-shadow":[{"drop-shadow":["","none",_,Ls,Rs]}],"drop-shadow-color":[{"drop-shadow":Z()}],grayscale:[{grayscale:["",Ie,xe,_e]}],"hue-rotate":[{"hue-rotate":[Ie,xe,_e]}],invert:[{invert:["",Ie,xe,_e]}],saturate:[{saturate:[Ie,xe,_e]}],sepia:[{sepia:["",Ie,xe,_e]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,_e]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[Ie,xe,_e]}],"backdrop-contrast":[{"backdrop-contrast":[Ie,xe,_e]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ie,xe,_e]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ie,xe,_e]}],"backdrop-invert":[{"backdrop-invert":["",Ie,xe,_e]}],"backdrop-opacity":[{"backdrop-opacity":[Ie,xe,_e]}],"backdrop-saturate":[{"backdrop-saturate":[Ie,xe,_e]}],"backdrop-sepia":[{"backdrop-sepia":["",Ie,xe,_e]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",xe,_e]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ie,"initial",xe,_e]}],ease:[{ease:["linear","initial",A,xe,_e]}],delay:[{delay:[Ie,xe,_e]}],animate:[{animate:["none",C,xe,_e]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[T,xe,_e]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:ve()}],"rotate-x":[{"rotate-x":ve()}],"rotate-y":[{"rotate-y":ve()}],"rotate-z":[{"rotate-z":ve()}],scale:[{scale:Ae()}],"scale-x":[{"scale-x":Ae()}],"scale-y":[{"scale-y":Ae()}],"scale-z":[{"scale-z":Ae()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[xe,_e,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ge()}],"translate-x":[{"translate-x":Ge()}],"translate-y":[{"translate-y":Ge()}],"translate-z":[{"translate-z":Ge()}],"translate-none":["translate-none"],accent:[{accent:Z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",xe,_e]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",xe,_e]}],fill:[{fill:["none",...Z()]}],"stroke-w":[{stroke:[Ie,Fo,Dr,r0]}],stroke:[{stroke:["none",...Z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ww=kw(Xw);function He(...t){return Ww(ty(t))}const Qw=ny("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function zn({className:t,variant:n="default",size:r="default",...a}){return E.jsx(ow,{"data-slot":"button",className:He(Qw({variant:n,size:r,className:t})),...a})}var by=Bv();const Kw=dh(by);function Zw(t){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}const Jw=t=>{switch(t){case"success":return nC;case"info":return rC;case"warning":return iC;case"error":return aC;default:return null}},eC=Array(12).fill(0),tC=({visible:t,className:n})=>fe.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":t},fe.createElement("div",{className:"sonner-spinner"},eC.map((r,a)=>fe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),nC=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),iC=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),rC=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),aC=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},fe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),oC=fe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},fe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),fe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),lC=()=>{const[t,n]=fe.useState(document.hidden);return fe.useEffect(()=>{const r=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t};let Hf=1;class sC{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{const r=this.subscribers.indexOf(n);this.subscribers.splice(r,1)}),this.publish=n=>{this.subscribers.forEach(r=>r(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var r;const{message:a,...s}=n,u=typeof n?.id=="number"||((r=n.id)==null?void 0:r.length)>0?n.id:Hf++,c=this.toasts.find(d=>d.id===u),h=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),c?this.toasts=this.toasts.map(d=>d.id===u?(this.publish({...d,...n,id:u,title:a}),{...d,...n,id:u,dismissible:h,title:a}):d):this.addToast({title:a,...s,dismissible:h,id:u}),u},this.dismiss=n=>(n?(this.dismissedToasts.add(n),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:n,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(a=>a({id:r.id,dismiss:!0}))}),n),this.message=(n,r)=>this.create({...r,message:n}),this.error=(n,r)=>this.create({...r,message:n,type:"error"}),this.success=(n,r)=>this.create({...r,type:"success",message:n}),this.info=(n,r)=>this.create({...r,type:"info",message:n}),this.warning=(n,r)=>this.create({...r,type:"warning",message:n}),this.loading=(n,r)=>this.create({...r,type:"loading",message:n}),this.promise=(n,r)=>{if(!r)return;let a;r.loading!==void 0&&(a=this.create({...r,promise:n,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const s=Promise.resolve(n instanceof Function?n():n);let u=a!==void 0,c;const h=s.then(async p=>{if(c=["resolve",p],fe.isValidElement(p))u=!1,this.create({id:a,type:"default",message:p});else if(cC(p)&&!p.ok){u=!1;const g=typeof r.error=="function"?await r.error(`HTTP error! status: ${p.status}`):r.error,v=typeof r.description=="function"?await r.description(`HTTP error! status: ${p.status}`):r.description,x=typeof g=="object"&&!fe.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:v,...x})}else if(p instanceof Error){u=!1;const g=typeof r.error=="function"?await r.error(p):r.error,v=typeof r.description=="function"?await r.description(p):r.description,x=typeof g=="object"&&!fe.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:v,...x})}else if(r.success!==void 0){u=!1;const g=typeof r.success=="function"?await r.success(p):r.success,v=typeof r.description=="function"?await r.description(p):r.description,x=typeof g=="object"&&!fe.isValidElement(g)?g:{message:g};this.create({id:a,type:"success",description:v,...x})}}).catch(async p=>{if(c=["reject",p],r.error!==void 0){u=!1;const b=typeof r.error=="function"?await r.error(p):r.error,g=typeof r.description=="function"?await r.description(p):r.description,_=typeof b=="object"&&!fe.isValidElement(b)?b:{message:b};this.create({id:a,type:"error",description:g,..._})}}).finally(()=>{u&&(this.dismiss(a),a=void 0),r.finally==null||r.finally.call(r)}),d=()=>new Promise((p,b)=>h.then(()=>c[0]==="reject"?b(c[1]):p(c[1])).catch(b));return typeof a!="string"&&typeof a!="number"?{unwrap:d}:Object.assign(a,{unwrap:d})},this.custom=(n,r)=>{const a=r?.id||Hf++;return this.create({jsx:n(a),id:a,...r}),a},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const cn=new sC,uC=(t,n)=>{const r=n?.id||Hf++;return cn.addToast({title:t,...n,id:r}),r},cC=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",dC=uC,fC=()=>cn.toasts,hC=()=>cn.getActiveToasts(),l0=Object.assign(dC,{success:cn.success,info:cn.info,warning:cn.warning,error:cn.error,custom:cn.custom,message:cn.message,promise:cn.promise,dismiss:cn.dismiss,loading:cn.loading},{getHistory:fC,getToasts:hC});Zw("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Ns(t){return t.label!==void 0}const mC=3,pC="24px",gC="16px",s0=4e3,bC=356,vC=14,yC=45,_C=200;function ni(...t){return t.filter(Boolean).join(" ")}function xC(t){const[n,r]=t.split("-"),a=[];return n&&a.push(n),r&&a.push(r),a}const SC=t=>{var n,r,a,s,u,c,h,d,p;const{invert:b,toast:g,unstyled:v,interacting:_,setHeights:x,visibleToasts:T,heights:O,index:A,toasts:C,expanded:k,removeToast:I,defaultRichColors:M,closeButton:U,style:H,cancelButtonStyle:z,actionButtonStyle:Q,className:ee="",descriptionClassName:ie="",duration:V,position:K,gap:oe,expandByDefault:te,classNames:N,icons:P,closeButtonAriaLabel:X="Close toast"}=t,[he,Z]=fe.useState(null),[L,Y]=fe.useState(null),[W,re]=fe.useState(!1),[le,ce]=fe.useState(!1),[me,ge]=fe.useState(!1),[pe,ne]=fe.useState(!1),[ve,Ae]=fe.useState(!1),[Ee,Ge]=fe.useState(0),[Xe,st]=fe.useState(0),dt=fe.useRef(g.duration||V||s0),Xt=fe.useRef(null),G=fe.useRef(null),we=A===0,it=A+1<=T,$e=g.type,Wt=g.dismissible!==!1,Ct=g.className||"",oi=g.descriptionClassName||"",Qt=fe.useMemo(()=>O.findIndex(Te=>Te.toastId===g.id)||0,[O,g.id]),Qn=fe.useMemo(()=>{var Te;return(Te=g.closeButton)!=null?Te:U},[g.closeButton,U]),fn=fe.useMemo(()=>g.duration||V||s0,[g.duration,V]),hn=fe.useRef(0),Pt=fe.useRef(0),pr=fe.useRef(0),Kn=fe.useRef(null),[li,Mt]=K.split("-"),Kt=fe.useMemo(()=>O.reduce((Te,We,Re)=>Re>=Qt?Te:Te+We.height,0),[O,Qt]),At=lC(),Fr=g.invert||b,Di=$e==="loading";Pt.current=fe.useMemo(()=>Qt*oe+Kt,[Qt,Kt]),fe.useEffect(()=>{dt.current=fn},[fn]),fe.useEffect(()=>{re(!0)},[]),fe.useEffect(()=>{const Te=G.current;if(Te){const We=Te.getBoundingClientRect().height;return st(We),x(Re=>[{toastId:g.id,height:We,position:g.position},...Re]),()=>x(Re=>Re.filter(ut=>ut.toastId!==g.id))}},[x,g.id]),fe.useLayoutEffect(()=>{if(!W)return;const Te=G.current,We=Te.style.height;Te.style.height="auto";const Re=Te.getBoundingClientRect().height;Te.style.height=We,st(Re),x(ut=>ut.find(tt=>tt.toastId===g.id)?ut.map(tt=>tt.toastId===g.id?{...tt,height:Re}:tt):[{toastId:g.id,height:Re,position:g.position},...ut])},[W,g.title,g.description,x,g.id,g.jsx,g.action,g.cancel]);const mn=fe.useCallback(()=>{ce(!0),Ge(Pt.current),x(Te=>Te.filter(We=>We.toastId!==g.id)),setTimeout(()=>{I(g)},_C)},[g,I,x,Pt]);fe.useEffect(()=>{if(g.promise&&$e==="loading"||g.duration===1/0||g.type==="loading")return;let Te;return k||_||At?(()=>{if(pr.current<hn.current){const ut=new Date().getTime()-hn.current;dt.current=dt.current-ut}pr.current=new Date().getTime()})():dt.current!==1/0&&(hn.current=new Date().getTime(),Te=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),mn()},dt.current)),()=>clearTimeout(Te)},[k,_,g,$e,At,mn]),fe.useEffect(()=>{g.delete&&(mn(),g.onDismiss==null||g.onDismiss.call(g,g))},[mn,g.delete]);function Ii(){var Te;if(P?.loading){var We;return fe.createElement("div",{className:ni(N?.loader,g==null||(We=g.classNames)==null?void 0:We.loader,"sonner-loader"),"data-visible":$e==="loading"},P.loading)}return fe.createElement(tC,{className:ni(N?.loader,g==null||(Te=g.classNames)==null?void 0:Te.loader),visible:$e==="loading"})}const zi=g.icon||P?.[$e]||Jw($e);var Un,Zt;return fe.createElement("li",{tabIndex:0,ref:G,className:ni(ee,Ct,N?.toast,g==null||(n=g.classNames)==null?void 0:n.toast,N?.default,N?.[$e],g==null||(r=g.classNames)==null?void 0:r[$e]),"data-sonner-toast":"","data-rich-colors":(Un=g.richColors)!=null?Un:M,"data-styled":!(g.jsx||g.unstyled||v),"data-mounted":W,"data-promise":!!g.promise,"data-swiped":ve,"data-removed":le,"data-visible":it,"data-y-position":li,"data-x-position":Mt,"data-index":A,"data-front":we,"data-swiping":me,"data-dismissible":Wt,"data-type":$e,"data-invert":Fr,"data-swipe-out":pe,"data-swipe-direction":L,"data-expanded":!!(k||te&&W),"data-testid":g.testId,style:{"--index":A,"--toasts-before":A,"--z-index":C.length-A,"--offset":`${le?Ee:Pt.current}px`,"--initial-height":te?"auto":`${Xe}px`,...H,...g.style},onDragEnd:()=>{ge(!1),Z(null),Kn.current=null},onPointerDown:Te=>{Te.button!==2&&(Di||!Wt||(Xt.current=new Date,Ge(Pt.current),Te.target.setPointerCapture(Te.pointerId),Te.target.tagName!=="BUTTON"&&(ge(!0),Kn.current={x:Te.clientX,y:Te.clientY})))},onPointerUp:()=>{var Te,We,Re;if(pe||!Wt)return;Kn.current=null;const ut=Number(((Te=G.current)==null?void 0:Te.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),pn=Number(((We=G.current)==null?void 0:We.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),tt=new Date().getTime()-((Re=Xt.current)==null?void 0:Re.getTime()),Jt=he==="x"?ut:pn,gr=Math.abs(Jt)/tt;if(Math.abs(Jt)>=yC||gr>.11){Ge(Pt.current),g.onDismiss==null||g.onDismiss.call(g,g),Y(he==="x"?ut>0?"right":"left":pn>0?"down":"up"),mn(),ne(!0);return}else{var en,tn;(en=G.current)==null||en.style.setProperty("--swipe-amount-x","0px"),(tn=G.current)==null||tn.style.setProperty("--swipe-amount-y","0px")}Ae(!1),ge(!1),Z(null)},onPointerMove:Te=>{var We,Re,ut;if(!Kn.current||!Wt||((We=window.getSelection())==null?void 0:We.toString().length)>0)return;const tt=Te.clientY-Kn.current.y,Jt=Te.clientX-Kn.current.x;var gr;const en=(gr=t.swipeDirections)!=null?gr:xC(K);!he&&(Math.abs(Jt)>1||Math.abs(tt)>1)&&Z(Math.abs(Jt)>Math.abs(tt)?"x":"y");let tn={x:0,y:0};const Xr=Hn=>1/(1.5+Math.abs(Hn)/20);if(he==="y"){if(en.includes("top")||en.includes("bottom"))if(en.includes("top")&&tt<0||en.includes("bottom")&&tt>0)tn.y=tt;else{const Hn=tt*Xr(tt);tn.y=Math.abs(Hn)<Math.abs(tt)?Hn:tt}}else if(he==="x"&&(en.includes("left")||en.includes("right")))if(en.includes("left")&&Jt<0||en.includes("right")&&Jt>0)tn.x=Jt;else{const Hn=Jt*Xr(Jt);tn.x=Math.abs(Hn)<Math.abs(Jt)?Hn:Jt}(Math.abs(tn.x)>0||Math.abs(tn.y)>0)&&Ae(!0),(Re=G.current)==null||Re.style.setProperty("--swipe-amount-x",`${tn.x}px`),(ut=G.current)==null||ut.style.setProperty("--swipe-amount-y",`${tn.y}px`)}},Qn&&!g.jsx&&$e!=="loading"?fe.createElement("button",{"aria-label":X,"data-disabled":Di,"data-close-button":!0,onClick:Di||!Wt?()=>{}:()=>{mn(),g.onDismiss==null||g.onDismiss.call(g,g)},className:ni(N?.closeButton,g==null||(a=g.classNames)==null?void 0:a.closeButton)},(Zt=P?.close)!=null?Zt:oC):null,($e||g.icon||g.promise)&&g.icon!==null&&(P?.[$e]!==null||g.icon)?fe.createElement("div",{"data-icon":"",className:ni(N?.icon,g==null||(s=g.classNames)==null?void 0:s.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Ii():null,g.type!=="loading"?zi:null):null,fe.createElement("div",{"data-content":"",className:ni(N?.content,g==null||(u=g.classNames)==null?void 0:u.content)},fe.createElement("div",{"data-title":"",className:ni(N?.title,g==null||(c=g.classNames)==null?void 0:c.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?fe.createElement("div",{"data-description":"",className:ni(ie,oi,N?.description,g==null||(h=g.classNames)==null?void 0:h.description)},typeof g.description=="function"?g.description():g.description):null),fe.isValidElement(g.cancel)?g.cancel:g.cancel&&Ns(g.cancel)?fe.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||z,onClick:Te=>{Ns(g.cancel)&&Wt&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,Te),mn())},className:ni(N?.cancelButton,g==null||(d=g.classNames)==null?void 0:d.cancelButton)},g.cancel.label):null,fe.isValidElement(g.action)?g.action:g.action&&Ns(g.action)?fe.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||Q,onClick:Te=>{Ns(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,Te),!Te.defaultPrevented&&mn())},className:ni(N?.actionButton,g==null||(p=g.classNames)==null?void 0:p.actionButton)},g.action.label):null)};function u0(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function EC(t,n){const r={};return[t,n].forEach((a,s)=>{const u=s===1,c=u?"--mobile-offset":"--offset",h=u?gC:pC;function d(p){["top","right","bottom","left"].forEach(b=>{r[`${c}-${b}`]=typeof p=="number"?`${p}px`:p})}typeof a=="number"||typeof a=="string"?d(a):typeof a=="object"?["top","right","bottom","left"].forEach(p=>{a[p]===void 0?r[`${c}-${p}`]=h:r[`${c}-${p}`]=typeof a[p]=="number"?`${a[p]}px`:a[p]}):d(h)}),r}const wC=fe.forwardRef(function(n,r){const{id:a,invert:s,position:u="bottom-right",hotkey:c=["altKey","KeyT"],expand:h,closeButton:d,className:p,offset:b,mobileOffset:g,theme:v="light",richColors:_,duration:x,style:T,visibleToasts:O=mC,toastOptions:A,dir:C=u0(),gap:k=vC,icons:I,containerAriaLabel:M="Notifications"}=n,[U,H]=fe.useState([]),z=fe.useMemo(()=>a?U.filter(W=>W.toasterId===a):U.filter(W=>!W.toasterId),[U,a]),Q=fe.useMemo(()=>Array.from(new Set([u].concat(z.filter(W=>W.position).map(W=>W.position)))),[z,u]),[ee,ie]=fe.useState([]),[V,K]=fe.useState(!1),[oe,te]=fe.useState(!1),[N,P]=fe.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),X=fe.useRef(null),he=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),Z=fe.useRef(null),L=fe.useRef(!1),Y=fe.useCallback(W=>{H(re=>{var le;return(le=re.find(ce=>ce.id===W.id))!=null&&le.delete||cn.dismiss(W.id),re.filter(({id:ce})=>ce!==W.id)})},[]);return fe.useEffect(()=>cn.subscribe(W=>{if(W.dismiss){requestAnimationFrame(()=>{H(re=>re.map(le=>le.id===W.id?{...le,delete:!0}:le))});return}setTimeout(()=>{Kw.flushSync(()=>{H(re=>{const le=re.findIndex(ce=>ce.id===W.id);return le!==-1?[...re.slice(0,le),{...re[le],...W},...re.slice(le+1)]:[W,...re]})})})}),[U]),fe.useEffect(()=>{if(v!=="system"){P(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?P("dark"):P("light")),typeof window>"u")return;const W=window.matchMedia("(prefers-color-scheme: dark)");try{W.addEventListener("change",({matches:re})=>{P(re?"dark":"light")})}catch{W.addListener(({matches:le})=>{try{P(le?"dark":"light")}catch(ce){console.error(ce)}})}},[v]),fe.useEffect(()=>{U.length<=1&&K(!1)},[U]),fe.useEffect(()=>{const W=re=>{var le;if(c.every(ge=>re[ge]||re.code===ge)){var me;K(!0),(me=X.current)==null||me.focus()}re.code==="Escape"&&(document.activeElement===X.current||(le=X.current)!=null&&le.contains(document.activeElement))&&K(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[c]),fe.useEffect(()=>{if(X.current)return()=>{Z.current&&(Z.current.focus({preventScroll:!0}),Z.current=null,L.current=!1)}},[X.current]),fe.createElement("section",{ref:r,"aria-label":`${M} ${he}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Q.map((W,re)=>{var le;const[ce,me]=W.split("-");return z.length?fe.createElement("ol",{key:W,dir:C==="auto"?u0():C,tabIndex:-1,ref:X,className:p,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":ce,"data-x-position":me,style:{"--front-toast-height":`${((le=ee[0])==null?void 0:le.height)||0}px`,"--width":`${bC}px`,"--gap":`${k}px`,...T,...EC(b,g)},onBlur:ge=>{L.current&&!ge.currentTarget.contains(ge.relatedTarget)&&(L.current=!1,Z.current&&(Z.current.focus({preventScroll:!0}),Z.current=null))},onFocus:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||L.current||(L.current=!0,Z.current=ge.relatedTarget)},onMouseEnter:()=>K(!0),onMouseMove:()=>K(!0),onMouseLeave:()=>{oe||K(!1)},onDragEnd:()=>K(!1),onPointerDown:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||te(!0)},onPointerUp:()=>te(!1)},z.filter(ge=>!ge.position&&re===0||ge.position===W).map((ge,pe)=>{var ne,ve;return fe.createElement(SC,{key:ge.id,icons:I,index:pe,toast:ge,defaultRichColors:_,duration:(ne=A?.duration)!=null?ne:x,className:A?.className,descriptionClassName:A?.descriptionClassName,invert:s,visibleToasts:O,closeButton:(ve=A?.closeButton)!=null?ve:d,interacting:oe,position:W,style:A?.style,unstyled:A?.unstyled,classNames:A?.classNames,cancelButtonStyle:A?.cancelButtonStyle,actionButtonStyle:A?.actionButtonStyle,closeButtonAriaLabel:A?.closeButtonAriaLabel,removeToast:Y,toasts:z.filter(Ae=>Ae.position==ge.position),heights:ee.filter(Ae=>Ae.position==ge.position),setHeights:ie,expandByDefault:h,gap:k,expanded:V,swipeDirections:n.swipeDirections})})):null}))});function CC(t){return E.jsx(wC,{closeButton:!0,...t})}const AC=ny("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function Va({className:t,variant:n,...r}){return E.jsx("div",{"data-slot":"alert",role:"alert",className:He(AC({variant:n}),t),...r})}function Ga({className:t,...n}){return E.jsx("div",{"data-slot":"alert-title",className:He("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",t),...n})}function $a({className:t,...n}){return E.jsx("div",{"data-slot":"alert-description",className:He("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",t),...n})}const kC=[];function ph(t){R.useEffect(t,kC)}const Xo=0;class gh{static create(){return new gh}currentId=Xo;start(n,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Xo,r()},n)}isStarted(){return this.currentId!==Xo}clear=()=>{this.currentId!==Xo&&(clearTimeout(this.currentId),this.currentId=Xo)};disposeEffect=()=>this.clear}function au(){const t=Vr(gh.create).current;return ph(t.disposeEffect),t}const vy=R.createContext(void 0);function Au(){const t=R.useContext(vy);if(t===void 0)throw new Error($r(53));return t}let ou=(function(t){return t.scrollAreaCornerHeight="--scroll-area-corner-height",t.scrollAreaCornerWidth="--scroll-area-corner-width",t})({});const Ms=500,c0=16;function Pn(t,n,r){if(!t)return 0;const a=getComputedStyle(t),s=r==="x"?"Inline":"Block";return r==="x"&&n==="margin"?parseFloat(a[`${n}InlineStart`])*2:parseFloat(a[`${n}${s}Start`])+parseFloat(a[`${n}${s}End`])}let TC=(function(t){return t.orientation="data-orientation",t.hovering="data-hovering",t.scrolling="data-scrolling",t.hasOverflowX="data-has-overflow-x",t.hasOverflowY="data-has-overflow-y",t.overflowXStart="data-overflow-x-start",t.overflowXEnd="data-overflow-x-end",t.overflowYStart="data-overflow-y-start",t.overflowYEnd="data-overflow-y-end",t})({});const Os="base-ui-disable-scrollbar",yy={className:Os,getElement(t){return E.jsx("style",{nonce:t,href:Os,precedence:"base-ui:low",children:`.${Os}{scrollbar-width:none}.${Os}::-webkit-scrollbar{display:none}`})}};let d0=0;function RC(t,n="mui"){const[r,a]=R.useState(t),s=t||r;return R.useEffect(()=>{r==null&&(d0+=1,a(`${n}-${d0}`))},[r,n]),s}const f0=zE.useId;function LC(t,n){if(f0!==void 0){const r=f0();return`${n}-${r}`}return RC(t,n)}function lu(t){return LC(t,"base-ui")}let Oa=(function(t){return t.scrolling="data-scrolling",t.hasOverflowX="data-has-overflow-x",t.hasOverflowY="data-has-overflow-y",t.overflowXStart="data-overflow-x-start",t.overflowXEnd="data-overflow-x-end",t.overflowYStart="data-overflow-y-start",t.overflowYEnd="data-overflow-y-end",t})({});const bh={hasOverflowX:t=>t?{[Oa.hasOverflowX]:""}:null,hasOverflowY:t=>t?{[Oa.hasOverflowY]:""}:null,overflowXStart:t=>t?{[Oa.overflowXStart]:""}:null,overflowXEnd:t=>t?{[Oa.overflowXEnd]:""}:null,overflowYStart:t=>t?{[Oa.overflowYStart]:""}:null,overflowYEnd:t=>t?{[Oa.overflowYEnd]:""}:null,cornerHidden:()=>null},ku=typeof navigator<"u",rf=DC(),NC=zC(),MC=IC(),OC=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none");rf.platform==="MacIntel"&&rf.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(rf.platform);ku&&NC.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;MC.includes("jsdom/");function DC(){if(!ku)return{platform:"",maxTouchPoints:-1};const t=navigator.userAgentData;return t?.platform?{platform:t.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function IC(){if(!ku)return"";const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(({brand:n,version:r})=>`${n}/${r}`).join(" "):navigator.userAgent}function zC(){if(!ku)return"";const t=navigator.userAgentData;return t?.platform?t.platform:navigator.platform??""}function PC(t,n){if(!t||!n)return!1;const r=n.getRootNode?.();if(t.contains(n))return!0;if(r&&ME(r)){let a=n;for(;a;){if(t===a)return!0;a=a.parentNode||a.host}}return!1}function jC(t){t.preventDefault(),t.stopPropagation()}const UC=R.createContext(void 0),HC={disableStyleElements:!1};function BC(){return R.useContext(UC)??HC}const VC={x:0,y:0},h0={width:0,height:0},GC={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},$C={x:!0,y:!0,corner:!0},qC=R.forwardRef(function(n,r){const{render:a,className:s,overflowEdgeThreshold:u,...c}=n,h=YC(u),d=lu(),p=au(),b=au(),{nonce:g,disableStyleElements:v}=BC(),[_,x]=R.useState(!1),[T,O]=R.useState(!1),[A,C]=R.useState(!1),[k,I]=R.useState(!1),[M,U]=R.useState(!1),[H,z]=R.useState(h0),[Q,ee]=R.useState(h0),[ie,V]=R.useState(GC),[K,oe]=R.useState($C),te=R.useRef(null),N=R.useRef(null),P=R.useRef(null),X=R.useRef(null),he=R.useRef(null),Z=R.useRef(null),L=R.useRef(null),Y=R.useRef(!1),W=R.useRef(0),re=R.useRef(0),le=R.useRef(0),ce=R.useRef(0),me=R.useRef("vertical"),ge=R.useRef(VC),pe=Gt(G=>{const we=G.x-ge.current.x,it=G.y-ge.current.y;ge.current=G,it!==0&&(C(!0),p.start(Ms,()=>{C(!1)})),we!==0&&(O(!0),b.start(Ms,()=>{O(!1)}))}),ne=Gt(G=>{G.button===0&&(Y.current=!0,W.current=G.clientY,re.current=G.clientX,me.current=G.currentTarget.getAttribute(TC.orientation),N.current&&(le.current=N.current.scrollTop,ce.current=N.current.scrollLeft),he.current&&me.current==="vertical"&&he.current.setPointerCapture(G.pointerId),Z.current&&me.current==="horizontal"&&Z.current.setPointerCapture(G.pointerId))}),ve=Gt(G=>{if(!Y.current)return;const we=G.clientY-W.current,it=G.clientX-re.current;if(N.current){const $e=N.current.scrollHeight,Wt=N.current.clientHeight,Ct=N.current.scrollWidth,oi=N.current.clientWidth;if(he.current&&P.current&&me.current==="vertical"){const Qt=Pn(P.current,"padding","y"),Qn=Pn(he.current,"margin","y"),fn=he.current.offsetHeight,hn=P.current.offsetHeight-fn-Qt-Qn,Pt=we/hn;N.current.scrollTop=le.current+Pt*($e-Wt),G.preventDefault(),C(!0),p.start(Ms,()=>{C(!1)})}if(Z.current&&X.current&&me.current==="horizontal"){const Qt=Pn(X.current,"padding","x"),Qn=Pn(Z.current,"margin","x"),fn=Z.current.offsetWidth,hn=X.current.offsetWidth-fn-Qt-Qn,Pt=it/hn;N.current.scrollLeft=ce.current+Pt*(Ct-oi),G.preventDefault(),O(!0),b.start(Ms,()=>{O(!1)})}}}),Ae=Gt(G=>{Y.current=!1,he.current&&me.current==="vertical"&&he.current.releasePointerCapture(G.pointerId),Z.current&&me.current==="horizontal"&&Z.current.releasePointerCapture(G.pointerId)});function Ee(G){I(G.pointerType==="touch")}function Ge(G){if(Ee(G),G.pointerType!=="touch"){const we=PC(te.current,G.target);x(we)}}const Xe=R.useMemo(()=>({scrolling:T||A,hasOverflowX:!K.x,hasOverflowY:!K.y,overflowXStart:ie.xStart,overflowXEnd:ie.xEnd,overflowYStart:ie.yStart,overflowYEnd:ie.yEnd,cornerHidden:K.corner}),[T,A,K.x,K.y,K.corner,ie]),st={role:"presentation",onPointerEnter:Ge,onPointerMove:Ge,onPointerDown:Ee,onPointerLeave(){x(!1)},style:{position:"relative",[ou.scrollAreaCornerHeight]:`${H.height}px`,[ou.scrollAreaCornerWidth]:`${H.width}px`}},dt=Wn("div",n,{state:Xe,ref:[r,te],props:[st,c],stateAttributesMapping:bh}),Xt=R.useMemo(()=>({handlePointerDown:ne,handlePointerMove:ve,handlePointerUp:Ae,handleScroll:pe,cornerSize:H,setCornerSize:z,thumbSize:Q,setThumbSize:ee,hasMeasuredScrollbar:M,setHasMeasuredScrollbar:U,touchModality:k,cornerRef:L,scrollingX:T,setScrollingX:O,scrollingY:A,setScrollingY:C,hovering:_,setHovering:x,viewportRef:N,rootRef:te,scrollbarYRef:P,scrollbarXRef:X,thumbYRef:he,thumbXRef:Z,rootId:d,hiddenState:K,setHiddenState:oe,overflowEdges:ie,setOverflowEdges:V,viewportState:Xe,overflowEdgeThreshold:h}),[ne,ve,Ae,pe,H,Q,M,k,T,O,A,C,_,x,d,K,ie,Xe,h]);return E.jsxs(vy.Provider,{value:Xt,children:[!v&&yy.getElement(g),dt]})});function YC(t){if(typeof t=="number"){const n=Math.max(0,t);return{xStart:n,xEnd:n,yStart:n,yEnd:n}}return{xStart:Math.max(0,t?.xStart||0),xEnd:Math.max(0,t?.xEnd||0),yStart:Math.max(0,t?.yStart||0),yEnd:Math.max(0,t?.yEnd||0)}}const FC=R.createContext(void 0),XC=R.createContext(void 0);function vh(){return R.useContext(XC)?.direction??"ltr"}function ja(t,n=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(n,Math.min(t,r))}function WC(t,n){if(typeof IntersectionObserver>"u")return()=>{};const r=new IntersectionObserver(a=>{a.forEach(s=>{s.intersectionRatio>0&&(n(),r.disconnect())})});return r.observe(t),()=>{r.disconnect()}}let fr=(function(t){return t.scrollAreaOverflowXStart="--scroll-area-overflow-x-start",t.scrollAreaOverflowXEnd="--scroll-area-overflow-x-end",t.scrollAreaOverflowYStart="--scroll-area-overflow-y-start",t.scrollAreaOverflowYEnd="--scroll-area-overflow-y-end",t})({});const m0=1;function p0(t,n){if(n<=0)return 0;const r=ja(t,0,n),a=r,s=n-r,u=a<=m0,c=s<=m0;return u&&c?a<=s?0:n:u?0:c?n:r}let g0=!1;const b0=typeof ResizeObserver<"u";function QC(){g0||OC||(typeof CSS<"u"&&"registerProperty"in CSS&&[fr.scrollAreaOverflowXStart,fr.scrollAreaOverflowXEnd,fr.scrollAreaOverflowYStart,fr.scrollAreaOverflowYEnd].forEach(t=>{try{CSS.registerProperty({name:t,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),g0=!0)}const KC=R.forwardRef(function(n,r){const{render:a,className:s,...u}=n,{viewportRef:c,scrollbarYRef:h,scrollbarXRef:d,thumbYRef:p,thumbXRef:b,cornerRef:g,cornerSize:v,setCornerSize:_,setThumbSize:x,rootId:T,setHiddenState:O,hiddenState:A,setHasMeasuredScrollbar:C,handleScroll:k,setHovering:I,setOverflowEdges:M,overflowEdges:U,overflowEdgeThreshold:H,scrollingX:z,scrollingY:Q}=Au(),ee=vh(),ie=R.useRef(!0),V=R.useRef([NaN,NaN,NaN,NaN]),K=au(),oe=au(),te=Gt(()=>{const L=c.current,Y=h.current,W=d.current,re=p.current,le=b.current,ce=g.current;if(!L)return;const me=L.scrollHeight,ge=L.scrollWidth,pe=L.clientHeight,ne=L.clientWidth,ve=L.scrollTop,Ae=L.scrollLeft,Ee=V.current,Ge=Number.isNaN(Ee[0]);if(Ee[0]=pe,Ee[1]=me,Ee[2]=ne,Ee[3]=ge,Ge&&C(!0),me===0||ge===0)return;const Xe=ZC(L),st=Xe.y,dt=Xe.x,Xt=ne/ge,G=pe/me,we=Math.max(0,ge-ne),it=Math.max(0,me-pe);let $e=0,Wt=0;if(!dt){let Re=0;ee==="rtl"?Re=ja(-Ae,0,we):Re=ja(Ae,0,we),$e=p0(Re,we),Wt=we-$e}const Ct=st?0:ja(ve,0,it),oi=st?0:p0(Ct,it),Qt=st?0:it-oi,Qn=dt?0:ne,fn=st?0:pe;let hn=0,Pt=0;!dt&&!st&&(hn=Y?.offsetWidth||0,Pt=W?.offsetHeight||0);const pr=v.width===0&&v.height===0,Kn=pr?hn:0,li=pr?Pt:0,Mt=Pn(W,"padding","x"),Kt=Pn(Y,"padding","y"),At=Pn(le,"margin","x"),Fr=Pn(re,"margin","y"),Di=Qn-Mt-At,mn=fn-Kt-Fr,Ii=W?Math.min(W.offsetWidth-Kn,Di):Di,zi=Y?Math.min(Y.offsetHeight-li,mn):mn,Un=Math.max(c0,Ii*Xt),Zt=Math.max(c0,zi*G);if(x(Re=>Re.height===Zt&&Re.width===Un?Re:{width:Un,height:Zt}),Y&&re){const Re=Y.offsetHeight-Zt-Kt-Fr,ut=me-pe,pn=ut===0?0:ve/ut,tt=Math.min(Re,Math.max(0,pn*Re));re.style.transform=`translate3d(0,${tt}px,0)`}if(W&&le){const Re=W.offsetWidth-Un-Mt-At,ut=ge-ne,pn=ut===0?0:Ae/ut,tt=ee==="rtl"?ja(pn*Re,-Re,0):ja(pn*Re,0,Re);le.style.transform=`translate3d(${tt}px,0,0)`}const Te=[[fr.scrollAreaOverflowXStart,$e],[fr.scrollAreaOverflowXEnd,Wt],[fr.scrollAreaOverflowYStart,oi],[fr.scrollAreaOverflowYEnd,Qt]];for(const[Re,ut]of Te)L.style.setProperty(Re,`${ut}px`);ce&&(dt||st?_({width:0,height:0}):!dt&&!st&&_({width:hn,height:Pt})),O(Re=>JC(Re,Xe));const We={xStart:!dt&&$e>H.xStart,xEnd:!dt&&Wt>H.xEnd,yStart:!st&&oi>H.yStart,yEnd:!st&&Qt>H.yEnd};M(Re=>Re.xStart===We.xStart&&Re.xEnd===We.xEnd&&Re.yStart===We.yStart&&Re.yEnd===We.yEnd?Re:We)});ft(()=>{if(c.current&&(QC(),!b0))return WC(c.current,()=>{te()})},[te,c]),ft(()=>{queueMicrotask(te)},[te,A,ee]),ft(()=>{c.current?.matches(":hover")&&I(!0)},[c,I]),R.useEffect(()=>{const L=c.current;if(!b0||!L)return;let Y=!1;const W=new ResizeObserver(()=>{if(!Y){Y=!0;const re=V.current;if(re[0]===L.clientHeight&&re[1]===L.scrollHeight&&re[2]===L.clientWidth&&re[3]===L.scrollWidth)return}te()});return W.observe(L),oe.start(0,()=>{const re=L.getAnimations({subtree:!0});re.length!==0&&Promise.allSettled(re.map(le=>le.finished)).then(te).catch(()=>{})}),()=>{W.disconnect(),oe.clear()}},[te,c,oe]);function N(){ie.current=!1}const P={role:"presentation",...T&&{"data-id":`${T}-viewport`},tabIndex:A.x&&A.y?-1:0,className:yy.className,style:{overflow:"scroll"},onScroll(){c.current&&(te(),ie.current||k({x:c.current.scrollLeft,y:c.current.scrollTop}),K.start(100,()=>{ie.current=!0}))},onWheel:N,onTouchMove:N,onPointerMove:N,onPointerEnter:N,onKeyDown:N},X=R.useMemo(()=>({scrolling:z||Q,hasOverflowX:!A.x,hasOverflowY:!A.y,overflowXStart:U.xStart,overflowXEnd:U.xEnd,overflowYStart:U.yStart,overflowYEnd:U.yEnd,cornerHidden:A.corner}),[z,Q,A.x,A.y,A.corner,U]),he=Wn("div",n,{ref:[r,c],state:X,props:[P,u],stateAttributesMapping:bh}),Z=R.useMemo(()=>({computeThumbPosition:te}),[te]);return E.jsx(FC.Provider,{value:Z,children:he})});function ZC(t){const n=t.clientHeight>=t.scrollHeight,r=t.clientWidth>=t.scrollWidth;return{y:n,x:r,corner:n||r}}function JC(t,n){return t.y===n.y&&t.x===n.x&&t.corner===n.corner?t:n}const _y=R.createContext(void 0);function eA(){const t=R.useContext(_y);if(t===void 0)throw new Error($r(54));return t}let su=(function(t){return t.scrollAreaThumbHeight="--scroll-area-thumb-height",t.scrollAreaThumbWidth="--scroll-area-thumb-width",t})({});const tA=R.forwardRef(function(n,r){const{render:a,className:s,orientation:u="vertical",keepMounted:c=!1,...h}=n,{hovering:d,scrollingX:p,scrollingY:b,hiddenState:g,overflowEdges:v,scrollbarYRef:_,scrollbarXRef:x,viewportRef:T,thumbYRef:O,thumbXRef:A,handlePointerDown:C,handlePointerUp:k,rootId:I,thumbSize:M,hasMeasuredScrollbar:U}=Au(),H={hovering:d,scrolling:{horizontal:p,vertical:b}[u],orientation:u,hasOverflowX:!g.x,hasOverflowY:!g.y,overflowXStart:v.xStart,overflowXEnd:v.xEnd,overflowYStart:v.yStart,overflowYEnd:v.yEnd,cornerHidden:g.corner},z=vh(),Q=!U&&!c;R.useEffect(()=>{const te=T.current,N=u==="vertical"?_.current:x.current;if(!N)return;function P(X){if(!(!te||!N||X.ctrlKey)){if(X.preventDefault(),u==="vertical"){if(te.scrollTop===0&&X.deltaY<0)return}else if(te.scrollLeft===0&&X.deltaX<0)return;if(u==="vertical"){if(te.scrollTop===te.scrollHeight-te.clientHeight&&X.deltaY>0)return}else if(te.scrollLeft===te.scrollWidth-te.clientWidth&&X.deltaX>0)return;u==="vertical"?te.scrollTop+=X.deltaY:te.scrollLeft+=X.deltaX}}return N.addEventListener("wheel",P,{passive:!1}),()=>{N.removeEventListener("wheel",P)}},[u,x,_,T]);const ee={...I&&{"data-id":`${I}-scrollbar`},onPointerDown(te){if(te.button===0&&te.currentTarget===te.target&&T.current){if(O.current&&_.current&&u==="vertical"){const N=Pn(O.current,"margin","y"),P=Pn(_.current,"padding","y"),X=O.current.offsetHeight,he=_.current.getBoundingClientRect(),Z=te.clientY-he.top-X/2-P+N/2,L=T.current.scrollHeight,Y=T.current.clientHeight,W=_.current.offsetHeight-X-P-N,le=Z/W*(L-Y);T.current.scrollTop=le}if(A.current&&x.current&&u==="horizontal"){const N=Pn(A.current,"margin","x"),P=Pn(x.current,"padding","x"),X=A.current.offsetWidth,he=x.current.getBoundingClientRect(),Z=te.clientX-he.left-X/2-P+N/2,L=T.current.scrollWidth,Y=T.current.clientWidth,W=x.current.offsetWidth-X-P-N,re=Z/W;let le;z==="rtl"?(le=(1-re)*(L-Y),T.current.scrollLeft<=0&&(le=-le)):le=re*(L-Y),T.current.scrollLeft=le}C(te)}},onPointerUp:k,style:{position:"absolute",touchAction:"none",WebkitUserSelect:"none",userSelect:"none",visibility:Q?"hidden":void 0,...u==="vertical"&&{top:0,bottom:`var(${ou.scrollAreaCornerHeight})`,insetInlineEnd:0,[su.scrollAreaThumbHeight]:`${M.height}px`},...u==="horizontal"&&{insetInlineStart:0,insetInlineEnd:`var(${ou.scrollAreaCornerWidth})`,bottom:0,[su.scrollAreaThumbWidth]:`${M.width}px`}}},ie=Wn("div",n,{ref:[r,u==="vertical"?_:x],state:H,props:[ee,h],stateAttributesMapping:bh}),V=R.useMemo(()=>({orientation:u}),[u]),K=u==="vertical"?g.y:g.x;return c||!K?E.jsx(_y.Provider,{value:V,children:ie}):null}),nA=R.forwardRef(function(n,r){const{render:a,className:s,...u}=n,{thumbYRef:c,thumbXRef:h,handlePointerDown:d,handlePointerMove:p,handlePointerUp:b,setScrollingX:g,setScrollingY:v,hasMeasuredScrollbar:_}=Au(),{orientation:x}=eA();return Wn("div",n,{ref:[r,x==="vertical"?c:h],state:{orientation:x},props:[{onPointerDown:d,onPointerMove:p,onPointerUp(A){x==="vertical"&&v(!1),x==="horizontal"&&g(!1),b(A)},style:{visibility:_?void 0:"hidden",...x==="vertical"&&{height:`var(${su.scrollAreaThumbHeight})`},...x==="horizontal"&&{width:`var(${su.scrollAreaThumbWidth})`}}},u]})}),iA=R.forwardRef(function(n,r){const{render:a,className:s,...u}=n,{cornerRef:c,cornerSize:h,hiddenState:d}=Au(),p=Wn("div",n,{ref:[r,c],props:[{style:{position:"absolute",bottom:0,insetInlineEnd:0,width:h.width,height:h.height}},u]});return d.corner?null:p});function nl({className:t,children:n,...r}){return E.jsxs(qC,{"data-slot":"scroll-area",className:He("relative",t),...r,children:[E.jsx(KC,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:n}),E.jsx(rA,{}),E.jsx(iA,{})]})}function rA({className:t,orientation:n="vertical",...r}){return E.jsx(tA,{"data-slot":"scroll-area-scrollbar","data-orientation":n,orientation:n,className:He("flex touch-none p-px transition-colors select-none",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",t),...r,children:E.jsx(nA,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function Bf({className:t,...n}){return E.jsx("div",{"data-slot":"skeleton",className:He("animate-pulse rounded-md bg-muted",t),...n})}const aA="opencrApiBase",oA=t=>t.endsWith("/")?t.slice(0,-1):t,lA=()=>{if(typeof window>"u")return"";const t=new URLSearchParams(window.location.search).get(aA);if(!t)return"";try{return oA(new URL(t).toString())}catch{return""}},yh=t=>{if(t.startsWith("http://")||t.startsWith("https://"))return t;const n=lA();return n?`${n}${t}`:t};async function Ni(t,n){const r=n.body!==void 0,a={method:n.method??(r?"POST":"GET")};r&&(a.headers={"Content-Type":"application/json"},a.body=JSON.stringify(n.body));const s=await fetch(yh(t),a);if(!s.ok){const u=await s.text(),c=u.trim().length>0?`: ${u.trim()}`:"";throw new Error(`${n.errorPrefix} (${s.status}${c})`)}return await s.json()}function Qs(t){const[n,r]=R.useState(null),[a,s]=R.useState(null),[u,c]=R.useState(!0),h=R.useCallback(async()=>{c(!0);try{const d=await t();r(d),s(null)}catch(d){const p=d instanceof Error?d.message:String(d);s(p)}finally{c(!1)}},[t]);return R.useEffect(()=>{h()},[h]),{data:n,error:a,isLoading:u,reload:h}}function sA(){const t=R.useCallback(()=>Ni("/api/debug-state",{errorPrefix:"Failed to load debug state"}),[]),{data:n,error:r,isLoading:a}=Qs(t);return{debugState:n,error:r,isLoading:a}}function uA(){const{debugState:t,error:n,isLoading:r}=sA();return r?E.jsx("div",{className:"h-full p-4",children:E.jsx(Bf,{className:"h-full w-full"})}):n?E.jsxs(Va,{variant:"destructive",children:[E.jsx(el,{}),E.jsx(Ga,{children:"Debug state failed to load."}),E.jsx($a,{children:n})]}):E.jsx(nl,{className:"h-full",children:E.jsx("pre",{className:"min-w-full whitespace-pre-wrap p-4 font-mono text-xs leading-5 text-foreground",children:JSON.stringify(t,null,2)})})}const uu="diffs-container",cA=/(?=^From [a-f0-9]+ .+$)/m,Ks=/(?=^diff --git)/gm,v0=/(?=^---\s+\S)/gm,dA=/(?=^@@ )/gm,fA=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(?: (.*))?/m,af=new RegExp("(?<=\\n)"),hA=/^(---|\+\+\+)\s+([^\t\r\n]+)/,mA=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,pA=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,gA=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,_h="header-prefix",xh="header-metadata",Fn={dark:"pierre-dark",light:"pierre-light"},xy="data-unsafe-css",qa=1,bA={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,hunkSeparatorHeight:32,fileGap:8},vA=Object.freeze({fromStart:0,fromEnd:0}),y0={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},yA={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function _0(t,n){return t?.start===n?.start&&t?.end===n?.end&&t?.side===n?.side&&t?.endSide===n?.endSide}function Oi(t){return{type:"text",value:t}}function Ve({tagName:t,children:n=[],properties:r={}}){return{type:"element",tagName:t,properties:r,children:n}}function cu({name:t,width:n=16,height:r=16,properties:a}){return Ve({tagName:"svg",properties:{width:n,height:r,viewBox:"0 0 16 16",...a},children:[Ve({tagName:"use",properties:{href:`#${t.replace(/^#/,"")}`}})]})}function _A(t){let n=t.children[0];for(;n!=null;){if(n.type==="element"&&n.tagName==="code")return n;"children"in n?n=n.children[0]:n=null}}function Ds(t){return Ve({tagName:"div",properties:{"data-gutter":""},children:t})}function xA(t,n,r,a={}){return Ve({tagName:"div",properties:{"data-line-type":t,"data-column-number":n,"data-line-index":r,...a},children:n!=null?[Ve({tagName:"span",properties:{"data-line-number-content":""},children:[Oi(`${n}`)]})]:void 0})}function $n(t,n,r){return Ve({tagName:"div",properties:{"data-gutter-buffer":n,"data-buffer-size":r,"data-line-type":n==="annotation"?void 0:t,style:n==="annotation"?`grid-row: span ${r};`:`grid-row: span ${r};min-height:calc(${r} * 1lh);`}})}function SA(){return Ve({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[cu({name:"diffs-icon-plus",properties:{"data-icon":""}})]})}function EA(t,n){return t.lineNumber===n.lineNumber&&t.side===n.side}const wA=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class ml{constructor(n,r,a){this.normal=r,this.property=n,a&&(this.space=a)}}ml.prototype.normal={};ml.prototype.property={};ml.prototype.space=void 0;function Sy(t,n){const r={},a={};for(const s of t)Object.assign(r,s.property),Object.assign(a,s.normal);return new ml(r,a,n)}function Vf(t){return t.toLowerCase()}class dn{constructor(n,r){this.attribute=r,this.property=n}}dn.prototype.attribute="";dn.prototype.booleanish=!1;dn.prototype.boolean=!1;dn.prototype.commaOrSpaceSeparated=!1;dn.prototype.commaSeparated=!1;dn.prototype.defined=!1;dn.prototype.mustUseProperty=!1;dn.prototype.number=!1;dn.prototype.overloadedBoolean=!1;dn.prototype.property="";dn.prototype.spaceSeparated=!1;dn.prototype.space=void 0;let CA=0;const De=Yr(),Et=Yr(),Gf=Yr(),de=Yr(),rt=Yr(),Ya=Yr(),En=Yr();function Yr(){return 2**++CA}const $f=Object.freeze(Object.defineProperty({__proto__:null,boolean:De,booleanish:Et,commaOrSpaceSeparated:En,commaSeparated:Ya,number:de,overloadedBoolean:Gf,spaceSeparated:rt},Symbol.toStringTag,{value:"Module"})),of=Object.keys($f);class Sh extends dn{constructor(n,r,a,s){let u=-1;if(super(n,r),x0(this,"space",s),typeof a=="number")for(;++u<of.length;){const c=of[u];x0(this,of[u],(a&$f[c])===$f[c])}}}Sh.prototype.defined=!0;function x0(t,n,r){r&&(t[n]=r)}function Ka(t){const n={},r={};for(const[a,s]of Object.entries(t.properties)){const u=new Sh(a,t.transform(t.attributes||{},a),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(a)&&(u.mustUseProperty=!0),n[a]=u,r[Vf(a)]=a,r[Vf(u.attribute)]=a}return new ml(n,r,t.space)}const Ey=Ka({properties:{ariaActiveDescendant:null,ariaAtomic:Et,ariaAutoComplete:null,ariaBusy:Et,ariaChecked:Et,ariaColCount:de,ariaColIndex:de,ariaColSpan:de,ariaControls:rt,ariaCurrent:null,ariaDescribedBy:rt,ariaDetails:null,ariaDisabled:Et,ariaDropEffect:rt,ariaErrorMessage:null,ariaExpanded:Et,ariaFlowTo:rt,ariaGrabbed:Et,ariaHasPopup:null,ariaHidden:Et,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:rt,ariaLevel:de,ariaLive:null,ariaModal:Et,ariaMultiLine:Et,ariaMultiSelectable:Et,ariaOrientation:null,ariaOwns:rt,ariaPlaceholder:null,ariaPosInSet:de,ariaPressed:Et,ariaReadOnly:Et,ariaRelevant:null,ariaRequired:Et,ariaRoleDescription:rt,ariaRowCount:de,ariaRowIndex:de,ariaRowSpan:de,ariaSelected:Et,ariaSetSize:de,ariaSort:null,ariaValueMax:de,ariaValueMin:de,ariaValueNow:de,ariaValueText:null,role:null},transform(t,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function wy(t,n){return n in t?t[n]:n}function Cy(t,n){return wy(t,n.toLowerCase())}const AA=Ka({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ya,acceptCharset:rt,accessKey:rt,action:null,allow:null,allowFullScreen:De,allowPaymentRequest:De,allowUserMedia:De,alt:null,as:null,async:De,autoCapitalize:null,autoComplete:rt,autoFocus:De,autoPlay:De,blocking:rt,capture:null,charSet:null,checked:De,cite:null,className:rt,cols:de,colSpan:null,content:null,contentEditable:Et,controls:De,controlsList:rt,coords:de|Ya,crossOrigin:null,data:null,dateTime:null,decoding:null,default:De,defer:De,dir:null,dirName:null,disabled:De,download:Gf,draggable:Et,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:De,formTarget:null,headers:rt,height:de,hidden:Gf,high:de,href:null,hrefLang:null,htmlFor:rt,httpEquiv:rt,id:null,imageSizes:null,imageSrcSet:null,inert:De,inputMode:null,integrity:null,is:null,isMap:De,itemId:null,itemProp:rt,itemRef:rt,itemScope:De,itemType:rt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:De,low:de,manifest:null,max:null,maxLength:de,media:null,method:null,min:null,minLength:de,multiple:De,muted:De,name:null,nonce:null,noModule:De,noValidate:De,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:De,optimum:de,pattern:null,ping:rt,placeholder:null,playsInline:De,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:De,referrerPolicy:null,rel:rt,required:De,reversed:De,rows:de,rowSpan:de,sandbox:rt,scope:null,scoped:De,seamless:De,selected:De,shadowRootClonable:De,shadowRootDelegatesFocus:De,shadowRootMode:null,shape:null,size:de,sizes:null,slot:null,span:de,spellCheck:Et,src:null,srcDoc:null,srcLang:null,srcSet:null,start:de,step:null,style:null,tabIndex:de,target:null,title:null,translate:null,type:null,typeMustMatch:De,useMap:null,value:Et,width:de,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:rt,axis:null,background:null,bgColor:null,border:de,borderColor:null,bottomMargin:de,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:De,declare:De,event:null,face:null,frame:null,frameBorder:null,hSpace:de,leftMargin:de,link:null,longDesc:null,lowSrc:null,marginHeight:de,marginWidth:de,noResize:De,noHref:De,noShade:De,noWrap:De,object:null,profile:null,prompt:null,rev:null,rightMargin:de,rules:null,scheme:null,scrolling:Et,standby:null,summary:null,text:null,topMargin:de,valueType:null,version:null,vAlign:null,vLink:null,vSpace:de,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:De,disableRemotePlayback:De,prefix:null,property:null,results:de,security:null,unselectable:null},space:"html",transform:Cy}),kA=Ka({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:En,accentHeight:de,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:de,amplitude:de,arabicForm:null,ascent:de,attributeName:null,attributeType:null,azimuth:de,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:de,by:null,calcMode:null,capHeight:de,className:rt,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:de,diffuseConstant:de,direction:null,display:null,dur:null,divisor:de,dominantBaseline:null,download:De,dx:null,dy:null,edgeMode:null,editable:null,elevation:de,enableBackground:null,end:null,event:null,exponent:de,externalResourcesRequired:null,fill:null,fillOpacity:de,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:Ya,g2:Ya,glyphName:Ya,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:de,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:de,horizOriginX:de,horizOriginY:de,id:null,ideographic:de,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:de,k:de,k1:de,k2:de,k3:de,k4:de,kernelMatrix:En,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:de,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:de,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:de,overlineThickness:de,paintOrder:null,panose1:null,path:null,pathLength:de,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:rt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:de,pointsAtY:de,pointsAtZ:de,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:En,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:En,rev:En,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:En,requiredFeatures:En,requiredFonts:En,requiredFormats:En,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:de,specularExponent:de,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:de,strikethroughThickness:de,string:null,stroke:null,strokeDashArray:En,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:de,strokeOpacity:de,strokeWidth:null,style:null,surfaceScale:de,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:En,tabIndex:de,tableValues:null,target:null,targetX:de,targetY:de,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:En,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:de,underlineThickness:de,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:de,values:null,vAlphabetic:de,vMathematical:de,vectorEffect:null,vHanging:de,vIdeographic:de,version:null,vertAdvY:de,vertOriginX:de,vertOriginY:de,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:de,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:wy}),Ay=Ka({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,n){return"xlink:"+n.slice(5).toLowerCase()}}),ky=Ka({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Cy}),Ty=Ka({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,n){return"xml:"+n.slice(3).toLowerCase()}}),TA=/[A-Z]/g,S0=/-[a-z]/g,RA=/^data[-\w.:]+$/i;function LA(t,n){const r=Vf(n);let a=n,s=dn;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&RA.test(n)){if(n.charAt(4)==="-"){const u=n.slice(5).replace(S0,MA);a="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=n.slice(4);if(!S0.test(u)){let c=u.replace(TA,NA);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}s=Sh}return new s(a,n)}function NA(t){return"-"+t.toLowerCase()}function MA(t){return t.charAt(1).toUpperCase()}const OA=Sy([Ey,AA,Ay,ky,Ty],"html"),Ry=Sy([Ey,kA,Ay,ky,Ty],"svg"),E0={}.hasOwnProperty;function DA(t,n){const r=n||{};function a(s,...u){let c=a.invalid;const h=a.handlers;if(s&&E0.call(s,t)){const d=String(s[t]);c=E0.call(h,d)?h[d]:a.unknown}if(c)return c.call(this,s,...u)}return a.handlers=r.handlers||{},a.invalid=r.invalid,a.unknown=r.unknown,a}const IA=/["&'<>`]/g,zA=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,PA=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,jA=/[|\\{}()[\]^$+*?.]/g,w0=new WeakMap;function UA(t,n){if(t=t.replace(n.subset?HA(n.subset):IA,a),n.subset||n.escapeOnly)return t;return t.replace(zA,r).replace(PA,a);function r(s,u,c){return n.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,c.charCodeAt(u+2),n)}function a(s,u,c){return n.format(s.charCodeAt(0),c.charCodeAt(u+1),n)}}function HA(t){let n=w0.get(t);return n||(n=BA(t),w0.set(t,n)),n}function BA(t){const n=[];let r=-1;for(;++r<t.length;)n.push(t[r].replace(jA,"\\$&"));return new RegExp("(?:"+n.join("|")+")","g")}const VA=/[\dA-Fa-f]/;function GA(t,n,r){const a="&#x"+t.toString(16).toUpperCase();return r&&n&&!VA.test(String.fromCharCode(n))?a:a+";"}const $A=/\d/;function qA(t,n,r){const a="&#"+String(t);return r&&n&&!$A.test(String.fromCharCode(n))?a:a+";"}const YA=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],lf={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},FA=["cent","copy","divide","gt","lt","not","para","times"],Ly={}.hasOwnProperty,qf={};let Is;for(Is in lf)Ly.call(lf,Is)&&(qf[lf[Is]]=Is);const XA=/[^\dA-Za-z]/;function WA(t,n,r,a){const s=String.fromCharCode(t);if(Ly.call(qf,s)){const u=qf[s],c="&"+u;return r&&YA.includes(u)&&!FA.includes(u)&&(!a||n&&n!==61&&XA.test(String.fromCharCode(n)))?c:c+";"}return""}function QA(t,n,r){let a=GA(t,n,r.omitOptionalSemicolons),s;if((r.useNamedReferences||r.useShortestReferences)&&(s=WA(t,n,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!s)&&r.useShortestReferences){const u=qA(t,n,r.omitOptionalSemicolons);u.length<a.length&&(a=u)}return s&&(!r.useShortestReferences||s.length<a.length)?s:a}function Fa(t,n){return UA(t,Object.assign({format:QA},n))}const KA=/^>|^->|<!--|-->|--!>|<!-$/g,ZA=[">"],JA=["<",">"];function e2(t,n,r,a){return a.settings.bogusComments?"<?"+Fa(t.value,Object.assign({},a.settings.characterReferences,{subset:ZA}))+">":"<!--"+t.value.replace(KA,s)+"-->";function s(u){return Fa(u,Object.assign({},a.settings.characterReferences,{subset:JA}))}}function t2(t,n,r,a){return"<!"+(a.settings.upperDoctype?"DOCTYPE":"doctype")+(a.settings.tightDoctype?"":" ")+"html>"}function C0(t,n){const r=String(t);if(typeof n!="string")throw new TypeError("Expected character");let a=0,s=r.indexOf(n);for(;s!==-1;)a++,s=r.indexOf(n,s+n.length);return a}function n2(t,n){const r=n||{};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}function i2(t){return t.join(" ").trim()}const r2=/[ \t\n\f\r]/g;function Eh(t){return typeof t=="object"?t.type==="text"?A0(t.value):!1:A0(t)}function A0(t){return t.replace(r2,"")===""}const Nt=My(1),Ny=My(-1),a2=[];function My(t){return n;function n(r,a,s){const u=r?r.children:a2;let c=(a||0)+t,h=u[c];if(!s)for(;h&&Eh(h);)c+=t,h=u[c];return h}}const o2={}.hasOwnProperty;function Oy(t){return n;function n(r,a,s){return o2.call(t,r.tagName)&&t[r.tagName](r,a,s)}}const wh=Oy({body:s2,caption:sf,colgroup:sf,dd:f2,dt:d2,head:sf,html:l2,li:c2,optgroup:h2,option:m2,p:u2,rp:k0,rt:k0,tbody:g2,td:T0,tfoot:b2,th:T0,thead:p2,tr:v2});function sf(t,n,r){const a=Nt(r,n,!0);return!a||a.type!=="comment"&&!(a.type==="text"&&Eh(a.value.charAt(0)))}function l2(t,n,r){const a=Nt(r,n);return!a||a.type!=="comment"}function s2(t,n,r){const a=Nt(r,n);return!a||a.type!=="comment"}function u2(t,n,r){const a=Nt(r,n);return a?a.type==="element"&&(a.tagName==="address"||a.tagName==="article"||a.tagName==="aside"||a.tagName==="blockquote"||a.tagName==="details"||a.tagName==="div"||a.tagName==="dl"||a.tagName==="fieldset"||a.tagName==="figcaption"||a.tagName==="figure"||a.tagName==="footer"||a.tagName==="form"||a.tagName==="h1"||a.tagName==="h2"||a.tagName==="h3"||a.tagName==="h4"||a.tagName==="h5"||a.tagName==="h6"||a.tagName==="header"||a.tagName==="hgroup"||a.tagName==="hr"||a.tagName==="main"||a.tagName==="menu"||a.tagName==="nav"||a.tagName==="ol"||a.tagName==="p"||a.tagName==="pre"||a.tagName==="section"||a.tagName==="table"||a.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function c2(t,n,r){const a=Nt(r,n);return!a||a.type==="element"&&a.tagName==="li"}function d2(t,n,r){const a=Nt(r,n);return!!(a&&a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd"))}function f2(t,n,r){const a=Nt(r,n);return!a||a.type==="element"&&(a.tagName==="dt"||a.tagName==="dd")}function k0(t,n,r){const a=Nt(r,n);return!a||a.type==="element"&&(a.tagName==="rp"||a.tagName==="rt")}function h2(t,n,r){const a=Nt(r,n);return!a||a.type==="element"&&a.tagName==="optgroup"}function m2(t,n,r){const a=Nt(r,n);return!a||a.type==="element"&&(a.tagName==="option"||a.tagName==="optgroup")}function p2(t,n,r){const a=Nt(r,n);return!!(a&&a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot"))}function g2(t,n,r){const a=Nt(r,n);return!a||a.type==="element"&&(a.tagName==="tbody"||a.tagName==="tfoot")}function b2(t,n,r){return!Nt(r,n)}function v2(t,n,r){const a=Nt(r,n);return!a||a.type==="element"&&a.tagName==="tr"}function T0(t,n,r){const a=Nt(r,n);return!a||a.type==="element"&&(a.tagName==="td"||a.tagName==="th")}const y2=Oy({body:S2,colgroup:E2,head:x2,html:_2,tbody:w2});function _2(t){const n=Nt(t,-1);return!n||n.type!=="comment"}function x2(t){const n=new Set;for(const a of t.children)if(a.type==="element"&&(a.tagName==="base"||a.tagName==="title")){if(n.has(a.tagName))return!1;n.add(a.tagName)}const r=t.children[0];return!r||r.type==="element"}function S2(t){const n=Nt(t,-1,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&Eh(n.value.charAt(0)))&&!(n.type==="element"&&(n.tagName==="meta"||n.tagName==="link"||n.tagName==="script"||n.tagName==="style"||n.tagName==="template"))}function E2(t,n,r){const a=Ny(r,n),s=Nt(t,-1,!0);return r&&a&&a.type==="element"&&a.tagName==="colgroup"&&wh(a,r.children.indexOf(a),r)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function w2(t,n,r){const a=Ny(r,n),s=Nt(t,-1);return r&&a&&a.type==="element"&&(a.tagName==="thead"||a.tagName==="tbody")&&wh(a,r.children.indexOf(a),r)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const zs={name:[[`
|
|
11
|
+
\f\r &/=>`.split(""),`
|
|
12
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
13
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
14
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
15
|
+
\f\r &>`.split(""),`\0
|
|
16
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
17
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
18
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function C2(t,n,r,a){const s=a.schema,u=s.space==="svg"?!1:a.settings.omitOptionalTags;let c=s.space==="svg"?a.settings.closeEmptyElements:a.settings.voids.includes(t.tagName.toLowerCase());const h=[];let d;s.space==="html"&&t.tagName==="svg"&&(a.schema=Ry);const p=A2(a,t.properties),b=a.all(s.space==="html"&&t.tagName==="template"?t.content:t);return a.schema=s,b&&(c=!1),(p||!u||!y2(t,n,r))&&(h.push("<",t.tagName,p?" "+p:""),c&&(s.space==="svg"||a.settings.closeSelfClosing)&&(d=p.charAt(p.length-1),(!a.settings.tightSelfClosing||d==="/"||d&&d!=='"'&&d!=="'")&&h.push(" "),h.push("/")),h.push(">")),h.push(b),!c&&(!u||!wh(t,n,r))&&h.push("</"+t.tagName+">"),h.join("")}function A2(t,n){const r=[];let a=-1,s;if(n){for(s in n)if(n[s]!==null&&n[s]!==void 0){const u=k2(t,s,n[s]);u&&r.push(u)}}for(;++a<r.length;){const u=t.settings.tightAttributes?r[a].charAt(r[a].length-1):void 0;a!==r.length-1&&u!=='"'&&u!=="'"&&(r[a]+=" ")}return r.join("")}function k2(t,n,r){const a=LA(t.schema,n),s=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,u=t.settings.allowDangerousCharacters?0:1;let c=t.quote,h;if(a.overloadedBoolean&&(r===a.attribute||r==="")?r=!0:(a.boolean||a.overloadedBoolean)&&(typeof r!="string"||r===a.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const d=Fa(a.attribute,Object.assign({},t.settings.characterReferences,{subset:zs.name[s][u]}));return r===!0||(r=Array.isArray(r)?(a.commaSeparated?n2:i2)(r,{padLeft:!t.settings.tightCommaSeparatedLists}):String(r),t.settings.collapseEmptyAttributes&&!r)?d:(t.settings.preferUnquoted&&(h=Fa(r,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:zs.unquoted[s][u]}))),h!==r&&(t.settings.quoteSmart&&C0(r,c)>C0(r,t.alternative)&&(c=t.alternative),h=c+Fa(r,Object.assign({},t.settings.characterReferences,{subset:(c==="'"?zs.single:zs.double)[s][u],attribute:!0}))+c),d+(h&&"="+h))}const T2=["<","&"];function Dy(t,n,r,a){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?t.value:Fa(t.value,Object.assign({},a.settings.characterReferences,{subset:T2}))}function R2(t,n,r,a){return a.settings.allowDangerousHtml?t.value:Dy(t,n,r,a)}function L2(t,n,r,a){return a.all(t)}const N2=DA("type",{invalid:M2,unknown:O2,handlers:{comment:e2,doctype:t2,element:C2,raw:R2,root:L2,text:Dy}});function M2(t){throw new Error("Expected node, not `"+t+"`")}function O2(t){const n=t;throw new Error("Cannot compile unknown node `"+n.type+"`")}const D2={},I2={},z2=[];function Xa(t,n){const r=n||D2,a=r.quote||'"',s=a==='"'?"'":'"';if(a!=='"'&&a!=="'")throw new Error("Invalid quote `"+a+"`, expected `'` or `\"`");return{one:P2,all:j2,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||wA,characterReferences:r.characterReferences||I2,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?Ry:OA,quote:a,alternative:s}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function P2(t,n,r){return N2(t,n,r,this)}function j2(t){const n=[],r=t&&t.children||z2;let a=-1;for(;++a<r.length;)n[a]=this.one(r[a],a,t);return n.join("")}var U2=class{hoveredLine;pre;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:"idle"};constructor(t,n){this.mode=t,this.options=n}setOptions(t){this.options=t}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(t){this.setSelectionDirty();const{usesCustomGutterUtility:n=!1,enableGutterUtility:r=!1}=this.options;this.pre!==t&&(this.cleanUp(),this.pre=t),r?this.ensureGutterUtilityNode(n):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode==="gutterSelecting"&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(t),this.updateInteractiveLineAttributes(),this.renderSelection()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(t){const n=!(t===this.selectedRange||_0(t??void 0,this.selectedRange??void 0));!this.isSelectionDirty()&&!n||(this.selectedRange=t,this.renderSelection(),n&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{if(this.hoveredLine!=null){if(this.mode==="diff"&&this.hoveredLine.type==="diff-line")return{lineNumber:this.hoveredLine.lineNumber,side:this.hoveredLine.annotationSide};if(this.mode==="file"&&this.hoveredLine.type==="line")return{lineNumber:this.hoveredLine.lineNumber}}};handlePointerClick=t=>{const{onHunkExpand:n,onLineClick:r,onLineNumberClick:a,onMergeConflictActionClick:s}=this.options;n==null&&r==null&&a==null&&s==null||this.options.onGutterUtilityClick!=null&&M0(t.composedPath())||(ki(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",t),this.handlePointerEvent({eventType:"click",event:t}))};handlePointerMove=t=>{const{lineHoverHighlight:n="disabled",onLineEnter:r,onLineLeave:a,enableGutterUtility:s=!1}=this.options;n==="disabled"&&!s&&r==null&&a==null||(ki(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",t),this.handlePointerEvent({eventType:"move",event:t}))};handlePointerLeave=t=>{const{__debugPointerEvents:n}=this.options;if(ki(n,"move","FileDiff.DEBUG.handlePointerLeave: no event"),this.hoveredLine==null){ki(n,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no .hoveredLine");return}this.gutterUtilityContainer?.remove(),this.options.onLineLeave?.({...this.hoveredLine,event:t}),this.clearHoveredLine()};handlePointerEvent({eventType:t,event:n}){const{__debugPointerEvents:r}=this.options,a=n.composedPath();ki(r,t,"FileDiff.DEBUG.handlePointerEvent:",{eventType:t,composedPath:a});const s=this.resolvePointerTarget(a);ki(r,t,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",s);const{onLineClick:u,onLineNumberClick:c,onLineEnter:h,onLineLeave:d,onHunkExpand:p,onMergeConflictActionClick:b}=this.options;switch(t){case"move":if(Wo(s)&&this.hoveredLine?.lineElement===s.lineElement)break;this.hoveredLine!=null&&(this.gutterUtilityContainer?.remove(),d?.({...this.hoveredLine,event:n}),this.clearHoveredLine()),Wo(s)&&(this.setHoveredLine(this.toEventBaseProps(s)),this.gutterUtilityContainer!=null&&s.numberElement.appendChild(this.gutterUtilityContainer),h?.({...this.hoveredLine,event:n}));break;case"click":{if(s==null)break;if(V2(s)&&b!=null){b(s);break}if(B2(s)&&p!=null){p(s.hunkIndex,n.shiftKey?"both":s.direction,n.shiftKey?Number.POSITIVE_INFINITY:void 0);break}if(!Wo(s))break;const g=this.toEventBaseProps(s);c!=null&&s.numberColumn?c({...g,event:n}):u?.({...g,event:n});break}}}syncPointerListeners(t){const{__debugPointerEvents:n,lineHoverHighlight:r="disabled",onLineClick:a,onLineNumberClick:s,onLineEnter:u,onLineLeave:c,onHunkExpand:h,onMergeConflictActionClick:d,enableGutterUtility:p=!1,enableLineSelection:b=!1,onGutterUtilityClick:g}=this.options,v=g!=null,_=r!=="disabled"||a!=null||s!=null||h!=null||d!=null||u!=null||c!=null||p||b||v;_&&!this.hasPointerListeners?(t.addEventListener("click",this.handlePointerClick),t.addEventListener("pointerdown",this.handlePointerDown),t.addEventListener("pointermove",this.handlePointerMove),t.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,ki(n,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(()=>{const O=[];return(n==="both"||n==="click")&&(a!=null&&O.push("onLineClick"),s!=null&&O.push("onLineNumberClick"),h!=null&&O.push("expandable hunk separators"),d!=null&&O.push("merge conflict actions")),O})()),ki(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),ki(n,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")):!_&&this.hasPointerListeners&&(t.removeEventListener("click",this.handlePointerClick),t.removeEventListener("pointerdown",this.handlePointerDown),t.removeEventListener("pointermove",this.handlePointerMove),t.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);const x=this.pointerSession.mode==="selecting"||this.pointerSession.mode==="pendingSingleLineUnselect",T=this.pointerSession.mode==="gutterSelecting";(!b&&x||!v&&T)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;const{onLineClick:t,onLineNumberClick:n,enableLineSelection:r=!1}=this.options,a=t!=null,s=n!=null||r;a&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!a&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),s&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!s&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=t=>{if(t.pointerType==="mouse"&&t.button!==0||this.pre==null||this.pointerSession.mode!=="idle")return;const n=t.composedPath();M0(n)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(t,n):this.startLineSelectionFromPointerDown(t,n)};startLineSelectionFromPointerDown(t,n){const{enableLineSelection:r=!1}=this.options;if(!r)return;const a=this.getSelectionPointerInfo(n,!0);if(a==null)return;const{pre:s}=this;if(s==null)return;t.preventDefault();const{lineNumber:u,eventSide:c,lineIndex:h}=a;if(t.shiftKey&&this.selectedRange!=null){const d=this.getIndexesFromSelection(this.selectedRange,s.getAttribute("data-diff-type")==="split");if(d==null)return;const p=d.start<=d.end?h>=d.start:h<=d.end;this.selectionAnchor={lineNumber:p?this.selectedRange.start:this.selectedRange.end,side:p?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(u,c,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:"selecting",pointerId:t.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===u&&this.selectedRange?.end===u){const d={lineNumber:u,side:c};this.selectionAnchor=d,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:t.pointerId,anchor:d,pending:d},this.attachDocumentPointerListeners();return}this.selectedRange=null,this.selectionAnchor={lineNumber:u,side:c},this.updateSelection(u,c,!1),this.notifySelectionStart(this.selectedRange),this.pointerSession={mode:"selecting",pointerId:t.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(t,n){const{enableLineSelection:r=!1,onGutterUtilityClick:a}=this.options;if(a==null)return;const s=this.getSelectionPointFromPath(n);s!=null&&(t.preventDefault(),t.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:t.pointerId,anchor:s,current:s},r&&(this.selectionAnchor={lineNumber:s.lineNumber,side:s.side},this.updateSelection(s.lineNumber,s.side,!1),this.notifySelectionStart(this.selectedRange)),this.attachDocumentPointerListeners())}handleDocumentPointerMove=t=>{const{enableLineSelection:n=!1}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(t.pointerId!==this.pointerSession.pointerId)return;const r=this.getSelectionPointFromPath(t.composedPath());if(r==null)return;this.pointerSession.current=r,n===!0&&this.updateSelection(r.lineNumber,r.side);return}case"selecting":{if(t.pointerId!==this.pointerSession.pointerId)return;const r=this.getSelectionPointerInfo(t.composedPath(),!1);if(r==null||this.selectionAnchor==null)return;this.updateSelection(r.lineNumber,r.eventSide);return}case"pendingSingleLineUnselect":{if(t.pointerId!==this.pointerSession.pointerId)return;const r=this.getSelectionPointerInfo(t.composedPath(),!1);if(r==null||this.selectionAnchor==null)return;const a={lineNumber:r.lineNumber,side:r.eventSide};if(EA(this.pointerSession.pending,a))return;this.updateSelection(r.lineNumber,r.eventSide,!1),this.notifySelectionStart(this.selectedRange),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:t.pointerId};return}}};handleDocumentPointerUp=t=>{const{enableLineSelection:n=!1,onGutterUtilityClick:r}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{if(t.pointerId!==this.pointerSession.pointerId)return;const a=this.getSelectionPointFromPath(t.composedPath());a!=null&&(this.pointerSession.current=a,n&&this.updateSelection(a.lineNumber,a.side)),r?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,n&&(this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(t.pointerId!==this.pointerSession.pointerId)return;this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted();return;case"selecting":if(t.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.selectedRange),this.notifySelectionCommitted()}};handleDocumentPointerCancel=t=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&t.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(t){const{lineHoverHighlight:n="disabled"}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=t,n!=="disabled"&&((n==="both"||n==="line")&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),(n==="both"||n==="number")&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}ensureGutterUtilityNode(t){if(this.gutterUtilityContainer==null&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),t)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot==null&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){const n=document.createElement("div");n.innerHTML=Xa(SA());const r=n.firstElementChild;if(!(r instanceof HTMLButtonElement))throw new Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");r.remove(),this.gutterUtilityButton=r}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){this.pointerSession.mode==="pendingSingleLineUnselect"&&(this.pointerSession={mode:"idle"})}getSelectionPointerInfo(t,n){const r=this.resolvePointerTarget(t);if(Wo(r)&&!(n&&!r.numberColumn)&&r.splitLineIndex!=null)return{lineIndex:r.splitLineIndex,lineNumber:r.lineNumber,eventSide:this.mode==="diff"?r.side:void 0}}getSelectionPointFromPath(t){const n=this.resolvePointerTarget(t);if(Wo(n))return{lineNumber:n.lineNumber,side:this.mode==="diff"?n.side:void 0}}getLineIndex(t,n){const{getLineIndex:r}=this.options;return r!=null?r(t,n):[t-1,t-1]}updateSelection(t,n,r=!0){const{selectedRange:a}=this;let s;if(t==null)s=null;else{const u=this.selectionAnchor?.side??n,c=this.selectionAnchor?.lineNumber??t;s=this.buildSelectionRange(c,t,u,n)}_0(a??void 0,s??void 0)||(this.selectedRange=s,r&&this.notifySelectionChangeDelta(),this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection))}getIndexesFromSelection(t,n){if(this.pre==null)return;const r=this.getLineIndex(t.start,t.side),a=this.getLineIndex(t.end,t.endSide??t.side);return r!=null&&a!=null?{start:n?r[1]:r[0],end:n?a[1]:a[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;const t=this.pre.querySelectorAll("[data-selected-line]");for(const h of t)h.removeAttribute("data-selected-line");if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;const{children:n}=this.pre;if(n.length===0)return;if(n.length>2)throw console.error(n),new Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");const r=this.pre.getAttribute("data-diff-type")==="split",a=this.getIndexesFromSelection(this.selectedRange,r);if(a==null)throw console.error({rowRange:a,selectedRange:this.selectedRange}),new Error("InteractionManager.renderSelection: No valid rowRange");const s=a.start===a.end,u=Math.min(a.start,a.end),c=Math.max(a.start,a.end);for(const h of n){const[d,p]=h.children,b=p.children.length;if(b!==d.children.length)throw new Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");for(let g=0;g<b;g++){const v=p.children[g],_=d.children[g];if(!(v instanceof HTMLElement)||!(_ instanceof HTMLElement))continue;const x=this.parseLineIndex(v,r);if((x??0)>c)break;if(x==null||x<u)continue;let T=s?"single":x===u?"first":x===c?"last":"";v.setAttribute("data-selected-line",T),_.setAttribute("data-selected-line",T),_.nextSibling instanceof HTMLElement&&v.nextSibling instanceof HTMLElement&&(v.nextSibling.hasAttribute("data-line-annotation")||v.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(s?(T="last",v.setAttribute("data-selected-line","first")):x===u?T="":x===c&&v.setAttribute("data-selected-line",""),v.nextSibling.setAttribute("data-selected-line",T),_.nextSibling.setAttribute("data-selected-line",T))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.selectedRange??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.selectedRange??null)}notifySelectionStart(t){this.options.onLineSelectionStart?.(t)}notifySelectionEnd(t){this.options.onLineSelectionEnd?.(t)}toEventBaseProps(t){return this.mode==="file"?{type:"line",lineElement:t.lineElement,lineNumber:t.lineNumber,numberColumn:t.numberColumn,numberElement:t.numberElement}:{type:"diff-line",annotationSide:t.side,lineType:t.lineType,lineElement:t.lineElement,numberElement:t.numberElement,lineNumber:t.lineNumber,numberColumn:t.numberColumn}}buildSelectedLineRange(t,n){return this.buildSelectionRange(t.lineNumber,n.lineNumber,t.side,n.side)}buildSelectionRange(t,n,r,a){return{start:t,end:n,...r!=null?{side:r}:{},...r!==a&&a!=null?{endSide:a}:{}}}resolvePointerTarget(t){let n=!1,r,a,s,u,c,h,d,p;for(const v of t){if(!(v instanceof HTMLElement))continue;if(p==null&&v.hasAttribute("data-merge-conflict-action")){const O=v.getAttribute("data-merge-conflict-action")??void 0,A=v.getAttribute("data-merge-conflict-conflict-index")??void 0,C=A!=null?Number.parseInt(A,10):NaN;G2(O)&&Number.isFinite(C)&&(p={kind:"merge-conflict-action",resolution:O,conflictIndex:C})}const _=c==null?v.getAttribute("data-column-number")??void 0:void 0;if(_!=null){c=v,d=Number.parseInt(_,10),n=!0,r=N0(v),u=v.getAttribute("data-line-index")??void 0;continue}const x=s==null?v.getAttribute("data-line")??void 0:void 0;if(x!=null){s=v,d=Number.parseInt(x,10),r=N0(v),u=v.getAttribute("data-line-index")??void 0;continue}if(h==null&&v.hasAttribute("data-expand-button")){h={hunkIndex:void 0,direction:v.hasAttribute("data-expand-up")?"up":v.hasAttribute("data-expand-down")?"down":"both"};continue}const T=h!=null?v.getAttribute("data-expand-index")??void 0:void 0;if(h!=null&&T!=null){const O=Number.parseInt(T,10);Number.isNaN(O)||(h.hunkIndex=O);continue}if(a==null&&v.hasAttribute("data-code")){a=v;break}}if(p!=null)return p;if(h?.hunkIndex!=null)return{type:"line-info",hunkIndex:h.hunkIndex,direction:h.direction};if(s??=u!=null?L0(a,`[data-line][data-line-index="${u}"]`):void 0,c??=u!=null?L0(a,`[data-column-number][data-line-index="${u}"]`):void 0,a==null||s==null||c==null||r==null||d==null||Number.isNaN(d))return;const b=this.parseLineIndex(s,this.isSplitDiff());if(this.mode==="file")return{kind:"line",lineType:r,lineElement:s,lineNumber:d,numberColumn:n,numberElement:c,side:void 0,splitLineIndex:b};const g=(()=>{switch(r){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return a.hasAttribute("data-deletions")?"deletions":"additions"}})();return{kind:"line",lineType:r,lineElement:s,lineNumber:d,numberColumn:n,numberElement:c,side:g,splitLineIndex:b}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(t,n){const r=(t.getAttribute("data-line-index")??"").split(",").map(a=>Number.parseInt(a,10)).filter(a=>!Number.isNaN(a));if(n&&r.length===2)return r[1];if(!n)return r[0]}};function R0({enableGutterUtility:t,enableHoverUtility:n,lineHoverHighlight:r,onGutterUtilityClick:a,onLineClick:s,onLineEnter:u,onLineLeave:c,onLineNumberClick:h,renderGutterUtility:d,renderHoverUtility:p,__debugPointerEvents:b,enableLineSelection:g,onLineSelected:v,onLineSelectionStart:_,onLineSelectionChange:x,onLineSelectionEnd:T},O,A,C){return{enableGutterUtility:H2({enableGutterUtility:t,enableHoverUtility:n,renderGutterUtility:d,renderHoverUtility:p,onGutterUtilityClick:a}),usesCustomGutterUtility:d!=null||p!=null,lineHoverHighlight:r,onGutterUtilityClick:a,onHunkExpand:O,onMergeConflictActionClick:C,onLineClick:s,onLineEnter:u,onLineLeave:c,onLineNumberClick:h,__debugPointerEvents:b,enableLineSelection:g,onLineSelected:v,onLineSelectionStart:_,onLineSelectionChange:x,onLineSelectionEnd:T,getLineIndex:A}}function H2({enableGutterUtility:t,enableHoverUtility:n,renderGutterUtility:r,renderHoverUtility:a,onGutterUtilityClick:s}){if(t!==void 0&&n!==void 0)throw new Error("Cannot use both 'enableGutterUtility' and deprecated 'enableHoverUtility'. Use only 'enableGutterUtility'.");if(r!=null&&a!=null)throw new Error("Cannot use both 'renderGutterUtility' and deprecated 'renderHoverUtility'. Use only 'renderGutterUtility'.");if(s!=null&&(r!=null||a!=null))throw new Error("Cannot use both 'onGutterUtilityClick' and render utility callbacks ('renderGutterUtility'/'renderHoverUtility'). Use only one gutter utility API.");return t??n??!1}function Wo(t){return t!=null&&"kind"in t&&t.kind==="line"}function B2(t){return"type"in t&&t.type==="line-info"}function V2(t){return"kind"in t&&t.kind==="merge-conflict-action"}function G2(t){return t==="current"||t==="incoming"||t==="both"}function L0(t,n){const r=t?.querySelector(n);return r instanceof HTMLElement?r:void 0}function N0(t){const n=t.getAttribute("data-line-type");if(n!=null)switch(n){case"change-deletion":case"change-addition":case"context":case"context-expanded":return n;default:return}}function M0(t){for(const n of t)if(n instanceof HTMLElement&&n.hasAttribute("data-utility-button"))return!0;return!1}function ki(t="none",n,...r){switch(t){case"none":return;case"both":break;case"click":if(n!=="click")return;break;case"move":if(n!=="move")return;break}console.log(...r)}var $2=class{observedNodes=new Map;queuedUpdates=new Map;cleanUp(){this.resizeObserver?.disconnect(),this.observedNodes.clear(),this.queuedUpdates.clear()}resizeObserver;setup(t,n){this.resizeObserver??=new ResizeObserver(this.handleResizeObserver);const r=t.querySelectorAll("code"),a=new Map(this.observedNodes);this.observedNodes.clear();for(const s of r){let u=a.get(s);if(u!=null&&u.type!=="code")throw new Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let c=s.firstElementChild;c instanceof HTMLElement||(c=null),u!=null?(this.observedNodes.set(s,u),a.delete(s),u.numberElement!==c?(u.numberElement!=null&&this.resizeObserver.unobserve(u.numberElement),c!=null&&(this.resizeObserver.observe(c),a.delete(c),this.observedNodes.set(c,u)),u.numberElement=c):u.numberElement!=null&&(a.delete(u.numberElement),this.observedNodes.set(u.numberElement,u))):(u={type:"code",codeElement:s,numberElement:c,codeWidth:"auto",numberWidth:0},this.observedNodes.set(s,u),this.resizeObserver.observe(s),c!=null&&(this.observedNodes.set(c,u),this.resizeObserver.observe(c)))}if(r.length>1&&!n){const s=t.querySelectorAll('[data-line-annotation*=","]'),u=new Map;for(const c of s){if(!(c instanceof HTMLElement))continue;const{lineAnnotation:h=""}=c.dataset;if(!/^\d+,\d+$/.test(h)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:h,element:c});continue}let d=u.get(h);d==null&&(d=[],u.set(h,d)),d.push(c)}for(const[c,h]of u){if(h.length!==2){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",c,h);continue}const[d,p]=h,b=d.firstElementChild,g=p.firstElementChild;if(!(d instanceof HTMLElement)||!(p instanceof HTMLElement)||!(b instanceof HTMLElement)||!(g instanceof HTMLElement))continue;let v=a.get(b);if(v!=null){this.observedNodes.set(b,v),this.observedNodes.set(g,v),a.delete(b),a.delete(g);continue}v={type:"annotations",column1:{container:d,child:b,childHeight:b.getBoundingClientRect().height},column2:{container:p,child:g,childHeight:g.getBoundingClientRect().height},currentHeight:"auto"};const _=Math.max(v.column1.childHeight,v.column2.childHeight);this.applyNewHeight(v,_),this.observedNodes.set(b,v),this.observedNodes.set(g,v),this.resizeObserver.observe(b),this.resizeObserver.observe(g)}}for(const s of a.keys())s.isConnected&&(s.style.removeProperty("--diffs-column-content-width"),s.style.removeProperty("--diffs-column-number-width"),s.style.removeProperty("--diffs-column-width"),s.parentElement instanceof HTMLElement&&s.parentElement.style.removeProperty("--diffs-annotation-min-height")),this.resizeObserver.unobserve(s);a.clear()}handleResizeObserver=t=>{for(const n of t){const{target:r,borderBoxSize:a}=n;if(!(r instanceof HTMLElement)){console.error("FileDiff.handleResizeObserver: Invalid element for ResizeObserver",n);continue}const s=this.observedNodes.get(r);if(s==null){console.error("FileDiff.handleResizeObserver: Not a valid observed node",n);continue}const u=a[0];if(s.type==="annotations"){const c=(()=>{if(r===s.column1.child)return s.column1;if(r===s.column2.child)return s.column2})();if(c==null){console.error("FileDiff.handleResizeObserver: Couldn't find a column for",{item:s,target:r});continue}c.childHeight=u.blockSize;const h=Math.max(s.column1.childHeight,s.column2.childHeight);this.applyNewHeight(s,h)}else if(s.type==="code"){const c=[r,u.inlineSize],h=this.queuedUpdates.get(s)??[];h.push(c),this.queuedUpdates.set(s,h)}}this.handleColumnChange()};handleColumnChange=()=>{for(const[t,n]of this.queuedUpdates)for(const[r,a]of n)if(r===t.codeElement){const s=Math.max(Math.floor(a),0);if(s!==t.codeWidth){const u=Math.max(s-t.numberWidth,0);t.codeWidth=s===0?"auto":s,t.codeElement.style.setProperty("--diffs-column-content-width",`${u>0?`${u}px`:"auto"}`),t.codeElement.style.setProperty("--diffs-column-width",`${typeof t.codeWidth=="number"?`${t.codeWidth}px`:"auto"}`)}t.numberElement!=null&&typeof t.codeWidth=="number"&&t.numberWidth===0&&n.push([t.numberElement,t.numberElement.getBoundingClientRect().width])}else if(r===t.numberElement){const s=Math.max(Math.ceil(a),0);if(s!==t.numberWidth&&(t.numberWidth=s,t.codeElement.style.setProperty("--diffs-column-number-width",`${t.numberWidth===0?"auto":`${t.numberWidth}px`}`),t.codeWidth!=="auto")){const u=Math.max(t.codeWidth-t.numberWidth,0);t.codeElement.style.setProperty("--diffs-column-content-width",`${u===0?"auto":`${u}px`}`)}}this.queuedUpdates.clear()};applyNewHeight(t,n){n!==t.currentHeight&&(t.currentHeight=Math.max(n,0),t.column1.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`),t.column2.container.style.setProperty("--diffs-annotation-min-height",`${t.currentHeight}px`))}};const ol=new Map,uf=new Map,q2=new Map,Yf=new Set;function O0(t){for(const n of Array.isArray(t)?t:[t])if(!Yf.has(n))return!1;return!0}function D0(t,n){t=Array.isArray(t)?t:[t];for(const r of t){if(Yf.has(r.name))continue;let a=ol.get(r.name);a==null&&(a=r,ol.set(r.name,a)),Yf.add(a.name),n.loadLanguageSync(a.data)}}function Iy(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}const Y2="modulepreload",F2=function(t){return"/"+t},I0={},w=function(n,r,a){let s=Promise.resolve();if(r&&r.length>0){let p=function(b){return Promise.all(b.map(g=>Promise.resolve(g).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};var c=p;document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),d=h?.nonce||h?.getAttribute("nonce");s=p(r.map(b=>{if(b=F2(b),b in I0)return;I0[b]=!0;const g=b.endsWith(".css"),v=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${b}"]${v}`))return;const _=document.createElement("link");if(_.rel=g?"stylesheet":Y2,g||(_.as="script"),_.crossOrigin="",_.href=b,d&&_.setAttribute("nonce",d),document.head.appendChild(_),g)return new Promise((x,T)=>{_.addEventListener("load",x),_.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${b}`)))})}))}function u(h){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=h,window.dispatchEvent(d),!d.defaultPrevented)throw h}return s.then(h=>{for(const d of h||[])d.status==="rejected"&&u(d.reason);return n().catch(u)})};let wt=class extends Error{constructor(n){super(n),this.name="ShikiError"}};function X2(t){return Ch(t)}function Ch(t){return Array.isArray(t)?W2(t):t instanceof RegExp?t:typeof t=="object"?Q2(t):t}function W2(t){let n=[];for(let r=0,a=t.length;r<a;r++)n[r]=Ch(t[r]);return n}function Q2(t){let n={};for(let r in t)n[r]=Ch(t[r]);return n}function zy(t,...n){return n.forEach(r=>{for(let a in r)t[a]=r[a]}),t}function Py(t){const n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return n===0?t:~n===t.length-1?Py(t.substring(0,t.length-1)):t.substr(~n+1)}var cf=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Ps=class{static hasCaptures(t){return t===null?!1:(cf.lastIndex=0,cf.test(t))}static replaceCaptures(t,n,r){return t.replace(cf,(a,s,u,c)=>{let h=r[parseInt(s||u,10)];if(h){let d=n.substring(h.start,h.end);for(;d[0]===".";)d=d.substring(1);switch(c){case"downcase":return d.toLowerCase();case"upcase":return d.toUpperCase();default:return d}}else return a})}};function jy(t,n){return t<n?-1:t>n?1:0}function Uy(t,n){if(t===null&&n===null)return 0;if(!t)return-1;if(!n)return 1;let r=t.length,a=n.length;if(r===a){for(let s=0;s<r;s++){let u=jy(t[s],n[s]);if(u!==0)return u}return 0}return r-a}function z0(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Hy(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var By=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const n=this.fn(t);return this.cache.set(t,n),n}},du=class{constructor(t,n,r){this._colorMap=t,this._defaults=n,this._root=r}static createFromRawTheme(t,n){return this.createFromParsedTheme(J2(t),n)}static createFromParsedTheme(t,n){return tk(t,n)}_cachedMatchRoot=new By(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const n=t.scopeName,a=this._cachedMatchRoot.get(n).find(s=>K2(t.parent,s.parentScopes));return a?new Vy(a.fontStyle,a.foreground,a.background):null}},df=class Zs{constructor(n,r){this.parent=n,this.scopeName=r}static push(n,r){for(const a of r)n=new Zs(n,a);return n}static from(...n){let r=null;for(let a=0;a<n.length;a++)r=new Zs(r,n[a]);return r}push(n){return new Zs(this,n)}getSegments(){let n=this;const r=[];for(;n;)r.push(n.scopeName),n=n.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(n){return this===n?!0:this.parent===null?!1:this.parent.extends(n)}getExtensionIfDefined(n){const r=[];let a=this;for(;a&&a!==n;)r.push(a.scopeName),a=a.parent;return a===n?r.reverse():void 0}};function K2(t,n){if(n.length===0)return!0;for(let r=0;r<n.length;r++){let a=n[r],s=!1;if(a===">"){if(r===n.length-1)return!1;a=n[++r],s=!0}for(;t&&!Z2(t.scopeName,a);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Z2(t,n){return n===t||t.startsWith(n)&&t[n.length]==="."}var Vy=class{constructor(t,n,r){this.fontStyle=t,this.foregroundId=n,this.backgroundId=r}};function J2(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let n=t.settings,r=[],a=0;for(let s=0,u=n.length;s<u;s++){let c=n[s];if(!c.settings)continue;let h;if(typeof c.scope=="string"){let g=c.scope;g=g.replace(/^[,]+/,""),g=g.replace(/[,]+$/,""),h=g.split(",")}else Array.isArray(c.scope)?h=c.scope:h=[""];let d=-1;if(typeof c.settings.fontStyle=="string"){d=0;let g=c.settings.fontStyle.split(" ");for(let v=0,_=g.length;v<_;v++)switch(g[v]){case"italic":d=d|1;break;case"bold":d=d|2;break;case"underline":d=d|4;break;case"strikethrough":d=d|8;break}}let p=null;typeof c.settings.foreground=="string"&&z0(c.settings.foreground)&&(p=c.settings.foreground);let b=null;typeof c.settings.background=="string"&&z0(c.settings.background)&&(b=c.settings.background);for(let g=0,v=h.length;g<v;g++){let x=h[g].trim().split(" "),T=x[x.length-1],O=null;x.length>1&&(O=x.slice(0,x.length-1),O.reverse()),r[a++]=new ek(T,O,s,d,p,b)}}return r}var ek=class{constructor(t,n,r,a,s,u){this.scope=t,this.parentScopes=n,this.index=r,this.fontStyle=a,this.foreground=s,this.background=u}},Yt=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(Yt||{});function tk(t,n){t.sort((d,p)=>{let b=jy(d.scope,p.scope);return b!==0||(b=Uy(d.parentScopes,p.parentScopes),b!==0)?b:d.index-p.index});let r=0,a="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let d=t.shift();d.fontStyle!==-1&&(r=d.fontStyle),d.foreground!==null&&(a=d.foreground),d.background!==null&&(s=d.background)}let u=new nk(n),c=new Vy(r,u.getId(a),u.getId(s)),h=new rk(new Ff(0,null,-1,0,0),[]);for(let d=0,p=t.length;d<p;d++){let b=t[d];h.insert(0,b.scope,b.parentScopes,b.fontStyle,u.getId(b.foreground),u.getId(b.background))}return new du(u,c,h)}var nk=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let n=0,r=t.length;n<r;n++)this._color2id[t[n]]=n,this._id2color[n]=t[n]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let n=this._color2id[t];if(n)return n;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return n=++this._lastColorId,this._color2id[t]=n,this._id2color[n]=t,n}getColorMap(){return this._id2color.slice(0)}},ik=Object.freeze([]),Ff=class Gy{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(n,r,a,s,u){this.scopeDepth=n,this.parentScopes=r||ik,this.fontStyle=a,this.foreground=s,this.background=u}clone(){return new Gy(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(n){let r=[];for(let a=0,s=n.length;a<s;a++)r[a]=n[a].clone();return r}acceptOverwrite(n,r,a,s){this.scopeDepth>n?console.log("how did this happen?"):this.scopeDepth=n,r!==-1&&(this.fontStyle=r),a!==0&&(this.foreground=a),s!==0&&(this.background=s)}},rk=class Xf{constructor(n,r=[],a={}){this._mainRule=n,this._children=a,this._rulesWithParentScopes=r}_rulesWithParentScopes;static _cmpBySpecificity(n,r){if(n.scopeDepth!==r.scopeDepth)return r.scopeDepth-n.scopeDepth;let a=0,s=0;for(;n.parentScopes[a]===">"&&a++,r.parentScopes[s]===">"&&s++,!(a>=n.parentScopes.length||s>=r.parentScopes.length);){const u=r.parentScopes[s].length-n.parentScopes[a].length;if(u!==0)return u;a++,s++}return r.parentScopes.length-n.parentScopes.length}match(n){if(n!==""){let a=n.indexOf("."),s,u;if(a===-1?(s=n,u=""):(s=n.substring(0,a),u=n.substring(a+1)),this._children.hasOwnProperty(s))return this._children[s].match(u)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(Xf._cmpBySpecificity),r}insert(n,r,a,s,u,c){if(r===""){this._doInsertHere(n,a,s,u,c);return}let h=r.indexOf("."),d,p;h===-1?(d=r,p=""):(d=r.substring(0,h),p=r.substring(h+1));let b;this._children.hasOwnProperty(d)?b=this._children[d]:(b=new Xf(this._mainRule.clone(),Ff.cloneArr(this._rulesWithParentScopes)),this._children[d]=b),b.insert(n+1,p,a,s,u,c)}_doInsertHere(n,r,a,s,u){if(r===null){this._mainRule.acceptOverwrite(n,a,s,u);return}for(let c=0,h=this._rulesWithParentScopes.length;c<h;c++){let d=this._rulesWithParentScopes[c];if(Uy(d.parentScopes,r)===0){d.acceptOverwrite(n,a,s,u);return}}a===-1&&(a=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),u===0&&(u=this._mainRule.background),this._rulesWithParentScopes.push(new Ff(n,r,a,s,u))}},Wa=class Dn{static toBinaryStr(n){return n.toString(2).padStart(32,"0")}static print(n){const r=Dn.getLanguageId(n),a=Dn.getTokenType(n),s=Dn.getFontStyle(n),u=Dn.getForeground(n),c=Dn.getBackground(n);console.log({languageId:r,tokenType:a,fontStyle:s,foreground:u,background:c})}static getLanguageId(n){return(n&255)>>>0}static getTokenType(n){return(n&768)>>>8}static containsBalancedBrackets(n){return(n&1024)!==0}static getFontStyle(n){return(n&30720)>>>11}static getForeground(n){return(n&16744448)>>>15}static getBackground(n){return(n&4278190080)>>>24}static set(n,r,a,s,u,c,h){let d=Dn.getLanguageId(n),p=Dn.getTokenType(n),b=Dn.containsBalancedBrackets(n)?1:0,g=Dn.getFontStyle(n),v=Dn.getForeground(n),_=Dn.getBackground(n);return r!==0&&(d=r),a!==8&&(p=a),s!==null&&(b=s?1:0),u!==-1&&(g=u),c!==0&&(v=c),h!==0&&(_=h),(d<<0|p<<8|b<<10|g<<11|v<<15|_<<24)>>>0}};function fu(t,n){const r=[],a=ak(t);let s=a.next();for(;s!==null;){let d=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":d=1;break;case"L":d=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=a.next()}let p=c();if(r.push({matcher:p,priority:d}),s!==",")break;s=a.next()}return r;function u(){if(s==="-"){s=a.next();const d=u();return p=>!!d&&!d(p)}if(s==="("){s=a.next();const d=h();return s===")"&&(s=a.next()),d}if(P0(s)){const d=[];do d.push(s),s=a.next();while(P0(s));return p=>n(d,p)}return null}function c(){const d=[];let p=u();for(;p;)d.push(p),p=u();return b=>d.every(g=>g(b))}function h(){const d=[];let p=c();for(;p&&(d.push(p),s==="|"||s===",");){do s=a.next();while(s==="|"||s===",");p=c()}return b=>d.some(g=>g(b))}}function P0(t){return!!t&&!!t.match(/[\w\.:]+/)}function ak(t){let n=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=n.exec(t);return{next:()=>{if(!r)return null;const a=r[0];return r=n.exec(t),a}}}function $y(t){typeof t.dispose=="function"&&t.dispose()}var ll=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},ok=class{constructor(t,n){this.scopeName=t,this.ruleName=n}toKey(){return`${this.scopeName}#${this.ruleName}`}},lk=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const n=t.toKey();this._seenReferenceKeys.has(n)||(this._seenReferenceKeys.add(n),this._references.push(t))}},sk=class{constructor(t,n){this.repo=t,this.initialScopeName=n,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ll(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const n=new lk;for(const r of t)uk(r,this.initialScopeName,this.repo,n);for(const r of n.references)if(r instanceof ll){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function uk(t,n,r,a){const s=r.lookup(t.scopeName);if(!s){if(t.scopeName===n)throw new Error(`No grammar provided for <${n}>`);return}const u=r.lookup(n);t instanceof ll?Js({baseGrammar:u,selfGrammar:s},a):Wf(t.ruleName,{baseGrammar:u,selfGrammar:s,repository:s.repository},a);const c=r.injections(t.scopeName);if(c)for(const h of c)a.add(new ll(h))}function Wf(t,n,r){if(n.repository&&n.repository[t]){const a=n.repository[t];hu([a],n,r)}}function Js(t,n){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&hu(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},n),t.selfGrammar.injections&&hu(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},n)}function hu(t,n,r){for(const a of t){if(r.visitedRule.has(a))continue;r.visitedRule.add(a);const s=a.repository?zy({},n.repository,a.repository):n.repository;Array.isArray(a.patterns)&&hu(a.patterns,{...n,repository:s},r);const u=a.include;if(!u)continue;const c=qy(u);switch(c.kind){case 0:Js({...n,selfGrammar:n.baseGrammar},r);break;case 1:Js(n,r);break;case 2:Wf(c.ruleName,{...n,repository:s},r);break;case 3:case 4:const h=c.scopeName===n.selfGrammar.scopeName?n.selfGrammar:c.scopeName===n.baseGrammar.scopeName?n.baseGrammar:void 0;if(h){const d={baseGrammar:n.baseGrammar,selfGrammar:h,repository:s};c.kind===4?Wf(c.ruleName,d,r):Js(d,r)}else c.kind===4?r.add(new ok(c.scopeName,c.ruleName)):r.add(new ll(c.scopeName));break}}}var ck=class{kind=0},dk=class{kind=1},fk=class{constructor(t){this.ruleName=t}kind=2},hk=class{constructor(t){this.scopeName=t}kind=3},mk=class{constructor(t,n){this.scopeName=t,this.ruleName=n}kind=4};function qy(t){if(t==="$base")return new ck;if(t==="$self")return new dk;const n=t.indexOf("#");if(n===-1)return new hk(t);if(n===0)return new fk(t.substring(1));{const r=t.substring(0,n),a=t.substring(n+1);return new mk(r,a)}}var pk=/\\(\d+)/,j0=/\\(\d+)/g,gk=-1,Yy=-2;var pl=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,n,r,a){this.$location=t,this.id=n,this._name=r||null,this._nameIsCapturing=Ps.hasCaptures(this._name),this._contentName=a||null,this._contentNameIsCapturing=Ps.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Py(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,n){return!this._nameIsCapturing||this._name===null||t===null||n===null?this._name:Ps.replaceCaptures(this._name,t,n)}getContentName(t,n){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Ps.replaceCaptures(this._contentName,t,n)}},bk=class extends pl{retokenizeCapturedWithRuleId;constructor(t,n,r,a,s){super(t,n,r,a),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,r,a){throw new Error("Not supported!")}},vk=class extends pl{_match;captures;_cachedCompiledPatterns;constructor(t,n,r,a,s){super(t,n,r,null),this._match=new sl(a,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t).compileAG(t,r,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ul,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},U0=class extends pl{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,n,r,a,s){super(t,n,r,a),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const r of this.patterns)t.getRule(r).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t).compileAG(t,r,a)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ul,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Qf=class extends pl{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,n,r,a,s,u,c,h,d,p){super(t,n,r,a),this._begin=new sl(s,this.id),this.beginCaptures=u,this._end=new sl(c||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=h,this.applyEndPatternLast=d||!1,this.patterns=p.patterns,this.hasMissingPatterns=p.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,a)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ul;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},mu=class extends pl{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,n,r,a,s,u,c,h,d){super(t,n,r,a),this._begin=new sl(s,this.id),this.beginCaptures=u,this.whileCaptures=h,this._while=new sl(c,Yy),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,a){return this._getCachedCompiledPatterns(t).compileAG(t,r,a)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ul;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,r,a){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,a)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ul,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},Fy=class qt{static createCaptureRule(n,r,a,s,u){return n.registerRule(c=>new bk(r,c,a,s,u))}static getCompiledRuleId(n,r,a){return n.id||r.registerRule(s=>{if(n.id=s,n.match)return new vk(n.$vscodeTextmateLocation,n.id,n.name,n.match,qt._compileCaptures(n.captures,r,a));if(typeof n.begin>"u"){n.repository&&(a=zy({},a,n.repository));let u=n.patterns;return typeof u>"u"&&n.include&&(u=[{include:n.include}]),new U0(n.$vscodeTextmateLocation,n.id,n.name,n.contentName,qt._compilePatterns(u,r,a))}return n.while?new mu(n.$vscodeTextmateLocation,n.id,n.name,n.contentName,n.begin,qt._compileCaptures(n.beginCaptures||n.captures,r,a),n.while,qt._compileCaptures(n.whileCaptures||n.captures,r,a),qt._compilePatterns(n.patterns,r,a)):new Qf(n.$vscodeTextmateLocation,n.id,n.name,n.contentName,n.begin,qt._compileCaptures(n.beginCaptures||n.captures,r,a),n.end,qt._compileCaptures(n.endCaptures||n.captures,r,a),n.applyEndPatternLast,qt._compilePatterns(n.patterns,r,a))}),n.id}static _compileCaptures(n,r,a){let s=[];if(n){let u=0;for(const c in n){if(c==="$vscodeTextmateLocation")continue;const h=parseInt(c,10);h>u&&(u=h)}for(let c=0;c<=u;c++)s[c]=null;for(const c in n){if(c==="$vscodeTextmateLocation")continue;const h=parseInt(c,10);let d=0;n[c].patterns&&(d=qt.getCompiledRuleId(n[c],r,a)),s[h]=qt.createCaptureRule(r,n[c].$vscodeTextmateLocation,n[c].name,n[c].contentName,d)}}return s}static _compilePatterns(n,r,a){let s=[];if(n)for(let u=0,c=n.length;u<c;u++){const h=n[u];let d=-1;if(h.include){const p=qy(h.include);switch(p.kind){case 0:case 1:d=qt.getCompiledRuleId(a[h.include],r,a);break;case 2:let b=a[p.ruleName];b&&(d=qt.getCompiledRuleId(b,r,a));break;case 3:case 4:const g=p.scopeName,v=p.kind===4?p.ruleName:null,_=r.getExternalGrammar(g,a);if(_)if(v){let x=_.repository[v];x&&(d=qt.getCompiledRuleId(x,r,_.repository))}else d=qt.getCompiledRuleId(_.repository.$self,r,_.repository);break}}else d=qt.getCompiledRuleId(h,r,a);if(d!==-1){const p=r.getRule(d);let b=!1;if((p instanceof U0||p instanceof Qf||p instanceof mu)&&p.hasMissingPatterns&&p.patterns.length===0&&(b=!0),b)continue;s.push(d)}}return{patterns:s,hasMissingPatterns:(n?n.length:0)!==s.length}}},sl=class Xy{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(n,r){if(n&&typeof n=="string"){const a=n.length;let s=0,u=[],c=!1;for(let h=0;h<a;h++)if(n.charAt(h)==="\\"&&h+1<a){const p=n.charAt(h+1);p==="z"?(u.push(n.substring(s,h)),u.push("$(?!\\n)(?<!\\n)"),s=h+2):(p==="A"||p==="G")&&(c=!0),h++}this.hasAnchor=c,s===0?this.source=n:(u.push(n.substring(s,a)),this.source=u.join(""))}else this.hasAnchor=!1,this.source=n;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=pk.test(this.source):this.hasBackReferences=!1}clone(){return new Xy(this.source,this.ruleId)}setSource(n){this.source!==n&&(this.source=n,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(n,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let a=r.map(s=>n.substring(s.start,s.end));return j0.lastIndex=0,this.source.replace(j0,(s,u)=>Hy(a[parseInt(u,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=[],r=[],a=[],s=[],u,c,h,d;for(u=0,c=this.source.length;u<c;u++)h=this.source.charAt(u),n[u]=h,r[u]=h,a[u]=h,s[u]=h,h==="\\"&&u+1<c&&(d=this.source.charAt(u+1),d==="A"?(n[u+1]="",r[u+1]="",a[u+1]="A",s[u+1]="A"):d==="G"?(n[u+1]="",r[u+1]="G",a[u+1]="",s[u+1]="G"):(n[u+1]=d,r[u+1]=d,a[u+1]=d,s[u+1]=d),u++);return{A0_G0:n.join(""),A0_G1:r.join(""),A1_G0:a.join(""),A1_G1:s.join("")}}resolveAnchors(n,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:n?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ul=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,n){this._items[t].source!==n&&(this._disposeCaches(),this._items[t].setSource(n))}compile(t){if(!this._cached){let n=this._items.map(r=>r.source);this._cached=new H0(t,n,this._items.map(r=>r.ruleId))}return this._cached}compileAG(t,n,r){return this._hasAnchors?n?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,n,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,n,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,n,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,n,r)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,n,r){let a=this._items.map(s=>s.resolveAnchors(n,r));return new H0(t,a,this._items.map(s=>s.ruleId))}},H0=class{constructor(t,n,r){this.regExps=n,this.rules=r,this.scanner=t.createOnigScanner(n)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let n=0,r=this.rules.length;n<r;n++)t.push(" - "+this.rules[n]+": "+this.regExps[n]);return t.join(`
|
|
19
|
+
`)}findNextMatchSync(t,n,r){const a=this.scanner.findNextMatchSync(t,n,r);return a?{ruleId:this.rules[a.index],captureIndices:a.captureIndices}:null}},ff=class{constructor(t,n){this.languageId=t,this.tokenType=n}},yk=class Kf{_defaultAttributes;_embeddedLanguagesMatcher;constructor(n,r){this._defaultAttributes=new ff(n,8),this._embeddedLanguagesMatcher=new _k(Object.entries(r||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(n){return n===null?Kf._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(n)}static _NULL_SCOPE_METADATA=new ff(0,0);_getBasicScopeAttributes=new By(n=>{const r=this._scopeToLanguage(n),a=this._toStandardTokenType(n);return new ff(r,a)});_scopeToLanguage(n){return this._embeddedLanguagesMatcher.match(n)||0}_toStandardTokenType(n){const r=n.match(Kf.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},_k=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const n=t.map(([r,a])=>Hy(r));n.sort(),n.reverse(),this.scopesRegExp=new RegExp(`^((${n.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const n=t.match(this.scopesRegExp);if(n)return this.values.get(n[1])}},B0=class{constructor(t,n){this.stack=t,this.stoppedEarly=n}};function Wy(t,n,r,a,s,u,c,h){const d=n.content.length;let p=!1,b=-1;if(c){const _=xk(t,n,r,a,s,u);s=_.stack,a=_.linePos,r=_.isFirstLine,b=_.anchorPosition}const g=Date.now();for(;!p;){if(h!==0&&Date.now()-g>h)return new B0(s,!0);v()}return new B0(s,!1);function v(){const _=Sk(t,n,r,a,s,b);if(!_){u.produce(s,d),p=!0;return}const x=_.captureIndices,T=_.matchedRuleId,O=x&&x.length>0?x[0].end>a:!1;if(T===gk){const A=s.getRule(t);u.produce(s,x[0].start),s=s.withContentNameScopesList(s.nameScopesList),Jo(t,n,r,s,u,A.endCaptures,x),u.produce(s,x[0].end);const C=s;if(s=s.parent,b=C.getAnchorPos(),!O&&C.getEnterPos()===a){s=C,u.produce(s,d),p=!0;return}}else{const A=t.getRule(T);u.produce(s,x[0].start);const C=s,k=A.getName(n.content,x),I=s.contentNameScopesList.pushAttributed(k,t);if(s=s.push(T,a,b,x[0].end===d,null,I,I),A instanceof Qf){const M=A;Jo(t,n,r,s,u,M.beginCaptures,x),u.produce(s,x[0].end),b=x[0].end;const U=M.getContentName(n.content,x),H=I.pushAttributed(U,t);if(s=s.withContentNameScopesList(H),M.endHasBackReferences&&(s=s.withEndRule(M.getEndWithResolvedBackReferences(n.content,x))),!O&&C.hasSameRuleAs(s)){s=s.pop(),u.produce(s,d),p=!0;return}}else if(A instanceof mu){const M=A;Jo(t,n,r,s,u,M.beginCaptures,x),u.produce(s,x[0].end),b=x[0].end;const U=M.getContentName(n.content,x),H=I.pushAttributed(U,t);if(s=s.withContentNameScopesList(H),M.whileHasBackReferences&&(s=s.withEndRule(M.getWhileWithResolvedBackReferences(n.content,x))),!O&&C.hasSameRuleAs(s)){s=s.pop(),u.produce(s,d),p=!0;return}}else if(Jo(t,n,r,s,u,A.captures,x),u.produce(s,x[0].end),s=s.pop(),!O){s=s.safePop(),u.produce(s,d),p=!0;return}}x[0].end>a&&(a=x[0].end,r=!1)}}function xk(t,n,r,a,s,u){let c=s.beginRuleCapturedEOL?0:-1;const h=[];for(let d=s;d;d=d.pop()){const p=d.getRule(t);p instanceof mu&&h.push({rule:p,stack:d})}for(let d=h.pop();d;d=h.pop()){const{ruleScanner:p,findOptions:b}=Ck(d.rule,t,d.stack.endRule,r,a===c),g=p.findNextMatchSync(n,a,b);if(g){if(g.ruleId!==Yy){s=d.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(u.produce(d.stack,g.captureIndices[0].start),Jo(t,n,r,d.stack,u,d.rule.whileCaptures,g.captureIndices),u.produce(d.stack,g.captureIndices[0].end),c=g.captureIndices[0].end,g.captureIndices[0].end>a&&(a=g.captureIndices[0].end,r=!1))}else{s=d.stack.pop();break}}return{stack:s,linePos:a,anchorPosition:c,isFirstLine:r}}function Sk(t,n,r,a,s,u){const c=Ek(t,n,r,a,s,u),h=t.getInjections();if(h.length===0)return c;const d=wk(h,t,n,r,a,s,u);if(!d)return c;if(!c)return d;const p=c.captureIndices[0].start,b=d.captureIndices[0].start;return b<p||d.priorityMatch&&b===p?d:c}function Ek(t,n,r,a,s,u){const c=s.getRule(t),{ruleScanner:h,findOptions:d}=Qy(c,t,s.endRule,r,a===u),p=h.findNextMatchSync(n,a,d);return p?{captureIndices:p.captureIndices,matchedRuleId:p.ruleId}:null}function wk(t,n,r,a,s,u,c){let h=Number.MAX_VALUE,d=null,p,b=0;const g=u.contentNameScopesList.getScopeNames();for(let v=0,_=t.length;v<_;v++){const x=t[v];if(!x.matcher(g))continue;const T=n.getRule(x.ruleId),{ruleScanner:O,findOptions:A}=Qy(T,n,null,a,s===c),C=O.findNextMatchSync(r,s,A);if(!C)continue;const k=C.captureIndices[0].start;if(!(k>=h)&&(h=k,d=C.captureIndices,p=C.ruleId,b=x.priority,h===s))break}return d?{priorityMatch:b===-1,captureIndices:d,matchedRuleId:p}:null}function Qy(t,n,r,a,s){return{ruleScanner:t.compileAG(n,r,a,s),findOptions:0}}function Ck(t,n,r,a,s){return{ruleScanner:t.compileWhileAG(n,r,a,s),findOptions:0}}function Jo(t,n,r,a,s,u,c){if(u.length===0)return;const h=n.content,d=Math.min(u.length,c.length),p=[],b=c[0].end;for(let g=0;g<d;g++){const v=u[g];if(v===null)continue;const _=c[g];if(_.length===0)continue;if(_.start>b)break;for(;p.length>0&&p[p.length-1].endPos<=_.start;)s.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop();if(p.length>0?s.produceFromScopes(p[p.length-1].scopes,_.start):s.produce(a,_.start),v.retokenizeCapturedWithRuleId){const T=v.getName(h,c),O=a.contentNameScopesList.pushAttributed(T,t),A=v.getContentName(h,c),C=O.pushAttributed(A,t),k=a.push(v.retokenizeCapturedWithRuleId,_.start,-1,!1,null,O,C),I=t.createOnigString(h.substring(0,_.end));Wy(t,I,r&&_.start===0,_.start,k,s,!1,0),$y(I);continue}const x=v.getName(h,c);if(x!==null){const O=(p.length>0?p[p.length-1].scopes:a.contentNameScopesList).pushAttributed(x,t);p.push(new Ak(O,_.end))}}for(;p.length>0;)s.produceFromScopes(p[p.length-1].scopes,p[p.length-1].endPos),p.pop()}var Ak=class{scopes;endPos;constructor(t,n){this.scopes=t,this.endPos=n}};function kk(t,n,r,a,s,u,c,h){return new Rk(t,n,r,a,s,u,c,h)}function V0(t,n,r,a,s){const u=fu(n,pu),c=Fy.getCompiledRuleId(r,a,s.repository);for(const h of u)t.push({debugSelector:n,matcher:h.matcher,ruleId:c,grammar:s,priority:h.priority})}function pu(t,n){if(n.length<t.length)return!1;let r=0;return t.every(a=>{for(let s=r;s<n.length;s++)if(Tk(n[s],a))return r=s+1,!0;return!1})}function Tk(t,n){if(!t)return!1;if(t===n)return!0;const r=n.length;return t.length>r&&t.substr(0,r)===n&&t[r]==="."}var Rk=class{constructor(t,n,r,a,s,u,c,h){if(this._rootScopeName=t,this.balancedBracketSelectors=u,this._onigLib=h,this._basicScopeAttributesProvider=new yk(r,a),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=c,this._grammar=G0(n,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const d of Object.keys(s)){const p=fu(d,pu);for(const b of p)this._tokenTypeMatchers.push({matcher:b.matcher,type:s[d]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},n=[],r=this._rootScopeName,a=t.lookup(r);if(a){const s=a.injections;if(s)for(let c in s)V0(n,c,s[c],this,a);const u=this._grammarRepository.injections(r);u&&u.forEach(c=>{const h=this.getExternalGrammar(c);if(h){const d=h.injectionSelector;d&&V0(n,d,h,this,h)}})}return n.sort((s,u)=>s.priority-u.priority),n}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const n=++this._lastRuleId,r=t(n);return this._ruleId2desc[n]=r,r}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,n){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const r=this._grammarRepository.lookup(t);if(r)return this._includedGrammars[t]=G0(r,n&&n.$base),this._includedGrammars[t]}}tokenizeLine(t,n,r=0){const a=this._tokenize(t,n,!1,r);return{tokens:a.lineTokens.getResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}tokenizeLine2(t,n,r=0){const a=this._tokenize(t,n,!0,r);return{tokens:a.lineTokens.getBinaryResult(a.ruleStack,a.lineLength),ruleStack:a.ruleStack,stoppedEarly:a.stoppedEarly}}_tokenize(t,n,r,a){this._rootId===-1&&(this._rootId=Fy.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!n||n===Zf.NULL){s=!0;const p=this._basicScopeAttributesProvider.getDefaultAttributes(),b=this.themeProvider.getDefaults(),g=Wa.set(0,p.languageId,p.tokenType,null,b.fontStyle,b.foregroundId,b.backgroundId),v=this.getRule(this._rootId).getName(null,null);let _;v?_=il.createRootAndLookUpScopeName(v,g,this):_=il.createRoot("unknown",g),n=new Zf(null,this._rootId,-1,-1,!1,null,_,_)}else s=!1,n.reset();t=t+`
|
|
20
|
+
`;const u=this.createOnigString(t),c=u.content.length,h=new Nk(r,t,this._tokenTypeMatchers,this.balancedBracketSelectors),d=Wy(this,u,s,0,n,h,!0,a);return $y(u),{lineLength:c,lineTokens:h,ruleStack:d.stack,stoppedEarly:d.stoppedEarly}}};function G0(t,n){return t=X2(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=n||t.repository.$self,t}var il=class ii{constructor(n,r,a){this.parent=n,this.scopePath=r,this.tokenAttributes=a}static fromExtension(n,r){let a=n,s=n?.scopePath??null;for(const u of r)s=df.push(s,u.scopeNames),a=new ii(a,s,u.encodedTokenAttributes);return a}static createRoot(n,r){return new ii(null,new df(null,n),r)}static createRootAndLookUpScopeName(n,r,a){const s=a.getMetadataForScope(n),u=new df(null,n),c=a.themeProvider.themeMatch(u),h=ii.mergeAttributes(r,s,c);return new ii(null,u,h)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(n){return ii.equals(this,n)}static equals(n,r){do{if(n===r||!n&&!r)return!0;if(!n||!r||n.scopeName!==r.scopeName||n.tokenAttributes!==r.tokenAttributes)return!1;n=n.parent,r=r.parent}while(!0)}static mergeAttributes(n,r,a){let s=-1,u=0,c=0;return a!==null&&(s=a.fontStyle,u=a.foregroundId,c=a.backgroundId),Wa.set(n,r.languageId,r.tokenType,null,s,u,c)}pushAttributed(n,r){if(n===null)return this;if(n.indexOf(" ")===-1)return ii._pushAttributed(this,n,r);const a=n.split(/ /g);let s=this;for(const u of a)s=ii._pushAttributed(s,u,r);return s}static _pushAttributed(n,r,a){const s=a.getMetadataForScope(r),u=n.scopePath.push(r),c=a.themeProvider.themeMatch(u),h=ii.mergeAttributes(n.tokenAttributes,s,c);return new ii(n,u,h)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(n){const r=[];let a=this;for(;a&&a!==n;)r.push({encodedTokenAttributes:a.tokenAttributes,scopeNames:a.scopePath.getExtensionIfDefined(a.parent?.scopePath??null)}),a=a.parent;return a===n?r.reverse():void 0}},Zf=class zr{constructor(n,r,a,s,u,c,h,d){this.parent=n,this.ruleId=r,this.beginRuleCapturedEOL=u,this.endRule=c,this.nameScopesList=h,this.contentNameScopesList=d,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=a,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new zr(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(n){return n===null?!1:zr._equals(this,n)}static _equals(n,r){return n===r?!0:this._structuralEquals(n,r)?il.equals(n.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(n,r){do{if(n===r||!n&&!r)return!0;if(!n||!r||n.depth!==r.depth||n.ruleId!==r.ruleId||n.endRule!==r.endRule)return!1;n=n.parent,r=r.parent}while(!0)}clone(){return this}static _reset(n){for(;n;)n._enterPos=-1,n._anchorPos=-1,n=n.parent}reset(){zr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(n,r,a,s,u,c,h){return new zr(this,n,r,a,s,u,c,h)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(n){return n.getRule(this.ruleId)}toString(){const n=[];return this._writeString(n,0),"["+n.join(",")+"]"}_writeString(n,r){return this.parent&&(r=this.parent._writeString(n,r)),n[r++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,r}withContentNameScopesList(n){return this.contentNameScopesList===n?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,n)}withEndRule(n){return this.endRule===n?this:new zr(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,n,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(n){let r=this;for(;r&&r._enterPos===n._enterPos;){if(r.ruleId===n.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(n,r){const a=il.fromExtension(n?.nameScopesList??null,r.nameScopesList);return new zr(n,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,a,il.fromExtension(a,r.contentNameScopesList))}},Lk=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,n){this.balancedBracketScopes=t.flatMap(r=>r==="*"?(this.allowAny=!0,[]):fu(r,pu).map(a=>a.matcher)),this.unbalancedBracketScopes=n.flatMap(r=>fu(r,pu).map(a=>a.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const n of this.unbalancedBracketScopes)if(n(t))return!1;for(const n of this.balancedBracketScopes)if(n(t))return!0;return this.allowAny}},Nk=class{constructor(t,n,r,a){this.balancedBracketSelectors=a,this._emitBinaryTokens=t,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,n){this.produceFromScopes(t.contentNameScopesList,n)}produceFromScopes(t,n){if(this._lastTokenEndIndex>=n)return;if(this._emitBinaryTokens){let a=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const u=t?.getScopeNames()??[];for(const c of this._tokenTypeOverrides)c.matcher(u)&&(a=Wa.set(a,0,c.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(u))}if(s&&(a=Wa.set(a,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===a){this._lastTokenEndIndex=n;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(a),this._lastTokenEndIndex=n;return}const r=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:n,scopes:r}),this._lastTokenEndIndex=n}getResult(t,n){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===n-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,n),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,n){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===n-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,n),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let a=0,s=this._binaryTokens.length;a<s;a++)r[a]=this._binaryTokens[a];return r}},Mk=class{constructor(t,n){this._onigLib=n,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,n){this._rawGrammars.set(t.scopeName,t),n&&this._injectionGrammars.set(t.scopeName,n)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,n,r,a,s){if(!this._grammars.has(t)){let u=this._rawGrammars.get(t);if(!u)return null;this._grammars.set(t,kk(t,u,n,r,a,s,this,this._onigLib))}return this._grammars.get(t)}},Ok=class{_options;_syncRegistry;_ensureGrammarCache;constructor(n){this._options=n,this._syncRegistry=new Mk(du.createFromRawTheme(n.theme,n.colorMap),n.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(n,r){this._syncRegistry.setTheme(du.createFromRawTheme(n,r))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(n,r,a){return this.loadGrammarWithConfiguration(n,r,{embeddedLanguages:a})}loadGrammarWithConfiguration(n,r,a){return this._loadGrammar(n,r,a.embeddedLanguages,a.tokenTypes,new Lk(a.balancedBracketSelectors||[],a.unbalancedBracketSelectors||[]))}loadGrammar(n){return this._loadGrammar(n,0,null,null,null)}_loadGrammar(n,r,a,s,u){const c=new sk(this._syncRegistry,n);for(;c.Q.length>0;)c.Q.map(h=>this._loadSingleGrammar(h.scopeName)),c.processQueue();return this._grammarForScopeName(n,r,a,s,u)}_loadSingleGrammar(n){this._ensureGrammarCache.has(n)||(this._doLoadSingleGrammar(n),this._ensureGrammarCache.set(n,!0))}_doLoadSingleGrammar(n){const r=this._options.loadGrammar(n);if(r){const a=typeof this._options.getInjections=="function"?this._options.getInjections(n):void 0;this._syncRegistry.addGrammar(r,a)}}addGrammar(n,r=[],a=0,s=null){return this._syncRegistry.addGrammar(n,r),this._grammarForScopeName(n.scopeName,a,s)}_grammarForScopeName(n,r=0,a=null,s=null,u=null){return this._syncRegistry.grammarForScopeName(n,r,a,s,u)}},Jf=Zf.NULL;function gu(t,n){const r=typeof t=="string"?{}:{...t.colorReplacements},a=typeof t=="string"?t:t.name;for(const[s,u]of Object.entries(n?.colorReplacements||{}))typeof u=="string"?r[s]=u:s===a&&Object.assign(r,u);return r}function hr(t,n){return t&&(n?.[t?.toLowerCase()]||t)}function Dk(t){return Array.isArray(t)?t:[t]}async function Ky(t){return Promise.resolve(typeof t=="function"?t():t).then(n=>n.default||n)}function Ah(t){return!t||["plaintext","txt","text","plain"].includes(t)}function Zy(t){return t==="ansi"||Ah(t)}function kh(t){return t==="none"}function Jy(t){return kh(t)}function e1(t,n){if(!n)return t;t.properties||={},t.properties.class||=[],typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const r=Array.isArray(n)?n:n.split(/\s+/g);for(const a of r)a&&!t.properties.class.includes(a)&&t.properties.class.push(a);return t}function Tu(t,n=!1){if(t.length===0)return[["",0]];const r=t.split(/(\r?\n)/g);let a=0;const s=[];for(let u=0;u<r.length;u+=2){const c=n?r[u]+(r[u+1]||""):r[u];s.push([c,a]),a+=r[u].length,a+=r[u+1]?.length||0}return s}function Ik(t){const n=Tu(t,!0).map(([s])=>s);function r(s){if(s===t.length)return{line:n.length-1,character:n[n.length-1].length};let u=s,c=0;for(const h of n){if(u<h.length)break;u-=h.length,c++}return{line:c,character:u}}function a(s,u){let c=0;for(let h=0;h<s;h++)c+=n[h].length;return c+=u,c}return{lines:n,indexToPos:r,posToIndex:a}}const Th="light-dark()",zk=["color","background-color"];function Pk(t,n){let r=0;const a=[];for(const s of n)s>r&&a.push({...t,content:t.content.slice(r,s),offset:t.offset+r}),r=s;return r<t.content.length&&a.push({...t,content:t.content.slice(r),offset:t.offset+r}),a}function jk(t,n){const r=Array.from(n instanceof Set?n:new Set(n)).sort((a,s)=>a-s);return r.length?t.map(a=>a.flatMap(s=>{const u=r.filter(c=>s.offset<c&&c<s.offset+s.content.length).map(c=>c-s.offset).sort((c,h)=>c-h);return u.length?Pk(s,u):s})):t}function Uk(t,n,r,a,s="css-vars"){const u={content:t.content,explanation:t.explanation,offset:t.offset},c=n.map(b=>bu(t.variants[b])),h=new Set(c.flatMap(b=>Object.keys(b))),d={},p=(b,g)=>{const v=g==="color"?"":g==="background-color"?"-bg":`-${g}`;return r+n[b]+(g==="color"?"":v)};return c.forEach((b,g)=>{for(const v of h){const _=b[v]||"inherit";if(g===0&&a&&zk.includes(v))if(a===Th&&c.length>1){const x=n.findIndex(C=>C==="light"),T=n.findIndex(C=>C==="dark");if(x===-1||T===-1)throw new wt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const O=c[x][v]||"inherit",A=c[T][v]||"inherit";d[v]=`light-dark(${O}, ${A})`,s==="css-vars"&&(d[p(g,v)]=_)}else d[v]=_;else s==="css-vars"&&(d[p(g,v)]=_)}}),u.htmlStyle=d,u}function bu(t){const n={};if(t.color&&(n.color=t.color),t.bgColor&&(n["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&Yt.Italic&&(n["font-style"]="italic"),t.fontStyle&Yt.Bold&&(n["font-weight"]="bold");const r=[];t.fontStyle&Yt.Underline&&r.push("underline"),t.fontStyle&Yt.Strikethrough&&r.push("line-through"),r.length&&(n["text-decoration"]=r.join(" "))}return n}function eh(t){return typeof t=="string"?t:Object.entries(t).map(([n,r])=>`${n}:${r}`).join(";")}const t1=new WeakMap;function Ru(t,n){t1.set(t,n)}function cl(t){return t1.get(t)}class Za{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(n,r){return new Za(Object.fromEntries(Dk(r).map(a=>[a,Jf])),n)}constructor(...n){if(n.length===2){const[r,a]=n;this.lang=a,this._stacks=r}else{const[r,a,s]=n;this.lang=a,this._stacks={[s]:r}}}getInternalStack(n=this.theme){return this._stacks[n]}getScopes(n=this.theme){return Hk(this._stacks[n])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Hk(t){const n=[],r=new Set;function a(s){if(r.has(s))return;r.add(s);const u=s?.nameScopesList?.scopeName;u&&n.push(u),s.parent&&a(s.parent)}return a(t),n}function Bk(t,n){if(!(t instanceof Za))throw new wt("Invalid grammar state");return t.getInternalStack(n)}function Vk(){const t=new WeakMap;function n(r){if(!t.has(r.meta)){let a=function(c){if(typeof c=="number"){if(c<0||c>r.source.length)throw new wt(`Invalid decoration offset: ${c}. Code length: ${r.source.length}`);return{...s.indexToPos(c),offset:c}}else{const h=s.lines[c.line];if(h===void 0)throw new wt(`Invalid decoration position ${JSON.stringify(c)}. Lines length: ${s.lines.length}`);let d=c.character;if(d<0&&(d=h.length+d),d<0||d>h.length)throw new wt(`Invalid decoration position ${JSON.stringify(c)}. Line ${c.line} length: ${h.length}`);return{...c,character:d,offset:s.posToIndex(c.line,d)}}};const s=Ik(r.source),u=(r.options.decorations||[]).map(c=>({...c,start:a(c.start),end:a(c.end)}));Gk(u),t.set(r.meta,{decorations:u,converter:s,source:r.source})}return t.get(r.meta)}return{name:"shiki:decorations",tokens(r){if(!this.options.decorations?.length)return;const s=n(this).decorations.flatMap(c=>[c.start.offset,c.end.offset]);return jk(r,s)},code(r){if(!this.options.decorations?.length)return;const a=n(this),s=Array.from(r.children).filter(b=>b.type==="element"&&b.tagName==="span");if(s.length!==a.converter.lines.length)throw new wt(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${a.converter.lines.length}). Failed to apply decorations.`);function u(b,g,v,_){const x=s[b];let T="",O=-1,A=-1;if(g===0&&(O=0),v===0&&(A=0),v===Number.POSITIVE_INFINITY&&(A=x.children.length),O===-1||A===-1)for(let k=0;k<x.children.length;k++)T+=n1(x.children[k]),O===-1&&T.length===g&&(O=k+1),A===-1&&T.length===v&&(A=k+1);if(O===-1)throw new wt(`Failed to find start index for decoration ${JSON.stringify(_.start)}`);if(A===-1)throw new wt(`Failed to find end index for decoration ${JSON.stringify(_.end)}`);const C=x.children.slice(O,A);if(!_.alwaysWrap&&C.length===x.children.length)h(x,_,"line");else if(!_.alwaysWrap&&C.length===1&&C[0].type==="element")h(C[0],_,"token");else{const k={type:"element",tagName:"span",properties:{},children:C};h(k,_,"wrapper"),x.children.splice(O,C.length,k)}}function c(b,g){s[b]=h(s[b],g,"line")}function h(b,g,v){const _=g.properties||{},x=g.transform||(T=>T);return b.tagName=g.tagName||"span",b.properties={...b.properties,..._,class:b.properties.class},g.properties?.class&&e1(b,g.properties.class),b=x(b,v)||b,b}const d=[],p=a.decorations.sort((b,g)=>g.start.offset-b.start.offset||b.end.offset-g.end.offset);for(const b of p){const{start:g,end:v}=b;if(g.line===v.line)u(g.line,g.character,v.character,b);else if(g.line<v.line){u(g.line,g.character,Number.POSITIVE_INFINITY,b);for(let _=g.line+1;_<v.line;_++)d.unshift(()=>c(_,b));u(v.line,0,v.character,b)}}d.forEach(b=>b())}}}function Gk(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.start.offset>r.end.offset)throw new wt(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let a=n+1;a<t.length;a++){const s=t[a],u=r.start.offset<=s.start.offset&&s.start.offset<r.end.offset,c=r.start.offset<s.end.offset&&s.end.offset<=r.end.offset,h=s.start.offset<=r.start.offset&&r.start.offset<s.end.offset,d=s.start.offset<r.end.offset&&r.end.offset<=s.end.offset;if(u||c||h||d){if(u&&c||h&&d||h&&r.start.offset===r.end.offset||c&&s.start.offset===s.end.offset)continue;throw new wt(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function n1(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(n1).join(""):""}const $k=[Vk()];function vu(t){const n=qk(t.transformers||[]);return[...n.pre,...n.normal,...n.post,...$k]}function qk(t){const n=[],r=[],a=[];for(const s of t)switch(s.enforce){case"pre":n.push(s);break;case"post":r.push(s);break;default:a.push(s)}return{pre:n,post:r,normal:a}}var Ur=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],hf={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Yk(t,n){const r=t.indexOf("\x1B",n);if(r!==-1&&t[r+1]==="["){const a=t.indexOf("m",r);if(a!==-1)return{sequence:t.substring(r+2,a).split(";"),startPosition:r,position:a+1}}return{position:t.length}}function $0(t){const n=t.shift();if(n==="2"){const r=t.splice(0,3).map(a=>Number.parseInt(a));return r.length!==3||r.some(a=>Number.isNaN(a))?void 0:{type:"rgb",rgb:r}}else if(n==="5"){const r=t.shift();if(r)return{type:"table",index:Number(r)}}}function Fk(t){const n=[];for(;t.length>0;){const r=t.shift();if(!r)continue;const a=Number.parseInt(r);if(!Number.isNaN(a))if(a===0)n.push({type:"resetAll"});else if(a<=9)hf[a]&&n.push({type:"setDecoration",value:hf[a]});else if(a<=29){const s=hf[a-20];s&&(n.push({type:"resetDecoration",value:s}),s==="dim"&&n.push({type:"resetDecoration",value:"bold"}))}else if(a<=37)n.push({type:"setForegroundColor",value:{type:"named",name:Ur[a-30]}});else if(a===38){const s=$0(t);s&&n.push({type:"setForegroundColor",value:s})}else if(a===39)n.push({type:"resetForegroundColor"});else if(a<=47)n.push({type:"setBackgroundColor",value:{type:"named",name:Ur[a-40]}});else if(a===48){const s=$0(t);s&&n.push({type:"setBackgroundColor",value:s})}else a===49?n.push({type:"resetBackgroundColor"}):a===53?n.push({type:"setDecoration",value:"overline"}):a===55?n.push({type:"resetDecoration",value:"overline"}):a>=90&&a<=97?n.push({type:"setForegroundColor",value:{type:"named",name:Ur[a-90+8]}}):a>=100&&a<=107&&n.push({type:"setBackgroundColor",value:{type:"named",name:Ur[a-100+8]}})}return n}function Xk(){let t=null,n=null,r=new Set;return{parse(a){const s=[];let u=0;do{const c=Yk(a,u),h=c.sequence?a.substring(u,c.startPosition):a.substring(u);if(h.length>0&&s.push({value:h,foreground:t,background:n,decorations:new Set(r)}),c.sequence){const d=Fk(c.sequence);for(const p of d)p.type==="resetAll"?(t=null,n=null,r.clear()):p.type==="resetForegroundColor"?t=null:p.type==="resetBackgroundColor"?n=null:p.type==="resetDecoration"&&r.delete(p.value);for(const p of d)p.type==="setForegroundColor"?t=p.value:p.type==="setBackgroundColor"?n=p.value:p.type==="setDecoration"&&r.add(p.value)}u=c.position}while(u<a.length);return s}}}var Wk={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function Qk(t=Wk){function n(h){return t[h]}function r(h){return`#${h.map(d=>Math.max(0,Math.min(d,255)).toString(16).padStart(2,"0")).join("")}`}let a;function s(){if(a)return a;a=[];for(let p=0;p<Ur.length;p++)a.push(n(Ur[p]));let h=[0,95,135,175,215,255];for(let p=0;p<6;p++)for(let b=0;b<6;b++)for(let g=0;g<6;g++)a.push(r([h[p],h[b],h[g]]));let d=8;for(let p=0;p<24;p++,d+=10)a.push(r([d,d,d]));return a}function u(h){return s()[h]}function c(h){switch(h.type){case"named":return n(h.name);case"rgb":return r(h.rgb);case"table":return u(h.index)}}return{value:c}}const Kk={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function Zk(t,n,r){const a=gu(t,r),s=Tu(n),u=Object.fromEntries(Ur.map(d=>{const p=`terminal.ansi${d[0].toUpperCase()}${d.substring(1)}`,b=t.colors?.[p];return[d,b||Kk[d]]})),c=Qk(u),h=Xk();return s.map(d=>h.parse(d[0]).map(p=>{let b,g;p.decorations.has("reverse")?(b=p.background?c.value(p.background):t.bg,g=p.foreground?c.value(p.foreground):t.fg):(b=p.foreground?c.value(p.foreground):t.fg,g=p.background?c.value(p.background):void 0),b=hr(b,a),g=hr(g,a),p.decorations.has("dim")&&(b=Jk(b));let v=Yt.None;return p.decorations.has("bold")&&(v|=Yt.Bold),p.decorations.has("italic")&&(v|=Yt.Italic),p.decorations.has("underline")&&(v|=Yt.Underline),p.decorations.has("strikethrough")&&(v|=Yt.Strikethrough),{content:p.value,offset:d[1],color:b,bgColor:g,fontStyle:v}}))}function Jk(t){const n=t.match(/#([0-9a-f]{3,8})/i);if(n){const a=n[1];if(a.length===8){const s=Math.round(Number.parseInt(a.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${a.slice(0,6)}${s}`}else{if(a.length===6)return`#${a}80`;if(a.length===4){const s=a[0],u=a[1],c=a[2],h=a[3],d=Math.round(Number.parseInt(`${h}${h}`,16)/2).toString(16).padStart(2,"0");return`#${s}${s}${u}${u}${c}${c}${d}`}else if(a.length===3){const s=a[0],u=a[1],c=a[2];return`#${s}${s}${u}${u}${c}${c}80`}}}const r=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return r?`var(${r[1]}-dim)`:t}function Rh(t,n,r={}){const{theme:a=t.getLoadedThemes()[0]}=r,s=t.resolveLangAlias(r.lang||"text");if(Ah(s)||kh(a))return Tu(n).map(d=>[{content:d[0],offset:d[1]}]);const{theme:u,colorMap:c}=t.setTheme(a);if(s==="ansi")return Zk(u,n,r);const h=t.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==h.name)throw new wt(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${h.name}"`);if(!r.grammarState.themes.includes(u.name))throw new wt(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${u.name}"`)}return tT(n,h,u,c,r)}function eT(...t){if(t.length===2)return cl(t[1]);const[n,r,a={}]=t,{lang:s="text",theme:u=n.getLoadedThemes()[0]}=a;if(Ah(s)||kh(u))throw new wt("Plain language does not have grammar state");if(s==="ansi")throw new wt("ANSI language does not have grammar state");const{theme:c,colorMap:h}=n.setTheme(u),d=n.getLanguage(s);return new Za(Lh(r,d,c,h,a).stateStack,d.name,c.name)}function tT(t,n,r,a,s){const u=Lh(t,n,r,a,s),c=new Za(u.stateStack,n.name,r.name);return Ru(u.tokens,c),u.tokens}function Lh(t,n,r,a,s){const u=gu(r,s),{tokenizeMaxLineLength:c=0,tokenizeTimeLimit:h=500}=s,d=Tu(t);let p=s.grammarState?Bk(s.grammarState,r.name)??Jf:s.grammarContextCode!=null?Lh(s.grammarContextCode,n,r,a,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:Jf,b=[];const g=[];for(let v=0,_=d.length;v<_;v++){const[x,T]=d[v];if(x===""){b=[],g.push([]);continue}if(c>0&&x.length>=c){b=[],g.push([{content:x,offset:T,color:"",fontStyle:0}]);continue}let O,A,C;s.includeExplanation&&(O=n.tokenizeLine(x,p,h),A=O.tokens,C=0);const k=n.tokenizeLine2(x,p,h),I=k.tokens.length/2;for(let M=0;M<I;M++){const U=k.tokens[2*M],H=M+1<I?k.tokens[2*M+2]:x.length;if(U===H)continue;const z=k.tokens[2*M+1],Q=hr(a[Wa.getForeground(z)],u),ee=Wa.getFontStyle(z),ie={content:x.substring(U,H),offset:T+U,color:Q,fontStyle:ee};if(s.includeExplanation){const V=[];if(s.includeExplanation!=="scopeName")for(const oe of r.settings){let te;switch(typeof oe.scope){case"string":te=oe.scope.split(/,/).map(N=>N.trim());break;case"object":te=oe.scope;break;default:continue}V.push({settings:oe,selectors:te.map(N=>N.split(/ /))})}ie.explanation=[];let K=0;for(;U+K<H;){const oe=A[C],te=x.substring(oe.startIndex,oe.endIndex);K+=te.length,ie.explanation.push({content:te,scopes:s.includeExplanation==="scopeName"?nT(oe.scopes):iT(V,oe.scopes)}),C+=1}}b.push(ie)}g.push(b),b=[],p=k.ruleStack}return{tokens:g,stateStack:p}}function nT(t){return t.map(n=>({scopeName:n}))}function iT(t,n){const r=[];for(let a=0,s=n.length;a<s;a++){const u=n[a];r[a]={scopeName:u,themeMatches:aT(t,u,n.slice(0,a))}}return r}function q0(t,n){return t===n||n.substring(0,t.length)===t&&n[t.length]==="."}function rT(t,n,r){if(!q0(t[t.length-1],n))return!1;let a=t.length-2,s=r.length-1;for(;a>=0&&s>=0;)q0(t[a],r[s])&&(a-=1),s-=1;return a===-1}function aT(t,n,r){const a=[];for(const{selectors:s,settings:u}of t)for(const c of s)if(rT(c,n,r)){a.push(u);break}return a}function i1(t,n,r){const a=Object.entries(r.themes).filter(d=>d[1]).map(d=>({color:d[0],theme:d[1]})),s=a.map(d=>{const p=Rh(t,n,{...r,theme:d.theme}),b=cl(p),g=typeof d.theme=="string"?d.theme:d.theme.name;return{tokens:p,state:b,theme:g}}),u=oT(...s.map(d=>d.tokens)),c=u[0].map((d,p)=>d.map((b,g)=>{const v={content:b.content,variants:{},offset:b.offset};return"includeExplanation"in r&&r.includeExplanation&&(v.explanation=b.explanation),u.forEach((_,x)=>{const{content:T,explanation:O,offset:A,...C}=_[p][g];v.variants[a[x].color]=C}),v})),h=s[0].state?new Za(Object.fromEntries(s.map(d=>[d.theme,d.state?.getInternalStack(d.theme)])),s[0].state.lang):void 0;return h&&Ru(c,h),c}function oT(...t){const n=t.map(()=>[]),r=t.length;for(let a=0;a<t[0].length;a++){const s=t.map(d=>d[a]),u=n.map(()=>[]);n.forEach((d,p)=>d.push(u[p]));const c=s.map(()=>0),h=s.map(d=>d[0]);for(;h.every(d=>d);){const d=Math.min(...h.map(p=>p.content.length));for(let p=0;p<r;p++){const b=h[p];b.content.length===d?(u[p].push(b),c[p]+=1,h[p]=s[p][c[p]]):(u[p].push({...b,content:b.content.slice(0,d)}),h[p]={...b,content:b.content.slice(d),offset:b.offset+d})}}}return n}function yu(t,n,r){let a,s,u,c,h,d;if("themes"in r){const{defaultColor:p="light",cssVariablePrefix:b="--shiki-",colorsRendering:g="css-vars"}=r,v=Object.entries(r.themes).filter(A=>A[1]).map(A=>({color:A[0],theme:A[1]})).sort((A,C)=>A.color===p?-1:C.color===p?1:0);if(v.length===0)throw new wt("`themes` option must not be empty");const _=i1(t,n,r);if(d=cl(_),p&&Th!==p&&!v.find(A=>A.color===p))throw new wt(`\`themes\` option must contain the defaultColor key \`${p}\``);const x=v.map(A=>t.getTheme(A.theme)),T=v.map(A=>A.color);u=_.map(A=>A.map(C=>Uk(C,T,b,p,g))),d&&Ru(u,d);const O=v.map(A=>gu(A.theme,r));s=Y0(v,x,O,b,p,"fg",g),a=Y0(v,x,O,b,p,"bg",g),c=`shiki-themes ${x.map(A=>A.name).join(" ")}`,h=p?void 0:[s,a].join(";")}else if("theme"in r){const p=gu(r.theme,r);u=Rh(t,n,r);const b=t.getTheme(r.theme);a=hr(b.bg,p),s=hr(b.fg,p),c=b.name,d=cl(u)}else throw new wt("Invalid options, either `theme` or `themes` must be provided");return{tokens:u,fg:s,bg:a,themeName:c,rootStyle:h,grammarState:d}}function Y0(t,n,r,a,s,u,c){return t.map((h,d)=>{const p=hr(n[d][u],r[d])||"inherit",b=`${a+h.color}${u==="bg"?"-bg":""}:${p}`;if(d===0&&s){if(s===Th&&t.length>1){const g=t.findIndex(T=>T.color==="light"),v=t.findIndex(T=>T.color==="dark");if(g===-1||v===-1)throw new wt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const _=hr(n[g][u],r[g])||"inherit",x=hr(n[v][u],r[v])||"inherit";return`light-dark(${_}, ${x});${b}`}return p}return c==="css-vars"?b:null}).filter(h=>!!h).join(";")}function _u(t,n,r,a={meta:{},options:r,codeToHast:(s,u)=>_u(t,s,u),codeToTokens:(s,u)=>yu(t,s,u)}){let s=n;for(const x of vu(r))s=x.preprocess?.call(a,s,r)||s;let{tokens:u,fg:c,bg:h,themeName:d,rootStyle:p,grammarState:b}=yu(t,s,r);const{mergeWhitespaces:g=!0,mergeSameStyleTokens:v=!1}=r;g===!0?u=sT(u):g==="never"&&(u=uT(u)),v&&(u=cT(u));const _={...a,get source(){return s}};for(const x of vu(r))u=x.tokens?.call(_,u)||u;return lT(u,{...r,fg:c,bg:h,themeName:d,rootStyle:r.rootStyle===!1?!1:r.rootStyle??p},_,b)}function lT(t,n,r,a=cl(t)){const s=vu(n),u=[],c={type:"root",children:[]},{structure:h="classic",tabindex:d="0"}=n,p={class:`shiki ${n.themeName||""}`};n.rootStyle!==!1&&(n.rootStyle!=null?p.style=n.rootStyle:p.style=`background-color:${n.bg};color:${n.fg}`),d!==!1&&d!=null&&(p.tabindex=d.toString());for(const[T,O]of Object.entries(n.meta||{}))T.startsWith("_")||(p[T]=O);let b={type:"element",tagName:"pre",properties:p,children:[],data:n.data},g={type:"element",tagName:"code",properties:{},children:u};const v=[],_={...r,structure:h,addClassToHast:e1,get source(){return r.source},get tokens(){return t},get options(){return n},get root(){return c},get pre(){return b},get code(){return g},get lines(){return v}};if(t.forEach((T,O)=>{O&&(h==="inline"?c.children.push({type:"element",tagName:"br",properties:{},children:[]}):h==="classic"&&u.push({type:"text",value:`
|
|
21
|
+
`}));let A={type:"element",tagName:"span",properties:{class:"line"},children:[]},C=0;for(const k of T){let I={type:"element",tagName:"span",properties:{...k.htmlAttrs},children:[{type:"text",value:k.content}]};const M=eh(k.htmlStyle||bu(k));M&&(I.properties.style=M);for(const U of s)I=U?.span?.call(_,I,O+1,C,A,k)||I;h==="inline"?c.children.push(I):h==="classic"&&A.children.push(I),C+=k.content.length}if(h==="classic"){for(const k of s)A=k?.line?.call(_,A,O+1)||A;v.push(A),u.push(A)}else h==="inline"&&v.push(A)}),h==="classic"){for(const T of s)g=T?.code?.call(_,g)||g;b.children.push(g);for(const T of s)b=T?.pre?.call(_,b)||b;c.children.push(b)}else if(h==="inline"){const T=[];let O={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const k of c.children)k.type==="element"&&k.tagName==="br"?(T.push(O),O={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(k.type==="element"||k.type==="text")&&O.children.push(k);T.push(O);let C={type:"element",tagName:"code",properties:{},children:T};for(const k of s)C=k?.code?.call(_,C)||C;c.children=[];for(let k=0;k<C.children.length;k++){k>0&&c.children.push({type:"element",tagName:"br",properties:{},children:[]});const I=C.children[k];I.type==="element"&&c.children.push(...I.children)}}let x=c;for(const T of s)x=T?.root?.call(_,x)||x;return a&&Ru(x,a),x}function sT(t){return t.map(n=>{const r=[];let a="",s;return n.forEach((u,c)=>{const d=!(u.fontStyle&&(u.fontStyle&Yt.Underline||u.fontStyle&Yt.Strikethrough));d&&u.content.match(/^\s+$/)&&n[c+1]?(s===void 0&&(s=u.offset),a+=u.content):a?(d?r.push({...u,offset:s,content:a+u.content}):r.push({content:a,offset:s},u),s=void 0,a=""):r.push(u)}),r})}function uT(t){return t.map(n=>n.flatMap(r=>{if(r.content.match(/^\s+$/))return r;const a=r.content.match(/^(\s*)(.*?)(\s*)$/);if(!a)return r;const[,s,u,c]=a;if(!s&&!c)return r;const h=[{...r,offset:r.offset+s.length,content:u}];return s&&h.unshift({content:s,offset:r.offset}),c&&h.push({content:c,offset:r.offset+s.length+u.length}),h}))}function cT(t){return t.map(n=>{const r=[];for(const a of n){if(r.length===0){r.push({...a});continue}const s=r[r.length-1],u=eh(s.htmlStyle||bu(s)),c=eh(a.htmlStyle||bu(a)),h=s.fontStyle&&(s.fontStyle&Yt.Underline||s.fontStyle&Yt.Strikethrough),d=a.fontStyle&&(a.fontStyle&Yt.Underline||a.fontStyle&Yt.Strikethrough);!h&&!d&&u===c?s.content+=a.content:r.push({...a})}return r})}const dT=Xa;function fT(t,n,r){const a={meta:{},options:r,codeToHast:(u,c)=>_u(t,u,c),codeToTokens:(u,c)=>yu(t,u,c)};let s=dT(_u(t,n,r,a));for(const u of vu(r))s=u.postprocess?.call(a,s,r)||s;return s}const F0={light:"#333333",dark:"#bbbbbb"},X0={light:"#fffffe",dark:"#1e1e1e"},W0="__shiki_resolved";function Lu(t){if(t?.[W0])return t;const n={...t};n.tokenColors&&!n.settings&&(n.settings=n.tokenColors,delete n.tokenColors),n.type||="dark",n.colorReplacements={...n.colorReplacements},n.settings||=[];let{bg:r,fg:a}=n;if(!r||!a){const h=n.settings?n.settings.find(d=>!d.name&&!d.scope):void 0;h?.settings?.foreground&&(a=h.settings.foreground),h?.settings?.background&&(r=h.settings.background),!a&&n?.colors?.["editor.foreground"]&&(a=n.colors["editor.foreground"]),!r&&n?.colors?.["editor.background"]&&(r=n.colors["editor.background"]),a||(a=n.type==="light"?F0.light:F0.dark),r||(r=n.type==="light"?X0.light:X0.dark),n.fg=a,n.bg=r}n.settings[0]&&n.settings[0].settings&&!n.settings[0].scope||n.settings.unshift({settings:{foreground:n.fg,background:n.bg}});let s=0;const u=new Map;function c(h){if(u.has(h))return u.get(h);s+=1;const d=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return n.colorReplacements?.[`#${d}`]?c(h):(u.set(h,d),d)}n.settings=n.settings.map(h=>{const d=h.settings?.foreground&&!h.settings.foreground.startsWith("#"),p=h.settings?.background&&!h.settings.background.startsWith("#");if(!d&&!p)return h;const b={...h,settings:{...h.settings}};if(d){const g=c(h.settings.foreground);n.colorReplacements[g]=h.settings.foreground,b.settings.foreground=g}if(p){const g=c(h.settings.background);n.colorReplacements[g]=h.settings.background,b.settings.background=g}return b});for(const h of Object.keys(n.colors||{}))if((h==="editor.foreground"||h==="editor.background"||h.startsWith("terminal.ansi"))&&!n.colors[h]?.startsWith("#")){const d=c(n.colors[h]);n.colorReplacements[d]=n.colors[h],n.colors[h]=d}return Object.defineProperty(n,W0,{enumerable:!1,writable:!1,value:!0}),n}async function r1(t){return Array.from(new Set((await Promise.all(t.filter(n=>!Zy(n)).map(async n=>await Ky(n).then(r=>Array.isArray(r)?r:[r])))).flat()))}async function a1(t){return(await Promise.all(t.map(async r=>Jy(r)?null:Lu(await Ky(r))))).filter(r=>!!r)}let hT=3;function mT(t,n=3){n>hT||console.trace(`[SHIKI DEPRECATE]: ${t}`)}let Ba=class extends Error{constructor(n){super(n),this.name="ShikiError"}};function o1(t,n){if(!n)return t;if(n[t]){const r=new Set([t]);for(;n[t];){if(t=n[t],r.has(t))throw new Ba(`Circular alias \`${Array.from(r).join(" -> ")} -> ${t}\``);r.add(t)}}return t}class pT extends Ok{constructor(n,r,a,s={}){super(n),this._resolver=n,this._themes=r,this._langs=a,this._alias=s,this._themes.map(u=>this.loadTheme(u)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const r=Lu(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=du.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){return n=o1(n,this._alias),this._resolvedGrammars.get(n)}loadLanguage(n){if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(u=>u.embeddedLangsLazy?.includes(n.name)));this._resolver.addLanguage(n);const a={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const s=this.loadGrammarWithConfiguration(n.scopeName,1,a);if(s.name=n.name,this._resolvedGrammars.set(n.name,s),n.aliases&&n.aliases.forEach(u=>{this._alias[u]=n.name}),this._loadedLanguagesCache=null,r.size)for(const u of r)this._resolvedGrammars.delete(u.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(u.scopeName),this._syncRegistry?._grammars?.delete(u.scopeName),this.loadLanguage(this._langMap.get(u.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const s of n)this.resolveEmbeddedLanguages(s);const r=Array.from(this._langGraph.entries()),a=r.filter(([s,u])=>!u);if(a.length){const s=r.filter(([u,c])=>c?(c.embeddedLanguages||c.embeddedLangs)?.some(d=>a.map(([p])=>p).includes(d)):!1).filter(u=>!a.includes(u));throw new Ba(`Missing languages ${a.map(([u])=>`\`${u}\``).join(", ")}, required by ${s.map(([u])=>`\`${u}\``).join(", ")}`)}for(const[s,u]of r)this._resolver.addLanguage(u);for(const[s,u]of r)this.loadLanguage(u)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){this._langMap.set(n.name,n),this._langGraph.set(n.name,n);const r=n.embeddedLanguages??n.embeddedLangs;if(r)for(const a of r)this._langGraph.set(a,this._langMap.get(a))}}class gT{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(n,r){this._onigLib={createOnigScanner:a=>n.createScanner(a),createOnigString:a=>n.createString(a)},r.forEach(a=>this.addLanguage(a))}get onigLib(){return this._onigLib}getLangRegistration(n){return this._langs.get(n)}loadGrammar(n){return this._scopeToLang.get(n)}addLanguage(n){this._langs.set(n.name,n),n.aliases&&n.aliases.forEach(r=>{this._langs.set(r,n)}),this._scopeToLang.set(n.scopeName,n),n.injectTo&&n.injectTo.forEach(r=>{this._injections.get(r)||this._injections.set(r,[]),this._injections.get(r).push(n.scopeName)})}getInjections(n){const r=n.split(".");let a=[];for(let s=1;s<=r.length;s++){const u=r.slice(0,s).join(".");a=[...a,...this._injections.get(u)||[]]}return a}}let Qo=0;function bT(t){Qo+=1,t.warnings!==!1&&Qo>=10&&Qo%10===0&&console.warn(`[Shiki] ${Qo} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let n=!1;if(!t.engine)throw new Ba("`engine` option is required for synchronous mode");const r=(t.langs||[]).flat(1),a=(t.themes||[]).flat(1).map(Lu),s=new gT(t.engine,r),u=new pT(s,a,r,t.langAlias);let c;function h(k){return o1(k,t.langAlias)}function d(k){A();const I=u.getGrammar(typeof k=="string"?k:k.name);if(!I)throw new Ba(`Language \`${k}\` not found, you may need to load it first`);return I}function p(k){if(k==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};A();const I=u.getTheme(k);if(!I)throw new Ba(`Theme \`${k}\` not found, you may need to load it first`);return I}function b(k){A();const I=p(k);c!==k&&(u.setTheme(I),c=k);const M=u.getColorMap();return{theme:I,colorMap:M}}function g(){return A(),u.getLoadedThemes()}function v(){return A(),u.getLoadedLanguages()}function _(...k){A(),u.loadLanguages(k.flat(1))}async function x(...k){return _(await r1(k))}function T(...k){A();for(const I of k.flat(1))u.loadTheme(I)}async function O(...k){return A(),T(await a1(k))}function A(){if(n)throw new Ba("Shiki instance has been disposed")}function C(){n||(n=!0,u.dispose(),Qo-=1)}return{setTheme:b,getTheme:p,getLanguage:d,getLoadedThemes:g,getLoadedLanguages:v,resolveLangAlias:h,loadLanguage:x,loadLanguageSync:_,loadTheme:O,loadThemeSync:T,dispose:C,[Symbol.dispose]:C}}async function vT(t){t.engine||mT("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[n,r,a]=await Promise.all([a1(t.themes||[]),r1(t.langs||[]),t.engine]);return bT({...t,themes:n,langs:r,engine:a})}async function yT(t){const n=await vT(t);return{getLastGrammarState:(...r)=>eT(n,...r),codeToTokensBase:(r,a)=>Rh(n,r,a),codeToTokensWithThemes:(r,a)=>i1(n,r,a),codeToTokens:(r,a)=>yu(n,r,a),codeToHast:(r,a)=>_u(n,r,a),codeToHtml:(r,a)=>fT(n,r,a),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...n,getInternalContext:()=>n}}function _T(t){const n=t.langs,r=t.themes,a=t.engine;async function s(u){function c(g){if(typeof g=="string"){if(g=u.langAlias?.[g]||g,Zy(g))return[];const v=n[g];if(!v)throw new wt(`Language \`${g}\` is not included in this bundle. You may want to load it from external source.`);return v}return g}function h(g){if(Jy(g))return"none";if(typeof g=="string"){const v=r[g];if(!v)throw new wt(`Theme \`${g}\` is not included in this bundle. You may want to load it from external source.`);return v}return g}const d=(u.themes??[]).map(g=>h(g)),p=(u.langs??[]).map(g=>c(g)),b=await yT({engine:u.engine??a(),...u,themes:d,langs:p});return{...b,loadLanguage(...g){return b.loadLanguage(...g.map(c))},loadTheme(...g){return b.loadTheme(...g.map(h))},getBundledLanguages(){return n},getBundledThemes(){return r}}}return s}const l1=[{id:"abap",name:"ABAP",import:(()=>w(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>w(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>w(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>w(()=>import("./angular-html-CU67Zn6k.js").then(t=>t.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>w(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>w(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>w(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>w(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>w(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>w(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>w(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>w(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>w(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>w(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>w(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>w(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>w(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>w(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>w(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>w(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>w(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>w(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>w(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>w(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>w(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>w(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>w(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>w(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>w(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>w(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>w(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>w(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>w(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>w(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>w(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>w(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>w(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>w(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>w(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>w(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>w(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>w(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>w(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>w(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>w(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>w(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>w(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>w(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>w(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>w(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>w(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>w(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>w(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>w(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>w(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>w(()=>import("./erb-B12qg9BL.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>w(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>w(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>w(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>w(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>w(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>w(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>w(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>w(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>w(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>w(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>w(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>w(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>w(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>w(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>w(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>w(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>w(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>w(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>w(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>w(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>w(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>w(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>w(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>w(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>w(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>w(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>w(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>w(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>w(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>w(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>w(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>w(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>w(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>w(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>w(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>w(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>w(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>w(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>w(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>w(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>w(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>w(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>w(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>w(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>w(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>w(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>w(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>w(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>w(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>w(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>w(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>w(()=>import("./just-Cw27pwNe.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>w(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>w(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>w(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>w(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>w(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>w(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>w(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>w(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>w(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>w(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>w(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>w(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>w(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>w(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>w(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>w(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>w(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>w(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>w(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>w(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>w(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>w(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>w(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>w(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>w(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>w(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>w(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>w(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>w(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>w(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>w(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>w(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>w(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>w(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>w(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>w(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>w(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>w(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>w(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>w(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>w(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>w(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>w(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>w(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>w(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>w(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>w(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>w(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>w(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>w(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>w(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>w(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>w(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>w(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>w(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>w(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>w(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>w(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>w(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>w(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>w(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>w(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>w(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>w(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>w(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>w(()=>import("./rst-BrH8l1NY.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>w(()=>import("./ruby-Dw2BHqvy.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>w(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>w(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>w(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>w(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>w(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>w(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>w(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>w(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>w(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>w(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>w(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>w(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>w(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>w(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>w(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>w(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>w(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>w(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>w(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>w(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>w(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>w(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>w(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>w(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>w(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>w(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>w(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>w(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>w(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>w(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>w(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>w(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>w(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>w(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>w(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>w(()=>import("./twig-DNn4PbVi.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>w(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>w(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>w(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>w(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>w(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>w(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>w(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>w(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>w(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>w(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>w(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>w(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>w(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>w(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>w(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>w(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>w(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>w(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>w(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>w(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>w(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>w(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>w(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>w(()=>import("./zig-VOosw3JB.js"),[]))}],xT=Object.fromEntries(l1.map(t=>[t.id,t.import])),ST=Object.fromEntries(l1.flatMap(t=>t.aliases?.map(n=>[n,t.import])||[])),th={...xT,...ST},ET=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>w(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>w(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>w(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>w(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>w(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>w(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>w(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>w(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>w(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>w(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>w(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>w(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>w(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>w(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>w(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>w(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>w(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>w(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>w(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>w(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>w(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>w(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>w(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>w(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>w(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>w(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>w(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>w(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>w(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>w(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>w(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>w(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>w(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>w(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>w(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>w(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>w(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>w(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>w(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>w(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>w(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>w(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>w(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>w(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>w(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>w(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>w(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>w(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>w(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>w(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>w(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>w(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>w(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>w(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>w(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>w(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>w(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>w(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>w(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>w(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>w(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>w(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>w(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>w(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>w(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],s1=Object.fromEntries(ET.map(t=>[t.id,t.import]));class Nh extends Error{constructor(n){super(n),this.name="ShikiError"}}function wT(){return 2147483648}function CT(){return typeof performance<"u"?performance.now():Date.now()}const AT=(t,n)=>t+(n-t%n)%n;async function kT(t){let n,r;const a={};function s(_){r=_,a.HEAPU8=new Uint8Array(_),a.HEAPU32=new Uint32Array(_)}function u(_,x,T){a.HEAPU8.copyWithin(_,x,x+T)}function c(_){try{return n.grow(_-r.byteLength+65535>>>16),s(n.buffer),1}catch{}}function h(_){const x=a.HEAPU8.length;_=_>>>0;const T=wT();if(_>T)return!1;for(let O=1;O<=4;O*=2){let A=x*(1+.2/O);A=Math.min(A,_+100663296);const C=Math.min(T,AT(Math.max(_,A),65536));if(c(C))return!0}return!1}const d=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function p(_,x,T=1024){const O=x+T;let A=x;for(;_[A]&&!(A>=O);)++A;if(A-x>16&&_.buffer&&d)return d.decode(_.subarray(x,A));let C="";for(;x<A;){let k=_[x++];if(!(k&128)){C+=String.fromCharCode(k);continue}const I=_[x++]&63;if((k&224)===192){C+=String.fromCharCode((k&31)<<6|I);continue}const M=_[x++]&63;if((k&240)===224?k=(k&15)<<12|I<<6|M:k=(k&7)<<18|I<<12|M<<6|_[x++]&63,k<65536)C+=String.fromCharCode(k);else{const U=k-65536;C+=String.fromCharCode(55296|U>>10,56320|U&1023)}}return C}function b(_,x){return _?p(a.HEAPU8,_,x):""}const g={emscripten_get_now:CT,emscripten_memcpy_big:u,emscripten_resize_heap:h,fd_write:()=>0};async function v(){const x=await t({env:g,wasi_snapshot_preview1:g});n=x.memory,s(n.buffer),Object.assign(a,x),a.UTF8ToString=b}return await v(),a}var TT=Object.defineProperty,RT=(t,n,r)=>n in t?TT(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r,Rt=(t,n,r)=>RT(t,typeof n!="symbol"?n+"":n,r);let It=null;function LT(t){throw new Nh(t.UTF8ToString(t.getLastOnigError()))}class Nu{constructor(n){Rt(this,"utf16Length"),Rt(this,"utf8Length"),Rt(this,"utf16Value"),Rt(this,"utf8Value"),Rt(this,"utf16OffsetToUtf8"),Rt(this,"utf8OffsetToUtf16");const r=n.length,a=Nu._utf8ByteLength(n),s=a!==r,u=s?new Uint32Array(r+1):null;s&&(u[r]=a);const c=s?new Uint32Array(a+1):null;s&&(c[a]=r);const h=new Uint8Array(a);let d=0;for(let p=0;p<r;p++){const b=n.charCodeAt(p);let g=b,v=!1;if(b>=55296&&b<=56319&&p+1<r){const _=n.charCodeAt(p+1);_>=56320&&_<=57343&&(g=(b-55296<<10)+65536|_-56320,v=!0)}s&&(u[p]=d,v&&(u[p+1]=d),g<=127?c[d+0]=p:g<=2047?(c[d+0]=p,c[d+1]=p):g<=65535?(c[d+0]=p,c[d+1]=p,c[d+2]=p):(c[d+0]=p,c[d+1]=p,c[d+2]=p,c[d+3]=p)),g<=127?h[d++]=g:g<=2047?(h[d++]=192|(g&1984)>>>6,h[d++]=128|(g&63)>>>0):g<=65535?(h[d++]=224|(g&61440)>>>12,h[d++]=128|(g&4032)>>>6,h[d++]=128|(g&63)>>>0):(h[d++]=240|(g&1835008)>>>18,h[d++]=128|(g&258048)>>>12,h[d++]=128|(g&4032)>>>6,h[d++]=128|(g&63)>>>0),v&&p++}this.utf16Length=r,this.utf8Length=a,this.utf16Value=n,this.utf8Value=h,this.utf16OffsetToUtf8=u,this.utf8OffsetToUtf16=c}static _utf8ByteLength(n){let r=0;for(let a=0,s=n.length;a<s;a++){const u=n.charCodeAt(a);let c=u,h=!1;if(u>=55296&&u<=56319&&a+1<s){const d=n.charCodeAt(a+1);d>=56320&&d<=57343&&(c=(u-55296<<10)+65536|d-56320,h=!0)}c<=127?r+=1:c<=2047?r+=2:c<=65535?r+=3:r+=4,h&&a++}return r}createString(n){const r=n.omalloc(this.utf8Length);return n.HEAPU8.set(this.utf8Value,r),r}}const Mu=class ri{constructor(n){if(Rt(this,"id",++ri.LAST_ID),Rt(this,"_onigBinding"),Rt(this,"content"),Rt(this,"utf16Length"),Rt(this,"utf8Length"),Rt(this,"utf16OffsetToUtf8"),Rt(this,"utf8OffsetToUtf16"),Rt(this,"ptr"),!It)throw new Nh("Must invoke loadWasm first.");this._onigBinding=It,this.content=n;const r=new Nu(n);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!ri._sharedPtrInUse?(ri._sharedPtr||(ri._sharedPtr=It.omalloc(1e4)),ri._sharedPtrInUse=!0,It.HEAPU8.set(r.utf8Value,ri._sharedPtr),this.ptr=ri._sharedPtr):this.ptr=r.createString(It)}convertUtf8OffsetToUtf16(n){return this.utf8OffsetToUtf16?n<0?0:n>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[n]:n}convertUtf16OffsetToUtf8(n){return this.utf16OffsetToUtf8?n<0?0:n>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[n]:n}dispose(){this.ptr===ri._sharedPtr?ri._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Rt(Mu,"LAST_ID",0);Rt(Mu,"_sharedPtr",0);Rt(Mu,"_sharedPtrInUse",!1);let u1=Mu;class NT{constructor(n){if(Rt(this,"_onigBinding"),Rt(this,"_ptr"),!It)throw new Nh("Must invoke loadWasm first.");const r=[],a=[];for(let h=0,d=n.length;h<d;h++){const p=new Nu(n[h]);r[h]=p.createString(It),a[h]=p.utf8Length}const s=It.omalloc(4*n.length);It.HEAPU32.set(r,s/4);const u=It.omalloc(4*n.length);It.HEAPU32.set(a,u/4);const c=It.createOnigScanner(s,u,n.length);for(let h=0,d=n.length;h<d;h++)It.ofree(r[h]);It.ofree(u),It.ofree(s),c===0&<(It),this._onigBinding=It,this._ptr=c}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(n,r,a){let s=0;if(typeof a=="number"&&(s=a),typeof n=="string"){n=new u1(n);const u=this._findNextMatchSync(n,r,!1,s);return n.dispose(),u}return this._findNextMatchSync(n,r,!1,s)}_findNextMatchSync(n,r,a,s){const u=this._onigBinding,c=u.findNextOnigScannerMatch(this._ptr,n.id,n.ptr,n.utf8Length,n.convertUtf16OffsetToUtf8(r),s);if(c===0)return null;const h=u.HEAPU32;let d=c/4;const p=h[d++],b=h[d++],g=[];for(let v=0;v<b;v++){const _=n.convertUtf8OffsetToUtf16(h[d++]),x=n.convertUtf8OffsetToUtf16(h[d++]);g[v]={start:_,end:x,length:x-_}}return{index:p,captureIndices:g}}}function MT(t){return typeof t.instantiator=="function"}function OT(t){return typeof t.default=="function"}function DT(t){return typeof t.data<"u"}function IT(t){return typeof Response<"u"&&t instanceof Response}function zT(t){return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&Buffer.isBuffer?.(t)||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let js;function PT(t){if(js)return js;async function n(){It=await kT(async r=>{let a=t;return a=await a,typeof a=="function"&&(a=await a(r)),typeof a=="function"&&(a=await a(r)),MT(a)?a=await a.instantiator(r):OT(a)?a=await a.default(r):(DT(a)&&(a=a.data),IT(a)?typeof WebAssembly.instantiateStreaming=="function"?a=await jT(a)(r):a=await UT(a)(r):zT(a)?a=await mf(a)(r):a instanceof WebAssembly.Module?a=await mf(a)(r):"default"in a&&a.default instanceof WebAssembly.Module&&(a=await mf(a.default)(r))),"instance"in a&&(a=a.instance),"exports"in a&&(a=a.exports),a})}return js=n(),js}function mf(t){return n=>WebAssembly.instantiate(t,n)}function jT(t){return n=>WebAssembly.instantiateStreaming(t,n)}function UT(t){return async n=>{const r=await t.arrayBuffer();return WebAssembly.instantiate(r,n)}}async function c1(t){return t&&await PT(t),{createScanner(n){return new NT(n.map(r=>typeof r=="string"?r:r.source))},createString(n){return new u1(n)}}}const HT=_T({langs:th,themes:s1,engine:()=>c1(w(()=>import("./wasm-CG6Dc4jp.js"),[]))});function Ja(t){if([...t].length!==1)throw new Error(`Expected "${t}" to be a single code point`);return t.codePointAt(0)}function BT(t,n,r){return t.has(n)||t.set(n,r),t.get(n)}const Mh=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),zt=String.raw;function eo(t,n){if(t==null)throw new Error(n??"Value expected");return t}const d1=zt`\[\^?`,f1=`c.? | C(?:-.?)?|${zt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${zt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${zt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${zt`o\{[^\}]*\}?`}|${zt`\d{1,3}`}`,Oh=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Us=new RegExp(zt`
|
|
22
|
+
\\ (?:
|
|
23
|
+
${f1}
|
|
24
|
+
| [gk]<[^>]*>?
|
|
25
|
+
| [gk]'[^']*'?
|
|
26
|
+
| .
|
|
27
|
+
)
|
|
28
|
+
| \( (?:
|
|
29
|
+
\? (?:
|
|
30
|
+
[:=!>({]
|
|
31
|
+
| <[=!]
|
|
32
|
+
| <[^>]*>
|
|
33
|
+
| '[^']*'
|
|
34
|
+
| ~\|?
|
|
35
|
+
| #(?:[^)\\]|\\.?)*
|
|
36
|
+
| [^:)]*[:)]
|
|
37
|
+
)?
|
|
38
|
+
| \*[^\)]*\)?
|
|
39
|
+
)?
|
|
40
|
+
| (?:${Oh.source})+
|
|
41
|
+
| ${d1}
|
|
42
|
+
| .
|
|
43
|
+
`.replace(/\s+/g,""),"gsu"),pf=new RegExp(zt`
|
|
44
|
+
\\ (?:
|
|
45
|
+
${f1}
|
|
46
|
+
| .
|
|
47
|
+
)
|
|
48
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
49
|
+
| ${d1}
|
|
50
|
+
| &&
|
|
51
|
+
| .
|
|
52
|
+
`.replace(/\s+/g,""),"gsu");function VT(t,n={}){const r={flags:"",...n,rules:{captureGroup:!1,singleline:!1,...n.rules}};if(typeof t!="string")throw new Error("String expected as pattern");const a=lR(r.flags),s=[a.extended],u={captureGroup:r.rules.captureGroup,getCurrentModX(){return s.at(-1)},numOpenGroups:0,popModX(){s.pop()},pushModX(g){s.push(g)},replaceCurrentModX(g){s[s.length-1]=g},singleline:r.rules.singleline};let c=[],h;for(Us.lastIndex=0;h=Us.exec(t);){const g=GT(u,t,h[0],Us.lastIndex);g.tokens?c.push(...g.tokens):g.token&&c.push(g.token),g.lastIndex!==void 0&&(Us.lastIndex=g.lastIndex)}const d=[];let p=0;c.filter(g=>g.type==="GroupOpen").forEach(g=>{g.kind==="capturing"?g.number=++p:g.raw==="("&&d.push(g)}),p||d.forEach((g,v)=>{g.kind="capturing",g.number=v+1});const b=p||d.length;return{tokens:c.map(g=>g.type==="EscapedNumber"?uR(g,b):g).flat(),flags:a}}function GT(t,n,r,a){const[s,u]=r;if(r==="["||r==="[^"){const c=$T(n,r,a);return{tokens:c.tokens,lastIndex:c.lastIndex}}if(s==="\\"){if("AbBGyYzZ".includes(u))return{token:Q0(r,r)};if(/^\\g[<']/.test(r)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:eR(r)}}if(/^\\k[<']/.test(r)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:m1(r)}}if(u==="K")return{token:p1("keep",r)};if(u==="N"||u==="R")return{token:Hr("newline",r,{negate:u==="N"})};if(u==="O")return{token:Hr("any",r)};if(u==="X")return{token:Hr("text_segment",r)};const c=h1(r,{inCharClass:!1});return Array.isArray(c)?{tokens:c}:{token:c}}if(s==="("){if(u==="*")return{token:rR(r)};if(r==="(?{")throw new Error(`Unsupported callout "${r}"`);if(r.startsWith("(?#")){if(n[a]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:a+1}}if(/^\(\?[-imx]+[:)]$/.test(r))return{token:iR(r,t)};if(t.pushModX(t.getCurrentModX()),t.numOpenGroups++,r==="("&&!t.captureGroup||r==="(?:")return{token:Ua("group",r)};if(r==="(?>")return{token:Ua("atomic",r)};if(r==="(?="||r==="(?!"||r==="(?<="||r==="(?<!")return{token:Ua(r[2]==="<"?"lookbehind":"lookahead",r,{negate:r.endsWith("!")})};if(r==="("&&t.captureGroup||r.startsWith("(?<")&&r.endsWith(">")||r.startsWith("(?'")&&r.endsWith("'"))return{token:Ua("capturing",r,{...r!=="("&&{name:r.slice(3,-1)}})};if(r.startsWith("(?~")){if(r==="(?~|")throw new Error(`Unsupported absence function kind "${r}"`);return{token:Ua("absence_repeater",r)}}throw r==="(?("?new Error(`Unsupported conditional "${r}"`):new Error(`Invalid or unsupported group option "${r}"`)}if(r===")"){if(t.popModX(),t.numOpenGroups--,t.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:KT(r)}}if(t.getCurrentModX()){if(r==="#"){const c=n.indexOf(`
|
|
53
|
+
`,a);return{lastIndex:c===-1?n.length:c}}if(/^\s$/.test(r)){const c=/\s+/y;return c.lastIndex=a,{lastIndex:c.exec(n)?c.lastIndex:a}}}if(r===".")return{token:Hr("dot",r)};if(r==="^"||r==="$"){const c=t.singleline?{"^":zt`\A`,$:zt`\Z`}[r]:r;return{token:Q0(c,r)}}return r==="|"?{token:YT(r)}:Oh.test(r)?{tokens:cR(r)}:{token:Mi(Ja(r),r)}}function $T(t,n,r){const a=[K0(n[1]==="^",n)];let s=1,u;for(pf.lastIndex=r;u=pf.exec(t);){const c=u[0];if(c[0]==="["&&c[1]!==":")s++,a.push(K0(c[1]==="^",c));else if(c==="]"){if(a.at(-1).type==="CharacterClassOpen")a.push(Mi(93,c));else if(s--,a.push(FT(c)),!s)break}else{const h=qT(c);Array.isArray(h)?a.push(...h):a.push(h)}}return{tokens:a,lastIndex:pf.lastIndex||t.length}}function qT(t){if(t[0]==="\\")return h1(t,{inCharClass:!0});if(t[0]==="["){const n=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(t);if(!n||!Mh.has(n.groups.name))throw new Error(`Invalid POSIX class "${t}"`);return Hr("posix",t,{value:n.groups.name,negate:!!n.groups.negate})}return t==="-"?XT(t):t==="&&"?WT(t):Mi(Ja(t),t)}function h1(t,{inCharClass:n}){const r=t[1];if(r==="c"||r==="C")return nR(t);if("dDhHsSwW".includes(r))return aR(t);if(t.startsWith(zt`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);if(/^\\[pP]\{/.test(t)){if(t.length===3)throw new Error(`Incomplete or invalid Unicode property "${t}"`);return oR(t)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(t))try{const a=t.split(/\\x/).slice(1).map(c=>parseInt(c,16)),s=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(a)),u=new TextEncoder;return[...s].map(c=>{const h=[...u.encode(c)].map(d=>`\\x${d.toString(16)}`).join("");return Mi(Ja(c),h)})}catch{throw new Error(`Multibyte code "${t}" incomplete or invalid in Oniguruma`)}if(r==="u"||r==="x")return Mi(sR(t),t);if(Z0.has(r))return Mi(Z0.get(r),t);if(/\d/.test(r))return QT(n,t);if(t==="\\")throw new Error(zt`Incomplete escape "\"`);if(r==="M")throw new Error(`Unsupported meta "${t}"`);if([...t].length===2)return Mi(t.codePointAt(1),t);throw new Error(`Unexpected escape "${t}"`)}function YT(t){return{type:"Alternator",raw:t}}function Q0(t,n){return{type:"Assertion",kind:t,raw:n}}function m1(t){return{type:"Backreference",raw:t}}function Mi(t,n){return{type:"Character",value:t,raw:n}}function FT(t){return{type:"CharacterClassClose",raw:t}}function XT(t){return{type:"CharacterClassHyphen",raw:t}}function WT(t){return{type:"CharacterClassIntersector",raw:t}}function K0(t,n){return{type:"CharacterClassOpen",negate:t,raw:n}}function Hr(t,n,r={}){return{type:"CharacterSet",kind:t,...r,raw:n}}function p1(t,n,r={}){return t==="keep"?{type:"Directive",kind:t,raw:n}:{type:"Directive",kind:t,flags:eo(r.flags),raw:n}}function QT(t,n){return{type:"EscapedNumber",inCharClass:t,raw:n}}function KT(t){return{type:"GroupClose",raw:t}}function Ua(t,n,r={}){return{type:"GroupOpen",kind:t,...r,raw:n}}function ZT(t,n,r,a){return{type:"NamedCallout",kind:t,tag:n,arguments:r,raw:a}}function JT(t,n,r,a){return{type:"Quantifier",kind:t,min:n,max:r,raw:a}}function eR(t){return{type:"Subroutine",raw:t}}const tR=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Z0=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function nR(t){const n=t[1]==="c"?t[2]:t[3];if(!n||!/[A-Za-z]/.test(n))throw new Error(`Unsupported control character "${t}"`);return Mi(Ja(n.toUpperCase())-64,t)}function iR(t,n){let{on:r,off:a}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(t).groups;a??="";const s=(n.getCurrentModX()||r.includes("x"))&&!a.includes("x"),u=ev(r),c=ev(a),h={};if(u&&(h.enable=u),c&&(h.disable=c),t.endsWith(")"))return n.replaceCurrentModX(s),p1("flags",t,{flags:h});if(t.endsWith(":"))return n.pushModX(s),n.numOpenGroups++,Ua("group",t,{...(u||c)&&{flags:h}});throw new Error(`Unexpected flag modifier "${t}"`)}function rR(t){const n=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(t);if(!n)throw new Error(`Incomplete or invalid named callout "${t}"`);const{name:r,tag:a,args:s}=n.groups;if(!r)throw new Error(`Invalid named callout "${t}"`);if(a==="")throw new Error(`Named callout tag with empty value not allowed "${t}"`);const u=s?s.split(",").filter(b=>b!=="").map(b=>/^[+-]?\d+$/.test(b)?+b:b):[],[c,h,d]=u,p=tR.has(r)?r.toLowerCase():"custom";switch(p){case"fail":case"mismatch":case"skip":if(u.length>0)throw new Error(`Named callout arguments not allowed "${u}"`);break;case"error":if(u.length>1)throw new Error(`Named callout allows only one argument "${u}"`);if(typeof c=="string")throw new Error(`Named callout argument must be a number "${c}"`);break;case"max":if(!u.length||u.length>2)throw new Error(`Named callout must have one or two arguments "${u}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument one must be a tag or number "${c}"`);if(u.length===2&&(typeof h=="number"||!/^[<>X]$/.test(h)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${h}"`);break;case"count":case"total_count":if(u.length>1)throw new Error(`Named callout allows only one argument "${u}"`);if(u.length===1&&(typeof c=="number"||!/^[<>X]$/.test(c)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${c}"`);break;case"cmp":if(u.length!==3)throw new Error(`Named callout must have three arguments "${u}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument one must be a tag or number "${c}"`);if(typeof h=="number"||!/^(?:[<>!=]=|[<>])$/.test(h))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${h}"`);if(typeof d=="string"&&!/^[A-Za-z_]\w*$/.test(d))throw new Error(`Named callout argument three must be a tag or number "${d}"`);break;case"custom":throw new Error(`Undefined callout name "${r}"`);default:throw new Error(`Unexpected named callout kind "${p}"`)}return ZT(p,a??null,s?.split(",")??null,t)}function J0(t){let n=null,r,a;if(t[0]==="{"){const{minStr:s,maxStr:u}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(t).groups,c=1e5;if(+s>c||u&&+u>c)throw new Error("Quantifier value unsupported in Oniguruma");if(r=+s,a=u===void 0?+s:u===""?1/0:+u,r>a&&(n="possessive",[r,a]=[a,r]),t.endsWith("?")){if(n==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');n="lazy"}else n||(n="greedy")}else r=t[0]==="+"?1:0,a=t[0]==="?"?1:1/0,n=t[1]==="+"?"possessive":t[1]==="?"?"lazy":"greedy";return JT(n,r,a,t)}function aR(t){const n=t[1].toLowerCase();return Hr({d:"digit",h:"hex",s:"space",w:"word"}[n],t,{negate:t[1]!==n})}function oR(t){const{p:n,neg:r,value:a}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(t).groups;return Hr("property",t,{value:a,negate:n==="P"&&!r||n==="p"&&!!r})}function ev(t){const n={};return t.includes("i")&&(n.ignoreCase=!0),t.includes("m")&&(n.dotAll=!0),t.includes("x")&&(n.extended=!0),Object.keys(n).length?n:null}function lR(t){const n={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<t.length;r++){const a=t[r];if(!"imxDPSWy".includes(a))throw new Error(`Invalid flag "${a}"`);if(a==="y"){if(!/^y{[gw]}/.test(t.slice(r)))throw new Error('Invalid or unspecified flag "y" mode');n.textSegmentMode=t[r+2]==="g"?"grapheme":"word",r+=3;continue}n[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[a]]=!0}return n}function sR(t){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(t))throw new Error(`Incomplete or invalid escape "${t}"`);const n=t[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(t).groups.hex:t.slice(2);return parseInt(n,16)}function uR(t,n){const{raw:r,inCharClass:a}=t,s=r.slice(1);if(!a&&(s!=="0"&&s.length===1||s[0]!=="0"&&+s<=n))return[m1(r)];const u=[],c=s.match(/^[0-7]+|\d/g);for(let h=0;h<c.length;h++){const d=c[h];let p;if(h===0&&d!=="8"&&d!=="9"){if(p=parseInt(d,8),p>127)throw new Error(zt`Octal encoded byte above 177 unsupported "${r}"`)}else p=Ja(d);u.push(Mi(p,(h===0?"\\":"")+d))}return u}function cR(t){const n=[],r=new RegExp(Oh,"gy");let a;for(;a=r.exec(t);){const s=a[0];if(s[0]==="{"){const u=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(s);if(u){const{min:c,max:h}=u.groups;if(+c>+h&&s.endsWith("?")){r.lastIndex--,n.push(J0(s.slice(0,-1)));continue}}}n.push(J0(s))}return n}function g1(t,n){if(!Array.isArray(t.body))throw new Error("Expected node with body array");if(t.body.length!==1)return!1;const r=t.body[0];return!n||Object.keys(n).every(a=>n[a]===r[a])}function dR(t){return fR.has(t.type)}const fR=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function b1(t,n={}){const r={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...n,rules:{captureGroup:!1,singleline:!1,...n.rules}},a=VT(t,{flags:r.flags,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline}}),s=(v,_)=>{const x=a.tokens[u.nextIndex];switch(u.parent=v,u.nextIndex++,x.type){case"Alternator":return Gr();case"Assertion":return hR(x);case"Backreference":return mR(x,u);case"Character":return Ou(x.value,{useLastValid:!!_.isCheckingRangeEnd});case"CharacterClassHyphen":return pR(x,u,_);case"CharacterClassOpen":return gR(x,u,_);case"CharacterSet":return bR(x,u);case"Directive":return ER(x.kind,{flags:x.flags});case"GroupOpen":return vR(x,u,_);case"NamedCallout":return CR(x.kind,x.tag,x.arguments);case"Quantifier":return yR(x,u);case"Subroutine":return _R(x,u);default:throw new Error(`Unexpected token type "${x.type}"`)}},u={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:r.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:r.skipBackrefValidation,skipLookbehindValidation:r.skipLookbehindValidation,skipPropertyNameValidation:r.skipPropertyNameValidation,subroutines:[],tokens:a.tokens,unicodePropertyMap:r.unicodePropertyMap,walk:s},c=kR(wR(a.flags));let h=c.body[0];for(;u.nextIndex<a.tokens.length;){const v=s(h,{});v.type==="Alternative"?(c.body.push(v),h=v):h.body.push(v)}const{capturingGroups:d,hasNumberedRef:p,namedGroupsByName:b,subroutines:g}=u;if(p&&b.size&&!r.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:v}of g)if(typeof v=="number"){if(v>d.length)throw new Error("Subroutine uses a group number that's not defined");v&&(d[v-1].isSubroutined=!0)}else if(b.has(v)){if(b.get(v).length>1)throw new Error(zt`Subroutine uses a duplicate group name "\g<${v}>"`);b.get(v)[0].isSubroutined=!0}else throw new Error(zt`Subroutine uses a group name that's not defined "\g<${v}>"`);return c}function hR({kind:t}){return nh(eo({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[t],`Unexpected assertion kind "${t}"`),{negate:t===zt`\B`||t===zt`\Y`})}function mR({raw:t},n){const r=/^\\k[<']/.test(t),a=r?t.slice(3,-1):t.slice(1),s=(u,c=!1)=>{const h=n.capturingGroups.length;let d=!1;if(u>h)if(n.skipBackrefValidation)d=!0;else throw new Error(`Not enough capturing groups defined to the left "${t}"`);return n.hasNumberedRef=!0,ih(c?h+1-u:u,{orphan:d})};if(r){const u=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(a);if(u)return s(+u.groups.num,!!u.groups.sign);if(/[-+]/.test(a))throw new Error(`Invalid backref name "${t}"`);if(!n.namedGroupsByName.has(a))throw new Error(`Group name not defined to the left "${t}"`);return ih(a)}return s(+a)}function pR(t,n,r){const{tokens:a,walk:s}=n,u=n.parent,c=u.body.at(-1),h=a[n.nextIndex];if(!r.isCheckingRangeEnd&&c&&c.type!=="CharacterClass"&&c.type!=="CharacterClassRange"&&h&&h.type!=="CharacterClassOpen"&&h.type!=="CharacterClassClose"&&h.type!=="CharacterClassIntersector"){const d=s(u,{...r,isCheckingRangeEnd:!0});if(c.type==="Character"&&d.type==="Character")return u.body.pop(),SR(c,d);throw new Error("Invalid character class range")}return Ou(Ja("-"))}function gR({negate:t},n,r){const{tokens:a,walk:s}=n,u=a[n.nextIndex],c=[eu()];let h=iv(u);for(;h.type!=="CharacterClassClose";){if(h.type==="CharacterClassIntersector")c.push(eu()),n.nextIndex++;else{const p=c.at(-1);p.body.push(s(p,r))}h=iv(a[n.nextIndex],u)}const d=eu({negate:t});return c.length===1?d.body=c[0].body:(d.kind="intersection",d.body=c.map(p=>p.body.length===1?p.body[0]:p)),n.nextIndex++,d}function bR({kind:t,negate:n,value:r},a){const{normalizeUnknownPropertyNames:s,skipPropertyNameValidation:u,unicodePropertyMap:c}=a;if(t==="property"){const h=Du(r);if(Mh.has(h)&&!c?.has(h))t="posix",r=h;else return Ha(r,{negate:n,normalizeUnknownPropertyNames:s,skipPropertyNameValidation:u,unicodePropertyMap:c})}return t==="posix"?AR(r,{negate:n}):rh(t,{negate:n})}function vR(t,n,r){const{tokens:a,capturingGroups:s,namedGroupsByName:u,skipLookbehindValidation:c,walk:h}=n,d=TR(t),p=d.type==="AbsenceFunction",b=nv(d),g=b&&d.negate;if(d.type==="CapturingGroup"&&(s.push(d),d.name&&BT(u,d.name,[]).push(d)),p&&r.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let v=rv(a[n.nextIndex]);for(;v.type!=="GroupClose";){if(v.type==="Alternator")d.body.push(Gr()),n.nextIndex++;else{const _=d.body.at(-1),x=h(_,{...r,isInAbsenceFunction:r.isInAbsenceFunction||p,isInLookbehind:r.isInLookbehind||b,isInNegLookbehind:r.isInNegLookbehind||g});if(_.body.push(x),(b||r.isInLookbehind)&&!c){const T="Lookbehind includes a pattern not allowed by Oniguruma";if(g||r.isInNegLookbehind){if(tv(x)||x.type==="CapturingGroup")throw new Error(T)}else if(tv(x)||nv(x)&&x.negate)throw new Error(T)}}v=rv(a[n.nextIndex])}return n.nextIndex++,d}function yR({kind:t,min:n,max:r},a){const s=a.parent,u=s.body.at(-1);if(!u||!dR(u))throw new Error("Quantifier requires a repeatable token");const c=y1(t,n,r,u);return s.body.pop(),c}function _R({raw:t},n){const{capturingGroups:r,subroutines:a}=n;let s=t.slice(3,-1);const u=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(s);if(u){const h=+u.groups.num,d=r.length;if(n.hasNumberedRef=!0,s={"":h,"+":d+h,"-":d+1-h}[u.groups.sign],s<1)throw new Error("Invalid subroutine number")}else s==="0"&&(s=0);const c=_1(s);return a.push(c),c}function xR(t,n){return{type:"AbsenceFunction",kind:t,body:gl(n?.body)}}function Gr(t){return{type:"Alternative",body:x1(t?.body)}}function nh(t,n){const r={type:"Assertion",kind:t};return(t==="word_boundary"||t==="text_segment_boundary")&&(r.negate=!!n?.negate),r}function ih(t,n){const r=!!n?.orphan;return{type:"Backreference",ref:t,...r&&{orphan:r}}}function v1(t,n){const r={name:void 0,isSubroutined:!1,...n};if(r.name!==void 0&&!RR(r.name))throw new Error(`Group name "${r.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:t,...r.name&&{name:r.name},...r.isSubroutined&&{isSubroutined:r.isSubroutined},body:gl(n?.body)}}function Ou(t,n){const r={useLastValid:!1,...n};if(t>1114111){const a=t.toString(16);if(r.useLastValid)t=1114111;else throw t>1310719?new Error(`Invalid code point out of range "\\x{${a}}"`):new Error(`Invalid code point out of range in JS "\\x{${a}}"`)}return{type:"Character",value:t}}function eu(t){const n={kind:"union",negate:!1,...t};return{type:"CharacterClass",kind:n.kind,negate:n.negate,body:x1(t?.body)}}function SR(t,n){if(n.value<t.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:t,max:n}}function rh(t,n){const r=!!n?.negate,a={type:"CharacterSet",kind:t};return(t==="digit"||t==="hex"||t==="newline"||t==="space"||t==="word")&&(a.negate=r),(t==="text_segment"||t==="newline"&&!r)&&(a.variableLength=!0),a}function ER(t,n={}){if(t==="keep")return{type:"Directive",kind:t};if(t==="flags")return{type:"Directive",kind:t,flags:eo(n.flags)};throw new Error(`Unexpected directive kind "${t}"`)}function wR(t){return{type:"Flags",...t}}function Yn(t){const n=t?.atomic,r=t?.flags;if(n&&r)throw new Error("Atomic group cannot have flags");return{type:"Group",...n&&{atomic:n},...r&&{flags:r},body:gl(t?.body)}}function jr(t){const n={behind:!1,negate:!1,...t};return{type:"LookaroundAssertion",kind:n.behind?"lookbehind":"lookahead",negate:n.negate,body:gl(t?.body)}}function CR(t,n,r){return{type:"NamedCallout",kind:t,tag:n,arguments:r}}function AR(t,n){const r=!!n?.negate;if(!Mh.has(t))throw new Error(`Invalid POSIX class "${t}"`);return{type:"CharacterSet",kind:"posix",value:t,negate:r}}function y1(t,n,r,a){if(n>r)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:t,min:n,max:r,body:a}}function kR(t,n){return{type:"Regex",body:gl(n?.body),flags:t}}function _1(t){return{type:"Subroutine",ref:t}}function Ha(t,n){const r={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...n};let a=r.unicodePropertyMap?.get(Du(t));if(!a){if(r.normalizeUnknownPropertyNames)a=LR(t);else if(r.unicodePropertyMap&&!r.skipPropertyNameValidation)throw new Error(zt`Invalid Unicode property "\p{${t}}"`)}return{type:"CharacterSet",kind:"property",value:a??t,negate:r.negate}}function TR({flags:t,kind:n,name:r,negate:a,number:s}){switch(n){case"absence_repeater":return xR("repeater");case"atomic":return Yn({atomic:!0});case"capturing":return v1(s,{name:r});case"group":return Yn({flags:t});case"lookahead":case"lookbehind":return jr({behind:n==="lookbehind",negate:a});default:throw new Error(`Unexpected group kind "${n}"`)}}function gl(t){if(t===void 0)t=[Gr()];else if(!Array.isArray(t)||!t.length||!t.every(n=>n.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return t}function x1(t){if(t===void 0)t=[];else if(!Array.isArray(t)||!t.every(n=>!!n.type))throw new Error("Invalid body; expected array of nodes");return t}function tv(t){return t.type==="LookaroundAssertion"&&t.kind==="lookahead"}function nv(t){return t.type==="LookaroundAssertion"&&t.kind==="lookbehind"}function RR(t){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(t)}function LR(t){return t.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}function Du(t){return t.replace(/[- _]+/g,"").toLowerCase()}function iv(t,n){return eo(t,`${n?.type==="Character"&&n.value===93?"Empty":"Unclosed"} character class`)}function rv(t){return eo(t,"Unclosed group")}function rl(t,n,r=null){function a(u,c){for(let h=0;h<u.length;h++){const d=s(u[h],c,h,u);h=Math.max(-1,h+d)}}function s(u,c=null,h=null,d=null){let p=0,b=!1;const g={node:u,parent:c,key:h,container:d,root:t,remove(){Hs(d).splice(Math.max(0,Da(h)+p),1),p--,b=!0},removeAllNextSiblings(){return Hs(d).splice(Da(h)+1)},removeAllPrevSiblings(){const A=Da(h)+p;return p-=A,Hs(d).splice(0,Math.max(0,A))},replaceWith(A,C={}){const k=!!C.traverse;d?d[Math.max(0,Da(h)+p)]=A:eo(c,"Can't replace root node")[h]=A,k&&s(A,c,h,d),b=!0},replaceWithMultiple(A,C={}){const k=!!C.traverse;if(Hs(d).splice(Math.max(0,Da(h)+p),1,...A),p+=A.length-1,k){let I=0;for(let M=0;M<A.length;M++)I+=s(A[M],c,Da(h)+M+I,d)}b=!0},skip(){b=!0}},{type:v}=u,_=n["*"],x=n[v],T=typeof _=="function"?_:_?.enter,O=typeof x=="function"?x:x?.enter;if(T?.(g,r),O?.(g,r),!b)switch(v){case"AbsenceFunction":case"CapturingGroup":case"Group":a(u.body,u);break;case"Alternative":case"CharacterClass":a(u.body,u);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":s(u.min,u,"min"),s(u.max,u,"max");break;case"LookaroundAssertion":a(u.body,u);break;case"Quantifier":s(u.body,u,"body");break;case"Regex":a(u.body,u),s(u.flags,u,"flags");break;default:throw new Error(`Unexpected node type "${v}"`)}return x?.exit?.(g,r),_?.exit?.(g,r),p}return s(t),t}function Hs(t){if(!Array.isArray(t))throw new Error("Container expected");return t}function Da(t){if(typeof t!="number")throw new Error("Numeric key expected");return t}const NR=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function MR(t,n){for(let r=0;r<t.length;r++)t[r]>=n&&t[r]++}function OR(t,n,r,a){return t.slice(0,n)+a+t.slice(n+r.length)}const jn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Dh(t,n,r,a){const s=new RegExp(String.raw`${n}|(?<$skip>\[\^?|\\?.)`,"gsu"),u=[!1];let c=0,h="";for(const d of t.matchAll(s)){const{0:p,groups:{$skip:b}}=d;if(!b&&(!a||a===jn.DEFAULT==!c)){r instanceof Function?h+=r(d,{context:c?jn.CHAR_CLASS:jn.DEFAULT,negated:u[u.length-1]}):h+=r;continue}p[0]==="["?(c++,u.push(p[1]==="^")):p==="]"&&c&&(c--,u.pop()),h+=p}return h}function S1(t,n,r,a){Dh(t,n,r,a)}function DR(t,n,r=0,a){if(!new RegExp(n,"su").test(t))return null;const s=new RegExp(`${n}|(?<$skip>\\\\?.)`,"gsu");s.lastIndex=r;let u=0,c;for(;c=s.exec(t);){const{0:h,groups:{$skip:d}}=c;if(!d&&(!a||a===jn.DEFAULT==!u))return c;h==="["?u++:h==="]"&&u&&u--,s.lastIndex==c.index&&s.lastIndex++}return null}function Bs(t,n,r){return!!DR(t,n,0,r)}function IR(t,n){const r=/\\?./gsu;r.lastIndex=n;let a=t.length,s=0,u=1,c;for(;c=r.exec(t);){const[h]=c;if(h==="[")s++;else if(s)h==="]"&&s--;else if(h==="(")u++;else if(h===")"&&(u--,!u)){a=c.index;break}}return t.slice(n,a)}const av=new RegExp(String.raw`(?<noncapturingStart>${NR})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function zR(t,n){const r=n?.hiddenCaptures??[];let a=n?.captureTransfers??new Map;if(!/\(\?>/.test(t))return{pattern:t,captureTransfers:a,hiddenCaptures:r};const s="(?>",u="(?:(?=(",c=[0],h=[];let d=0,p=0,b=NaN,g;do{g=!1;let v=0,_=0,x=!1,T;for(av.lastIndex=Number.isNaN(b)?0:b+u.length;T=av.exec(t);){const{0:O,index:A,groups:{capturingStart:C,noncapturingStart:k}}=T;if(O==="[")v++;else if(v)O==="]"&&v--;else if(O===s&&!x)b=A,x=!0;else if(x&&k)_++;else if(C)x?_++:(d++,c.push(d+p));else if(O===")"&&x){if(!_){p++;const I=d+p;if(t=`${t.slice(0,b)}${u}${t.slice(b+s.length,A)}))<$$${I}>)${t.slice(A+1)}`,g=!0,h.push(I),MR(r,I),a.size){const M=new Map;a.forEach((U,H)=>{M.set(H>=I?H+1:H,U.map(z=>z>=I?z+1:z))}),a=M}break}_--}}}while(g);return r.push(...h),t=Dh(t,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:v,groups:{backrefNum:_,wrappedBackrefNum:x}})=>{if(_){const T=+_;if(T>c.length-1)throw new Error(`Backref "${v}" greater than number of captures`);return`\\${c[T]}`}return`\\${x}`},jn.DEFAULT),{pattern:t,captureTransfers:a,hiddenCaptures:r}}const E1=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,gf=new RegExp(String.raw`
|
|
54
|
+
\\(?: \d+
|
|
55
|
+
| c[A-Za-z]
|
|
56
|
+
| [gk]<[^>]+>
|
|
57
|
+
| [pPu]\{[^\}]+\}
|
|
58
|
+
| u[A-Fa-f\d]{4}
|
|
59
|
+
| x[A-Fa-f\d]{2}
|
|
60
|
+
)
|
|
61
|
+
| \((?: \? (?: [:=!>]
|
|
62
|
+
| <(?:[=!]|[^>]+>)
|
|
63
|
+
| [A-Za-z\-]+:
|
|
64
|
+
| \(DEFINE\)
|
|
65
|
+
))?
|
|
66
|
+
| (?<qBase>${E1})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
67
|
+
| \\?.
|
|
68
|
+
`.replace(/\s+/g,""),"gsu");function PR(t){if(!new RegExp(`${E1}\\+`).test(t))return{pattern:t};const n=[];let r=null,a=null,s="",u=0,c;for(gf.lastIndex=0;c=gf.exec(t);){const{0:h,index:d,groups:{qBase:p,qMod:b,invalidQ:g}}=c;if(h==="[")u||(a=d),u++;else if(h==="]")u?u--:a=null;else if(!u)if(b==="+"&&s&&!s.startsWith("(")){if(g)throw new Error(`Invalid quantifier "${h}"`);let v=-1;if(/^\{\d+\}$/.test(p))t=OR(t,d+p.length,b,"");else{if(s===")"||s==="]"){const _=s===")"?r:a;if(_===null)throw new Error(`Invalid unmatched "${s}"`);t=`${t.slice(0,_)}(?>${t.slice(_,d)}${p})${t.slice(d+h.length)}`}else t=`${t.slice(0,d-s.length)}(?>${s}${p})${t.slice(d+h.length)}`;v+=4}gf.lastIndex+=v}else h[0]==="("?n.push(d):h===")"&&(r=n.length?n.pop():null);s=h}return{pattern:t}}const In=String.raw,jR=In`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,ah=In`\(\?R=(?<rDepth>[^\)]+)\)|${jR}`,Iu=In`\(\?<(?![=!])(?<captureName>[^>]+)>`,w1=In`${Iu}|(?<unnamed>\()(?!\?)`,Ir=new RegExp(In`${Iu}|${ah}|\(\?|\\?.`,"gsu"),bf="Cannot use multiple overlapping recursions";function UR(t,n){const{hiddenCaptures:r,mode:a}={hiddenCaptures:[],mode:"plugin",...n};let s=n?.captureTransfers??new Map;if(!new RegExp(ah,"su").test(t))return{pattern:t,captureTransfers:s,hiddenCaptures:r};if(a==="plugin"&&Bs(t,In`\(\?\(DEFINE\)`,jn.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const u=[],c=Bs(t,In`\\[1-9]`,jn.DEFAULT),h=new Map,d=[];let p=!1,b=0,g=0,v;for(Ir.lastIndex=0;v=Ir.exec(t);){const{0:_,groups:{captureName:x,rDepth:T,gRNameOrNum:O,gRDepth:A}}=v;if(_==="[")b++;else if(b)_==="]"&&b--;else if(T){if(ov(T),p)throw new Error(bf);if(c)throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const C=t.slice(0,v.index),k=t.slice(Ir.lastIndex);if(Bs(k,ah,jn.DEFAULT))throw new Error(bf);const I=+T-1;t=lv(C,k,I,!1,r,u,g),s=uv(s,C,I,u.length,0,g);break}else if(O){ov(A);let C=!1;for(const V of d)if(V.name===O||V.num===+O){if(C=!0,V.hasRecursedWithin)throw new Error(bf);break}if(!C)throw new Error(In`Recursive \g cannot be used outside the referenced group "${a==="external"?O:In`\g<${O}&R=${A}>`}"`);const k=h.get(O),I=IR(t,k);if(c&&Bs(I,In`${Iu}|\((?!\?)`,jn.DEFAULT))throw new Error(`${a==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const M=t.slice(k,v.index),U=I.slice(M.length+_.length),H=u.length,z=+A-1,Q=lv(M,U,z,!0,r,u,g);s=uv(s,M,z,u.length-H,H,g);const ee=t.slice(0,k),ie=t.slice(k+I.length);t=`${ee}${Q}${ie}`,Ir.lastIndex+=Q.length-_.length-M.length-U.length,d.forEach(V=>V.hasRecursedWithin=!0),p=!0}else if(x)g++,h.set(String(g),Ir.lastIndex),h.set(x,Ir.lastIndex),d.push({num:g,name:x});else if(_[0]==="("){const C=_==="(";C&&(g++,h.set(String(g),Ir.lastIndex)),d.push(C?{num:g}:{})}else _===")"&&d.pop()}return r.push(...u),{pattern:t,captureTransfers:s,hiddenCaptures:r}}function ov(t){const n=`Max depth must be integer between 2 and 100; used ${t}`;if(!/^[1-9]\d*$/.test(t))throw new Error(n);if(t=+t,t<2||t>100)throw new Error(n)}function lv(t,n,r,a,s,u,c){const h=new Set;a&&S1(t+n,Iu,({groups:{captureName:p}})=>{h.add(p)},jn.DEFAULT);const d=[r,a?h:null,s,u,c];return`${t}${sv(`(?:${t}`,"forward",...d)}(?:)${sv(`${n})`,"backward",...d)}${n}`}function sv(t,n,r,a,s,u,c){const d=b=>n==="forward"?b+2:r-b+2-1;let p="";for(let b=0;b<r;b++){const g=d(b);p+=Dh(t,In`${w1}|\\k<(?<backref>[^>]+)>`,({0:v,groups:{captureName:_,unnamed:x,backref:T}})=>{if(T&&a&&!a.has(T))return v;const O=`_$${g}`;if(x||_){const A=c+u.length+1;return u.push(A),HR(s,A),x?v:`(?<${_}${O}>`}return In`\k<${T}${O}>`},jn.DEFAULT)}return p}function HR(t,n){for(let r=0;r<t.length;r++)t[r]>=n&&t[r]++}function uv(t,n,r,a,s,u){if(t.size&&a){let c=0;S1(n,w1,()=>c++,jn.DEFAULT);const h=u-c+s,d=new Map;return t.forEach((p,b)=>{const g=(a-c*r)/r,v=c*r,_=b>h+c?b+a:b,x=[];for(const T of p)if(T<=h)x.push(T);else if(T>h+c+g)x.push(T+a);else if(T<=h+c)for(let O=0;O<=r;O++)x.push(T+c*O);else for(let O=0;O<=r;O++)x.push(T+v+g*O);d.set(_,x)}),d}return t}var Lt=String.fromCodePoint,Ne=String.raw,Xn={},zu=globalThis.RegExp;Xn.flagGroups=(()=>{try{new zu("(?i:)")}catch{return!1}return!0})();Xn.unicodeSets=(()=>{try{new zu("[[]]","v")}catch{return!1}return!0})();Xn.bugFlagVLiteralHyphenIsRange=Xn.unicodeSets?(()=>{try{new zu(Ne`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Xn.bugNestedClassIgnoresNegation=Xn.unicodeSets&&new zu("[[^a]]","v").test("a");function xu(t,{enable:n,disable:r}){return{dotAll:!r?.dotAll&&!!(n?.dotAll||t.dotAll),ignoreCase:!r?.ignoreCase&&!!(n?.ignoreCase||t.ignoreCase)}}function dl(t,n,r){return t.has(n)||t.set(n,r),t.get(n)}function oh(t,n){return cv[t]>=cv[n]}function BR(t,n){if(t==null)throw new Error(n??"Value expected");return t}var cv={ES2025:2025,ES2024:2024,ES2018:2018},VR={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function C1(t={}){if({}.toString.call(t)!=="[object Object]")throw new Error("Unexpected options");if(t.target!==void 0&&!VR[t.target])throw new Error(`Unexpected target "${t.target}"`);const n={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...t,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...t.rules}};return n.target==="auto"&&(n.target=Xn.flagGroups?"ES2025":Xn.unicodeSets?"ES2024":"ES2018"),n}var GR="[ -\r ]",$R=new Set([Lt(304),Lt(305)]),Ti=Ne`[\p{L}\p{M}\p{N}\p{Pc}]`;function A1(t){if($R.has(t))return[t];const n=new Set,r=t.toLowerCase(),a=r.toUpperCase(),s=FR.get(r),u=qR.get(r),c=YR.get(r);return[...a].length===1&&n.add(a),c&&n.add(c),s&&n.add(s),n.add(r),u&&n.add(u),[...n]}var Ih=new Map(`C Other
|
|
69
|
+
Cc Control cntrl
|
|
70
|
+
Cf Format
|
|
71
|
+
Cn Unassigned
|
|
72
|
+
Co Private_Use
|
|
73
|
+
Cs Surrogate
|
|
74
|
+
L Letter
|
|
75
|
+
LC Cased_Letter
|
|
76
|
+
Ll Lowercase_Letter
|
|
77
|
+
Lm Modifier_Letter
|
|
78
|
+
Lo Other_Letter
|
|
79
|
+
Lt Titlecase_Letter
|
|
80
|
+
Lu Uppercase_Letter
|
|
81
|
+
M Mark Combining_Mark
|
|
82
|
+
Mc Spacing_Mark
|
|
83
|
+
Me Enclosing_Mark
|
|
84
|
+
Mn Nonspacing_Mark
|
|
85
|
+
N Number
|
|
86
|
+
Nd Decimal_Number digit
|
|
87
|
+
Nl Letter_Number
|
|
88
|
+
No Other_Number
|
|
89
|
+
P Punctuation punct
|
|
90
|
+
Pc Connector_Punctuation
|
|
91
|
+
Pd Dash_Punctuation
|
|
92
|
+
Pe Close_Punctuation
|
|
93
|
+
Pf Final_Punctuation
|
|
94
|
+
Pi Initial_Punctuation
|
|
95
|
+
Po Other_Punctuation
|
|
96
|
+
Ps Open_Punctuation
|
|
97
|
+
S Symbol
|
|
98
|
+
Sc Currency_Symbol
|
|
99
|
+
Sk Modifier_Symbol
|
|
100
|
+
Sm Math_Symbol
|
|
101
|
+
So Other_Symbol
|
|
102
|
+
Z Separator
|
|
103
|
+
Zl Line_Separator
|
|
104
|
+
Zp Paragraph_Separator
|
|
105
|
+
Zs Space_Separator
|
|
106
|
+
ASCII
|
|
107
|
+
ASCII_Hex_Digit AHex
|
|
108
|
+
Alphabetic Alpha
|
|
109
|
+
Any
|
|
110
|
+
Assigned
|
|
111
|
+
Bidi_Control Bidi_C
|
|
112
|
+
Bidi_Mirrored Bidi_M
|
|
113
|
+
Case_Ignorable CI
|
|
114
|
+
Cased
|
|
115
|
+
Changes_When_Casefolded CWCF
|
|
116
|
+
Changes_When_Casemapped CWCM
|
|
117
|
+
Changes_When_Lowercased CWL
|
|
118
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
119
|
+
Changes_When_Titlecased CWT
|
|
120
|
+
Changes_When_Uppercased CWU
|
|
121
|
+
Dash
|
|
122
|
+
Default_Ignorable_Code_Point DI
|
|
123
|
+
Deprecated Dep
|
|
124
|
+
Diacritic Dia
|
|
125
|
+
Emoji
|
|
126
|
+
Emoji_Component EComp
|
|
127
|
+
Emoji_Modifier EMod
|
|
128
|
+
Emoji_Modifier_Base EBase
|
|
129
|
+
Emoji_Presentation EPres
|
|
130
|
+
Extended_Pictographic ExtPict
|
|
131
|
+
Extender Ext
|
|
132
|
+
Grapheme_Base Gr_Base
|
|
133
|
+
Grapheme_Extend Gr_Ext
|
|
134
|
+
Hex_Digit Hex
|
|
135
|
+
IDS_Binary_Operator IDSB
|
|
136
|
+
IDS_Trinary_Operator IDST
|
|
137
|
+
ID_Continue IDC
|
|
138
|
+
ID_Start IDS
|
|
139
|
+
Ideographic Ideo
|
|
140
|
+
Join_Control Join_C
|
|
141
|
+
Logical_Order_Exception LOE
|
|
142
|
+
Lowercase Lower
|
|
143
|
+
Math
|
|
144
|
+
Noncharacter_Code_Point NChar
|
|
145
|
+
Pattern_Syntax Pat_Syn
|
|
146
|
+
Pattern_White_Space Pat_WS
|
|
147
|
+
Quotation_Mark QMark
|
|
148
|
+
Radical
|
|
149
|
+
Regional_Indicator RI
|
|
150
|
+
Sentence_Terminal STerm
|
|
151
|
+
Soft_Dotted SD
|
|
152
|
+
Terminal_Punctuation Term
|
|
153
|
+
Unified_Ideograph UIdeo
|
|
154
|
+
Uppercase Upper
|
|
155
|
+
Variation_Selector VS
|
|
156
|
+
White_Space space
|
|
157
|
+
XID_Continue XIDC
|
|
158
|
+
XID_Start XIDS`.split(/\s/).map(t=>[Du(t),t])),qR=new Map([["s",Lt(383)],[Lt(383),"s"]]),YR=new Map([[Lt(223),Lt(7838)],[Lt(107),Lt(8490)],[Lt(229),Lt(8491)],[Lt(969),Lt(8486)]]),FR=new Map([cr(453),cr(456),cr(459),cr(498),...vf(8072,8079),...vf(8088,8095),...vf(8104,8111),cr(8124),cr(8140),cr(8188)]),XR=new Map([["alnum",Ne`[\p{Alpha}\p{Nd}]`],["alpha",Ne`\p{Alpha}`],["ascii",Ne`\p{ASCII}`],["blank",Ne`[\p{Zs}\t]`],["cntrl",Ne`\p{Cc}`],["digit",Ne`\p{Nd}`],["graph",Ne`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Ne`\p{Lower}`],["print",Ne`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Ne`[\p{P}\p{S}]`],["space",Ne`\p{space}`],["upper",Ne`\p{Upper}`],["word",Ne`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Ne`\p{AHex}`]]);function WR(t,n){const r=[];for(let a=t;a<=n;a++)r.push(a);return r}function cr(t){const n=Lt(t);return[n.toLowerCase(),n]}function vf(t,n){return WR(t,n).map(r=>cr(r))}var k1=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function QR(t,n){const r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...n};T1(t);const a={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:oh(r.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:t.flags.digitIsAscii,spaceIsAscii:t.flags.spaceIsAscii,wordIsAscii:t.flags.wordIsAscii};rl(t,KR,a);const s={dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},u={currentFlags:s,prevFlags:null,globalFlags:s,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:a.subroutineRefMap};rl(t,ZR,u);const c={groupsByName:u.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:u.reffedNodesByReferencer};return rl(t,JR,c),t._originMap=u.groupOriginByCopy,t._strategy=a.strategy,t}var KR={AbsenceFunction({node:t,parent:n,replaceWith:r}){const{body:a,kind:s}=t;if(s==="repeater"){const u=Yn();u.body[0].body.push(jr({negate:!0,body:a}),Ha("Any"));const c=Yn();c.body[0].body.push(y1("greedy",0,1/0,u)),r(bt(c,n),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:t,parent:n,key:r},{flagDirectivesByAlt:a}){const s=t.body.filter(u=>u.kind==="flags");for(let u=r+1;u<n.body.length;u++){const c=n.body[u];dl(a,c,[]).push(...s)}},exit({node:t},{flagDirectivesByAlt:n}){if(n.get(t)?.length){const r=L1(n.get(t));if(r){const a=Yn({flags:r});a.body[0].body=t.body,t.body=[bt(a,t)]}}}},Assertion({node:t,parent:n,key:r,container:a,root:s,remove:u,replaceWith:c},h){const{kind:d,negate:p}=t,{asciiWordBoundaries:b,avoidSubclass:g,supportedGNodes:v,wordIsAscii:_}=h;if(d==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${p?"Y":"y"}"`);if(d==="line_end")c(bt(jr({body:[Gr({body:[nh("string_end")]}),Gr({body:[Ou(10)]})]}),n));else if(d==="line_start")c(bt(Ri(Ne`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),n));else if(d==="search_start")if(v.has(t))s.flags.sticky=!0,u();else{const x=a[r-1];if(x&&aL(x))c(bt(jr({negate:!0}),n));else{if(g)throw new Error(Ne`Uses "\G" in a way that requires a subclass`);c(dr(nh("string_start"),n)),h.strategy="clip_search"}}else if(!(d==="string_end"||d==="string_start"))if(d==="string_end_newline")c(bt(Ri(Ne`(?=\n?\z)`),n));else if(d==="word_boundary"){if(!_&&!b){const x=`(?:(?<=${Ti})(?!${Ti})|(?<!${Ti})(?=${Ti}))`,T=`(?:(?<=${Ti})(?=${Ti})|(?<!${Ti})(?!${Ti}))`;c(bt(Ri(p?T:x),n))}}else throw new Error(`Unexpected assertion kind "${d}"`)},Backreference({node:t},{jsGroupNameMap:n}){let{ref:r}=t;typeof r=="string"&&!_f(r)&&(r=yf(r,n),t.ref=r)},CapturingGroup({node:t},{jsGroupNameMap:n,subroutineRefMap:r}){let{name:a}=t;a&&!_f(a)&&(a=yf(a,n),t.name=a),r.set(t.number,t),a&&r.set(a,t)},CharacterClassRange({node:t,parent:n,replaceWith:r}){if(n.kind==="intersection"){const a=eu({body:[t]});r(bt(a,n),{traverse:!0})}},CharacterSet({node:t,parent:n,replaceWith:r},{accuracy:a,minTargetEs2024:s,digitIsAscii:u,spaceIsAscii:c,wordIsAscii:h}){const{kind:d,negate:p,value:b}=t;if(u&&(d==="digit"||b==="digit")){r(dr(rh("digit",{negate:p}),n));return}if(c&&(d==="space"||b==="space")){r(bt(xf(Ri(GR),p),n));return}if(h&&(d==="word"||b==="word")){r(dr(rh("word",{negate:p}),n));return}if(d==="any")r(dr(Ha("Any"),n));else if(d==="digit")r(dr(Ha("Nd",{negate:p}),n));else if(d!=="dot")if(d==="text_segment"){if(a==="strict")throw new Error(Ne`Use of "\X" requires non-strict accuracy`);const g="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",v=Ne`\p{RI}{2}|${g}(?:\u200D${g})*`;r(bt(Ri(Ne`(?>\r\n|${s?Ne`\p{RGI_Emoji}`:v}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),n))}else if(d==="hex")r(dr(Ha("AHex",{negate:p}),n));else if(d==="newline")r(bt(Ri(p?`[^
|
|
159
|
+
]`:`(?>\r
|
|
160
|
+
?|[
|
|
161
|
+
\v\f
\u2028\u2029])`),n));else if(d==="posix")if(!s&&(b==="graph"||b==="print")){if(a==="strict")throw new Error(`POSIX class "${b}" requires min target ES2024 or non-strict accuracy`);let g={graph:"!-~",print:" -~"}[b];p&&(g=`\0-${Lt(g.codePointAt(0)-1)}${Lt(g.codePointAt(2)+1)}-`),r(bt(Ri(`[${g}]`),n))}else r(bt(xf(Ri(XR.get(b)),p),n));else if(d==="property")Ih.has(Du(b))||(t.key="sc");else if(d==="space")r(dr(Ha("space",{negate:p}),n));else if(d==="word")r(bt(xf(Ri(Ti),p),n));else throw new Error(`Unexpected character set kind "${d}"`)},Directive({node:t,parent:n,root:r,remove:a,replaceWith:s,removeAllPrevSiblings:u,removeAllNextSiblings:c}){const{kind:h,flags:d}=t;if(h==="flags")if(!d.enable&&!d.disable)a();else{const p=Yn({flags:d});p.body[0].body=c(),s(bt(p,n),{traverse:!0})}else if(h==="keep"){const p=r.body[0],g=r.body.length===1&&g1(p,{type:"Group"})&&p.body[0].body.length===1?p.body[0]:r;if(n.parent!==g||g.body.length>1)throw new Error(Ne`Uses "\K" in a way that's unsupported`);const v=jr({behind:!0});v.body[0].body=u(),s(bt(v,n))}else throw new Error(`Unexpected directive kind "${h}"`)},Flags({node:t,parent:n}){if(t.posixIsAscii)throw new Error('Unsupported flag "P"');if(t.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(r=>delete t[r]),Object.assign(t,{global:!1,hasIndices:!1,multiline:!1,sticky:t.sticky??!1}),n.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:t}){if(!t.flags)return;const{enable:n,disable:r}=t.flags;n?.extended&&delete n.extended,r?.extended&&delete r.extended,n?.dotAll&&r?.dotAll&&delete n.dotAll,n?.ignoreCase&&r?.ignoreCase&&delete n.ignoreCase,n&&!Object.keys(n).length&&delete t.flags.enable,r&&!Object.keys(r).length&&delete t.flags.disable,!t.flags.enable&&!t.flags.disable&&delete t.flags},LookaroundAssertion({node:t},n){const{kind:r}=t;r==="lookbehind"&&(n.passedLookbehind=!0)},NamedCallout({node:t,parent:n,replaceWith:r}){const{kind:a}=t;if(a==="fail")r(bt(jr({negate:!0}),n));else throw new Error(`Unsupported named callout "(*${a.toUpperCase()}"`)},Quantifier({node:t}){if(t.body.type==="Quantifier"){const n=Yn();n.body[0].body.push(t.body),t.body=bt(n,t)}},Regex:{enter({node:t},{supportedGNodes:n}){const r=[];let a=!1,s=!1;for(const u of t.body)if(u.body.length===1&&u.body[0].kind==="search_start")u.body.pop();else{const c=M1(u.body);c?(a=!0,Array.isArray(c)?r.push(...c):r.push(c)):s=!0}a&&!s&&r.forEach(u=>n.add(u))},exit(t,{accuracy:n,passedLookbehind:r,strategy:a}){if(n==="strict"&&r&&a)throw new Error(Ne`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:t},{jsGroupNameMap:n}){let{ref:r}=t;typeof r=="string"&&!_f(r)&&(r=yf(r,n),t.ref=r)}},ZR={Backreference({node:t},{multiplexCapturesToLeftByRef:n,reffedNodesByReferencer:r}){const{orphan:a,ref:s}=t;a||r.set(t,[...n.get(s).map(({node:u})=>u)])},CapturingGroup:{enter({node:t,parent:n,replaceWith:r,skip:a},{groupOriginByCopy:s,groupsByName:u,multiplexCapturesToLeftByRef:c,openRefs:h,reffedNodesByReferencer:d}){const p=s.get(t);if(p&&h.has(t.number)){const g=dr(dv(t.number),n);d.set(g,h.get(t.number)),r(g);return}h.set(t.number,t),c.set(t.number,[]),t.name&&dl(c,t.name,[]);const b=c.get(t.name??t.number);for(let g=0;g<b.length;g++){const v=b[g];if(p===v.node||p&&p===v.origin||t===v.origin){b.splice(g,1);break}}if(c.get(t.number).push({node:t,origin:p}),t.name&&c.get(t.name).push({node:t,origin:p}),t.name){const g=dl(u,t.name,new Map);let v=!1;if(p)v=!0;else for(const _ of g.values())if(!_.hasDuplicateNameToRemove){v=!0;break}u.get(t.name).set(t,{node:t,hasDuplicateNameToRemove:v})}},exit({node:t},{openRefs:n}){n.delete(t.number)}},Group:{enter({node:t},n){n.prevFlags=n.currentFlags,t.flags&&(n.currentFlags=xu(n.currentFlags,t.flags))},exit(t,n){n.currentFlags=n.prevFlags}},Subroutine({node:t,parent:n,replaceWith:r},a){const{isRecursive:s,ref:u}=t;if(s){let b=n;for(;(b=b.parent)&&!(b.type==="CapturingGroup"&&(b.name===u||b.number===u)););a.reffedNodesByReferencer.set(t,b);return}const c=a.subroutineRefMap.get(u),h=u===0,d=h?dv(0):R1(c,a.groupOriginByCopy,null);let p=d;if(!h){const b=L1(nL(c,v=>v.type==="Group"&&!!v.flags)),g=b?xu(a.globalFlags,b):a.globalFlags;eL(g,a.currentFlags)||(p=Yn({flags:iL(g)}),p.body[0].body.push(d))}r(bt(p,n),{traverse:!h})}},JR={Backreference({node:t,parent:n,replaceWith:r},a){if(t.orphan){a.highestOrphanBackref=Math.max(a.highestOrphanBackref,t.ref);return}const u=a.reffedNodesByReferencer.get(t).filter(c=>tL(c,t));if(!u.length)r(bt(jr({negate:!0}),n));else if(u.length>1){const c=Yn({atomic:!0,body:u.reverse().map(h=>Gr({body:[ih(h.number)]}))});r(bt(c,n))}else t.ref=u[0].number},CapturingGroup({node:t},n){t.number=++n.numCapturesToLeft,t.name&&n.groupsByName.get(t.name).get(t).hasDuplicateNameToRemove&&delete t.name},Regex:{exit({node:t},n){const r=Math.max(n.highestOrphanBackref-n.numCapturesToLeft,0);for(let a=0;a<r;a++){const s=v1();t.body.at(-1).body.push(s)}}},Subroutine({node:t},n){!t.isRecursive||t.ref===0||(t.ref=n.reffedNodesByReferencer.get(t).number)}};function T1(t){rl(t,{"*"({node:n,parent:r}){n.parent=r}})}function eL(t,n){return t.dotAll===n.dotAll&&t.ignoreCase===n.ignoreCase}function tL(t,n){let r=n;do{if(r.type==="Regex")return!1;if(r.type==="Alternative")continue;if(r===t)return!1;const a=N1(r.parent);for(const s of a){if(s===r)break;if(s===t||O1(s,t))return!0}}while(r=r.parent);throw new Error("Unexpected path")}function R1(t,n,r,a){const s=Array.isArray(t)?[]:{};for(const[u,c]of Object.entries(t))u==="parent"?s.parent=Array.isArray(r)?a:r:c&&typeof c=="object"?s[u]=R1(c,n,s,r):(u==="type"&&c==="CapturingGroup"&&n.set(s,n.get(t)??t),s[u]=c);return s}function dv(t){const n=_1(t);return n.isRecursive=!0,n}function nL(t,n){const r=[];for(;t=t.parent;)(!n||n(t))&&r.push(t);return r}function yf(t,n){if(n.has(t))return n.get(t);const r=`$${n.size}_${t.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return n.set(t,r),r}function L1(t){const n=["dotAll","ignoreCase"],r={enable:{},disable:{}};return t.forEach(({flags:a})=>{n.forEach(s=>{a.enable?.[s]&&(delete r.disable[s],r.enable[s]=!0),a.disable?.[s]&&(r.disable[s]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable?r:null}function iL({dotAll:t,ignoreCase:n}){const r={};return(t||n)&&(r.enable={},t&&(r.enable.dotAll=!0),n&&(r.enable.ignoreCase=!0)),(!t||!n)&&(r.disable={},!t&&(r.disable.dotAll=!0),!n&&(r.disable.ignoreCase=!0)),r}function N1(t){if(!t)throw new Error("Node expected");const{body:n}=t;return Array.isArray(n)?n:n?[n]:null}function M1(t){const n=t.find(r=>r.kind==="search_start"||oL(r,{negate:!1})||!rL(r));if(!n)return null;if(n.kind==="search_start")return n;if(n.type==="LookaroundAssertion")return n.body[0].body[0];if(n.type==="CapturingGroup"||n.type==="Group"){const r=[];for(const a of n.body){const s=M1(a.body);if(!s)return null;Array.isArray(s)?r.push(...s):r.push(s)}return r}return null}function O1(t,n){const r=N1(t)??[];for(const a of r)if(a===n||O1(a,n))return!0;return!1}function rL({type:t}){return t==="Assertion"||t==="Directive"||t==="LookaroundAssertion"}function aL(t){const n=["Character","CharacterClass","CharacterSet"];return n.includes(t.type)||t.type==="Quantifier"&&t.min&&n.includes(t.body.type)}function oL(t,n){const r={negate:null,...n};return t.type==="LookaroundAssertion"&&(r.negate===null||t.negate===r.negate)&&t.body.length===1&&g1(t.body[0],{type:"Assertion",kind:"search_start"})}function _f(t){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(t)}function Ri(t,n){const a=b1(t,{...n,unicodePropertyMap:Ih}).body;return a.length>1||a[0].body.length>1?Yn({body:a}):a[0].body[0]}function xf(t,n){return t.negate=n,t}function dr(t,n){return t.parent=n,t}function bt(t,n){return T1(t),t.parent=n,t}function lL(t,n){const r=C1(n),a=oh(r.target,"ES2024"),s=oh(r.target,"ES2025"),u=r.rules.recursionLimit;if(!Number.isInteger(u)||u<2||u>20)throw new Error("Invalid recursionLimit; use 2-20");let c=null,h=null;if(!s){const _=[t.flags.ignoreCase];rl(t,sL,{getCurrentModI:()=>_.at(-1),popModI(){_.pop()},pushModI(x){_.push(x)},setHasCasedChar(){_.at(-1)?c=!0:h=!0}})}const d={dotAll:t.flags.dotAll,ignoreCase:!!((t.flags.ignoreCase||c)&&!h)};let p=t;const b={accuracy:r.accuracy,appliedGlobalFlags:d,captureMap:new Map,currentFlags:{dotAll:t.flags.dotAll,ignoreCase:t.flags.ignoreCase},inCharClass:!1,lastNode:p,originMap:t._originMap,recursionLimit:u,useAppliedIgnoreCase:!!(!s&&c&&h),useFlagMods:s,useFlagV:a,verbose:r.verbose};function g(_){return b.lastNode=p,p=_,BR(uL[_.type],`Unexpected node type "${_.type}"`)(_,b,g)}const v={pattern:t.body.map(g).join("|"),flags:g(t.flags),options:{...t.options}};return a||(delete v.options.force.v,v.options.disable.v=!0,v.options.unicodeSetsPlugin=null),v._captureTransfers=new Map,v._hiddenCaptures=[],b.captureMap.forEach((_,x)=>{_.hidden&&v._hiddenCaptures.push(x),_.transferTo&&dl(v._captureTransfers,_.transferTo,[]).push(x)}),v}var sL={"*":{enter({node:t},n){if(hv(t)){const r=n.getCurrentModI();n.pushModI(t.flags?xu({ignoreCase:r},t.flags).ignoreCase:r)}},exit({node:t},n){hv(t)&&n.popModI()}},Backreference(t,n){n.setHasCasedChar()},Character({node:t},n){zh(Lt(t.value))&&n.setHasCasedChar()},CharacterClassRange({node:t,skip:n},r){n(),D1(t,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:t},n){t.kind==="property"&&k1.has(t.value)&&n.setHasCasedChar()}},uL={Alternative({body:t},n,r){return t.map(r).join("")},Assertion({kind:t,negate:n}){if(t==="string_end")return"$";if(t==="string_start")return"^";if(t==="word_boundary")return n?Ne`\B`:Ne`\b`;throw new Error(`Unexpected assertion kind "${t}"`)},Backreference({ref:t},n){if(typeof t!="number")throw new Error("Unexpected named backref in transformed AST");if(!n.useFlagMods&&n.accuracy==="strict"&&n.currentFlags.ignoreCase&&!n.captureMap.get(t).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+t},CapturingGroup(t,n,r){const{body:a,name:s,number:u}=t,c={ignoreCase:n.currentFlags.ignoreCase},h=n.originMap.get(t);return h&&(c.hidden=!0,u>h.number&&(c.transferTo=h.number)),n.captureMap.set(u,c),`(${s?`?<${s}>`:""}${a.map(r).join("|")})`},Character({value:t},n){const r=Lt(t),a=Ia(t,{escDigit:n.lastNode.type==="Backreference",inCharClass:n.inCharClass,useFlagV:n.useFlagV});if(a!==r)return a;if(n.useAppliedIgnoreCase&&n.currentFlags.ignoreCase&&zh(r)){const s=A1(r);return n.inCharClass?s.join(""):s.length>1?`[${s.join("")}]`:s[0]}return r},CharacterClass(t,n,r){const{kind:a,negate:s,parent:u}=t;let{body:c}=t;if(a==="intersection"&&!n.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Xn.bugFlagVLiteralHyphenIsRange&&n.useFlagV&&c.some(mv)&&(c=[Ou(45),...c.filter(p=>!mv(p))]);const h=()=>`[${s?"^":""}${c.map(r).join(a==="intersection"?"&&":"")}]`;if(!n.inCharClass){if((!n.useFlagV||Xn.bugNestedClassIgnoresNegation)&&!s){const b=c.filter(g=>g.type==="CharacterClass"&&g.kind==="union"&&g.negate);if(b.length){const g=Yn(),v=g.body[0];return g.parent=u,v.parent=g,c=c.filter(_=>!b.includes(_)),t.body=c,c.length?(t.parent=v,v.body.push(t)):g.body.pop(),b.forEach(_=>{const x=Gr({body:[_]});_.parent=x,x.parent=g,g.body.push(x)}),r(g)}}n.inCharClass=!0;const p=h();return n.inCharClass=!1,p}const d=c[0];if(a==="union"&&!s&&d&&((!n.useFlagV||!n.verbose)&&u.kind==="union"&&!(Xn.bugFlagVLiteralHyphenIsRange&&n.useFlagV)||!n.verbose&&u.kind==="intersection"&&c.length===1&&d.type!=="CharacterClassRange"))return c.map(r).join("");if(!n.useFlagV&&u.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return h()},CharacterClassRange(t,n){const r=t.min.value,a=t.max.value,s={escDigit:!1,inCharClass:!0,useFlagV:n.useFlagV},u=Ia(r,s),c=Ia(a,s),h=new Set;if(n.useAppliedIgnoreCase&&n.currentFlags.ignoreCase){const d=D1(t);mL(d).forEach(b=>{h.add(Array.isArray(b)?`${Ia(b[0],s)}-${Ia(b[1],s)}`:Ia(b,s))})}return`${u}-${c}${[...h].join("")}`},CharacterSet({kind:t,negate:n,value:r,key:a},s){if(t==="dot")return s.currentFlags.dotAll?s.appliedGlobalFlags.dotAll||s.useFlagMods?".":"[^]":Ne`[^\n]`;if(t==="digit")return n?Ne`\D`:Ne`\d`;if(t==="property"){if(s.useAppliedIgnoreCase&&s.currentFlags.ignoreCase&&k1.has(r))throw new Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${n?Ne`\P`:Ne`\p`}{${a?`${a}=`:""}${r}}`}if(t==="word")return n?Ne`\W`:Ne`\w`;throw new Error(`Unexpected character set kind "${t}"`)},Flags(t,n){return(n.appliedGlobalFlags.ignoreCase?"i":"")+(t.dotAll?"s":"")+(t.sticky?"y":"")},Group({atomic:t,body:n,flags:r,parent:a},s,u){const c=s.currentFlags;r&&(s.currentFlags=xu(c,r));const h=n.map(u).join("|"),d=!s.verbose&&n.length===1&&a.type!=="Quantifier"&&!t&&(!s.useFlagMods||!r)?h:`(?${pL(t,r,s.useFlagMods)}${h})`;return s.currentFlags=c,d},LookaroundAssertion({body:t,kind:n,negate:r},a,s){return`(?${`${n==="lookahead"?"":"<"}${r?"!":"="}`}${t.map(s).join("|")})`},Quantifier(t,n,r){return r(t.body)+gL(t)},Subroutine({isRecursive:t,ref:n},r){if(!t)throw new Error("Unexpected non-recursive subroutine in transformed AST");const a=r.recursionLimit;return n===0?`(?R=${a})`:Ne`\g<${n}&R=${a}>`}},cL=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),dL=new Set(["-","\\","]","^","["]),fL=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),fv=new Map([[9,Ne`\t`],[10,Ne`\n`],[11,Ne`\v`],[12,Ne`\f`],[13,Ne`\r`],[8232,Ne`\u2028`],[8233,Ne`\u2029`],[65279,Ne`\uFEFF`]]),hL=new RegExp("^\\p{Cased}$","u");function zh(t){return hL.test(t)}function D1(t,n){const r=!!n?.firstOnly,a=t.min.value,s=t.max.value,u=[];if(a<65&&(s===65535||s>=131071)||a===65536&&s>=131071)return u;for(let c=a;c<=s;c++){const h=Lt(c);if(!zh(h))continue;const d=A1(h).filter(p=>{const b=p.codePointAt(0);return b<a||b>s});if(d.length&&(u.push(...d),r))break}return u}function Ia(t,{escDigit:n,inCharClass:r,useFlagV:a}){if(fv.has(t))return fv.get(t);if(t<32||t>126&&t<160||t>262143||n&&bL(t))return t>255?`\\u{${t.toString(16).toUpperCase()}}`:`\\x${t.toString(16).toUpperCase().padStart(2,"0")}`;const s=r?a?fL:dL:cL,u=Lt(t);return(s.has(u)?"\\":"")+u}function mL(t){const n=t.map(s=>s.codePointAt(0)).sort((s,u)=>s-u),r=[];let a=null;for(let s=0;s<n.length;s++)n[s+1]===n[s]+1?a??=n[s]:a===null?r.push(n[s]):(r.push([a,n[s]]),a=null);return r}function pL(t,n,r){if(t)return">";let a="";if(n&&r){const{enable:s,disable:u}=n;a=(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")+(u?"-":"")+(u?.ignoreCase?"i":"")+(u?.dotAll?"s":"")}return`${a}:`}function gL({kind:t,max:n,min:r}){let a;return!r&&n===1?a="?":!r&&n===1/0?a="*":r===1&&n===1/0?a="+":r===n?a=`{${r}}`:a=`{${r},${n===1/0?"":n}}`,a+{greedy:"",lazy:"?",possessive:"+"}[t]}function hv({type:t}){return t==="CapturingGroup"||t==="Group"||t==="LookaroundAssertion"}function bL(t){return t>47&&t<58}function mv({type:t,value:n}){return t==="Character"&&n===45}var vL=class lh extends RegExp{#t=new Map;#e=null;#i;#n=null;#r=null;rawOptions={};get source(){return this.#i||"(?:)"}constructor(n,r,a){const s=!!a?.lazyCompile;if(n instanceof RegExp){if(a)throw new Error("Cannot provide options when copying a regexp");const u=n;super(u,r),this.#i=u.source,u instanceof lh&&(this.#t=u.#t,this.#n=u.#n,this.#r=u.#r,this.rawOptions=u.rawOptions)}else{const u={hiddenCaptures:[],strategy:null,transfers:[],...a};super(s?"":n,r),this.#i=n,this.#t=_L(u.hiddenCaptures,u.transfers),this.#r=u.strategy,this.rawOptions=a??{}}s||(this.#e=this)}exec(n){if(!this.#e){const{lazyCompile:s,...u}=this.rawOptions;this.#e=new lh(this.#i,this.flags,u)}const r=this.global||this.sticky,a=this.lastIndex;if(this.#r==="clip_search"&&r&&a){this.lastIndex=0;const s=this.#a(n.slice(a));return s&&(yL(s,a,n,this.hasIndices),this.lastIndex+=a),s}return this.#a(n)}#a(n){this.#e.lastIndex=this.lastIndex;const r=super.exec.call(this.#e,n);if(this.lastIndex=this.#e.lastIndex,!r||!this.#t.size)return r;const a=[...r];r.length=1;let s;this.hasIndices&&(s=[...r.indices],r.indices.length=1);const u=[0];for(let c=1;c<a.length;c++){const{hidden:h,transferTo:d}=this.#t.get(c)??{};if(h?u.push(null):(u.push(r.length),r.push(a[c]),this.hasIndices&&r.indices.push(s[c])),d&&a[c]!==void 0){const p=u[d];if(!p)throw new Error(`Invalid capture transfer to "${p}"`);if(r[p]=a[c],this.hasIndices&&(r.indices[p]=s[c]),r.groups){this.#n||(this.#n=xL(this.source));const b=this.#n.get(d);b&&(r.groups[b]=a[c],this.hasIndices&&(r.indices.groups[b]=s[c]))}}}return r}};function yL(t,n,r,a){if(t.index+=n,t.input=r,a){const s=t.indices;for(let c=0;c<s.length;c++){const h=s[c];h&&(s[c]=[h[0]+n,h[1]+n])}const u=s.groups;u&&Object.keys(u).forEach(c=>{const h=u[c];h&&(u[c]=[h[0]+n,h[1]+n])})}}function _L(t,n){const r=new Map;for(const a of t)r.set(a,{hidden:!0});for(const[a,s]of n)for(const u of s)dl(r,u,{}).transferTo=a;return r}function xL(t){const n=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map;let a=0,s=0,u;for(;u=n.exec(t);){const{0:c,groups:{capture:h,name:d}}=u;c==="["?a++:a?c==="]"&&a--:h&&(s++,d&&r.set(s,d))}return r}function SL(t,n){const r=EL(t,n);return r.options?new vL(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)}function EL(t,n){const r=C1(n),a=b1(t,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:Ih}),s=QR(a,{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),u=lL(s,r),c=UR(u.pattern,{captureTransfers:u._captureTransfers,hiddenCaptures:u._hiddenCaptures,mode:"external"}),h=PR(c.pattern),d=zR(h.pattern,{captureTransfers:c.captureTransfers,hiddenCaptures:c.hiddenCaptures}),p={pattern:d.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${u.flags}${u.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const b=d.hiddenCaptures.sort((x,T)=>x-T),g=Array.from(d.captureTransfers),v=s._strategy,_=p.pattern.length>=r.lazyCompileLength;(b.length||g.length||v||_)&&(p.options={...b.length&&{hiddenCaptures:b},...g.length&&{transfers:g},...v&&{strategy:v},..._&&{lazyCompile:_}})}return p}const pv=4294967295;class wL{constructor(n,r={}){this.patterns=n,this.options=r;const{forgiving:a=!1,cache:s,regexConstructor:u}=r;if(!u)throw new Error("Option `regexConstructor` is not provided");this.regexps=n.map(c=>{if(typeof c!="string")return c;const h=s?.get(c);if(h){if(h instanceof RegExp)return h;if(a)return null;throw h}try{const d=u(c);return s?.set(c,d),d}catch(d){if(s?.set(c,d),a)return null;throw d}})}regexps;findNextMatchSync(n,r,a){const s=typeof n=="string"?n:n.content,u=[];function c(h,d,p=0){return{index:h,captureIndices:d.indices.map(b=>b==null?{start:pv,end:pv,length:0}:{start:b[0]+p,end:b[1]+p,length:b[1]-b[0]})}}for(let h=0;h<this.regexps.length;h++){const d=this.regexps[h];if(d)try{d.lastIndex=r;const p=d.exec(s);if(!p)continue;if(p.index===r)return c(h,p,0);u.push([h,p,0])}catch(p){if(this.options.forgiving)continue;throw p}}if(u.length){const h=Math.min(...u.map(d=>d[1].index));for(const[d,p,b]of u)if(p.index===h)return c(d,p,b)}return null}}function CL(t,n){return SL(t,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...n})}function AL(t={}){const n=Object.assign({target:"auto",cache:new Map},t);return n.regexConstructor||=r=>CL(r,{target:n.target}),{createScanner(r){return new wL(r,n)},createString(r){return{content:r}}}}async function kL(t){if(Iy())throw new Error(`resolveLanguage("${t}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const n=uf.get(t);if(n!=null)return n;try{let r=q2.get(t);if(r==null&&Object.prototype.hasOwnProperty.call(th,t)&&(r=th[t]),r==null)throw new Error(`resolveLanguage: "${t}" not found in bundled or custom languages`);const a=r().then(({default:s})=>{const u={name:t,data:s};return ol.has(t)||ol.set(t,u),u});return uf.set(t,a),await a}finally{uf.delete(t)}}function TL(t){return ol.get(t)??kL(t)}const Br=new Map,Sf=new Map,sh=new Map,uh=new Set;function gv(t,n){t=Array.isArray(t)?t:[t];for(let r of t){let a;if(typeof r=="string"){if(a=Br.get(r),a==null)throw new Error(`loadResolvedThemes: ${r} is not resolved, you must resolve it before calling loadResolvedThemes`)}else a=r,r=r.name,Br.has(r)||Br.set(r,a);uh.has(r)||(uh.add(r),n.loadThemeSync(a))}}async function RL(t){if(Iy())throw new Error(`resolveTheme("${t}") cannot be called from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);const n=Sf.get(t);if(n!=null)return n;try{const r=sh.get(t)??s1[t];if(r==null)throw new Error(`resolveTheme: No valid loader for ${t}`);const a=r().then(u=>LL(t,"default"in u?u.default:u));Sf.set(t,a);const s=await a;if(s.name!==t)throw new Error(`resolvedTheme: themeName: ${t} does not match theme.name: ${s.name}`);return Br.set(s.name,s),s}finally{Sf.delete(t)}}function LL(t,n){const r=Br.get(t);return r??(n=Lu(n),Br.set(t,n),n)}function NL(t){return Br.get(t)??RL(t)}function I1(t,n){if(sh.has(t)){console.error("SharedHighlight.registerCustomTheme: theme name already registered",t);return}sh.set(t,n)}let ai;async function ML({themes:t,langs:n,preferredHighlighter:r="shiki-js"}){ai??=HT({themes:[],langs:["text"],engine:r==="shiki-wasm"?c1(w(()=>import("./wasm-CG6Dc4jp.js"),[])):AL()});const a=DL(ai)?await ai:ai;ai=a;const s=[];for(const c of n){if(c==="text"||c==="ansi")continue;const h=TL(c);"then"in h?s.push(h):D0(h,a)}const u=[];for(const c of t){const h=NL(c);"then"in h?u.push(h):gv(h,ai)}return(s.length>0||u.length>0)&&await Promise.all([Promise.all(s).then(c=>{D0(c,a)}),Promise.all(u).then(c=>{gv(c,a)})]),a}function OL(){if(ai!=null&&!("then"in ai))return ai}function DL(t=ai){return t!=null&&"then"in t}I1("pierre-dark",async()=>{const t=await w(()=>import("./pierre-dark-ClCaJvdG.js"),[]);return{...t.default??t,name:"pierre-dark"}});I1("pierre-light",async()=>{const t=await w(()=>import("./pierre-light-zjGsWSiE.js"),[]);return{...t.default??t,name:"pierre-light"}});function z1(t=Fn){const n=[];return typeof t=="string"?n.push(t):(n.push(t.dark),n.push(t.light)),n}function Ef(t){for(const n of z1(t))if(!uh.has(n))return!1;return!0}function P1(t,n){return t==null||n==null?t===n:t.startingLine===n.startingLine&&t.totalLines===n.totalLines&&t.bufferBefore===n.bufferBefore&&t.bufferAfter===n.bufferAfter}function j1(t,n){return t==null||n==null||typeof t=="string"||typeof n=="string"?t===n:t.dark===n.dark&&t.light===n.light}function IL(t){return Ve({tagName:"div",children:[Ve({tagName:"div",children:t.annotations?.map(n=>Ve({tagName:"slot",properties:{name:n}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${t.hunkIndex},${t.lineIndex}`}})}function zL(t){switch(t){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}function PL({fileOrDiff:t,themeStyles:n,themeType:r}){const a="type"in t?t:void 0,s={"data-diffs-header":"","data-change-type":a?.type,"data-theme-type":r!=="system"?r:void 0,style:n};return Ve({tagName:"div",children:[jL({name:t.name,prevName:"prevName"in t?t.prevName:void 0,iconType:a?.type??"file"}),UL(a)],properties:s})}function jL({name:t,prevName:n,iconType:r}){const a=[Ve({tagName:"slot",properties:{name:_h}}),cu({name:zL(r),properties:{"data-change-icon":r}})];return n!=null&&(a.push(Ve({tagName:"div",children:[Oi(n)],properties:{"data-prev-name":""}})),a.push(cu({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),a.push(Ve({tagName:"div",children:[Oi(t)],properties:{"data-title":""}})),Ve({tagName:"div",children:a,properties:{"data-header-content":""}})}function UL(t){const n=[];if(t!=null){let r=0,a=0;for(const s of t.hunks)r+=s.additionLines,a+=s.deletionLines;(a>0||r===0)&&n.push(Ve({tagName:"span",children:[Oi(`-${a}`)],properties:{"data-deletions-count":""}})),(r>0||a===0)&&n.push(Ve({tagName:"span",children:[Oi(`+${r}`)],properties:{"data-additions-count":""}}))}return n.push(Ve({tagName:"slot",properties:{name:xh}})),Ve({tagName:"div",children:n,properties:{"data-metadata":""}})}function HL(t){return Ve({tagName:"pre",properties:BL(t)})}function BL({diffIndicators:t,disableBackground:n,disableLineNumbers:r,overflow:a,split:s,themeType:u,themeStyles:c,totalLines:h,type:d,customProperties:p}){const b={...p,"data-diff":d==="diff"?"":void 0,"data-file":d==="file"?"":void 0,"data-diff-type":d==="diff"?s?"split":"single":void 0,"data-overflow":a,"data-disable-line-numbers":r?"":void 0,"data-background":n?void 0:"","data-indicators":t==="bars"||t==="classic"?t:void 0,"data-theme-type":u!=="system"?u:void 0,style:c,tabIndex:0};return b.style+=`--diffs-min-number-column-width-default:${`${h}`.length}ch;`,b}const za=new Map,Ko={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMMIT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};function Su(t){if(za.has(t))return za.get(t)??"text";if(Ko[t]!=null)return Ko[t];const n=t.match(/\.([^/\\]+\.[^/\\]+)$/);if(n!=null){if(za.has(n[1]))return za.get(n[1])??"text";if(Ko[n[1]]!=null)return Ko[n[1]]??"text"}const r=t.match(/\.([^.]+)$/)?.[1]??"";return za.has(r)?za.get(r)??"text":Ko[r]??"text"}function VL(t,{theme:n,preferredHighlighter:r="shiki-js"}){return{langs:[t??"text"],themes:z1(n),preferredHighlighter:r}}function fl(t){return`annotation-${"side"in t?`${t.side}-`:""}${t.lineNumber}`}function Qa(t){return t.replace(/\n$|\r\n$/,"")}function GL(t,n,r){const a=typeof r.lineInfo=="function"?r.lineInfo(n):r.lineInfo[n-1];if(a==null){const s=`processLine: line ${n}, contains no state.lineInfo`;throw console.error(s,{node:t,line:n,state:r}),new Error(s)}return t.tagName="div",t.properties["data-line"]=a.lineNumber,t.properties["data-alt-line"]=a.altLineNumber,t.properties["data-line-type"]=a.type,t.properties["data-line-index"]=a.lineIndex,t.children.length===0&&t.children.push(Oi(`
|
|
162
|
+
`)),t}function $L(t={}){const{classPrefix:n="__shiki_",classSuffix:r="",classReplacer:a=h=>h}=t,s=new Map;function u(h){return Object.entries(h).map(([d,p])=>`${d}:${p}`).join(";")}function c(h){const d=typeof h=="string"?h:u(h);let p=n+qL(d)+r;return p=a(p),s.has(p)||s.set(p,typeof h=="string"?h:{...h}),p}return{name:"@shikijs/transformers:style-to-class",pre(h){if(!h.properties.style)return;const d=c(h.properties.style);delete h.properties.style,this.addClassToHast(h,d)},tokens(h){for(const d of h)for(const p of d){if(!p.htmlStyle)continue;const b=c(p.htmlStyle);p.htmlStyle={},p.htmlAttrs||={},p.htmlAttrs.class?p.htmlAttrs.class+=` ${b}`:p.htmlAttrs.class=b}},getClassRegistry(){return s},getCSS(){let h="";for(const[d,p]of s.entries())h+=`.${d}{${typeof p=="string"?p:u(p)}}`;return h},clearRegistry(){s.clear()}}}function qL(t,n=0){let r=3735928559^n,a=1103547991^n;for(let s=0,u;s<t.length;s++)u=t.charCodeAt(s),r=Math.imul(r^u,2654435761),a=Math.imul(a^u,1597334677);return r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(a^a>>>13,3266489909),a=Math.imul(a^a>>>16,2246822507),a^=Math.imul(r^r>>>13,3266489909),(4294967296*(2097151&a)+(r>>>0)).toString(36).slice(0,6)}function YL(t=!1){const n={lineInfo:[]},r=[{line(a){return delete a.properties.class,a},pre(a){const s=_A(a),u=[];if(s!=null){let c=1;for(const h of s.children)h.type==="element"&&(u.push(GL(h,c,n)),c++);s.children=u}return a}}];return t&&r.push(FL,bv),{state:n,transformers:r,toClass:bv}}const bv=$L({classPrefix:"hl-"}),FL={name:"token-style-normalizer",tokens(t){for(const n of t)for(const r of n){if(r.htmlStyle!=null)continue;const a={};r.color!=null&&(a.color=r.color),r.bgColor!=null&&(a["background-color"]=r.bgColor),r.fontStyle!=null&&r.fontStyle!==0&&((r.fontStyle&1)!==0&&(a["font-style"]="italic"),(r.fontStyle&2)!==0&&(a["font-weight"]="bold"),(r.fontStyle&4)!==0&&(a["text-decoration"]="underline")),Object.keys(a).length>0&&(r.htmlStyle=a)}}};function qn(t){return`--${t==="token"?"diffs-token":"diffs"}-`}function XL({theme:t=Fn,highlighter:n,prefix:r}){let a="";if(typeof t=="string"){const s=n.getTheme(t);a+=`color:${s.fg};`,a+=`background-color:${s.bg};`,a+=`${qn("global")}fg:${s.fg};`,a+=`${qn("global")}bg:${s.bg};`,a+=wf(s,r)}else{let s=n.getTheme(t.dark);a+=`${qn("global")}dark:${s.fg};`,a+=`${qn("global")}dark-bg:${s.bg};`,a+=wf(s,"dark"),s=n.getTheme(t.light),a+=`${qn("global")}light:${s.fg};`,a+=`${qn("global")}light-bg:${s.bg};`,a+=wf(s,"light")}return a}function wf(t,n){n=n!=null?`${n}-`:"";let r="";const a=t.colors?.["gitDecoration.addedResourceForeground"]??t.colors?.["terminal.ansiGreen"];a!=null&&(r+=`${qn("global")}${n}addition-color:${a};`);const s=t.colors?.["gitDecoration.deletedResourceForeground"]??t.colors?.["terminal.ansiRed"];s!=null&&(r+=`${qn("global")}${n}deletion-color:${s};`);const u=t.colors?.["gitDecoration.modifiedResourceForeground"]??t.colors?.["terminal.ansiBlue"];return u!=null&&(r+=`${qn("global")}${n}modified-color:${u};`),r}function vv(t){let n=t.children[0];for(;n!=null;){if(n.type==="element"&&n.tagName==="code")return n.children;"children"in n?n=n.children[0]:n=null}throw console.error(t),new Error("getLineNodes: Unable to find children")}function WL(t,n){return Ve({tagName:"div",children:t,properties:{"data-content":"",style:`grid-row: span ${n}`}})}const QL=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
|
|
163
|
+
<symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
|
|
164
|
+
<path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
|
|
165
|
+
</symbol>
|
|
166
|
+
<symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
|
|
167
|
+
<path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
|
|
168
|
+
</symbol>
|
|
169
|
+
<symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
|
|
170
|
+
<path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
|
|
171
|
+
</symbol>
|
|
172
|
+
<symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
|
|
173
|
+
<path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
|
|
174
|
+
</symbol>
|
|
175
|
+
<symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
|
|
176
|
+
<path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
|
|
177
|
+
</symbol>
|
|
178
|
+
<symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
|
|
179
|
+
<path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
|
|
180
|
+
</symbol>
|
|
181
|
+
<symbol id="diffs-icon-expand" viewBox="0 0 16 16">
|
|
182
|
+
<path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
|
|
183
|
+
</symbol>
|
|
184
|
+
<symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
|
|
185
|
+
<path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
|
|
186
|
+
</symbol>
|
|
187
|
+
<symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
|
|
188
|
+
<path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
|
|
189
|
+
</symbol>
|
|
190
|
+
<symbol id="diffs-icon-plus" viewBox="0 0 16 16">
|
|
191
|
+
<path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
|
|
192
|
+
</symbol>
|
|
193
|
+
<symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
|
|
194
|
+
<path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
195
|
+
</symbol>
|
|
196
|
+
<symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
|
|
197
|
+
<path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
|
|
198
|
+
</symbol>
|
|
199
|
+
<symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
|
|
200
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
|
|
201
|
+
</symbol>
|
|
202
|
+
<symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
|
|
203
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
|
|
204
|
+
</symbol>
|
|
205
|
+
<symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
|
|
206
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
|
|
207
|
+
</symbol>
|
|
208
|
+
<symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
|
|
209
|
+
<path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
|
|
210
|
+
</symbol>
|
|
211
|
+
<symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
|
|
212
|
+
<path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
|
|
213
|
+
</symbol>
|
|
214
|
+
</svg>`;function yv(t,n){return t?.cacheKey===n?.cacheKey&&t?.contents===n?.contents&&t?.name===n?.name&&t?.lang===n?.lang}function KL(t,n){return t==null||n==null?t===n:ZL(t.customProperties,n.customProperties)&&t.type===n.type&&t.diffIndicators===n.diffIndicators&&t.disableBackground===n.disableBackground&&t.disableLineNumbers===n.disableLineNumbers&&t.overflow===n.overflow&&t.split===n.split&&t.themeStyles===n.themeStyles&&t.themeType===n.themeType&&t.totalLines===n.totalLines}const _v={};function ZL(t=_v,n=_v){if(t===n)return!0;const r=Object.keys(t),a=Object.keys(n);if(r.length!==a.length)return!1;for(const s of r)if(t[s]!==n[s])return!1;return!0}function JL(t){const n=document.createElement("div");return n.dataset.annotationSlot="",n.slot=t,n.style.whiteSpace="normal",n}function eN(){const t=document.createElement("div");return t.slot="gutter-utility-slot",t.style.position="absolute",t.style.top="0",t.style.bottom="0",t.style.textAlign="center",t.style.whiteSpace="normal",t}function tN(){const t=document.createElement("style");return t.setAttribute(xy,""),t}var nN=`@layer base, theme, unsafe;
|
|
215
|
+
|
|
216
|
+
@layer base {
|
|
217
|
+
:host {
|
|
218
|
+
--diffs-bg: #fff;
|
|
219
|
+
--diffs-fg: #000;
|
|
220
|
+
--diffs-font-fallback:
|
|
221
|
+
'SF Mono', Monaco, Consolas, 'Ubuntu Mono', 'Liberation Mono',
|
|
222
|
+
'Courier New', monospace;
|
|
223
|
+
--diffs-header-font-fallback:
|
|
224
|
+
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
225
|
+
'Noto Sans', 'Liberation Sans', Arial, sans-serif;
|
|
226
|
+
|
|
227
|
+
--diffs-mixer: light-dark(black, white);
|
|
228
|
+
--diffs-gap-fallback: 8px;
|
|
229
|
+
|
|
230
|
+
--diffs-added-light: #0dbe4e;
|
|
231
|
+
--diffs-added-dark: #5ecc71;
|
|
232
|
+
--diffs-modified-light: #009fff;
|
|
233
|
+
--diffs-modified-dark: #69b1ff;
|
|
234
|
+
--diffs-deleted-light: #ff2e3f;
|
|
235
|
+
--diffs-deleted-dark: #ff6762;
|
|
236
|
+
|
|
237
|
+
/*
|
|
238
|
+
// Available CSS Color Overrides
|
|
239
|
+
--diffs-bg-buffer-override
|
|
240
|
+
--diffs-bg-hover-override
|
|
241
|
+
--diffs-bg-context-override
|
|
242
|
+
--diffs-bg-separator-override
|
|
243
|
+
|
|
244
|
+
--diffs-fg-number-override
|
|
245
|
+
--diffs-fg-number-addition-override
|
|
246
|
+
--diffs-fg-number-deletion-override
|
|
247
|
+
--diffs-fg-conflict-marker-override
|
|
248
|
+
|
|
249
|
+
--diffs-deletion-color-override
|
|
250
|
+
--diffs-addition-color-override
|
|
251
|
+
--diffs-modified-color-override
|
|
252
|
+
|
|
253
|
+
--diffs-bg-deletion-override
|
|
254
|
+
--diffs-bg-deletion-number-override
|
|
255
|
+
--diffs-bg-deletion-hover-override
|
|
256
|
+
--diffs-bg-deletion-emphasis-override
|
|
257
|
+
|
|
258
|
+
--diffs-bg-addition-override
|
|
259
|
+
--diffs-bg-addition-number-override
|
|
260
|
+
--diffs-bg-addition-hover-override
|
|
261
|
+
--diffs-bg-addition-emphasis-override
|
|
262
|
+
|
|
263
|
+
// Line Selection Color Overrides (for enableLineSelection)
|
|
264
|
+
--diffs-selection-color-override
|
|
265
|
+
--diffs-bg-selection-override
|
|
266
|
+
--diffs-bg-selection-number-override
|
|
267
|
+
--diffs-bg-selection-background-override
|
|
268
|
+
--diffs-bg-selection-number-background-override
|
|
269
|
+
|
|
270
|
+
// Available CSS Layout Overrides
|
|
271
|
+
--diffs-gap-inline
|
|
272
|
+
--diffs-gap-block
|
|
273
|
+
--diffs-gap-style
|
|
274
|
+
--diffs-tab-size
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
color-scheme: light dark;
|
|
278
|
+
display: block;
|
|
279
|
+
font-family: var(
|
|
280
|
+
--diffs-header-font-family,
|
|
281
|
+
var(--diffs-header-font-fallback)
|
|
282
|
+
);
|
|
283
|
+
font-size: var(--diffs-font-size, 13px);
|
|
284
|
+
line-height: var(--diffs-line-height, 20px);
|
|
285
|
+
font-feature-settings: var(--diffs-font-features);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/* NOTE(mdo): Some semantic HTML elements (e.g. \`pre\`, \`code\`) have default
|
|
289
|
+
* user-agent styles. These must be overridden to use our custom styles. */
|
|
290
|
+
pre,
|
|
291
|
+
code,
|
|
292
|
+
[data-error-wrapper] {
|
|
293
|
+
isolation: isolate;
|
|
294
|
+
margin: 0;
|
|
295
|
+
padding: 0;
|
|
296
|
+
display: block;
|
|
297
|
+
outline: none;
|
|
298
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
pre,
|
|
302
|
+
code {
|
|
303
|
+
background-color: var(--diffs-bg);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
code {
|
|
307
|
+
contain: content;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
*,
|
|
311
|
+
*::before,
|
|
312
|
+
*::after {
|
|
313
|
+
box-sizing: border-box;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
[data-icon-sprite] {
|
|
317
|
+
display: none;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/* NOTE(mdo): Headers and separators are within pre/code, so we need to reset
|
|
321
|
+
* their font-family explicitly. */
|
|
322
|
+
[data-diffs-header],
|
|
323
|
+
[data-separator] {
|
|
324
|
+
font-family: var(
|
|
325
|
+
--diffs-header-font-family,
|
|
326
|
+
var(--diffs-header-font-fallback)
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
[data-file-info] {
|
|
331
|
+
padding: 10px;
|
|
332
|
+
font-weight: 700;
|
|
333
|
+
color: var(--fg);
|
|
334
|
+
/* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor
|
|
335
|
+
* and vscode use an older build of chrome that appears to have a bug with
|
|
336
|
+
* color-mix and 'in oklch', so use 'in lab' instead */
|
|
337
|
+
background-color: color-mix(in lab, var(--bg) 98%, var(--fg));
|
|
338
|
+
border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
[data-diffs-header],
|
|
342
|
+
[data-diff],
|
|
343
|
+
[data-file],
|
|
344
|
+
[data-error-wrapper],
|
|
345
|
+
[data-virtualizer-buffer] {
|
|
346
|
+
--diffs-bg: light-dark(var(--diffs-light-bg), var(--diffs-dark-bg));
|
|
347
|
+
/* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor
|
|
348
|
+
* and vscode use an older build of chrome that appears to have a bug with
|
|
349
|
+
* color-mix and 'in oklch', so use 'in lab' instead */
|
|
350
|
+
--diffs-bg-buffer: var(
|
|
351
|
+
--diffs-bg-buffer-override,
|
|
352
|
+
light-dark(
|
|
353
|
+
color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)),
|
|
354
|
+
color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))
|
|
355
|
+
)
|
|
356
|
+
);
|
|
357
|
+
--diffs-bg-hover: var(
|
|
358
|
+
--diffs-bg-hover-override,
|
|
359
|
+
light-dark(
|
|
360
|
+
color-mix(in lab, var(--diffs-bg) 97%, var(--diffs-mixer)),
|
|
361
|
+
color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-mixer))
|
|
362
|
+
)
|
|
363
|
+
);
|
|
364
|
+
|
|
365
|
+
--diffs-bg-context: var(
|
|
366
|
+
--diffs-bg-context-override,
|
|
367
|
+
light-dark(
|
|
368
|
+
color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)),
|
|
369
|
+
color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))
|
|
370
|
+
)
|
|
371
|
+
);
|
|
372
|
+
--diffs-bg-context-number: var(
|
|
373
|
+
--diffs-bg-context-number-override,
|
|
374
|
+
light-dark(
|
|
375
|
+
color-mix(in lab, var(--diffs-bg-context) 80%, var(--diffs-bg)),
|
|
376
|
+
color-mix(in lab, var(--diffs-bg-context) 60%, var(--diffs-bg))
|
|
377
|
+
)
|
|
378
|
+
);
|
|
379
|
+
--diffs-bg-conflict-marker: var(
|
|
380
|
+
--diffs-bg-conflict-marker-override,
|
|
381
|
+
light-dark(
|
|
382
|
+
color-mix(
|
|
383
|
+
in lab,
|
|
384
|
+
var(--diffs-bg-context) 88%,
|
|
385
|
+
var(--diffs-modified-base)
|
|
386
|
+
),
|
|
387
|
+
color-mix(
|
|
388
|
+
in lab,
|
|
389
|
+
var(--diffs-bg-context) 80%,
|
|
390
|
+
var(--diffs-modified-base)
|
|
391
|
+
)
|
|
392
|
+
)
|
|
393
|
+
);
|
|
394
|
+
--diffs-bg-conflict-current: var(
|
|
395
|
+
--diffs-bg-conflict-current-override,
|
|
396
|
+
light-dark(#e5f8ea, #274432)
|
|
397
|
+
);
|
|
398
|
+
--diffs-bg-conflict-base: var(
|
|
399
|
+
--diffs-bg-conflict-base-override,
|
|
400
|
+
light-dark(
|
|
401
|
+
color-mix(
|
|
402
|
+
in lab,
|
|
403
|
+
var(--diffs-bg-context) 90%,
|
|
404
|
+
var(--diffs-modified-base)
|
|
405
|
+
),
|
|
406
|
+
color-mix(
|
|
407
|
+
in lab,
|
|
408
|
+
var(--diffs-bg-context) 82%,
|
|
409
|
+
var(--diffs-modified-base)
|
|
410
|
+
)
|
|
411
|
+
)
|
|
412
|
+
);
|
|
413
|
+
--diffs-bg-conflict-incoming: var(
|
|
414
|
+
--diffs-bg-conflict-incoming-override,
|
|
415
|
+
light-dark(#e6f1ff, #253b5a)
|
|
416
|
+
);
|
|
417
|
+
--diffs-bg-conflict-marker-number: var(
|
|
418
|
+
--diffs-bg-conflict-marker-number-override,
|
|
419
|
+
light-dark(
|
|
420
|
+
color-mix(in lab, var(--diffs-bg-conflict-marker) 72%, var(--diffs-bg)),
|
|
421
|
+
color-mix(in lab, var(--diffs-bg-conflict-marker) 54%, var(--diffs-bg))
|
|
422
|
+
)
|
|
423
|
+
);
|
|
424
|
+
--diffs-bg-conflict-current-number: var(
|
|
425
|
+
--diffs-bg-conflict-current-number-override,
|
|
426
|
+
light-dark(#d7f1de, #30533d)
|
|
427
|
+
);
|
|
428
|
+
--diffs-bg-conflict-base-number: var(
|
|
429
|
+
--diffs-bg-conflict-base-number-override,
|
|
430
|
+
light-dark(
|
|
431
|
+
color-mix(in lab, var(--diffs-bg-conflict-base) 72%, var(--diffs-bg)),
|
|
432
|
+
color-mix(in lab, var(--diffs-bg-conflict-base) 54%, var(--diffs-bg))
|
|
433
|
+
)
|
|
434
|
+
);
|
|
435
|
+
--diffs-bg-conflict-incoming-number: var(
|
|
436
|
+
--diffs-bg-conflict-incoming-number-override,
|
|
437
|
+
light-dark(#d8e8ff, #2f4b73)
|
|
438
|
+
);
|
|
439
|
+
--conflict-bg-current: var(
|
|
440
|
+
--conflict-bg-current-override,
|
|
441
|
+
var(--diffs-bg-addition)
|
|
442
|
+
);
|
|
443
|
+
--conflict-bg-incoming: var(
|
|
444
|
+
--conflict-bg-incoming-override,
|
|
445
|
+
light-dark(
|
|
446
|
+
color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-modified-base)),
|
|
447
|
+
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-modified-base))
|
|
448
|
+
)
|
|
449
|
+
);
|
|
450
|
+
--conflict-bg-current-number: var(
|
|
451
|
+
--conflict-bg-current-number-override,
|
|
452
|
+
var(--diffs-bg-addition-number)
|
|
453
|
+
);
|
|
454
|
+
--conflict-bg-incoming-number: var(
|
|
455
|
+
--conflict-bg-incoming-number-override,
|
|
456
|
+
light-dark(
|
|
457
|
+
color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-modified-base)),
|
|
458
|
+
color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-modified-base))
|
|
459
|
+
)
|
|
460
|
+
);
|
|
461
|
+
--conflict-bg-current-header: var(
|
|
462
|
+
--conflict-bg-current-header-override,
|
|
463
|
+
light-dark(
|
|
464
|
+
color-mix(in lab, var(--diffs-bg) 78%, var(--diffs-addition-base)),
|
|
465
|
+
color-mix(in lab, var(--diffs-bg) 68%, var(--diffs-addition-base))
|
|
466
|
+
)
|
|
467
|
+
);
|
|
468
|
+
--conflict-bg-incoming-header: var(
|
|
469
|
+
--conflict-bg-incoming-header-override,
|
|
470
|
+
light-dark(
|
|
471
|
+
color-mix(in lab, var(--diffs-bg) 78%, var(--diffs-modified-base)),
|
|
472
|
+
color-mix(in lab, var(--diffs-bg) 68%, var(--diffs-modified-base))
|
|
473
|
+
)
|
|
474
|
+
);
|
|
475
|
+
--conflict-bg-current-header-number: var(
|
|
476
|
+
--conflict-bg-current-header-number-override,
|
|
477
|
+
light-dark(
|
|
478
|
+
color-mix(in lab, var(--diffs-bg) 72%, var(--diffs-addition-base)),
|
|
479
|
+
color-mix(in lab, var(--diffs-bg) 62%, var(--diffs-addition-base))
|
|
480
|
+
)
|
|
481
|
+
);
|
|
482
|
+
--conflict-bg-incoming-header-number: var(
|
|
483
|
+
--conflict-bg-incoming-header-number-override,
|
|
484
|
+
light-dark(
|
|
485
|
+
color-mix(in lab, var(--diffs-bg) 72%, var(--diffs-modified-base)),
|
|
486
|
+
color-mix(in lab, var(--diffs-bg) 62%, var(--diffs-modified-base))
|
|
487
|
+
)
|
|
488
|
+
);
|
|
489
|
+
|
|
490
|
+
--diffs-bg-separator: var(
|
|
491
|
+
--diffs-bg-separator-override,
|
|
492
|
+
light-dark(
|
|
493
|
+
color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)),
|
|
494
|
+
color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))
|
|
495
|
+
)
|
|
496
|
+
);
|
|
497
|
+
|
|
498
|
+
--diffs-fg: light-dark(var(--diffs-light), var(--diffs-dark));
|
|
499
|
+
--diffs-fg-number: var(
|
|
500
|
+
--diffs-fg-number-override,
|
|
501
|
+
light-dark(
|
|
502
|
+
color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)),
|
|
503
|
+
color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))
|
|
504
|
+
)
|
|
505
|
+
);
|
|
506
|
+
--diffs-fg-conflict-marker: var(
|
|
507
|
+
--diffs-fg-conflict-marker-override,
|
|
508
|
+
var(--diffs-fg-number)
|
|
509
|
+
);
|
|
510
|
+
|
|
511
|
+
--diffs-deletion-base: var(
|
|
512
|
+
--diffs-deletion-color-override,
|
|
513
|
+
light-dark(
|
|
514
|
+
var(
|
|
515
|
+
--diffs-light-deletion-color,
|
|
516
|
+
var(--diffs-deletion-color, var(--diffs-deleted-light))
|
|
517
|
+
),
|
|
518
|
+
var(
|
|
519
|
+
--diffs-dark-deletion-color,
|
|
520
|
+
var(--diffs-deletion-color, var(--diffs-deleted-dark))
|
|
521
|
+
)
|
|
522
|
+
)
|
|
523
|
+
);
|
|
524
|
+
--diffs-addition-base: var(
|
|
525
|
+
--diffs-addition-color-override,
|
|
526
|
+
light-dark(
|
|
527
|
+
var(
|
|
528
|
+
--diffs-light-addition-color,
|
|
529
|
+
var(--diffs-addition-color, var(--diffs-added-light))
|
|
530
|
+
),
|
|
531
|
+
var(
|
|
532
|
+
--diffs-dark-addition-color,
|
|
533
|
+
var(--diffs-addition-color, var(--diffs-added-dark))
|
|
534
|
+
)
|
|
535
|
+
)
|
|
536
|
+
);
|
|
537
|
+
--diffs-modified-base: var(
|
|
538
|
+
--diffs-modified-color-override,
|
|
539
|
+
light-dark(
|
|
540
|
+
var(
|
|
541
|
+
--diffs-light-modified-color,
|
|
542
|
+
var(--diffs-modified-color, var(--diffs-modified-light))
|
|
543
|
+
),
|
|
544
|
+
var(
|
|
545
|
+
--diffs-dark-modified-color,
|
|
546
|
+
var(--diffs-modified-color, var(--diffs-modified-dark))
|
|
547
|
+
)
|
|
548
|
+
)
|
|
549
|
+
);
|
|
550
|
+
|
|
551
|
+
/* NOTE(amadeus): we cannot use 'in oklch' because current versions of cursor
|
|
552
|
+
* and vscode use an older build of chrome that appears to have a bug with
|
|
553
|
+
* color-mix and 'in oklch', so use 'in lab' instead */
|
|
554
|
+
--diffs-bg-deletion: var(
|
|
555
|
+
--diffs-bg-deletion-override,
|
|
556
|
+
light-dark(
|
|
557
|
+
color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)),
|
|
558
|
+
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))
|
|
559
|
+
)
|
|
560
|
+
);
|
|
561
|
+
--diffs-bg-deletion-number: var(
|
|
562
|
+
--diffs-bg-deletion-number-override,
|
|
563
|
+
light-dark(
|
|
564
|
+
color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-deletion-base)),
|
|
565
|
+
color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-deletion-base))
|
|
566
|
+
)
|
|
567
|
+
);
|
|
568
|
+
--diffs-bg-deletion-hover: var(
|
|
569
|
+
--diffs-bg-deletion-hover-override,
|
|
570
|
+
light-dark(
|
|
571
|
+
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base)),
|
|
572
|
+
color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-deletion-base))
|
|
573
|
+
)
|
|
574
|
+
);
|
|
575
|
+
--diffs-bg-deletion-emphasis: var(
|
|
576
|
+
--diffs-bg-deletion-emphasis-override,
|
|
577
|
+
light-dark(
|
|
578
|
+
rgb(from var(--diffs-deletion-base) r g b / 0.15),
|
|
579
|
+
rgb(from var(--diffs-deletion-base) r g b / 0.2)
|
|
580
|
+
)
|
|
581
|
+
);
|
|
582
|
+
|
|
583
|
+
--diffs-bg-addition: var(
|
|
584
|
+
--diffs-bg-addition-override,
|
|
585
|
+
light-dark(
|
|
586
|
+
color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)),
|
|
587
|
+
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))
|
|
588
|
+
)
|
|
589
|
+
);
|
|
590
|
+
--diffs-bg-addition-number: var(
|
|
591
|
+
--diffs-bg-addition-number-override,
|
|
592
|
+
light-dark(
|
|
593
|
+
color-mix(in lab, var(--diffs-bg) 91%, var(--diffs-addition-base)),
|
|
594
|
+
color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-addition-base))
|
|
595
|
+
)
|
|
596
|
+
);
|
|
597
|
+
--diffs-bg-addition-hover: var(
|
|
598
|
+
--diffs-bg-addition-hover-override,
|
|
599
|
+
light-dark(
|
|
600
|
+
color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base)),
|
|
601
|
+
color-mix(in lab, var(--diffs-bg) 70%, var(--diffs-addition-base))
|
|
602
|
+
)
|
|
603
|
+
);
|
|
604
|
+
--diffs-bg-addition-emphasis: var(
|
|
605
|
+
--diffs-bg-addition-emphasis-override,
|
|
606
|
+
light-dark(
|
|
607
|
+
rgb(from var(--diffs-addition-base) r g b / 0.15),
|
|
608
|
+
rgb(from var(--diffs-addition-base) r g b / 0.2)
|
|
609
|
+
)
|
|
610
|
+
);
|
|
611
|
+
|
|
612
|
+
--diffs-selection-base: var(--diffs-modified-base);
|
|
613
|
+
--diffs-selection-number-fg: light-dark(
|
|
614
|
+
color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)),
|
|
615
|
+
color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer))
|
|
616
|
+
);
|
|
617
|
+
--diffs-bg-selection: var(
|
|
618
|
+
--diffs-bg-selection-override,
|
|
619
|
+
light-dark(
|
|
620
|
+
color-mix(in lab, var(--diffs-bg) 82%, var(--diffs-selection-base)),
|
|
621
|
+
color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-selection-base))
|
|
622
|
+
)
|
|
623
|
+
);
|
|
624
|
+
--diffs-bg-selection-number: var(
|
|
625
|
+
--diffs-bg-selection-number-override,
|
|
626
|
+
light-dark(
|
|
627
|
+
color-mix(in lab, var(--diffs-bg) 75%, var(--diffs-selection-base)),
|
|
628
|
+
color-mix(in lab, var(--diffs-bg) 60%, var(--diffs-selection-base))
|
|
629
|
+
)
|
|
630
|
+
);
|
|
631
|
+
|
|
632
|
+
background-color: var(--diffs-bg);
|
|
633
|
+
color: var(--diffs-fg);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
[data-diff],
|
|
637
|
+
[data-file] {
|
|
638
|
+
/* This feels a bit crazy to me... so I need to think about it a bit more... */
|
|
639
|
+
--diffs-grid-number-column-width: minmax(min-content, max-content);
|
|
640
|
+
--diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;
|
|
641
|
+
|
|
642
|
+
&[data-dehydrated] {
|
|
643
|
+
--diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
&[data-theme-type='light'],
|
|
647
|
+
& {
|
|
648
|
+
[data-line] span {
|
|
649
|
+
color: light-dark(
|
|
650
|
+
var(--diffs-token-light, var(--diffs-light)),
|
|
651
|
+
var(--diffs-token-dark, var(--diffs-dark))
|
|
652
|
+
);
|
|
653
|
+
font-weight: var(--diffs-token-light-font-weight, inherit);
|
|
654
|
+
font-style: var(--diffs-token-light-font-style, inherit);
|
|
655
|
+
-webkit-text-decoration: var(--diffs-token-light-text-decoration, inherit);
|
|
656
|
+
text-decoration: var(--diffs-token-light-text-decoration, inherit);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
&[data-theme-type='dark'] [data-line] span {
|
|
661
|
+
font-weight: var(--diffs-token-dark-font-weight, inherit);
|
|
662
|
+
font-style: var(--diffs-token-dark-font-style, inherit);
|
|
663
|
+
-webkit-text-decoration: var(--diffs-token-dark-text-decoration, inherit);
|
|
664
|
+
text-decoration: var(--diffs-token-dark-text-decoration, inherit);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
&:hover [data-code]::-webkit-scrollbar-thumb {
|
|
668
|
+
background-color: var(--diffs-bg-context);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
[data-line] span {
|
|
673
|
+
background-color: light-dark(
|
|
674
|
+
var(--diffs-token-light-bg, inherit),
|
|
675
|
+
var(--diffs-token-dark-bg, inherit)
|
|
676
|
+
);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
[data-line],
|
|
680
|
+
[data-gutter-buffer],
|
|
681
|
+
[data-line-annotation],
|
|
682
|
+
[data-no-newline] {
|
|
683
|
+
color: var(--diffs-fg);
|
|
684
|
+
background-color: var(--diffs-line-bg, var(--diffs-bg));
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
[data-no-newline] {
|
|
688
|
+
-webkit-user-select: none;
|
|
689
|
+
user-select: none;
|
|
690
|
+
|
|
691
|
+
span {
|
|
692
|
+
opacity: 0.6;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
@media (prefers-color-scheme: dark) {
|
|
697
|
+
[data-diffs-header],
|
|
698
|
+
[data-error-wrapper],
|
|
699
|
+
[data-diff],
|
|
700
|
+
[data-file] {
|
|
701
|
+
color-scheme: dark;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
[data-content] [data-line] span {
|
|
705
|
+
font-weight: var(--diffs-token-dark-font-weight, inherit);
|
|
706
|
+
font-style: var(--diffs-token-dark-font-style, inherit);
|
|
707
|
+
-webkit-text-decoration: var(--diffs-token-dark-text-decoration, inherit);
|
|
708
|
+
text-decoration: var(--diffs-token-dark-text-decoration, inherit);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
[data-diffs-header],
|
|
713
|
+
[data-diff],
|
|
714
|
+
[data-file] {
|
|
715
|
+
&[data-theme-type='light'] {
|
|
716
|
+
color-scheme: light;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
&[data-theme-type='dark'] {
|
|
720
|
+
color-scheme: dark;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
[data-diff-type='split'][data-overflow='scroll'] {
|
|
725
|
+
display: grid;
|
|
726
|
+
grid-template-columns: 1fr 1fr;
|
|
727
|
+
|
|
728
|
+
[data-additions] {
|
|
729
|
+
border-left: 1px solid var(--diffs-bg);
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
[data-deletions] {
|
|
733
|
+
border-right: 1px solid var(--diffs-bg);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
[data-code] {
|
|
738
|
+
display: grid;
|
|
739
|
+
grid-auto-flow: dense;
|
|
740
|
+
grid-template-columns: var(--diffs-code-grid);
|
|
741
|
+
overflow: scroll clip;
|
|
742
|
+
overscroll-behavior-x: none;
|
|
743
|
+
tab-size: var(--diffs-tab-size, 2);
|
|
744
|
+
align-self: flex-start;
|
|
745
|
+
padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
746
|
+
padding-bottom: max(
|
|
747
|
+
0px,
|
|
748
|
+
calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) - 6px)
|
|
749
|
+
);
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
[data-container-size] {
|
|
753
|
+
container-type: inline-size;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
[data-code]::-webkit-scrollbar {
|
|
757
|
+
width: 0;
|
|
758
|
+
height: 6px;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
[data-code]::-webkit-scrollbar-track {
|
|
762
|
+
background: transparent;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
[data-code]::-webkit-scrollbar-thumb {
|
|
766
|
+
background-color: transparent;
|
|
767
|
+
border: 1px solid transparent;
|
|
768
|
+
background-clip: content-box;
|
|
769
|
+
border-radius: 3px;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
[data-code]::-webkit-scrollbar-corner {
|
|
773
|
+
background-color: transparent;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
/*
|
|
777
|
+
* If we apply these rules globally it will mean that webkit will opt into the
|
|
778
|
+
* standards compliant version of custom css scrollbars, which we do not want
|
|
779
|
+
* because the custom stuff will look better
|
|
780
|
+
*/
|
|
781
|
+
@supports (-moz-appearance: none) {
|
|
782
|
+
[data-code] {
|
|
783
|
+
scrollbar-width: thin;
|
|
784
|
+
scrollbar-color: var(--diffs-bg-context) transparent;
|
|
785
|
+
padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
[data-diffs-header] ~ [data-diff],
|
|
790
|
+
[data-diffs-header] ~ [data-file] {
|
|
791
|
+
[data-code],
|
|
792
|
+
&[data-overflow='wrap'] {
|
|
793
|
+
padding-top: 0;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
[data-gutter] {
|
|
798
|
+
display: grid;
|
|
799
|
+
grid-template-rows: subgrid;
|
|
800
|
+
grid-template-columns: subgrid;
|
|
801
|
+
grid-column: 1;
|
|
802
|
+
z-index: 3;
|
|
803
|
+
position: relative;
|
|
804
|
+
background-color: var(--diffs-bg);
|
|
805
|
+
|
|
806
|
+
[data-gutter-buffer],
|
|
807
|
+
[data-column-number] {
|
|
808
|
+
border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
[data-content] {
|
|
813
|
+
display: grid;
|
|
814
|
+
grid-template-rows: subgrid;
|
|
815
|
+
grid-template-columns: subgrid;
|
|
816
|
+
grid-column: 2;
|
|
817
|
+
min-width: 0;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
[data-diff-type='split'][data-overflow='wrap'] {
|
|
821
|
+
display: grid;
|
|
822
|
+
grid-auto-flow: dense;
|
|
823
|
+
grid-template-columns: repeat(2, var(--diffs-code-grid));
|
|
824
|
+
padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
825
|
+
|
|
826
|
+
[data-deletions] {
|
|
827
|
+
display: contents;
|
|
828
|
+
|
|
829
|
+
[data-gutter] {
|
|
830
|
+
grid-column: 1;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
[data-content] {
|
|
834
|
+
grid-column: 2;
|
|
835
|
+
border-right: 1px solid var(--diffs-bg);
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
[data-additions] {
|
|
840
|
+
display: contents;
|
|
841
|
+
|
|
842
|
+
[data-gutter] {
|
|
843
|
+
grid-column: 3;
|
|
844
|
+
border-left: 1px solid var(--diffs-bg);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
[data-content] {
|
|
848
|
+
grid-column: 4;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
[data-overflow='scroll'] [data-gutter] {
|
|
854
|
+
position: sticky;
|
|
855
|
+
left: 0;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
[data-line-annotation][data-selected-line] {
|
|
859
|
+
background-color: unset;
|
|
860
|
+
|
|
861
|
+
&::before {
|
|
862
|
+
content: '';
|
|
863
|
+
/* FIXME(amadeus): This needs to be audited ... */
|
|
864
|
+
position: sticky;
|
|
865
|
+
top: 0;
|
|
866
|
+
left: 0;
|
|
867
|
+
display: block;
|
|
868
|
+
border-right: var(--diffs-gap-style, 1px solid var(--diffs-bg));
|
|
869
|
+
background-color: var(--diffs-bg-selection-number);
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
[data-annotation-content] {
|
|
873
|
+
background-color: var(--diffs-bg-selection);
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
[data-interactive-lines] [data-line] {
|
|
878
|
+
cursor: pointer;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
[data-content-buffer],
|
|
882
|
+
[data-gutter-buffer] {
|
|
883
|
+
position: relative;
|
|
884
|
+
-webkit-user-select: none;
|
|
885
|
+
user-select: none;
|
|
886
|
+
min-height: 1lh;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
[data-gutter-buffer='annotation'] {
|
|
890
|
+
min-height: 0;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
[data-gutter-buffer='buffer'] {
|
|
894
|
+
background-size: 8px 8px;
|
|
895
|
+
background-position: 0 0;
|
|
896
|
+
background-origin: border-box;
|
|
897
|
+
background-color: var(--diffs-bg);
|
|
898
|
+
/* This is incredibley expensive... */
|
|
899
|
+
background-image: repeating-linear-gradient(
|
|
900
|
+
-45deg,
|
|
901
|
+
transparent,
|
|
902
|
+
transparent calc(3px * 1.414),
|
|
903
|
+
rgb(from var(--diffs-bg-buffer) r g b / 0.8) calc(3px * 1.414),
|
|
904
|
+
rgb(from var(--diffs-bg-buffer) r g b / 0.8) calc(4px * 1.414)
|
|
905
|
+
);
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
[data-content-buffer] {
|
|
909
|
+
grid-column: 1;
|
|
910
|
+
/* We multiply by 1.414 (√2) to better approximate the diagonal repeat distance */
|
|
911
|
+
background-size: 8px 8px;
|
|
912
|
+
background-position: 5px 0;
|
|
913
|
+
background-origin: border-box;
|
|
914
|
+
background-color: var(--diffs-bg);
|
|
915
|
+
/* This is incredibley expensive... */
|
|
916
|
+
background-image: repeating-linear-gradient(
|
|
917
|
+
-45deg,
|
|
918
|
+
transparent,
|
|
919
|
+
transparent calc(3px * 1.414),
|
|
920
|
+
var(--diffs-bg-buffer) calc(3px * 1.414),
|
|
921
|
+
var(--diffs-bg-buffer) calc(4px * 1.414)
|
|
922
|
+
);
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
[data-separator] {
|
|
926
|
+
box-sizing: content-box;
|
|
927
|
+
background-color: var(--diffs-bg);
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
[data-separator='simple'] {
|
|
931
|
+
min-height: 4px;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
[data-separator='line-info'],
|
|
935
|
+
[data-separator='line-info-basic'],
|
|
936
|
+
[data-separator='metadata'],
|
|
937
|
+
[data-separator='simple'] {
|
|
938
|
+
background-color: var(--diffs-bg-separator);
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
[data-separator='line-info'],
|
|
942
|
+
[data-separator='line-info-basic'],
|
|
943
|
+
[data-separator='metadata'] {
|
|
944
|
+
height: 32px;
|
|
945
|
+
position: relative;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
[data-separator-wrapper] {
|
|
949
|
+
-webkit-user-select: none;
|
|
950
|
+
user-select: none;
|
|
951
|
+
fill: currentColor;
|
|
952
|
+
position: absolute;
|
|
953
|
+
inset-inline: 0;
|
|
954
|
+
display: flex;
|
|
955
|
+
align-items: center;
|
|
956
|
+
background-color: var(--diffs-bg);
|
|
957
|
+
height: 100%;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
[data-content] [data-separator-wrapper] {
|
|
961
|
+
display: none;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
[data-separator='metadata'] [data-separator-wrapper] {
|
|
965
|
+
inset-inline: 100% auto;
|
|
966
|
+
padding-inline: 1ch;
|
|
967
|
+
height: 100%;
|
|
968
|
+
background-color: var(--diffs-bg-separator);
|
|
969
|
+
color: var(--diffs-fg-number);
|
|
970
|
+
white-space: nowrap;
|
|
971
|
+
overflow: hidden;
|
|
972
|
+
text-overflow: ellipsis;
|
|
973
|
+
min-width: min-content;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
[data-separator='line-info'] {
|
|
977
|
+
margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
[data-separator='line-info-basic'],
|
|
981
|
+
[data-separator='metadata'] {
|
|
982
|
+
margin-block: 0;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
[data-separator='line-info'][data-separator-first] {
|
|
986
|
+
margin-top: 0;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
[data-separator='line-info'][data-separator-last] {
|
|
990
|
+
margin-bottom: 0;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
[data-expand-index] [data-separator-wrapper] {
|
|
994
|
+
display: grid;
|
|
995
|
+
grid-template-columns: 32px auto;
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
[data-expand-index] [data-separator-wrapper][data-separator-multi-button] {
|
|
999
|
+
grid-template-columns: 32px 32px auto;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
[data-expand-button],
|
|
1003
|
+
[data-separator-content] {
|
|
1004
|
+
display: flex;
|
|
1005
|
+
flex: 0 0 auto;
|
|
1006
|
+
align-items: center;
|
|
1007
|
+
background-color: var(--diffs-bg-separator);
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
[data-expand-button] {
|
|
1011
|
+
justify-content: center;
|
|
1012
|
+
flex-shrink: 0;
|
|
1013
|
+
cursor: pointer;
|
|
1014
|
+
min-width: 32px;
|
|
1015
|
+
align-self: stretch;
|
|
1016
|
+
color: var(--diffs-fg-number);
|
|
1017
|
+
border-right: 2px solid var(--diffs-bg);
|
|
1018
|
+
|
|
1019
|
+
&:hover {
|
|
1020
|
+
color: var(--diffs-fg);
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
[data-expand-down] [data-icon] {
|
|
1025
|
+
transform: scaleY(-1);
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
[data-separator-content] {
|
|
1029
|
+
flex: 1 1 auto;
|
|
1030
|
+
padding: 0 1ch;
|
|
1031
|
+
height: 100%;
|
|
1032
|
+
color: var(--diffs-fg-number);
|
|
1033
|
+
|
|
1034
|
+
overflow: hidden;
|
|
1035
|
+
justify-content: flex-start;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
[data-separator='line-info'],
|
|
1039
|
+
[data-separator='line-info-basic'] {
|
|
1040
|
+
[data-separator-content] {
|
|
1041
|
+
height: 100%;
|
|
1042
|
+
-webkit-user-select: none;
|
|
1043
|
+
user-select: none;
|
|
1044
|
+
overflow: clip;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
@supports (width: 1cqi) {
|
|
1049
|
+
[data-unified] {
|
|
1050
|
+
[data-separator='line-info'] [data-separator-wrapper] {
|
|
1051
|
+
padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1052
|
+
width: 100cqi;
|
|
1053
|
+
|
|
1054
|
+
[data-separator-content] {
|
|
1055
|
+
border-radius: 6px;
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
[data-separator='line-info'][data-expand-index]
|
|
1060
|
+
[data-separator-wrapper]
|
|
1061
|
+
[data-separator-content] {
|
|
1062
|
+
border-top-left-radius: unset;
|
|
1063
|
+
border-bottom-left-radius: unset;
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
[data-gutter] {
|
|
1068
|
+
[data-separator='line-info'] [data-separator-wrapper] {
|
|
1069
|
+
padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
[data-separator='line-info'] [data-separator-content] {
|
|
1073
|
+
border-top-left-radius: 6px;
|
|
1074
|
+
border-bottom-left-radius: 6px;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
[data-separator='line-info'][data-expand-index] [data-separator-content] {
|
|
1078
|
+
border-top-left-radius: unset;
|
|
1079
|
+
border-bottom-left-radius: unset;
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
[data-additions] {
|
|
1084
|
+
[data-content] [data-separator='line-info'] {
|
|
1085
|
+
background-color: var(--diffs-bg);
|
|
1086
|
+
|
|
1087
|
+
[data-separator-wrapper] {
|
|
1088
|
+
display: none;
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
[data-gutter] [data-separator='line-info'] [data-separator-wrapper] {
|
|
1093
|
+
display: block;
|
|
1094
|
+
height: 100%;
|
|
1095
|
+
background-color: var(--diffs-bg-separator);
|
|
1096
|
+
border-top-right-radius: 6px;
|
|
1097
|
+
border-bottom-right-radius: 6px;
|
|
1098
|
+
|
|
1099
|
+
[data-separator-content],
|
|
1100
|
+
[data-expand-button] {
|
|
1101
|
+
display: none;
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
[data-overflow='scroll']
|
|
1107
|
+
[data-additions]
|
|
1108
|
+
[data-gutter]
|
|
1109
|
+
[data-separator='line-info']
|
|
1110
|
+
[data-separator-wrapper] {
|
|
1111
|
+
width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
[data-overflow='wrap']
|
|
1115
|
+
[data-additions]
|
|
1116
|
+
[data-content]
|
|
1117
|
+
[data-separator='line-info']
|
|
1118
|
+
[data-separator-wrapper] {
|
|
1119
|
+
background-color: var(--diffs-bg-separator);
|
|
1120
|
+
display: block;
|
|
1121
|
+
height: 100%;
|
|
1122
|
+
margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1123
|
+
border-top-right-radius: 6px;
|
|
1124
|
+
border-bottom-right-radius: 6px;
|
|
1125
|
+
|
|
1126
|
+
[data-separator-content],
|
|
1127
|
+
[data-expand-button] {
|
|
1128
|
+
display: none;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
[data-separator='line-info'] [data-separator-wrapper] {
|
|
1133
|
+
[data-expand-both],
|
|
1134
|
+
[data-expand-down],
|
|
1135
|
+
[data-expand-up] {
|
|
1136
|
+
border-top-left-radius: 6px;
|
|
1137
|
+
border-bottom-left-radius: 6px;
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
@media (pointer: fine) {
|
|
1142
|
+
[data-separator='line-info'] [data-separator-wrapper] {
|
|
1143
|
+
&[data-separator-multi-button] {
|
|
1144
|
+
[data-expand-up] {
|
|
1145
|
+
border-top-left-radius: 6px;
|
|
1146
|
+
border-bottom-left-radius: unset;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
[data-expand-down] {
|
|
1150
|
+
border-bottom-left-radius: 6px;
|
|
1151
|
+
border-top-left-radius: unset;
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
@media (pointer: coarse) {
|
|
1159
|
+
[data-separator='line-info-basic']
|
|
1160
|
+
[data-separator-wrapper][data-separator-multi-button] {
|
|
1161
|
+
grid-template-columns: 34px 34px auto;
|
|
1162
|
+
|
|
1163
|
+
[data-separator-content] {
|
|
1164
|
+
grid-column: unset;
|
|
1165
|
+
grid-row: unset;
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
@supports (width: 1cqi) {
|
|
1170
|
+
[data-separator='line-info'] [data-separator-wrapper] {
|
|
1171
|
+
[data-expand-both],
|
|
1172
|
+
[data-expand-down],
|
|
1173
|
+
[data-expand-up] {
|
|
1174
|
+
border-top-left-radius: 6px;
|
|
1175
|
+
border-bottom-left-radius: 6px;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
&[data-separator-multi-button] {
|
|
1179
|
+
[data-expand-up] {
|
|
1180
|
+
border-top-left-radius: 6px;
|
|
1181
|
+
border-bottom-left-radius: 6px;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
[data-expand-down] {
|
|
1185
|
+
border-bottom-left-radius: unset;
|
|
1186
|
+
border-top-left-radius: unset;
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
@media (pointer: fine) {
|
|
1194
|
+
[data-separator-wrapper][data-separator-multi-button] {
|
|
1195
|
+
display: grid;
|
|
1196
|
+
grid-template-rows: 50% 50%;
|
|
1197
|
+
|
|
1198
|
+
[data-separator-content] {
|
|
1199
|
+
grid-column: 2;
|
|
1200
|
+
grid-row: 1 / -1;
|
|
1201
|
+
min-width: min-content;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
[data-expand-button] {
|
|
1205
|
+
grid-column: 1;
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
[data-separator='line-info'] [data-separator-wrapper],
|
|
1210
|
+
[data-separator='line-info']
|
|
1211
|
+
[data-separator-wrapper][data-separator-multi-button] {
|
|
1212
|
+
grid-template-columns: 34px auto;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
[data-separator='line-info-basic'][data-expand-index]
|
|
1216
|
+
[data-separator-wrapper] {
|
|
1217
|
+
grid-template-columns: 100% auto;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
[data-separator='line-info'],
|
|
1221
|
+
[data-separator='line-info-basic'] {
|
|
1222
|
+
[data-separator-multi-button] {
|
|
1223
|
+
[data-expand-up] {
|
|
1224
|
+
border-bottom: 1px solid var(--diffs-bg);
|
|
1225
|
+
border-right: 2px solid var(--diffs-bg);
|
|
1226
|
+
}
|
|
1227
|
+
[data-expand-down] {
|
|
1228
|
+
border-top: 1px solid var(--diffs-bg);
|
|
1229
|
+
border-right: 2px solid var(--diffs-bg);
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
[data-additions] [data-gutter] [data-separator-wrapper],
|
|
1236
|
+
[data-additions] [data-separator='line-info-basic'] [data-separator-wrapper],
|
|
1237
|
+
[data-content] [data-separator-wrapper] {
|
|
1238
|
+
display: none;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
[data-line-annotation],
|
|
1242
|
+
[data-gutter-buffer='annotation'] {
|
|
1243
|
+
--diffs-line-bg: var(--diffs-bg-context);
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
[data-merge-conflict-actions],
|
|
1247
|
+
[data-gutter-buffer='merge-conflict-action'] {
|
|
1248
|
+
--diffs-line-bg: var(--diffs-bg-context);
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
[data-has-merge-conflict] [data-line-annotation],
|
|
1252
|
+
[data-has-merge-conflict] [data-gutter-buffer='annotation'] {
|
|
1253
|
+
--diffs-line-bg: var(--diffs-bg);
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
[data-has-merge-conflict] [data-gutter-buffer='merge-conflict-action'] {
|
|
1257
|
+
--diffs-line-bg: var(--diffs-bg);
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
[data-line-annotation] {
|
|
1261
|
+
min-height: var(--diffs-annotation-min-height, 0);
|
|
1262
|
+
z-index: 2;
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
[data-merge-conflict-actions] {
|
|
1266
|
+
z-index: 2;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
[data-separator='custom'] {
|
|
1270
|
+
display: grid;
|
|
1271
|
+
grid-template-columns: subgrid;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
[data-line],
|
|
1275
|
+
[data-column-number],
|
|
1276
|
+
[data-no-newline] {
|
|
1277
|
+
position: relative;
|
|
1278
|
+
padding-inline: 1ch;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
[data-indicators='classic'] [data-line] {
|
|
1282
|
+
padding-inline-start: 2ch;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
[data-indicators='classic'] {
|
|
1286
|
+
[data-line-type='change-addition'],
|
|
1287
|
+
[data-line-type='change-deletion'] {
|
|
1288
|
+
&[data-no-newline],
|
|
1289
|
+
&[data-line] {
|
|
1290
|
+
&::before {
|
|
1291
|
+
display: inline-block;
|
|
1292
|
+
width: 1ch;
|
|
1293
|
+
height: 1lh;
|
|
1294
|
+
position: absolute;
|
|
1295
|
+
top: 0;
|
|
1296
|
+
left: 0;
|
|
1297
|
+
-webkit-user-select: none;
|
|
1298
|
+
user-select: none;
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
[data-line-type='change-addition'] {
|
|
1304
|
+
&[data-line],
|
|
1305
|
+
&[data-no-newline] {
|
|
1306
|
+
&::before {
|
|
1307
|
+
content: '+';
|
|
1308
|
+
color: var(--diffs-addition-base);
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
[data-line-type='change-deletion'] {
|
|
1314
|
+
&[data-line],
|
|
1315
|
+
&[data-no-newline] {
|
|
1316
|
+
&::before {
|
|
1317
|
+
content: '-';
|
|
1318
|
+
color: var(--diffs-deletion-base);
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
[data-indicators='bars'] {
|
|
1325
|
+
[data-line-type='change-deletion'],
|
|
1326
|
+
[data-line-type='change-addition'] {
|
|
1327
|
+
&[data-column-number] {
|
|
1328
|
+
&::before {
|
|
1329
|
+
content: '';
|
|
1330
|
+
display: block;
|
|
1331
|
+
width: 4px;
|
|
1332
|
+
height: 100%;
|
|
1333
|
+
position: absolute;
|
|
1334
|
+
top: 0;
|
|
1335
|
+
left: 0;
|
|
1336
|
+
-webkit-user-select: none;
|
|
1337
|
+
user-select: none;
|
|
1338
|
+
contain: strict;
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
[data-line-type='change-deletion'] {
|
|
1344
|
+
&[data-column-number] {
|
|
1345
|
+
&::before {
|
|
1346
|
+
background-image: linear-gradient(
|
|
1347
|
+
0deg,
|
|
1348
|
+
var(--diffs-bg-deletion) 50%,
|
|
1349
|
+
var(--diffs-deletion-base) 50%
|
|
1350
|
+
);
|
|
1351
|
+
background-repeat: repeat;
|
|
1352
|
+
background-size: 2px 2px;
|
|
1353
|
+
background-size: calc(1lh / round(1lh / 2px))
|
|
1354
|
+
calc(1lh / round(1lh / 2px));
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
[data-line-type='change-addition'] {
|
|
1360
|
+
&[data-column-number] {
|
|
1361
|
+
&::before {
|
|
1362
|
+
background-color: var(--diffs-addition-base);
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
[data-overflow='wrap'] {
|
|
1369
|
+
[data-line],
|
|
1370
|
+
[data-annotation-content] {
|
|
1371
|
+
white-space: pre-wrap;
|
|
1372
|
+
word-break: break-word;
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
[data-overflow='scroll'] [data-line] {
|
|
1377
|
+
white-space: pre;
|
|
1378
|
+
min-height: 1lh;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
[data-column-number] {
|
|
1382
|
+
box-sizing: content-box;
|
|
1383
|
+
text-align: right;
|
|
1384
|
+
-webkit-user-select: none;
|
|
1385
|
+
user-select: none;
|
|
1386
|
+
background-color: var(--diffs-bg);
|
|
1387
|
+
color: var(--diffs-fg-number);
|
|
1388
|
+
padding-left: 2ch;
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
[data-line-number-content] {
|
|
1392
|
+
display: inline-block;
|
|
1393
|
+
min-width: var(
|
|
1394
|
+
--diffs-min-number-column-width,
|
|
1395
|
+
var(--diffs-min-number-column-width-default, 3ch)
|
|
1396
|
+
);
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
[data-disable-line-numbers] {
|
|
1400
|
+
[data-column-number] {
|
|
1401
|
+
min-width: 4px;
|
|
1402
|
+
padding: 0;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
[data-line-number-content] {
|
|
1406
|
+
display: none;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
[data-gutter-utility-slot] {
|
|
1410
|
+
right: unset;
|
|
1411
|
+
left: 0;
|
|
1412
|
+
justify-content: flex-start;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
&[data-indicators='bars'] [data-gutter-utility-slot] {
|
|
1416
|
+
/* Using 5px here because theres a 1px separator after the bar */
|
|
1417
|
+
left: 5px;
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
[data-file][data-disable-line-numbers] {
|
|
1422
|
+
[data-gutter-buffer],
|
|
1423
|
+
[data-column-number] {
|
|
1424
|
+
min-width: 0;
|
|
1425
|
+
border-right: 0;
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
[data-interactive-line-numbers] [data-column-number] {
|
|
1430
|
+
cursor: pointer;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
[data-diff-span] {
|
|
1434
|
+
border-radius: 3px;
|
|
1435
|
+
-webkit-box-decoration-break: clone;
|
|
1436
|
+
box-decoration-break: clone;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
[data-line-type='change-addition'] {
|
|
1440
|
+
&[data-column-number] {
|
|
1441
|
+
color: var(
|
|
1442
|
+
--diffs-fg-number-addition-override,
|
|
1443
|
+
var(--diffs-addition-base)
|
|
1444
|
+
);
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
> [data-diff-span] {
|
|
1448
|
+
background-color: var(--diffs-bg-addition-emphasis);
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
[data-line-type='change-deletion'] {
|
|
1453
|
+
&[data-column-number] {
|
|
1454
|
+
color: var(
|
|
1455
|
+
--diffs-fg-number-deletion-override,
|
|
1456
|
+
var(--diffs-deletion-base)
|
|
1457
|
+
);
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
[data-diff-span] {
|
|
1461
|
+
background-color: var(--diffs-bg-deletion-emphasis);
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
[data-background] [data-line-type='change-addition'] {
|
|
1466
|
+
--diffs-line-bg: var(--diffs-bg-addition);
|
|
1467
|
+
|
|
1468
|
+
&[data-column-number] {
|
|
1469
|
+
background-color: var(--diffs-bg-addition-number);
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
[data-background] [data-line-type='change-deletion'] {
|
|
1474
|
+
--diffs-line-bg: var(--diffs-bg-deletion);
|
|
1475
|
+
|
|
1476
|
+
&[data-column-number] {
|
|
1477
|
+
background-color: var(--diffs-bg-deletion-number);
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
[data-merge-conflict^='marker-'][data-line] {
|
|
1482
|
+
&[data-line-type='context'],
|
|
1483
|
+
&[data-line-type='context-expanded'] {
|
|
1484
|
+
color: var(--diffs-fg);
|
|
1485
|
+
|
|
1486
|
+
span {
|
|
1487
|
+
color: var(--diffs-fg) !important;
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
[data-merge-conflict='marker-start'][data-line] {
|
|
1493
|
+
&[data-line-type='context'],
|
|
1494
|
+
&[data-line-type='context-expanded'] {
|
|
1495
|
+
&::after {
|
|
1496
|
+
content: ' (Current Change)';
|
|
1497
|
+
color: var(--diffs-fg-conflict-marker);
|
|
1498
|
+
opacity: 1;
|
|
1499
|
+
font-style: normal;
|
|
1500
|
+
font-family: var(
|
|
1501
|
+
--diffs-header-font-family,
|
|
1502
|
+
var(--diffs-header-font-fallback)
|
|
1503
|
+
);
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
[data-merge-conflict='marker-end'][data-line] {
|
|
1509
|
+
&[data-line-type='context'],
|
|
1510
|
+
&[data-line-type='context-expanded'] {
|
|
1511
|
+
&::after {
|
|
1512
|
+
content: ' (Incoming Change)';
|
|
1513
|
+
color: var(--diffs-fg-conflict-marker);
|
|
1514
|
+
opacity: 1;
|
|
1515
|
+
font-style: normal;
|
|
1516
|
+
font-family: var(
|
|
1517
|
+
--diffs-header-font-family,
|
|
1518
|
+
var(--diffs-header-font-fallback)
|
|
1519
|
+
);
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
[data-merge-conflict='marker-start'],
|
|
1525
|
+
[data-merge-conflict='marker-base'],
|
|
1526
|
+
[data-merge-conflict='marker-separator'],
|
|
1527
|
+
[data-merge-conflict='marker-end'] {
|
|
1528
|
+
&[data-line],
|
|
1529
|
+
&[data-no-newline] {
|
|
1530
|
+
background-color: var(--diffs-bg-conflict-marker);
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
&[data-column-number] {
|
|
1534
|
+
background-color: var(--diffs-bg-conflict-marker-number);
|
|
1535
|
+
color: var(--diffs-fg-conflict-marker);
|
|
1536
|
+
|
|
1537
|
+
[data-line-number-content] {
|
|
1538
|
+
color: var(--diffs-fg-conflict-marker);
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
[data-merge-conflict='current'] {
|
|
1544
|
+
&[data-line],
|
|
1545
|
+
&[data-no-newline] {
|
|
1546
|
+
background-color: var(--conflict-bg-current);
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
&[data-column-number] {
|
|
1550
|
+
background-color: var(--conflict-bg-current-number);
|
|
1551
|
+
color: var(--diffs-addition-base);
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
[data-merge-conflict='marker-start'] {
|
|
1556
|
+
&[data-line],
|
|
1557
|
+
&[data-no-newline] {
|
|
1558
|
+
background-color: var(--conflict-bg-current-header);
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
&[data-column-number] {
|
|
1562
|
+
background-color: var(--conflict-bg-current-header-number);
|
|
1563
|
+
color: var(--diffs-addition-base);
|
|
1564
|
+
|
|
1565
|
+
[data-line-number-content] {
|
|
1566
|
+
color: var(--diffs-addition-base);
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
[data-merge-conflict='marker-end'] {
|
|
1572
|
+
&[data-line],
|
|
1573
|
+
&[data-no-newline] {
|
|
1574
|
+
background-color: var(--conflict-bg-incoming-header);
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
&[data-column-number] {
|
|
1578
|
+
background-color: var(--conflict-bg-incoming-header-number);
|
|
1579
|
+
color: var(--diffs-modified-base);
|
|
1580
|
+
|
|
1581
|
+
[data-line-number-content] {
|
|
1582
|
+
color: var(--diffs-modified-base);
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
[data-merge-conflict='marker-separator'] {
|
|
1588
|
+
&[data-line],
|
|
1589
|
+
&[data-no-newline] {
|
|
1590
|
+
background-color: var(--diffs-bg);
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
&[data-column-number] {
|
|
1594
|
+
background-color: var(--diffs-bg);
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
[data-merge-conflict='base'] {
|
|
1599
|
+
&[data-line],
|
|
1600
|
+
&[data-no-newline] {
|
|
1601
|
+
background-color: var(--diffs-bg-conflict-base);
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
&[data-column-number] {
|
|
1605
|
+
background-color: var(--diffs-bg-conflict-base-number);
|
|
1606
|
+
color: var(--diffs-modified-base);
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
[data-merge-conflict='incoming'] {
|
|
1611
|
+
&[data-line],
|
|
1612
|
+
&[data-no-newline] {
|
|
1613
|
+
background-color: var(--conflict-bg-incoming);
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
&[data-column-number] {
|
|
1617
|
+
background-color: var(--conflict-bg-incoming-number);
|
|
1618
|
+
color: var(--diffs-modified-base);
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
@media (pointer: fine) {
|
|
1623
|
+
[data-column-number],
|
|
1624
|
+
[data-line] {
|
|
1625
|
+
&[data-hovered] {
|
|
1626
|
+
background-color: var(--diffs-bg-hover);
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
[data-background] {
|
|
1631
|
+
[data-column-number],
|
|
1632
|
+
[data-line] {
|
|
1633
|
+
&[data-hovered] {
|
|
1634
|
+
&[data-line-type='change-deletion'] {
|
|
1635
|
+
background-color: var(--diffs-bg-deletion-hover);
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
&[data-line-type='change-addition'] {
|
|
1639
|
+
background-color: var(--diffs-bg-addition-hover);
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
[data-diffs-header] {
|
|
1647
|
+
position: relative;
|
|
1648
|
+
display: flex;
|
|
1649
|
+
flex-direction: row;
|
|
1650
|
+
justify-content: space-between;
|
|
1651
|
+
align-items: center;
|
|
1652
|
+
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1653
|
+
min-height: calc(
|
|
1654
|
+
1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3)
|
|
1655
|
+
);
|
|
1656
|
+
padding-inline: 16px;
|
|
1657
|
+
top: 0;
|
|
1658
|
+
z-index: 2;
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
[data-header-content] {
|
|
1662
|
+
display: flex;
|
|
1663
|
+
flex-direction: row;
|
|
1664
|
+
align-items: center;
|
|
1665
|
+
gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1666
|
+
min-width: 0;
|
|
1667
|
+
white-space: nowrap;
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
[data-header-content] [data-prev-name],
|
|
1671
|
+
[data-header-content] [data-title] {
|
|
1672
|
+
direction: rtl;
|
|
1673
|
+
overflow: hidden;
|
|
1674
|
+
text-overflow: ellipsis;
|
|
1675
|
+
min-width: 0;
|
|
1676
|
+
white-space: nowrap;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
[data-prev-name] {
|
|
1680
|
+
opacity: 0.7;
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
[data-rename-icon] {
|
|
1684
|
+
fill: currentColor;
|
|
1685
|
+
flex-shrink: 0;
|
|
1686
|
+
flex-grow: 0;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
[data-diffs-header] [data-metadata] {
|
|
1690
|
+
display: flex;
|
|
1691
|
+
align-items: center;
|
|
1692
|
+
gap: 1ch;
|
|
1693
|
+
white-space: nowrap;
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
[data-diffs-header] [data-additions-count] {
|
|
1697
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1698
|
+
color: var(--diffs-addition-base);
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
[data-diffs-header] [data-deletions-count] {
|
|
1702
|
+
font-family: var(--diffs-font-family, var(--diffs-font-fallback));
|
|
1703
|
+
color: var(--diffs-deletion-base);
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
[data-annotation-content] {
|
|
1707
|
+
position: relative;
|
|
1708
|
+
display: flow-root;
|
|
1709
|
+
align-self: flex-start;
|
|
1710
|
+
z-index: 2;
|
|
1711
|
+
min-width: 0;
|
|
1712
|
+
isolation: isolate;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
[data-merge-conflict-actions-content] {
|
|
1716
|
+
display: flex;
|
|
1717
|
+
align-items: center;
|
|
1718
|
+
gap: 0.25rem;
|
|
1719
|
+
padding-inline: 0.5rem;
|
|
1720
|
+
min-height: 1.75rem;
|
|
1721
|
+
font-family: var(
|
|
1722
|
+
--diffs-header-font-family,
|
|
1723
|
+
var(--diffs-header-font-fallback)
|
|
1724
|
+
);
|
|
1725
|
+
font-size: 0.75rem;
|
|
1726
|
+
line-height: 1.2;
|
|
1727
|
+
color: var(--diffs-fg);
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
[data-merge-conflict-action] {
|
|
1731
|
+
appearance: none;
|
|
1732
|
+
border: 0;
|
|
1733
|
+
background: transparent;
|
|
1734
|
+
color: var(--diffs-fg-number);
|
|
1735
|
+
font: inherit;
|
|
1736
|
+
font-style: normal;
|
|
1737
|
+
cursor: pointer;
|
|
1738
|
+
padding: 0;
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
[data-merge-conflict-action]:hover {
|
|
1742
|
+
color: var(--diffs-fg);
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
[data-merge-conflict-action='current']:hover {
|
|
1746
|
+
color: var(--diffs-addition-base);
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
[data-merge-conflict-action='incoming']:hover {
|
|
1750
|
+
color: var(--diffs-modified-base);
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
[data-merge-conflict-action-separator] {
|
|
1754
|
+
color: var(--diffs-fg-number);
|
|
1755
|
+
opacity: 0.6;
|
|
1756
|
+
-webkit-user-select: none;
|
|
1757
|
+
user-select: none;
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
/* Sticky positioning has a composite costs, so we should _only_ pay it if we
|
|
1761
|
+
* need to */
|
|
1762
|
+
[data-overflow='scroll'] [data-annotation-content] {
|
|
1763
|
+
position: sticky;
|
|
1764
|
+
width: var(--diffs-column-content-width, auto);
|
|
1765
|
+
left: var(--diffs-column-number-width, 0);
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
[data-overflow='scroll'] [data-merge-conflict-actions-content] {
|
|
1769
|
+
position: sticky;
|
|
1770
|
+
width: var(--diffs-column-content-width, auto);
|
|
1771
|
+
left: var(--diffs-column-number-width, 0);
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
/* Undo some of the stuff that the 'pre' tag does */
|
|
1775
|
+
[data-annotation-slot] {
|
|
1776
|
+
text-wrap-mode: wrap;
|
|
1777
|
+
word-break: normal;
|
|
1778
|
+
white-space-collapse: collapse;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
[data-change-icon] {
|
|
1782
|
+
fill: currentColor;
|
|
1783
|
+
flex-shrink: 0;
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
[data-change-icon='change'],
|
|
1787
|
+
[data-change-icon='rename-pure'],
|
|
1788
|
+
[data-change-icon='rename-changed'] {
|
|
1789
|
+
color: var(--diffs-modified-base);
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
[data-change-icon='new'] {
|
|
1793
|
+
color: var(--diffs-addition-base);
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
[data-change-icon='deleted'] {
|
|
1797
|
+
color: var(--diffs-deletion-base);
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
[data-change-icon='file'] {
|
|
1801
|
+
opacity: 0.6;
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
/* Line selection highlighting */
|
|
1805
|
+
[data-selected-line] {
|
|
1806
|
+
&[data-gutter-buffer='annotation'],
|
|
1807
|
+
&[data-column-number] {
|
|
1808
|
+
color: var(--diffs-selection-number-fg);
|
|
1809
|
+
background-color: var(--diffs-bg-selection-number);
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
&[data-line] {
|
|
1813
|
+
background-color: var(--diffs-bg-selection);
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
[data-line-type='change-addition'],
|
|
1818
|
+
[data-line-type='change-deletion'] {
|
|
1819
|
+
&[data-selected-line] {
|
|
1820
|
+
&[data-line],
|
|
1821
|
+
&[data-line][data-hovered] {
|
|
1822
|
+
background-color: light-dark(
|
|
1823
|
+
color-mix(
|
|
1824
|
+
in lab,
|
|
1825
|
+
var(--diffs-line-bg, var(--diffs-bg)) 82%,
|
|
1826
|
+
var(--diffs-selection-base)
|
|
1827
|
+
),
|
|
1828
|
+
color-mix(
|
|
1829
|
+
in lab,
|
|
1830
|
+
var(--diffs-line-bg, var(--diffs-bg)) 75%,
|
|
1831
|
+
var(--diffs-selection-base)
|
|
1832
|
+
)
|
|
1833
|
+
);
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
&[data-column-number],
|
|
1837
|
+
&[data-column-number][data-hovered] {
|
|
1838
|
+
color: var(--diffs-selection-number-fg);
|
|
1839
|
+
background-color: light-dark(
|
|
1840
|
+
color-mix(
|
|
1841
|
+
in lab,
|
|
1842
|
+
var(--diffs-line-bg, var(--diffs-bg)) 75%,
|
|
1843
|
+
var(--diffs-selection-base)
|
|
1844
|
+
),
|
|
1845
|
+
color-mix(
|
|
1846
|
+
in lab,
|
|
1847
|
+
var(--diffs-line-bg, var(--diffs-bg)) 60%,
|
|
1848
|
+
var(--diffs-selection-base)
|
|
1849
|
+
)
|
|
1850
|
+
);
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
[data-gutter-utility-slot] {
|
|
1856
|
+
position: absolute;
|
|
1857
|
+
top: 0;
|
|
1858
|
+
bottom: 0;
|
|
1859
|
+
right: 0;
|
|
1860
|
+
display: flex;
|
|
1861
|
+
justify-content: flex-end;
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
[data-unmodified-lines] {
|
|
1865
|
+
display: block;
|
|
1866
|
+
overflow: hidden;
|
|
1867
|
+
min-width: 0;
|
|
1868
|
+
text-overflow: ellipsis;
|
|
1869
|
+
white-space: nowrap;
|
|
1870
|
+
flex: 0 1 auto;
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
[data-error-wrapper] {
|
|
1874
|
+
overflow: auto;
|
|
1875
|
+
padding: var(--diffs-gap-block, var(--diffs-gap-fallback))
|
|
1876
|
+
var(--diffs-gap-inline, var(--diffs-gap-fallback));
|
|
1877
|
+
max-height: 400px;
|
|
1878
|
+
scrollbar-width: none;
|
|
1879
|
+
|
|
1880
|
+
[data-error-message] {
|
|
1881
|
+
font-weight: bold;
|
|
1882
|
+
font-size: 18px;
|
|
1883
|
+
color: var(--diffs-deletion-base);
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
[data-error-stack] {
|
|
1887
|
+
color: var(--diffs-fg-number);
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
[data-placeholder] {
|
|
1892
|
+
contain: strict;
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
[data-utility-button] {
|
|
1896
|
+
display: flex;
|
|
1897
|
+
align-items: center;
|
|
1898
|
+
justify-content: center;
|
|
1899
|
+
border: none;
|
|
1900
|
+
appearance: none;
|
|
1901
|
+
width: 1lh;
|
|
1902
|
+
height: 1lh;
|
|
1903
|
+
margin-right: calc((1lh - 1ch) * -1);
|
|
1904
|
+
padding: 0;
|
|
1905
|
+
cursor: pointer;
|
|
1906
|
+
font-size: var(--diffs-font-size, 13px);
|
|
1907
|
+
line-height: var(--diffs-line-height, 20px);
|
|
1908
|
+
border-radius: 4px;
|
|
1909
|
+
background-color: var(--diffs-modified-base);
|
|
1910
|
+
color: var(--diffs-bg);
|
|
1911
|
+
fill: currentColor;
|
|
1912
|
+
position: relative;
|
|
1913
|
+
z-index: 4;
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
`;const iN="@layer base, theme, unsafe;";function rN(t){return`${iN}
|
|
1917
|
+
@layer unsafe {
|
|
1918
|
+
${t}
|
|
1919
|
+
}`}function Cf({code:t,pre:n,columnType:r,rowSpan:a,containerSize:s=!1}={}){return t==null&&(t=document.createElement("code"),t.setAttribute("data-code",""),r!=null&&t.setAttribute(`data-${r}`,""),n?.appendChild(t)),a!=null?t.style.setProperty("grid-row",`span ${a}`):t.style.removeProperty("grid-row"),s?t.setAttribute("data-container-size",""):t.removeAttribute("data-container-size"),t}function aN(t,n){if(n==null)return;const r=t.shadowRoot??t.attachShadow({mode:"open"});r.innerHTML===""&&(r.innerHTML=n)}function oN(t,{type:n,diffIndicators:r,disableBackground:a,disableLineNumbers:s,overflow:u,split:c,themeStyles:h,themeType:d,totalLines:p,customProperties:b}){if(b!=null)for(const g in b){const v=b[g];v!=null&&t.setAttribute(g,`${v}`)}switch(n==="diff"?(t.setAttribute("data-diff",""),t.removeAttribute("data-file")):(t.setAttribute("data-file",""),t.removeAttribute("data-diff")),d==="system"?t.removeAttribute("data-theme-type"):t.setAttribute("data-theme-type",d),r){case"bars":case"classic":t.setAttribute("data-indicators",r);break;case"none":t.removeAttribute("data-indicators");break}return s?t.setAttribute("data-disable-line-numbers",""):t.removeAttribute("data-disable-line-numbers"),a?t.removeAttribute("data-background"):t.setAttribute("data-background",""),n==="diff"?t.setAttribute("data-diff-type",c?"split":"single"):t.removeAttribute("data-diff-type"),t.setAttribute("data-overflow",u),t.tabIndex=0,t.style=h,t.style.setProperty("--diffs-min-number-column-width-default",`${`${p}`.length}ch`),t}if(typeof HTMLElement<"u"&&customElements.get(uu)==null){let t;class n extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;const a=this.attachShadow({mode:"open"});t==null&&(t=new CSSStyleSheet,t.replaceSync(nN)),a.adoptedStyleSheets=[t]}}customElements.define(uu,n)}const lN=!0;var sN=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,this.enabled=!1)}setup(t,n,r){if(n==null||r==null)for(const a of t.children??[])a instanceof HTMLElement&&("deletions"in a.dataset?n=a:"additions"in a.dataset&&(r=a));if(r==null||n==null){this.cleanUp();return}this.codeDeletions!==n&&(this.codeDeletions?.removeEventListener("scroll",this.handleDeletionsScroll),this.codeDeletions=n,n.addEventListener("scroll",this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==r&&(this.codeAdditions?.removeEventListener("scroll",this.handleAdditionsScroll),this.codeAdditions=r,r.addEventListener("scroll",this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function Vs(t){return Ve({tagName:"div",properties:{"data-content-buffer":"","data-buffer-size":t,style:`grid-row: span ${t};min-height:calc(${t} * 1lh)`}})}function Gs(t){return Ve({tagName:"div",children:[Ve({tagName:"span",children:[Oi("No newline at end of file")]})],properties:{"data-no-newline":"","data-line-type":t,"data-column-content":""}})}function Af(t){return Ve({tagName:"div",children:[cu({name:t==="both"?"diffs-icon-expand-all":"diffs-icon-expand",properties:{"data-icon":""}})],properties:{"data-expand-button":"","data-expand-both":t==="both"?"":void 0,"data-expand-up":t==="up"?"":void 0,"data-expand-down":t==="down"?"":void 0}})}function Pa({type:t,content:n,expandIndex:r,chunked:a=!1,slotName:s,isFirstHunk:u,isLastHunk:c}){const h=[];if(t==="metadata"&&n!=null&&h.push(Ve({tagName:"div",children:[Oi(n)],properties:{"data-separator-wrapper":""}})),(t==="line-info"||t==="line-info-basic")&&n!=null){const d=[];r!=null&&(a?(u||d.push(Af("up")),c||d.push(Af("down"))):d.push(Af(!u&&!c?"both":u?"down":"up"))),d.push(Ve({tagName:"div",children:[Ve({tagName:"span",children:[Oi(n)],properties:{"data-unmodified-lines":""}})],properties:{"data-separator-content":""}})),h.push(Ve({tagName:"div",children:d,properties:{"data-separator-wrapper":"","data-separator-multi-button":d.length>2?"":void 0}}))}return t==="custom"&&s!=null&&h.push(Ve({tagName:"slot",properties:{name:s}})),Ve({tagName:"div",children:h,properties:{"data-separator":h.length===0?"simple":t,"data-expand-index":r,"data-separator-first":u?"":void 0,"data-separator-last":c?"":void 0}})}function uN(t,n){return`hunk-separator-${t}-${n}`}function cN(t){const n=t.at(-1);return n==null?0:Math.max(n.additionStart+n.additionCount,n.deletionStart+n.deletionCount)}function dN(t){return t.startingLine===0&&t.totalLines===1/0&&t.bufferBefore===0&&t.bufferAfter===0}class Ph{diff(n,r,a={}){let s;typeof a=="function"?(s=a,a={}):"callback"in a&&(s=a.callback);const u=this.castInput(n,a),c=this.castInput(r,a),h=this.removeEmpty(this.tokenize(u,a)),d=this.removeEmpty(this.tokenize(c,a));return this.diffWithOptionsObj(h,d,a,s)}diffWithOptionsObj(n,r,a,s){var u;const c=C=>{if(C=this.postProcess(C,a),s){setTimeout(function(){s(C)},0);return}else return C},h=r.length,d=n.length;let p=1,b=h+d;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,_=[{oldPos:-1,lastComponent:void 0}];let x=this.extractCommon(_[0],r,n,0,a);if(_[0].oldPos+1>=d&&x+1>=h)return c(this.buildValues(_[0].lastComponent,r,n));let T=-1/0,O=1/0;const A=()=>{for(let C=Math.max(T,-p);C<=Math.min(O,p);C+=2){let k;const I=_[C-1],M=_[C+1];I&&(_[C-1]=void 0);let U=!1;if(M){const z=M.oldPos-C;U=M&&0<=z&&z<h}const H=I&&I.oldPos+1<d;if(!U&&!H){_[C]=void 0;continue}if(!H||U&&I.oldPos<M.oldPos?k=this.addToPath(M,!0,!1,0,a):k=this.addToPath(I,!1,!0,1,a),x=this.extractCommon(k,r,n,C,a),k.oldPos+1>=d&&x+1>=h)return c(this.buildValues(k.lastComponent,r,n))||!0;_[C]=k,k.oldPos+1>=d&&(O=Math.min(O,C-1)),x+1>=h&&(T=Math.max(T,C+1))}p++};if(s)(function C(){setTimeout(function(){if(p>b||Date.now()>v)return s(void 0);A()||C()},0)})();else for(;p<=b&&Date.now()<=v;){const C=A();if(C)return C}}addToPath(n,r,a,s,u){const c=n.lastComponent;return c&&!u.oneChangePerToken&&c.added===r&&c.removed===a?{oldPos:n.oldPos+s,lastComponent:{count:c.count+1,added:r,removed:a,previousComponent:c.previousComponent}}:{oldPos:n.oldPos+s,lastComponent:{count:1,added:r,removed:a,previousComponent:c}}}extractCommon(n,r,a,s,u){const c=r.length,h=a.length;let d=n.oldPos,p=d-s,b=0;for(;p+1<c&&d+1<h&&this.equals(a[d+1],r[p+1],u);)p++,d++,b++,u.oneChangePerToken&&(n.lastComponent={count:1,previousComponent:n.lastComponent,added:!1,removed:!1});return b&&!u.oneChangePerToken&&(n.lastComponent={count:b,previousComponent:n.lastComponent,added:!1,removed:!1}),n.oldPos=d,p}equals(n,r,a){return a.comparator?a.comparator(n,r):n===r||!!a.ignoreCase&&n.toLowerCase()===r.toLowerCase()}removeEmpty(n){const r=[];for(let a=0;a<n.length;a++)n[a]&&r.push(n[a]);return r}castInput(n,r){return n}tokenize(n,r){return Array.from(n)}join(n){return n.join("")}postProcess(n,r){return n}get useLongestToken(){return!1}buildValues(n,r,a){const s=[];let u;for(;n;)s.push(n),u=n.previousComponent,delete n.previousComponent,n=u;s.reverse();const c=s.length;let h=0,d=0,p=0;for(;h<c;h++){const b=s[h];if(b.removed)b.value=this.join(a.slice(p,p+b.count)),p+=b.count;else{if(!b.added&&this.useLongestToken){let g=r.slice(d,d+b.count);g=g.map(function(v,_){const x=a[p+_];return x.length>v.length?x:v}),b.value=this.join(g)}else b.value=this.join(r.slice(d,d+b.count));d+=b.count,b.added||(p+=b.count)}}return s}}class fN extends Ph{}const hN=new fN;function mN(t,n,r){return hN.diff(t,n,r)}const xv="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}";class pN extends Ph{tokenize(n){const r=new RegExp(`(\\r?\\n)|[${xv}]+|[^\\S\\n\\r]+|[^${xv}]`,"ug");return n.match(r)||[]}}const gN=new pN;function bN(t,n,r){return gN.diff(t,n,r)}class vN extends Ph{constructor(){super(...arguments),this.tokenize=_N}equals(n,r,a){return a.ignoreWhitespace?((!a.newlineIsToken||!n.includes(`
|
|
1920
|
+
`))&&(n=n.trim()),(!a.newlineIsToken||!r.includes(`
|
|
1921
|
+
`))&&(r=r.trim())):a.ignoreNewlineAtEof&&!a.newlineIsToken&&(n.endsWith(`
|
|
1922
|
+
`)&&(n=n.slice(0,-1)),r.endsWith(`
|
|
1923
|
+
`)&&(r=r.slice(0,-1))),super.equals(n,r,a)}}const yN=new vN;function Sv(t,n,r){return yN.diff(t,n,r)}function _N(t,n){n.stripTrailingCr&&(t=t.replace(/\r\n/g,`
|
|
1924
|
+
`));const r=[],a=t.split(/(\n|\r\n)/);a[a.length-1]||a.pop();for(let s=0;s<a.length;s++){const u=a[s];s%2&&!n.newlineIsToken?r[r.length-1]+=u:r.push(u)}return r}const xN={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function SN(t,n,r,a,s,u,c){let h;h={},typeof h.context>"u"&&(h.context=4);const d=h.context;if(h.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(h.callback){const{callback:b}=h;Sv(r,a,Object.assign(Object.assign({},h),{callback:g=>{const v=p(g);b(v)}}))}else return p(Sv(r,a,h));function p(b){if(!b)return;b.push({value:"",lines:[]});function g(C){return C.map(function(k){return" "+k})}const v=[];let _=0,x=0,T=[],O=1,A=1;for(let C=0;C<b.length;C++){const k=b[C],I=k.lines||wN(k.value);if(k.lines=I,k.added||k.removed){if(!_){const M=b[C-1];_=O,x=A,M&&(T=d>0?g(M.lines.slice(-d)):[],_-=T.length,x-=T.length)}for(const M of I)T.push((k.added?"+":"-")+M);k.added?A+=I.length:O+=I.length}else{if(_)if(I.length<=d*2&&C<b.length-2)for(const M of g(I))T.push(M);else{const M=Math.min(I.length,d);for(const H of g(I.slice(0,M)))T.push(H);const U={oldStart:_,oldLines:O-_+M,newStart:x,newLines:A-x+M,lines:T};v.push(U),_=0,x=0,T=[]}O+=I.length,A+=I.length}}for(const C of v)for(let k=0;k<C.lines.length;k++)C.lines[k].endsWith(`
|
|
1925
|
+
`)?C.lines[k]=C.lines[k].slice(0,-1):(C.lines.splice(k+1,0,"\"),k++);return{oldFileName:t,newFileName:n,oldHeader:s,newHeader:u,hunks:v}}}function U1(t,n){if(n||(n=xN),Array.isArray(t)){if(t.length>1&&!n.includeFileHeaders)throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return t.map(a=>U1(a,n)).join(`
|
|
1926
|
+
`)}const r=[];n.includeIndex&&t.oldFileName==t.newFileName&&r.push("Index: "+t.oldFileName),n.includeUnderline&&r.push("==================================================================="),n.includeFileHeaders&&(r.push("--- "+t.oldFileName+(typeof t.oldHeader>"u"?"":" "+t.oldHeader)),r.push("+++ "+t.newFileName+(typeof t.newHeader>"u"?"":" "+t.newHeader)));for(let a=0;a<t.hunks.length;a++){const s=t.hunks[a];s.oldLines===0&&(s.oldStart-=1),s.newLines===0&&(s.newStart-=1),r.push("@@ -"+s.oldStart+","+s.oldLines+" +"+s.newStart+","+s.newLines+" @@");for(const u of s.lines)r.push(u)}return r.join(`
|
|
1927
|
+
`)+`
|
|
1928
|
+
`}function EN(t,n,r,a,s,u,c){{const h=SN(t,n,r,a,s,u);return h?U1(h,void 0):void 0}}function wN(t){const n=t.endsWith(`
|
|
1929
|
+
`),r=t.split(`
|
|
1930
|
+
`).map(a=>a+`
|
|
1931
|
+
`);return n?r.pop():r.push(r.pop().slice(0,-1)),r}function Ev({line:t,spanStart:n,spanLength:r}){return{start:{line:t,character:n},end:{line:t,character:n+r},properties:{"data-diff-span":""},alwaysWrap:!0}}function $s({item:t,arr:n,enableJoin:r,isNeutral:a=!1,isLastItem:s=!1}){const u=n[n.length-1];if(u==null||s||!r){n.push([a?0:1,t.value]);return}const c=u[0]===0;if(a===c||a&&t.value.length===1&&!c){u[1]+=t.value;return}n.push([a?0:1,t.value])}function Eu({diff:t,diffStyle:n,startingLine:r=0,totalLines:a=1/0,expandedHunks:s,collapsedContextThreshold:u=qa,callback:c}){const h={finalHunk:t.hunks.at(-1),viewportStart:r,viewportEnd:r+a,isWindowedHighlight:r>0||a<1/0,splitCount:0,unifiedCount:0,shouldBreak(){if(!h.isWindowedHighlight)return!1;const b=h.unifiedCount>=r+a,g=h.splitCount>=r+a;return n==="unified"?b:(n==="split"||b)&&g},shouldSkip(b,g){if(!h.isWindowedHighlight)return!1;const v=h.unifiedCount+b<r,_=h.splitCount+g<r;return n==="unified"?v:(n==="split"||v)&&_},incrementCounts(b,g){(n==="unified"||n==="both")&&(h.unifiedCount+=b),(n==="split"||n==="both")&&(h.splitCount+=g)},isInWindow(b,g){if(!h.isWindowedHighlight)return!0;const v=h.isInUnifiedWindow(b),_=h.isInSplitWindow(g);return n==="unified"?v:n==="split"?_:v||_},isInUnifiedWindow(b){return!h.isWindowedHighlight||h.unifiedCount>=r-b&&h.unifiedCount<r+a},isInSplitWindow(b){return!h.isWindowedHighlight||h.splitCount>=r-b&&h.splitCount<r+a},emit(b,g=!1){return g||(n==="unified"?h.incrementCounts(1,0):n==="split"?h.incrementCounts(0,1):h.incrementCounts(1,1)),c(b)??!1}};e:for(const[b,g]of t.hunks.entries()){let T=function(z,Q){return _==null||_.collapsedLines<=0||_.fromStart+_.fromEnd>0?0:n==="unified"?z===g.unifiedLineStart+g.unifiedLineCount-1?_.collapsedLines:0:Q===g.splitLineStart+g.splitLineCount-1?_.collapsedLines:0},O=function(){if(v.collapsedLines===0)return 0;const z=v.collapsedLines;return v.collapsedLines=0,z};var d=T,p=O;if(h.shouldBreak())break;const v=wv(t.isPartial,g.collapsedBefore,s,b,u),_=(()=>{if(g!==h.finalHunk||!CN(t))return;const z=t.additionLines.length-(g.additionLineIndex+g.additionCount),Q=t.deletionLines.length-(g.deletionLineIndex+g.deletionCount);if(z!==Q)throw new Error(`iterateOverDiff: trailing context mismatch (additions=${z}, deletions=${Q}) for ${t.name}`);const ee=Math.min(z,Q);return wv(t.isPartial,ee,s,t.hunks.length,u)})(),x=v.fromStart+v.fromEnd;if(h.shouldSkip(x,x))h.incrementCounts(x,x),O();else{let z=g.unifiedLineStart-v.rangeSize,Q=g.splitLineStart-v.rangeSize,ee=g.deletionLineIndex-v.rangeSize,ie=g.additionLineIndex-v.rangeSize,V=g.deletionStart-v.rangeSize,K=g.additionStart-v.rangeSize,oe=0;for(;oe<v.fromStart;){if(h.isInWindow(0,0)){if(h.emit({hunkIndex:b,hunk:g,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:V+oe,lineIndex:ee+oe,noEOFCR:!1,unifiedLineIndex:z+oe,splitLineIndex:Q+oe},additionLine:{unifiedLineIndex:z+oe,splitLineIndex:Q+oe,lineIndex:ie+oe,lineNumber:K+oe,noEOFCR:!1}}))break e}else h.incrementCounts(1,1);oe++}for(z=g.unifiedLineStart-v.fromEnd,Q=g.splitLineStart-v.fromEnd,ee=g.deletionLineIndex-v.fromEnd,ie=g.additionLineIndex-v.fromEnd,V=g.deletionStart-v.fromEnd,K=g.additionStart-v.fromEnd,oe=0;oe<v.fromEnd;){if(h.isInWindow(0,0)){if(h.emit({hunkIndex:b,hunk:g,collapsedBefore:O(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:V+oe,lineIndex:ee+oe,noEOFCR:!1,unifiedLineIndex:z+oe,splitLineIndex:Q+oe},additionLine:{unifiedLineIndex:z+oe,splitLineIndex:Q+oe,lineIndex:ie+oe,lineNumber:K+oe,noEOFCR:!1}}))break e}else h.incrementCounts(1,1);oe++}}let A=g.unifiedLineStart,C=g.splitLineStart,k=g.deletionLineIndex,I=g.additionLineIndex,M=g.deletionStart,U=g.additionStart;const H=g.hunkContent.at(-1);for(const z of g.hunkContent){if(h.shouldBreak())break e;const Q=z===H;if(z.type==="context"){if(h.shouldSkip(z.lines,z.lines))h.incrementCounts(z.lines,z.lines),O();else{let ee=0;for(;ee<z.lines;){if(h.isInWindow(0,0)){const ie=Q&&ee===z.lines-1,V=A+ee,K=C+ee;if(h.emit({hunkIndex:b,hunk:g,collapsedBefore:O(),collapsedAfter:T(V,K),type:"context",deletionLine:{lineNumber:M+ee,lineIndex:k+ee,noEOFCR:ie&&g.noEOFCRDeletions,unifiedLineIndex:V,splitLineIndex:K},additionLine:{unifiedLineIndex:V,splitLineIndex:K,lineIndex:I+ee,lineNumber:U+ee,noEOFCR:ie&&g.noEOFCRAdditions}}))break e}else h.incrementCounts(1,1);ee++}}A+=z.lines,C+=z.lines,k+=z.lines,I+=z.lines,M+=z.lines,U+=z.lines}else{const ee=Math.max(z.deletions,z.additions),ie=z.deletions+z.additions;if(!h.shouldSkip(ie,ee)){const V=AN(h,z,n);for(const[K,oe]of V)for(let te=K;te<oe;te++){const N=T(A+te,n==="unified"?C+(te<z.deletions?te:te-z.deletions):C+te);if(h.emit(kN({hunkIndex:b,hunk:g,collapsedBefore:O(),collapsedAfter:N,diffStyle:n,index:te,unifiedLineIndex:A,splitLineIndex:C,additionLineIndex:I,deletionLineIndex:k,additionLineNumber:U,deletionLineNumber:M,content:z,isLastContent:Q,unifiedCount:ie,splitCount:ee}),!0))break e}}O(),h.incrementCounts(ie,ee),A+=ie,C+=ee,k+=z.deletions,I+=z.additions,M+=z.deletions,U+=z.additions}}if(_!=null){const{collapsedLines:z,fromStart:Q,fromEnd:ee}=_,ie=Q+ee;let V=0;for(;V<ie;){if(h.shouldBreak())break e;if(h.isInWindow(0,0)){const K=V===ie-1;if(h.emit({hunkIndex:t.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:K?z:0,type:"context-expanded",deletionLine:{lineNumber:M+V,lineIndex:k+V,noEOFCR:!1,unifiedLineIndex:A+V,splitLineIndex:C+V},additionLine:{unifiedLineIndex:A+V,splitLineIndex:C+V,lineIndex:I+V,lineNumber:U+V,noEOFCR:!1}}))break e}else h.incrementCounts(1,1);V++}}}}function wv(t,n,r,a,s){if(n=Math.max(n,0),n===0||t)return{fromStart:0,fromEnd:0,rangeSize:n,collapsedLines:Math.max(n,0)};if(r===!0||n<=s)return{fromStart:n,fromEnd:0,rangeSize:n,collapsedLines:0};const u=r?.get(a),c=Math.min(Math.max(u?.fromStart??0,0),n),h=Math.min(Math.max(u?.fromEnd??0,0),n),d=c+h,p=d>=n;return{fromStart:p?n:c,fromEnd:p?0:h,rangeSize:n,collapsedLines:Math.max(n-d,0)}}function CN(t){const n=t.hunks.at(-1);return n==null||t.isPartial||t.additionLines.length===0||t.deletionLines.length===0?!1:n.additionLineIndex+n.additionCount<t.additionLines.length||n.deletionLineIndex+n.deletionCount<t.deletionLines.length}function AN(t,n,r){if(!t.isWindowedHighlight)return[[0,r==="unified"?n.deletions+n.additions:Math.max(n.deletions,n.additions)]];const a=r!=="split",s=r!=="unified",u=r==="unified"?"unified":"split",c=[];function h(g,v){if(g+v<=t.viewportStart||g>=t.viewportEnd)return;const _=Math.max(0,t.viewportStart-g),x=Math.min(v,t.viewportEnd-g);return x>_?[_,x]:void 0}function d(g,v){return u==="split"?g:v==="additions"?[g[0]+n.deletions,g[1]+n.deletions]:g}function p(g,v){if(g==null)return;const[_,x]=d(g,v);x>_&&c.push([_,x])}if(a&&(p(h(t.unifiedCount,n.deletions),"deletions"),p(h(t.unifiedCount+n.deletions,n.additions),"additions")),s&&(p(h(t.splitCount,n.deletions),"deletions"),p(h(t.splitCount,n.additions),"additions")),c.length===0)return c;c.sort((g,v)=>g[0]-v[0]);const b=[c[0]];for(const[g,v]of c.slice(1)){const _=b[b.length-1];g<=_[1]?_[1]=Math.max(_[1],v):b.push([g,v])}return b}function kN({hunkIndex:t,hunk:n,collapsedAfter:r,collapsedBefore:a,diffStyle:s,index:u,unifiedLineIndex:c,splitLineIndex:h,additionLineIndex:d,deletionLineIndex:p,additionLineNumber:b,deletionLineNumber:g,content:v,isLastContent:_,unifiedCount:x,splitCount:T}){const O=u<v.deletions?c+u:void 0,A=s==="unified"?u>=v.deletions?c+u:void 0:u<v.additions?c+v.deletions+u:void 0,C=s==="unified"?h+(u<v.deletions?u:u-v.deletions):h+u,k=u<v.deletions?p+u:void 0,I=u<v.deletions?g+u:void 0,M=s==="unified"?u>=v.deletions?d+(u-v.deletions):void 0:u<v.additions?d+u:void 0,U=s==="unified"?u>=v.deletions?b+(u-v.deletions):void 0:u<v.additions?b+u:void 0,H=s==="unified"?_&&u===v.deletions-1&&n.noEOFCRDeletions:_&&u===T-1&&n.noEOFCRDeletions,z=s==="unified"?_&&u===x-1&&n.noEOFCRAdditions:_&&u===T-1&&n.noEOFCRAdditions,Q=k!=null&&I!=null&&O!=null?{lineNumber:I,lineIndex:k,noEOFCR:H,unifiedLineIndex:O,splitLineIndex:C}:void 0,ee=M!=null&&U!=null&&A!=null?{unifiedLineIndex:A,splitLineIndex:C,lineIndex:M,lineNumber:U,noEOFCR:z}:void 0;if(Q==null&&ee!=null)return{type:"change",hunkIndex:t,hunk:n,collapsedAfter:r,collapsedBefore:a,deletionLine:void 0,additionLine:ee};if(Q!=null&&ee==null)return{type:"change",hunkIndex:t,hunk:n,collapsedAfter:r,collapsedBefore:a,deletionLine:Q,additionLine:void 0};if(Q==null||ee==null)throw new Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:t,hunk:n,collapsedAfter:r,collapsedBefore:a,deletionLine:Q,additionLine:ee}}const TN={forcePlainText:!1};function RN(t,n,r,{forcePlainText:a,startingLine:s,totalLines:u,expandedHunks:c,collapsedContextThreshold:h=qa}=TN){a?(s??=0,u??=1/0):(s=0,u=1/0);const d=s>0||u<1/0,p=(()=>{const C=r.theme??Fn;if(typeof C=="string")return n.getTheme(C).type})(),b=XL({theme:r.theme,highlighter:n}),g=a&&!d&&(t.unifiedLineCount>1e3||t.splitLineCount>1e3)?"none":r.lineDiffType,v={deletionLines:[],additionLines:[]},_=!a&&!t.isPartial,x=a?c:void 0,T=new Map;function O(C){const k=_?0:C,I=T.get(k)??NN();return T.set(k,I),I}function A(C,k,I,M){if(d){let U=I.at(-1);(U==null||U.targetIndex+U.count!==k)&&(U={targetIndex:k,originalOffset:M.length,count:0},I.push(U)),U.count++}M.push(C)}Eu({diff:t,diffStyle:"both",startingLine:s,totalLines:u,expandedHunks:d?x:!0,collapsedContextThreshold:h,callback:({hunkIndex:C,additionLine:k,deletionLine:I,type:M})=>{const U=O(C),H=k!=null?k.splitLineIndex:I.splitLineIndex;M==="change"&&k!=null&&I!=null&&LN({additionLine:t.additionLines[k.lineIndex],deletionLine:t.deletionLines[I.lineIndex],deletionLineIndex:U.deletionContent.length,additionLineIndex:U.additionContent.length,deletionDecorations:U.deletionDecorations,additionDecorations:U.additionDecorations,lineDiffType:g}),I!=null&&(A(t.deletionLines[I.lineIndex],I.lineIndex,U.deletionSegments,U.deletionContent),U.deletionInfo.push({type:M==="change"?"change-deletion":M,lineNumber:I.lineNumber,altLineNumber:M==="change"?void 0:k.lineNumber??void 0,lineIndex:`${I.unifiedLineIndex},${H}`})),k!=null&&(A(t.additionLines[k.lineIndex],k.lineIndex,U.additionSegments,U.additionContent),U.additionInfo.push({type:M==="change"?"change-addition":M,lineNumber:k.lineNumber,altLineNumber:M==="change"?void 0:I.lineNumber??void 0,lineIndex:`${k.unifiedLineIndex},${H}`}))}});for(const C of T.values()){if(C.deletionContent.length===0&&C.additionContent.length===0)continue;const k={name:t.prevName??t.name,contents:C.deletionContent.value},I={name:t.name,contents:C.additionContent.value},{deletionLines:M,additionLines:U}=MN({deletionFile:k,deletionInfo:C.deletionInfo,deletionDecorations:C.deletionDecorations,additionFile:I,additionInfo:C.additionInfo,additionDecorations:C.additionDecorations,highlighter:n,options:r,languageOverride:a?"text":t.lang});if(_){v.deletionLines=M,v.additionLines=U;continue}if(C.deletionSegments.length>0)for(const H of C.deletionSegments)for(let z=0;z<H.count;z++)v.deletionLines[H.targetIndex+z]=M[H.originalOffset+z];else v.deletionLines.push(...M);if(C.additionSegments.length>0)for(const H of C.additionSegments)for(let z=0;z<H.count;z++)v.additionLines[H.targetIndex+z]=U[H.originalOffset+z];else v.additionLines.push(...U)}return{code:v,themeStyles:b,baseThemeType:p}}function LN({deletionLine:t,additionLine:n,deletionLineIndex:r,additionLineIndex:a,deletionDecorations:s,additionDecorations:u,lineDiffType:c}){if(t==null||n==null||c==="none")return;t=Qa(t),n=Qa(n);const h=c==="char"?mN(t,n):bN(t,n),d=[],p=[],b=c==="word-alt",g=h.at(-1);for(const _ of h){const x=_===g;!_.added&&!_.removed?($s({item:_,arr:d,enableJoin:b,isNeutral:!0,isLastItem:x}),$s({item:_,arr:p,enableJoin:b,isNeutral:!0,isLastItem:x})):_.removed?$s({item:_,arr:d,enableJoin:b,isLastItem:x}):$s({item:_,arr:p,enableJoin:b,isLastItem:x})}let v=0;for(const _ of d)_[0]===1&&s.push(Ev({line:r,spanStart:v,spanLength:_[1].length})),v+=_[1].length;v=0;for(const _ of p)_[0]===1&&u.push(Ev({line:a,spanStart:v,spanLength:_[1].length})),v+=_[1].length}function NN(){return{deletionContent:{push(t){this.value+=t,this.length++},value:"",length:0},additionContent:{push(t){this.value+=t,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function MN({deletionFile:t,additionFile:n,deletionInfo:r,additionInfo:a,highlighter:s,deletionDecorations:u,additionDecorations:c,languageOverride:h,options:{theme:d=Fn,...p}}){const b=h??Su(t.name),g=h??Su(n.name),{state:v,transformers:_}=YL(),x=typeof d=="string"?{...p,lang:"text",theme:d,transformers:_,decorations:void 0,defaultColor:!1,cssVariablePrefix:qn("token")}:{...p,lang:"text",themes:d,transformers:_,decorations:void 0,defaultColor:!1,cssVariablePrefix:qn("token")};return{deletionLines:t.contents===""?[]:(x.lang=b,v.lineInfo=r,x.decorations=u,vv(s.codeToHast(Qa(t.contents),x))),additionLines:n.contents===""?[]:(x.lang=g,x.decorations=c,v.lineInfo=a,vv(s.codeToHast(Qa(n.contents),x)))}}let ON=-1;var DN=class{__id=`diff-hunks-renderer:${++ON}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang="text";renderCache;constructor(t={theme:Fn},n,r){this.options=t,this.onRenderUpdate=n,this.workerManager=r,r?.isWorkingPool()!==!0&&(this.highlighter=Ef(t.theme??Fn)?OL():void 0)}cleanUp(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager?.cleanUpPendingTasks(this),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.renderCache=void 0,this.workerManager?.cleanUpPendingTasks(this)}setOptions(t){this.options=t}mergeOptions(t){this.options={...this.options,...t}}setThemeType(t){this.getOptionsWithDefaults().themeType!==t&&this.mergeOptions({themeType:t})}expandHunk(t,n,r=this.getOptionsWithDefaults().expansionLineCount){const a={...this.expandedHunks.get(t)??{fromStart:0,fromEnd:0}};(n==="up"||n==="both")&&(a.fromStart+=r),(n==="down"||n==="both")&&(a.fromEnd+=r),this.renderCache?.highlighted!==!0&&(this.renderCache=void 0),this.expandedHunks.set(t,a)}getExpandedHunk(t){return this.expandedHunks.get(t)??vA}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(t){this.additionAnnotations={},this.deletionAnnotations={};for(const n of t){const r=(()=>{switch(n.side){case"deletions":return this.deletionAnnotations;case"additions":return this.additionAnnotations}})(),a=r[n.lineNumber]??[];r[n.lineNumber]=a,a.push(n)}}getUnifiedLineDecoration({lineType:t}){return{gutterLineType:t}}getSplitLineDecoration({side:t,type:n}){return n!=="change"?{gutterLineType:n}:{gutterLineType:t==="deletions"?"change-deletion":"change-addition"}}createAnnotationElement(t){return IL(t)}getOptionsWithDefaults(){const{diffIndicators:t="bars",diffStyle:n="split",disableBackground:r=!1,disableFileHeader:a=!1,disableLineNumbers:s=!1,disableVirtualizationBuffers:u=!1,collapsed:c=!1,expandUnchanged:h=!1,collapsedContextThreshold:d=qa,expansionLineCount:p=100,hunkSeparators:b="line-info",lineDiffType:g="word-alt",maxLineDiffLength:v=1e3,overflow:_="scroll",theme:x=Fn,themeType:T="system",tokenizeMaxLineLength:O=1e3,useCSSClasses:A=!1}=this.options;return{diffIndicators:t,diffStyle:n,disableBackground:r,disableFileHeader:a,disableLineNumbers:s,disableVirtualizationBuffers:u,collapsed:c,expandUnchanged:h,collapsedContextThreshold:d,expansionLineCount:p,hunkSeparators:b,lineDiffType:g,maxLineDiffLength:v,overflow:_,theme:this.workerManager?.getDiffRenderOptions().theme??x,themeType:T,tokenizeMaxLineLength:O,useCSSClasses:A}}async initializeHighlighter(){return this.highlighter=await ML(VL(this.computedLang,this.options)),this.highlighter}hydrate(t){if(t==null)return;this.diff=t;const{options:n}=this.getRenderOptions(t);let r=this.workerManager?.getDiffResultCache(t);r!=null&&!kf(n,r.options)&&(r=void 0),this.renderCache??={diff:t,highlighted:!0,options:n,result:r?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0&&this.renderCache.result==null?this.workerManager.highlightDiffAST(this,this.diff):this.asyncHighlight(t).then(({result:a,options:s})=>{this.onHighlightSuccess(t,a,s)})}getRenderOptions(t){const n=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();const{theme:a,tokenizeMaxLineLength:s,lineDiffType:u}=this.getOptionsWithDefaults();return{theme:a,tokenizeMaxLineLength:s,lineDiffType:u}})();this.getOptionsWithDefaults();const{renderCache:r}=this;return r?.result==null?{options:n,forceRender:!0}:t!==r.diff||!kf(n,r.options)?{options:n,forceRender:!0}:{options:n,forceRender:!1}}renderDiff(t=this.renderCache?.diff,n=y0){if(t==null)return;const{expandUnchanged:r=!1,collapsedContextThreshold:a}=this.getOptionsWithDefaults(),s=this.workerManager?.getDiffResultCache(t);s!=null&&this.renderCache==null&&(this.renderCache={diff:t,highlighted:!0,renderRange:void 0,...s});const{options:u,forceRender:c}=this.getRenderOptions(t);if(this.renderCache??={diff:t,highlighted:!1,options:u,result:void 0,renderRange:void 0},this.workerManager?.isWorkingPool()===!0)(this.renderCache.result==null||!this.renderCache.highlighted&&!P1(this.renderCache.renderRange,n))&&(this.renderCache.result=this.workerManager.getPlainDiffAST(t,n.startingLine,n.totalLines,dN(n)||r?!0:this.expandedHunks,a),this.renderCache.renderRange=n),n.totalLines>0&&(!this.renderCache.highlighted||c)&&this.workerManager.highlightDiffAST(this,t);else{this.computedLang=t.lang??Su(t.name);const h=this.highlighter!=null&&Ef(u.theme),d=this.highlighter!=null&&O0(this.computedLang);if(this.highlighter!=null&&h&&(c||!this.renderCache.highlighted&&d||this.renderCache.result==null)){const{result:p,options:b}=this.renderDiffWithHighlighter(t,this.highlighter,!d);this.renderCache={diff:t,options:b,highlighted:d,result:p,renderRange:void 0}}(!h||!d)&&this.asyncHighlight(t).then(({result:p,options:b})=>{this.onHighlightSuccess(t,p,b)})}return this.renderCache.result!=null?this.processDiffResult(this.renderCache.diff,n,this.renderCache.result):void 0}async asyncRender(t,n=y0){const{result:r}=await this.asyncHighlight(t);return this.processDiffResult(t,n,r)}createPreElement(t,n,r,a,s){const{diffIndicators:u,disableBackground:c,disableLineNumbers:h,overflow:d,themeType:p}=this.getOptionsWithDefaults();return HL({type:"diff",diffIndicators:u,disableBackground:c,disableLineNumbers:h,overflow:d,themeStyles:r,split:t,themeType:a??p,totalLines:n,customProperties:s})}async asyncHighlight(t){this.computedLang=t.lang??Su(t.name);const n=this.highlighter!=null&&Ef(this.options.theme??Fn),r=this.highlighter!=null&&O0(this.computedLang);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(t,this.highlighter)}renderDiffWithHighlighter(t,n,r=!1){const{options:a}=this.getRenderOptions(t),{collapsedContextThreshold:s}=this.getOptionsWithDefaults();return{result:RN(t,n,a,{forcePlainText:r,expandedHunks:r?!0:void 0,collapsedContextThreshold:s}),options:a}}onHighlightSuccess(t,n,r){if(this.renderCache==null)return;const a=this.renderCache.diff!==t||!this.renderCache.highlighted||!kf(this.renderCache.options,r);this.renderCache={diff:t,options:r,highlighted:!0,result:n,renderRange:void 0},a&&this.onRenderUpdate?.()}onHighlightError(t){console.error(t)}processDiffResult(t,n,{code:r,themeStyles:a,baseThemeType:s}){const{diffStyle:u,disableFileHeader:c,expandUnchanged:h,expansionLineCount:d,collapsedContextThreshold:p,hunkSeparators:b}=this.getOptionsWithDefaults();this.diff=t;const g=u==="unified";let v=[],_=[],x=[];const T=[],{additionLines:O,deletionLines:A}=r,C={rowCount:0,hunkSeparators:b,additionsContentAST:v,deletionsContentAST:_,unifiedContentAST:x,unifiedGutterAST:Ds(),deletionsGutterAST:Ds(),additionsGutterAST:Ds(),expansionLineCount:d,hunkData:T,incrementRowCount(K=1){C.rowCount+=K},pushToGutter(K,oe){switch(K){case"unified":C.unifiedGutterAST.children.push(oe);break;case"deletions":C.deletionsGutterAST.children.push(oe);break;case"additions":C.additionsGutterAST.children.push(oe);break}}},k=PN(t),I={size:0,side:void 0,increment(){this.size+=1},flush(){if(u!=="unified"){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side==="additions"?(C.pushToGutter("additions",$n(void 0,"buffer",this.size)),v?.push(Vs(this.size))):(C.pushToGutter("deletions",$n(void 0,"buffer",this.size)),_?.push(Vs(this.size))),this.size=0,this.side=void 0}}},M=(K,oe,te,N,P)=>{C.pushToGutter(K,xA(oe,te,N,P))};function U(K){I.flush(),u==="unified"?Tf("unified",K,C):(Tf("deletions",K,C),Tf("additions",K,C))}Eu({diff:t,diffStyle:u,startingLine:n.startingLine,totalLines:n.totalLines,expandedHunks:h?!0:this.expandedHunks,collapsedContextThreshold:p,callback:({hunkIndex:K,hunk:oe,collapsedBefore:te,collapsedAfter:N,additionLine:P,deletionLine:X,type:he})=>{const Z=X!=null?X.splitLineIndex:P.splitLineIndex,L=P!=null?P.unifiedLineIndex:X.unifiedLineIndex;u==="split"&&he!=="change"&&I.flush(),te>0&&U({hunkIndex:K,collapsedLines:te,rangeSize:Math.max(oe?.collapsedBefore??0,0),hunkSpecs:oe?.hunkSpecs,isFirstHunk:K===0,isLastHunk:!1,isExpandable:!t.isPartial});const Y=u==="unified"?L:Z,W={type:he,hunkIndex:K,lineIndex:Y,unifiedLineIndex:L,splitLineIndex:Z,deletionLine:X,additionLine:P};if(u==="unified"){let ce=X!=null?A[X.lineIndex]:void 0,me=P!=null?O[P.lineIndex]:void 0;if(ce==null&&me==null){const ve="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(ve,{file:t.name}),new Error(ve)}const ge=he==="change"?P!=null?"change-addition":"change-deletion":he,pe=this.getUnifiedLineDecoration({type:he,lineType:ge,additionLineIndex:P?.lineIndex,deletionLineIndex:X?.lineIndex});M("unified",pe.gutterLineType,P!=null?P.lineNumber:X.lineNumber,`${L},${Z}`,pe.gutterProperties),me!=null?me=qs(me,pe.contentProperties):ce!=null&&(ce=qs(ce,pe.contentProperties)),Av({diffStyle:"unified",type:he,deletionLine:ce,additionLine:me,unifiedSpan:this.getAnnotations("unified",X?.lineNumber,P?.lineNumber,K,Y),createAnnotationElement:ve=>this.createAnnotationElement(ve),context:C});const ne=this.getUnifiedInlineRowsForLine?.(W);ne!=null&&IN(ne,C)}else{let ce=X!=null?A[X.lineIndex]:void 0,me=P!=null?O[P.lineIndex]:void 0;const ge=this.getSplitLineDecoration({side:"deletions",type:he,lineIndex:X?.lineIndex}),pe=this.getSplitLineDecoration({side:"additions",type:he,lineIndex:P?.lineIndex});if(ce==null&&me==null){const Ee="DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong";throw console.error(Ee,{file:t.name}),new Error(Ee)}const ne=(()=>{if(he==="change"){if(me==null)return"additions";if(ce==null)return"deletions"}})();if(ne!=null){if(I.side!=null&&I.side!==ne)throw new Error("DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits");I.side=ne,I.increment()}const ve=this.getAnnotations("split",X?.lineNumber,P?.lineNumber,K,Y);if(ve!=null&&I.size>0&&I.flush(),X!=null){const Ee=qs(ce,ge.contentProperties);M("deletions",ge.gutterLineType,X.lineNumber,`${X.unifiedLineIndex},${Z}`,ge.gutterProperties),Ee!=null&&(ce=Ee)}if(P!=null){const Ee=qs(me,pe.contentProperties);M("additions",pe.gutterLineType,P.lineNumber,`${P.unifiedLineIndex},${Z}`,pe.gutterProperties),Ee!=null&&(me=Ee)}Av({diffStyle:"split",type:he,additionLine:me,deletionLine:ce,...ve,createAnnotationElement:Ee=>this.createAnnotationElement(Ee),context:C});const Ae=this.getSplitInlineRowsForLine?.(W);Ae!=null&&zN(Ae,C,I)}const re=X?.noEOFCR??!1,le=P?.noEOFCR??!1;if(le||re){if(re){const ce=he==="context"||he==="context-expanded"?he:"change-deletion";u==="unified"?(C.unifiedContentAST.push(Gs(ce)),C.pushToGutter("unified",$n(ce,"metadata",1))):(C.deletionsContentAST.push(Gs(ce)),C.pushToGutter("deletions",$n(ce,"metadata",1)),le||(C.pushToGutter("additions",$n(void 0,"buffer",1)),C.additionsContentAST.push(Vs(1))))}if(le){const ce=he==="context"||he==="context-expanded"?he:"change-addition";u==="unified"?(C.unifiedContentAST.push(Gs(ce)),C.pushToGutter("unified",$n(ce,"metadata",1))):(C.additionsContentAST.push(Gs(ce)),C.pushToGutter("additions",$n(ce,"metadata",1)),re||(C.pushToGutter("deletions",$n(void 0,"buffer",1)),C.deletionsContentAST.push(Vs(1))))}C.incrementRowCount(1)}N>0&&b!=="simple"&&U({hunkIndex:he==="context-expanded"?K:K+1,collapsedLines:N,rangeSize:k,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!t.isPartial}),C.incrementRowCount(1)}}),u==="split"&&I.flush();const H=Math.max(cN(t.hunks),t.additionLines.length??0,t.deletionLines.length??0),z=n.bufferBefore>0||n.bufferAfter>0,Q=!g&&t.type!=="deleted",ee=!g&&t.type!=="new",ie=C.rowCount>0||z;v=Q&&ie?v:void 0,_=ee&&ie?_:void 0,x=g&&ie?x:void 0;const V=this.createPreElement(_!=null&&v!=null,H,a,s);return{unifiedGutterAST:g&&ie?C.unifiedGutterAST.children:void 0,unifiedContentAST:x,deletionsGutterAST:ee&&ie?C.deletionsGutterAST.children:void 0,deletionsContentAST:_,additionsGutterAST:Q&&ie?C.additionsGutterAST.children:void 0,additionsContentAST:v,hunkData:T,preNode:V,themeStyles:a,baseThemeType:s,headerElement:c?void 0:this.renderHeader(this.diff,a,s),totalLines:H,rowCount:C.rowCount,bufferBefore:n.bufferBefore,bufferAfter:n.bufferAfter,css:""}}renderCodeAST(t,n){const r=t==="unified"?n.unifiedGutterAST:t==="deletions"?n.deletionsGutterAST:n.additionsGutterAST,a=t==="unified"?n.unifiedContentAST:t==="deletions"?n.deletionsContentAST:n.additionsContentAST;if(r==null||a==null)return;const s=Ds(r);return s.properties.style=`grid-row: span ${n.rowCount}`,[s,WL(a,n.rowCount)]}renderFullAST(t,n=[]){const r=this.getOptionsWithDefaults().hunkSeparators==="line-info",a=this.renderCodeAST("unified",t);if(a!=null)return n.push(Ve({tagName:"code",children:a,properties:{"data-code":"","data-container-size":r?"":void 0,"data-unified":""}})),{...t.preNode,children:n};const s=this.renderCodeAST("deletions",t);s!=null&&n.push(Ve({tagName:"code",children:s,properties:{"data-code":"","data-container-size":r?"":void 0,"data-deletions":""}}));const u=this.renderCodeAST("additions",t);return u!=null&&n.push(Ve({tagName:"code",children:u,properties:{"data-code":"","data-container-size":r?"":void 0,"data-additions":""}})),{...t.preNode,children:n}}renderFullHTML(t,n=[]){return Xa(this.renderFullAST(t,n))}renderPartialHTML(t,n){return n==null?Xa(t):Xa(Ve({tagName:"code",children:t,properties:{"data-code":"","data-container-size":this.getOptionsWithDefaults().hunkSeparators==="line-info"?"":void 0,[`data-${n}`]:""}}))}getAnnotations(t,n,r,a,s){const u={type:"annotation",hunkIndex:a,lineIndex:s,annotations:[]};if(n!=null)for(const h of this.deletionAnnotations[n]??[])u.annotations.push(fl(h));const c={type:"annotation",hunkIndex:a,lineIndex:s,annotations:[]};if(r!=null)for(const h of this.additionAnnotations[r]??[])(t==="unified"?u:c).annotations.push(fl(h));if(t==="unified")return u.annotations.length>0?u:void 0;if(!(c.annotations.length===0&&u.annotations.length===0))return{deletionSpan:u,additionSpan:c}}renderHeader(t,n,r){const{themeType:a}=this.getOptionsWithDefaults();return PL({fileOrDiff:t,themeStyles:n,themeType:r??a})}};function kf(t,n){return j1(t.theme,n.theme)&&t.tokenizeMaxLineLength===n.tokenizeMaxLineLength&&t.lineDiffType===n.lineDiffType}function Cv(t){return`${t} unmodified line${t>1?"s":""}`}function IN(t,n){for(const r of t)n.unifiedContentAST.push(r.content),n.pushToGutter("unified",r.gutter),n.incrementRowCount(1)}function zN(t,n,r){for(const{deletion:a,addition:s}of t){if(a==null&&s==null)continue;const u=a!=null&&s!=null?void 0:a==null?"deletions":"additions";(u==null||r.side!==u)&&r.flush(),a!=null&&(n.deletionsContentAST.push(a.content),n.pushToGutter("deletions",a.gutter)),s!=null&&(n.additionsContentAST.push(s.content),n.pushToGutter("additions",s.gutter)),u!=null&&(r.side=u,r.increment()),n.incrementRowCount(1)}}function Av({diffStyle:t,type:n,deletionLine:r,additionLine:a,unifiedSpan:s,deletionSpan:u,additionSpan:c,createAnnotationElement:h,context:d}){let p=!1;if(t==="unified"){if(a!=null?d.unifiedContentAST.push(a):r!=null&&d.unifiedContentAST.push(r),s!=null){const b=n==="change"?r!=null?"change-deletion":"change-addition":n;d.unifiedContentAST.push(h(s)),d.pushToGutter("unified",$n(b,"annotation",1)),p=!0}}else if(t==="split"){if(r!=null&&d.deletionsContentAST.push(r),a!=null&&d.additionsContentAST.push(a),u!=null){const b=n==="change"?r!=null?"change-deletion":"context":n;d.deletionsContentAST.push(h(u)),d.pushToGutter("deletions",$n(b,"annotation",1)),p=!0}if(c!=null){const b=n==="change"?a!=null?"change-addition":"context":n;d.additionsContentAST.push(h(c)),d.pushToGutter("additions",$n(b,"annotation",1)),p=!0}}p&&d.incrementRowCount(1)}function Tf(t,{hunkIndex:n,collapsedLines:r,rangeSize:a,hunkSpecs:s,isFirstHunk:u,isLastHunk:c,isExpandable:h},d){if(r<=0)return;const p=t==="unified"?d.unifiedContentAST:t==="deletions"?d.deletionsContentAST:d.additionsContentAST;if(d.hunkSeparators==="metadata"){s!=null&&(d.pushToGutter(t,Pa({type:"metadata",content:s,isFirstHunk:u,isLastHunk:c})),p.push(Pa({type:"metadata",content:s,isFirstHunk:u,isLastHunk:c})),t!=="additions"&&d.incrementRowCount(1));return}if(d.hunkSeparators==="simple"){n>0&&(d.pushToGutter(t,Pa({type:"simple",isFirstHunk:u,isLastHunk:!1})),p.push(Pa({type:"simple",isFirstHunk:u,isLastHunk:!1})),t!=="additions"&&d.incrementRowCount(1));return}const b=uN(t,n),g=a>d.expansionLineCount,v=h?n:void 0;d.pushToGutter(t,Pa({type:d.hunkSeparators,content:Cv(r),expandIndex:v,chunked:g,slotName:b,isFirstHunk:u,isLastHunk:c})),p.push(Pa({type:d.hunkSeparators,content:Cv(r),expandIndex:v,chunked:g,slotName:b,isFirstHunk:u,isLastHunk:c})),t!=="additions"&&d.incrementRowCount(1),d.hunkData.push({slotName:b,hunkIndex:n,lines:r,type:t,expandable:h?{up:!u,down:!c,chunked:g}:void 0})}function qs(t,n){return t==null||t.type!=="element"||n==null?t:{...t,properties:{...t.properties,...n}}}function PN(t){const n=t.hunks.at(-1);if(n==null||t.isPartial||t.additionLines.length===0||t.deletionLines.length===0)return 0;const r=t.additionLines.length-(n.additionLineIndex+n.additionCount),a=t.deletionLines.length-(n.deletionLineIndex+n.deletionCount);if(r!==a)throw new Error(`DiffHunksRenderer.processDiffResult: trailing context mismatch (additions=${r}, deletions=${a}) for ${t.name}`);return Math.min(r,a)}function jN(t,n){return t.lineNumber===n.lineNumber&&t.side===n.side&&t.metadata===n.metadata}function UN(t,n){return t.slotName===n.slotName&&t.hunkIndex===n.hunkIndex&&t.lines===n.lines&&t.type===n.type&&t.expandable?.chunked===n.expandable?.chunked&&t.expandable?.up===n.expandable?.up&&t.expandable?.down===n.expandable?.down}function HN(t){const n=t[0];if(n!=="+"&&n!=="-"&&n!==" "&&n!=="\\"){console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${t}"`);return}const r=t.substring(1);return{line:r===""?`
|
|
1932
|
+
`:r,type:n===" "?"context":n==="\\"?"metadata":n==="+"?"addition":"deletion"}}function BN(t,n,r=!1){const a=Ks.test(t),s=t.split(a?Ks:v0);let u;const c=[];for(const h of s){if(a&&!Ks.test(h)){if(u==null)u=h;else{if(r)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",h)}continue}else if(!a&&!v0.test(h)){if(u==null)u=h;else{if(r)throw Error("parsePatchContent: unknown file blob");console.error("parsePatchContent: unknown file blob:",h)}continue}const d=H1(h,{cacheKey:n!=null?`${n}-${c.length}`:void 0,isGitDiff:a,throwOnError:r});d!=null&&c.push(d)}return{patchMetadata:u,files:c}}function H1(t,{cacheKey:n,isGitDiff:r=Ks.test(t),oldFile:a,newFile:s,throwOnError:u=!1}={}){let c=0;const h=t.split(dA);let d;const p=a==null||s==null;let b=0,g=0;for(const v of h){const _=v.split(af),x=_.shift();if(x==null){if(u)throw Error("parsePatchContent: invalid hunk");console.error("parsePatchContent: invalid hunk",v);continue}const T=x.match(fA);let O=0,A=0;if(T==null||d==null){if(d!=null){if(u)throw Error("parsePatchContent: Invalid hunk");console.error("parsePatchContent: Invalid hunk",v);continue}d={name:"",type:"change",hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:p,additionLines:!p&&a!=null&&s!=null?s.contents.split(af):[],deletionLines:!p&&a!=null&&s!=null?a.contents.split(af):[],cacheKey:n},d.additionLines.length===1&&s?.contents===""&&(d.additionLines.length=0),d.deletionLines.length===1&&a?.contents===""&&(d.deletionLines.length=0),_.unshift(x);for(const H of _){const z=H.match(r?mA:hA);if(H.startsWith("diff --git")){const[,,Q,,ee]=H.trim().match(pA)??[];d.name=ee.trim(),Q!==ee&&(d.prevName=Q.trim())}else if(z!=null){const[,Q,ee]=z;Q==="---"&&ee!=="/dev/null"?(d.prevName=ee.trim(),d.name=ee.trim()):Q==="+++"&&ee!=="/dev/null"&&(d.name=ee.trim())}else if(r){if(H.startsWith("new mode ")&&(d.mode=H.replace("new mode","").trim()),H.startsWith("old mode ")&&(d.prevMode=H.replace("old mode","").trim()),H.startsWith("new file mode")&&(d.type="new",d.mode=H.replace("new file mode","").trim()),H.startsWith("deleted file mode")&&(d.type="deleted",d.mode=H.replace("deleted file mode","").trim()),H.startsWith("similarity index")&&(H.startsWith("similarity index 100%")?d.type="rename-pure":d.type="rename-changed"),H.startsWith("index ")){const[,Q,ee,ie]=H.trim().match(gA)??[];Q!=null&&(d.prevObjectId=Q),ee!=null&&(d.newObjectId=ee),ie!=null&&(d.mode=ie)}H.startsWith("rename from ")&&(d.prevName=H.replace("rename from ","")),H.startsWith("rename to ")&&(d.name=H.replace("rename to ","").trim())}}continue}let C,k;for(;_.length>0&&(_[_.length-1]===`
|
|
1933
|
+
`||_[_.length-1]==="\r"||_[_.length-1]===`\r
|
|
1934
|
+
`||_[_.length-1]==="");)_.pop();const I=parseInt(T[3]),M=parseInt(T[1]);b=p?b:M-1,g=p?g:I-1;const U={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:parseInt(T[4]??"1"),additionStart:I,additionLines:O,deletionCount:parseInt(T[2]??"1"),deletionStart:M,deletionLines:A,deletionLineIndex:b,additionLineIndex:g,hunkContent:[],hunkContext:T[5],hunkSpecs:x,noEOFCRAdditions:!1,noEOFCRDeletions:!1};if(isNaN(U.additionCount)||isNaN(U.deletionCount)||isNaN(U.additionStart)||isNaN(U.deletionStart)){if(u)throw Error("parsePatchContent: invalid hunk metadata");console.error("parsePatchContent: invalid hunk metadata",U);continue}for(const H of _){const z=HN(H);if(z==null){console.error("processFile: invalid rawLine:",H);continue}const{type:Q,line:ee}=z;if(Q==="addition")(C==null||C.type!=="change")&&(C=Rf("change",b,g),U.hunkContent.push(C)),g++,p&&d.additionLines.push(ee),C.additions++,O++,k="addition";else if(Q==="deletion")(C==null||C.type!=="change")&&(C=Rf("change",b,g),U.hunkContent.push(C)),b++,p&&d.deletionLines.push(ee),C.deletions++,A++,k="deletion";else if(Q==="context")(C==null||C.type!=="context")&&(C=Rf("context",b,g),U.hunkContent.push(C)),g++,b++,p&&(d.deletionLines.push(ee),d.additionLines.push(ee)),C.lines++,k="context";else if(Q==="metadata"&&C!=null){if(C.type==="context"?(U.noEOFCRAdditions=!0,U.noEOFCRDeletions=!0):k==="deletion"?U.noEOFCRDeletions=!0:k==="addition"&&(U.noEOFCRAdditions=!0),p&&(k==="addition"||k==="context")){const ie=d.additionLines.length-1;ie>=0&&(d.additionLines[ie]=Qa(d.additionLines[ie]))}if(p&&(k==="deletion"||k==="context")){const ie=d.deletionLines.length-1;ie>=0&&(d.deletionLines[ie]=Qa(d.deletionLines[ie]))}}}U.additionLines=O,U.deletionLines=A,U.collapsedBefore=Math.max(U.additionStart-1-c,0),d.hunks.push(U),c=U.additionStart+U.additionCount-1;for(const H of U.hunkContent)H.type==="context"?(U.splitLineCount+=H.lines,U.unifiedLineCount+=H.lines):(U.splitLineCount+=Math.max(H.additions,H.deletions),U.unifiedLineCount+=H.deletions+H.additions);U.splitLineStart=d.splitLineCount+U.collapsedBefore,U.unifiedLineStart=d.unifiedLineCount+U.collapsedBefore,d.splitLineCount+=U.collapsedBefore+U.splitLineCount,d.unifiedLineCount+=U.collapsedBefore+U.unifiedLineCount}if(d!=null){if(d.hunks.length>0&&!p&&d.additionLines.length>0&&d.deletionLines.length>0){const v=d.hunks[d.hunks.length-1],_=v.additionStart+v.additionCount-1,x=d.additionLines.length,T=Math.max(x-_,0);d.splitLineCount+=T,d.unifiedLineCount+=T}return r||(d.prevName!=null&&d.name!==d.prevName?d.hunks.length>0?d.type="rename-changed":d.type="rename-pure":s!=null&&s.contents===""?d.type="deleted":a!=null&&a.contents===""&&(d.type="new")),d.type!=="rename-pure"&&d.type!=="rename-changed"&&(d.prevName=void 0),d}}function VN(t,n,r=!1){const a=[];for(const s of t.split(cA))try{a.push(BN(s,n!=null?`${n}-${a.length}`:void 0,r))}catch(u){if(r)throw u;console.error(u)}return a}function Rf(t,n,r){return t==="change"?{type:"change",additions:0,deletions:0,additionLineIndex:r,deletionLineIndex:n}:{type:"context",lines:0,additionLineIndex:r,deletionLineIndex:n}}function ch(t,n,r,a=!1){const s=H1(EN(t.name,n.name,t.contents,n.contents,t.header,n.header),{cacheKey:(()=>{if(t.cacheKey!=null&&n.cacheKey!=null)return`${t.cacheKey}:${n.cacheKey}`})(),oldFile:t,newFile:n,throwOnError:a});if(s==null)throw new Error("parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?");return s}let GN=-1;var B1=class{static LoadedCustomComponent=lN;__id=`file-diff:${++GN}`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;unsafeCSSStyle;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;lastRowCount;enabled=!0;constructor(n={theme:Fn},r,a=!1){this.options=n,this.workerManager=r,this.isContainerManaged=a,this.hunksRenderer=this.createHunksRenderer(n),this.resizeManager=new $2,this.scrollSyncManager=new sN,this.interactionManager=new U2("diff",R0(n,typeof n.hunkSeparators=="function"||(n.hunkSeparators??"line-info")==="line-info"||n.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(n){return{...n,hunkSeparators:typeof n.hunkSeparators=="function"?"custom":n.hunkSeparators}}createHunksRenderer(n){return new DN(this.getHunksRendererOptions(n),this.handleHighlightRender,this.workerManager)}getLineIndex=(n,r="additions")=>{if(this.fileDiff==null)return;const a=this.fileDiff.hunks.at(-1);let s,u;e:for(const c of this.fileDiff.hunks){let h=r==="deletions"?c.deletionStart:c.additionStart;const d=r==="deletions"?c.deletionCount:c.additionCount;let p=c.splitLineStart,b=c.unifiedLineStart;if(n<h){const g=h-n;s=Math.max(b-g,0),u=Math.max(p-g,0);break e}if(n>=h+d){if(c===a){const g=n-(h+d);s=b+c.unifiedLineCount+g,u=p+c.splitLineCount+g;break e}continue}for(const g of c.hunkContent)if(g.type==="context")if(n<h+g.lines){const v=n-h;u=p+v,s=b+v;break e}else h+=g.lines,p+=g.lines,b+=g.lines;else{const v=r==="deletions"?g.deletions:g.additions;if(n<h+v){const _=n-h;s=b+(r==="additions"?g.deletions:0)+_,u=p+_;break e}else h+=v,p+=Math.max(g.deletions,g.additions),b+=g.deletions+g.additions}break e}if(!(s==null||u==null))return[s,u]};setOptions(n){n!=null&&(this.options=n,this.hunksRenderer.setOptions(this.getHunksRendererOptions(n)),this.interactionManager.setOptions(R0(n,typeof n.hunkSeparators=="function"||(n.hunkSeparators??"line-info")==="line-info"||n.hunkSeparators==="line-info-basic"?this.handleExpandHunk:void 0,this.getLineIndex)))}mergeOptions(n){this.options={...this.options,...n}}setThemeType(n){if((this.options.themeType??"system")!==n&&(this.mergeOptions({themeType:n}),this.hunksRenderer.setThemeType(n),this.headerElement!=null&&(n==="system"?delete this.headerElement.dataset.themeType:this.headerElement.dataset.themeType=n),this.pre!=null))switch(n){case"system":delete this.pre.dataset.themeType;break;case"light":case"dark":this.pre.dataset.themeType=n;break}}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(n){this.lineAnnotations=n}canPartiallyRender(n,r,a){return!(n||r||a||typeof this.options.hunkSeparators=="function")}setSelectedLines(n){this.interactionManager.setSelection(n)}cleanUp(n=!1){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer?.shadowRoot!=null&&(this.fileContainer.shadowRoot.innerHTML=""),this.fileContainer=void 0,this.pre!=null&&(this.pre.innerHTML="",this.pre=void 0),this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.lastRenderedHeaderHTML=void 0,this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,n?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(n){const{overflow:r="scroll",diffStyle:a="split"}=this.options,{fileContainer:s,prerenderedHTML:u}=n;aN(s,u);for(const c of s.shadowRoot?.children??[]){if(c instanceof SVGElement){this.spriteSVG=c;continue}if(c instanceof HTMLElement){if(c instanceof HTMLPreElement){this.pre=c;for(const h of c.children)!(h instanceof HTMLElement)||h.tagName.toLowerCase()!=="code"||("deletions"in h.dataset&&(this.codeDeletions=h),"additions"in h.dataset&&(this.codeAdditions=h),"unified"in h.dataset&&(this.codeUnified=h));continue}if("diffsHeader"in c.dataset){this.headerElement=c;continue}if(c instanceof HTMLStyleElement&&c.hasAttribute(xy)){this.unsafeCSSStyle=c;continue}}}if(this.pre!=null&&this.syncCodeNodesFromPre(this.pre),this.pre==null)this.render(n);else{const{lineAnnotations:c,oldFile:h,newFile:d,fileDiff:p}=n;this.fileContainer=s,delete this.pre.dataset.dehydrated,this.lineAnnotations=c??this.lineAnnotations,this.additionFile=d,this.deletionFile=h,this.fileDiff=p??(h!=null&&d!=null?ch(h,d):void 0),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,r==="wrap"),r==="scroll"&&a==="split"&&this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions)}}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}handleExpandHunk=(n,r,a)=>{this.expandHunk(n,r,a)};expandHunk=(n,r,a)=>{this.hunksRenderer.expandHunk(n,r,a),this.rerender()};render({oldFile:n,newFile:r,fileDiff:a,forceRender:s=!1,lineAnnotations:u,fileContainer:c,containerWrapper:h,renderRange:d}){if(!this.enabled)throw new Error("FileDiff.render: attempting to call render after cleaned up");const{collapsed:p=!1}=this.options,b=p?void 0:d,g=n!=null&&r!=null&&(!yv(n,this.deletionFile)||!yv(r,this.additionFile));let v=a!=null&&a!==this.fileDiff;const _=u!=null&&(u.length>0||this.lineAnnotations.length>0)?u!==this.lineAnnotations:!1;if(!p&&P1(b,this.renderRange)&&!s&&!_&&(a!=null&&a===this.fileDiff||a==null&&!g))return!1;const{renderRange:x}=this;if(this.renderRange=b,this.deletionFile=n,this.additionFile=r,a!=null?this.fileDiff=a:n!=null&&r!=null&&g&&(v=!0,this.fileDiff=ch(n,r)),u!=null&&this.setLineAnnotations(u),this.fileDiff==null)return!1;this.hunksRenderer.setOptions({...this.options,hunkSeparators:typeof this.options.hunkSeparators=="function"?"custom":this.options.hunkSeparators}),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);const{diffStyle:T="split",disableErrorHandling:O=!1,disableFileHeader:A=!1,overflow:C="scroll"}=this.options;if(A&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.headerPrefix!=null&&(this.headerPrefix.remove(),this.headerPrefix=void 0),this.headerMetadata!=null&&(this.headerMetadata.remove(),this.headerMetadata=void 0)),c=this.getOrCreateFileContainer(c,h),p){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{const k=this.hunksRenderer.renderDiff(this.fileDiff,yA);k?.headerElement!=null&&this.applyHeaderToDOM(k.headerElement,c),this.renderSeparators([]),this.injectUnsafeCSS()}catch(k){if(O)throw k;console.error(k),k instanceof Error&&this.applyErrorToDOM(k,c)}return!0}try{const k=this.getOrCreatePreNode(c);if(!(this.canPartiallyRender(s,_,g||v)&&this.applyPartialRender({previousRenderRange:x,renderRange:b}))){const I=this.hunksRenderer.renderDiff(this.fileDiff,b);if(I==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;I.headerElement!=null&&this.applyHeaderToDOM(I.headerElement,c),I.additionsContentAST!=null||I.deletionsContentAST!=null||I.unifiedContentAST!=null?this.applyHunksToDOM(k,I):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(I.hunkData)}this.applyBuffers(k,b),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.interactionManager.setup(k),this.resizeManager.setup(k,C==="wrap"),C==="scroll"&&T==="split"?this.scrollSyncManager.setup(k,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp()}catch(k){if(O)throw k;console.error(k),k instanceof Error&&this.applyErrorToDOM(k,c)}return!0}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(const{element:n}of this.separatorCache.values())n.remove();this.separatorCache.clear();for(const{element:n}of this.annotationCache.values())n.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(n){if(this.fileContainer==null)return!1;if(this.cleanChildNodes(),this.placeHolder==null){const r=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",r.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${n}px`),!0}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.gutterUtilityContent?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.gutterUtilityContent=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.pre=void 0,this.spriteSVG=void 0,this.unsafeCSSStyle=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0}renderSeparators(n){const{hunkSeparators:r}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof r!="function"){for(const{element:s}of this.separatorCache.values())s.remove();this.separatorCache.clear();return}const a=new Map(this.separatorCache);for(const s of n){const u=s.slotName;let c=this.separatorCache.get(u);if(c==null||!UN(s,c.hunkData)){c?.element.remove();const h=document.createElement("div");h.style.display="contents",h.slot=s.slotName;const d=r(s,this);d!=null&&h.appendChild(d),this.fileContainer.appendChild(h),c={element:h,hunkData:s},this.separatorCache.set(u,c)}a.delete(u)}for(const[s,{element:u}]of a.entries())this.separatorCache.delete(s),u.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(const{element:a}of this.annotationCache.values())a.remove();this.annotationCache.clear();return}const n=new Map(this.annotationCache),{renderAnnotation:r}=this.options;if(r!=null&&this.lineAnnotations.length>0)for(const[a,s]of this.lineAnnotations.entries()){const u=`${a}-${fl(s)}`;let c=this.annotationCache.get(u);if(c==null||!jN(s,c.annotation)){c?.element.remove();const h=r(s);if(h==null)continue;c={element:JL(fl(s)),annotation:s},c.element.appendChild(h),this.fileContainer.appendChild(c.element),this.annotationCache.set(u,c)}n.delete(u)}for(const[a,{element:s}]of n.entries())this.annotationCache.delete(a),s.remove()}renderGutterUtility(){const n=this.options.renderGutterUtility??this.options.renderHoverUtility;if(this.fileContainer==null||n==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const r=n(this.interactionManager.getHoveredLine);if(r!=null&&this.gutterUtilityContent!=null)return;if(r==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}const a=eN();a.appendChild(r),this.fileContainer.appendChild(a),this.gutterUtilityContent=a}getOrCreateFileContainer(n,r){const a=this.fileContainer;if(this.fileContainer=n??this.fileContainer??document.createElement(uu),a!=null&&a!==this.fileContainer&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),r!=null&&this.fileContainer.parentNode!==r&&r.appendChild(this.fileContainer),this.spriteSVG==null){const s=document.createElement("div");s.innerHTML=QL;const u=s.firstChild;u instanceof SVGElement&&(this.spriteSVG=u,this.fileContainer.shadowRoot?.appendChild(this.spriteSVG))}return this.fileContainer}getFileContainer(){return this.fileContainer}getOrCreatePreNode(n){const r=n.shadowRoot??n.attachShadow({mode:"open"});return this.pre==null?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,r.appendChild(this.pre)):this.pre.parentNode!==r&&(r.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(n){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(const r of Array.from(n.children))r instanceof HTMLElement&&("unified"in r.dataset?this.codeUnified=r:"deletions"in r.dataset?this.codeDeletions=r:"additions"in r.dataset&&(this.codeAdditions=r))}applyHeaderToDOM(n,r){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;const a=Xa(n);if(a!==this.lastRenderedHeaderHTML){const d=document.createElement("div");d.innerHTML=a;const p=d.firstElementChild;if(!(p instanceof HTMLElement))return;this.headerElement!=null?r.shadowRoot?.replaceChild(p,this.headerElement):r.shadowRoot?.prepend(p),this.headerElement=p,this.lastRenderedHeaderHTML=a}if(this.isContainerManaged)return;const{renderHeaderPrefix:s,renderHeaderMetadata:u}=this.options;this.headerPrefix!=null&&this.headerPrefix.remove(),this.headerMetadata!=null&&this.headerMetadata.remove();const c=s?.({deletionFile:this.deletionFile,additionFile:this.additionFile,fileDiff:this.fileDiff})??void 0,h=u?.({deletionFile:this.deletionFile,additionFile:this.additionFile,fileDiff:this.fileDiff})??void 0;c!=null&&(this.headerPrefix=document.createElement("div"),this.headerPrefix.slot=_h,c instanceof Element?this.headerPrefix.appendChild(c):this.headerPrefix.innerText=`${c}`,r.appendChild(this.headerPrefix)),h!=null&&(this.headerMetadata=document.createElement("div"),this.headerMetadata.slot=xh,h instanceof Element?this.headerMetadata.appendChild(h):this.headerMetadata.innerText=`${h}`,r.appendChild(this.headerMetadata))}injectUnsafeCSS(){if(this.fileContainer?.shadowRoot==null)return;const{unsafeCSS:n}=this.options;n==null||n===""||(this.unsafeCSSStyle==null&&(this.unsafeCSSStyle=tN(),this.fileContainer.shadowRoot.appendChild(this.unsafeCSSStyle)),this.unsafeCSSStyle.innerText=rN(n))}applyHunksToDOM(n,r){const{overflow:a="scroll"}=this.options,s=(this.options.hunkSeparators??"line-info")==="line-info",u=a==="wrap"?r.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(n,r);let c=!1;const h=[],d=this.hunksRenderer.renderCodeAST("unified",r),p=this.hunksRenderer.renderCodeAST("deletions",r),b=this.hunksRenderer.renderCodeAST("additions",r);d!=null?(c=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=Cf({code:this.codeUnified,columnType:"unified",rowSpan:u,containerSize:s}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(d),h.push(this.codeUnified)):p!=null||b!=null?(p!=null?(c=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=Cf({code:this.codeDeletions,columnType:"deletions",rowSpan:u,containerSize:s}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(p),h.push(this.codeDeletions)):(this.codeDeletions?.remove(),this.codeDeletions=void 0),b!=null?(c=c||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=Cf({code:this.codeAdditions,columnType:"additions",rowSpan:u,containerSize:s}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(b),h.push(this.codeAdditions)):(this.codeAdditions?.remove(),this.codeAdditions=void 0)):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0),h.length===0?n.textContent="":c&&n.replaceChildren(...h),this.lastRowCount=r.rowCount}applyPartialRender({previousRenderRange:n,renderRange:r}){const{pre:a,codeUnified:s,codeAdditions:u,codeDeletions:c,options:{diffStyle:h="split"}}=this;if(a==null||n==null||r==null||!Number.isFinite(n.totalLines)||!Number.isFinite(r.totalLines)||this.lastRowCount==null)return!1;const d=this.getCodeColumns(h,s,c,u);if(d==null)return!1;const p=n.startingLine,b=r.startingLine,g=p+n.totalLines,v=b+r.totalLines,_=Math.max(p,b),x=Math.min(g,v);if(x<=_)return!1;const T=Math.max(0,_-p),O=Math.max(0,g-x),A=this.trimColumns({columns:d,trimStart:T,trimEnd:O,previousStart:p,overlapStart:_,overlapEnd:x,diffStyle:h});if(A<0)throw new Error("applyPartialRender: failed to trim to overlap");if(this.lastRowCount<A)throw new Error("applyPartialRender: trimmed beyond DOM row count");let C=this.lastRowCount-A;const k=(H,z)=>{if(!(z<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:H,totalLines:z,bufferBefore:0,bufferAfter:0})},I=k(b,Math.max(_-b,0));if(I==null&&b<_)return!1;const M=k(x,Math.max(v-x,0));if(M==null&&v>x)return!1;const U=(H,z)=>{if(H!=null){if(h==="unified"&&!Array.isArray(d))this.insertPartialHTML(h,d,H,z);else if(h==="split"&&Array.isArray(d))this.insertPartialHTML(h,d,H,z);else throw new Error("FileDiff.applyPartialRender.applyChunk: invalid chunk application");C+=H.rowCount}};return this.cleanupErrorWrapper(),U(I,"afterbegin"),U(M,"beforeend"),this.lastRowCount!==C&&(this.applyRowSpan(h,d,C),this.lastRowCount=C),!0}insertPartialHTML(n,r,a,s){if(n==="unified"&&!Array.isArray(r)){const u=this.hunksRenderer.renderCodeAST("unified",a);this.renderPartialColumn(r,u,s)}else if(n==="split"&&Array.isArray(r)){const u=this.hunksRenderer.renderCodeAST("deletions",a),c=this.hunksRenderer.renderCodeAST("additions",a);this.renderPartialColumn(r[0],u,s),this.renderPartialColumn(r[1],c,s)}else throw new Error("FileDiff.insertPartialHTML: Invalid argument composition")}renderPartialColumn(n,r,a){if(n==null||r==null)return;const s=kv(r[0]),u=kv(r[1]);if(s==null||u==null)throw new Error("FileDiff.insertPartialHTML: Unexpected AST structure");const c=u.at(0);a==="beforeend"&&c?.type==="element"&&typeof c.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(c.properties["data-buffer-size"],n.content.children[n.content.children.length-1],n.gutter.children[n.gutter.children.length-1],s,u,!0);const h=u.at(-1);a==="afterbegin"&&h?.type==="element"&&typeof h.properties["data-buffer-size"]=="number"&&this.mergeBuffersIfNecessary(h.properties["data-buffer-size"],n.content.children[0],n.gutter.children[0],s,u,!1),n.gutter.insertAdjacentHTML(a,this.hunksRenderer.renderPartialHTML(s)),n.content.insertAdjacentHTML(a,this.hunksRenderer.renderPartialHTML(u))}mergeBuffersIfNecessary(n,r,a,s,u,c){if(!(r instanceof HTMLElement)||!(a instanceof HTMLElement))return;const h=this.getBufferSize(r.dataset);h!=null&&(c?(s.shift(),u.shift()):(s.pop(),u.pop()),this.updateBufferSize(r,h+n),this.updateBufferSize(a,h+n))}applyRowSpan(n,r,a){const s=u=>{u!=null&&(u.gutter.style.setProperty("grid-row",`span ${a}`),u.content.style.setProperty("grid-row",`span ${a}`))};if(n==="unified"&&!Array.isArray(r))s(r);else if(n==="split"&&Array.isArray(r))s(r[0]),s(r[1]);else throw new Error("dun fuuuuked up")}trimColumnRows(n,r,a){let s=0,u=0,c=0,h=!1;const d=a>=0;if(n==null)return 0;const p=Array.from(n.content.children),b=Array.from(n.gutter.children);if(p.length!==b.length)throw new Error("FileDiff.trimColumnRows: columns do not match");for(;c<p.length&&!(r<=0&&!d&&!h);){const g=b[c],v=p[c];if(c++,!(g instanceof HTMLElement)||!(v instanceof HTMLElement))throw console.error({gutterElement:g,contentElement:v}),new Error("FileDiff.trimColumnRows: invalid row elements");if(h&&(h=!1,g.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in v.dataset||g.dataset.gutterBuffer==="metadata"&&"noNewline"in v.dataset)){g.remove(),v.remove(),u++;continue}if("lineIndex"in g.dataset&&"lineIndex"in v.dataset){(r>0||d&&s>=a)&&(g.remove(),v.remove(),r>0&&(r--,r===0&&(h=!0)),u++),s++;continue}if("separator"in g.dataset&&"separator"in v.dataset){(r>0||d&&s>=a)&&(g.remove(),v.remove(),u++);continue}if(g.dataset.gutterBuffer==="annotation"&&"lineAnnotation"in v.dataset){(r>0||d&&s>=a)&&(g.remove(),v.remove(),u++);continue}if(g.dataset.gutterBuffer==="metadata"&&"noNewline"in v.dataset){(r>0||d&&s>=a)&&(g.remove(),v.remove(),u++);continue}if(g.dataset.gutterBuffer==="buffer"&&"contentBuffer"in v.dataset){const _=this.getBufferSize(v.dataset);if(_==null)throw new Error("FileDiff.trimColumnRows: invalid element");if(r>0){const x=Math.min(r,_),T=_-x;T>0?(this.updateBufferSize(g,T),this.updateBufferSize(v,T),u+=x):(g.remove(),v.remove(),u+=_),r-=x}else if(d){const x=s,T=s+_-1;if(a<=x)g.remove(),v.remove(),u+=_;else if(a<=T){const O=T-a+1,A=_-O;this.updateBufferSize(g,A),this.updateBufferSize(v,A),u+=O}}s+=_;continue}throw console.error({gutterElement:g,contentElement:v}),new Error("FileDiff.trimColumnRows: unknown row elements")}return u}trimColumns({columns:n,diffStyle:r,overlapEnd:a,overlapStart:s,previousStart:u,trimEnd:c,trimStart:h}){const d=Math.max(0,s-u),p=a-u;if(p<0)throw new Error("FileDiff.trimColumns: overlap ends before previous");const b=h>0,g=c>0;if(!b&&!g)return 0;const v=b?d:0,_=g?p:-1;if(r==="unified"&&!Array.isArray(n))return this.trimColumnRows(n,v,_);if(r==="split"&&Array.isArray(n)){const x=this.trimColumnRows(n[0],v,_),T=this.trimColumnRows(n[1],v,_);if(n[0]!=null&&n[1]!=null&&x!==T)throw new Error("FileDiff.trimColumns: split columns out of sync");return n[0]!=null?x:T}else throw console.error({diffStyle:r,columns:n}),new Error("FileDiff.trimColumns: Invalid columns for diffType")}getBufferSize(n){const r=Number.parseInt(n?.bufferSize??"",10);return Number.isNaN(r)?void 0:r}updateBufferSize(n,r){n.dataset.bufferSize=`${r}`,n.style.setProperty("grid-row",`span ${r}`),n.style.setProperty("min-height",`calc(${r} * 1lh)`)}getCodeColumns(n,r,a,s){function u(c){if(c==null)return;const h=c.children[0],d=c.children[1];if(!(!(h instanceof HTMLElement)||!(d instanceof HTMLElement)||h.dataset.gutter==null||d.dataset.content==null))return{gutter:h,content:d}}if(n==="unified")return u(r);{const c=u(a),h=u(s);return c!=null||h!=null?[c,h]:void 0}}applyBuffers(n,r){const{disableVirtualizationBuffers:a=!1}=this.options;if(a||r==null){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}r.bufferBefore>0?(this.bufferBefore==null&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",n.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${r.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),r.bufferAfter>0?(this.bufferAfter==null&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",n.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${r.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}applyPreNodeAttributes(n,{themeStyles:r,baseThemeType:a,additionsContentAST:s,deletionsContentAST:u,totalLines:c},h){const{diffIndicators:d="bars",disableBackground:p=!1,disableLineNumbers:b=!1,overflow:g="scroll",themeType:v="system",diffStyle:_="split"}=this.options,x={type:"diff",diffIndicators:d,disableBackground:p,disableLineNumbers:b,overflow:g,split:_==="unified"?!1:s!=null&&u!=null,themeStyles:r,themeType:a??v,totalLines:c,customProperties:h};KL(x,this.appliedPreAttributes)||(oN(n,x),this.appliedPreAttributes=x)}applyErrorToDOM(n,r){this.cleanupErrorWrapper();const a=this.getOrCreatePreNode(r);a.innerHTML="",a.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;const s=r.shadowRoot??r.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.innerHTML="",s.appendChild(this.errorWrapper);const u=document.createElement("div");u.dataset.errorMessage="",u.innerText=n.message,this.errorWrapper.appendChild(u);const c=document.createElement("pre");c.dataset.errorStack="",c.innerText=n.stack??"No Error Stack",this.errorWrapper.appendChild(c)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function kv(t){if(!(t==null||t.type!=="element"))return t.children??[]}function $N({side:t,lineNumber:n,conflictIndex:r}){return`merge-conflict-action-${t}-${n}-${r}`}function qN(t){if(t.incomingLineNumber!=null)return{side:"additions",lineNumber:t.incomingLineNumber};if(t.currentLineNumber!=null)return{side:"deletions",lineNumber:t.currentLineNumber}}function YN(t,n){const r={...bA,...n};return r.hunkSeparatorHeight=FN(t,n?.hunkSeparatorHeight),r}function FN(t,n){if(n!=null)return n;switch(t){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}}let XN=-1;var WN=class extends B1{__id=`little-virtualized-file-diff:${++XN}`;top;height=0;metrics;heightCache=new Map;isVisible=!1;virtualizer;constructor(t,n,r,a,s=!1){super(t,a,s);const{hunkSeparators:u="line-info"}=this.options;this.virtualizer=n,this.metrics=YN(typeof u=="function"?"custom":u,r)}getLineHeight(t,n=!1){const r=this.heightCache.get(t);if(r!=null)return r;const a=n?2:1;return this.metrics.lineHeight*a}setOptions(t){if(t==null)return;const n=this.options.diffStyle,r=this.options.overflow,a=this.options.collapsed;super.setOptions(t),(n!==this.options.diffStyle||r!==this.options.overflow||a!==this.options.collapsed)&&(this.heightCache.clear(),this.computeApproximateSize(),this.renderRange=void 0),this.virtualizer.instanceChanged(this)}reconcileHeights(){const{overflow:t="scroll"}=this.options;if(this.fileContainer!=null&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.fileContainer==null||this.fileDiff==null){this.height=0;return}if(t==="scroll"&&this.lineAnnotations.length===0&&!this.virtualizer.config.resizeDebugging)return;const n=this.getDiffStyle();let r=!1;const a=n==="split"?[this.codeDeletions,this.codeAdditions]:[this.codeUnified];for(const s of a){if(s==null)continue;const u=s.children[1];if(u instanceof HTMLElement)for(const c of u.children){if(!(c instanceof HTMLElement))continue;const h=c.dataset.lineIndex;if(h==null)continue;const d=KN(h,n);let p=c.getBoundingClientRect().height,b=!1;c.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in c.nextElementSibling.dataset||"noNewline"in c.nextElementSibling.dataset)&&("noNewline"in c.nextElementSibling.dataset&&(b=!0),p+=c.nextElementSibling.getBoundingClientRect().height);const g=this.getLineHeight(d,b);p!==g&&(r=!0,p===this.metrics.lineHeight*(b?2:1)?this.heightCache.delete(d):this.heightCache.set(d,p))}}(r||this.virtualizer.config.resizeDebugging)&&this.computeApproximateSize()}onRender=t=>this.fileContainer==null?!1:(t&&(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer)),this.render());cleanUp(){this.fileContainer!=null&&this.virtualizer.disconnect(this.fileContainer),super.cleanUp()}expandHunk=(t,n,r)=>{this.hunksRenderer.expandHunk(t,n,r),this.computeApproximateSize(),this.renderRange=void 0,this.virtualizer.instanceChanged(this)};setVisibility(t){this.fileContainer!=null&&(this.renderRange=void 0,t&&!this.isVisible?(this.top=this.virtualizer.getOffsetInScrollContainer(this.fileContainer),this.isVisible=!0):!t&&this.isVisible&&(this.isVisible=!1,this.rerender()))}computeApproximateSize(){const t=this.height===0;if(this.height=0,this.fileDiff==null)return;const{disableFileHeader:n=!1,expandUnchanged:r=!1,collapsed:a=!1,collapsedContextThreshold:s=qa,hunkSeparators:u="line-info"}=this.options,{diffHeaderHeight:c,fileGap:h,hunkSeparatorHeight:d}=this.metrics,p=this.getDiffStyle(),b=u!=="simple"&&u!=="metadata"&&u!=="line-info-basic"?h:0;if(n?u!=="simple"&&u!=="metadata"&&(this.height+=h):this.height+=c,!a&&(Eu({diff:this.fileDiff,diffStyle:p,expandedHunks:r?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:s,callback:({hunkIndex:g,collapsedBefore:v,collapsedAfter:_,deletionLine:x,additionLine:T})=>{const O=T!=null?T.splitLineIndex:x.splitLineIndex,A=T!=null?T.unifiedLineIndex:x.unifiedLineIndex,C=(T?.noEOFCR??!1)||(x?.noEOFCR??!1);v>0&&(g>0&&(this.height+=b),this.height+=d+b),this.height+=this.getLineHeight(p==="split"?O:A,C),_>0&&u!=="simple"&&(this.height+=b+d)}}),this.fileDiff.hunks.length>0&&(this.height+=h),this.fileContainer!=null&&this.virtualizer.config.resizeDebugging&&!t)){const g=this.fileContainer.getBoundingClientRect();g.height!==this.height?console.log("VirtualizedFileDiff.computeApproximateSize: computed height doesnt match",{name:this.fileDiff.name,elementHeight:g.height,computedHeight:this.height}):console.log("VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT")}}render({fileContainer:t,oldFile:n,newFile:r,fileDiff:a,...s}={}){const u=this.fileContainer==null;if(this.fileDiff??=a??(n!=null&&r!=null?ch(n,r):void 0),t=this.getOrCreateFileContainer(t),this.fileDiff==null)return console.error("VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data"),!1;if(u?(this.computeApproximateSize(),this.virtualizer.connect(t,this),this.top??=this.virtualizer.getOffsetInScrollContainer(t),this.isVisible=this.virtualizer.isInstanceVisible(this.top,this.height)):this.top??=this.virtualizer.getOffsetInScrollContainer(t),!this.isVisible)return this.renderPlaceholder(this.height);const c=this.virtualizer.getWindowSpecs(),h=this.computeRenderRangeFromWindow(this.fileDiff,this.top,c);return super.render({fileDiff:this.fileDiff,fileContainer:t,renderRange:h,oldFile:n,newFile:r,...s})}getDiffStyle(){return this.options.diffStyle??"split"}getExpandedRegion(t,n,r){if(r<=0||t)return{fromStart:0,fromEnd:0,collapsedLines:Math.max(r,0),renderAll:!1};const{expandUnchanged:a=!1,collapsedContextThreshold:s=qa}=this.options;if(a||r<=s)return{fromStart:r,fromEnd:0,collapsedLines:0,renderAll:!0};const u=this.hunksRenderer.getExpandedHunk(n),c=Math.min(Math.max(u.fromStart,0),r),h=Math.min(Math.max(u.fromEnd,0),r),d=c+h,p=d>=r;return{fromStart:c,fromEnd:h,collapsedLines:Math.max(r-d,0),renderAll:p}}getExpandedLineCount(t,n){let r=0;if(t.isPartial){for(const s of t.hunks)r+=n==="split"?s.splitLineCount:s.unifiedLineCount;return r}for(const[s,u]of t.hunks.entries()){const c=n==="split"?u.splitLineCount:u.unifiedLineCount;r+=c;const h=Math.max(u.collapsedBefore,0),{fromStart:d,fromEnd:p,renderAll:b}=this.getExpandedRegion(t.isPartial,s,h);h>0&&(r+=b?h:d+p)}const a=t.hunks.at(-1);if(a!=null&&QN(t)){const s=t.additionLines.length-(a.additionLineIndex+a.additionCount),u=t.deletionLines.length-(a.deletionLineIndex+a.deletionCount);if(a!=null&&s!==u)throw new Error(`VirtualizedFileDiff: trailing context mismatch (additions=${s}, deletions=${u}) for ${t.name}`);const c=Math.min(s,u);if(a!=null&&c>0){const{fromStart:h,renderAll:d}=this.getExpandedRegion(t.isPartial,t.hunks.length,c);r+=d?c:h}}return r}computeRenderRangeFromWindow(t,n,{top:r,bottom:a}){const{disableFileHeader:s=!1,expandUnchanged:u=!1,collapsedContextThreshold:c=qa,hunkSeparators:h="line-info"}=this.options,{diffHeaderHeight:d,fileGap:p,hunkLineCount:b,hunkSeparatorHeight:g,lineHeight:v}=this.metrics,_=this.getDiffStyle(),x=this.height,T=this.getExpandedLineCount(t,_),O=s?p:d;if(n<r-x||n>a)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:x-O-p};if(T<=b||t.hunks.length===0)return{startingLine:0,totalLines:b,bufferBefore:0,bufferAfter:0};const A=Math.ceil(Math.max(a-r,0)/v),C=Math.ceil(A/b)*b+b,k=C/b,I=k,M=[],U=(r+a)/2,H=h==="simple"||h==="metadata"||h==="line-info-basic"?0:p;let z=n+O,Q=0,ee,ie,V;if(Eu({diff:t,diffStyle:_,expandedHunks:u?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:c,callback:({hunkIndex:L,collapsedBefore:Y,collapsedAfter:W,deletionLine:re,additionLine:le})=>{const ce=le!=null?le.splitLineIndex:re.splitLineIndex,me=le!=null?le.unifiedLineIndex:re.unifiedLineIndex,ge=(le?.noEOFCR??!1)||(re?.noEOFCR??!1);let pe=Y>0?g+H+(L>0?H:0):0;L===0&&h==="simple"&&(pe=0),z+=pe;const ne=Q%b===0;if(ne&&(M.push(z-(n+O+pe)),V!=null)){if(V<=0)return!0;V--}const ve=this.getLineHeight(_==="split"?ce:me,ge),Ae=Math.floor(Q/b);return z>r-ve&&z<a&&(ee??=Ae),ie==null&&z+ve>U&&(ie=Ae),V==null&&z>=a&&ne&&(V=I),Q++,z+=ve,W>0&&h!=="simple"&&(z+=g+H),!1}}),ee==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:x-O-p};const K=M.length;ie??=ee;const oe=Math.round(ie-k/2),te=Math.max(0,K-k),N=Math.max(0,Math.min(oe,te)),P=N*b,X=oe<0?C+oe*b:C,he=M[N]??0,Z=N+X/b;return{startingLine:P,totalLines:X,bufferBefore:he,bufferAfter:Z<M.length?x-O-M[Z]-p:x-(z-n)-p}}};function QN(t){const n=t.hunks.at(-1);return n==null||t.isPartial||t.additionLines.length===0||t.deletionLines.length===0?!1:n.additionLineIndex+n.additionCount<t.additionLines.length||n.deletionLineIndex+n.deletionCount<t.deletionLines.length}function KN(t,n){const[r,a]=t.split(",").map(Number);return n==="split"?a:r}function ZN(t,n,r){if(t===n||t==null||n==null)return t===n;const a=new Set(r),s=Object.keys(t),u=new Set(Object.keys(n));for(const c of s)if(u.delete(c),!a.has(c)&&(!(c in n)||t[c]!==n[c]))return!1;for(const c of Array.from(u))if(!a.has(c))return!1;return!0}function JN(t,n){return j1(t?.theme??Fn,n?.theme??Fn)&&ZN(t,n,["theme"])}const Tv=(t,n)=>{const r=t.replace(/\r\n/g,`
|
|
1935
|
+
`);return{bytes:new TextEncoder().encode(t).length,fileCount:n,lineCount:r.length===0?0:r.split(`
|
|
1936
|
+
`).length}},eM=t=>{if(t.trim().length===0)return{files:[],stats:Tv(t,0)};const r=VN(t,"opencr-review",!0).flatMap(a=>a.files);return{files:r,stats:Tv(t,r.length)}},tM=t=>{try{return{data:eM(t),error:null}}catch(n){return{data:null,error:n instanceof Error?n.message:String(n)}}},V1=t=>{let n=0,r=0;for(const a of t.hunks)n+=a.additionLines,r+=a.deletionLines;return{additions:n,deletions:r}},wu=(t,n)=>t.cacheKey??`${t.name}-${n}`,nM=t=>!t.prevName||t.prevName===t.name?t.name:`${t.prevName} -> ${t.name}`,iM=(t,n)=>n!=="split"||t.type!=="new"&&t.type!=="deleted"?t:{...t,type:"change"},Rv=t=>{let n;const r=new Set,a=(p,b)=>{const g=typeof p=="function"?p(n):p;if(!Object.is(g,n)){const v=n;n=b??(typeof g!="object"||g===null)?g:Object.assign({},n,g),r.forEach(_=>_(n,v))}},s=()=>n,h={setState:a,getState:s,getInitialState:()=>d,subscribe:p=>(r.add(p),()=>r.delete(p))},d=n=t(a,s,h);return h},rM=(t=>t?Rv(t):Rv),aM=t=>t;function oM(t,n=aM){const r=fe.useSyncExternalStore(t.subscribe,fe.useCallback(()=>n(t.getState()),[t,n]),fe.useCallback(()=>n(t.getInitialState()),[t,n]));return fe.useDebugValue(r),r}const Lv=t=>{const n=rM(t),r=a=>oM(n,a);return Object.assign(r,n),r},lM=(t=>t?Lv(t):Lv),jh=448,Nv=()=>typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2,8)}`,Li=(t,n,r)=>({fileId:t,fileLabel:n,range:r}),Mv=t=>{const n=t.backends.find(r=>r.available);return n==null?null:{backendId:n.id,modelId:n.defaultModelId,variant:null}},Zo=(t,n)=>{if(t==null)return n;if(n==null)return t.defaultTarget??Mv(t);const r=t.backends.find(s=>s.id===n.backendId);return r==null?t.defaultTarget??Mv(t):n.modelId==null?{...n,modelId:r.defaultModelId}:r.models.some(s=>s.id===n.modelId)||r.models.length===0?n:{...n,modelId:r.defaultModelId}},Lf=(t="split")=>({activeSelection:null,draftSelection:null,draftNoteBody:"",notes:[],agentSessions:[],activeNoteId:null,activeAgentSessionId:null,activeSidebarPanel:"notes",isPanelOpen:!1,panelWidthPx:jh,diffViewMode:t,agentMessagesBySession:{},agentStatus:null,agentCatalog:null,agentDraftTarget:null}),be=lM((t,n)=>({...Lf(),startSelection:()=>{t({activeSelection:null,draftSelection:null,draftNoteBody:"",activeNoteId:null,activeAgentSessionId:null})},changeSelection:(r,a,s)=>{if(s==null){t(u=>({activeSelection:u.activeSelection?.fileId===r?null:u.activeSelection}));return}t({activeSelection:Li(r,a,s)})},endSelection:(r,a,s)=>{if(s==null){t(c=>{const h=c.draftSelection?.fileId===r;return{activeSelection:c.activeSelection?.fileId===r?null:c.activeSelection,draftSelection:h?null:c.draftSelection,draftNoteBody:h?"":c.draftNoteBody}});return}const u=Li(r,a,s);t({activeSelection:u,draftSelection:u,draftNoteBody:"",activeNoteId:null})},setDraftNoteBody:r=>{t({draftNoteBody:r})},selectNote:r=>{if(r==null){t({activeNoteId:null,activeSelection:null});return}const a=n().notes.find(s=>s.id===r);if(a==null){t({activeNoteId:null,activeSelection:null});return}t({activeNoteId:a.id,activeSelection:Li(a.fileId,a.fileLabel,a.range),activeAgentSessionId:null,activeSidebarPanel:"notes",draftSelection:null,draftNoteBody:""})},selectAgentSession:r=>{if(r==null){t({activeAgentSessionId:null,activeSelection:null});return}const a=n().agentSessions.find(s=>s.id===r);if(a==null){t({activeAgentSessionId:null,activeSelection:null});return}t({activeAgentSessionId:a.id,activeNoteId:null,activeSelection:Li(a.fileId,a.fileLabel,a.range),draftSelection:null,draftNoteBody:"",activeSidebarPanel:"agents",isPanelOpen:!0})},addNote:()=>{const{notes:r,draftSelection:a,draftNoteBody:s}=n();if(a==null)return;const u=s.trim();if(u.length===0)return;const c={id:Nv(),fileId:a.fileId,fileLabel:a.fileLabel,range:a.range,body:u};t({notes:[c,...r],activeNoteId:c.id,activeAgentSessionId:null,activeSidebarPanel:"notes",activeSelection:Li(c.fileId,c.fileLabel,c.range),draftSelection:null,draftNoteBody:"",isPanelOpen:!0})},addAgentSession:r=>{const a={id:r.id??Nv(),backendId:r.backendId,backendSessionId:r.backendSessionId,modelId:r.modelId,variant:r.variant,title:r.title,prompt:r.prompt,fileId:r.fileId,fileLabel:r.fileLabel,range:r.range,createdAt:r.createdAt,updatedAt:r.updatedAt};return t(s=>({agentSessions:[a,...s.agentSessions],activeAgentSessionId:a.id,activeNoteId:null,activeSidebarPanel:"agents",activeSelection:Li(a.fileId,a.fileLabel,a.range),draftSelection:null,draftNoteBody:"",isPanelOpen:!0})),a.id},setAgentMessages:(r,a)=>{t(s=>({agentMessagesBySession:{...s.agentMessagesBySession,[r]:a}}))},touchAgentSession:(r,a)=>{t(s=>({agentSessions:s.agentSessions.map(u=>u.id===r?{...u,updatedAt:a}:u).toSorted((u,c)=>c.updatedAt.localeCompare(u.updatedAt))}))},cancelNote:()=>{t({activeSelection:null,draftSelection:null,draftNoteBody:""})},deleteNote:r=>{t(a=>{const s=a.activeNoteId===r;return{notes:a.notes.filter(u=>u.id!==r),activeNoteId:s?null:a.activeNoteId,activeSelection:s?null:a.activeSelection}})},setDiffViewMode:r=>{t({diffViewMode:r})},setActiveSidebarPanel:r=>{t({activeSidebarPanel:r,isPanelOpen:!0})},togglePanel:()=>{t(r=>({isPanelOpen:!r.isPanelOpen}))},openPanel:()=>{t({isPanelOpen:!0})},setPanelWidth:r=>{t({panelWidthPx:r})},setAgentStatus:r=>{t({agentStatus:r})},setAgentCatalog:r=>{t(a=>({agentCatalog:r,agentDraftTarget:Zo(r,a.agentDraftTarget)}))},setAgentDraftTarget:r=>{t(a=>({agentDraftTarget:Zo(a.agentCatalog,r)}))},hydrateWorkspace:(r,a)=>{const s=n().agentStatus,u=n().agentCatalog;if(r==null){t({...Lf(a),agentStatus:s,agentCatalog:u,agentDraftTarget:Zo(u,null)});return}const c=r.notes.map(g=>({...g,range:{...g.range}})),h=r.agentSessions.map(g=>({...g,range:{...g.range}})),d=r.activeNoteId==null?null:c.find(g=>g.id===r.activeNoteId)??null,p=r.activeAgentSessionId==null?null:h.find(g=>g.id===r.activeAgentSessionId)??null,b=r.draftSelection==null?null:{...r.draftSelection,range:{...r.draftSelection.range}};t({notes:c,agentSessions:h,agentMessagesBySession:{},agentDraftTarget:Zo(u,r.agentDraftTarget),activeNoteId:d?.id??null,activeAgentSessionId:p?.id??null,activeSelection:d!=null?Li(d.fileId,d.fileLabel,d.range):p!=null?Li(p.fileId,p.fileLabel,p.range):b!=null?Li(b.fileId,b.fileLabel,b.range):null,draftSelection:b,draftNoteBody:r.draftNoteBody,activeSidebarPanel:r.activeSidebarPanel,isPanelOpen:r.isPanelOpen,panelWidthPx:r.panelWidthPx,diffViewMode:r.diffViewMode,agentStatus:s,agentCatalog:u})},serializeWorkspace:()=>{const r=n();return{notes:r.notes.map(a=>({...a,range:{...a.range}})),agentSessions:r.agentSessions.map(a=>({...a,range:{...a.range}})),agentDraftTarget:r.agentDraftTarget==null?null:{...r.agentDraftTarget},draftSelection:r.draftSelection==null?null:{...r.draftSelection,range:{...r.draftSelection.range}},draftNoteBody:r.draftNoteBody,activeNoteId:r.activeNoteId,activeAgentSessionId:r.activeAgentSessionId,activeSidebarPanel:r.activeSidebarPanel,isPanelOpen:r.isPanelOpen,panelWidthPx:r.panelWidthPx,diffViewMode:r.diffViewMode}},reset:()=>{t({...Lf(n().diffViewMode),agentStatus:n().agentStatus,agentCatalog:n().agentCatalog,agentDraftTarget:Zo(n().agentCatalog,null)})}})),sM=350,uM=t=>t.length===0?"Review session looks healthy.":t.map(n=>[n.summary,n.detail,n.fix?`Fix: ${n.fix}`:null].filter(r=>r!=null).join(`
|
|
1937
|
+
`)).join(`
|
|
1938
|
+
|
|
1939
|
+
`),cM=(t,n)=>{if(n)return{tone:"error",label:"Broken",tooltip:["Review session failed to load.",n].join(`
|
|
1940
|
+
`)};if(!t)return null;const r=[...t.diagnostics],a=r.some(s=>s.severity==="error");return{tone:a?"error":r.length>0?"warning":"healthy",label:a?"Broken":r.length>0?"Warning":"Healthy",tooltip:uM(r)}},G1=R.createContext(null);function dM(){const t=R.useCallback(()=>Ni("/api/review",{errorPrefix:"Failed to load review session"}),[]),n=R.useCallback(()=>Ni("/api/agents/status",{errorPrefix:"Failed to load agent integration status"}),[]),r=R.useCallback(()=>Ni("/api/agents/catalog",{errorPrefix:"Failed to load agent catalog"}),[]),{data:a,error:s,isLoading:u}=Qs(t),{data:c,error:h}=Qs(n),{data:d,error:p}=Qs(r),b=be(P=>P.diffViewMode),g=be(P=>P.setDiffViewMode),v=be(P=>P.hydrateWorkspace),_=be(P=>P.reset),x=be(P=>P.serializeWorkspace),T=be(P=>P.setAgentStatus),O=be(P=>P.setAgentCatalog),A=be(P=>P.notes),C=be(P=>P.agentSessions),k=be(P=>P.draftSelection),I=be(P=>P.draftNoteBody),M=be(P=>P.activeNoteId),U=be(P=>P.activeAgentSessionId),H=be(P=>P.activeSidebarPanel),z=be(P=>P.isPanelOpen),Q=be(P=>P.panelWidthPx),[ee,ie]=R.useState(null),V=R.useRef(0),K=R.useRef("");R.useEffect(()=>{a&&(v(a.workspace.workspace,a.session.diffViewMode),V.current=a.workspace.revision??0,K.current=JSON.stringify(be.getState().serializeWorkspace()),ie(null))},[a,v]);const oe=R.useCallback(()=>{_(),K.current=JSON.stringify(be.getState().serializeWorkspace()),ie(null)},[_]);R.useEffect(()=>{if(c){T(c);return}h&&T({available:!1,reason:h})},[c,h,T]),R.useEffect(()=>{if(d){O(d);return}p&&O(null)},[d,p,O]),R.useEffect(()=>{if(!a)return;const P=x(),X=JSON.stringify(P);if(X===K.current)return;const he=setTimeout(()=>{(async()=>{try{const Z=await Ni("/api/workspace",{errorPrefix:"Failed to save workspace",method:"PUT",body:{baseRevision:V.current,workspace:P}});if(Z.status==="saved"){V.current=Z.revision,K.current=X,ie(null);return}V.current=Z.revision,v(Z.workspace,Z.workspace.diffViewMode),K.current=JSON.stringify(be.getState().serializeWorkspace()),ie("Workspace changed in another window. The latest saved state was loaded.")}catch(Z){const L=Z instanceof Error?Z.message:String(Z);ie(L)}})()},sM);return()=>{clearTimeout(he)}},[M,U,H,C,a,b,I,k,v,z,Q,A,x]);const te=R.useMemo(()=>a?tM(a.diff.patch):{data:null,error:null},[a]),N=R.useMemo(()=>cM(a,s),[a,s]);return{reviewSession:a,error:s,isLoading:u,parsedPatch:te,diffViewMode:b,setDiffViewMode:g,agentStatus:c,agentStatusError:h,agentCatalog:d,agentCatalogError:p,hasRestoredWorkspaceFromAnotherSnapshot:a?.workspace.workspace!=null&&a.workspace.savedSnapshotId!=null&&a.workspace.savedSnapshotId!==a.session.snapshotId,startFreshFromRestoredWorkspace:oe,saveError:ee,reviewStatus:N}}function fM({children:t}){const n=dM();return R.createElement(G1.Provider,{value:n},t)}function $1(){const t=R.useContext(G1);if(t==null)throw new Error("useReviewData must be used within ReviewDataProvider");return t}const Ov=t=>t??"additions",hM=(t,n)=>t.lineNumber!==n.lineNumber?t.lineNumber-n.lineNumber:t.side===n.side?0:t.side==="deletions"?-1:1,Uh=t=>{const n={lineNumber:t.start,side:Ov(t.side)},r={lineNumber:t.end,side:Ov(t.endSide??t.side)};return hM(n,r)<=0?{first:n,last:r}:{first:r,last:n}},Cu=t=>`${t.side==="deletions"?"L":"R"}${t.lineNumber}`,Pu=t=>{const{first:n,last:r}=Uh(t),a=Cu(n),s=Cu(r);return a===s?`Note on line ${a}`:`Note on lines ${a} to ${s}`},mM=t=>{const{first:n,last:r}=Uh(t),a=Cu(n),s=Cu(r);return a===s?`Add a note on line ${a}`:`Add a note on lines ${a} to ${s}`},q1=t=>`review-note-anchor-${t}`,Y1=t=>`review-agent-session-anchor-${t}`,Nf=t=>{const{last:n}=Uh(t);return{lineNumber:n.lineNumber,side:n.side}},pM=(t,n,r,a)=>{const s=n.filter(h=>h.fileId===t).map(h=>{const d=Nf(h.range);return{lineNumber:d.lineNumber,side:d.side,metadata:{kind:"note",noteId:h.id}}}),u=r.filter(h=>h.fileId===t).map(h=>{const d=Nf(h.range);return{lineNumber:d.lineNumber,side:d.side,metadata:{kind:"agent-session",agentSessionId:h.id}}}),c=[...s,...u];if(a?.fileId===t){const h=Nf(a.range);c.push({lineNumber:h.lineNumber,side:h.side,metadata:{kind:"draft-note"}})}return c};function gM(t){return`## Code Review Notes
|
|
1941
|
+
|
|
1942
|
+
${t.map(r=>{const a=Pu(r.range);return`- **${r.fileLabel}** (${a})
|
|
1943
|
+
${r.body.split(`
|
|
1944
|
+
`).join(`
|
|
1945
|
+
`)}`}).join(`
|
|
1946
|
+
|
|
1947
|
+
`)}
|
|
1948
|
+
`}function bM({note:t,isActive:n,onSelect:r,onDelete:a}){const s=Pu(t.range);return E.jsxs("button",{type:"button",onClick:()=>r(t.id),className:He("group w-full rounded-lg border border-transparent p-3 text-left transition-all","hover:border-border/60 hover:bg-muted/30",n&&"border-primary/20 bg-primary/[0.04] hover:border-primary/20 hover:bg-primary/[0.04]"),children:[E.jsxs("div",{className:"flex items-start justify-between gap-2",children:[E.jsxs("div",{className:"min-w-0 flex-1",children:[E.jsx("div",{className:"truncate font-mono text-xs font-medium text-foreground/80",children:t.fileLabel}),E.jsx("div",{className:"mt-0.5 font-mono text-[0.65rem] text-muted-foreground",children:s})]}),n?E.jsx(zn,{type:"button",variant:"ghost",size:"icon-xs","aria-label":`Delete note on ${s}`,className:"shrink-0 text-muted-foreground hover:text-destructive",onClick:u=>{u.stopPropagation(),a(t.id)},children:E.jsx(TE,{className:"size-3.5"})}):null]}),E.jsx("p",{className:"mt-2 whitespace-pre-wrap font-sans text-[0.8125rem] leading-relaxed text-foreground/90",children:t.body})]},t.id)}const tu={phase:"idle"},Mf=(t,n)=>`${t}:${n}`,Of=(t,n)=>`/api/agents/session/${encodeURIComponent(t.backendId)}/${encodeURIComponent(t.backendSessionId)}/${n}`,Dv=t=>t.type==="busy"?{phase:"thinking"}:t.type==="retry"?{phase:"retrying",attempt:t.attempt,message:t.message}:tu;function vM(){const t=be(ne=>ne.notes),n=be(ne=>ne.activeNoteId),r=be(ne=>ne.selectNote),a=be(ne=>ne.deleteNote),s=be(ne=>ne.agentSessions),u=be(ne=>ne.agentMessagesBySession),c=be(ne=>ne.activeAgentSessionId),h=be(ne=>ne.selectAgentSession),d=be(ne=>ne.setAgentMessages),p=be(ne=>ne.touchAgentSession),b=be(ne=>ne.activeSidebarPanel),g=be(ne=>ne.setActiveSidebarPanel),v=be(ne=>ne.agentStatus),[_,x]=R.useState(!1),[T,O]=R.useState({}),[A,C]=R.useState({}),[k,I]=R.useState(null),[M,U]=R.useState({}),[H,z]=R.useState(null),[Q,ee]=R.useState(""),ie=R.useRef({}),V=(v?.available??!1)||s.length>0,K=R.useMemo(()=>c==null?null:s.find(ne=>ne.id===c)??null,[c,s]),oe=K?.id??null,te=oe!=null&&T[oe]!=null,N=K?T[K.id]??[]:[],P=K?A[K.id]??null:null,X=K==null?tu:M[K.id]??tu,he=R.useMemo(()=>{const ne=new Map;for(const ve of s)ne.set(Mf(ve.backendId,ve.backendSessionId),ve.id);return ne},[s]),Z=R.useMemo(()=>new Map(s.map(ne=>[ne.id,ne])),[s]),L=R.useRef(he),Y=R.useRef(c);L.current=he,Y.current=c;const W=R.useCallback((ne,ve)=>{U(Ae=>({...Ae,[ne]:ve}))},[]),re=R.useCallback((ne,ve)=>{O(Ee=>({...Ee,[ne]:ve})),d(ne,ve);const Ae=[...ve].toReversed().find(Ee=>Ee.role==="assistant"||Ee.role==="user");Ae&&p(ne,new Date(Ae.createdAt).toISOString())},[d,p]),le=R.useCallback(async(ne,ve)=>{ve?.silent||I(ne);const Ae=Z.get(ne);if(Ae==null){ve?.silent||I(Ee=>Ee===ne?null:Ee);return}C(Ee=>{const Ge={...Ee};return delete Ge[ne],Ge});try{const Ee=await Ni(Of(Ae,"messages"),{errorPrefix:"Failed to load agent session messages"});re(ne,Ee.messages)}catch(Ee){const Ge=Ee instanceof Error?Ee.message:String(Ee);C(Xe=>({...Xe,[ne]:Ge}))}finally{ve?.silent||I(Ee=>Ee===ne?null:Ee)}},[Z,re]),ce=R.useCallback(async ne=>{const ve=Z.get(ne);if(ve!=null)try{const Ae=await Ni(Of(ve,"status"),{errorPrefix:"Failed to load agent session status"}),Ee=Dv(Ae.status);W(ne,Ee),Ae.status.type==="idle"&&le(ne,{silent:!0})}catch{}},[Z,le,W]),me=R.useCallback(ne=>{ie.current[ne]==null&&(ie.current[ne]=setTimeout(()=>{delete ie.current[ne],le(ne,{silent:!0})},280))},[le]);R.useEffect(()=>{const ne=Object.entries(u);ne.length!==0&&O(ve=>{let Ae=!1;const Ee={...ve};for(const[Ge,Xe]of ne)Ee[Ge]!==Xe&&(Ee[Ge]=Xe,Ae=!0);return Ae?Ee:ve})},[u]),R.useEffect(()=>{!V&&b==="agents"&&g("notes")},[b,V,g]),R.useEffect(()=>{oe==null||te||le(oe)},[oe,te,le]),R.useEffect(()=>{oe!=null&&ce(oe)},[oe,ce]),R.useEffect(()=>()=>{for(const ne of Object.values(ie.current))clearTimeout(ne);ie.current={}},[]),R.useEffect(()=>{if(!V)return;const ne=new EventSource(yh("/api/agents/events")),ve=()=>{z(null)},Ae=()=>{z("Realtime agent updates disconnected. Reconnecting...")},Ee=Ge=>{let Xe;try{Xe=JSON.parse(Ge.data)}catch{return}if(Xe.kind==="connected"){z(null);return}if(Xe.kind==="session-status"){const dt=L.current.get(Mf(Xe.backendId,Xe.sessionId));if(dt==null)return;const Xt=Dv(Xe.status);if(W(dt,Xt),Xe.status.type!=="idle")return;le(dt,{silent:!0});return}const st=L.current.get(Mf(Xe.backendId,Xe.sessionId));st!=null&&Y.current===st&&me(st)};return ne.addEventListener("open",ve),ne.addEventListener("error",Ae),ne.addEventListener("message",Ee),()=>{ne.removeEventListener("open",ve),ne.removeEventListener("error",Ae),ne.removeEventListener("message",Ee),ne.close()}},[V,le,me,W]),R.useEffect(()=>{if(K==null||X.phase==="idle"||X.phase==="submitting")return;const ne=setInterval(()=>{ce(K.id)},1250);return()=>{clearInterval(ne)}},[X.phase,K,ce]);const ge=async()=>{t.length===0||typeof navigator>"u"||navigator.clipboard==null||(await navigator.clipboard.writeText(gM(t)),x(!0),setTimeout(()=>x(!1),2e3))},pe=async()=>{const ne=Q.trim();if(!(K==null||ne.length===0)){W(K.id,{phase:"submitting"}),C(ve=>{const Ae={...ve};return delete Ae[K.id],Ae});try{const ve=await Ni(Of(K,"message"),{errorPrefix:"Failed to send prompt to agent session",method:"POST",body:{prompt:ne}});re(K.id,ve.messages),ee(""),W(K.id,{phase:"thinking"}),ce(K.id)}catch(ve){const Ae=ve instanceof Error?ve.message:String(ve);C(Ee=>({...Ee,[K.id]:Ae})),W(K.id,tu)}}};return E.jsxs("div",{className:"flex h-full min-h-0 flex-col border-l bg-card/50",children:[E.jsx("div",{className:"shrink-0 border-b px-5 py-3",children:E.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted/40 p-1",children:[E.jsxs("button",{type:"button",onClick:()=>g("notes"),className:He("inline-flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium transition-colors",b==="notes"?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[E.jsx(If,{className:"size-3.5"}),"Notes",E.jsx("span",{className:"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-primary/10 px-1 font-mono text-[0.625rem] text-primary",children:t.length})]}),V?E.jsxs("button",{type:"button",onClick:()=>g("agents"),className:He("inline-flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium transition-colors",b==="agents"?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[E.jsx(nu,{className:"size-3.5"}),"Agents",E.jsx("span",{className:"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-primary/10 px-1 font-mono text-[0.625rem] text-primary",children:s.length})]}):null]})}),b==="notes"?E.jsxs(E.Fragment,{children:[E.jsx(nl,{className:"min-h-0 flex-1",children:E.jsx("div",{className:"flex flex-col gap-1 p-3",children:t.length===0?E.jsxs("div",{className:"flex flex-col items-center gap-3 px-4 py-10",children:[E.jsx("div",{className:"flex size-10 items-center justify-center rounded-lg bg-muted/60",children:E.jsx(If,{className:"size-5 text-muted-foreground/50"})}),E.jsxs("div",{className:"text-center",children:[E.jsx("div",{className:"font-sans text-sm font-medium text-muted-foreground",children:"No notes yet"}),E.jsx("p",{className:"mt-1 max-w-48 font-sans text-xs leading-relaxed text-muted-foreground/60",children:"Drag across line numbers in a diff hunk to start annotating."})]})]}):t.map(ne=>E.jsx(bM,{note:ne,isActive:n===ne.id,onSelect:r,onDelete:a},ne.id))})}),E.jsx("div",{className:"shrink-0 border-t bg-card/80 px-4 py-4",children:E.jsx(zn,{type:"button",size:"lg",onClick:ge,disabled:t.length===0,className:He("w-full gap-2 font-medium transition-all",_&&"bg-green-600 hover:bg-green-600 text-white"),children:_?E.jsxs(E.Fragment,{children:[E.jsx(Gv,{className:"size-3.5"}),"Copied to clipboard"]}):E.jsxs(E.Fragment,{children:[E.jsx(WS,{className:"size-3.5"}),"Copy all notes"]})})})]}):E.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:s.length===0?E.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 px-6 text-center",children:[E.jsx("div",{className:"flex size-10 items-center justify-center rounded-lg bg-muted/60",children:E.jsx(nu,{className:"size-5 text-muted-foreground/50"})}),E.jsxs("div",{children:[E.jsx("div",{className:"font-sans text-sm font-medium text-muted-foreground",children:"No agent sessions yet"}),E.jsx("p",{className:"mt-1 font-sans text-xs leading-relaxed text-muted-foreground/60",children:"Select lines in the diff, then use Agent in the draft box."}),v?.available===!1&&v.reason?E.jsx("p",{className:"mt-2 font-sans text-xs text-destructive",children:v.reason}):null]})]}):K==null?E.jsx(nl,{className:"min-h-0 flex-1",children:E.jsxs("div",{className:"flex flex-col gap-1 p-3",children:[E.jsxs("div",{className:"px-1 pb-2 font-sans text-[0.7rem] font-medium uppercase tracking-wide text-muted-foreground/70",children:["Sessions (",s.length,")"]}),s.map(ne=>E.jsxs("button",{type:"button",onClick:()=>h(ne.id),className:"w-full rounded-md border border-transparent px-3 py-2 text-left transition-colors hover:border-border/60 hover:bg-muted/30",children:[E.jsx("div",{className:"truncate font-sans text-xs font-medium",children:ne.title}),E.jsx("div",{className:"mt-0.5 truncate font-mono text-[0.65rem] text-muted-foreground",children:ne.fileLabel}),E.jsxs("div",{className:"mt-1 truncate font-mono text-[0.62rem] text-muted-foreground/80",children:[ne.backendId," / ",ne.modelId??"default"]})]},ne.id))]})}):E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2",children:[E.jsxs(zn,{type:"button",variant:"ghost",size:"sm",onClick:()=>h(null),className:"px-2",children:[E.jsx(qv,{className:"size-3.5"}),"Back"]}),E.jsx("h3",{className:"min-w-0 flex-1 truncate font-sans text-sm font-semibold",children:K.title}),E.jsxs("span",{className:"hidden truncate rounded bg-muted/60 px-2 py-0.5 font-mono text-[0.62rem] text-muted-foreground sm:inline-flex",children:[K.backendId,"/",K.modelId??"default"]}),E.jsxs(zn,{type:"button",variant:"ghost",size:"sm",onClick:()=>{le(K.id)},children:[E.jsx(gE,{className:"size-3.5"}),"Refresh"]})]}),E.jsx(nl,{className:"min-h-0 flex-1",children:E.jsx("div",{className:"space-y-3 p-3",children:k===K.id?E.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading session messages..."}):E.jsxs(E.Fragment,{children:[P?E.jsx("p",{className:"rounded-md border border-destructive/20 bg-destructive/5 px-2.5 py-2 text-xs text-destructive",children:P}):null,X.phase==="submitting"?E.jsx("p",{className:"text-xs text-muted-foreground",children:"Sending prompt..."}):null,X.phase==="thinking"?E.jsx("p",{className:"animate-pulse text-xs text-primary [text-shadow:0_0_12px_hsl(var(--primary)/0.55)]",children:"Thinking..."}):null,X.phase==="retrying"?E.jsxs("p",{className:"text-xs text-muted-foreground",children:["Retrying (attempt ",X.attempt,"): ",X.message]}):null,H!=null&&X.phase!=="idle"?E.jsx("p",{className:"rounded-md border border-border/60 bg-muted/40 px-2.5 py-2 text-xs text-muted-foreground",children:H}):null,N.length===0?E.jsx("p",{className:"text-xs text-muted-foreground",children:"No conversation messages yet."}):N.map(ne=>E.jsxs("div",{className:He("rounded-md border px-2.5 py-2",ne.role==="assistant"?"border-primary/20 bg-primary/[0.04]":"border-border/70 bg-background"),children:[E.jsx("div",{className:"mb-1 font-mono text-[0.65rem] uppercase tracking-wide text-muted-foreground",children:ne.role}),E.jsx("p",{className:"whitespace-pre-wrap font-sans text-xs leading-relaxed text-foreground",children:ne.text})]},ne.id))]})})}),E.jsxs("div",{className:"shrink-0 border-t p-3",children:[E.jsx("textarea",{value:Q,onChange:ne=>ee(ne.target.value),placeholder:"Continue this agent session...",className:"min-h-20 w-full resize-y rounded-md border border-border/60 bg-background px-2.5 py-2 font-sans text-xs leading-relaxed text-foreground outline-none transition placeholder:text-muted-foreground/50 focus:border-primary/30 focus:ring-2 focus:ring-primary/10"}),E.jsx("div",{className:"mt-2 flex justify-end",children:E.jsxs(zn,{type:"button",size:"sm",onClick:()=>{pe()},disabled:K==null||Q.trim().length===0||X.phase!=="idle",children:[E.jsx(SE,{className:"size-3.5"}),K!=null&&X.phase==="submitting"?"Sending...":"Send"]})})]})]})})]})}function F1({controlled:t,default:n,name:r,state:a="value"}){const{current:s}=R.useRef(t!==void 0),[u,c]=R.useState(n),h=s?t:u,d=R.useCallback(p=>{s||c(p)},[]);return[h,d]}const X1=R.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function yM(){return R.useContext(X1)}function _M(t){const{children:n,elementsRef:r,labelsRef:a,onMapChange:s}=t,u=Gt(s),c=R.useRef(0),h=Vr(SM).current,d=Vr(xM).current,[p,b]=R.useState(0),g=R.useRef(p),v=Gt((A,C)=>{d.set(A,C??null),g.current+=1,b(g.current)}),_=Gt(A=>{d.delete(A),g.current+=1,b(g.current)}),x=R.useMemo(()=>{const A=new Map;return Array.from(d.keys()).filter(k=>k.isConnected).sort(EM).forEach((k,I)=>{const M=d.get(k)??{};A.set(k,{...M,index:I})}),A},[d,p]);ft(()=>{if(typeof MutationObserver!="function"||x.size===0)return;const A=new MutationObserver(C=>{const k=new Set,I=M=>k.has(M)?k.delete(M):k.add(M);C.forEach(M=>{M.removedNodes.forEach(I),M.addedNodes.forEach(I)}),k.size===0&&(g.current+=1,b(g.current))});return x.forEach((C,k)=>{k.parentElement&&A.observe(k.parentElement,{childList:!0})}),()=>{A.disconnect()}},[x]),ft(()=>{g.current===p&&(r.current.length!==x.size&&(r.current.length=x.size),a&&a.current.length!==x.size&&(a.current.length=x.size),c.current=x.size),u(x)},[u,x,r,a,p]),ft(()=>()=>{r.current=[]},[r]),ft(()=>()=>{a&&(a.current=[])},[a]);const T=Gt(A=>(h.add(A),()=>{h.delete(A)}));ft(()=>{h.forEach(A=>A(x))},[h,x]);const O=R.useMemo(()=>({register:v,unregister:_,subscribeMapChange:T,elementsRef:r,labelsRef:a,nextIndexRef:c}),[v,_,T,r,a,c]);return E.jsx(X1.Provider,{value:O,children:n})}function xM(){return new Map}function SM(){return new Set}function EM(t,n){const r=t.compareDocumentPosition(n);return r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS?1:0}const W1=R.createContext(void 0);function Hh(){const t=R.useContext(W1);if(t===void 0)throw new Error($r(10));return t}const Q1="none",wM="trigger-press";function Bh(t,n,r,a){let s=!1,u=!1;const c=Pr;return{reason:t,event:n??new Event("base-ui"),cancel(){s=!0},allowPropagation(){u=!0},get isCanceled(){return s},get isPropagationAllowed(){return u},trigger:r,...c}}const CM={value:()=>null},AM=R.forwardRef(function(n,r){const{render:a,className:s,disabled:u=!1,hiddenUntilFound:c,keepMounted:h,loopFocus:d=!0,onValueChange:p,multiple:b=!1,orientation:g="vertical",value:v,defaultValue:_,...x}=n,T=vh(),O=R.useMemo(()=>{if(v===void 0)return _??[]},[v,_]),A=Gt(p),C=R.useRef([]),[k,I]=F1({controlled:v,default:O,name:"Accordion",state:"value"}),M=Gt((Q,ee)=>{const ie=Bh(Q1);if(b)if(ee){const V=k.slice();if(V.push(Q),A(V,ie),ie.isCanceled)return;I(V)}else{const V=k.filter(K=>K!==Q);if(A(V,ie),ie.isCanceled)return;I(V)}else{const V=k[0]===Q?[]:[Q];if(A(V,ie),ie.isCanceled)return;I(V)}}),U=R.useMemo(()=>({value:k,disabled:u,orientation:g}),[k,u,g]),H=R.useMemo(()=>({accordionItemRefs:C,direction:T,disabled:u,handleValueChange:M,hiddenUntilFound:c??!1,keepMounted:h??!1,loopFocus:d,orientation:g,state:U,value:k}),[T,u,M,c,h,d,g,U,k]),z=Wn("div",n,{state:U,ref:r,props:[{dir:T,role:"region"},x],stateAttributesMapping:CM});return E.jsx(W1.Provider,{value:H,children:E.jsx(_M,{elementsRef:C,children:z})})}),Ys=null;class kM{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=n=>{this.isScheduled=!1;const r=this.callbacks,a=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,a>0)for(let s=0;s<r.length;s+=1)r[s]?.(n)};request(n){const r=this.nextId;return this.nextId+=1,this.callbacks.push(n),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),r}cancel(n){const r=n-this.startId;r<0||r>=this.callbacks.length||(this.callbacks[r]=null,this.callbacksCount-=1)}}const Fs=new kM;class vt{static create(){return new vt}static request(n){return Fs.request(n)}static cancel(n){return Fs.cancel(n)}currentId=Ys;request(n){this.cancel(),this.currentId=Fs.request(()=>{this.currentId=Ys,n()})}cancel=()=>{this.currentId!==Ys&&(Fs.cancel(this.currentId),this.currentId=Ys)};disposeEffect=()=>this.cancel}function K1(){const t=Vr(vt.create).current;return ph(t.disposeEffect),t}function TM(t){return t==null?t:"current"in t?t.current:t}let hl=(function(t){return t.startingStyle="data-starting-style",t.endingStyle="data-ending-style",t})({});const RM={[hl.startingStyle]:""},LM={[hl.endingStyle]:""},NM={transitionStatus(t){return t==="starting"?RM:t==="ending"?LM:null}};function Z1(t,n=!1,r=!0){const a=K1();return Gt((s,u=null)=>{a.cancel();function c(){by.flushSync(s)}const h=TM(t);if(h==null)return;const d=h;if(typeof d.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)s();else{let g=function(){const _=hl.startingStyle;if(!d.hasAttribute(_)){a.request(v);return}const x=new MutationObserver(()=>{d.hasAttribute(_)||(x.disconnect(),v())});x.observe(d,{attributes:!0,attributeFilter:[_]}),u?.addEventListener("abort",()=>x.disconnect(),{once:!0})},v=function(){Promise.all(d.getAnimations().map(_=>_.finished)).then(()=>{u?.aborted||c()}).catch(()=>{const _=d.getAnimations();if(r){if(u?.aborted)return;c()}else _.length>0&&_.some(x=>x.pending||x.playState!=="finished")&&v()})};var p=g,b=v;if(n){g();return}a.request(v)}})}function MM(t,n=!1,r=!1){const[a,s]=R.useState(t&&n?"idle":void 0),[u,c]=R.useState(t);return t&&!u&&(c(!0),s("starting")),!t&&u&&a!=="ending"&&!r&&s("ending"),!t&&!u&&a==="ending"&&s(void 0),ft(()=>{if(!t&&u&&a!=="ending"&&r){const h=vt.request(()=>{s("ending")});return()=>{vt.cancel(h)}}},[t,u,a,r]),ft(()=>{if(!t||n)return;const h=vt.request(()=>{s(void 0)});return()=>{vt.cancel(h)}},[n,t]),ft(()=>{if(!t||!n)return;t&&u&&a!=="idle"&&s("starting");const h=vt.request(()=>{s("idle")});return()=>{vt.cancel(h)}},[n,t,u,s,a]),R.useMemo(()=>({mounted:u,setMounted:c,transitionStatus:a}),[u,a])}function OM(t){const{open:n,defaultOpen:r,onOpenChange:a,disabled:s}=t,u=n!==void 0,[c,h]=F1({controlled:n,default:r,name:"Collapsible",state:"open"}),{mounted:d,setMounted:p,transitionStatus:b}=MM(c,!0,!0),[g,v]=R.useState(c),[{height:_,width:x},T]=R.useState({height:void 0,width:void 0}),O=lu(),[A,C]=R.useState(),k=A??O,[I,M]=R.useState(!1),[U,H]=R.useState(!1),z=R.useRef(null),Q=R.useRef(null),ee=R.useRef(null),ie=R.useRef(null),V=Z1(ie,!1),K=Gt(oe=>{const te=!c,N=Bh(wM,oe.nativeEvent);if(a(te,N),N.isCanceled)return;const P=ie.current;Q.current==="css-animation"&&P!=null&&P.style.removeProperty("animation-name"),!I&&!U&&(Q.current!=null&&Q.current!=="css-animation"&&!d&&te&&p(!0),Q.current==="css-animation"&&(!g&&te&&v(!0),!d&&te&&p(!0))),h(te),Q.current==="none"&&d&&!te&&p(!1)});return ft(()=>{u&&Q.current==="none"&&!U&&!c&&p(!1)},[u,U,c,n,p]),R.useMemo(()=>({abortControllerRef:z,animationTypeRef:Q,disabled:s,handleTrigger:K,height:_,mounted:d,open:c,panelId:k,panelRef:ie,runOnceAnimationsFinish:V,setDimensions:T,setHiddenUntilFound:M,setKeepMounted:H,setMounted:p,setOpen:h,setPanelIdState:C,setVisible:v,transitionDimensionRef:ee,transitionStatus:b,visible:g,width:x}),[z,Q,s,K,_,d,c,k,ie,V,T,M,H,p,h,v,ee,b,g,x])}const J1=R.createContext(void 0);function e_(){const t=R.useContext(J1);if(t===void 0)throw new Error($r(15));return t}let DM=(function(t){return t[t.None=0]="None",t[t.GuessFromOrder=1]="GuessFromOrder",t})({});function IM(t={}){const{label:n,metadata:r,textRef:a,indexGuessBehavior:s,index:u}=t,{register:c,unregister:h,subscribeMapChange:d,elementsRef:p,labelsRef:b,nextIndexRef:g}=yM(),v=R.useRef(-1),[_,x]=R.useState(u??(s===DM.GuessFromOrder?()=>{if(v.current===-1){const A=g.current;g.current+=1,v.current=A}return v.current}:-1)),T=R.useRef(null),O=R.useCallback(A=>{if(T.current=A,_!==-1&&A!==null&&(p.current[_]=A,b)){const C=n!==void 0;b.current[_]=C?n:a?.current?.textContent??A.textContent}},[_,p,b,n,a]);return ft(()=>{if(u!=null)return;const A=T.current;if(A)return c(A,r),()=>{h(A)}},[u,c,h,r]),ft(()=>{if(u==null)return d(A=>{const C=T.current?A.get(T.current)?.index:null;C!=null&&x(C)})},[u,d,x]),R.useMemo(()=>({ref:O,index:_}),[_,O])}const t_=R.createContext(void 0);function Vh(){const t=R.useContext(t_);if(t===void 0)throw new Error($r(9));return t}let al=(function(t){return t.open="data-open",t.closed="data-closed",t[t.startingStyle=hl.startingStyle]="startingStyle",t[t.endingStyle=hl.endingStyle]="endingStyle",t})({}),zM=(function(t){return t.panelOpen="data-panel-open",t})({});const PM={[al.open]:""},jM={[al.closed]:""},UM={open(t){return t?{[zM.panelOpen]:""}:null}},HM={open(t){return t?PM:jM}};let BM=(function(t){return t.index="data-index",t.disabled="data-disabled",t.open="data-open",t})({});const Gh={...HM,index:t=>Number.isInteger(t)?{[BM.index]:String(t)}:null,...NM,value:()=>null},VM=R.forwardRef(function(n,r){const{className:a,disabled:s=!1,onOpenChange:u,render:c,value:h,...d}=n,{ref:p,index:b}=IM(),g=iu(r,p),{disabled:v,handleValueChange:_,state:x,value:T}=Hh(),O=lu(),A=h??O,C=s||v,k=R.useMemo(()=>{if(!T)return!1;for(let K=0;K<T.length;K+=1)if(T[K]===A)return!0;return!1},[T,A]),I=Gt((K,oe)=>{u?.(K,oe),!oe.isCanceled&&_(A,K)}),M=OM({open:k,onOpenChange:I,disabled:C}),U=R.useMemo(()=>({open:M.open,disabled:M.disabled,hidden:!M.mounted,transitionStatus:M.transitionStatus}),[M.open,M.disabled,M.mounted,M.transitionStatus]),H=R.useMemo(()=>({...M,onOpenChange:I,state:U}),[M,U,I]),z=R.useMemo(()=>({...x,index:b,disabled:C,open:k}),[C,b,k,x]),[Q,ee]=R.useState(lu()),ie=R.useMemo(()=>({open:k,state:z,setTriggerId:ee,triggerId:Q}),[k,z,ee,Q]),V=Wn("div",n,{state:z,ref:g,props:d,stateAttributesMapping:Gh});return E.jsx(J1.Provider,{value:H,children:E.jsx(t_.Provider,{value:ie,children:V})})}),GM=R.forwardRef(function(n,r){const{render:a,className:s,...u}=n,{state:c}=Vh();return Wn("h3",n,{state:c,ref:r,props:u,stateAttributesMapping:Gh})});function Iv(t){return t==null||t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true"}const $h="ArrowUp",qh="ArrowDown",Yh="ArrowLeft",Fh="ArrowRight",n_="Home",i_="End",$M=new Set([Yh,Fh]),qM=new Set([$h,qh]),YM=new Set([...$M,...qM]);[...YM];const FM=new Set([qh,$h,Fh,Yh,n_,i_]);function XM(t){const{current:n}=t,r=[];for(let a=0;a<n.length;a+=1){const s=n[a];if(!Iv(s)){const u=s?.querySelector('[type="button"], [role="button"]');u&&!Iv(u)&&r.push(u)}}return r}const WM=R.forwardRef(function(n,r){const{disabled:a,className:s,id:u,render:c,nativeButton:h=!0,...d}=n,{panelId:p,open:b,handleTrigger:g,disabled:v}=e_(),_=a??v,{getButtonProps:x,buttonRef:T}=Kv({disabled:_,focusableWhenDisabled:!0,native:h,composite:!0}),{accordionItemRefs:O,direction:A,loopFocus:C,orientation:k}=Hh(),I=A==="rtl",M=k==="horizontal",{state:U,setTriggerId:H,triggerId:z}=Vh();ft(()=>(u&&H(u),()=>{H(void 0)}),[u,H]);const Q=R.useMemo(()=>({"aria-controls":b?p:void 0,"aria-expanded":b,id:z,tabIndex:0,onClick:g,onKeyDown(ie){if(!FM.has(ie.key))return;jC(ie);const V=XM(O),oe=V.length-1;let te=-1;const N=V.indexOf(ie.target);function P(){C?te=N+1>oe?0:N+1:te=Math.min(N+1,oe)}function X(){C?te=N===0?oe:N-1:te=N-1}switch(ie.key){case qh:M||P();break;case $h:M||X();break;case Fh:M&&(I?X():P());break;case Yh:M&&(I?P():X());break;case"Home":te=0;break;case"End":te=oe;break}te>-1&&V[te].focus()}}),[O,g,z,M,I,C,b,p]);return Wn("button",n,{state:U,ref:[r,T],props:[Q,d,x],stateAttributesMapping:UM})});let QM=(function(t){return t.disabled="data-disabled",t.orientation="data-orientation",t})({});function KM(t){const{abortControllerRef:n,animationTypeRef:r,externalRef:a,height:s,hiddenUntilFound:u,keepMounted:c,id:h,mounted:d,onOpenChange:p,open:b,panelRef:g,runOnceAnimationsFinish:v,setDimensions:_,setMounted:x,setOpen:T,setVisible:O,transitionDimensionRef:A,visible:C,width:k}=t,I=R.useRef(!1),M=R.useRef(null),U=R.useRef(b),H=R.useRef(b),z=K1(),Q=R.useMemo(()=>r.current==="css-animation"?!C:!b&&!d,[b,d,C,r]),ee=Gt(V=>{if(!V)return;if(r.current==null||A.current==null){const te=getComputedStyle(V),N=te.animationName!=="none"&&te.animationName!=="",P=te.transitionDuration!=="0s"&&te.transitionDuration!=="";N&&P||(te.animationName==="none"&&te.transitionDuration!=="0s"?r.current="css-transition":te.animationName!=="none"&&te.transitionDuration==="0s"?r.current="css-animation":r.current="none"),V.getAttribute(QM.orientation)==="horizontal"||te.transitionProperty.indexOf("width")>-1?A.current="width":A.current="height"}if(r.current!=="css-transition")return;(s===void 0||k===void 0)&&(_({height:V.scrollHeight,width:V.scrollWidth}),H.current&&V.style.setProperty("transition-duration","0s"));let K=-1,oe=-1;return K=vt.request(()=>{H.current=!1,oe=vt.request(()=>{setTimeout(()=>{V.style.removeProperty("transition-duration")})})}),()=>{vt.cancel(K),vt.cancel(oe)}}),ie=iu(a,g,ee);return ft(()=>{if(r.current!=="css-transition")return;const V=g.current;if(!V)return;let K=-1;if(n.current!=null&&(n.current.abort(),n.current=null),b){const oe={"justify-content":V.style.justifyContent,"align-items":V.style.alignItems,"align-content":V.style.alignContent,"justify-items":V.style.justifyItems};Object.keys(oe).forEach(te=>{V.style.setProperty(te,"initial","important")}),!H.current&&!c&&V.setAttribute(al.startingStyle,""),_({height:V.scrollHeight,width:V.scrollWidth}),K=vt.request(()=>{Object.entries(oe).forEach(([te,N])=>{N===""?V.style.removeProperty(te):V.style.setProperty(te,N)})})}else{if(V.scrollHeight===0&&V.scrollWidth===0)return;_({height:V.scrollHeight,width:V.scrollWidth});const oe=new AbortController;n.current=oe;const te=oe.signal;let N=null;const P=al.endingStyle;return N=new MutationObserver(X=>{X.some(Z=>Z.type==="attributes"&&Z.attributeName===P)&&(N?.disconnect(),N=null,v(()=>{_({height:0,width:0}),V.style.removeProperty("content-visibility"),x(!1),n.current===oe&&(n.current=null)},te))}),N.observe(V,{attributes:!0,attributeFilter:[P]}),()=>{N?.disconnect(),z.cancel(),n.current===oe&&(oe.abort(),n.current=null)}}return()=>{vt.cancel(K)}},[n,r,z,u,c,d,b,g,v,_,x]),ft(()=>{if(r.current!=="css-animation")return;const V=g.current;V&&(M.current=V.style.animationName||M.current,V.style.setProperty("animation-name","none"),_({height:V.scrollHeight,width:V.scrollWidth}),!U.current&&!I.current&&V.style.removeProperty("animation-name"),b?(n.current!=null&&(n.current.abort(),n.current=null),x(!0),O(!0)):(n.current=new AbortController,v(()=>{x(!1),O(!1),n.current=null},n.current.signal)))},[n,r,b,g,v,_,x,O,C]),ph(()=>{const V=vt.request(()=>{U.current=!1});return()=>vt.cancel(V)}),ft(()=>{if(!u)return;const V=g.current;if(!V)return;let K=-1,oe=-1;return b&&I.current&&(V.style.transitionDuration="0s",_({height:V.scrollHeight,width:V.scrollWidth}),K=vt.request(()=>{I.current=!1,oe=vt.request(()=>{setTimeout(()=>{V.style.removeProperty("transition-duration")})})})),()=>{vt.cancel(K),vt.cancel(oe)}},[u,b,g,_]),ft(()=>{const V=g.current;V&&u&&Q&&(V.setAttribute("hidden","until-found"),r.current==="css-transition"&&V.setAttribute(al.startingStyle,""))},[u,Q,r,g]),R.useEffect(function(){const K=g.current;if(!K)return;function oe(te){I.current=!0,T(!0),p(!0,Bh(Q1,te))}return K.addEventListener("beforematch",oe),()=>{K.removeEventListener("beforematch",oe)}},[p,g,T]),R.useMemo(()=>({props:{hidden:Q,id:h,ref:ie}}),[Q,h,ie])}let zv=(function(t){return t.accordionPanelHeight="--accordion-panel-height",t.accordionPanelWidth="--accordion-panel-width",t})({});function ZM(t){const{enabled:n=!0,open:r,ref:a,onComplete:s}=t,u=Gt(s),c=Z1(a,r,!1);R.useEffect(()=>{if(!n)return;const h=new AbortController;return c(u,h.signal),()=>{h.abort()}},[n,r,u,c])}const JM=R.forwardRef(function(n,r){const{className:a,hiddenUntilFound:s,keepMounted:u,id:c,render:h,...d}=n,{hiddenUntilFound:p,keepMounted:b}=Hh(),{abortControllerRef:g,animationTypeRef:v,height:_,mounted:x,onOpenChange:T,open:O,panelId:A,panelRef:C,runOnceAnimationsFinish:k,setDimensions:I,setHiddenUntilFound:M,setKeepMounted:U,setMounted:H,setOpen:z,setVisible:Q,transitionDimensionRef:ee,visible:ie,width:V,setPanelIdState:K,transitionStatus:oe}=e_(),te=s??p,N=u??b;ft(()=>{if(c)return K(c),()=>{K(void 0)}},[c,K]),ft(()=>{M(te)},[M,te]),ft(()=>{U(N)},[U,N]),ZM({open:O&&oe==="idle",ref:C,onComplete(){O&&I({width:void 0,height:void 0})}});const{props:P}=KM({abortControllerRef:g,animationTypeRef:v,externalRef:r,height:_,hiddenUntilFound:te,id:c??A,keepMounted:N,mounted:x,onOpenChange:T,open:O,panelRef:C,runOnceAnimationsFinish:k,setDimensions:I,setMounted:H,setOpen:z,setVisible:Q,transitionDimensionRef:ee,visible:ie,width:V}),{state:X,triggerId:he}=Vh(),Z=R.useMemo(()=>({...X,transitionStatus:oe}),[X,oe]),L=Wn("div",n,{state:Z,ref:[r,C],props:[P,{"aria-labelledby":he,role:"region",style:{[zv.accordionPanelHeight]:_===void 0?"auto":`${_}px`,[zv.accordionPanelWidth]:V===void 0?"auto":`${V}px`}},d],stateAttributesMapping:Gh});return N||te||!N&&x?L:null});function r_({className:t,...n}){return E.jsx(AM,{"data-slot":"accordion",className:He("flex w-full flex-col",t),...n})}function a_({className:t,...n}){return E.jsx(VM,{"data-slot":"accordion-item",className:He("not-last:border-b",t),...n})}function o_({className:t,children:n,...r}){return E.jsx(GM,{className:"flex",children:E.jsxs(WM,{"data-slot":"accordion-trigger",className:He("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",t),...r,children:[n,E.jsx($v,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"}),E.jsx(YS,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"})]})})}function l_({className:t,children:n,...r}){return E.jsx(JM,{"data-slot":"accordion-content",className:"overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up",...r,children:E.jsx("div",{className:He("h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",t),children:n})})}const e8=t=>({"--diffs-bg-selection-override":t?"oklch(0.28 0 0 / 0.92)":"oklch(0.93 0 0 / 0.96)","--diffs-bg-selection-number-override":t?"oklch(0.34 0 0 / 0.96)":"oklch(0.89 0 0 / 0.98)","--diffs-bg-selection-background-override":t?"oklch(0.28 0 0 / 0.92)":"oklch(0.93 0 0 / 0.96)","--diffs-bg-selection-number-background-override":t?"oklch(0.34 0 0 / 0.96)":"oklch(0.89 0 0 / 0.98)","--diffs-selection-color-override":t?"oklch(0.97 0 0)":"oklch(0.20 0 0)","--diffs-bg-hover-override":t?"oklch(0.24 0 0 / 0.95)":"oklch(0.97 0 0 / 0.98)"}),Df=t=>`review-file-diff-${encodeURIComponent(t)}`,Pv=t=>({path:t,folders:new Map,files:[]}),s_=t=>{const n=Array.from(t.folders.values()).toSorted((a,s)=>a.path.localeCompare(s.path)).map(a=>{const s=a.path.lastIndexOf("/"),u=s===-1?a.path:a.path.slice(s+1);return{type:"folder",key:`folder:${a.path}`,path:a.path,name:u,items:s_(a)}}),r=[...t.files].toSorted((a,s)=>a.name.localeCompare(s.name));return[...n,...r]},t8=t=>{const n=Pv("");for(const[a,s]of t.entries()){const u=s.name.replace(/\\+/g,"/"),c=u.split("/").filter(_=>_.length>0),h=c.length===0?u:c[c.length-1]??u,d=c.slice(0,-1),p=wu(s,a),b=V1(s);let g=n,v="";for(const _ of d){v=v.length===0?_:`${v}/${_}`;const x=g.folders.get(_);if(x!=null){g=x;continue}const T=Pv(v);g.folders.set(_,T),g=T}g.files.push({type:"file",key:`file:${p}`,fileId:p,name:h,additions:b.additions,deletions:b.deletions})}const r=Array.from(n.folders.values()).toSorted((a,s)=>a.path.localeCompare(s.path)).map(a=>a.path);return{items:s_(n),defaultExpandedFolderPaths:r}},n8={position:"absolute",top:0,bottom:0,textAlign:"center"},i8={display:"contents"};function r8(t,n){return typeof window>"u"&&n!=null?E.jsxs(E.Fragment,{children:[E.jsx("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:n}}),t]}):E.jsx(E.Fragment,{children:t})}const a8=R.createContext(void 0);function o8(){return R.useContext(a8)}const l8=R.createContext(void 0);function s8(t){const n=R.useRef(t);return R.useInsertionEffect(()=>{n.current=t}),R.useCallback((...r)=>n.current(...r),[])}function u8({fileDiff:t,actions:n,deletionFile:r,additionFile:a,renderHeaderPrefix:s,renderHeaderMetadata:u,renderAnnotation:c,renderGutterUtility:h,renderHoverUtility:d,renderMergeConflictUtility:p,lineAnnotations:b,getHoveredLine:g,getInstance:v}){const _=h??d,x=s?.({fileDiff:t,deletionFile:r,additionFile:a}),T=u?.({fileDiff:t,deletionFile:r,additionFile:a});return E.jsxs(E.Fragment,{children:[x!=null&&E.jsx("div",{slot:_h,children:x}),T!=null&&E.jsx("div",{slot:xh,children:T}),c!=null&&b?.map((O,A)=>E.jsx("div",{slot:fl(O),children:c(O)},A)),n!=null&&p!=null&&v!=null&&n.map(O=>{const A=c8(O);return E.jsx("div",{slot:A,style:i8,children:p(O,v)},A)}),_!=null&&E.jsx("div",{slot:"gutter-utility-slot",style:n8,children:_(g)})]})}function c8(t){const n=qN(t);return n!=null?$N({...n,conflictIndex:t.conflictIndex}):void 0}const d8=typeof window>"u"?R.useEffect:R.useLayoutEffect;function f8({oldFile:t,newFile:n,fileDiff:r,options:a,lineAnnotations:s,selectedLines:u,prerenderedHTML:c,metrics:h}){const d=o8(),p=R.useContext(l8),b=R.useRef(null),g=s8(v=>{if(v!=null){if(b.current!=null)throw new Error("useFileDiffInstance: An instance should not already exist when a node is created");d!=null?b.current=new WN(a,d,h,p,!0):b.current=new B1(a,p,!0),b.current.hydrate({fileDiff:r,oldFile:t,newFile:n,fileContainer:v,lineAnnotations:s,prerenderedHTML:c})}else{if(b.current==null)throw new Error("useFileDiffInstance: A FileDiff instance should exist when unmounting");b.current.cleanUp(),b.current=null}});return d8(()=>{const{current:v}=b;if(v==null)return;const _=!JN(v.options,a);v.setOptions(a),v.render({forceRender:_,fileDiff:r,oldFile:t,newFile:n,lineAnnotations:s}),u!==void 0&&v.setSelectedLines(u)}),{ref:g,getHoveredLine:R.useCallback(()=>b.current?.getHoveredLine(),[])}}function h8({fileDiff:t,options:n,metrics:r,lineAnnotations:a,selectedLines:s,className:u,style:c,prerenderedHTML:h,renderAnnotation:d,renderHeaderPrefix:p,renderHeaderMetadata:b,renderGutterUtility:g,renderHoverUtility:v}){const{ref:_,getHoveredLine:x}=f8({fileDiff:t,options:n,metrics:r,lineAnnotations:a,selectedLines:s,prerenderedHTML:h});return E.jsx(uu,{ref:_,className:u,style:c,children:r8(u8({fileDiff:t,renderHeaderPrefix:p,renderHeaderMetadata:b,renderAnnotation:d,renderGutterUtility:g,lineAnnotations:a,renderHoverUtility:v,getHoveredLine:x}),h)})}function m8(t){const n=R.useRef(void 0),r=R.useRef(null),a=R.useCallback(()=>{r.current=null;const c=n.current??null;n.current=void 0,t(c)},[t]),s=R.useCallback(()=>{r.current!=null&&(cancelAnimationFrame(r.current),r.current=null),n.current=void 0},[]);return R.useEffect(()=>()=>{r.current!=null&&cancelAnimationFrame(r.current)},[]),{queueRange:R.useCallback(c=>{n.current=c,r.current==null&&(r.current=requestAnimationFrame(a))},[a]),clearQueuedRange:s}}function u_({additions:t,deletions:n,className:r}){return E.jsxs("span",{className:He("ml-auto flex shrink-0 items-center gap-1.5",r),children:[t>0?E.jsxs("span",{className:"text-green-600 dark:text-green-500",children:["+",t]}):null,n>0?E.jsxs("span",{className:"text-red-600 dark:text-red-400",children:["-",n]}):null]})}function p8(){const t=be(G=>G.draftSelection),n=be(G=>G.draftNoteBody),r=be(G=>G.setDraftNoteBody),a=be(G=>G.addNote),s=be(G=>G.addAgentSession),u=be(G=>G.setAgentMessages),c=be(G=>G.cancelNote),h=be(G=>G.agentStatus),d=be(G=>G.agentCatalog),p=be(G=>G.agentDraftTarget),b=be(G=>G.setAgentDraftTarget),g=R.useRef(null),v=R.useRef(null),_=R.useRef(null),x=R.useRef(null),T=R.useRef([]),O=R.useRef([]),[A,C]=R.useState(!1),[k,I]=R.useState(null),[M,U]=R.useState("note"),[H,z]=R.useState(!1),[Q,ee]=R.useState(""),[ie,V]=R.useState("providers"),[K,oe]=R.useState(0),[te,N]=R.useState(0),P=M==="agent",X=R.useMemo(()=>{if(d==null)return null;const G=p?.backendId??d.backends[0]?.id;return G==null?null:d.backends.find(we=>we.id===G)??null},[d,p]),he=R.useMemo(()=>X==null||p?.modelId==null?null:X.models.find(G=>G.id===p.modelId)??null,[X,p?.modelId]),Z=R.useMemo(()=>{if(X==null)return[];const G=Q.trim().toLowerCase();return G.length===0?X.models:X.models.filter(we=>we.label.toLowerCase().includes(G)||we.id.toLowerCase().includes(G))},[X,Q]),L=R.useMemo(()=>{const G=X?.label??"Choose provider",we=he?.label??p?.modelId??"Default model";return`${G} | ${we}`},[X?.label,p?.modelId,he?.label]),Y=R.useMemo(()=>{if(d==null||X==null)return 0;const G=d.backends.findIndex(we=>we.id===X.id);return G>=0?G:0},[X,d]),W=R.useMemo(()=>p?.modelId==null?-1:Z.findIndex(G=>G.id===p.modelId),[p?.modelId,Z]),re=R.useCallback(()=>{z(!1),V("providers"),requestAnimationFrame(()=>{v.current?.focus()})},[]);if(R.useEffect(()=>{if(!H)return;const G=it=>{const $e=it.target;$e instanceof Node&&(_.current?.contains($e)||(z(!1),V("providers")))},we=it=>{it.key==="Escape"&&re()};return window.addEventListener("pointerdown",G),window.addEventListener("keydown",we),()=>{window.removeEventListener("pointerdown",G),window.removeEventListener("keydown",we)}},[re,H]),R.useEffect(()=>{H&&oe(Y)},[Y,H]),R.useEffect(()=>{H&&N(W>=0?W:0)},[H,W]),R.useEffect(()=>{if(t!=null){const G=requestAnimationFrame(()=>{g.current?.focus()});return()=>cancelAnimationFrame(G)}},[t]),R.useEffect(()=>{P||(z(!1),ee(""),I(null))},[P]),t==null)return null;const le=(h?.available??!1)&&(d==null||X?.available===!0),ce=h!=null||d!=null,me=n.trim(),ge=G=>{if(d==null||d.backends.length===0)return;const we=Math.min(Math.max(G,0),d.backends.length-1);V("providers"),oe(we),requestAnimationFrame(()=>{T.current[we]?.focus()})},pe=G=>{if(Z.length===0){requestAnimationFrame(()=>{x.current?.focus()});return}const we=Math.min(Math.max(G,0),Z.length-1);V("models"),N(we),requestAnimationFrame(()=>{O.current[we]?.focus()})},ne=(G="providers")=>{z(!0),V(G),oe(Y),N(W>=0?W:0),ee(""),requestAnimationFrame(()=>{if(G==="models"){x.current?.focus();return}T.current[Y]?.focus()})},ve=G=>{if(d==null)return;const we=d.backends.find(it=>it.id===G);we!=null&&(b({backendId:we.id,modelId:we.defaultModelId,variant:null}),ee(""))},Ae=G=>{if(X==null)return;const we=p?.backendId===X.id?p.variant??null:null;b({backendId:X.id,modelId:G,variant:we}),re()},Ee=G=>{if(G.key==="ArrowDown"||G.key==="Enter"||G.key===" "){G.preventDefault(),ne("providers");return}if(G.key==="ArrowUp"){G.preventDefault(),ne("providers"),d!=null&&ge(d.backends.length-1);return}(G.key==="ArrowRight"||G.key==="/")&&(G.preventDefault(),ne("models"))},Ge=(G,we)=>{if(G.key==="ArrowDown"){G.preventDefault(),ge(we+1);return}if(G.key==="ArrowUp"){G.preventDefault(),ge(we-1);return}if(G.key==="ArrowRight"){G.preventDefault(),V("models"),requestAnimationFrame(()=>{x.current?.focus()});return}G.key==="Escape"&&(G.preventDefault(),re())},Xe=G=>{if(G.key==="ArrowDown"){G.preventDefault(),pe(te);return}if(G.key==="ArrowLeft"){G.preventDefault(),ge(K);return}G.key==="Escape"&&(G.preventDefault(),re())},st=(G,we)=>{if(G.key==="ArrowDown"){G.preventDefault(),pe(we+1);return}if(G.key==="ArrowUp"){if(G.preventDefault(),we===0){V("models"),requestAnimationFrame(()=>{x.current?.focus()});return}pe(we-1);return}if(G.key==="ArrowLeft"){G.preventDefault(),ge(K);return}G.key==="Escape"&&(G.preventDefault(),re())},dt=G=>{if(G.key==="Enter"&&(G.metaKey||G.ctrlKey)&&(G.preventDefault(),me.length>0)){if(P){Xt();return}a()}G.key==="Escape"&&(G.preventDefault(),c())},Xt=async()=>{if(!(!le||t==null||n.trim().length===0)){C(!0),I(null);try{const G=await Ni("/api/agents/session",{errorPrefix:"Failed to create agent session",method:"POST",body:{prompt:n.trim(),selection:{fileId:t.fileId,fileLabel:t.fileLabel,range:{...t.range}},...p==null?{}:{target:p}}}),we=s({backendId:G.session.backendId,backendSessionId:G.session.backendSessionId,modelId:G.session.modelId,variant:G.session.variant,title:G.session.title,prompt:n.trim(),fileId:t.fileId,fileLabel:t.fileLabel,range:{...t.range},createdAt:new Date(G.session.createdAt).toISOString(),updatedAt:new Date(G.session.updatedAt).toISOString()});u(we,G.messages)}catch(G){I(G instanceof Error?G.message:String(G))}finally{C(!1)}}};return E.jsx("div",{className:"px-3 py-3",children:E.jsxs("div",{className:"w-full max-w-[560px] rounded-lg border border-primary/20 bg-card shadow-md",children:[E.jsxs("div",{className:"flex items-center gap-2 border-b border-primary/10 bg-primary/[0.04] px-3.5 py-2",children:[E.jsx(dE,{className:"size-3.5 text-primary"}),E.jsx("div",{className:"font-sans text-xs font-medium text-primary",children:mM(t.range)}),ce?E.jsxs("div",{className:"ml-auto inline-flex items-center rounded-md border border-border/60 bg-background/70 p-0.5",children:[E.jsx("button",{type:"button",onClick:()=>U("note"),className:He("rounded px-2 py-1 font-sans text-[0.65rem] font-medium uppercase tracking-wide transition-colors",P?"text-muted-foreground hover:text-foreground":"bg-primary/15 text-foreground"),children:"Note"}),E.jsx("button",{type:"button",onClick:()=>U("agent"),className:He("rounded px-2 py-1 font-sans text-[0.65rem] font-medium uppercase tracking-wide transition-colors",P?"bg-primary/15 text-foreground":"text-muted-foreground hover:text-foreground"),children:"Agent"})]}):null]}),E.jsxs("div",{className:"p-3",children:[E.jsx("textarea",{ref:g,value:n,onChange:G=>{r(G.target.value),k&&I(null)},onKeyDown:dt,placeholder:P?"Ask agent about this selection... (Cmd+Enter to send, Esc to cancel)":"Leave a note... (Cmd+Enter to save, Esc to cancel)",className:"min-h-24 w-full resize-y rounded-md border border-border/60 bg-background px-3 py-2.5 font-sans text-sm leading-relaxed text-foreground outline-none transition placeholder:text-muted-foreground/50 focus:border-primary/30 focus:ring-2 focus:ring-primary/10"}),P&&k?E.jsx("p",{className:"mt-2 text-xs text-destructive",children:k}):null,P&&!le&&(X?.reason||h?.reason)?E.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Agent unavailable: ",X?.reason??h?.reason]}):null,E.jsxs("div",{className:"mt-2.5 flex items-end justify-between gap-2",children:[E.jsx("div",{className:"min-w-0 flex-1",ref:_,children:P&&d!=null?E.jsxs("div",{className:"relative max-w-[330px]",children:[E.jsxs("button",{ref:v,type:"button",onClick:()=>{if(H){re();return}ne("providers")},onKeyDown:Ee,"aria-haspopup":"dialog","aria-expanded":H,className:"flex h-8 w-full items-center justify-between rounded-md border border-border/60 bg-background px-2 text-xs text-foreground transition-colors hover:border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/20",children:[E.jsx("span",{className:"truncate text-left",children:L}),E.jsx($v,{className:He("ml-2 size-3.5 shrink-0 text-muted-foreground transition-transform",{"rotate-180":H})})]}),H?E.jsx("div",{className:"absolute bottom-full left-0 z-40 mb-1 w-[430px] max-w-[min(430px,calc(100vw-2.5rem))] overflow-hidden rounded-md border border-border/70 bg-popover shadow-xl",role:"dialog","aria-label":"Select provider and model",children:E.jsxs("div",{className:"grid grid-cols-[150px_minmax(0,1fr)]",children:[E.jsxs("div",{className:"border-r border-border/70",children:[E.jsx("div",{className:"border-b border-border/70 px-3 py-2 font-sans text-[0.68rem] uppercase tracking-wide text-muted-foreground",children:"Providers"}),E.jsx("div",{className:"max-h-52 space-y-1 overflow-y-auto p-1.5",role:"listbox","aria-label":"Providers",children:d.backends.map((G,we)=>{const it=X?.id===G.id;return E.jsxs("button",{ref:$e=>{T.current[we]=$e},type:"button",onClick:()=>ve(G.id),onFocus:()=>{V("providers"),oe(we)},onKeyDown:$e=>{Ge($e,we)},role:"option","aria-selected":it,className:He("flex w-full items-center justify-between rounded px-2 py-1.5 text-left font-sans text-xs transition-colors",it||ie==="providers"&&K===we?"bg-primary/10 text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[E.jsx("span",{className:"truncate",children:G.label}),G.available?null:E.jsx("span",{className:"ml-2 shrink-0 rounded bg-muted px-1 py-0.5 font-mono text-[0.58rem] uppercase text-muted-foreground",children:"off"})]},G.id)})})]}),E.jsxs("div",{className:"min-w-0",children:[E.jsx("div",{className:"border-b border-border/70 p-2",children:E.jsxs("div",{className:"relative",children:[E.jsx(_E,{className:"pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground/70"}),E.jsx("input",{ref:x,value:Q,onChange:G=>ee(G.target.value),onFocus:()=>V("models"),onKeyDown:Xe,placeholder:"Search model here",className:"h-8 w-full rounded border border-border/60 bg-background pl-7 pr-2 text-xs text-foreground outline-none focus:border-primary/30 focus:ring-2 focus:ring-primary/10"})]})}),E.jsx("div",{className:"max-h-52 overflow-y-auto p-1.5",children:X==null?E.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:"Select a provider first."}):Z.length===0?E.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:X.models.length===0?X.reason??"No models available for this provider yet.":"No models match your search."}):E.jsx("div",{className:"space-y-1",role:"listbox","aria-label":"Models",children:Z.map((G,we)=>{const it=p?.modelId===G.id;return E.jsxs("button",{ref:$e=>{O.current[we]=$e},type:"button",onClick:()=>Ae(G.id),onFocus:()=>{V("models"),N(we)},onKeyDown:$e=>{st($e,we)},role:"option","aria-selected":it,className:He("flex w-full items-center justify-between rounded px-2 py-1.5 text-left font-mono text-[0.68rem] transition-colors",it||ie==="models"&&te===we?"bg-primary/10 text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[E.jsx("span",{className:"truncate",children:G.label}),it?E.jsx(Gv,{className:"ml-2 size-3.5 shrink-0 text-primary"}):null]},G.id)})})})]})]})}):null]}):null}),E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(zn,{type:"button",size:"sm",variant:"ghost",onClick:c,className:"text-muted-foreground",children:"Cancel"}),E.jsxs(zn,{type:"button",size:"sm",variant:P?"secondary":"default",onClick:()=>{if(P){Xt();return}a()},disabled:me.length===0||P&&(!le||A),children:[P?E.jsx(nu,{className:"size-3.5"}):null,P?A?"Creating...":"Agent":"Add note"]})]})]})]})]})})}function g8({metadata:t}){return t.kind==="note"?E.jsx(b8,{noteId:t.noteId}):E.jsx(v8,{agentSessionId:t.agentSessionId})}function b8({noteId:t}){const n=be(R.useCallback(s=>s.notes.find(u=>u.id===t)??null,[t])),r=be(s=>s.activeNoteId),a=be(s=>s.selectNote);return n==null?null:E.jsx("div",{id:q1(n.id),className:"px-3 py-2",children:E.jsx(r_,{value:r===n.id?[n.id]:[],onValueChange:s=>a(s[0]??null),className:"w-full",children:E.jsxs(a_,{value:n.id,className:He("overflow-hidden rounded-lg border border-primary/15 bg-card",r===n.id&&"border-primary/25 bg-primary/[0.04]"),children:[E.jsx(o_,{className:"px-3 py-2 hover:bg-muted/20 hover:no-underline",children:E.jsx("span",{className:"truncate font-sans text-sm",children:Pu(n.range)})}),E.jsx(l_,{className:"px-3 pb-3",children:E.jsx("p",{className:"whitespace-pre-wrap font-sans text-sm leading-6 text-foreground",children:n.body})})]})})})}function v8({agentSessionId:t}){const n=be(R.useCallback(s=>s.agentSessions.find(u=>u.id===t)??null,[t])),r=be(s=>s.activeAgentSessionId),a=be(s=>s.selectAgentSession);return n==null?null:E.jsx("div",{id:Y1(n.id),className:"px-3 py-2",children:E.jsx("div",{className:He("overflow-hidden rounded-lg border border-primary/15 bg-card px-3 py-2.5",r===n.id&&"border-primary/25 bg-primary/[0.04]"),children:E.jsxs("div",{className:"flex items-center justify-between gap-2",children:[E.jsxs("div",{className:"min-w-0",children:[E.jsxs("div",{className:"flex items-center gap-1.5",children:[E.jsx(nu,{className:"size-3.5 text-primary"}),E.jsx("span",{className:"truncate font-sans text-sm font-medium",children:n.title})]}),E.jsx("p",{className:"mt-1 truncate font-mono text-[0.65rem] text-muted-foreground",children:Pu(n.range)})]}),E.jsx(zn,{type:"button",size:"sm",variant:"secondary",onClick:()=>a(n.id),children:"Open"})]})})})}const y8=`
|
|
1949
|
+
@media (pointer: fine) {
|
|
1950
|
+
[data-line][data-hovered] {
|
|
1951
|
+
background-color: var(--diffs-line-bg, var(--diffs-bg));
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
[data-column-number][data-hovered] {
|
|
1955
|
+
background-color: var(--diffs-bg);
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
[data-line-type='change-addition'][data-column-number][data-hovered] {
|
|
1959
|
+
background-color: var(--diffs-bg-addition-number);
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
[data-line-type='change-deletion'][data-column-number][data-hovered] {
|
|
1963
|
+
background-color: var(--diffs-bg-deletion-number);
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
[data-column-number][data-hovered]:hover {
|
|
1967
|
+
background-color: var(--diffs-bg-hover);
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
[data-background] [data-line-type='change-addition'][data-column-number][data-hovered]:hover {
|
|
1971
|
+
background-color: var(--diffs-bg-addition-hover);
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
[data-background] [data-line-type='change-deletion'][data-column-number][data-hovered]:hover {
|
|
1975
|
+
background-color: var(--diffs-bg-deletion-hover);
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
`;function _8({fileDiff:t,fileIndex:n,containerId:r,diffViewMode:a,isDarkMode:s,diffStyle:u}){const c=wu(t,n),h=nM(t),d=V1(t),p=iM(t,a),b=be(ee=>ee.notes),g=be(ee=>ee.agentSessions),v=be(ee=>ee.draftSelection?.fileId===c?ee.draftSelection:null),_=be(ee=>ee.activeSelection?.fileId===c?ee.activeSelection.range:null),x=be(ee=>ee.startSelection),T=be(ee=>ee.changeSelection),O=be(ee=>ee.endSelection),A=R.useMemo(()=>pM(c,b,g,v),[b,g,v,c]),C=R.useCallback(ee=>{T(c,h,ee)},[T,c,h]),{queueRange:k,clearQueuedRange:I}=m8(C),M=R.useCallback(()=>{I(),x()},[I,x]),U=R.useCallback(ee=>{k(ee)},[k]),H=R.useCallback(ee=>{I(),O(c,h,ee)},[I,O,c,h]),z=R.useMemo(()=>({diffStyle:a,disableFileHeader:!0,enableLineSelection:!0,hunkSeparators:"line-info-basic",lineDiffType:"word-alt",lineHoverHighlight:"both",overflow:"scroll",unsafeCSS:y8,onLineSelectionStart:M,onLineSelectionChange:U,onLineSelectionEnd:H,themeType:s?"dark":"light",theme:{light:"pierre-light",dark:"pierre-dark"}}),[a,U,H,M,s]),Q=R.useCallback(ee=>{const ie=ee.metadata;return ie.kind==="draft-note"?E.jsx(p8,{}):E.jsx(g8,{metadata:ie})},[]);return E.jsxs(a_,{id:r,value:c,className:"overflow-hidden rounded-lg border bg-card shadow-xs",children:[E.jsxs(o_,{className:"items-center gap-3 px-4 py-2.5 hover:bg-muted/20 hover:no-underline",children:[E.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs sm:text-[0.8125rem]",children:h}),E.jsx(u_,{additions:d.additions,deletions:d.deletions,className:"font-mono text-xs"})]}),E.jsx(l_,{className:"px-4 pb-4",children:E.jsx("div",{className:"overflow-hidden rounded-md border bg-background",children:E.jsx(h8,{fileDiff:p,className:"bg-background",style:u,lineAnnotations:A,selectedLines:_,renderAnnotation:Q,options:z})})})]})}function x8({items:t,activeFileId:n,expandedFolderPaths:r,isCollapsed:a,onFileSelect:s,onToggleFolder:u,onToggleCollapse:c}){const h=(d,p=0)=>d.map(b=>{const _=10+p*16;if(b.type==="folder"){const T=r.includes(b.path);return E.jsxs("div",{children:[E.jsxs("button",{type:"button",onClick:()=>u(b.path),className:"flex h-8 w-full items-center gap-1.5 rounded-md px-2 font-mono text-xs text-sidebar-foreground/75 transition-colors hover:bg-sidebar-accent/70 hover:text-sidebar-accent-foreground",style:{paddingLeft:_},children:[E.jsx(Qb,{className:He("size-3 shrink-0 transition-transform",T&&"rotate-90")}),E.jsx(aE,{className:"size-3.5 shrink-0 text-sidebar-primary/80"}),E.jsx("span",{className:"truncate",children:b.name})]}),T?E.jsx("div",{children:h(b.items,p+1)}):null]},b.key)}const x=b.fileId===n;return E.jsxs("button",{type:"button",onClick:()=>s(b.fileId),className:He("relative flex h-8 w-full items-center gap-1.5 rounded-md px-2 font-mono text-xs transition-colors",x?"bg-sidebar-accent/80 font-medium text-sidebar-accent-foreground ring-1 ring-sidebar-border":"text-sidebar-foreground/75 hover:bg-sidebar-accent/70 hover:text-sidebar-accent-foreground"),style:{paddingLeft:_},children:[x?E.jsx("span",{className:"absolute top-1 bottom-1 left-0 w-0.5 rounded-full bg-sidebar-primary"}):null,E.jsx(iE,{className:He("size-3.5 shrink-0",x?"text-sidebar-primary/80":"text-sidebar-foreground/45")}),E.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:b.name}),E.jsx(u_,{additions:b.additions,deletions:b.deletions,className:"text-[0.6875rem]"})]},b.key)});return E.jsx("aside",{className:He("shrink-0 transition-all duration-300 ease-in-out lg:sticky lg:top-4",a?"w-full lg:w-10":"w-full lg:w-72"),children:E.jsxs("div",{className:"flex flex-col overflow-hidden border bg-sidebar text-sidebar-foreground shadow-xs lg:h-[calc(100vh-9rem)]",children:[E.jsxs("div",{className:He("flex shrink-0 items-center px-2.5 py-2",a?"justify-center":"justify-between border-b"),children:[a?null:E.jsx("span",{className:"text-[0.6875rem] font-semibold uppercase tracking-wide text-sidebar-foreground/70",children:"Files"}),E.jsx(zn,{type:"button",variant:"ghost",size:"icon-sm","aria-label":a?"Expand file tree":"Collapse file tree",title:a?"Expand file tree":"Collapse file tree",className:"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",onClick:c,children:a?E.jsx(Qb,{}):E.jsx(qv,{})})]}),E.jsx("div",{className:He("flex-1 space-y-1 overflow-y-auto p-2 transition-opacity duration-300",a?"pointer-events-none opacity-0":"opacity-100"),children:h(t)})]})})}const jv=6;function S8({patch:t,parsedPatch:n,diffViewMode:r,isDarkMode:a}){const s=R.useMemo(()=>e8(a),[a]),u=be(M=>M.activeSelection),c=be(M=>M.activeNoteId),h=be(M=>M.activeAgentSessionId),d=n.data?.files??[],{items:p,defaultExpandedFolderPaths:b}=R.useMemo(()=>t8(d),[d]),g=R.useMemo(()=>(d.length>jv?d.slice(0,jv):d).map((U,H)=>wu(U,H)),[d]),[v,_]=R.useState(g),[x,T]=R.useState([...b]),[O,A]=R.useState(!1),C=u?.fileId??null,k=R.useMemo(()=>h!=null?Y1(h):c!=null?q1(c):null,[h,c]);R.useEffect(()=>{_(g)},[g]),R.useEffect(()=>{T([...b])},[b]),R.useEffect(()=>{C!=null&&_(M=>M.includes(C)?M:[...M,C])},[C]),R.useEffect(()=>{if(C==null||k==null)return;_(U=>U.includes(C)?U:[...U,C]);const M=requestAnimationFrame(()=>{const U=document.getElementById(k);if(U!=null){U.scrollIntoView({behavior:"smooth",block:"center"});return}document.getElementById(Df(C))?.scrollIntoView({behavior:"smooth",block:"start"})});return()=>{cancelAnimationFrame(M)}},[k,C]);const I=R.useCallback(M=>{_(U=>U.includes(M)?U:[...U,M]),requestAnimationFrame(()=>{document.getElementById(Df(M))?.scrollIntoView({behavior:"smooth",block:"start"})})},[]);return E.jsx(nl,{className:"min-h-0 flex-1",children:E.jsx("div",{className:"p-4",children:t.trim().length===0?E.jsxs(Va,{children:[E.jsx(tE,{}),E.jsx(Ga,{children:"No diff content was returned."}),E.jsx($a,{children:"The current review request resolved successfully, but there are no changes to show."})]}):n.error?E.jsxs(Va,{variant:"destructive",children:[E.jsx(el,{}),E.jsx(Ga,{children:"Diff parsing failed."}),E.jsx($a,{children:n.error})]}):E.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start ",children:[E.jsx(x8,{items:p,activeFileId:C,expandedFolderPaths:x,isCollapsed:O,onFileSelect:I,onToggleFolder:M=>{T(U=>U.includes(M)?U.filter(H=>H!==M):[...U,M])},onToggleCollapse:()=>{A(M=>!M)}}),E.jsx(r_,{multiple:!0,className:"min-w-0 flex-1 gap-3",value:v,onValueChange:M=>{if(Array.isArray(M)){_(M);return}_(M?[M]:[])},children:d.map((M,U)=>{const H=wu(M,U);return E.jsx(_8,{fileDiff:M,fileIndex:U,containerId:Df(H),diffViewMode:r,isDarkMode:a,diffStyle:s},H)})})]})})})}function ur({children:t}){return E.jsx("span",{className:"inline-flex items-center truncate rounded-md bg-muted/70 px-2 py-0.5 font-mono text-xs text-foreground/80",children:t})}function E8({source:t}){switch(t.kind){case"git":return E.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1.5",children:[E.jsxs("div",{className:"flex items-center gap-1.5",children:[E.jsx(lE,{className:"size-3.5 text-muted-foreground"}),E.jsx(ur,{children:t.repositoryPath})]}),E.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[E.jsx(ur,{children:t.baseCommitish}),E.jsx("span",{className:"text-muted-foreground/50",children:"→"}),E.jsx(ur,{children:t.targetCommitish})]})]});case"pull-request":return E.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1.5",children:[E.jsxs("div",{className:"flex items-center gap-1.5",children:[E.jsx(uE,{className:"size-3.5 text-muted-foreground"}),E.jsxs(ur,{children:[t.owner,"/",t.repo]})]}),E.jsxs(ur,{children:["#",t.pullNumber]}),E.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[E.jsxs(ur,{children:["head: ",t.headRefName]}),E.jsx("span",{className:"text-muted-foreground/50",children:"→"}),E.jsxs(ur,{children:["target: ",t.targetRefName]})]})]});case"stdin":return E.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1.5",children:E.jsxs("div",{className:"flex items-center gap-1.5",children:[E.jsx(AE,{className:"size-3.5 text-muted-foreground"}),E.jsx(ur,{children:t.stdinSource})]})})}}function w8({source:t,diffViewMode:n,onDiffViewModeChange:r}){const a=be(d=>d.notes.length),s=be(d=>d.agentSessions.length),u=be(d=>d.isPanelOpen),c=be(d=>d.togglePanel),h=a+s;return E.jsx("div",{className:"shrink-0 border-b px-4 py-2.5",children:E.jsxs("div",{className:"flex items-center justify-between gap-4",children:[E.jsx("div",{className:"min-w-0 flex-1",children:E.jsx(E8,{source:t})}),E.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[E.jsxs("div",{className:"flex items-center overflow-hidden rounded-lg border bg-muted/40 p-0.5",children:[E.jsxs("button",{type:"button","aria-label":"Unified layout",title:"Unified",onClick:()=>r("unified"),className:He("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-all",n==="unified"?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[E.jsx(vE,{className:"size-3.5"}),E.jsx("span",{className:"hidden sm:inline",children:"Unified"})]}),E.jsxs("button",{type:"button","aria-label":"Split layout",title:"Split",onClick:()=>r("split"),className:He("flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-all",n==="split"?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[E.jsx(JS,{className:"size-3.5"}),E.jsx("span",{className:"hidden sm:inline",children:"Split"})]})]}),E.jsxs(zn,{type:"button",variant:u?"secondary":"ghost",size:"sm","aria-label":"Toggle review panel",onClick:c,className:"gap-1.5",children:[E.jsx(If,{className:"size-3.5"}),E.jsx("span",{className:"hidden sm:inline",children:"Review"}),h>0?E.jsx("span",{className:"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-primary/10 px-1 font-mono text-[0.625rem] font-medium text-primary",children:h}):null]})]})]})})}const c_=320,C8=()=>typeof window>"u"?jh:Math.max(c_,Math.floor(window.innerWidth*.6)),Xs=t=>Math.min(Math.max(t,c_),C8());function A8({isDarkMode:t}){const{reviewSession:n,error:r,isLoading:a,parsedPatch:s,diffViewMode:u,setDiffViewMode:c,hasRestoredWorkspaceFromAnotherSnapshot:h,startFreshFromRestoredWorkspace:d,saveError:p}=$1(),b=be(Q=>Q.isPanelOpen),g=be(Q=>Q.panelWidthPx),v=be(Q=>Q.setPanelWidth),[_,x]=R.useState(!1),[T,O]=R.useState(null),[A,C]=R.useState({}),k=R.useRef(null),I=n?`${n.session.targetId}:${n.session.snapshotId}`:null,M=I!=null&&A[I]===!0,U=R.useMemo(()=>Xs(g),[g]),H=T??U;R.useEffect(()=>{if(!h||I==null||k.current===I||M)return;k.current=I;let Q="";Q=l0("Restored previous review state",{description:"Loaded notes, local UI state, and agent sessions from the latest snapshot for this target.",action:{label:"Undo",onClick:()=>{C(ie=>({...ie,[I]:!0})),d(),l0.dismiss(Q)}}})},[h,M,I,d]),R.useEffect(()=>{g!==U&&v(U)},[U,g,v]),R.useEffect(()=>{const Q=()=>{const ee=Xs(be.getState().panelWidthPx);ee!==be.getState().panelWidthPx&&be.getState().setPanelWidth(ee)};return window.addEventListener("resize",Q),()=>{window.removeEventListener("resize",Q)}},[]);const z=Q=>{const ee=N=>Xs(window.innerWidth-N);let ie=ee(Q);O(ie),x(!0);const V=document.body.style.cursor,K=document.body.style.userSelect;document.body.style.cursor="col-resize",document.body.style.userSelect="none";const oe=N=>{ie=ee(N.clientX),O(ie)},te=()=>{v(ie),O(null),x(!1),document.body.style.cursor=V,document.body.style.userSelect=K,window.removeEventListener("pointermove",oe),window.removeEventListener("pointerup",te),window.removeEventListener("pointercancel",te)};window.addEventListener("pointermove",oe),window.addEventListener("pointerup",te),window.addEventListener("pointercancel",te)};return a?E.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[E.jsx("div",{className:"shrink-0 px-4 py-2.5",children:E.jsx(Bf,{className:"h-4 w-64"})}),E.jsx("div",{className:"min-h-0 flex-1 p-4",children:E.jsx(Bf,{className:"h-full w-full"})})]}):r?E.jsxs(Va,{variant:"destructive",children:[E.jsx(el,{}),E.jsx(Ga,{children:"Review session failed to load."}),E.jsx($a,{children:r})]}):n?E.jsxs("div",{className:"flex h-full min-h-0",children:[E.jsxs("div",{className:"min-w-0 flex-1 flex flex-col",children:[p?E.jsx("div",{className:"px-4 pt-3",children:E.jsxs(Va,{variant:"destructive",children:[E.jsx(el,{}),E.jsx(Ga,{children:"Workspace save issue."}),E.jsx($a,{children:p})]})}):null,E.jsx(w8,{source:n.source,diffViewMode:u,onDiffViewModeChange:c}),E.jsx(S8,{patch:n.diff.patch,parsedPatch:s,diffViewMode:u,isDarkMode:t})]}),b?E.jsx("button",{type:"button","aria-label":"Resize review panel",onDoubleClick:()=>v(Xs(jh)),onPointerDown:Q=>{Q.button===0&&(Q.preventDefault(),z(Q.clientX))},className:He("relative z-10 w-1 shrink-0 cursor-col-resize border-l border-r border-transparent bg-transparent transition-colors","hover:border-border/70 hover:bg-border/40",_&&"border-border/70 bg-border/50"),style:{touchAction:"none"},children:E.jsx("span",{className:"sr-only",children:"Drag to resize"})}):null,E.jsx("div",{className:He("shrink-0 ease-in-out",_?"transition-none":"transition-all duration-300"),style:{width:b?`${H}px`:"0",overflow:b?"visible":"hidden"},children:E.jsx(vM,{})})]}):E.jsxs(Va,{children:[E.jsx(el,{}),E.jsx(Ga,{children:"No review session is available."}),E.jsx($a,{children:"Start the CLI again to open a review session."})]})}const k8={healthy:{pill:"border-emerald-500/25 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",dot:"bg-emerald-500"},warning:{pill:"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",dot:"bg-amber-500"},error:{pill:"border-rose-500/30 bg-rose-500/10 text-rose-700 dark:text-rose-300",dot:"bg-rose-500"}};function T8(){const{reviewStatus:t}=$1();if(t==null)return null;const n=k8[t.tone];return E.jsxs("div",{title:t.tooltip,"aria-label":t.tooltip,className:He("inline-flex h-7 items-center gap-1.5 rounded-full border px-2.5 text-[11px] font-medium tracking-tight cursor-help select-none",n.pill),children:[E.jsx("span",{className:He("size-1.5 rounded-full",n.dot),"aria-hidden":"true"}),E.jsx("span",{children:t.label})]})}function R8(t="/api/heartbeat"){R.useEffect(()=>{const n=new EventSource(yh(t));return()=>{n.close()}},[t])}const Uv=t=>t==="/dev"||t==="/debug"?"debug":"review";function L8(){const[t,n]=R.useState(()=>Uv(window.location.pathname));R.useEffect(()=>{const a=()=>{n(Uv(window.location.pathname))};return window.addEventListener("popstate",a),()=>{window.removeEventListener("popstate",a)}},[]);const r=R.useCallback(a=>{const u=`${a==="debug"?"/debug":"/"}${window.location.search}${window.location.hash}`;`${window.location.pathname}${window.location.search}${window.location.hash}`!==u&&window.history.pushState({},"",u),n(a)},[]);return{page:t,navigate:r}}const d_="opencr-theme",N8=()=>{if(typeof window>"u")return"light";const t=window.localStorage.getItem(d_);return t==="light"||t==="dark"?t:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"};function M8(){const[t,n]=R.useState(N8);R.useEffect(()=>{document.documentElement.classList.toggle("dark",t==="dark"),window.localStorage.setItem(d_,t)},[t]);const r=R.useCallback(()=>{n(a=>a==="dark"?"light":"dark")},[]);return{theme:t,isDarkMode:t==="dark",toggleTheme:r}}function O8(){const{page:t,navigate:n}=L8(),{theme:r,isDarkMode:a,toggleTheme:s}=M8();return R8(),E.jsxs("main",{className:"h-screen overflow-hidden bg-background",children:[E.jsx(fM,{children:E.jsxs("div",{className:"flex h-full w-full flex-col",children:[E.jsxs("header",{className:"flex h-11 shrink-0 items-center justify-between border-b px-4 sm:px-5",children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("div",{className:"flex size-6 items-center justify-center rounded-md bg-primary",children:E.jsx(KS,{className:"size-3.5 text-primary-foreground"})}),E.jsx("span",{className:"font-sans text-sm font-semibold tracking-tight text-foreground",children:"OpenCr"})]}),E.jsxs("div",{className:"flex items-center gap-1.5",children:[t==="debug"?E.jsx(zn,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Close debug view",onClick:()=>n("review"),children:E.jsx(LE,{})}):null,E.jsx(T8,{}),E.jsx(zn,{type:"button",variant:"ghost",size:"icon-sm","aria-label":r==="dark"?"Switch to light mode":"Switch to dark mode",onClick:s,children:r==="dark"?E.jsx(wE,{className:"size-4"}):E.jsx(mE,{className:"size-4"})})]})]}),E.jsx("div",{className:"min-h-0 flex-1",children:t==="review"?E.jsx(A8,{isDarkMode:a}):E.jsx(uA,{})})]})}),E.jsx(CC,{position:"bottom-right",theme:r})]})}const f_=document.getElementById("root");if(!f_)throw new Error("Root element not found");DS.createRoot(f_).render(E.jsx(fe.StrictMode,{children:E.jsx(O8,{})}));
|