difit 3.1.15 → 3.1.16
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/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/dist/client/assets/_basePickBy-BVuA6jQc.js +1 -0
- package/dist/client/assets/_baseUniq-djtzwinw.js +1 -0
- package/dist/client/assets/arc-BAMbYY65.js +1 -0
- package/dist/client/assets/architectureDiagram-2XIMDMQ5-DE9HunZw.js +36 -0
- package/dist/client/assets/blockDiagram-WCTKOSBZ-BafuvztL.js +132 -0
- package/dist/client/assets/c4Diagram-IC4MRINW-CwBpt4a3.js +10 -0
- package/dist/client/assets/channel-L7OljX7o.js +1 -0
- package/dist/client/assets/chunk-4BX2VUAB-CtCgAIjS.js +1 -0
- package/dist/client/assets/chunk-55IACEB6-D0rr4GYZ.js +1 -0
- package/dist/client/assets/chunk-FMBD7UC4-CFoYhYp3.js +15 -0
- package/dist/client/assets/chunk-JSJVCQXG-D4fFW7sB.js +1 -0
- package/dist/client/assets/chunk-KX2RTZJC-Kr8tlPNp.js +1 -0
- package/dist/client/assets/chunk-NQ4KR5QH-u5zKOXPF.js +220 -0
- package/dist/client/assets/chunk-QZHKN3VN-B6x9J7Ds.js +1 -0
- package/dist/client/assets/chunk-WL4C6EOR-kFVzh4L0.js +189 -0
- package/dist/client/assets/classDiagram-VBA2DB6C-CRDpCvk5.js +1 -0
- package/dist/client/assets/classDiagram-v2-RAHNMMFH-CRDpCvk5.js +1 -0
- package/dist/client/assets/clone-BGci2Dx0.js +1 -0
- package/dist/client/assets/cose-bilkent-S5V4N54A-Dy_rnI7s.js +1 -0
- package/dist/client/assets/cytoscape.esm-5J0xJHOV.js +321 -0
- package/dist/client/assets/dagre-KLK3FWXG-B8WseILQ.js +4 -0
- package/dist/client/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/client/assets/diagram-E7M64L7V-DkfE3QV8.js +24 -0
- package/dist/client/assets/diagram-IFDJBPK2-LLybCWfU.js +43 -0
- package/dist/client/assets/diagram-P4PSJMXO-Th2qIrB0.js +24 -0
- package/dist/client/assets/erDiagram-INFDFZHY-D7LPBy7z.js +70 -0
- package/dist/client/assets/flowDiagram-PKNHOUZH-pyYTtj2D.js +162 -0
- package/dist/client/assets/ganttDiagram-A5KZAMGK-Dv5h9Bsw.js +292 -0
- package/dist/client/assets/gitGraphDiagram-K3NZZRJ6-BDSFQbS9.js +65 -0
- package/dist/client/assets/graph-c8t45xc7.js +1 -0
- package/dist/client/assets/index-C-kmUuqG.js +92 -0
- package/dist/client/assets/{index-BLLDOT1h.css → index-CBGXonij.css} +1 -1
- package/dist/client/assets/infoDiagram-LFFYTUFH-ClzVHwdc.js +2 -0
- package/dist/client/assets/init-Gi6I4Gst.js +1 -0
- package/dist/client/assets/ishikawaDiagram-PHBUUO56-CLuxvi5h.js +70 -0
- package/dist/client/assets/journeyDiagram-4ABVD52K-Ca3qpNBP.js +139 -0
- package/dist/client/assets/kanban-definition-K7BYSVSG-rjz6-vZO.js +89 -0
- package/dist/client/assets/katex-C-M49wc6.js +261 -0
- package/dist/client/assets/layout-C2jzj6qY.js +1 -0
- package/dist/client/assets/linear-BmSVk2NP.js +1 -0
- package/dist/client/assets/mermaid.core-BA0DCisQ.js +249 -0
- package/dist/client/assets/mindmap-definition-YRQLILUH-DvmsmPiL.js +68 -0
- package/dist/client/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/client/assets/pieDiagram-SKSYHLDU-CQFtEcCx.js +30 -0
- package/dist/client/assets/{prism-csharp-CZZji5hr.js → prism-csharp-DEYqpNec.js} +1 -1
- package/dist/client/assets/prism-elixir-CM3yUAD8.js +1 -0
- package/dist/client/assets/{prism-hcl-C4BeI84H.js → prism-hcl-BmbK7K1f.js} +1 -1
- package/dist/client/assets/{prism-java-D7yNBm6C.js → prism-java-C_WzYmYM.js} +1 -1
- package/dist/client/assets/{prism-perl-CZI64w6i.js → prism-perl-Dlepj16W.js} +1 -1
- package/dist/client/assets/{prism-php-dNesT8V5.js → prism-php-C5Gn3FAI.js} +1 -1
- package/dist/client/assets/{prism-ruby-D15pg_tm.js → prism-ruby-Bd_tu_g8.js} +1 -1
- package/dist/client/assets/{prism-solidity-BC_GfpO6.js → prism-solidity-DsMBj3dc.js} +1 -1
- package/dist/client/assets/quadrantDiagram-337W2JSQ-D9imLHUm.js +7 -0
- package/dist/client/assets/requirementDiagram-Z7DCOOCP-D7q6ex20.js +73 -0
- package/dist/client/assets/sankeyDiagram-WA2Y5GQK-D_kdhn-o.js +10 -0
- package/dist/client/assets/sequenceDiagram-2WXFIKYE-D4x1rGPT.js +145 -0
- package/dist/client/assets/stateDiagram-RAJIS63D-DteWedWq.js +1 -0
- package/dist/client/assets/stateDiagram-v2-FVOUBMTO-WbkhZc-F.js +1 -0
- package/dist/client/assets/timeline-definition-YZTLITO2-BzTaoSaG.js +61 -0
- package/dist/client/assets/treemap-KZPCXAKY-B9sCJrf0.js +162 -0
- package/dist/client/assets/vennDiagram-LZ73GAT5-9h7-tugo.js +34 -0
- package/dist/client/assets/xychartDiagram-JWTSCODW-DiksRFCI.js +7 -0
- package/dist/client/index.html +2 -2
- package/dist/server/git-diff.js +2 -2
- package/dist/server/git-diff.test.js +14 -0
- package/package.json +6 -5
- package/dist/client/assets/index-jDO2gvEC.js +0 -92
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
function RS(e,r){for(var l=0;l<r.length;l++){const i=r[l];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const u=Object.getOwnPropertyDescriptor(i,o);u&&Object.defineProperty(e,o,u.get?u:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function l(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(o){if(o.ep)return;o.ep=!0;const u=l(o);fetch(o.href,u)}})();function lu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Df={exports:{}},ja={};var Lb;function _S(){if(Lb)return ja;Lb=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function l(i,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var f in o)f!=="key"&&(u[f]=o[f])}else u=o;return o=u.ref,{$$typeof:e,type:i,key:c,ref:o!==void 0?o:null,props:u}}return ja.Fragment=r,ja.jsx=l,ja.jsxs=l,ja}var Db;function LS(){return Db||(Db=1,Df.exports=_S()),Df.exports}var y=LS(),Of={exports:{}},Re={};var Ob;function DS(){if(Ob)return Re;Ob=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),v=Symbol.iterator;function x(D){return D===null||typeof D!="object"?null:(D=v&&D[v]||D["@@iterator"],typeof D=="function"?D:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,N={};function E(D,q,A){this.props=D,this.context=q,this.refs=N,this.updater=A||S}E.prototype.isReactComponent={},E.prototype.setState=function(D,q){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,q,"setState")},E.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function C(){}C.prototype=E.prototype;function j(D,q,A){this.props=D,this.context=q,this.refs=N,this.updater=A||S}var z=j.prototype=new C;z.constructor=j,w(z,E.prototype),z.isPureReactComponent=!0;var I=Array.isArray;function L(){}var O={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function P(D,q,A){var te=A.ref;return{$$typeof:e,type:D,key:q,ref:te!==void 0?te:null,props:A}}function F(D,q){return P(D.type,q,D.props)}function H(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function G(D){var q={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(A){return q[A]})}var Q=/\/+/g;function U(D,q){return typeof D=="object"&&D!==null&&D.key!=null?G(""+D.key):q.toString(36)}function Y(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(L,L):(D.status="pending",D.then(function(q){D.status==="pending"&&(D.status="fulfilled",D.value=q)},function(q){D.status==="pending"&&(D.status="rejected",D.reason=q)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function B(D,q,A,te,le){var fe=typeof D;(fe==="undefined"||fe==="boolean")&&(D=null);var me=!1;if(D===null)me=!0;else switch(fe){case"bigint":case"string":case"number":me=!0;break;case"object":switch(D.$$typeof){case e:case r:me=!0;break;case m:return me=D._init,B(me(D._payload),q,A,te,le)}}if(me)return le=le(D),me=te===""?"."+U(D,0):te,I(le)?(A="",me!=null&&(A=me.replace(Q,"$&/")+"/"),B(le,q,A,"",function(ge){return ge})):le!=null&&(H(le)&&(le=F(le,A+(le.key==null||D&&D.key===le.key?"":(""+le.key).replace(Q,"$&/")+"/")+me)),q.push(le)),1;me=0;var ye=te===""?".":te+":";if(I(D))for(var pe=0;pe<D.length;pe++)te=D[pe],fe=ye+U(te,pe),me+=B(te,q,A,fe,le);else if(pe=x(D),typeof pe=="function")for(D=pe.call(D),pe=0;!(te=D.next()).done;)te=te.value,fe=ye+U(te,pe++),me+=B(te,q,A,fe,le);else if(fe==="object"){if(typeof D.then=="function")return B(Y(D),q,A,te,le);throw q=String(D),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return me}function X(D,q,A){if(D==null)return D;var te=[],le=0;return B(D,te,"","",function(fe){return q.call(A,fe,le++)}),te}function M(D){if(D._status===-1){var q=D._result;q=q(),q.then(function(A){(D._status===0||D._status===-1)&&(D._status=1,D._result=A)},function(A){(D._status===0||D._status===-1)&&(D._status=2,D._result=A)}),D._status===-1&&(D._status=0,D._result=q)}if(D._status===1)return D._result.default;throw D._result}var V=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},R={map:X,forEach:function(D,q,A){X(D,function(){q.apply(this,arguments)},A)},count:function(D){var q=0;return X(D,function(){q++}),q},toArray:function(D){return X(D,function(q){return q})||[]},only:function(D){if(!H(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return Re.Activity=b,Re.Children=R,Re.Component=E,Re.Fragment=l,Re.Profiler=o,Re.PureComponent=j,Re.StrictMode=i,Re.Suspense=h,Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,Re.__COMPILER_RUNTIME={__proto__:null,c:function(D){return O.H.useMemoCache(D)}},Re.cache=function(D){return function(){return D.apply(null,arguments)}},Re.cacheSignal=function(){return null},Re.cloneElement=function(D,q,A){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var te=w({},D.props),le=D.key;if(q!=null)for(fe in q.key!==void 0&&(le=""+q.key),q)!Z.call(q,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&q.ref===void 0||(te[fe]=q[fe]);var fe=arguments.length-2;if(fe===1)te.children=A;else if(1<fe){for(var me=Array(fe),ye=0;ye<fe;ye++)me[ye]=arguments[ye+2];te.children=me}return P(D.type,le,te)},Re.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:u,_context:D},D},Re.createElement=function(D,q,A){var te,le={},fe=null;if(q!=null)for(te in q.key!==void 0&&(fe=""+q.key),q)Z.call(q,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(le[te]=q[te]);var me=arguments.length-2;if(me===1)le.children=A;else if(1<me){for(var ye=Array(me),pe=0;pe<me;pe++)ye[pe]=arguments[pe+2];le.children=ye}if(D&&D.defaultProps)for(te in me=D.defaultProps,me)le[te]===void 0&&(le[te]=me[te]);return P(D,fe,le)},Re.createRef=function(){return{current:null}},Re.forwardRef=function(D){return{$$typeof:f,render:D}},Re.isValidElement=H,Re.lazy=function(D){return{$$typeof:m,_payload:{_status:-1,_result:D},_init:M}},Re.memo=function(D,q){return{$$typeof:p,type:D,compare:q===void 0?null:q}},Re.startTransition=function(D){var q=O.T,A={};O.T=A;try{var te=D(),le=O.S;le!==null&&le(A,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(L,V)}catch(fe){V(fe)}finally{q!==null&&A.types!==null&&(q.types=A.types),O.T=q}},Re.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},Re.use=function(D){return O.H.use(D)},Re.useActionState=function(D,q,A){return O.H.useActionState(D,q,A)},Re.useCallback=function(D,q){return O.H.useCallback(D,q)},Re.useContext=function(D){return O.H.useContext(D)},Re.useDebugValue=function(){},Re.useDeferredValue=function(D,q){return O.H.useDeferredValue(D,q)},Re.useEffect=function(D,q){return O.H.useEffect(D,q)},Re.useEffectEvent=function(D){return O.H.useEffectEvent(D)},Re.useId=function(){return O.H.useId()},Re.useImperativeHandle=function(D,q,A){return O.H.useImperativeHandle(D,q,A)},Re.useInsertionEffect=function(D,q){return O.H.useInsertionEffect(D,q)},Re.useLayoutEffect=function(D,q){return O.H.useLayoutEffect(D,q)},Re.useMemo=function(D,q){return O.H.useMemo(D,q)},Re.useOptimistic=function(D,q){return O.H.useOptimistic(D,q)},Re.useReducer=function(D,q,A){return O.H.useReducer(D,q,A)},Re.useRef=function(D){return O.H.useRef(D)},Re.useState=function(D){return O.H.useState(D)},Re.useSyncExternalStore=function(D,q,A){return O.H.useSyncExternalStore(D,q,A)},Re.useTransition=function(){return O.H.useTransition()},Re.version="19.2.4",Re}var Mb;function ch(){return Mb||(Mb=1,Of.exports=DS()),Of.exports}var T=ch();const Qt=lu(T),qx=RS({__proto__:null,default:Qt},[T]);var Mf={exports:{}},Ra={},zf={exports:{}},Ff={};var zb;function OS(){return zb||(zb=1,(function(e){function r(B,X){var M=B.length;B.push(X);e:for(;0<M;){var V=M-1>>>1,R=B[V];if(0<o(R,X))B[V]=X,B[M]=R,M=V;else break e}}function l(B){return B.length===0?null:B[0]}function i(B){if(B.length===0)return null;var X=B[0],M=B.pop();if(M!==X){B[0]=M;e:for(var V=0,R=B.length,D=R>>>1;V<D;){var q=2*(V+1)-1,A=B[q],te=q+1,le=B[te];if(0>o(A,M))te<R&&0>o(le,A)?(B[V]=le,B[te]=M,V=te):(B[V]=A,B[q]=M,V=q);else if(te<R&&0>o(le,M))B[V]=le,B[te]=M,V=te;else break e}}return X}function o(B,X){var M=B.sortIndex-X.sortIndex;return M!==0?M:B.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var h=[],p=[],m=1,b=null,v=3,x=!1,S=!1,w=!1,N=!1,E=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function z(B){for(var X=l(p);X!==null;){if(X.callback===null)i(p);else if(X.startTime<=B)i(p),X.sortIndex=X.expirationTime,r(h,X);else break;X=l(p)}}function I(B){if(w=!1,z(B),!S)if(l(h)!==null)S=!0,L||(L=!0,G());else{var X=l(p);X!==null&&Y(I,X.startTime-B)}}var L=!1,O=-1,Z=5,P=-1;function F(){return N?!0:!(e.unstable_now()-P<Z)}function H(){if(N=!1,L){var B=e.unstable_now();P=B;var X=!0;try{e:{S=!1,w&&(w=!1,C(O),O=-1),x=!0;var M=v;try{t:{for(z(B),b=l(h);b!==null&&!(b.expirationTime>B&&F());){var V=b.callback;if(typeof V=="function"){b.callback=null,v=b.priorityLevel;var R=V(b.expirationTime<=B);if(B=e.unstable_now(),typeof R=="function"){b.callback=R,z(B),X=!0;break t}b===l(h)&&i(h),z(B)}else i(h);b=l(h)}if(b!==null)X=!0;else{var D=l(p);D!==null&&Y(I,D.startTime-B),X=!1}}break e}finally{b=null,v=M,x=!1}X=void 0}}finally{X?G():L=!1}}}var G;if(typeof j=="function")G=function(){j(H)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,U=Q.port2;Q.port1.onmessage=H,G=function(){U.postMessage(null)}}else G=function(){E(H,0)};function Y(B,X){O=E(function(){B(e.unstable_now())},X)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(B){switch(v){case 1:case 2:case 3:var X=3;break;default:X=v}var M=v;v=X;try{return B()}finally{v=M}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(B,X){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var M=v;v=B;try{return X()}finally{v=M}},e.unstable_scheduleCallback=function(B,X,M){var V=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?V+M:V):M=V,B){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=M+R,B={id:m++,callback:X,priorityLevel:B,startTime:M,expirationTime:R,sortIndex:-1},M>V?(B.sortIndex=M,r(p,B),l(h)===null&&B===l(p)&&(w?(C(O),O=-1):w=!0,Y(I,M-V))):(B.sortIndex=R,r(h,B),S||x||(S=!0,L||(L=!0,G()))),B},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(B){var X=v;return function(){var M=v;v=X;try{return B.apply(this,arguments)}finally{v=M}}}})(Ff)),Ff}var Fb;function MS(){return Fb||(Fb=1,zf.exports=OS()),zf.exports}var Bf={exports:{}},Ut={};var Bb;function zS(){if(Bb)return Ut;Bb=1;var e=ch();function r(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)p+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var i={d:{f:l,r:function(){throw Error(r(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(h,p,m){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:b==null?null:""+b,children:h,containerInfo:p,implementation:m}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Ut.createPortal=function(h,p){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return u(h,p,null,m)},Ut.flushSync=function(h){var p=c.T,m=i.p;try{if(c.T=null,i.p=2,h)return h()}finally{c.T=p,i.p=m,i.d.f()}},Ut.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(h,p))},Ut.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},Ut.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var m=p.as,b=f(m,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,x=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;m==="style"?i.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:b,integrity:v,fetchPriority:x}):m==="script"&&i.d.X(h,{crossOrigin:b,integrity:v,fetchPriority:x,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Ut.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var m=f(p.as,p.crossOrigin);i.d.M(h,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(h)},Ut.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var m=p.as,b=f(m,p.crossOrigin);i.d.L(h,m,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Ut.preloadModule=function(h,p){if(typeof h=="string")if(p){var m=f(p.as,p.crossOrigin);i.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(h)},Ut.requestFormReset=function(h){i.d.r(h)},Ut.unstable_batchedUpdates=function(h,p){return h(p)},Ut.useFormState=function(h,p,m){return c.H.useFormState(h,p,m)},Ut.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ut.version="19.2.4",Ut}var Ib;function Px(){if(Ib)return Bf.exports;Ib=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),Bf.exports=zS(),Bf.exports}var Ub;function FS(){if(Ub)return Ra;Ub=1;var e=MS(),r=ch(),l=Px();function i(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var n=t,a=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(a=n.return),t=n.return;while(t)}return n.tag===3?a:null}function c(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function f(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function h(t){if(u(t)!==t)throw Error(i(188))}function p(t){var n=t.alternate;if(!n){if(n=u(t),n===null)throw Error(i(188));return n!==t?null:t}for(var a=t,s=n;;){var d=a.return;if(d===null)break;var g=d.alternate;if(g===null){if(s=d.return,s!==null){a=s;continue}break}if(d.child===g.child){for(g=d.child;g;){if(g===a)return h(d),t;if(g===s)return h(d),n;g=g.sibling}throw Error(i(188))}if(a.return!==s.return)a=d,s=g;else{for(var k=!1,_=d.child;_;){if(_===a){k=!0,a=d,s=g;break}if(_===s){k=!0,s=d,a=g;break}_=_.sibling}if(!k){for(_=g.child;_;){if(_===a){k=!0,a=g,s=d;break}if(_===s){k=!0,s=g,a=d;break}_=_.sibling}if(!k)throw Error(i(189))}}if(a.alternate!==s)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?t:n}function m(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=m(t),n!==null)return n;t=t.sibling}return null}var b=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),j=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function G(t){return t===null||typeof t!="object"?null:(t=H&&t[H]||t["@@iterator"],typeof t=="function"?t:null)}var Q=Symbol.for("react.client.reference");function U(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Q?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case w:return"Fragment";case E:return"Profiler";case N:return"StrictMode";case I:return"Suspense";case L:return"SuspenseList";case P:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case S:return"Portal";case j:return t.displayName||"Context";case C:return(t._context.displayName||"Context")+".Consumer";case z:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case O:return n=t.displayName||null,n!==null?n:U(t.type)||"Memo";case Z:n=t._payload,t=t._init;try{return U(t(n))}catch{}}return null}var Y=Array.isArray,B=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M={pending:!1,data:null,method:null,action:null},V=[],R=-1;function D(t){return{current:t}}function q(t){0>R||(t.current=V[R],V[R]=null,R--)}function A(t,n){R++,V[R]=t.current,t.current=n}var te=D(null),le=D(null),fe=D(null),me=D(null);function ye(t,n){switch(A(fe,n),A(le,t),A(te,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?tb(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=tb(n),t=nb(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}q(te),A(te,t)}function pe(){q(te),q(le),q(fe)}function ge(t){t.memoizedState!==null&&A(me,t);var n=te.current,a=nb(n,t.type);n!==a&&(A(le,t),A(te,a))}function xe(t){le.current===t&&(q(te),q(le)),me.current===t&&(q(me),Ca._currentValue=M)}var de,we;function Ee(t){if(de===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);de=n&&n[1]||"",we=-1<a.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+de+t+we}var $e=!1;function Ke(t,n){if(!t||$e)return"";$e=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(n){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ie){var ne=ie}Reflect.construct(t,[],ce)}else{try{ce.call()}catch(ie){ne=ie}t.call(ce.prototype)}}else{try{throw Error()}catch(ie){ne=ie}(ce=t())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ie){if(ie&&ne&&typeof ie.stack=="string")return[ie.stack,ne.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=s.DetermineComponentFrameRoot(),k=g[0],_=g[1];if(k&&_){var $=k.split(`
|
|
4
|
-
`),ee=_.split(`
|
|
5
|
-
`);for(d=s=0;s<$.length&&!$[s].includes("DetermineComponentFrameRoot");)s++;for(;d<ee.length&&!ee[d].includes("DetermineComponentFrameRoot");)d++;if(s===$.length||d===ee.length)for(s=$.length-1,d=ee.length-1;1<=s&&0<=d&&$[s]!==ee[d];)d--;for(;1<=s&&0<=d;s--,d--)if($[s]!==ee[d]){if(s!==1||d!==1)do if(s--,d--,0>d||$[s]!==ee[d]){var oe=`
|
|
6
|
-
`+$[s].replace(" at new "," at ");return t.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",t.displayName)),oe}while(1<=s&&0<=d);break}}}finally{$e=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?Ee(a):""}function Me(t,n){switch(t.tag){case 26:case 27:case 5:return Ee(t.type);case 16:return Ee("Lazy");case 13:return t.child!==n&&n!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return Ke(t.type,!1);case 11:return Ke(t.type.render,!1);case 1:return Ke(t.type,!0);case 31:return Ee("Activity");default:return""}}function Bt(t){try{var n="",a=null;do n+=Me(t,a),a=t,t=t.return;while(t);return n}catch(s){return`
|
|
7
|
-
Error generating stack: `+s.message+`
|
|
8
|
-
`+s.stack}}var pt=Object.prototype.hasOwnProperty,gt=e.unstable_scheduleCallback,Gt=e.unstable_cancelCallback,Yt=e.unstable_shouldYield,tt=e.unstable_requestPaint,at=e.unstable_now,nr=e.unstable_getCurrentPriorityLevel,ae=e.unstable_ImmediatePriority,be=e.unstable_UserBlockingPriority,Te=e.unstable_NormalPriority,Oe=e.unstable_LowPriority,Ve=e.unstable_IdlePriority,Lt=e.log,zn=e.unstable_setDisableYieldValue,Dt=null,mt=null;function It(t){if(typeof Lt=="function"&&zn(t),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(Dt,t)}catch{}}var Je=Math.clz32?Math.clz32:Fi,Pn=Math.log,fn=Math.LN2;function Fi(t){return t>>>=0,t===0?32:31-(Pn(t)/fn|0)|0}var Ar=256,Il=262144,Tr=4194304;function Fn(t){var n=t&42;if(n!==0)return n;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function jr(t,n,a){var s=t.pendingLanes;if(s===0)return 0;var d=0,g=t.suspendedLanes,k=t.pingedLanes;t=t.warmLanes;var _=s&134217727;return _!==0?(s=_&~g,s!==0?d=Fn(s):(k&=_,k!==0?d=Fn(k):a||(a=_&~t,a!==0&&(d=Fn(a))))):(_=s&~g,_!==0?d=Fn(_):k!==0?d=Fn(k):a||(a=s&~t,a!==0&&(d=Fn(a)))),d===0?0:n!==0&&n!==d&&(n&g)===0&&(g=d&-d,a=n&-n,g>=a||g===32&&(a&4194048)!==0)?n:d}function $n(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function ku(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Bi(){var t=Tr;return Tr<<=1,(Tr&62914560)===0&&(Tr=4194304),t}function fl(t){for(var n=[],a=0;31>a;a++)n.push(t);return n}function dl(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function ro(t,n,a,s,d,g){var k=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var _=t.entanglements,$=t.expirationTimes,ee=t.hiddenUpdates;for(a=k&~a;0<a;){var oe=31-Je(a),ce=1<<oe;_[oe]=0,$[oe]=-1;var ne=ee[oe];if(ne!==null)for(ee[oe]=null,oe=0;oe<ne.length;oe++){var ie=ne[oe];ie!==null&&(ie.lane&=-536870913)}a&=~ce}s!==0&&Ii(t,s,0),g!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=g&~(k&~n))}function Ii(t,n,a){t.pendingLanes|=n,t.suspendedLanes&=~n;var s=31-Je(n);t.entangledLanes|=n,t.entanglements[s]=t.entanglements[s]|1073741824|a&261930}function Jt(t,n){var a=t.entangledLanes|=n;for(t=t.entanglements;a;){var s=31-Je(a),d=1<<s;d&n|t[s]&n&&(t[s]|=n),a&=~d}}function lo(t,n){var a=n&-n;return a=(a&42)!==0?1:Ul(a),(a&(t.suspendedLanes|n))!==0?0:a}function Ul(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Vn(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function io(){var t=X.p;return t!==0?t:(t=window.event,t===void 0?32:Cb(t.type))}function ao(t,n){var a=X.p;try{return X.p=t,n()}finally{X.p=a}}var Gn=Math.random().toString(36).slice(2),Tt="__reactFiber$"+Gn,wt="__reactProps$"+Gn,rr="__reactContainer$"+Gn,Hl="__reactEvents$"+Gn,Eu="__reactListeners$"+Gn,Ui="__reactHandles$"+Gn,oo="__reactResources$"+Gn,hl="__reactMarker$"+Gn;function Hi(t){delete t[Tt],delete t[wt],delete t[Hl],delete t[Eu],delete t[Ui]}function Rr(t){var n=t[Tt];if(n)return n;for(var a=t.parentNode;a;){if(n=a[rr]||a[Tt]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(t=ub(t);t!==null;){if(a=t[Tt])return a;t=ub(t)}return n}t=a,a=t.parentNode}return null}function _r(t){if(t=t[Tt]||t[rr]){var n=t.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return t}return null}function re(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(i(33))}function ve(t){var n=t[oo];return n||(n=t[oo]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Se(t){t[hl]=!0}var Qe=new Set,Ie={};function St(t,n){Bn(t,n),Bn(t+"Capture",n)}function Bn(t,n){for(Ie[t]=n,t=0;t<n.length;t++)Qe.add(n[t])}var wv=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]*$"),Vh={},Gh={};function Sv(t){return pt.call(Gh,t)?!0:pt.call(Vh,t)?!1:wv.test(t)?Gh[t]=!0:(Vh[t]=!0,!1)}function so(t,n,a){if(Sv(n))if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var s=n.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+a)}}function uo(t,n,a){if(a===null)t.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+a)}}function lr(t,n,a,s){if(s===null)t.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(n,a,""+s)}}function En(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Yh(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function kv(t,n,a){var s=Object.getOwnPropertyDescriptor(t.constructor.prototype,n);if(!t.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var d=s.get,g=s.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return d.call(this)},set:function(k){a=""+k,g.call(this,k)}}),Object.defineProperty(t,n,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(k){a=""+k},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Cu(t){if(!t._valueTracker){var n=Yh(t)?"checked":"value";t._valueTracker=kv(t,n,""+t[n])}}function Xh(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var a=n.getValue(),s="";return t&&(s=Yh(t)?t.checked?"true":"false":t.value),t=s,t!==a?(n.setValue(t),!0):!1}function co(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ev=/[\n"\\]/g;function Cn(t){return t.replace(Ev,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Nu(t,n,a,s,d,g,k,_){t.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?t.type=k:t.removeAttribute("type"),n!=null?k==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+En(n)):t.value!==""+En(n)&&(t.value=""+En(n)):k!=="submit"&&k!=="reset"||t.removeAttribute("value"),n!=null?Au(t,k,En(n)):a!=null?Au(t,k,En(a)):s!=null&&t.removeAttribute("value"),d==null&&g!=null&&(t.defaultChecked=!!g),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+En(_):t.removeAttribute("name")}function Zh(t,n,a,s,d,g,k,_){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),n!=null||a!=null){if(!(g!=="submit"&&g!=="reset"||n!=null)){Cu(t);return}a=a!=null?""+En(a):"",n=n!=null?""+En(n):a,_||n===t.value||(t.value=n),t.defaultValue=n}s=s??d,s=typeof s!="function"&&typeof s!="symbol"&&!!s,t.checked=_?t.checked:!!s,t.defaultChecked=!!s,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(t.name=k),Cu(t)}function Au(t,n,a){n==="number"&&co(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function ql(t,n,a,s){if(t=t.options,n){n={};for(var d=0;d<a.length;d++)n["$"+a[d]]=!0;for(a=0;a<t.length;a++)d=n.hasOwnProperty("$"+t[a].value),t[a].selected!==d&&(t[a].selected=d),d&&s&&(t[a].defaultSelected=!0)}else{for(a=""+En(a),n=null,d=0;d<t.length;d++){if(t[d].value===a){t[d].selected=!0,s&&(t[d].defaultSelected=!0);return}n!==null||t[d].disabled||(n=t[d])}n!==null&&(n.selected=!0)}}function Kh(t,n,a){if(n!=null&&(n=""+En(n),n!==t.value&&(t.value=n),a==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=a!=null?""+En(a):""}function Qh(t,n,a,s){if(n==null){if(s!=null){if(a!=null)throw Error(i(92));if(Y(s)){if(1<s.length)throw Error(i(93));s=s[0]}a=s}a==null&&(a=""),n=a}a=En(n),t.defaultValue=a,s=t.textContent,s===a&&s!==""&&s!==null&&(t.value=s),Cu(t)}function Pl(t,n){if(n){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=n;return}}t.textContent=n}var Cv=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 Jh(t,n,a){var s=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":s?t.setProperty(n,a):typeof a!="number"||a===0||Cv.has(n)?n==="float"?t.cssFloat=a:t[n]=(""+a).trim():t[n]=a+"px"}function Wh(t,n,a){if(n!=null&&typeof n!="object")throw Error(i(62));if(t=t.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||n!=null&&n.hasOwnProperty(s)||(s.indexOf("--")===0?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="");for(var d in n)s=n[d],n.hasOwnProperty(d)&&a[d]!==s&&Jh(t,d,s)}else for(var g in n)n.hasOwnProperty(g)&&Jh(t,g,n[g])}function Tu(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Nv=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"]]),Av=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function fo(t){return Av.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function ir(){}var ju=null;function Ru(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var $l=null,Vl=null;function ep(t){var n=_r(t);if(n&&(t=n.stateNode)){var a=t[wt]||null;e:switch(t=n.stateNode,n.type){case"input":if(Nu(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Cn(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var s=a[n];if(s!==t&&s.form===t.form){var d=s[wt]||null;if(!d)throw Error(i(90));Nu(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(n=0;n<a.length;n++)s=a[n],s.form===t.form&&Xh(s)}break e;case"textarea":Kh(t,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&ql(t,!!a.multiple,n,!1)}}}var _u=!1;function tp(t,n,a){if(_u)return t(n,a);_u=!0;try{var s=t(n);return s}finally{if(_u=!1,($l!==null||Vl!==null)&&(Wo(),$l&&(n=$l,t=Vl,Vl=$l=null,ep(n),t)))for(n=0;n<t.length;n++)ep(t[n])}}function qi(t,n){var a=t.stateNode;if(a===null)return null;var s=a[wt]||null;if(s===null)return null;a=s[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(t=t.type,s=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!s;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(i(231,n,typeof a));return a}var ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Lu=!1;if(ar)try{var Pi={};Object.defineProperty(Pi,"passive",{get:function(){Lu=!0}}),window.addEventListener("test",Pi,Pi),window.removeEventListener("test",Pi,Pi)}catch{Lu=!1}var Lr=null,Du=null,ho=null;function np(){if(ho)return ho;var t,n=Du,a=n.length,s,d="value"in Lr?Lr.value:Lr.textContent,g=d.length;for(t=0;t<a&&n[t]===d[t];t++);var k=a-t;for(s=1;s<=k&&n[a-s]===d[g-s];s++);return ho=d.slice(t,1<s?1-s:void 0)}function po(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function go(){return!0}function rp(){return!1}function Wt(t){function n(a,s,d,g,k){this._reactName=a,this._targetInst=d,this.type=s,this.nativeEvent=g,this.target=k,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(a=t[_],this[_]=a?a(g):g[_]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?go:rp,this.isPropagationStopped=rp,this}return b(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=go)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=go)},persist:function(){},isPersistent:go}),n}var pl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mo=Wt(pl),$i=b({},pl,{view:0,detail:0}),Tv=Wt($i),Ou,Mu,Vi,bo=b({},$i,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Vi&&(Vi&&t.type==="mousemove"?(Ou=t.screenX-Vi.screenX,Mu=t.screenY-Vi.screenY):Mu=Ou=0,Vi=t),Ou)},movementY:function(t){return"movementY"in t?t.movementY:Mu}}),lp=Wt(bo),jv=b({},bo,{dataTransfer:0}),Rv=Wt(jv),_v=b({},$i,{relatedTarget:0}),zu=Wt(_v),Lv=b({},pl,{animationName:0,elapsedTime:0,pseudoElement:0}),Dv=Wt(Lv),Ov=b({},pl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Mv=Wt(Ov),zv=b({},pl,{data:0}),ip=Wt(zv),Fv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bv={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"},Iv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Uv(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=Iv[t])?!!n[t]:!1}function Fu(){return Uv}var Hv=b({},$i,{key:function(t){if(t.key){var n=Fv[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=po(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Bv[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fu,charCode:function(t){return t.type==="keypress"?po(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?po(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),qv=Wt(Hv),Pv=b({},bo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ap=Wt(Pv),$v=b({},$i,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fu}),Vv=Wt($v),Gv=b({},pl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yv=Wt(Gv),Xv=b({},bo,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Zv=Wt(Xv),Kv=b({},pl,{newState:0,oldState:0}),Qv=Wt(Kv),Jv=[9,13,27,32],Bu=ar&&"CompositionEvent"in window,Gi=null;ar&&"documentMode"in document&&(Gi=document.documentMode);var Wv=ar&&"TextEvent"in window&&!Gi,op=ar&&(!Bu||Gi&&8<Gi&&11>=Gi),sp=" ",up=!1;function cp(t,n){switch(t){case"keyup":return Jv.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Gl=!1;function ew(t,n){switch(t){case"compositionend":return fp(n);case"keypress":return n.which!==32?null:(up=!0,sp);case"textInput":return t=n.data,t===sp&&up?null:t;default:return null}}function tw(t,n){if(Gl)return t==="compositionend"||!Bu&&cp(t,n)?(t=np(),ho=Du=Lr=null,Gl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return op&&n.locale!=="ko"?null:n.data;default:return null}}var nw={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 dp(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!nw[t.type]:n==="textarea"}function hp(t,n,a,s){$l?Vl?Vl.push(s):Vl=[s]:$l=s,n=as(n,"onChange"),0<n.length&&(a=new mo("onChange","change",null,a,s),t.push({event:a,listeners:n}))}var Yi=null,Xi=null;function rw(t){Zm(t,0)}function yo(t){var n=re(t);if(Xh(n))return t}function pp(t,n){if(t==="change")return n}var gp=!1;if(ar){var Iu;if(ar){var Uu="oninput"in document;if(!Uu){var mp=document.createElement("div");mp.setAttribute("oninput","return;"),Uu=typeof mp.oninput=="function"}Iu=Uu}else Iu=!1;gp=Iu&&(!document.documentMode||9<document.documentMode)}function bp(){Yi&&(Yi.detachEvent("onpropertychange",yp),Xi=Yi=null)}function yp(t){if(t.propertyName==="value"&&yo(Xi)){var n=[];hp(n,Xi,t,Ru(t)),tp(rw,n)}}function lw(t,n,a){t==="focusin"?(bp(),Yi=n,Xi=a,Yi.attachEvent("onpropertychange",yp)):t==="focusout"&&bp()}function iw(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return yo(Xi)}function aw(t,n){if(t==="click")return yo(n)}function ow(t,n){if(t==="input"||t==="change")return yo(n)}function sw(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var dn=typeof Object.is=="function"?Object.is:sw;function Zi(t,n){if(dn(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var a=Object.keys(t),s=Object.keys(n);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var d=a[s];if(!pt.call(n,d)||!dn(t[d],n[d]))return!1}return!0}function xp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function vp(t,n){var a=xp(t);t=0;for(var s;a;){if(a.nodeType===3){if(s=t+a.textContent.length,t<=n&&s>=n)return{node:a,offset:n-t};t=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=xp(a)}}function wp(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?wp(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function Sp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=co(t.document);n instanceof t.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)t=n.contentWindow;else break;n=co(t.document)}return n}function Hu(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var uw=ar&&"documentMode"in document&&11>=document.documentMode,Yl=null,qu=null,Ki=null,Pu=!1;function kp(t,n,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Pu||Yl==null||Yl!==co(s)||(s=Yl,"selectionStart"in s&&Hu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ki&&Zi(Ki,s)||(Ki=s,s=as(qu,"onSelect"),0<s.length&&(n=new mo("onSelect","select",null,n,a),t.push({event:n,listeners:s}),n.target=Yl)))}function gl(t,n){var a={};return a[t.toLowerCase()]=n.toLowerCase(),a["Webkit"+t]="webkit"+n,a["Moz"+t]="moz"+n,a}var Xl={animationend:gl("Animation","AnimationEnd"),animationiteration:gl("Animation","AnimationIteration"),animationstart:gl("Animation","AnimationStart"),transitionrun:gl("Transition","TransitionRun"),transitionstart:gl("Transition","TransitionStart"),transitioncancel:gl("Transition","TransitionCancel"),transitionend:gl("Transition","TransitionEnd")},$u={},Ep={};ar&&(Ep=document.createElement("div").style,"AnimationEvent"in window||(delete Xl.animationend.animation,delete Xl.animationiteration.animation,delete Xl.animationstart.animation),"TransitionEvent"in window||delete Xl.transitionend.transition);function ml(t){if($u[t])return $u[t];if(!Xl[t])return t;var n=Xl[t],a;for(a in n)if(n.hasOwnProperty(a)&&a in Ep)return $u[t]=n[a];return t}var Cp=ml("animationend"),Np=ml("animationiteration"),Ap=ml("animationstart"),cw=ml("transitionrun"),fw=ml("transitionstart"),dw=ml("transitioncancel"),Tp=ml("transitionend"),jp=new Map,Vu="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(" ");Vu.push("scrollEnd");function In(t,n){jp.set(t,n),St(n,[t])}var xo=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Nn=[],Zl=0,Gu=0;function vo(){for(var t=Zl,n=Gu=Zl=0;n<t;){var a=Nn[n];Nn[n++]=null;var s=Nn[n];Nn[n++]=null;var d=Nn[n];Nn[n++]=null;var g=Nn[n];if(Nn[n++]=null,s!==null&&d!==null){var k=s.pending;k===null?d.next=d:(d.next=k.next,k.next=d),s.pending=d}g!==0&&Rp(a,d,g)}}function wo(t,n,a,s){Nn[Zl++]=t,Nn[Zl++]=n,Nn[Zl++]=a,Nn[Zl++]=s,Gu|=s,t.lanes|=s,t=t.alternate,t!==null&&(t.lanes|=s)}function Yu(t,n,a,s){return wo(t,n,a,s),So(t)}function bl(t,n){return wo(t,null,null,n),So(t)}function Rp(t,n,a){t.lanes|=a;var s=t.alternate;s!==null&&(s.lanes|=a);for(var d=!1,g=t.return;g!==null;)g.childLanes|=a,s=g.alternate,s!==null&&(s.childLanes|=a),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(d=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,d&&n!==null&&(d=31-Je(a),t=g.hiddenUpdates,s=t[d],s===null?t[d]=[n]:s.push(n),n.lane=a|536870912),g):null}function So(t){if(50<ya)throw ya=0,nf=null,Error(i(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var Kl={};function hw(t,n,a,s){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hn(t,n,a,s){return new hw(t,n,a,s)}function Xu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function or(t,n){var a=t.alternate;return a===null?(a=hn(t.tag,n,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=n,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,n=t.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function _p(t,n){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,n=a.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function ko(t,n,a,s,d,g){var k=0;if(s=t,typeof t=="function")Xu(t)&&(k=1);else if(typeof t=="string")k=yS(t,a,te.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case P:return t=hn(31,a,n,d),t.elementType=P,t.lanes=g,t;case w:return yl(a.children,d,g,n);case N:k=8,d|=24;break;case E:return t=hn(12,a,n,d|2),t.elementType=E,t.lanes=g,t;case I:return t=hn(13,a,n,d),t.elementType=I,t.lanes=g,t;case L:return t=hn(19,a,n,d),t.elementType=L,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case j:k=10;break e;case C:k=9;break e;case z:k=11;break e;case O:k=14;break e;case Z:k=16,s=null;break e}k=29,a=Error(i(130,t===null?"null":typeof t,"")),s=null}return n=hn(k,a,n,d),n.elementType=t,n.type=s,n.lanes=g,n}function yl(t,n,a,s){return t=hn(7,t,s,n),t.lanes=a,t}function Zu(t,n,a){return t=hn(6,t,null,n),t.lanes=a,t}function Lp(t){var n=hn(18,null,null,0);return n.stateNode=t,n}function Ku(t,n,a){return n=hn(4,t.children!==null?t.children:[],t.key,n),n.lanes=a,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var Dp=new WeakMap;function An(t,n){if(typeof t=="object"&&t!==null){var a=Dp.get(t);return a!==void 0?a:(n={value:t,source:n,stack:Bt(n)},Dp.set(t,n),n)}return{value:t,source:n,stack:Bt(n)}}var Ql=[],Jl=0,Eo=null,Qi=0,Tn=[],jn=0,Dr=null,Yn=1,Xn="";function sr(t,n){Ql[Jl++]=Qi,Ql[Jl++]=Eo,Eo=t,Qi=n}function Op(t,n,a){Tn[jn++]=Yn,Tn[jn++]=Xn,Tn[jn++]=Dr,Dr=t;var s=Yn;t=Xn;var d=32-Je(s)-1;s&=~(1<<d),a+=1;var g=32-Je(n)+d;if(30<g){var k=d-d%5;g=(s&(1<<k)-1).toString(32),s>>=k,d-=k,Yn=1<<32-Je(n)+d|a<<d|s,Xn=g+t}else Yn=1<<g|a<<d|s,Xn=t}function Qu(t){t.return!==null&&(sr(t,1),Op(t,1,0))}function Ju(t){for(;t===Eo;)Eo=Ql[--Jl],Ql[Jl]=null,Qi=Ql[--Jl],Ql[Jl]=null;for(;t===Dr;)Dr=Tn[--jn],Tn[jn]=null,Xn=Tn[--jn],Tn[jn]=null,Yn=Tn[--jn],Tn[jn]=null}function Mp(t,n){Tn[jn++]=Yn,Tn[jn++]=Xn,Tn[jn++]=Dr,Yn=n.id,Xn=n.overflow,Dr=t}var Ot=null,ft=null,qe=!1,Or=null,Rn=!1,Wu=Error(i(519));function Mr(t){var n=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ji(An(n,t)),Wu}function zp(t){var n=t.stateNode,a=t.type,s=t.memoizedProps;switch(n[Tt]=t,n[wt]=s,a){case"dialog":Fe("cancel",n),Fe("close",n);break;case"iframe":case"object":case"embed":Fe("load",n);break;case"video":case"audio":for(a=0;a<va.length;a++)Fe(va[a],n);break;case"source":Fe("error",n);break;case"img":case"image":case"link":Fe("error",n),Fe("load",n);break;case"details":Fe("toggle",n);break;case"input":Fe("invalid",n),Zh(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Fe("invalid",n);break;case"textarea":Fe("invalid",n),Qh(n,s.value,s.defaultValue,s.children)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||s.suppressHydrationWarning===!0||Wm(n.textContent,a)?(s.popover!=null&&(Fe("beforetoggle",n),Fe("toggle",n)),s.onScroll!=null&&Fe("scroll",n),s.onScrollEnd!=null&&Fe("scrollend",n),s.onClick!=null&&(n.onclick=ir),n=!0):n=!1,n||Mr(t,!0)}function Fp(t){for(Ot=t.return;Ot;)switch(Ot.tag){case 5:case 31:case 13:Rn=!1;return;case 27:case 3:Rn=!0;return;default:Ot=Ot.return}}function Wl(t){if(t!==Ot)return!1;if(!qe)return Fp(t),qe=!0,!1;var n=t.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||yf(t.type,t.memoizedProps)),a=!a),a&&ft&&Mr(t),Fp(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));ft=sb(t)}else if(n===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));ft=sb(t)}else n===27?(n=ft,Zr(t.type)?(t=kf,kf=null,ft=t):ft=n):ft=Ot?Ln(t.stateNode.nextSibling):null;return!0}function xl(){ft=Ot=null,qe=!1}function ec(){var t=Or;return t!==null&&(rn===null?rn=t:rn.push.apply(rn,t),Or=null),t}function Ji(t){Or===null?Or=[t]:Or.push(t)}var tc=D(null),vl=null,ur=null;function zr(t,n,a){A(tc,n._currentValue),n._currentValue=a}function cr(t){t._currentValue=tc.current,q(tc)}function nc(t,n,a){for(;t!==null;){var s=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),t===a)break;t=t.return}}function rc(t,n,a,s){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var g=d.dependencies;if(g!==null){var k=d.child;g=g.firstContext;e:for(;g!==null;){var _=g;g=d;for(var $=0;$<n.length;$++)if(_.context===n[$]){g.lanes|=a,_=g.alternate,_!==null&&(_.lanes|=a),nc(g.return,a,t),s||(k=null);break e}g=_.next}}else if(d.tag===18){if(k=d.return,k===null)throw Error(i(341));k.lanes|=a,g=k.alternate,g!==null&&(g.lanes|=a),nc(k,a,t),k=null}else k=d.child;if(k!==null)k.return=d;else for(k=d;k!==null;){if(k===t){k=null;break}if(d=k.sibling,d!==null){d.return=k.return,k=d;break}k=k.return}d=k}}function ei(t,n,a,s){t=null;for(var d=n,g=!1;d!==null;){if(!g){if((d.flags&524288)!==0)g=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var k=d.alternate;if(k===null)throw Error(i(387));if(k=k.memoizedProps,k!==null){var _=d.type;dn(d.pendingProps.value,k.value)||(t!==null?t.push(_):t=[_])}}else if(d===me.current){if(k=d.alternate,k===null)throw Error(i(387));k.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(Ca):t=[Ca])}d=d.return}t!==null&&rc(n,t,a,s),n.flags|=262144}function Co(t){for(t=t.firstContext;t!==null;){if(!dn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function wl(t){vl=t,ur=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Mt(t){return Bp(vl,t)}function No(t,n){return vl===null&&wl(t),Bp(t,n)}function Bp(t,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},ur===null){if(t===null)throw Error(i(308));ur=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else ur=ur.next=n;return a}var pw=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(a,s){t.push(s)}};this.abort=function(){n.aborted=!0,t.forEach(function(a){return a()})}},gw=e.unstable_scheduleCallback,mw=e.unstable_NormalPriority,kt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function lc(){return{controller:new pw,data:new Map,refCount:0}}function Wi(t){t.refCount--,t.refCount===0&&gw(mw,function(){t.controller.abort()})}var ea=null,ic=0,ti=0,ni=null;function bw(t,n){if(ea===null){var a=ea=[];ic=0,ti=uf(),ni={status:"pending",value:void 0,then:function(s){a.push(s)}}}return ic++,n.then(Ip,Ip),n}function Ip(){if(--ic===0&&ea!==null){ni!==null&&(ni.status="fulfilled");var t=ea;ea=null,ti=0,ni=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function yw(t,n){var a=[],s={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return t.then(function(){s.status="fulfilled",s.value=n;for(var d=0;d<a.length;d++)(0,a[d])(n)},function(d){for(s.status="rejected",s.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),s}var Up=B.S;B.S=function(t,n){km=at(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&bw(t,n),Up!==null&&Up(t,n)};var Sl=D(null);function ac(){var t=Sl.current;return t!==null?t:ot.pooledCache}function Ao(t,n){n===null?A(Sl,Sl.current):A(Sl,n.pool)}function Hp(){var t=ac();return t===null?null:{parent:kt._currentValue,pool:t}}var ri=Error(i(460)),oc=Error(i(474)),To=Error(i(542)),jo={then:function(){}};function qp(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Pp(t,n,a){switch(a=t[a],a===void 0?t.push(n):a!==n&&(n.then(ir,ir),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,Vp(t),t;default:if(typeof n.status=="string")n.then(ir,ir);else{if(t=ot,t!==null&&100<t.shellSuspendCounter)throw Error(i(482));t=n,t.status="pending",t.then(function(s){if(n.status==="pending"){var d=n;d.status="fulfilled",d.value=s}},function(s){if(n.status==="pending"){var d=n;d.status="rejected",d.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,Vp(t),t}throw El=n,ri}}function kl(t){try{var n=t._init;return n(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(El=a,ri):a}}var El=null;function $p(){if(El===null)throw Error(i(459));var t=El;return El=null,t}function Vp(t){if(t===ri||t===To)throw Error(i(483))}var li=null,ta=0;function Ro(t){var n=ta;return ta+=1,li===null&&(li=[]),Pp(li,t,n)}function na(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function _o(t,n){throw n.$$typeof===v?Error(i(525)):(t=Object.prototype.toString.call(n),Error(i(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function Gp(t){function n(J,K){if(t){var W=J.deletions;W===null?(J.deletions=[K],J.flags|=16):W.push(K)}}function a(J,K){if(!t)return null;for(;K!==null;)n(J,K),K=K.sibling;return null}function s(J){for(var K=new Map;J!==null;)J.key!==null?K.set(J.key,J):K.set(J.index,J),J=J.sibling;return K}function d(J,K){return J=or(J,K),J.index=0,J.sibling=null,J}function g(J,K,W){return J.index=W,t?(W=J.alternate,W!==null?(W=W.index,W<K?(J.flags|=67108866,K):W):(J.flags|=67108866,K)):(J.flags|=1048576,K)}function k(J){return t&&J.alternate===null&&(J.flags|=67108866),J}function _(J,K,W,se){return K===null||K.tag!==6?(K=Zu(W,J.mode,se),K.return=J,K):(K=d(K,W),K.return=J,K)}function $(J,K,W,se){var Ne=W.type;return Ne===w?oe(J,K,W.props.children,se,W.key):K!==null&&(K.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Z&&kl(Ne)===K.type)?(K=d(K,W.props),na(K,W),K.return=J,K):(K=ko(W.type,W.key,W.props,null,J.mode,se),na(K,W),K.return=J,K)}function ee(J,K,W,se){return K===null||K.tag!==4||K.stateNode.containerInfo!==W.containerInfo||K.stateNode.implementation!==W.implementation?(K=Ku(W,J.mode,se),K.return=J,K):(K=d(K,W.children||[]),K.return=J,K)}function oe(J,K,W,se,Ne){return K===null||K.tag!==7?(K=yl(W,J.mode,se,Ne),K.return=J,K):(K=d(K,W),K.return=J,K)}function ce(J,K,W){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=Zu(""+K,J.mode,W),K.return=J,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case x:return W=ko(K.type,K.key,K.props,null,J.mode,W),na(W,K),W.return=J,W;case S:return K=Ku(K,J.mode,W),K.return=J,K;case Z:return K=kl(K),ce(J,K,W)}if(Y(K)||G(K))return K=yl(K,J.mode,W,null),K.return=J,K;if(typeof K.then=="function")return ce(J,Ro(K),W);if(K.$$typeof===j)return ce(J,No(J,K),W);_o(J,K)}return null}function ne(J,K,W,se){var Ne=K!==null?K.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Ne!==null?null:_(J,K,""+W,se);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case x:return W.key===Ne?$(J,K,W,se):null;case S:return W.key===Ne?ee(J,K,W,se):null;case Z:return W=kl(W),ne(J,K,W,se)}if(Y(W)||G(W))return Ne!==null?null:oe(J,K,W,se,null);if(typeof W.then=="function")return ne(J,K,Ro(W),se);if(W.$$typeof===j)return ne(J,K,No(J,W),se);_o(J,W)}return null}function ie(J,K,W,se,Ne){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return J=J.get(W)||null,_(K,J,""+se,Ne);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case x:return J=J.get(se.key===null?W:se.key)||null,$(K,J,se,Ne);case S:return J=J.get(se.key===null?W:se.key)||null,ee(K,J,se,Ne);case Z:return se=kl(se),ie(J,K,W,se,Ne)}if(Y(se)||G(se))return J=J.get(W)||null,oe(K,J,se,Ne,null);if(typeof se.then=="function")return ie(J,K,W,Ro(se),Ne);if(se.$$typeof===j)return ie(J,K,W,No(K,se),Ne);_o(K,se)}return null}function ke(J,K,W,se){for(var Ne=null,Ye=null,Ce=K,Le=K=0,He=null;Ce!==null&&Le<W.length;Le++){Ce.index>Le?(He=Ce,Ce=null):He=Ce.sibling;var Xe=ne(J,Ce,W[Le],se);if(Xe===null){Ce===null&&(Ce=He);break}t&&Ce&&Xe.alternate===null&&n(J,Ce),K=g(Xe,K,Le),Ye===null?Ne=Xe:Ye.sibling=Xe,Ye=Xe,Ce=He}if(Le===W.length)return a(J,Ce),qe&&sr(J,Le),Ne;if(Ce===null){for(;Le<W.length;Le++)Ce=ce(J,W[Le],se),Ce!==null&&(K=g(Ce,K,Le),Ye===null?Ne=Ce:Ye.sibling=Ce,Ye=Ce);return qe&&sr(J,Le),Ne}for(Ce=s(Ce);Le<W.length;Le++)He=ie(Ce,J,Le,W[Le],se),He!==null&&(t&&He.alternate!==null&&Ce.delete(He.key===null?Le:He.key),K=g(He,K,Le),Ye===null?Ne=He:Ye.sibling=He,Ye=He);return t&&Ce.forEach(function(el){return n(J,el)}),qe&&sr(J,Le),Ne}function je(J,K,W,se){if(W==null)throw Error(i(151));for(var Ne=null,Ye=null,Ce=K,Le=K=0,He=null,Xe=W.next();Ce!==null&&!Xe.done;Le++,Xe=W.next()){Ce.index>Le?(He=Ce,Ce=null):He=Ce.sibling;var el=ne(J,Ce,Xe.value,se);if(el===null){Ce===null&&(Ce=He);break}t&&Ce&&el.alternate===null&&n(J,Ce),K=g(el,K,Le),Ye===null?Ne=el:Ye.sibling=el,Ye=el,Ce=He}if(Xe.done)return a(J,Ce),qe&&sr(J,Le),Ne;if(Ce===null){for(;!Xe.done;Le++,Xe=W.next())Xe=ce(J,Xe.value,se),Xe!==null&&(K=g(Xe,K,Le),Ye===null?Ne=Xe:Ye.sibling=Xe,Ye=Xe);return qe&&sr(J,Le),Ne}for(Ce=s(Ce);!Xe.done;Le++,Xe=W.next())Xe=ie(Ce,J,Le,Xe.value,se),Xe!==null&&(t&&Xe.alternate!==null&&Ce.delete(Xe.key===null?Le:Xe.key),K=g(Xe,K,Le),Ye===null?Ne=Xe:Ye.sibling=Xe,Ye=Xe);return t&&Ce.forEach(function(jS){return n(J,jS)}),qe&&sr(J,Le),Ne}function lt(J,K,W,se){if(typeof W=="object"&&W!==null&&W.type===w&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case x:e:{for(var Ne=W.key;K!==null;){if(K.key===Ne){if(Ne=W.type,Ne===w){if(K.tag===7){a(J,K.sibling),se=d(K,W.props.children),se.return=J,J=se;break e}}else if(K.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Z&&kl(Ne)===K.type){a(J,K.sibling),se=d(K,W.props),na(se,W),se.return=J,J=se;break e}a(J,K);break}else n(J,K);K=K.sibling}W.type===w?(se=yl(W.props.children,J.mode,se,W.key),se.return=J,J=se):(se=ko(W.type,W.key,W.props,null,J.mode,se),na(se,W),se.return=J,J=se)}return k(J);case S:e:{for(Ne=W.key;K!==null;){if(K.key===Ne)if(K.tag===4&&K.stateNode.containerInfo===W.containerInfo&&K.stateNode.implementation===W.implementation){a(J,K.sibling),se=d(K,W.children||[]),se.return=J,J=se;break e}else{a(J,K);break}else n(J,K);K=K.sibling}se=Ku(W,J.mode,se),se.return=J,J=se}return k(J);case Z:return W=kl(W),lt(J,K,W,se)}if(Y(W))return ke(J,K,W,se);if(G(W)){if(Ne=G(W),typeof Ne!="function")throw Error(i(150));return W=Ne.call(W),je(J,K,W,se)}if(typeof W.then=="function")return lt(J,K,Ro(W),se);if(W.$$typeof===j)return lt(J,K,No(J,W),se);_o(J,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,K!==null&&K.tag===6?(a(J,K.sibling),se=d(K,W),se.return=J,J=se):(a(J,K),se=Zu(W,J.mode,se),se.return=J,J=se),k(J)):a(J,K)}return function(J,K,W,se){try{ta=0;var Ne=lt(J,K,W,se);return li=null,Ne}catch(Ce){if(Ce===ri||Ce===To)throw Ce;var Ye=hn(29,Ce,null,J.mode);return Ye.lanes=se,Ye.return=J,Ye}}}var Cl=Gp(!0),Yp=Gp(!1),Fr=!1;function sc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function uc(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Br(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ir(t,n,a){var s=t.updateQueue;if(s===null)return null;if(s=s.shared,(Ze&2)!==0){var d=s.pending;return d===null?n.next=n:(n.next=d.next,d.next=n),s.pending=n,n=So(t),Rp(t,null,a),n}return wo(t,s,n,a),So(t)}function ra(t,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var s=n.lanes;s&=t.pendingLanes,a|=s,n.lanes=a,Jt(t,a)}}function cc(t,n){var a=t.updateQueue,s=t.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var d=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var k={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};g===null?d=g=k:g=g.next=k,a=a.next}while(a!==null);g===null?d=g=n:g=g.next=n}else d=g=n;a={baseState:s.baseState,firstBaseUpdate:d,lastBaseUpdate:g,shared:s.shared,callbacks:s.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=n:t.next=n,a.lastBaseUpdate=n}var fc=!1;function la(){if(fc){var t=ni;if(t!==null)throw t}}function ia(t,n,a,s){fc=!1;var d=t.updateQueue;Fr=!1;var g=d.firstBaseUpdate,k=d.lastBaseUpdate,_=d.shared.pending;if(_!==null){d.shared.pending=null;var $=_,ee=$.next;$.next=null,k===null?g=ee:k.next=ee,k=$;var oe=t.alternate;oe!==null&&(oe=oe.updateQueue,_=oe.lastBaseUpdate,_!==k&&(_===null?oe.firstBaseUpdate=ee:_.next=ee,oe.lastBaseUpdate=$))}if(g!==null){var ce=d.baseState;k=0,oe=ee=$=null,_=g;do{var ne=_.lane&-536870913,ie=ne!==_.lane;if(ie?(Ue&ne)===ne:(s&ne)===ne){ne!==0&&ne===ti&&(fc=!0),oe!==null&&(oe=oe.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var ke=t,je=_;ne=n;var lt=a;switch(je.tag){case 1:if(ke=je.payload,typeof ke=="function"){ce=ke.call(lt,ce,ne);break e}ce=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=je.payload,ne=typeof ke=="function"?ke.call(lt,ce,ne):ke,ne==null)break e;ce=b({},ce,ne);break e;case 2:Fr=!0}}ne=_.callback,ne!==null&&(t.flags|=64,ie&&(t.flags|=8192),ie=d.callbacks,ie===null?d.callbacks=[ne]:ie.push(ne))}else ie={lane:ne,tag:_.tag,payload:_.payload,callback:_.callback,next:null},oe===null?(ee=oe=ie,$=ce):oe=oe.next=ie,k|=ne;if(_=_.next,_===null){if(_=d.shared.pending,_===null)break;ie=_,_=ie.next,ie.next=null,d.lastBaseUpdate=ie,d.shared.pending=null}}while(!0);oe===null&&($=ce),d.baseState=$,d.firstBaseUpdate=ee,d.lastBaseUpdate=oe,g===null&&(d.shared.lanes=0),$r|=k,t.lanes=k,t.memoizedState=ce}}function Xp(t,n){if(typeof t!="function")throw Error(i(191,t));t.call(n)}function Zp(t,n){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)Xp(a[t],n)}var ii=D(null),Lo=D(0);function Kp(t,n){t=xr,A(Lo,t),A(ii,n),xr=t|n.baseLanes}function dc(){A(Lo,xr),A(ii,ii.current)}function hc(){xr=Lo.current,q(ii),q(Lo)}var pn=D(null),_n=null;function Ur(t){var n=t.alternate;A(xt,xt.current&1),A(pn,t),_n===null&&(n===null||ii.current!==null||n.memoizedState!==null)&&(_n=t)}function pc(t){A(xt,xt.current),A(pn,t),_n===null&&(_n=t)}function Qp(t){t.tag===22?(A(xt,xt.current),A(pn,t),_n===null&&(_n=t)):Hr()}function Hr(){A(xt,xt.current),A(pn,pn.current)}function gn(t){q(pn),_n===t&&(_n=null),q(xt)}var xt=D(0);function Do(t){for(var n=t;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||wf(a)||Sf(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var fr=0,_e=null,nt=null,Et=null,Oo=!1,ai=!1,Nl=!1,Mo=0,aa=0,oi=null,xw=0;function bt(){throw Error(i(321))}function gc(t,n){if(n===null)return!1;for(var a=0;a<n.length&&a<t.length;a++)if(!dn(t[a],n[a]))return!1;return!0}function mc(t,n,a,s,d,g){return fr=g,_e=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,B.H=t===null||t.memoizedState===null?Og:_c,Nl=!1,g=a(s,d),Nl=!1,ai&&(g=Wp(n,a,s,d)),Jp(t),g}function Jp(t){B.H=ua;var n=nt!==null&&nt.next!==null;if(fr=0,Et=nt=_e=null,Oo=!1,aa=0,oi=null,n)throw Error(i(300));t===null||Ct||(t=t.dependencies,t!==null&&Co(t)&&(Ct=!0))}function Wp(t,n,a,s){_e=t;var d=0;do{if(ai&&(oi=null),aa=0,ai=!1,25<=d)throw Error(i(301));if(d+=1,Et=nt=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}B.H=Mg,g=n(a,s)}while(ai);return g}function vw(){var t=B.H,n=t.useState()[0];return n=typeof n.then=="function"?oa(n):n,t=t.useState()[0],(nt!==null?nt.memoizedState:null)!==t&&(_e.flags|=1024),n}function bc(){var t=Mo!==0;return Mo=0,t}function yc(t,n,a){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~a}function xc(t){if(Oo){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}Oo=!1}fr=0,Et=nt=_e=null,ai=!1,aa=Mo=0,oi=null}function Xt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Et===null?_e.memoizedState=Et=t:Et=Et.next=t,Et}function vt(){if(nt===null){var t=_e.alternate;t=t!==null?t.memoizedState:null}else t=nt.next;var n=Et===null?_e.memoizedState:Et.next;if(n!==null)Et=n,nt=t;else{if(t===null)throw _e.alternate===null?Error(i(467)):Error(i(310));nt=t,t={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},Et===null?_e.memoizedState=Et=t:Et=Et.next=t}return Et}function zo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function oa(t){var n=aa;return aa+=1,oi===null&&(oi=[]),t=Pp(oi,t,n),n=_e,(Et===null?n.memoizedState:Et.next)===null&&(n=n.alternate,B.H=n===null||n.memoizedState===null?Og:_c),t}function Fo(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return oa(t);if(t.$$typeof===j)return Mt(t)}throw Error(i(438,String(t)))}function vc(t){var n=null,a=_e.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var s=_e.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(n={data:s.data.map(function(d){return d.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=zo(),_e.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(t),s=0;s<t;s++)a[s]=F;return n.index++,a}function dr(t,n){return typeof n=="function"?n(t):n}function Bo(t){var n=vt();return wc(n,nt,t)}function wc(t,n,a){var s=t.queue;if(s===null)throw Error(i(311));s.lastRenderedReducer=a;var d=t.baseQueue,g=s.pending;if(g!==null){if(d!==null){var k=d.next;d.next=g.next,g.next=k}n.baseQueue=d=g,s.pending=null}if(g=t.baseState,d===null)t.memoizedState=g;else{n=d.next;var _=k=null,$=null,ee=n,oe=!1;do{var ce=ee.lane&-536870913;if(ce!==ee.lane?(Ue&ce)===ce:(fr&ce)===ce){var ne=ee.revertLane;if(ne===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),ce===ti&&(oe=!0);else if((fr&ne)===ne){ee=ee.next,ne===ti&&(oe=!0);continue}else ce={lane:0,revertLane:ee.revertLane,gesture:null,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},$===null?(_=$=ce,k=g):$=$.next=ce,_e.lanes|=ne,$r|=ne;ce=ee.action,Nl&&a(g,ce),g=ee.hasEagerState?ee.eagerState:a(g,ce)}else ne={lane:ce,revertLane:ee.revertLane,gesture:ee.gesture,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null},$===null?(_=$=ne,k=g):$=$.next=ne,_e.lanes|=ce,$r|=ce;ee=ee.next}while(ee!==null&&ee!==n);if($===null?k=g:$.next=_,!dn(g,t.memoizedState)&&(Ct=!0,oe&&(a=ni,a!==null)))throw a;t.memoizedState=g,t.baseState=k,t.baseQueue=$,s.lastRenderedState=g}return d===null&&(s.lanes=0),[t.memoizedState,s.dispatch]}function Sc(t){var n=vt(),a=n.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=t;var s=a.dispatch,d=a.pending,g=n.memoizedState;if(d!==null){a.pending=null;var k=d=d.next;do g=t(g,k.action),k=k.next;while(k!==d);dn(g,n.memoizedState)||(Ct=!0),n.memoizedState=g,n.baseQueue===null&&(n.baseState=g),a.lastRenderedState=g}return[g,s]}function eg(t,n,a){var s=_e,d=vt(),g=qe;if(g){if(a===void 0)throw Error(i(407));a=a()}else a=n();var k=!dn((nt||d).memoizedState,a);if(k&&(d.memoizedState=a,Ct=!0),d=d.queue,Cc(rg.bind(null,s,d,t),[t]),d.getSnapshot!==n||k||Et!==null&&Et.memoizedState.tag&1){if(s.flags|=2048,si(9,{destroy:void 0},ng.bind(null,s,d,a,n),null),ot===null)throw Error(i(349));g||(fr&127)!==0||tg(s,n,a)}return a}function tg(t,n,a){t.flags|=16384,t={getSnapshot:n,value:a},n=_e.updateQueue,n===null?(n=zo(),_e.updateQueue=n,n.stores=[t]):(a=n.stores,a===null?n.stores=[t]:a.push(t))}function ng(t,n,a,s){n.value=a,n.getSnapshot=s,lg(n)&&ig(t)}function rg(t,n,a){return a(function(){lg(n)&&ig(t)})}function lg(t){var n=t.getSnapshot;t=t.value;try{var a=n();return!dn(t,a)}catch{return!0}}function ig(t){var n=bl(t,2);n!==null&&ln(n,t,2)}function kc(t){var n=Xt();if(typeof t=="function"){var a=t;if(t=a(),Nl){It(!0);try{a()}finally{It(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dr,lastRenderedState:t},n}function ag(t,n,a,s){return t.baseState=a,wc(t,nt,typeof s=="function"?s:dr)}function ww(t,n,a,s,d){if(Ho(t))throw Error(i(485));if(t=n.action,t!==null){var g={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){g.listeners.push(k)}};B.T!==null?a(!0):g.isTransition=!1,s(g),a=n.pending,a===null?(g.next=n.pending=g,og(n,g)):(g.next=a.next,n.pending=a.next=g)}}function og(t,n){var a=n.action,s=n.payload,d=t.state;if(n.isTransition){var g=B.T,k={};B.T=k;try{var _=a(d,s),$=B.S;$!==null&&$(k,_),sg(t,n,_)}catch(ee){Ec(t,n,ee)}finally{g!==null&&k.types!==null&&(g.types=k.types),B.T=g}}else try{g=a(d,s),sg(t,n,g)}catch(ee){Ec(t,n,ee)}}function sg(t,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){ug(t,n,s)},function(s){return Ec(t,n,s)}):ug(t,n,a)}function ug(t,n,a){n.status="fulfilled",n.value=a,cg(n),t.state=a,n=t.pending,n!==null&&(a=n.next,a===n?t.pending=null:(a=a.next,n.next=a,og(t,a)))}function Ec(t,n,a){var s=t.pending;if(t.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=a,cg(n),n=n.next;while(n!==s)}t.action=null}function cg(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function fg(t,n){return n}function dg(t,n){if(qe){var a=ot.formState;if(a!==null){e:{var s=_e;if(qe){if(ft){t:{for(var d=ft,g=Rn;d.nodeType!==8;){if(!g){d=null;break t}if(d=Ln(d.nextSibling),d===null){d=null;break t}}g=d.data,d=g==="F!"||g==="F"?d:null}if(d){ft=Ln(d.nextSibling),s=d.data==="F!";break e}}Mr(s)}s=!1}s&&(n=a[0])}}return a=Xt(),a.memoizedState=a.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fg,lastRenderedState:n},a.queue=s,a=_g.bind(null,_e,s),s.dispatch=a,s=kc(!1),g=Rc.bind(null,_e,!1,s.queue),s=Xt(),d={state:n,dispatch:null,action:t,pending:null},s.queue=d,a=ww.bind(null,_e,d,g,a),d.dispatch=a,s.memoizedState=t,[n,a,!1]}function hg(t){var n=vt();return pg(n,nt,t)}function pg(t,n,a){if(n=wc(t,n,fg)[0],t=Bo(dr)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=oa(n)}catch(k){throw k===ri?To:k}else s=n;n=vt();var d=n.queue,g=d.dispatch;return a!==n.memoizedState&&(_e.flags|=2048,si(9,{destroy:void 0},Sw.bind(null,d,a),null)),[s,g,t]}function Sw(t,n){t.action=n}function gg(t){var n=vt(),a=nt;if(a!==null)return pg(n,a,t);vt(),n=n.memoizedState,a=vt();var s=a.queue.dispatch;return a.memoizedState=t,[n,s,!1]}function si(t,n,a,s){return t={tag:t,create:a,deps:s,inst:n,next:null},n=_e.updateQueue,n===null&&(n=zo(),_e.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=t.next=t:(s=a.next,a.next=t,t.next=s,n.lastEffect=t),t}function mg(){return vt().memoizedState}function Io(t,n,a,s){var d=Xt();_e.flags|=t,d.memoizedState=si(1|n,{destroy:void 0},a,s===void 0?null:s)}function Uo(t,n,a,s){var d=vt();s=s===void 0?null:s;var g=d.memoizedState.inst;nt!==null&&s!==null&&gc(s,nt.memoizedState.deps)?d.memoizedState=si(n,g,a,s):(_e.flags|=t,d.memoizedState=si(1|n,g,a,s))}function bg(t,n){Io(8390656,8,t,n)}function Cc(t,n){Uo(2048,8,t,n)}function kw(t){_e.flags|=4;var n=_e.updateQueue;if(n===null)n=zo(),_e.updateQueue=n,n.events=[t];else{var a=n.events;a===null?n.events=[t]:a.push(t)}}function yg(t){var n=vt().memoizedState;return kw({ref:n,nextImpl:t}),function(){if((Ze&2)!==0)throw Error(i(440));return n.impl.apply(void 0,arguments)}}function xg(t,n){return Uo(4,2,t,n)}function vg(t,n){return Uo(4,4,t,n)}function wg(t,n){if(typeof n=="function"){t=t();var a=n(t);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function Sg(t,n,a){a=a!=null?a.concat([t]):null,Uo(4,4,wg.bind(null,n,t),a)}function Nc(){}function kg(t,n){var a=vt();n=n===void 0?null:n;var s=a.memoizedState;return n!==null&&gc(n,s[1])?s[0]:(a.memoizedState=[t,n],t)}function Eg(t,n){var a=vt();n=n===void 0?null:n;var s=a.memoizedState;if(n!==null&&gc(n,s[1]))return s[0];if(s=t(),Nl){It(!0);try{t()}finally{It(!1)}}return a.memoizedState=[s,n],s}function Ac(t,n,a){return a===void 0||(fr&1073741824)!==0&&(Ue&261930)===0?t.memoizedState=n:(t.memoizedState=a,t=Cm(),_e.lanes|=t,$r|=t,a)}function Cg(t,n,a,s){return dn(a,n)?a:ii.current!==null?(t=Ac(t,a,s),dn(t,n)||(Ct=!0),t):(fr&42)===0||(fr&1073741824)!==0&&(Ue&261930)===0?(Ct=!0,t.memoizedState=a):(t=Cm(),_e.lanes|=t,$r|=t,n)}function Ng(t,n,a,s,d){var g=X.p;X.p=g!==0&&8>g?g:8;var k=B.T,_={};B.T=_,Rc(t,!1,n,a);try{var $=d(),ee=B.S;if(ee!==null&&ee(_,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var oe=yw($,s);sa(t,n,oe,yn(t))}else sa(t,n,s,yn(t))}catch(ce){sa(t,n,{then:function(){},status:"rejected",reason:ce},yn())}finally{X.p=g,k!==null&&_.types!==null&&(k.types=_.types),B.T=k}}function Ew(){}function Tc(t,n,a,s){if(t.tag!==5)throw Error(i(476));var d=Ag(t).queue;Ng(t,d,n,M,a===null?Ew:function(){return Tg(t),a(s)})}function Ag(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:M,baseState:M,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dr,lastRenderedState:M},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:dr,lastRenderedState:a},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Tg(t){var n=Ag(t);n.next===null&&(n=t.alternate.memoizedState),sa(t,n.next.queue,{},yn())}function jc(){return Mt(Ca)}function jg(){return vt().memoizedState}function Rg(){return vt().memoizedState}function Cw(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var a=yn();t=Br(a);var s=Ir(n,t,a);s!==null&&(ln(s,n,a),ra(s,n,a)),n={cache:lc()},t.payload=n;return}n=n.return}}function Nw(t,n,a){var s=yn();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ho(t)?Lg(n,a):(a=Yu(t,n,a,s),a!==null&&(ln(a,t,s),Dg(a,n,s)))}function _g(t,n,a){var s=yn();sa(t,n,a,s)}function sa(t,n,a,s){var d={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ho(t))Lg(n,d);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=n.lastRenderedReducer,g!==null))try{var k=n.lastRenderedState,_=g(k,a);if(d.hasEagerState=!0,d.eagerState=_,dn(_,k))return wo(t,n,d,0),ot===null&&vo(),!1}catch{}if(a=Yu(t,n,d,s),a!==null)return ln(a,t,s),Dg(a,n,s),!0}return!1}function Rc(t,n,a,s){if(s={lane:2,revertLane:uf(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Ho(t)){if(n)throw Error(i(479))}else n=Yu(t,a,s,2),n!==null&&ln(n,t,2)}function Ho(t){var n=t.alternate;return t===_e||n!==null&&n===_e}function Lg(t,n){ai=Oo=!0;var a=t.pending;a===null?n.next=n:(n.next=a.next,a.next=n),t.pending=n}function Dg(t,n,a){if((a&4194048)!==0){var s=n.lanes;s&=t.pendingLanes,a|=s,n.lanes=a,Jt(t,a)}}var ua={readContext:Mt,use:Fo,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};ua.useEffectEvent=bt;var Og={readContext:Mt,use:Fo,useCallback:function(t,n){return Xt().memoizedState=[t,n===void 0?null:n],t},useContext:Mt,useEffect:bg,useImperativeHandle:function(t,n,a){a=a!=null?a.concat([t]):null,Io(4194308,4,wg.bind(null,n,t),a)},useLayoutEffect:function(t,n){return Io(4194308,4,t,n)},useInsertionEffect:function(t,n){Io(4,2,t,n)},useMemo:function(t,n){var a=Xt();n=n===void 0?null:n;var s=t();if(Nl){It(!0);try{t()}finally{It(!1)}}return a.memoizedState=[s,n],s},useReducer:function(t,n,a){var s=Xt();if(a!==void 0){var d=a(n);if(Nl){It(!0);try{a(n)}finally{It(!1)}}}else d=n;return s.memoizedState=s.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},s.queue=t,t=t.dispatch=Nw.bind(null,_e,t),[s.memoizedState,t]},useRef:function(t){var n=Xt();return t={current:t},n.memoizedState=t},useState:function(t){t=kc(t);var n=t.queue,a=_g.bind(null,_e,n);return n.dispatch=a,[t.memoizedState,a]},useDebugValue:Nc,useDeferredValue:function(t,n){var a=Xt();return Ac(a,t,n)},useTransition:function(){var t=kc(!1);return t=Ng.bind(null,_e,t.queue,!0,!1),Xt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,a){var s=_e,d=Xt();if(qe){if(a===void 0)throw Error(i(407));a=a()}else{if(a=n(),ot===null)throw Error(i(349));(Ue&127)!==0||tg(s,n,a)}d.memoizedState=a;var g={value:a,getSnapshot:n};return d.queue=g,bg(rg.bind(null,s,g,t),[t]),s.flags|=2048,si(9,{destroy:void 0},ng.bind(null,s,g,a,n),null),a},useId:function(){var t=Xt(),n=ot.identifierPrefix;if(qe){var a=Xn,s=Yn;a=(s&~(1<<32-Je(s)-1)).toString(32)+a,n="_"+n+"R_"+a,a=Mo++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=xw++,n="_"+n+"r_"+a.toString(32)+"_";return t.memoizedState=n},useHostTransitionStatus:jc,useFormState:dg,useActionState:dg,useOptimistic:function(t){var n=Xt();n.memoizedState=n.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Rc.bind(null,_e,!0,a),a.dispatch=n,[t,n]},useMemoCache:vc,useCacheRefresh:function(){return Xt().memoizedState=Cw.bind(null,_e)},useEffectEvent:function(t){var n=Xt(),a={impl:t};return n.memoizedState=a,function(){if((Ze&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},_c={readContext:Mt,use:Fo,useCallback:kg,useContext:Mt,useEffect:Cc,useImperativeHandle:Sg,useInsertionEffect:xg,useLayoutEffect:vg,useMemo:Eg,useReducer:Bo,useRef:mg,useState:function(){return Bo(dr)},useDebugValue:Nc,useDeferredValue:function(t,n){var a=vt();return Cg(a,nt.memoizedState,t,n)},useTransition:function(){var t=Bo(dr)[0],n=vt().memoizedState;return[typeof t=="boolean"?t:oa(t),n]},useSyncExternalStore:eg,useId:jg,useHostTransitionStatus:jc,useFormState:hg,useActionState:hg,useOptimistic:function(t,n){var a=vt();return ag(a,nt,t,n)},useMemoCache:vc,useCacheRefresh:Rg};_c.useEffectEvent=yg;var Mg={readContext:Mt,use:Fo,useCallback:kg,useContext:Mt,useEffect:Cc,useImperativeHandle:Sg,useInsertionEffect:xg,useLayoutEffect:vg,useMemo:Eg,useReducer:Sc,useRef:mg,useState:function(){return Sc(dr)},useDebugValue:Nc,useDeferredValue:function(t,n){var a=vt();return nt===null?Ac(a,t,n):Cg(a,nt.memoizedState,t,n)},useTransition:function(){var t=Sc(dr)[0],n=vt().memoizedState;return[typeof t=="boolean"?t:oa(t),n]},useSyncExternalStore:eg,useId:jg,useHostTransitionStatus:jc,useFormState:gg,useActionState:gg,useOptimistic:function(t,n){var a=vt();return nt!==null?ag(a,nt,t,n):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:vc,useCacheRefresh:Rg};Mg.useEffectEvent=yg;function Lc(t,n,a,s){n=t.memoizedState,a=a(s,n),a=a==null?n:b({},n,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var Dc={enqueueSetState:function(t,n,a){t=t._reactInternals;var s=yn(),d=Br(s);d.payload=n,a!=null&&(d.callback=a),n=Ir(t,d,s),n!==null&&(ln(n,t,s),ra(n,t,s))},enqueueReplaceState:function(t,n,a){t=t._reactInternals;var s=yn(),d=Br(s);d.tag=1,d.payload=n,a!=null&&(d.callback=a),n=Ir(t,d,s),n!==null&&(ln(n,t,s),ra(n,t,s))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var a=yn(),s=Br(a);s.tag=2,n!=null&&(s.callback=n),n=Ir(t,s,a),n!==null&&(ln(n,t,a),ra(n,t,a))}};function zg(t,n,a,s,d,g,k){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(s,g,k):n.prototype&&n.prototype.isPureReactComponent?!Zi(a,s)||!Zi(d,g):!0}function Fg(t,n,a,s){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,s),n.state!==t&&Dc.enqueueReplaceState(n,n.state,null)}function Al(t,n){var a=n;if("ref"in n){a={};for(var s in n)s!=="ref"&&(a[s]=n[s])}if(t=t.defaultProps){a===n&&(a=b({},a));for(var d in t)a[d]===void 0&&(a[d]=t[d])}return a}function Bg(t){xo(t)}function Ig(t){console.error(t)}function Ug(t){xo(t)}function qo(t,n){try{var a=t.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function Hg(t,n,a){try{var s=t.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Oc(t,n,a){return a=Br(a),a.tag=3,a.payload={element:null},a.callback=function(){qo(t,n)},a}function qg(t){return t=Br(t),t.tag=3,t}function Pg(t,n,a,s){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var g=s.value;t.payload=function(){return d(g)},t.callback=function(){Hg(n,a,s)}}var k=a.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(t.callback=function(){Hg(n,a,s),typeof d!="function"&&(Vr===null?Vr=new Set([this]):Vr.add(this));var _=s.stack;this.componentDidCatch(s.value,{componentStack:_!==null?_:""})})}function Aw(t,n,a,s,d){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=a.alternate,n!==null&&ei(n,a,d,!0),a=pn.current,a!==null){switch(a.tag){case 31:case 13:return _n===null?es():a.alternate===null&&yt===0&&(yt=3),a.flags&=-257,a.flags|=65536,a.lanes=d,s===jo?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([s]):n.add(s),af(t,s,d)),!1;case 22:return a.flags|=65536,s===jo?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([s]):a.add(s)),af(t,s,d)),!1}throw Error(i(435,a.tag))}return af(t,s,d),es(),!1}if(qe)return n=pn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=d,s!==Wu&&(t=Error(i(422),{cause:s}),Ji(An(t,a)))):(s!==Wu&&(n=Error(i(423),{cause:s}),Ji(An(n,a))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,s=An(s,a),d=Oc(t.stateNode,s,d),cc(t,d),yt!==4&&(yt=2)),!1;var g=Error(i(520),{cause:s});if(g=An(g,a),ba===null?ba=[g]:ba.push(g),yt!==4&&(yt=2),n===null)return!0;s=An(s,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,t=d&-d,a.lanes|=t,t=Oc(a.stateNode,s,t),cc(a,t),!1;case 1:if(n=a.type,g=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Vr===null||!Vr.has(g))))return a.flags|=65536,d&=-d,a.lanes|=d,d=qg(d),Pg(d,t,a,s),cc(a,d),!1}a=a.return}while(a!==null);return!1}var Mc=Error(i(461)),Ct=!1;function zt(t,n,a,s){n.child=t===null?Yp(n,null,a,s):Cl(n,t.child,a,s)}function $g(t,n,a,s,d){a=a.render;var g=n.ref;if("ref"in s){var k={};for(var _ in s)_!=="ref"&&(k[_]=s[_])}else k=s;return wl(n),s=mc(t,n,a,k,g,d),_=bc(),t!==null&&!Ct?(yc(t,n,d),hr(t,n,d)):(qe&&_&&Qu(n),n.flags|=1,zt(t,n,s,d),n.child)}function Vg(t,n,a,s,d){if(t===null){var g=a.type;return typeof g=="function"&&!Xu(g)&&g.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=g,Gg(t,n,g,s,d)):(t=ko(a.type,null,s,n,n.mode,d),t.ref=n.ref,t.return=n,n.child=t)}if(g=t.child,!Pc(t,d)){var k=g.memoizedProps;if(a=a.compare,a=a!==null?a:Zi,a(k,s)&&t.ref===n.ref)return hr(t,n,d)}return n.flags|=1,t=or(g,s),t.ref=n.ref,t.return=n,n.child=t}function Gg(t,n,a,s,d){if(t!==null){var g=t.memoizedProps;if(Zi(g,s)&&t.ref===n.ref)if(Ct=!1,n.pendingProps=s=g,Pc(t,d))(t.flags&131072)!==0&&(Ct=!0);else return n.lanes=t.lanes,hr(t,n,d)}return zc(t,n,a,s,d)}function Yg(t,n,a,s){var d=s.children,g=t!==null?t.memoizedState:null;if(t===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((n.flags&128)!==0){if(g=g!==null?g.baseLanes|a:a,t!==null){for(s=n.child=t.child,d=0;s!==null;)d=d|s.lanes|s.childLanes,s=s.sibling;s=d&~g}else s=0,n.child=null;return Xg(t,n,g,a,s)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ao(n,g!==null?g.cachePool:null),g!==null?Kp(n,g):dc(),Qp(n);else return s=n.lanes=536870912,Xg(t,n,g!==null?g.baseLanes|a:a,a,s)}else g!==null?(Ao(n,g.cachePool),Kp(n,g),Hr(),n.memoizedState=null):(t!==null&&Ao(n,null),dc(),Hr());return zt(t,n,d,a),n.child}function ca(t,n){return t!==null&&t.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Xg(t,n,a,s,d){var g=ac();return g=g===null?null:{parent:kt._currentValue,pool:g},n.memoizedState={baseLanes:a,cachePool:g},t!==null&&Ao(n,null),dc(),Qp(n),t!==null&&ei(t,n,s,!0),n.childLanes=d,null}function Po(t,n){return n=Vo({mode:n.mode,children:n.children},t.mode),n.ref=t.ref,t.child=n,n.return=t,n}function Zg(t,n,a){return Cl(n,t.child,null,a),t=Po(n,n.pendingProps),t.flags|=2,gn(n),n.memoizedState=null,t}function Tw(t,n,a){var s=n.pendingProps,d=(n.flags&128)!==0;if(n.flags&=-129,t===null){if(qe){if(s.mode==="hidden")return t=Po(n,s),n.lanes=536870912,ca(null,t);if(pc(n),(t=ft)?(t=ob(t,Rn),t=t!==null&&t.data==="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Dr!==null?{id:Yn,overflow:Xn}:null,retryLane:536870912,hydrationErrors:null},a=Lp(t),a.return=n,n.child=a,Ot=n,ft=null)):t=null,t===null)throw Mr(n);return n.lanes=536870912,null}return Po(n,s)}var g=t.memoizedState;if(g!==null){var k=g.dehydrated;if(pc(n),d)if(n.flags&256)n.flags&=-257,n=Zg(t,n,a);else if(n.memoizedState!==null)n.child=t.child,n.flags|=128,n=null;else throw Error(i(558));else if(Ct||ei(t,n,a,!1),d=(a&t.childLanes)!==0,Ct||d){if(s=ot,s!==null&&(k=lo(s,a),k!==0&&k!==g.retryLane))throw g.retryLane=k,bl(t,k),ln(s,t,k),Mc;es(),n=Zg(t,n,a)}else t=g.treeContext,ft=Ln(k.nextSibling),Ot=n,qe=!0,Or=null,Rn=!1,t!==null&&Mp(n,t),n=Po(n,s),n.flags|=4096;return n}return t=or(t.child,{mode:s.mode,children:s.children}),t.ref=n.ref,n.child=t,t.return=n,t}function $o(t,n){var a=n.ref;if(a===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(t===null||t.ref!==a)&&(n.flags|=4194816)}}function zc(t,n,a,s,d){return wl(n),a=mc(t,n,a,s,void 0,d),s=bc(),t!==null&&!Ct?(yc(t,n,d),hr(t,n,d)):(qe&&s&&Qu(n),n.flags|=1,zt(t,n,a,d),n.child)}function Kg(t,n,a,s,d,g){return wl(n),n.updateQueue=null,a=Wp(n,s,a,d),Jp(t),s=bc(),t!==null&&!Ct?(yc(t,n,g),hr(t,n,g)):(qe&&s&&Qu(n),n.flags|=1,zt(t,n,a,g),n.child)}function Qg(t,n,a,s,d){if(wl(n),n.stateNode===null){var g=Kl,k=a.contextType;typeof k=="object"&&k!==null&&(g=Mt(k)),g=new a(s,g),n.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Dc,n.stateNode=g,g._reactInternals=n,g=n.stateNode,g.props=s,g.state=n.memoizedState,g.refs={},sc(n),k=a.contextType,g.context=typeof k=="object"&&k!==null?Mt(k):Kl,g.state=n.memoizedState,k=a.getDerivedStateFromProps,typeof k=="function"&&(Lc(n,a,k,s),g.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(k=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),k!==g.state&&Dc.enqueueReplaceState(g,g.state,null),ia(n,s,g,d),la(),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(t===null){g=n.stateNode;var _=n.memoizedProps,$=Al(a,_);g.props=$;var ee=g.context,oe=a.contextType;k=Kl,typeof oe=="object"&&oe!==null&&(k=Mt(oe));var ce=a.getDerivedStateFromProps;oe=typeof ce=="function"||typeof g.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,oe||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(_||ee!==k)&&Fg(n,g,s,k),Fr=!1;var ne=n.memoizedState;g.state=ne,ia(n,s,g,d),la(),ee=n.memoizedState,_||ne!==ee||Fr?(typeof ce=="function"&&(Lc(n,a,ce,s),ee=n.memoizedState),($=Fr||zg(n,a,$,s,ne,ee,k))?(oe||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(n.flags|=4194308)):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=ee),g.props=s,g.state=ee,g.context=k,s=$):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{g=n.stateNode,uc(t,n),k=n.memoizedProps,oe=Al(a,k),g.props=oe,ce=n.pendingProps,ne=g.context,ee=a.contextType,$=Kl,typeof ee=="object"&&ee!==null&&($=Mt(ee)),_=a.getDerivedStateFromProps,(ee=typeof _=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(k!==ce||ne!==$)&&Fg(n,g,s,$),Fr=!1,ne=n.memoizedState,g.state=ne,ia(n,s,g,d),la();var ie=n.memoizedState;k!==ce||ne!==ie||Fr||t!==null&&t.dependencies!==null&&Co(t.dependencies)?(typeof _=="function"&&(Lc(n,a,_,s),ie=n.memoizedState),(oe=Fr||zg(n,a,oe,s,ne,ie,$)||t!==null&&t.dependencies!==null&&Co(t.dependencies))?(ee||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(s,ie,$),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(s,ie,$)),typeof g.componentDidUpdate=="function"&&(n.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof g.componentDidUpdate!="function"||k===t.memoizedProps&&ne===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&ne===t.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=ie),g.props=s,g.state=ie,g.context=$,s=oe):(typeof g.componentDidUpdate!="function"||k===t.memoizedProps&&ne===t.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||k===t.memoizedProps&&ne===t.memoizedState||(n.flags|=1024),s=!1)}return g=s,$o(t,n),s=(n.flags&128)!==0,g||s?(g=n.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:g.render(),n.flags|=1,t!==null&&s?(n.child=Cl(n,t.child,null,d),n.child=Cl(n,null,a,d)):zt(t,n,a,d),n.memoizedState=g.state,t=n.child):t=hr(t,n,d),t}function Jg(t,n,a,s){return xl(),n.flags|=256,zt(t,n,a,s),n.child}var Fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Bc(t){return{baseLanes:t,cachePool:Hp()}}function Ic(t,n,a){return t=t!==null?t.childLanes&~a:0,n&&(t|=bn),t}function Wg(t,n,a){var s=n.pendingProps,d=!1,g=(n.flags&128)!==0,k;if((k=g)||(k=t!==null&&t.memoizedState===null?!1:(xt.current&2)!==0),k&&(d=!0,n.flags&=-129),k=(n.flags&32)!==0,n.flags&=-33,t===null){if(qe){if(d?Ur(n):Hr(),(t=ft)?(t=ob(t,Rn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(n.memoizedState={dehydrated:t,treeContext:Dr!==null?{id:Yn,overflow:Xn}:null,retryLane:536870912,hydrationErrors:null},a=Lp(t),a.return=n,n.child=a,Ot=n,ft=null)):t=null,t===null)throw Mr(n);return Sf(t)?n.lanes=32:n.lanes=536870912,null}var _=s.children;return s=s.fallback,d?(Hr(),d=n.mode,_=Vo({mode:"hidden",children:_},d),s=yl(s,d,a,null),_.return=n,s.return=n,_.sibling=s,n.child=_,s=n.child,s.memoizedState=Bc(a),s.childLanes=Ic(t,k,a),n.memoizedState=Fc,ca(null,s)):(Ur(n),Uc(n,_))}var $=t.memoizedState;if($!==null&&(_=$.dehydrated,_!==null)){if(g)n.flags&256?(Ur(n),n.flags&=-257,n=Hc(t,n,a)):n.memoizedState!==null?(Hr(),n.child=t.child,n.flags|=128,n=null):(Hr(),_=s.fallback,d=n.mode,s=Vo({mode:"visible",children:s.children},d),_=yl(_,d,a,null),_.flags|=2,s.return=n,_.return=n,s.sibling=_,n.child=s,Cl(n,t.child,null,a),s=n.child,s.memoizedState=Bc(a),s.childLanes=Ic(t,k,a),n.memoizedState=Fc,n=ca(null,s));else if(Ur(n),Sf(_)){if(k=_.nextSibling&&_.nextSibling.dataset,k)var ee=k.dgst;k=ee,s=Error(i(419)),s.stack="",s.digest=k,Ji({value:s,source:null,stack:null}),n=Hc(t,n,a)}else if(Ct||ei(t,n,a,!1),k=(a&t.childLanes)!==0,Ct||k){if(k=ot,k!==null&&(s=lo(k,a),s!==0&&s!==$.retryLane))throw $.retryLane=s,bl(t,s),ln(k,t,s),Mc;wf(_)||es(),n=Hc(t,n,a)}else wf(_)?(n.flags|=192,n.child=t.child,n=null):(t=$.treeContext,ft=Ln(_.nextSibling),Ot=n,qe=!0,Or=null,Rn=!1,t!==null&&Mp(n,t),n=Uc(n,s.children),n.flags|=4096);return n}return d?(Hr(),_=s.fallback,d=n.mode,$=t.child,ee=$.sibling,s=or($,{mode:"hidden",children:s.children}),s.subtreeFlags=$.subtreeFlags&65011712,ee!==null?_=or(ee,_):(_=yl(_,d,a,null),_.flags|=2),_.return=n,s.return=n,s.sibling=_,n.child=s,ca(null,s),s=n.child,_=t.child.memoizedState,_===null?_=Bc(a):(d=_.cachePool,d!==null?($=kt._currentValue,d=d.parent!==$?{parent:$,pool:$}:d):d=Hp(),_={baseLanes:_.baseLanes|a,cachePool:d}),s.memoizedState=_,s.childLanes=Ic(t,k,a),n.memoizedState=Fc,ca(t.child,s)):(Ur(n),a=t.child,t=a.sibling,a=or(a,{mode:"visible",children:s.children}),a.return=n,a.sibling=null,t!==null&&(k=n.deletions,k===null?(n.deletions=[t],n.flags|=16):k.push(t)),n.child=a,n.memoizedState=null,a)}function Uc(t,n){return n=Vo({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Vo(t,n){return t=hn(22,t,null,n),t.lanes=0,t}function Hc(t,n,a){return Cl(n,t.child,null,a),t=Uc(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function em(t,n,a){t.lanes|=n;var s=t.alternate;s!==null&&(s.lanes|=n),nc(t.return,n,a)}function qc(t,n,a,s,d,g){var k=t.memoizedState;k===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:d,treeForkCount:g}:(k.isBackwards=n,k.rendering=null,k.renderingStartTime=0,k.last=s,k.tail=a,k.tailMode=d,k.treeForkCount=g)}function tm(t,n,a){var s=n.pendingProps,d=s.revealOrder,g=s.tail;s=s.children;var k=xt.current,_=(k&2)!==0;if(_?(k=k&1|2,n.flags|=128):k&=1,A(xt,k),zt(t,n,s,a),s=qe?Qi:0,!_&&t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&em(t,a,n);else if(t.tag===19)em(t,a,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(d){case"forwards":for(a=n.child,d=null;a!==null;)t=a.alternate,t!==null&&Do(t)===null&&(d=a),a=a.sibling;a=d,a===null?(d=n.child,n.child=null):(d=a.sibling,a.sibling=null),qc(n,!1,d,a,g,s);break;case"backwards":case"unstable_legacy-backwards":for(a=null,d=n.child,n.child=null;d!==null;){if(t=d.alternate,t!==null&&Do(t)===null){n.child=d;break}t=d.sibling,d.sibling=a,a=d,d=t}qc(n,!0,a,null,g,s);break;case"together":qc(n,!1,null,null,void 0,s);break;default:n.memoizedState=null}return n.child}function hr(t,n,a){if(t!==null&&(n.dependencies=t.dependencies),$r|=n.lanes,(a&n.childLanes)===0)if(t!==null){if(ei(t,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(i(153));if(n.child!==null){for(t=n.child,a=or(t,t.pendingProps),n.child=a,a.return=n;t.sibling!==null;)t=t.sibling,a=a.sibling=or(t,t.pendingProps),a.return=n;a.sibling=null}return n.child}function Pc(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&Co(t)))}function jw(t,n,a){switch(n.tag){case 3:ye(n,n.stateNode.containerInfo),zr(n,kt,t.memoizedState.cache),xl();break;case 27:case 5:ge(n);break;case 4:ye(n,n.stateNode.containerInfo);break;case 10:zr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,pc(n),null;break;case 13:var s=n.memoizedState;if(s!==null)return s.dehydrated!==null?(Ur(n),n.flags|=128,null):(a&n.child.childLanes)!==0?Wg(t,n,a):(Ur(n),t=hr(t,n,a),t!==null?t.sibling:null);Ur(n);break;case 19:var d=(t.flags&128)!==0;if(s=(a&n.childLanes)!==0,s||(ei(t,n,a,!1),s=(a&n.childLanes)!==0),d){if(s)return tm(t,n,a);n.flags|=128}if(d=n.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),A(xt,xt.current),s)break;return null;case 22:return n.lanes=0,Yg(t,n,a,n.pendingProps);case 24:zr(n,kt,t.memoizedState.cache)}return hr(t,n,a)}function nm(t,n,a){if(t!==null)if(t.memoizedProps!==n.pendingProps)Ct=!0;else{if(!Pc(t,a)&&(n.flags&128)===0)return Ct=!1,jw(t,n,a);Ct=(t.flags&131072)!==0}else Ct=!1,qe&&(n.flags&1048576)!==0&&Op(n,Qi,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(t=kl(n.elementType),n.type=t,typeof t=="function")Xu(t)?(s=Al(t,s),n.tag=1,n=Qg(null,n,t,s,a)):(n.tag=0,n=zc(null,n,t,s,a));else{if(t!=null){var d=t.$$typeof;if(d===z){n.tag=11,n=$g(null,n,t,s,a);break e}else if(d===O){n.tag=14,n=Vg(null,n,t,s,a);break e}}throw n=U(t)||t,Error(i(306,n,""))}}return n;case 0:return zc(t,n,n.type,n.pendingProps,a);case 1:return s=n.type,d=Al(s,n.pendingProps),Qg(t,n,s,d,a);case 3:e:{if(ye(n,n.stateNode.containerInfo),t===null)throw Error(i(387));s=n.pendingProps;var g=n.memoizedState;d=g.element,uc(t,n),ia(n,s,null,a);var k=n.memoizedState;if(s=k.cache,zr(n,kt,s),s!==g.cache&&rc(n,[kt],a,!0),la(),s=k.element,g.isDehydrated)if(g={element:s,isDehydrated:!1,cache:k.cache},n.updateQueue.baseState=g,n.memoizedState=g,n.flags&256){n=Jg(t,n,s,a);break e}else if(s!==d){d=An(Error(i(424)),n),Ji(d),n=Jg(t,n,s,a);break e}else for(t=n.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,ft=Ln(t.firstChild),Ot=n,qe=!0,Or=null,Rn=!0,a=Yp(n,null,s,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(xl(),s===d){n=hr(t,n,a);break e}zt(t,n,s,a)}n=n.child}return n;case 26:return $o(t,n),t===null?(a=hb(n.type,null,n.pendingProps,null))?n.memoizedState=a:qe||(a=n.type,t=n.pendingProps,s=os(fe.current).createElement(a),s[Tt]=n,s[wt]=t,Ft(s,a,t),Se(s),n.stateNode=s):n.memoizedState=hb(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return ge(n),t===null&&qe&&(s=n.stateNode=cb(n.type,n.pendingProps,fe.current),Ot=n,Rn=!0,d=ft,Zr(n.type)?(kf=d,ft=Ln(s.firstChild)):ft=d),zt(t,n,n.pendingProps.children,a),$o(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&qe&&((d=s=ft)&&(s=iS(s,n.type,n.pendingProps,Rn),s!==null?(n.stateNode=s,Ot=n,ft=Ln(s.firstChild),Rn=!1,d=!0):d=!1),d||Mr(n)),ge(n),d=n.type,g=n.pendingProps,k=t!==null?t.memoizedProps:null,s=g.children,yf(d,g)?s=null:k!==null&&yf(d,k)&&(n.flags|=32),n.memoizedState!==null&&(d=mc(t,n,vw,null,null,a),Ca._currentValue=d),$o(t,n),zt(t,n,s,a),n.child;case 6:return t===null&&qe&&((t=a=ft)&&(a=aS(a,n.pendingProps,Rn),a!==null?(n.stateNode=a,Ot=n,ft=null,t=!0):t=!1),t||Mr(n)),null;case 13:return Wg(t,n,a);case 4:return ye(n,n.stateNode.containerInfo),s=n.pendingProps,t===null?n.child=Cl(n,null,s,a):zt(t,n,s,a),n.child;case 11:return $g(t,n,n.type,n.pendingProps,a);case 7:return zt(t,n,n.pendingProps,a),n.child;case 8:return zt(t,n,n.pendingProps.children,a),n.child;case 12:return zt(t,n,n.pendingProps.children,a),n.child;case 10:return s=n.pendingProps,zr(n,n.type,s.value),zt(t,n,s.children,a),n.child;case 9:return d=n.type._context,s=n.pendingProps.children,wl(n),d=Mt(d),s=s(d),n.flags|=1,zt(t,n,s,a),n.child;case 14:return Vg(t,n,n.type,n.pendingProps,a);case 15:return Gg(t,n,n.type,n.pendingProps,a);case 19:return tm(t,n,a);case 31:return Tw(t,n,a);case 22:return Yg(t,n,a,n.pendingProps);case 24:return wl(n),s=Mt(kt),t===null?(d=ac(),d===null&&(d=ot,g=lc(),d.pooledCache=g,g.refCount++,g!==null&&(d.pooledCacheLanes|=a),d=g),n.memoizedState={parent:s,cache:d},sc(n),zr(n,kt,d)):((t.lanes&a)!==0&&(uc(t,n),ia(n,null,null,a),la()),d=t.memoizedState,g=n.memoizedState,d.parent!==s?(d={parent:s,cache:s},n.memoizedState=d,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=d),zr(n,kt,s)):(s=g.cache,zr(n,kt,s),s!==d.cache&&rc(n,[kt],a,!0))),zt(t,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(i(156,n.tag))}function pr(t){t.flags|=4}function $c(t,n,a,s,d){if((n=(t.mode&32)!==0)&&(n=!1),n){if(t.flags|=16777216,(d&335544128)===d)if(t.stateNode.complete)t.flags|=8192;else if(jm())t.flags|=8192;else throw El=jo,oc}else t.flags&=-16777217}function rm(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!yb(n))if(jm())t.flags|=8192;else throw El=jo,oc}function Go(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?Bi():536870912,t.lanes|=n,di|=n)}function fa(t,n){if(!qe)switch(t.tailMode){case"hidden":n=t.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:s.sibling=null}}function dt(t){var n=t.alternate!==null&&t.alternate.child===t.child,a=0,s=0;if(n)for(var d=t.child;d!==null;)a|=d.lanes|d.childLanes,s|=d.subtreeFlags&65011712,s|=d.flags&65011712,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)a|=d.lanes|d.childLanes,s|=d.subtreeFlags,s|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=s,t.childLanes=a,n}function Rw(t,n,a){var s=n.pendingProps;switch(Ju(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(n),null;case 1:return dt(n),null;case 3:return a=n.stateNode,s=null,t!==null&&(s=t.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),cr(kt),pe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Wl(n)?pr(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,ec())),dt(n),null;case 26:var d=n.type,g=n.memoizedState;return t===null?(pr(n),g!==null?(dt(n),rm(n,g)):(dt(n),$c(n,d,null,s,a))):g?g!==t.memoizedState?(pr(n),dt(n),rm(n,g)):(dt(n),n.flags&=-16777217):(t=t.memoizedProps,t!==s&&pr(n),dt(n),$c(n,d,t,s,a)),null;case 27:if(xe(n),a=fe.current,d=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&pr(n);else{if(!s){if(n.stateNode===null)throw Error(i(166));return dt(n),null}t=te.current,Wl(n)?zp(n):(t=cb(d,s,a),n.stateNode=t,pr(n))}return dt(n),null;case 5:if(xe(n),d=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==s&&pr(n);else{if(!s){if(n.stateNode===null)throw Error(i(166));return dt(n),null}if(g=te.current,Wl(n))zp(n);else{var k=os(fe.current);switch(g){case 1:g=k.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:g=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":g=k.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":g=k.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":g=k.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof s.is=="string"?k.createElement("select",{is:s.is}):k.createElement("select"),s.multiple?g.multiple=!0:s.size&&(g.size=s.size);break;default:g=typeof s.is=="string"?k.createElement(d,{is:s.is}):k.createElement(d)}}g[Tt]=n,g[wt]=s;e:for(k=n.child;k!==null;){if(k.tag===5||k.tag===6)g.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===n)break e;for(;k.sibling===null;){if(k.return===null||k.return===n)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}n.stateNode=g;e:switch(Ft(g,d,s),d){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&pr(n)}}return dt(n),$c(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,a),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==s&&pr(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(i(166));if(t=fe.current,Wl(n)){if(t=n.stateNode,a=n.memoizedProps,s=null,d=Ot,d!==null)switch(d.tag){case 27:case 5:s=d.memoizedProps}t[Tt]=n,t=!!(t.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||Wm(t.nodeValue,a)),t||Mr(n,!0)}else t=os(t).createTextNode(s),t[Tt]=n,n.stateNode=t}return dt(n),null;case 31:if(a=n.memoizedState,t===null||t.memoizedState!==null){if(s=Wl(n),a!==null){if(t===null){if(!s)throw Error(i(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(557));t[Tt]=n}else xl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),t=!1}else a=ec(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return n.flags&256?(gn(n),n):(gn(n),null);if((n.flags&128)!==0)throw Error(i(558))}return dt(n),null;case 13:if(s=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=Wl(n),s!==null&&s.dehydrated!==null){if(t===null){if(!d)throw Error(i(318));if(d=n.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(i(317));d[Tt]=n}else xl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),d=!1}else d=ec(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return n.flags&256?(gn(n),n):(gn(n),null)}return gn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=s!==null,t=t!==null&&t.memoizedState!==null,a&&(s=n.child,d=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(d=s.alternate.memoizedState.cachePool.pool),g=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(g=s.memoizedState.cachePool.pool),g!==d&&(s.flags|=2048)),a!==t&&a&&(n.child.flags|=8192),Go(n,n.updateQueue),dt(n),null);case 4:return pe(),t===null&&hf(n.stateNode.containerInfo),dt(n),null;case 10:return cr(n.type),dt(n),null;case 19:if(q(xt),s=n.memoizedState,s===null)return dt(n),null;if(d=(n.flags&128)!==0,g=s.rendering,g===null)if(d)fa(s,!1);else{if(yt!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(g=Do(t),g!==null){for(n.flags|=128,fa(s,!1),t=g.updateQueue,n.updateQueue=t,Go(n,t),n.subtreeFlags=0,t=a,a=n.child;a!==null;)_p(a,t),a=a.sibling;return A(xt,xt.current&1|2),qe&&sr(n,s.treeForkCount),n.child}t=t.sibling}s.tail!==null&&at()>Qo&&(n.flags|=128,d=!0,fa(s,!1),n.lanes=4194304)}else{if(!d)if(t=Do(g),t!==null){if(n.flags|=128,d=!0,t=t.updateQueue,n.updateQueue=t,Go(n,t),fa(s,!0),s.tail===null&&s.tailMode==="hidden"&&!g.alternate&&!qe)return dt(n),null}else 2*at()-s.renderingStartTime>Qo&&a!==536870912&&(n.flags|=128,d=!0,fa(s,!1),n.lanes=4194304);s.isBackwards?(g.sibling=n.child,n.child=g):(t=s.last,t!==null?t.sibling=g:n.child=g,s.last=g)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=at(),t.sibling=null,a=xt.current,A(xt,d?a&1|2:a&1),qe&&sr(n,s.treeForkCount),t):(dt(n),null);case 22:case 23:return gn(n),hc(),s=n.memoizedState!==null,t!==null?t.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(a&536870912)!==0&&(n.flags&128)===0&&(dt(n),n.subtreeFlags&6&&(n.flags|=8192)):dt(n),a=n.updateQueue,a!==null&&Go(n,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==a&&(n.flags|=2048),t!==null&&q(Sl),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),cr(kt),dt(n),null;case 25:return null;case 30:return null}throw Error(i(156,n.tag))}function _w(t,n){switch(Ju(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return cr(kt),pe(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return xe(n),null;case 31:if(n.memoizedState!==null){if(gn(n),n.alternate===null)throw Error(i(340));xl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(gn(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(i(340));xl()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return q(xt),null;case 4:return pe(),null;case 10:return cr(n.type),null;case 22:case 23:return gn(n),hc(),t!==null&&q(Sl),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return cr(kt),null;case 25:return null;default:return null}}function lm(t,n){switch(Ju(n),n.tag){case 3:cr(kt),pe();break;case 26:case 27:case 5:xe(n);break;case 4:pe();break;case 31:n.memoizedState!==null&&gn(n);break;case 13:gn(n);break;case 19:q(xt);break;case 10:cr(n.type);break;case 22:case 23:gn(n),hc(),t!==null&&q(Sl);break;case 24:cr(kt)}}function da(t,n){try{var a=n.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var d=s.next;a=d;do{if((a.tag&t)===t){s=void 0;var g=a.create,k=a.inst;s=g(),k.destroy=s}a=a.next}while(a!==d)}}catch(_){et(n,n.return,_)}}function qr(t,n,a){try{var s=n.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var g=d.next;s=g;do{if((s.tag&t)===t){var k=s.inst,_=k.destroy;if(_!==void 0){k.destroy=void 0,d=n;var $=a,ee=_;try{ee()}catch(oe){et(d,$,oe)}}}s=s.next}while(s!==g)}}catch(oe){et(n,n.return,oe)}}function im(t){var n=t.updateQueue;if(n!==null){var a=t.stateNode;try{Zp(n,a)}catch(s){et(t,t.return,s)}}}function am(t,n,a){a.props=Al(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(s){et(t,n,s)}}function ha(t,n){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var s=t.stateNode;break;case 30:s=t.stateNode;break;default:s=t.stateNode}typeof a=="function"?t.refCleanup=a(s):a.current=s}}catch(d){et(t,n,d)}}function Zn(t,n){var a=t.ref,s=t.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(d){et(t,n,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(d){et(t,n,d)}else a.current=null}function om(t){var n=t.type,a=t.memoizedProps,s=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(d){et(t,t.return,d)}}function Vc(t,n,a){try{var s=t.stateNode;Ww(s,t.type,a,n),s[wt]=n}catch(d){et(t,t.return,d)}}function sm(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Zr(t.type)||t.tag===4}function Gc(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||sm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Zr(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Yc(t,n,a){var s=t.tag;if(s===5||s===6)t=t.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(t),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=ir));else if(s!==4&&(s===27&&Zr(t.type)&&(a=t.stateNode,n=null),t=t.child,t!==null))for(Yc(t,n,a),t=t.sibling;t!==null;)Yc(t,n,a),t=t.sibling}function Yo(t,n,a){var s=t.tag;if(s===5||s===6)t=t.stateNode,n?a.insertBefore(t,n):a.appendChild(t);else if(s!==4&&(s===27&&Zr(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Yo(t,n,a),t=t.sibling;t!==null;)Yo(t,n,a),t=t.sibling}function um(t){var n=t.stateNode,a=t.memoizedProps;try{for(var s=t.type,d=n.attributes;d.length;)n.removeAttributeNode(d[0]);Ft(n,s,a),n[Tt]=t,n[wt]=a}catch(g){et(t,t.return,g)}}var gr=!1,Nt=!1,Xc=!1,cm=typeof WeakSet=="function"?WeakSet:Set,_t=null;function Lw(t,n){if(t=t.containerInfo,mf=ps,t=Sp(t),Hu(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var d=s.anchorOffset,g=s.focusNode;s=s.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var k=0,_=-1,$=-1,ee=0,oe=0,ce=t,ne=null;t:for(;;){for(var ie;ce!==a||d!==0&&ce.nodeType!==3||(_=k+d),ce!==g||s!==0&&ce.nodeType!==3||($=k+s),ce.nodeType===3&&(k+=ce.nodeValue.length),(ie=ce.firstChild)!==null;)ne=ce,ce=ie;for(;;){if(ce===t)break t;if(ne===a&&++ee===d&&(_=k),ne===g&&++oe===s&&($=k),(ie=ce.nextSibling)!==null)break;ce=ne,ne=ce.parentNode}ce=ie}a=_===-1||$===-1?null:{start:_,end:$}}else a=null}a=a||{start:0,end:0}}else a=null;for(bf={focusedElem:t,selectionRange:a},ps=!1,_t=n;_t!==null;)if(n=_t,t=n.child,(n.subtreeFlags&1028)!==0&&t!==null)t.return=n,_t=t;else for(;_t!==null;){switch(n=_t,g=n.alternate,t=n.flags,n.tag){case 0:if((t&4)!==0&&(t=n.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)d=t[a],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,a=n,d=g.memoizedProps,g=g.memoizedState,s=a.stateNode;try{var ke=Al(a.type,d);t=s.getSnapshotBeforeUpdate(ke,g),s.__reactInternalSnapshotBeforeUpdate=t}catch(je){et(a,a.return,je)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,a=t.nodeType,a===9)vf(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":vf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(i(163))}if(t=n.sibling,t!==null){t.return=n.return,_t=t;break}_t=n.return}}function fm(t,n,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:br(t,a),s&4&&da(5,a);break;case 1:if(br(t,a),s&4)if(t=a.stateNode,n===null)try{t.componentDidMount()}catch(k){et(a,a.return,k)}else{var d=Al(a.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(d,n,t.__reactInternalSnapshotBeforeUpdate)}catch(k){et(a,a.return,k)}}s&64&&im(a),s&512&&ha(a,a.return);break;case 3:if(br(t,a),s&64&&(t=a.updateQueue,t!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{Zp(t,n)}catch(k){et(a,a.return,k)}}break;case 27:n===null&&s&4&&um(a);case 26:case 5:br(t,a),n===null&&s&4&&om(a),s&512&&ha(a,a.return);break;case 12:br(t,a);break;case 31:br(t,a),s&4&&pm(t,a);break;case 13:br(t,a),s&4&&gm(t,a),s&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=Hw.bind(null,a),oS(t,a))));break;case 22:if(s=a.memoizedState!==null||gr,!s){n=n!==null&&n.memoizedState!==null||Nt,d=gr;var g=Nt;gr=s,(Nt=n)&&!g?yr(t,a,(a.subtreeFlags&8772)!==0):br(t,a),gr=d,Nt=g}break;case 30:break;default:br(t,a)}}function dm(t){var n=t.alternate;n!==null&&(t.alternate=null,dm(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Hi(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ht=null,en=!1;function mr(t,n,a){for(a=a.child;a!==null;)hm(t,n,a),a=a.sibling}function hm(t,n,a){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(Dt,a)}catch{}switch(a.tag){case 26:Nt||Zn(a,n),mr(t,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Nt||Zn(a,n);var s=ht,d=en;Zr(a.type)&&(ht=a.stateNode,en=!1),mr(t,n,a),Sa(a.stateNode),ht=s,en=d;break;case 5:Nt||Zn(a,n);case 6:if(s=ht,d=en,ht=null,mr(t,n,a),ht=s,en=d,ht!==null)if(en)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(a.stateNode)}catch(g){et(a,n,g)}else try{ht.removeChild(a.stateNode)}catch(g){et(a,n,g)}break;case 18:ht!==null&&(en?(t=ht,ib(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),vi(t)):ib(ht,a.stateNode));break;case 4:s=ht,d=en,ht=a.stateNode.containerInfo,en=!0,mr(t,n,a),ht=s,en=d;break;case 0:case 11:case 14:case 15:qr(2,a,n),Nt||qr(4,a,n),mr(t,n,a);break;case 1:Nt||(Zn(a,n),s=a.stateNode,typeof s.componentWillUnmount=="function"&&am(a,n,s)),mr(t,n,a);break;case 21:mr(t,n,a);break;case 22:Nt=(s=Nt)||a.memoizedState!==null,mr(t,n,a),Nt=s;break;default:mr(t,n,a)}}function pm(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{vi(t)}catch(a){et(n,n.return,a)}}}function gm(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{vi(t)}catch(a){et(n,n.return,a)}}function Dw(t){switch(t.tag){case 31:case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new cm),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new cm),n;default:throw Error(i(435,t.tag))}}function Xo(t,n){var a=Dw(t);n.forEach(function(s){if(!a.has(s)){a.add(s);var d=qw.bind(null,t,s);s.then(d,d)}})}function tn(t,n){var a=n.deletions;if(a!==null)for(var s=0;s<a.length;s++){var d=a[s],g=t,k=n,_=k;e:for(;_!==null;){switch(_.tag){case 27:if(Zr(_.type)){ht=_.stateNode,en=!1;break e}break;case 5:ht=_.stateNode,en=!1;break e;case 3:case 4:ht=_.stateNode.containerInfo,en=!0;break e}_=_.return}if(ht===null)throw Error(i(160));hm(g,k,d),ht=null,en=!1,g=d.alternate,g!==null&&(g.return=null),d.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)mm(n,t),n=n.sibling}var Un=null;function mm(t,n){var a=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:tn(n,t),nn(t),s&4&&(qr(3,t,t.return),da(3,t),qr(5,t,t.return));break;case 1:tn(n,t),nn(t),s&512&&(Nt||a===null||Zn(a,a.return)),s&64&&gr&&(t=t.updateQueue,t!==null&&(s=t.callbacks,s!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var d=Un;if(tn(n,t),nn(t),s&512&&(Nt||a===null||Zn(a,a.return)),s&4){var g=a!==null?a.memoizedState:null;if(s=t.memoizedState,a===null)if(s===null)if(t.stateNode===null){e:{s=t.type,a=t.memoizedProps,d=d.ownerDocument||d;t:switch(s){case"title":g=d.getElementsByTagName("title")[0],(!g||g[hl]||g[Tt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=d.createElement(s),d.head.insertBefore(g,d.querySelector("head > title"))),Ft(g,s,a),g[Tt]=t,Se(g),s=g;break e;case"link":var k=mb("link","href",d).get(s+(a.href||""));if(k){for(var _=0;_<k.length;_++)if(g=k[_],g.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&g.getAttribute("rel")===(a.rel==null?null:a.rel)&&g.getAttribute("title")===(a.title==null?null:a.title)&&g.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){k.splice(_,1);break t}}g=d.createElement(s),Ft(g,s,a),d.head.appendChild(g);break;case"meta":if(k=mb("meta","content",d).get(s+(a.content||""))){for(_=0;_<k.length;_++)if(g=k[_],g.getAttribute("content")===(a.content==null?null:""+a.content)&&g.getAttribute("name")===(a.name==null?null:a.name)&&g.getAttribute("property")===(a.property==null?null:a.property)&&g.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&g.getAttribute("charset")===(a.charSet==null?null:a.charSet)){k.splice(_,1);break t}}g=d.createElement(s),Ft(g,s,a),d.head.appendChild(g);break;default:throw Error(i(468,s))}g[Tt]=t,Se(g),s=g}t.stateNode=s}else bb(d,t.type,t.stateNode);else t.stateNode=gb(d,s,t.memoizedProps);else g!==s?(g===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):g.count--,s===null?bb(d,t.type,t.stateNode):gb(d,s,t.memoizedProps)):s===null&&t.stateNode!==null&&Vc(t,t.memoizedProps,a.memoizedProps)}break;case 27:tn(n,t),nn(t),s&512&&(Nt||a===null||Zn(a,a.return)),a!==null&&s&4&&Vc(t,t.memoizedProps,a.memoizedProps);break;case 5:if(tn(n,t),nn(t),s&512&&(Nt||a===null||Zn(a,a.return)),t.flags&32){d=t.stateNode;try{Pl(d,"")}catch(ke){et(t,t.return,ke)}}s&4&&t.stateNode!=null&&(d=t.memoizedProps,Vc(t,d,a!==null?a.memoizedProps:d)),s&1024&&(Xc=!0);break;case 6:if(tn(n,t),nn(t),s&4){if(t.stateNode===null)throw Error(i(162));s=t.memoizedProps,a=t.stateNode;try{a.nodeValue=s}catch(ke){et(t,t.return,ke)}}break;case 3:if(cs=null,d=Un,Un=ss(n.containerInfo),tn(n,t),Un=d,nn(t),s&4&&a!==null&&a.memoizedState.isDehydrated)try{vi(n.containerInfo)}catch(ke){et(t,t.return,ke)}Xc&&(Xc=!1,bm(t));break;case 4:s=Un,Un=ss(t.stateNode.containerInfo),tn(n,t),nn(t),Un=s;break;case 12:tn(n,t),nn(t);break;case 31:tn(n,t),nn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Xo(t,s)));break;case 13:tn(n,t),nn(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Ko=at()),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Xo(t,s)));break;case 22:d=t.memoizedState!==null;var $=a!==null&&a.memoizedState!==null,ee=gr,oe=Nt;if(gr=ee||d,Nt=oe||$,tn(n,t),Nt=oe,gr=ee,nn(t),s&8192)e:for(n=t.stateNode,n._visibility=d?n._visibility&-2:n._visibility|1,d&&(a===null||$||gr||Nt||Tl(t)),a=null,n=t;;){if(n.tag===5||n.tag===26){if(a===null){$=a=n;try{if(g=$.stateNode,d)k=g.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{_=$.stateNode;var ce=$.memoizedProps.style,ne=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;_.style.display=ne==null||typeof ne=="boolean"?"":(""+ne).trim()}}catch(ke){et($,$.return,ke)}}}else if(n.tag===6){if(a===null){$=n;try{$.stateNode.nodeValue=d?"":$.memoizedProps}catch(ke){et($,$.return,ke)}}}else if(n.tag===18){if(a===null){$=n;try{var ie=$.stateNode;d?ab(ie,!0):ab($.stateNode,!1)}catch(ke){et($,$.return,ke)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break e;for(;n.sibling===null;){if(n.return===null||n.return===t)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}s&4&&(s=t.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,Xo(t,a))));break;case 19:tn(n,t),nn(t),s&4&&(s=t.updateQueue,s!==null&&(t.updateQueue=null,Xo(t,s)));break;case 30:break;case 21:break;default:tn(n,t),nn(t)}}function nn(t){var n=t.flags;if(n&2){try{for(var a,s=t.return;s!==null;){if(sm(s)){a=s;break}s=s.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var d=a.stateNode,g=Gc(t);Yo(t,g,d);break;case 5:var k=a.stateNode;a.flags&32&&(Pl(k,""),a.flags&=-33);var _=Gc(t);Yo(t,_,k);break;case 3:case 4:var $=a.stateNode.containerInfo,ee=Gc(t);Yc(t,ee,$);break;default:throw Error(i(161))}}catch(oe){et(t,t.return,oe)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function bm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;bm(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function br(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)fm(t,n.alternate,n),n=n.sibling}function Tl(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:qr(4,n,n.return),Tl(n);break;case 1:Zn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&am(n,n.return,a),Tl(n);break;case 27:Sa(n.stateNode);case 26:case 5:Zn(n,n.return),Tl(n);break;case 22:n.memoizedState===null&&Tl(n);break;case 30:Tl(n);break;default:Tl(n)}t=t.sibling}}function yr(t,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var s=n.alternate,d=t,g=n,k=g.flags;switch(g.tag){case 0:case 11:case 15:yr(d,g,a),da(4,g);break;case 1:if(yr(d,g,a),s=g,d=s.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(ee){et(s,s.return,ee)}if(s=g,d=s.updateQueue,d!==null){var _=s.stateNode;try{var $=d.shared.hiddenCallbacks;if($!==null)for(d.shared.hiddenCallbacks=null,d=0;d<$.length;d++)Xp($[d],_)}catch(ee){et(s,s.return,ee)}}a&&k&64&&im(g),ha(g,g.return);break;case 27:um(g);case 26:case 5:yr(d,g,a),a&&s===null&&k&4&&om(g),ha(g,g.return);break;case 12:yr(d,g,a);break;case 31:yr(d,g,a),a&&k&4&&pm(d,g);break;case 13:yr(d,g,a),a&&k&4&&gm(d,g);break;case 22:g.memoizedState===null&&yr(d,g,a),ha(g,g.return);break;case 30:break;default:yr(d,g,a)}n=n.sibling}}function Zc(t,n){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&Wi(a))}function Kc(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Wi(t))}function Hn(t,n,a,s){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)ym(t,n,a,s),n=n.sibling}function ym(t,n,a,s){var d=n.flags;switch(n.tag){case 0:case 11:case 15:Hn(t,n,a,s),d&2048&&da(9,n);break;case 1:Hn(t,n,a,s);break;case 3:Hn(t,n,a,s),d&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Wi(t)));break;case 12:if(d&2048){Hn(t,n,a,s),t=n.stateNode;try{var g=n.memoizedProps,k=g.id,_=g.onPostCommit;typeof _=="function"&&_(k,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch($){et(n,n.return,$)}}else Hn(t,n,a,s);break;case 31:Hn(t,n,a,s);break;case 13:Hn(t,n,a,s);break;case 23:break;case 22:g=n.stateNode,k=n.alternate,n.memoizedState!==null?g._visibility&2?Hn(t,n,a,s):pa(t,n):g._visibility&2?Hn(t,n,a,s):(g._visibility|=2,ui(t,n,a,s,(n.subtreeFlags&10256)!==0||!1)),d&2048&&Zc(k,n);break;case 24:Hn(t,n,a,s),d&2048&&Kc(n.alternate,n);break;default:Hn(t,n,a,s)}}function ui(t,n,a,s,d){for(d=d&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var g=t,k=n,_=a,$=s,ee=k.flags;switch(k.tag){case 0:case 11:case 15:ui(g,k,_,$,d),da(8,k);break;case 23:break;case 22:var oe=k.stateNode;k.memoizedState!==null?oe._visibility&2?ui(g,k,_,$,d):pa(g,k):(oe._visibility|=2,ui(g,k,_,$,d)),d&&ee&2048&&Zc(k.alternate,k);break;case 24:ui(g,k,_,$,d),d&&ee&2048&&Kc(k.alternate,k);break;default:ui(g,k,_,$,d)}n=n.sibling}}function pa(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=t,s=n,d=s.flags;switch(s.tag){case 22:pa(a,s),d&2048&&Zc(s.alternate,s);break;case 24:pa(a,s),d&2048&&Kc(s.alternate,s);break;default:pa(a,s)}n=n.sibling}}var ga=8192;function ci(t,n,a){if(t.subtreeFlags&ga)for(t=t.child;t!==null;)xm(t,n,a),t=t.sibling}function xm(t,n,a){switch(t.tag){case 26:ci(t,n,a),t.flags&ga&&t.memoizedState!==null&&xS(a,Un,t.memoizedState,t.memoizedProps);break;case 5:ci(t,n,a);break;case 3:case 4:var s=Un;Un=ss(t.stateNode.containerInfo),ci(t,n,a),Un=s;break;case 22:t.memoizedState===null&&(s=t.alternate,s!==null&&s.memoizedState!==null?(s=ga,ga=16777216,ci(t,n,a),ga=s):ci(t,n,a));break;default:ci(t,n,a)}}function vm(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function ma(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var s=n[a];_t=s,Sm(s,t)}vm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)wm(t),t=t.sibling}function wm(t){switch(t.tag){case 0:case 11:case 15:ma(t),t.flags&2048&&qr(9,t,t.return);break;case 3:ma(t);break;case 12:ma(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Zo(t)):ma(t);break;default:ma(t)}}function Zo(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var s=n[a];_t=s,Sm(s,t)}vm(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:qr(8,n,n.return),Zo(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Zo(n));break;default:Zo(n)}t=t.sibling}}function Sm(t,n){for(;_t!==null;){var a=_t;switch(a.tag){case 0:case 11:case 15:qr(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Wi(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,_t=s;else e:for(a=t;_t!==null;){s=_t;var d=s.sibling,g=s.return;if(dm(s),s===a){_t=null;break e}if(d!==null){d.return=g,_t=d;break e}_t=g}}}var Ow={getCacheForType:function(t){var n=Mt(kt),a=n.data.get(t);return a===void 0&&(a=t(),n.data.set(t,a)),a},cacheSignal:function(){return Mt(kt).controller.signal}},Mw=typeof WeakMap=="function"?WeakMap:Map,Ze=0,ot=null,ze=null,Ue=0,We=0,mn=null,Pr=!1,fi=!1,Qc=!1,xr=0,yt=0,$r=0,jl=0,Jc=0,bn=0,di=0,ba=null,rn=null,Wc=!1,Ko=0,km=0,Qo=1/0,Jo=null,Vr=null,jt=0,Gr=null,hi=null,vr=0,ef=0,tf=null,Em=null,ya=0,nf=null;function yn(){return(Ze&2)!==0&&Ue!==0?Ue&-Ue:B.T!==null?uf():io()}function Cm(){if(bn===0)if((Ue&536870912)===0||qe){var t=Il;Il<<=1,(Il&3932160)===0&&(Il=262144),bn=t}else bn=536870912;return t=pn.current,t!==null&&(t.flags|=32),bn}function ln(t,n,a){(t===ot&&(We===2||We===9)||t.cancelPendingCommit!==null)&&(pi(t,0),Yr(t,Ue,bn,!1)),dl(t,a),((Ze&2)===0||t!==ot)&&(t===ot&&((Ze&2)===0&&(jl|=a),yt===4&&Yr(t,Ue,bn,!1)),Kn(t))}function Nm(t,n,a){if((Ze&6)!==0)throw Error(i(327));var s=!a&&(n&127)===0&&(n&t.expiredLanes)===0||$n(t,n),d=s?Bw(t,n):lf(t,n,!0),g=s;do{if(d===0){fi&&!s&&Yr(t,n,0,!1);break}else{if(a=t.current.alternate,g&&!zw(a)){d=lf(t,n,!1),g=!1;continue}if(d===2){if(g=n,t.errorRecoveryDisabledLanes&g)var k=0;else k=t.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){n=k;e:{var _=t;d=ba;var $=_.current.memoizedState.isDehydrated;if($&&(pi(_,k).flags|=256),k=lf(_,k,!1),k!==2){if(Qc&&!$){_.errorRecoveryDisabledLanes|=g,jl|=g,d=4;break e}g=rn,rn=d,g!==null&&(rn===null?rn=g:rn.push.apply(rn,g))}d=k}if(g=!1,d!==2)continue}}if(d===1){pi(t,0),Yr(t,n,0,!0);break}e:{switch(s=t,g=d,g){case 0:case 1:throw Error(i(345));case 4:if((n&4194048)!==n)break;case 6:Yr(s,n,bn,!Pr);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((n&62914560)===n&&(d=Ko+300-at(),10<d)){if(Yr(s,n,bn,!Pr),jr(s,0,!0)!==0)break e;vr=n,s.timeoutHandle=rb(Am.bind(null,s,a,rn,Jo,Wc,n,bn,jl,di,Pr,g,"Throttled",-0,0),d);break e}Am(s,a,rn,Jo,Wc,n,bn,jl,di,Pr,g,null,-0,0)}}break}while(!0);Kn(t)}function Am(t,n,a,s,d,g,k,_,$,ee,oe,ce,ne,ie){if(t.timeoutHandle=-1,ce=n.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ir},xm(n,g,ce);var ke=(g&62914560)===g?Ko-at():(g&4194048)===g?km-at():0;if(ke=vS(ce,ke),ke!==null){vr=g,t.cancelPendingCommit=ke(Mm.bind(null,t,n,g,a,s,d,k,_,$,oe,ce,null,ne,ie)),Yr(t,g,k,!ee);return}}Mm(t,n,g,a,s,d,k,_,$)}function zw(t){for(var n=t;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var d=a[s],g=d.getSnapshot;d=d.value;try{if(!dn(g(),d))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Yr(t,n,a,s){n&=~Jc,n&=~jl,t.suspendedLanes|=n,t.pingedLanes&=~n,s&&(t.warmLanes|=n),s=t.expirationTimes;for(var d=n;0<d;){var g=31-Je(d),k=1<<g;s[g]=-1,d&=~k}a!==0&&Ii(t,a,n)}function Wo(){return(Ze&6)===0?(xa(0),!1):!0}function rf(){if(ze!==null){if(We===0)var t=ze.return;else t=ze,ur=vl=null,xc(t),li=null,ta=0,t=ze;for(;t!==null;)lm(t.alternate,t),t=t.return;ze=null}}function pi(t,n){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,nS(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),vr=0,rf(),ot=t,ze=a=or(t.current,null),Ue=n,We=0,mn=null,Pr=!1,fi=$n(t,n),Qc=!1,di=bn=Jc=jl=$r=yt=0,rn=ba=null,Wc=!1,(n&8)!==0&&(n|=n&32);var s=t.entangledLanes;if(s!==0)for(t=t.entanglements,s&=n;0<s;){var d=31-Je(s),g=1<<d;n|=t[d],s&=~g}return xr=n,vo(),a}function Tm(t,n){_e=null,B.H=ua,n===ri||n===To?(n=$p(),We=3):n===oc?(n=$p(),We=4):We=n===Mc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,mn=n,ze===null&&(yt=1,qo(t,An(n,t.current)))}function jm(){var t=pn.current;return t===null?!0:(Ue&4194048)===Ue?_n===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?t===_n:!1}function Rm(){var t=B.H;return B.H=ua,t===null?ua:t}function _m(){var t=B.A;return B.A=Ow,t}function es(){yt=4,Pr||(Ue&4194048)!==Ue&&pn.current!==null||(fi=!0),($r&134217727)===0&&(jl&134217727)===0||ot===null||Yr(ot,Ue,bn,!1)}function lf(t,n,a){var s=Ze;Ze|=2;var d=Rm(),g=_m();(ot!==t||Ue!==n)&&(Jo=null,pi(t,n)),n=!1;var k=yt;e:do try{if(We!==0&&ze!==null){var _=ze,$=mn;switch(We){case 8:rf(),k=6;break e;case 3:case 2:case 9:case 6:pn.current===null&&(n=!0);var ee=We;if(We=0,mn=null,gi(t,_,$,ee),a&&fi){k=0;break e}break;default:ee=We,We=0,mn=null,gi(t,_,$,ee)}}Fw(),k=yt;break}catch(oe){Tm(t,oe)}while(!0);return n&&t.shellSuspendCounter++,ur=vl=null,Ze=s,B.H=d,B.A=g,ze===null&&(ot=null,Ue=0,vo()),k}function Fw(){for(;ze!==null;)Lm(ze)}function Bw(t,n){var a=Ze;Ze|=2;var s=Rm(),d=_m();ot!==t||Ue!==n?(Jo=null,Qo=at()+500,pi(t,n)):fi=$n(t,n);e:do try{if(We!==0&&ze!==null){n=ze;var g=mn;t:switch(We){case 1:We=0,mn=null,gi(t,n,g,1);break;case 2:case 9:if(qp(g)){We=0,mn=null,Dm(n);break}n=function(){We!==2&&We!==9||ot!==t||(We=7),Kn(t)},g.then(n,n);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:qp(g)?(We=0,mn=null,Dm(n)):(We=0,mn=null,gi(t,n,g,7));break;case 5:var k=null;switch(ze.tag){case 26:k=ze.memoizedState;case 5:case 27:var _=ze;if(k?yb(k):_.stateNode.complete){We=0,mn=null;var $=_.sibling;if($!==null)ze=$;else{var ee=_.return;ee!==null?(ze=ee,ts(ee)):ze=null}break t}}We=0,mn=null,gi(t,n,g,5);break;case 6:We=0,mn=null,gi(t,n,g,6);break;case 8:rf(),yt=6;break e;default:throw Error(i(462))}}Iw();break}catch(oe){Tm(t,oe)}while(!0);return ur=vl=null,B.H=s,B.A=d,Ze=a,ze!==null?0:(ot=null,Ue=0,vo(),yt)}function Iw(){for(;ze!==null&&!Yt();)Lm(ze)}function Lm(t){var n=nm(t.alternate,t,xr);t.memoizedProps=t.pendingProps,n===null?ts(t):ze=n}function Dm(t){var n=t,a=n.alternate;switch(n.tag){case 15:case 0:n=Kg(a,n,n.pendingProps,n.type,void 0,Ue);break;case 11:n=Kg(a,n,n.pendingProps,n.type.render,n.ref,Ue);break;case 5:xc(n);default:lm(a,n),n=ze=_p(n,xr),n=nm(a,n,xr)}t.memoizedProps=t.pendingProps,n===null?ts(t):ze=n}function gi(t,n,a,s){ur=vl=null,xc(n),li=null,ta=0;var d=n.return;try{if(Aw(t,d,n,a,Ue)){yt=1,qo(t,An(a,t.current)),ze=null;return}}catch(g){if(d!==null)throw ze=d,g;yt=1,qo(t,An(a,t.current)),ze=null;return}n.flags&32768?(qe||s===1?t=!0:fi||(Ue&536870912)!==0?t=!1:(Pr=t=!0,(s===2||s===9||s===3||s===6)&&(s=pn.current,s!==null&&s.tag===13&&(s.flags|=16384))),Om(n,t)):ts(n)}function ts(t){var n=t;do{if((n.flags&32768)!==0){Om(n,Pr);return}t=n.return;var a=Rw(n.alternate,n,xr);if(a!==null){ze=a;return}if(n=n.sibling,n!==null){ze=n;return}ze=n=t}while(n!==null);yt===0&&(yt=5)}function Om(t,n){do{var a=_w(t.alternate,t);if(a!==null){a.flags&=32767,ze=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(t=t.sibling,t!==null)){ze=t;return}ze=t=a}while(t!==null);yt=6,ze=null}function Mm(t,n,a,s,d,g,k,_,$){t.cancelPendingCommit=null;do ns();while(jt!==0);if((Ze&6)!==0)throw Error(i(327));if(n!==null){if(n===t.current)throw Error(i(177));if(g=n.lanes|n.childLanes,g|=Gu,ro(t,a,g,k,_,$),t===ot&&(ze=ot=null,Ue=0),hi=n,Gr=t,vr=a,ef=g,tf=d,Em=s,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Pw(Te,function(){return Um(),null})):(t.callbackNode=null,t.callbackPriority=0),s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=B.T,B.T=null,d=X.p,X.p=2,k=Ze,Ze|=4;try{Lw(t,n,a)}finally{Ze=k,X.p=d,B.T=s}}jt=1,zm(),Fm(),Bm()}}function zm(){if(jt===1){jt=0;var t=Gr,n=hi,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=B.T,B.T=null;var s=X.p;X.p=2;var d=Ze;Ze|=4;try{mm(n,t);var g=bf,k=Sp(t.containerInfo),_=g.focusedElem,$=g.selectionRange;if(k!==_&&_&&_.ownerDocument&&wp(_.ownerDocument.documentElement,_)){if($!==null&&Hu(_)){var ee=$.start,oe=$.end;if(oe===void 0&&(oe=ee),"selectionStart"in _)_.selectionStart=ee,_.selectionEnd=Math.min(oe,_.value.length);else{var ce=_.ownerDocument||document,ne=ce&&ce.defaultView||window;if(ne.getSelection){var ie=ne.getSelection(),ke=_.textContent.length,je=Math.min($.start,ke),lt=$.end===void 0?je:Math.min($.end,ke);!ie.extend&&je>lt&&(k=lt,lt=je,je=k);var J=vp(_,je),K=vp(_,lt);if(J&&K&&(ie.rangeCount!==1||ie.anchorNode!==J.node||ie.anchorOffset!==J.offset||ie.focusNode!==K.node||ie.focusOffset!==K.offset)){var W=ce.createRange();W.setStart(J.node,J.offset),ie.removeAllRanges(),je>lt?(ie.addRange(W),ie.extend(K.node,K.offset)):(W.setEnd(K.node,K.offset),ie.addRange(W))}}}}for(ce=[],ie=_;ie=ie.parentNode;)ie.nodeType===1&&ce.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<ce.length;_++){var se=ce[_];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}ps=!!mf,bf=mf=null}finally{Ze=d,X.p=s,B.T=a}}t.current=n,jt=2}}function Fm(){if(jt===2){jt=0;var t=Gr,n=hi,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=B.T,B.T=null;var s=X.p;X.p=2;var d=Ze;Ze|=4;try{fm(t,n.alternate,n)}finally{Ze=d,X.p=s,B.T=a}}jt=3}}function Bm(){if(jt===4||jt===3){jt=0,tt();var t=Gr,n=hi,a=vr,s=Em;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?jt=5:(jt=0,hi=Gr=null,Im(t,t.pendingLanes));var d=t.pendingLanes;if(d===0&&(Vr=null),Vn(a),n=n.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(Dt,n,void 0,(n.current.flags&128)===128)}catch{}if(s!==null){n=B.T,d=X.p,X.p=2,B.T=null;try{for(var g=t.onRecoverableError,k=0;k<s.length;k++){var _=s[k];g(_.value,{componentStack:_.stack})}}finally{B.T=n,X.p=d}}(vr&3)!==0&&ns(),Kn(t),d=t.pendingLanes,(a&261930)!==0&&(d&42)!==0?t===nf?ya++:(ya=0,nf=t):ya=0,xa(0)}}function Im(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Wi(n)))}function ns(){return zm(),Fm(),Bm(),Um()}function Um(){if(jt!==5)return!1;var t=Gr,n=ef;ef=0;var a=Vn(vr),s=B.T,d=X.p;try{X.p=32>a?32:a,B.T=null,a=tf,tf=null;var g=Gr,k=vr;if(jt=0,hi=Gr=null,vr=0,(Ze&6)!==0)throw Error(i(331));var _=Ze;if(Ze|=4,wm(g.current),ym(g,g.current,k,a),Ze=_,xa(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(Dt,g)}catch{}return!0}finally{X.p=d,B.T=s,Im(t,n)}}function Hm(t,n,a){n=An(a,n),n=Oc(t.stateNode,n,2),t=Ir(t,n,2),t!==null&&(dl(t,2),Kn(t))}function et(t,n,a){if(t.tag===3)Hm(t,t,a);else for(;n!==null;){if(n.tag===3){Hm(n,t,a);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Vr===null||!Vr.has(s))){t=An(a,t),a=qg(2),s=Ir(n,a,2),s!==null&&(Pg(a,s,n,t),dl(s,2),Kn(s));break}}n=n.return}}function af(t,n,a){var s=t.pingCache;if(s===null){s=t.pingCache=new Mw;var d=new Set;s.set(n,d)}else d=s.get(n),d===void 0&&(d=new Set,s.set(n,d));d.has(a)||(Qc=!0,d.add(a),t=Uw.bind(null,t,n,a),n.then(t,t))}function Uw(t,n,a){var s=t.pingCache;s!==null&&s.delete(n),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,ot===t&&(Ue&a)===a&&(yt===4||yt===3&&(Ue&62914560)===Ue&&300>at()-Ko?(Ze&2)===0&&pi(t,0):Jc|=a,di===Ue&&(di=0)),Kn(t)}function qm(t,n){n===0&&(n=Bi()),t=bl(t,n),t!==null&&(dl(t,n),Kn(t))}function Hw(t){var n=t.memoizedState,a=0;n!==null&&(a=n.retryLane),qm(t,a)}function qw(t,n){var a=0;switch(t.tag){case 31:case 13:var s=t.stateNode,d=t.memoizedState;d!==null&&(a=d.retryLane);break;case 19:s=t.stateNode;break;case 22:s=t.stateNode._retryCache;break;default:throw Error(i(314))}s!==null&&s.delete(n),qm(t,a)}function Pw(t,n){return gt(t,n)}var rs=null,mi=null,of=!1,ls=!1,sf=!1,Xr=0;function Kn(t){t!==mi&&t.next===null&&(mi===null?rs=mi=t:mi=mi.next=t),ls=!0,of||(of=!0,Vw())}function xa(t,n){if(!sf&&ls){sf=!0;do for(var a=!1,s=rs;s!==null;){if(t!==0){var d=s.pendingLanes;if(d===0)var g=0;else{var k=s.suspendedLanes,_=s.pingedLanes;g=(1<<31-Je(42|t)+1)-1,g&=d&~(k&~_),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(a=!0,Gm(s,g))}else g=Ue,g=jr(s,s===ot?g:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(g&3)===0||$n(s,g)||(a=!0,Gm(s,g));s=s.next}while(a);sf=!1}}function $w(){Pm()}function Pm(){ls=of=!1;var t=0;Xr!==0&&tS()&&(t=Xr);for(var n=at(),a=null,s=rs;s!==null;){var d=s.next,g=$m(s,n);g===0?(s.next=null,a===null?rs=d:a.next=d,d===null&&(mi=a)):(a=s,(t!==0||(g&3)!==0)&&(ls=!0)),s=d}jt!==0&&jt!==5||xa(t),Xr!==0&&(Xr=0)}function $m(t,n){for(var a=t.suspendedLanes,s=t.pingedLanes,d=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var k=31-Je(g),_=1<<k,$=d[k];$===-1?((_&a)===0||(_&s)!==0)&&(d[k]=ku(_,n)):$<=n&&(t.expiredLanes|=_),g&=~_}if(n=ot,a=Ue,a=jr(t,t===n?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s=t.callbackNode,a===0||t===n&&(We===2||We===9)||t.cancelPendingCommit!==null)return s!==null&&s!==null&&Gt(s),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||$n(t,a)){if(n=a&-a,n===t.callbackPriority)return n;switch(s!==null&&Gt(s),Vn(a)){case 2:case 8:a=be;break;case 32:a=Te;break;case 268435456:a=Ve;break;default:a=Te}return s=Vm.bind(null,t),a=gt(a,s),t.callbackPriority=n,t.callbackNode=a,n}return s!==null&&s!==null&&Gt(s),t.callbackPriority=2,t.callbackNode=null,2}function Vm(t,n){if(jt!==0&&jt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(ns()&&t.callbackNode!==a)return null;var s=Ue;return s=jr(t,t===ot?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),s===0?null:(Nm(t,s,n),$m(t,at()),t.callbackNode!=null&&t.callbackNode===a?Vm.bind(null,t):null)}function Gm(t,n){if(ns())return null;Nm(t,n,!0)}function Vw(){rS(function(){(Ze&6)!==0?gt(ae,$w):Pm()})}function uf(){if(Xr===0){var t=ti;t===0&&(t=Ar,Ar<<=1,(Ar&261888)===0&&(Ar=256)),Xr=t}return Xr}function Ym(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:fo(""+t)}function Xm(t,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,t.id&&a.setAttribute("form",t.id),n.parentNode.insertBefore(a,n),t=new FormData(t),a.parentNode.removeChild(a),t}function Gw(t,n,a,s,d){if(n==="submit"&&a&&a.stateNode===d){var g=Ym((d[wt]||null).action),k=s.submitter;k&&(n=(n=k[wt]||null)?Ym(n.formAction):k.getAttribute("formAction"),n!==null&&(g=n,k=null));var _=new mo("action","action",null,s,d);t.push({event:_,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Xr!==0){var $=k?Xm(d,k):new FormData(d);Tc(a,{pending:!0,data:$,method:d.method,action:g},null,$)}}else typeof g=="function"&&(_.preventDefault(),$=k?Xm(d,k):new FormData(d),Tc(a,{pending:!0,data:$,method:d.method,action:g},g,$))},currentTarget:d}]})}}for(var cf=0;cf<Vu.length;cf++){var ff=Vu[cf],Yw=ff.toLowerCase(),Xw=ff[0].toUpperCase()+ff.slice(1);In(Yw,"on"+Xw)}In(Cp,"onAnimationEnd"),In(Np,"onAnimationIteration"),In(Ap,"onAnimationStart"),In("dblclick","onDoubleClick"),In("focusin","onFocus"),In("focusout","onBlur"),In(cw,"onTransitionRun"),In(fw,"onTransitionStart"),In(dw,"onTransitionCancel"),In(Tp,"onTransitionEnd"),Bn("onMouseEnter",["mouseout","mouseover"]),Bn("onMouseLeave",["mouseout","mouseover"]),Bn("onPointerEnter",["pointerout","pointerover"]),Bn("onPointerLeave",["pointerout","pointerover"]),St("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),St("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),St("onBeforeInput",["compositionend","keypress","textInput","paste"]),St("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),St("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),St("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var va="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(" "),Zw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(va));function Zm(t,n){n=(n&4)!==0;for(var a=0;a<t.length;a++){var s=t[a],d=s.event;s=s.listeners;e:{var g=void 0;if(n)for(var k=s.length-1;0<=k;k--){var _=s[k],$=_.instance,ee=_.currentTarget;if(_=_.listener,$!==g&&d.isPropagationStopped())break e;g=_,d.currentTarget=ee;try{g(d)}catch(oe){xo(oe)}d.currentTarget=null,g=$}else for(k=0;k<s.length;k++){if(_=s[k],$=_.instance,ee=_.currentTarget,_=_.listener,$!==g&&d.isPropagationStopped())break e;g=_,d.currentTarget=ee;try{g(d)}catch(oe){xo(oe)}d.currentTarget=null,g=$}}}}function Fe(t,n){var a=n[Hl];a===void 0&&(a=n[Hl]=new Set);var s=t+"__bubble";a.has(s)||(Km(n,t,2,!1),a.add(s))}function df(t,n,a){var s=0;n&&(s|=4),Km(a,t,s,n)}var is="_reactListening"+Math.random().toString(36).slice(2);function hf(t){if(!t[is]){t[is]=!0,Qe.forEach(function(a){a!=="selectionchange"&&(Zw.has(a)||df(a,!1,t),df(a,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[is]||(n[is]=!0,df("selectionchange",!1,n))}}function Km(t,n,a,s){switch(Cb(n)){case 2:var d=kS;break;case 8:d=ES;break;default:d=Tf}a=d.bind(null,n,a,t),d=void 0,!Lu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(d=!0),s?d!==void 0?t.addEventListener(n,a,{capture:!0,passive:d}):t.addEventListener(n,a,!0):d!==void 0?t.addEventListener(n,a,{passive:d}):t.addEventListener(n,a,!1)}function pf(t,n,a,s,d){var g=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var k=s.tag;if(k===3||k===4){var _=s.stateNode.containerInfo;if(_===d)break;if(k===4)for(k=s.return;k!==null;){var $=k.tag;if(($===3||$===4)&&k.stateNode.containerInfo===d)return;k=k.return}for(;_!==null;){if(k=Rr(_),k===null)return;if($=k.tag,$===5||$===6||$===26||$===27){s=g=k;continue e}_=_.parentNode}}s=s.return}tp(function(){var ee=g,oe=Ru(a),ce=[];e:{var ne=jp.get(t);if(ne!==void 0){var ie=mo,ke=t;switch(t){case"keypress":if(po(a)===0)break e;case"keydown":case"keyup":ie=qv;break;case"focusin":ke="focus",ie=zu;break;case"focusout":ke="blur",ie=zu;break;case"beforeblur":case"afterblur":ie=zu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ie=lp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=Rv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=Vv;break;case Cp:case Np:case Ap:ie=Dv;break;case Tp:ie=Yv;break;case"scroll":case"scrollend":ie=Tv;break;case"wheel":ie=Zv;break;case"copy":case"cut":case"paste":ie=Mv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=ap;break;case"toggle":case"beforetoggle":ie=Qv}var je=(n&4)!==0,lt=!je&&(t==="scroll"||t==="scrollend"),J=je?ne!==null?ne+"Capture":null:ne;je=[];for(var K=ee,W;K!==null;){var se=K;if(W=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||W===null||J===null||(se=qi(K,J),se!=null&&je.push(wa(K,se,W))),lt)break;K=K.return}0<je.length&&(ne=new ie(ne,ke,null,a,oe),ce.push({event:ne,listeners:je}))}}if((n&7)===0){e:{if(ne=t==="mouseover"||t==="pointerover",ie=t==="mouseout"||t==="pointerout",ne&&a!==ju&&(ke=a.relatedTarget||a.fromElement)&&(Rr(ke)||ke[rr]))break e;if((ie||ne)&&(ne=oe.window===oe?oe:(ne=oe.ownerDocument)?ne.defaultView||ne.parentWindow:window,ie?(ke=a.relatedTarget||a.toElement,ie=ee,ke=ke?Rr(ke):null,ke!==null&&(lt=u(ke),je=ke.tag,ke!==lt||je!==5&&je!==27&&je!==6)&&(ke=null)):(ie=null,ke=ee),ie!==ke)){if(je=lp,se="onMouseLeave",J="onMouseEnter",K="mouse",(t==="pointerout"||t==="pointerover")&&(je=ap,se="onPointerLeave",J="onPointerEnter",K="pointer"),lt=ie==null?ne:re(ie),W=ke==null?ne:re(ke),ne=new je(se,K+"leave",ie,a,oe),ne.target=lt,ne.relatedTarget=W,se=null,Rr(oe)===ee&&(je=new je(J,K+"enter",ke,a,oe),je.target=W,je.relatedTarget=lt,se=je),lt=se,ie&&ke)t:{for(je=Kw,J=ie,K=ke,W=0,se=J;se;se=je(se))W++;se=0;for(var Ne=K;Ne;Ne=je(Ne))se++;for(;0<W-se;)J=je(J),W--;for(;0<se-W;)K=je(K),se--;for(;W--;){if(J===K||K!==null&&J===K.alternate){je=J;break t}J=je(J),K=je(K)}je=null}else je=null;ie!==null&&Qm(ce,ne,ie,je,!1),ke!==null&<!==null&&Qm(ce,lt,ke,je,!0)}}e:{if(ne=ee?re(ee):window,ie=ne.nodeName&&ne.nodeName.toLowerCase(),ie==="select"||ie==="input"&&ne.type==="file")var Ye=pp;else if(dp(ne))if(gp)Ye=ow;else{Ye=iw;var Ce=lw}else ie=ne.nodeName,!ie||ie.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?ee&&Tu(ee.elementType)&&(Ye=pp):Ye=aw;if(Ye&&(Ye=Ye(t,ee))){hp(ce,Ye,a,oe);break e}Ce&&Ce(t,ne,ee),t==="focusout"&&ee&&ne.type==="number"&&ee.memoizedProps.value!=null&&Au(ne,"number",ne.value)}switch(Ce=ee?re(ee):window,t){case"focusin":(dp(Ce)||Ce.contentEditable==="true")&&(Yl=Ce,qu=ee,Ki=null);break;case"focusout":Ki=qu=Yl=null;break;case"mousedown":Pu=!0;break;case"contextmenu":case"mouseup":case"dragend":Pu=!1,kp(ce,a,oe);break;case"selectionchange":if(uw)break;case"keydown":case"keyup":kp(ce,a,oe)}var Le;if(Bu)e:{switch(t){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Gl?cp(t,a)&&(He="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(He="onCompositionStart");He&&(op&&a.locale!=="ko"&&(Gl||He!=="onCompositionStart"?He==="onCompositionEnd"&&Gl&&(Le=np()):(Lr=oe,Du="value"in Lr?Lr.value:Lr.textContent,Gl=!0)),Ce=as(ee,He),0<Ce.length&&(He=new ip(He,t,null,a,oe),ce.push({event:He,listeners:Ce}),Le?He.data=Le:(Le=fp(a),Le!==null&&(He.data=Le)))),(Le=Wv?ew(t,a):tw(t,a))&&(He=as(ee,"onBeforeInput"),0<He.length&&(Ce=new ip("onBeforeInput","beforeinput",null,a,oe),ce.push({event:Ce,listeners:He}),Ce.data=Le)),Gw(ce,t,ee,a,oe)}Zm(ce,n)})}function wa(t,n,a){return{instance:t,listener:n,currentTarget:a}}function as(t,n){for(var a=n+"Capture",s=[];t!==null;){var d=t,g=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||g===null||(d=qi(t,a),d!=null&&s.unshift(wa(t,d,g)),d=qi(t,n),d!=null&&s.push(wa(t,d,g))),t.tag===3)return s;t=t.return}return[]}function Kw(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Qm(t,n,a,s,d){for(var g=n._reactName,k=[];a!==null&&a!==s;){var _=a,$=_.alternate,ee=_.stateNode;if(_=_.tag,$!==null&&$===s)break;_!==5&&_!==26&&_!==27||ee===null||($=ee,d?(ee=qi(a,g),ee!=null&&k.unshift(wa(a,ee,$))):d||(ee=qi(a,g),ee!=null&&k.push(wa(a,ee,$)))),a=a.return}k.length!==0&&t.push({event:n,listeners:k})}var Qw=/\r\n?/g,Jw=/\u0000|\uFFFD/g;function Jm(t){return(typeof t=="string"?t:""+t).replace(Qw,`
|
|
9
|
-
`).replace(Jw,"")}function Wm(t,n){return n=Jm(n),Jm(t)===n}function rt(t,n,a,s,d,g){switch(a){case"children":typeof s=="string"?n==="body"||n==="textarea"&&s===""||Pl(t,s):(typeof s=="number"||typeof s=="bigint")&&n!=="body"&&Pl(t,""+s);break;case"className":uo(t,"class",s);break;case"tabIndex":uo(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":uo(t,a,s);break;case"style":Wh(t,s,g);break;case"data":if(n!=="object"){uo(t,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||a!=="href")){t.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(a);break}s=fo(""+s),t.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(a==="formAction"?(n!=="input"&&rt(t,n,"name",d.name,d,null),rt(t,n,"formEncType",d.formEncType,d,null),rt(t,n,"formMethod",d.formMethod,d,null),rt(t,n,"formTarget",d.formTarget,d,null)):(rt(t,n,"encType",d.encType,d,null),rt(t,n,"method",d.method,d,null),rt(t,n,"target",d.target,d,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(a);break}s=fo(""+s),t.setAttribute(a,s);break;case"onClick":s!=null&&(t.onclick=ir);break;case"onScroll":s!=null&&Fe("scroll",t);break;case"onScrollEnd":s!=null&&Fe("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(i(61));if(a=s.__html,a!=null){if(d.children!=null)throw Error(i(60));t.innerHTML=a}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}a=fo(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,""+s):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":s===!0?t.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(a,s):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(a,s):t.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(a):t.setAttribute(a,s);break;case"popover":Fe("beforetoggle",t),Fe("toggle",t),so(t,"popover",s);break;case"xlinkActuate":lr(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":lr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":lr(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":lr(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":lr(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":lr(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":lr(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":lr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":lr(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":so(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Nv.get(a)||a,so(t,a,s))}}function gf(t,n,a,s,d,g){switch(a){case"style":Wh(t,s,g);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(i(61));if(a=s.__html,a!=null){if(d.children!=null)throw Error(i(60));t.innerHTML=a}}break;case"children":typeof s=="string"?Pl(t,s):(typeof s=="number"||typeof s=="bigint")&&Pl(t,""+s);break;case"onScroll":s!=null&&Fe("scroll",t);break;case"onScrollEnd":s!=null&&Fe("scrollend",t);break;case"onClick":s!=null&&(t.onclick=ir);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ie.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),n=a.slice(2,d?a.length-7:void 0),g=t[wt]||null,g=g!=null?g[a]:null,typeof g=="function"&&t.removeEventListener(n,g,d),typeof s=="function")){typeof g!="function"&&g!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(n,s,d);break e}a in t?t[a]=s:s===!0?t.setAttribute(a,""):so(t,a,s)}}}function Ft(t,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Fe("error",t),Fe("load",t);var s=!1,d=!1,g;for(g in a)if(a.hasOwnProperty(g)){var k=a[g];if(k!=null)switch(g){case"src":s=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:rt(t,n,g,k,a,null)}}d&&rt(t,n,"srcSet",a.srcSet,a,null),s&&rt(t,n,"src",a.src,a,null);return;case"input":Fe("invalid",t);var _=g=k=d=null,$=null,ee=null;for(s in a)if(a.hasOwnProperty(s)){var oe=a[s];if(oe!=null)switch(s){case"name":d=oe;break;case"type":k=oe;break;case"checked":$=oe;break;case"defaultChecked":ee=oe;break;case"value":g=oe;break;case"defaultValue":_=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(i(137,n));break;default:rt(t,n,s,oe,a,null)}}Zh(t,g,_,$,ee,k,d,!1);return;case"select":Fe("invalid",t),s=k=g=null;for(d in a)if(a.hasOwnProperty(d)&&(_=a[d],_!=null))switch(d){case"value":g=_;break;case"defaultValue":k=_;break;case"multiple":s=_;default:rt(t,n,d,_,a,null)}n=g,a=k,t.multiple=!!s,n!=null?ql(t,!!s,n,!1):a!=null&&ql(t,!!s,a,!0);return;case"textarea":Fe("invalid",t),g=d=s=null;for(k in a)if(a.hasOwnProperty(k)&&(_=a[k],_!=null))switch(k){case"value":s=_;break;case"defaultValue":d=_;break;case"children":g=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(i(91));break;default:rt(t,n,k,_,a,null)}Qh(t,s,d,g);return;case"option":for($ in a)a.hasOwnProperty($)&&(s=a[$],s!=null)&&($==="selected"?t.selected=s&&typeof s!="function"&&typeof s!="symbol":rt(t,n,$,s,a,null));return;case"dialog":Fe("beforetoggle",t),Fe("toggle",t),Fe("cancel",t),Fe("close",t);break;case"iframe":case"object":Fe("load",t);break;case"video":case"audio":for(s=0;s<va.length;s++)Fe(va[s],t);break;case"image":Fe("error",t),Fe("load",t);break;case"details":Fe("toggle",t);break;case"embed":case"source":case"link":Fe("error",t),Fe("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ee in a)if(a.hasOwnProperty(ee)&&(s=a[ee],s!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:rt(t,n,ee,s,a,null)}return;default:if(Tu(n)){for(oe in a)a.hasOwnProperty(oe)&&(s=a[oe],s!==void 0&&gf(t,n,oe,s,a,void 0));return}}for(_ in a)a.hasOwnProperty(_)&&(s=a[_],s!=null&&rt(t,n,_,s,a,null))}function Ww(t,n,a,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,g=null,k=null,_=null,$=null,ee=null,oe=null;for(ie in a){var ce=a[ie];if(a.hasOwnProperty(ie)&&ce!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":$=ce;default:s.hasOwnProperty(ie)||rt(t,n,ie,null,s,ce)}}for(var ne in s){var ie=s[ne];if(ce=a[ne],s.hasOwnProperty(ne)&&(ie!=null||ce!=null))switch(ne){case"type":g=ie;break;case"name":d=ie;break;case"checked":ee=ie;break;case"defaultChecked":oe=ie;break;case"value":k=ie;break;case"defaultValue":_=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(i(137,n));break;default:ie!==ce&&rt(t,n,ne,ie,s,ce)}}Nu(t,k,_,$,ee,oe,g,d);return;case"select":ie=k=_=ne=null;for(g in a)if($=a[g],a.hasOwnProperty(g)&&$!=null)switch(g){case"value":break;case"multiple":ie=$;default:s.hasOwnProperty(g)||rt(t,n,g,null,s,$)}for(d in s)if(g=s[d],$=a[d],s.hasOwnProperty(d)&&(g!=null||$!=null))switch(d){case"value":ne=g;break;case"defaultValue":_=g;break;case"multiple":k=g;default:g!==$&&rt(t,n,d,g,s,$)}n=_,a=k,s=ie,ne!=null?ql(t,!!a,ne,!1):!!s!=!!a&&(n!=null?ql(t,!!a,n,!0):ql(t,!!a,a?[]:"",!1));return;case"textarea":ie=ne=null;for(_ in a)if(d=a[_],a.hasOwnProperty(_)&&d!=null&&!s.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:rt(t,n,_,null,s,d)}for(k in s)if(d=s[k],g=a[k],s.hasOwnProperty(k)&&(d!=null||g!=null))switch(k){case"value":ne=d;break;case"defaultValue":ie=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(i(91));break;default:d!==g&&rt(t,n,k,d,s,g)}Kh(t,ne,ie);return;case"option":for(var ke in a)ne=a[ke],a.hasOwnProperty(ke)&&ne!=null&&!s.hasOwnProperty(ke)&&(ke==="selected"?t.selected=!1:rt(t,n,ke,null,s,ne));for($ in s)ne=s[$],ie=a[$],s.hasOwnProperty($)&&ne!==ie&&(ne!=null||ie!=null)&&($==="selected"?t.selected=ne&&typeof ne!="function"&&typeof ne!="symbol":rt(t,n,$,ne,s,ie));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var je in a)ne=a[je],a.hasOwnProperty(je)&&ne!=null&&!s.hasOwnProperty(je)&&rt(t,n,je,null,s,ne);for(ee in s)if(ne=s[ee],ie=a[ee],s.hasOwnProperty(ee)&&ne!==ie&&(ne!=null||ie!=null))switch(ee){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(i(137,n));break;default:rt(t,n,ee,ne,s,ie)}return;default:if(Tu(n)){for(var lt in a)ne=a[lt],a.hasOwnProperty(lt)&&ne!==void 0&&!s.hasOwnProperty(lt)&&gf(t,n,lt,void 0,s,ne);for(oe in s)ne=s[oe],ie=a[oe],!s.hasOwnProperty(oe)||ne===ie||ne===void 0&&ie===void 0||gf(t,n,oe,ne,s,ie);return}}for(var J in a)ne=a[J],a.hasOwnProperty(J)&&ne!=null&&!s.hasOwnProperty(J)&&rt(t,n,J,null,s,ne);for(ce in s)ne=s[ce],ie=a[ce],!s.hasOwnProperty(ce)||ne===ie||ne==null&&ie==null||rt(t,n,ce,ne,s,ie)}function eb(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function eS(){if(typeof performance.getEntriesByType=="function"){for(var t=0,n=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var d=a[s],g=d.transferSize,k=d.initiatorType,_=d.duration;if(g&&_&&eb(k)){for(k=0,_=d.responseEnd,s+=1;s<a.length;s++){var $=a[s],ee=$.startTime;if(ee>_)break;var oe=$.transferSize,ce=$.initiatorType;oe&&eb(ce)&&($=$.responseEnd,k+=oe*($<_?1:(_-ee)/($-ee)))}if(--s,n+=8*(g+k)/(d.duration/1e3),t++,10<t)break}}if(0<t)return n/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var mf=null,bf=null;function os(t){return t.nodeType===9?t:t.ownerDocument}function tb(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function nb(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function yf(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var xf=null;function tS(){var t=window.event;return t&&t.type==="popstate"?t===xf?!1:(xf=t,!0):(xf=null,!1)}var rb=typeof setTimeout=="function"?setTimeout:void 0,nS=typeof clearTimeout=="function"?clearTimeout:void 0,lb=typeof Promise=="function"?Promise:void 0,rS=typeof queueMicrotask=="function"?queueMicrotask:typeof lb<"u"?function(t){return lb.resolve(null).then(t).catch(lS)}:rb;function lS(t){setTimeout(function(){throw t})}function Zr(t){return t==="head"}function ib(t,n){var a=n,s=0;do{var d=a.nextSibling;if(t.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"||a==="/&"){if(s===0){t.removeChild(d),vi(n);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")Sa(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,Sa(a);for(var g=a.firstChild;g;){var k=g.nextSibling,_=g.nodeName;g[hl]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&g.rel.toLowerCase()==="stylesheet"||a.removeChild(g),g=k}}else a==="body"&&Sa(t.ownerDocument.body);a=d}while(a);vi(n)}function ab(t,n){var a=t;t=0;do{var s=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=s}while(a)}function vf(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":vf(a),Hi(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function iS(t,n,a,s){for(;t.nodeType===1;){var d=a;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[hl])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var g=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=Ln(t.nextSibling),t===null)break}return null}function aS(t,n,a){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Ln(t.nextSibling),t===null))return null;return t}function ob(t,n){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Ln(t.nextSibling),t===null))return null;return t}function wf(t){return t.data==="$?"||t.data==="$~"}function Sf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function oS(t,n){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=n;else if(t.data!=="$?"||a.readyState!=="loading")n();else{var s=function(){n(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function Ln(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return t}var kf=null;function sb(t){t=t.nextSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(n===0)return Ln(t.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}t=t.nextSibling}return null}function ub(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return t;n--}else a!=="/$"&&a!=="/&"||n++}t=t.previousSibling}return null}function cb(t,n,a){switch(n=os(a),t){case"html":if(t=n.documentElement,!t)throw Error(i(452));return t;case"head":if(t=n.head,!t)throw Error(i(453));return t;case"body":if(t=n.body,!t)throw Error(i(454));return t;default:throw Error(i(451))}}function Sa(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Hi(t)}var Dn=new Map,fb=new Set;function ss(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var wr=X.d;X.d={f:sS,r:uS,D:cS,C:fS,L:dS,m:hS,X:gS,S:pS,M:mS};function sS(){var t=wr.f(),n=Wo();return t||n}function uS(t){var n=_r(t);n!==null&&n.tag===5&&n.type==="form"?Tg(n):wr.r(t)}var bi=typeof document>"u"?null:document;function db(t,n,a){var s=bi;if(s&&typeof n=="string"&&n){var d=Cn(n);d='link[rel="'+t+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),fb.has(d)||(fb.add(d),t={rel:t,crossOrigin:a,href:n},s.querySelector(d)===null&&(n=s.createElement("link"),Ft(n,"link",t),Se(n),s.head.appendChild(n)))}}function cS(t){wr.D(t),db("dns-prefetch",t,null)}function fS(t,n){wr.C(t,n),db("preconnect",t,n)}function dS(t,n,a){wr.L(t,n,a);var s=bi;if(s&&t&&n){var d='link[rel="preload"][as="'+Cn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+Cn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+Cn(a.imageSizes)+'"]')):d+='[href="'+Cn(t)+'"]';var g=d;switch(n){case"style":g=yi(t);break;case"script":g=xi(t)}Dn.has(g)||(t=b({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:t,as:n},a),Dn.set(g,t),s.querySelector(d)!==null||n==="style"&&s.querySelector(ka(g))||n==="script"&&s.querySelector(Ea(g))||(n=s.createElement("link"),Ft(n,"link",t),Se(n),s.head.appendChild(n)))}}function hS(t,n){wr.m(t,n);var a=bi;if(a&&t){var s=n&&typeof n.as=="string"?n.as:"script",d='link[rel="modulepreload"][as="'+Cn(s)+'"][href="'+Cn(t)+'"]',g=d;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=xi(t)}if(!Dn.has(g)&&(t=b({rel:"modulepreload",href:t},n),Dn.set(g,t),a.querySelector(d)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ea(g)))return}s=a.createElement("link"),Ft(s,"link",t),Se(s),a.head.appendChild(s)}}}function pS(t,n,a){wr.S(t,n,a);var s=bi;if(s&&t){var d=ve(s).hoistableStyles,g=yi(t);n=n||"default";var k=d.get(g);if(!k){var _={loading:0,preload:null};if(k=s.querySelector(ka(g)))_.loading=5;else{t=b({rel:"stylesheet",href:t,"data-precedence":n},a),(a=Dn.get(g))&&Ef(t,a);var $=k=s.createElement("link");Se($),Ft($,"link",t),$._p=new Promise(function(ee,oe){$.onload=ee,$.onerror=oe}),$.addEventListener("load",function(){_.loading|=1}),$.addEventListener("error",function(){_.loading|=2}),_.loading|=4,us(k,n,s)}k={type:"stylesheet",instance:k,count:1,state:_},d.set(g,k)}}}function gS(t,n){wr.X(t,n);var a=bi;if(a&&t){var s=ve(a).hoistableScripts,d=xi(t),g=s.get(d);g||(g=a.querySelector(Ea(d)),g||(t=b({src:t,async:!0},n),(n=Dn.get(d))&&Cf(t,n),g=a.createElement("script"),Se(g),Ft(g,"link",t),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(d,g))}}function mS(t,n){wr.M(t,n);var a=bi;if(a&&t){var s=ve(a).hoistableScripts,d=xi(t),g=s.get(d);g||(g=a.querySelector(Ea(d)),g||(t=b({src:t,async:!0,type:"module"},n),(n=Dn.get(d))&&Cf(t,n),g=a.createElement("script"),Se(g),Ft(g,"link",t),a.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(d,g))}}function hb(t,n,a,s){var d=(d=fe.current)?ss(d):null;if(!d)throw Error(i(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=yi(a.href),a=ve(d).hoistableStyles,s=a.get(n),s||(s={type:"style",instance:null,count:0,state:null},a.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=yi(a.href);var g=ve(d).hoistableStyles,k=g.get(t);if(k||(d=d.ownerDocument||d,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,k),(g=d.querySelector(ka(t)))&&!g._p&&(k.instance=g,k.state.loading=5),Dn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Dn.set(t,a),g||bS(d,t,a,k.state))),n&&s===null)throw Error(i(528,""));return k}if(n&&s!==null)throw Error(i(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=xi(a),a=ve(d).hoistableScripts,s=a.get(n),s||(s={type:"script",instance:null,count:0,state:null},a.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,t))}}function yi(t){return'href="'+Cn(t)+'"'}function ka(t){return'link[rel="stylesheet"]['+t+"]"}function pb(t){return b({},t,{"data-precedence":t.precedence,precedence:null})}function bS(t,n,a,s){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?s.loading=1:(n=t.createElement("link"),s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2}),Ft(n,"link",a),Se(n),t.head.appendChild(n))}function xi(t){return'[src="'+Cn(t)+'"]'}function Ea(t){return"script[async]"+t}function gb(t,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var s=t.querySelector('style[data-href~="'+Cn(a.href)+'"]');if(s)return n.instance=s,Se(s),s;var d=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),Se(s),Ft(s,"style",d),us(s,a.precedence,t),n.instance=s;case"stylesheet":d=yi(a.href);var g=t.querySelector(ka(d));if(g)return n.state.loading|=4,n.instance=g,Se(g),g;s=pb(a),(d=Dn.get(d))&&Ef(s,d),g=(t.ownerDocument||t).createElement("link"),Se(g);var k=g;return k._p=new Promise(function(_,$){k.onload=_,k.onerror=$}),Ft(g,"link",s),n.state.loading|=4,us(g,a.precedence,t),n.instance=g;case"script":return g=xi(a.src),(d=t.querySelector(Ea(g)))?(n.instance=d,Se(d),d):(s=a,(d=Dn.get(g))&&(s=b({},a),Cf(s,d)),t=t.ownerDocument||t,d=t.createElement("script"),Se(d),Ft(d,"link",s),t.head.appendChild(d),n.instance=d);case"void":return null;default:throw Error(i(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,us(s,a.precedence,t));return n.instance}function us(t,n,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=s.length?s[s.length-1]:null,g=d,k=0;k<s.length;k++){var _=s[k];if(_.dataset.precedence===n)g=_;else if(g!==d)break}g?g.parentNode.insertBefore(t,g.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(t,n.firstChild))}function Ef(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Cf(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var cs=null;function mb(t,n,a){if(cs===null){var s=new Map,d=cs=new Map;d.set(a,s)}else d=cs,s=d.get(a),s||(s=new Map,d.set(a,s));if(s.has(t))return s;for(s.set(t,null),a=a.getElementsByTagName(t),d=0;d<a.length;d++){var g=a[d];if(!(g[hl]||g[Tt]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var k=g.getAttribute(n)||"";k=t+k;var _=s.get(k);_?_.push(g):s.set(k,[g])}}return s}function bb(t,n,a){t=t.ownerDocument||t,t.head.insertBefore(a,n==="title"?t.querySelector("head > title"):null)}function yS(t,n,a){if(a===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function yb(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function xS(t,n,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var d=yi(s.href),g=n.querySelector(ka(d));if(g){n=g._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=fs.bind(t),n.then(t,t)),a.state.loading|=4,a.instance=g,Se(g);return}g=n.ownerDocument||n,s=pb(s),(d=Dn.get(d))&&Ef(s,d),g=g.createElement("link"),Se(g);var k=g;k._p=new Promise(function(_,$){k.onload=_,k.onerror=$}),Ft(g,"link",s),a.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=fs.bind(t),n.addEventListener("load",a),n.addEventListener("error",a))}}var Nf=0;function vS(t,n){return t.stylesheets&&t.count===0&&hs(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var s=setTimeout(function(){if(t.stylesheets&&hs(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+n);0<t.imgBytes&&Nf===0&&(Nf=62500*eS());var d=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&hs(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>Nf?50:800)+n);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(d)}}:null}function fs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hs(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var ds=null;function hs(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,ds=new Map,n.forEach(wS,t),ds=null,fs.call(t))}function wS(t,n){if(!(n.state.loading&4)){var a=ds.get(t);if(a)var s=a.get(null);else{a=new Map,ds.set(t,a);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<d.length;g++){var k=d[g];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(a.set(k.dataset.precedence,k),s=k)}s&&a.set(null,s)}d=n.instance,k=d.getAttribute("data-precedence"),g=a.get(k)||s,g===s&&a.set(null,d),a.set(k,d),this.count++,s=fs.bind(this),d.addEventListener("load",s),d.addEventListener("error",s),g?g.parentNode.insertBefore(d,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),n.state.loading|=4}}var Ca={$$typeof:j,Provider:null,Consumer:null,_currentValue:M,_currentValue2:M,_threadCount:0};function SS(t,n,a,s,d,g,k,_,$){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=fl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fl(0),this.hiddenUpdates=fl(null),this.identifierPrefix=s,this.onUncaughtError=d,this.onCaughtError=g,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function xb(t,n,a,s,d,g,k,_,$,ee,oe,ce){return t=new SS(t,n,a,k,$,ee,oe,ce,_),n=1,g===!0&&(n|=24),g=hn(3,null,null,n),t.current=g,g.stateNode=t,n=lc(),n.refCount++,t.pooledCache=n,n.refCount++,g.memoizedState={element:s,isDehydrated:a,cache:n},sc(g),t}function vb(t){return t?(t=Kl,t):Kl}function wb(t,n,a,s,d,g){d=vb(d),s.context===null?s.context=d:s.pendingContext=d,s=Br(n),s.payload={element:a},g=g===void 0?null:g,g!==null&&(s.callback=g),a=Ir(t,s,n),a!==null&&(ln(a,t,n),ra(a,t,n))}function Sb(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<n?a:n}}function Af(t,n){Sb(t,n),(t=t.alternate)&&Sb(t,n)}function kb(t){if(t.tag===13||t.tag===31){var n=bl(t,67108864);n!==null&&ln(n,t,67108864),Af(t,67108864)}}function Eb(t){if(t.tag===13||t.tag===31){var n=yn();n=Ul(n);var a=bl(t,n);a!==null&&ln(a,t,n),Af(t,n)}}var ps=!0;function kS(t,n,a,s){var d=B.T;B.T=null;var g=X.p;try{X.p=2,Tf(t,n,a,s)}finally{X.p=g,B.T=d}}function ES(t,n,a,s){var d=B.T;B.T=null;var g=X.p;try{X.p=8,Tf(t,n,a,s)}finally{X.p=g,B.T=d}}function Tf(t,n,a,s){if(ps){var d=jf(s);if(d===null)pf(t,n,s,gs,a),Nb(t,s);else if(NS(d,t,n,a,s))s.stopPropagation();else if(Nb(t,s),n&4&&-1<CS.indexOf(t)){for(;d!==null;){var g=_r(d);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var k=Fn(g.pendingLanes);if(k!==0){var _=g;for(_.pendingLanes|=2,_.entangledLanes|=2;k;){var $=1<<31-Je(k);_.entanglements[1]|=$,k&=~$}Kn(g),(Ze&6)===0&&(Qo=at()+500,xa(0))}}break;case 31:case 13:_=bl(g,2),_!==null&&ln(_,g,2),Wo(),Af(g,2)}if(g=jf(s),g===null&&pf(t,n,s,gs,a),g===d)break;d=g}d!==null&&s.stopPropagation()}else pf(t,n,s,null,a)}}function jf(t){return t=Ru(t),Rf(t)}var gs=null;function Rf(t){if(gs=null,t=Rr(t),t!==null){var n=u(t);if(n===null)t=null;else{var a=n.tag;if(a===13){if(t=c(n),t!==null)return t;t=null}else if(a===31){if(t=f(n),t!==null)return t;t=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return gs=t,null}function Cb(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(nr()){case ae:return 2;case be:return 8;case Te:case Oe:return 32;case Ve:return 268435456;default:return 32}default:return 32}}var _f=!1,Kr=null,Qr=null,Jr=null,Na=new Map,Aa=new Map,Wr=[],CS="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 Nb(t,n){switch(t){case"focusin":case"focusout":Kr=null;break;case"dragenter":case"dragleave":Qr=null;break;case"mouseover":case"mouseout":Jr=null;break;case"pointerover":case"pointerout":Na.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Aa.delete(n.pointerId)}}function Ta(t,n,a,s,d,g){return t===null||t.nativeEvent!==g?(t={blockedOn:n,domEventName:a,eventSystemFlags:s,nativeEvent:g,targetContainers:[d]},n!==null&&(n=_r(n),n!==null&&kb(n)),t):(t.eventSystemFlags|=s,n=t.targetContainers,d!==null&&n.indexOf(d)===-1&&n.push(d),t)}function NS(t,n,a,s,d){switch(n){case"focusin":return Kr=Ta(Kr,t,n,a,s,d),!0;case"dragenter":return Qr=Ta(Qr,t,n,a,s,d),!0;case"mouseover":return Jr=Ta(Jr,t,n,a,s,d),!0;case"pointerover":var g=d.pointerId;return Na.set(g,Ta(Na.get(g)||null,t,n,a,s,d)),!0;case"gotpointercapture":return g=d.pointerId,Aa.set(g,Ta(Aa.get(g)||null,t,n,a,s,d)),!0}return!1}function Ab(t){var n=Rr(t.target);if(n!==null){var a=u(n);if(a!==null){if(n=a.tag,n===13){if(n=c(a),n!==null){t.blockedOn=n,ao(t.priority,function(){Eb(a)});return}}else if(n===31){if(n=f(a),n!==null){t.blockedOn=n,ao(t.priority,function(){Eb(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ms(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var a=jf(t.nativeEvent);if(a===null){a=t.nativeEvent;var s=new a.constructor(a.type,a);ju=s,a.target.dispatchEvent(s),ju=null}else return n=_r(a),n!==null&&kb(n),t.blockedOn=a,!1;n.shift()}return!0}function Tb(t,n,a){ms(t)&&a.delete(n)}function AS(){_f=!1,Kr!==null&&ms(Kr)&&(Kr=null),Qr!==null&&ms(Qr)&&(Qr=null),Jr!==null&&ms(Jr)&&(Jr=null),Na.forEach(Tb),Aa.forEach(Tb)}function bs(t,n){t.blockedOn===n&&(t.blockedOn=null,_f||(_f=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,AS)))}var ys=null;function jb(t){ys!==t&&(ys=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ys===t&&(ys=null);for(var n=0;n<t.length;n+=3){var a=t[n],s=t[n+1],d=t[n+2];if(typeof s!="function"){if(Rf(s||a)===null)continue;break}var g=_r(a);g!==null&&(t.splice(n,3),n-=3,Tc(g,{pending:!0,data:d,method:a.method,action:s},s,d))}}))}function vi(t){function n($){return bs($,t)}Kr!==null&&bs(Kr,t),Qr!==null&&bs(Qr,t),Jr!==null&&bs(Jr,t),Na.forEach(n),Aa.forEach(n);for(var a=0;a<Wr.length;a++){var s=Wr[a];s.blockedOn===t&&(s.blockedOn=null)}for(;0<Wr.length&&(a=Wr[0],a.blockedOn===null);)Ab(a),a.blockedOn===null&&Wr.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var d=a[s],g=a[s+1],k=d[wt]||null;if(typeof g=="function")k||jb(a);else if(k){var _=null;if(g&&g.hasAttribute("formAction")){if(d=g,k=g[wt]||null)_=k.formAction;else if(Rf(d)!==null)continue}else _=k.action;typeof _=="function"?a[s+1]=_:(a.splice(s,3),s-=3),jb(a)}}}function Rb(){function t(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(k){return d=k})},focusReset:"manual",scroll:"manual"})}function n(){d!==null&&(d(),d=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,d=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),d!==null&&(d(),d=null)}}}function Lf(t){this._internalRoot=t}xs.prototype.render=Lf.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(i(409));var a=n.current,s=yn();wb(a,s,t,n,null,null)},xs.prototype.unmount=Lf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;wb(t.current,2,null,t,null,null),Wo(),n[rr]=null}};function xs(t){this._internalRoot=t}xs.prototype.unstable_scheduleHydration=function(t){if(t){var n=io();t={blockedOn:null,target:t,priority:n};for(var a=0;a<Wr.length&&n!==0&&n<Wr[a].priority;a++);Wr.splice(a,0,t),a===0&&Ab(t)}};var _b=r.version;if(_b!=="19.2.4")throw Error(i(527,_b,"19.2.4"));X.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(i(188)):(t=Object.keys(t).join(","),Error(i(268,t)));return t=p(n),t=t!==null?m(t):null,t=t===null?null:t.stateNode,t};var TS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vs.isDisabled&&vs.supportsFiber)try{Dt=vs.inject(TS),mt=vs}catch{}}return Ra.createRoot=function(t,n){if(!o(t))throw Error(i(299));var a=!1,s="",d=Bg,g=Ig,k=Ug;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(d=n.onUncaughtError),n.onCaughtError!==void 0&&(g=n.onCaughtError),n.onRecoverableError!==void 0&&(k=n.onRecoverableError)),n=xb(t,1,!1,null,null,a,s,null,d,g,k,Rb),t[rr]=n.current,hf(t),new Lf(n)},Ra.hydrateRoot=function(t,n,a){if(!o(t))throw Error(i(299));var s=!1,d="",g=Bg,k=Ig,_=Ug,$=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(g=a.onUncaughtError),a.onCaughtError!==void 0&&(k=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.formState!==void 0&&($=a.formState)),n=xb(t,1,!0,n,a??null,s,d,$,g,k,_,Rb),n.context=vb(null),a=n.current,s=yn(),s=Ul(s),d=Br(s),d.callback=null,Ir(a,d,s),a=s,n.current.lanes=a,dl(n,a),Kn(n),t[rr]=n.current,hf(t),new xs(n)},Ra.version="19.2.4",Ra}var Hb;function BS(){if(Hb)return Mf.exports;Hb=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),Mf.exports=FS(),Mf.exports}var IS=BS();const US=lu(IS),$x=["shift","alt","meta","mod","ctrl","control"],HS={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function ol(e){return(HS[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function Vx(e){return $x.includes(e)}function If(e,r=","){return e.toLowerCase().split(r)}function Uf(e,r="+",l=">",i=!1,o,u){let c=[],f=!1;e=e.trim(),e.includes(l)?(f=!0,c=e.toLocaleLowerCase().split(l).map(m=>ol(m))):c=e.toLocaleLowerCase().split(r).map(m=>ol(m));const h={alt:c.includes("alt"),ctrl:c.includes("ctrl")||c.includes("control"),shift:c.includes("shift"),meta:c.includes("meta"),mod:c.includes("mod"),useKey:i},p=c.filter(m=>!$x.includes(m));return{...h,keys:p,description:o,isSequence:f,hotkey:e,metadata:u}}typeof document<"u"&&(document.addEventListener("keydown",e=>{e.code!==void 0&&Gx([ol(e.code)])}),document.addEventListener("keyup",e=>{e.code!==void 0&&Yx([ol(e.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{kr.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{kr.clear()},0)}));const kr=new Set;function fh(e){return Array.isArray(e)}function qS(e,r=","){return(fh(e)?e:e.split(r)).every(l=>kr.has(l.trim().toLowerCase()))}function Gx(e){const r=Array.isArray(e)?e:[e];kr.has("meta")&&kr.forEach(l=>{Vx(l)||kr.delete(l.toLowerCase())}),r.forEach(l=>{kr.add(l.toLowerCase())})}function Yx(e){const r=Array.isArray(e)?e:[e];e==="meta"?kr.clear():r.forEach(l=>{kr.delete(l.toLowerCase())})}function PS(e,r,l){(typeof l=="function"&&l(e,r)||l===!0)&&e.preventDefault()}function $S(e,r,l){return typeof l=="function"?l(e,r):l===!0||l===void 0}const VS=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function GS(e){return Xx(e,VS)}function Xx(e,r=!1){const{target:l,composed:i}=e;let o,u;return YS(l)&&i?(o=e.composedPath()[0]&&e.composedPath()[0].tagName,u=e.composedPath()[0]&&e.composedPath()[0].role):(o=l&&l.tagName,u=l&&l.role),fh(r)?!!(o&&r&&r.some(c=>c.toLowerCase()===o.toLowerCase()||c===u)):!!(o&&r&&r)}function YS(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function XS(e,r){return e.length===0&&r?!1:r?e.some(l=>r.includes(l))||e.includes("*"):!0}const ZS=(e,r,l=!1)=>{const{alt:i,meta:o,mod:u,shift:c,ctrl:f,keys:h,useKey:p}=r,{code:m,key:b,ctrlKey:v,metaKey:x,shiftKey:S,altKey:w}=e,N=ol(m);if(p&&h?.length===1&&h.includes(b.toLowerCase()))return!0;if(!h?.includes(N)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(N))return!1;if(!l){if(i!==w&&N!=="alt"||c!==S&&N!=="shift")return!1;if(u){if(!x&&!v)return!1}else if(o!==x&&N!=="meta"&&N!=="os"||f!==v&&N!=="ctrl"&&N!=="control")return!1}return h&&h.length===1&&h.includes(N)?!0:h&&h.length>0?h.includes(N)?qS(h):!1:!h||h.length===0},Zx=T.createContext(void 0),KS=()=>T.useContext(Zx);function QS({addHotkey:e,removeHotkey:r,children:l}){return y.jsx(Zx.Provider,{value:{addHotkey:e,removeHotkey:r},children:l})}function dh(e,r){return e&&r&&typeof e=="object"&&typeof r=="object"?Object.keys(e).length===Object.keys(r).length&&Object.keys(e).reduce((l,i)=>l&&dh(e[i],r[i]),!0):e===r}const Kx=T.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Za=()=>T.useContext(Kx),JS=({initiallyActiveScopes:e=["*"],children:r})=>{const[l,i]=T.useState(e),[o,u]=T.useState([]),c=T.useCallback(b=>{i(v=>v.includes("*")?[b]:Array.from(new Set([...v,b])))},[]),f=T.useCallback(b=>{i(v=>v.filter(x=>x!==b))},[]),h=T.useCallback(b=>{i(v=>v.includes(b)?v.filter(x=>x!==b):v.includes("*")?[b]:Array.from(new Set([...v,b])))},[]),p=T.useCallback(b=>{u(v=>[...v,b])},[]),m=T.useCallback(b=>{u(v=>v.filter(x=>!dh(x,b)))},[]);return y.jsx(Kx.Provider,{value:{activeScopes:l,hotkeys:o,enableScope:c,disableScope:f,toggleScope:h},children:y.jsx(QS,{addHotkey:p,removeHotkey:m,children:r})})};function WS(e){const r=T.useRef(void 0);return dh(r.current,e)||(r.current=e),r.current}const qb=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},e2=typeof window<"u"?T.useLayoutEffect:T.useEffect;function it(e,r,l,i){const o=T.useRef(null),u=T.useRef(!1),c=Array.isArray(l)?Array.isArray(i)?void 0:i:l,f=fh(e)?e.join(c?.delimiter):e,h=Array.isArray(l)?l:Array.isArray(i)?i:void 0,p=T.useCallback(r,h??[]),m=T.useRef(p);h?m.current=p:m.current=r;const b=WS(c),{activeScopes:v}=Za(),x=KS();return e2(()=>{if(b?.enabled===!1||!XS(v,b?.scopes))return;let S=[],w;const N=(z,I=!1)=>{if(!(GS(z)&&!Xx(z,b?.enableOnFormTags))){if(o.current!==null){const L=o.current.getRootNode();if((L instanceof Document||L instanceof ShadowRoot)&&L.activeElement!==o.current&&!o.current.contains(L.activeElement)){qb(z);return}}z.target?.isContentEditable&&!b?.enableOnContentEditable||If(f,b?.delimiter).forEach(L=>{if(L.includes(b?.splitKey??"+")&&L.includes(b?.sequenceSplitKey??">")){console.warn(`Hotkey ${L} contains both ${b?.splitKey??"+"} and ${b?.sequenceSplitKey??">"} which is not supported.`);return}const O=Uf(L,b?.splitKey,b?.sequenceSplitKey,b?.useKey,b?.description,b?.metadata);if(O.isSequence){w=setTimeout(()=>{S=[]},b?.sequenceTimeoutMs??1e3);const Z=O.useKey?z.key:ol(z.code);if(Vx(Z.toLowerCase()))return;S.push(Z);const P=O.keys?.[S.length-1];if(Z!==P){S=[],w&&clearTimeout(w);return}S.length===O.keys?.length&&(m.current(z,O),w&&clearTimeout(w),S=[])}else if(ZS(z,O,b?.ignoreModifiers)||O.keys?.includes("*")){if(b?.ignoreEventWhen?.(z)||I&&u.current)return;if(PS(z,O,b?.preventDefault),!$S(z,O,b?.enabled)){qb(z);return}m.current(z,O),I||(u.current=!0)}})}},E=z=>{z.code!==void 0&&(Gx(ol(z.code)),(b?.keydown===void 0&&b?.keyup!==!0||b?.keydown)&&N(z))},C=z=>{z.code!==void 0&&(Yx(ol(z.code)),u.current=!1,b?.keyup&&N(z,!0))},j=o.current||c?.document||document;return j.addEventListener("keyup",C,c?.eventListenerOptions),j.addEventListener("keydown",E,c?.eventListenerOptions),x&&If(f,b?.delimiter).forEach(z=>{x.addHotkey(Uf(z,b?.splitKey,b?.sequenceSplitKey,b?.useKey,b?.description,b?.metadata))}),()=>{j.removeEventListener("keyup",C,c?.eventListenerOptions),j.removeEventListener("keydown",E,c?.eventListenerOptions),x&&If(f,b?.delimiter).forEach(z=>{x.removeHotkey(Uf(z,b?.splitKey,b?.sequenceSplitKey,b?.useKey,b?.description,b?.metadata))}),S=[],w&&clearTimeout(w)}},[f,b,v]),o}const Qx=(...e)=>e.filter((r,l,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===l).join(" ").trim();const t2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const n2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,l,i)=>i?i.toUpperCase():l.toLowerCase());const Pb=e=>{const r=n2(e);return r.charAt(0).toUpperCase()+r.slice(1)};var r2={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 l2=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};const i2=T.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:o="",children:u,iconNode:c,...f},h)=>T.createElement("svg",{ref:h,...r2,width:r,height:r,stroke:e,strokeWidth:i?Number(l)*24/Number(r):l,className:Qx("lucide",o),...!u&&!l2(f)&&{"aria-hidden":"true"},...f},[...c.map(([p,m])=>T.createElement(p,m)),...Array.isArray(u)?u:[u]]));const Pe=(e,r)=>{const l=T.forwardRef(({className:i,...o},u)=>T.createElement(i2,{ref:u,iconNode:r,className:Qx(`lucide-${t2(Pb(e))}`,`lucide-${e}`,i),...o}));return l.displayName=Pb(e),l};const a2=[["path",{d:"M19 3H5",key:"1236rx"}],["path",{d:"M12 21V7",key:"gj6g52"}],["path",{d:"m6 15 6 6 6-6",key:"h15q88"}]],o2=Pe("arrow-down-from-line",a2);const s2=[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]],u2=Pe("arrow-up-from-line",s2);const c2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],$a=Pe("check",c2);const f2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_i=Pe("chevron-down",f2);const d2=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],h2=Pe("chevron-left",d2);const p2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Jx=Pe("chevron-right",p2);const g2=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],m2=Pe("chevrons-down-up",g2);const b2=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],y2=Pe("chevrons-up-down",b2);const x2=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],v2=Pe("code",x2);const w2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],S2=Pe("columns-2",w2);const k2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Wx=Pe("copy",k2);const E2=[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]],C2=Pe("eraser",E2);const N2=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],A2=Pe("external-link",N2);const T2=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ms=Pe("eye",T2);const j2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],iu=Pe("file-diff",j2);const R2=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],e1=Pe("file-pen",R2);const _2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],t1=Pe("file-plus",_2);const L2=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],n1=Pe("file-x",L2);const D2=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],O2=Pe("folder-open",D2);const M2=[["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"}]],z2=Pe("folder",M2);const F2=[["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"}]],B2=Pe("git-branch",F2);const I2=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],U2=Pe("keyboard",I2);const H2=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],q2=Pe("list",H2);const P2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],$2=Pe("loader-circle",P2);const V2=[["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"}]],r1=Pe("message-square",V2);const G2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Y2=Pe("panel-left-close",G2);const X2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],Z2=Pe("panel-left",X2);const K2=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Q2=Pe("pen",K2);const J2=[["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"}]],W2=Pe("refresh-cw",J2);const ek=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],tk=Pe("search",ek);const nk=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],l1=Pe("settings",nk);const rk=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],lk=Pe("square",rk);const ik=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],ak=Pe("text-align-start",ik);const ok=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]],sk=Pe("unfold-vertical",ok);const uk=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],au=Pe("x",uk),Ka="split";function ck(e){switch(e){case"split":case"side-by-side":return"split";case"unified":case"inline":return"unified";default:return Ka}}function i1({checked:e,onChange:r,label:l,className:i="",title:o}){const u=f=>{f.stopPropagation(),r(!e)},c=f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),f.stopPropagation(),r(!e))};return y.jsxs("div",{className:`flex items-center gap-2 text-xs text-github-text-primary cursor-pointer ${i}`,title:o,onClick:u,onKeyDown:c,role:"checkbox","aria-checked":e,tabIndex:0,children:[y.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center transition-all duration-200 cursor-pointer ${e?"bg-github-accent border-github-accent":"bg-github-bg-tertiary border-github-text-muted hover:border-github-accent/50"}`,children:e&&y.jsx($a,{size:10,className:"text-white"})}),l&&y.jsx("span",{className:"select-none",children:l})]})}function $b({commentsCount:e,isCopiedAll:r,onCopyAll:l,onDeleteAll:i,onViewAll:o,direction:u="down",compact:c=!1}){const[f,h]=T.useState(!1),p=T.useRef(null),m=c,b=u==="up";T.useEffect(()=>{const N=E=>{p.current&&!p.current.contains(E.target)&&h(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const v=()=>{l(),h(!1)},x=()=>{i(),h(!1)},S=()=>{o?.(),h(!1)},w=m?r?"Copied":`Copy All (${e})`:r?"Copied All!":`Copy All Prompt (${e})`;return y.jsxs("div",{className:"relative",ref:p,children:[y.jsxs("div",{className:"flex",children:[y.jsxs("button",{onClick:v,className:`text-xs px-3 py-1.5 pr-2 rounded-l transition-all flex items-center gap-1.5 ${m?"whitespace-normal":"whitespace-nowrap"}`,style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)",borderRight:"none"},onMouseEnter:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:`Copy all ${e} comments to AI coding agent`,children:[r?y.jsx($a,{size:12}):y.jsx(Wx,{size:12}),w]}),y.jsx("button",{onClick:()=>h(!f),className:"text-xs px-2 py-1.5 rounded-r transition-all flex items-center border-l",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",borderTop:"1px solid var(--color-yellow-btn-border)",borderRight:"1px solid var(--color-yellow-btn-border)",borderBottom:"1px solid var(--color-yellow-btn-border)",borderLeft:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:"More options",children:y.jsx(_i,{size:12,className:`transition-transform duration-200 ${f?"rotate-180":""}`})})]}),f&&y.jsxs("div",{className:`absolute left-0 right-0 bg-github-bg-primary border border-github-border z-50 pb-px ${b?"bottom-full rounded-t":"top-full rounded-b"}`,style:{borderTop:b?void 0:"none",borderBottom:b?"none":void 0},children:[o&&y.jsxs("button",{onClick:S,className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 text-github-text-primary hover:bg-github-bg-tertiary transition-colors",disabled:e===0,children:[y.jsx(q2,{size:12}),"View All Comments"]}),y.jsxs("button",{onClick:x,className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 text-github-text-primary hover:bg-github-bg-tertiary transition-colors",children:[y.jsx(C2,{size:12}),"Cleanup All Prompt"]})]})]})}function a1(e){return/```suggestion\n([\s\S]*?)```/.test(e)}function o1(e){const r=[],l=/```suggestion\n([\s\S]*?)```/g;let i;for(;(i=l.exec(e))!==null;)r.push({suggestedCode:i[1].replace(/\n$/,""),startIndex:i.index,endIndex:i.index+i[0].length});return r}function fk(e){return`\`\`\`suggestion
|
|
10
|
-
${e.endsWith(`
|
|
11
|
-
`)?e:e+`
|
|
12
|
-
`}\`\`\``}const dk=2,hk=100;function pk(e){return!(e.length<dk||e.length>hk)}function Vb(e){return e.toLowerCase()}function Gb(e){const r=e.trim();return r?r.match(/^\w+$/)!==null&&pk(r):!1}const gk=200,s1=T.createContext(void 0);function mk({children:e}){const[r,l]=T.useState(null),i=T.useRef(null),o=T.useCallback(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]),u=T.useCallback(p=>{const m=p.target;if(!m.classList.contains("word-token"))return;o();const b=m.getAttribute("data-word");b&&(i.current=setTimeout(()=>{l(b)},gk))},[o]),c=T.useCallback(()=>{o(),l(null)},[o]),f=T.useCallback(p=>r?Vb(p)===Vb(r):!1,[r]);T.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);const h=T.useMemo(()=>({highlightedWord:r,handleMouseOver:u,handleMouseOut:c,isWordHighlighted:f}),[r,u,c,f]);return y.jsx(s1.Provider,{value:h,children:e})}function bk(){const e=T.useContext(s1);if(!e)throw new Error("useWordHighlight must be used within a WordHighlightProvider");return e}function u1(e){var r,l,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(r=0;r<o;r++)e[r]&&(l=u1(e[r]))&&(i&&(i+=" "),i+=l)}else for(l in e)e[l]&&(i&&(i+=" "),i+=l);return i}function c1(){for(var e,r,l=0,i="",o=arguments.length;l<o;l++)(e=arguments[l])&&(r=u1(e))&&(i&&(i+=" "),i+=r);return i}var yk=Object.create,ou=Object.defineProperty,xk=Object.defineProperties,vk=Object.getOwnPropertyDescriptor,wk=Object.getOwnPropertyDescriptors,f1=Object.getOwnPropertyNames,zs=Object.getOwnPropertySymbols,Sk=Object.getPrototypeOf,hh=Object.prototype.hasOwnProperty,d1=Object.prototype.propertyIsEnumerable,Yb=(e,r,l)=>r in e?ou(e,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[r]=l,Jn=(e,r)=>{for(var l in r||(r={}))hh.call(r,l)&&Yb(e,l,r[l]);if(zs)for(var l of zs(r))d1.call(r,l)&&Yb(e,l,r[l]);return e},su=(e,r)=>xk(e,wk(r)),h1=(e,r)=>{var l={};for(var i in e)hh.call(e,i)&&r.indexOf(i)<0&&(l[i]=e[i]);if(e!=null&&zs)for(var i of zs(e))r.indexOf(i)<0&&d1.call(e,i)&&(l[i]=e[i]);return l},kk=(e,r)=>function(){return r||(0,e[f1(e)[0]])((r={exports:{}}).exports,r),r.exports},Ek=(e,r)=>{for(var l in r)ou(e,l,{get:r[l],enumerable:!0})},Ck=(e,r,l,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of f1(r))!hh.call(e,o)&&o!==l&&ou(e,o,{get:()=>r[o],enumerable:!(i=vk(r,o))||i.enumerable});return e},Nk=(e,r,l)=>(l=e!=null?yk(Sk(e)):{},Ck(!e||!e.__esModule?ou(l,"default",{value:e,enumerable:!0}):l,e)),Ak=kk({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,r){var l=(function(){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,u={},c={util:{encode:function S(w){return w instanceof f?new f(w.type,S(w.content),w.alias):Array.isArray(w)?w.map(S):w.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(S){return Object.prototype.toString.call(S).slice(8,-1)},objId:function(S){return S.__id||Object.defineProperty(S,"__id",{value:++o}),S.__id},clone:function S(w,N){N=N||{};var E,C;switch(c.util.type(w)){case"Object":if(C=c.util.objId(w),N[C])return N[C];E={},N[C]=E;for(var j in w)w.hasOwnProperty(j)&&(E[j]=S(w[j],N));return E;case"Array":return C=c.util.objId(w),N[C]?N[C]:(E=[],N[C]=E,w.forEach(function(z,I){E[I]=S(z,N)}),E);default:return w}},getLanguage:function(S){for(;S;){var w=i.exec(S.className);if(w)return w[1].toLowerCase();S=S.parentElement}return"none"},setLanguage:function(S,w){S.className=S.className.replace(RegExp(i,"gi"),""),S.classList.add("language-"+w)},isActive:function(S,w,N){for(var E="no-"+w;S;){var C=S.classList;if(C.contains(w))return!0;if(C.contains(E))return!1;S=S.parentElement}return!!N}},languages:{plain:u,plaintext:u,text:u,txt:u,extend:function(S,w){var N=c.util.clone(c.languages[S]);for(var E in w)N[E]=w[E];return N},insertBefore:function(S,w,N,E){E=E||c.languages;var C=E[S],j={};for(var z in C)if(C.hasOwnProperty(z)){if(z==w)for(var I in N)N.hasOwnProperty(I)&&(j[I]=N[I]);N.hasOwnProperty(z)||(j[z]=C[z])}var L=E[S];return E[S]=j,c.languages.DFS(c.languages,function(O,Z){Z===L&&O!=S&&(this[O]=j)}),j},DFS:function S(w,N,E,C){C=C||{};var j=c.util.objId;for(var z in w)if(w.hasOwnProperty(z)){N.call(w,z,w[z],E||z);var I=w[z],L=c.util.type(I);L==="Object"&&!C[j(I)]?(C[j(I)]=!0,S(I,N,null,C)):L==="Array"&&!C[j(I)]&&(C[j(I)]=!0,S(I,N,z,C))}}},plugins:{},highlight:function(S,w,N){var E={code:S,grammar:w,language:N};if(c.hooks.run("before-tokenize",E),!E.grammar)throw new Error('The language "'+E.language+'" has no grammar.');return E.tokens=c.tokenize(E.code,E.grammar),c.hooks.run("after-tokenize",E),f.stringify(c.util.encode(E.tokens),E.language)},tokenize:function(S,w){var N=w.rest;if(N){for(var E in N)w[E]=N[E];delete w.rest}var C=new m;return b(C,C.head,S),p(S,C,w,C.head,0),x(C)},hooks:{all:{},add:function(S,w){var N=c.hooks.all;N[S]=N[S]||[],N[S].push(w)},run:function(S,w){var N=c.hooks.all[S];if(!(!N||!N.length))for(var E=0,C;C=N[E++];)C(w)}},Token:f};function f(S,w,N,E){this.type=S,this.content=w,this.alias=N,this.length=(E||"").length|0}f.stringify=function S(w,N){if(typeof w=="string")return w;if(Array.isArray(w)){var E="";return w.forEach(function(L){E+=S(L,N)}),E}var C={type:w.type,content:S(w.content,N),tag:"span",classes:["token",w.type],attributes:{},language:N},j=w.alias;j&&(Array.isArray(j)?Array.prototype.push.apply(C.classes,j):C.classes.push(j)),c.hooks.run("wrap",C);var z="";for(var I in C.attributes)z+=" "+I+'="'+(C.attributes[I]||"").replace(/"/g,""")+'"';return"<"+C.tag+' class="'+C.classes.join(" ")+'"'+z+">"+C.content+"</"+C.tag+">"};function h(S,w,N,E){S.lastIndex=w;var C=S.exec(N);if(C&&E&&C[1]){var j=C[1].length;C.index+=j,C[0]=C[0].slice(j)}return C}function p(S,w,N,E,C,j){for(var z in N)if(!(!N.hasOwnProperty(z)||!N[z])){var I=N[z];I=Array.isArray(I)?I:[I];for(var L=0;L<I.length;++L){if(j&&j.cause==z+","+L)return;var O=I[L],Z=O.inside,P=!!O.lookbehind,F=!!O.greedy,H=O.alias;if(F&&!O.pattern.global){var G=O.pattern.toString().match(/[imsuy]*$/)[0];O.pattern=RegExp(O.pattern.source,G+"g")}for(var Q=O.pattern||O,U=E.next,Y=C;U!==w.tail&&!(j&&Y>=j.reach);Y+=U.value.length,U=U.next){var B=U.value;if(w.length>S.length)return;if(!(B instanceof f)){var X=1,M;if(F){if(M=h(Q,Y,S,P),!M||M.index>=S.length)break;var q=M.index,V=M.index+M[0].length,R=Y;for(R+=U.value.length;q>=R;)U=U.next,R+=U.value.length;if(R-=U.value.length,Y=R,U.value instanceof f)continue;for(var D=U;D!==w.tail&&(R<V||typeof D.value=="string");D=D.next)X++,R+=D.value.length;X--,B=S.slice(Y,R),M.index-=Y}else if(M=h(Q,0,B,P),!M)continue;var q=M.index,A=M[0],te=B.slice(0,q),le=B.slice(q+A.length),fe=Y+B.length;j&&fe>j.reach&&(j.reach=fe);var me=U.prev;te&&(me=b(w,me,te),Y+=te.length),v(w,me,X);var ye=new f(z,Z?c.tokenize(A,Z):A,H,A);if(U=b(w,me,ye),le&&b(w,U,le),X>1){var pe={cause:z+","+L,reach:fe};p(S,w,N,U.prev,Y,pe),j&&pe.reach>j.reach&&(j.reach=pe.reach)}}}}}}function m(){var S={value:null,prev:null,next:null},w={value:null,prev:S,next:null};S.next=w,this.head=S,this.tail=w,this.length=0}function b(S,w,N){var E=w.next,C={value:N,prev:w,next:E};return w.next=C,E.prev=C,S.length++,C}function v(S,w,N){for(var E=w.next,C=0;C<N&&E!==S.tail;C++)E=E.next;w.next=E,E.prev=w,S.length-=C}function x(S){for(var w=[],N=S.head.next;N!==S.tail;)w.push(N.value),N=N.next;return w}return c})();r.exports=l,l.default=l}}),ue=Nk(Ak());ue.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},ue.languages.markup.tag.inside["attr-value"].inside.entity=ue.languages.markup.entity,ue.languages.markup.doctype.inside["internal-subset"].inside=ue.languages.markup,ue.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(ue.languages.markup.tag,"addInlined",{value:function(e,i){var l={},l=(l["language-"+i]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:ue.languages[i]},l.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:l}}),i=(l["language-"+i]={pattern:/[\s\S]+/,inside:ue.languages[i]},{});i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:l},ue.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(ue.languages.markup.tag,"addAttribute",{value:function(e,r){ue.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[r,"language-"+r],inside:ue.languages[r]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),ue.languages.html=ue.languages.markup,ue.languages.mathml=ue.languages.markup,ue.languages.svg=ue.languages.markup,ue.languages.xml=ue.languages.extend("markup",{}),ue.languages.ssml=ue.languages.xml,ue.languages.atom=ue.languages.xml,ue.languages.rss=ue.languages.xml,(function(e){var r={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},l=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,i="(?:[^\\\\-]|"+l.source+")",i=RegExp(i+"-"+i),o={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:l,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":r,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:l}},"special-escape":r,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":o}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:l,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":o}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(ue),ue.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},ue.languages.javascript=ue.languages.extend("clike",{"class-name":[ue.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),ue.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,ue.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:ue.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:ue.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:ue.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:ue.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:ue.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),ue.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:ue.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),ue.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),ue.languages.markup&&(ue.languages.markup.tag.addInlined("script","javascript"),ue.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),ue.languages.js=ue.languages.javascript,ue.languages.actionscript=ue.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),ue.languages.actionscript["class-name"].alias="function",delete ue.languages.actionscript.parameter,delete ue.languages.actionscript["literal-property"],ue.languages.markup&&ue.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:ue.languages.markup}}),(function(e){var r=/#(?!\{).+/,l={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:r,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:l}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:r,interpolation:l}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:l}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript})(ue),(function(e){var r=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(r,"addSupport",{value:function(l,i){(l=typeof l=="string"?[l]:l).forEach(function(o){var u=function(b){b.inside||(b.inside={}),b.inside.rest=i},c="doc-comment";if(f=e.languages[o]){var f,h=f[c];if((h=h||(f=e.languages.insertBefore(o,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[c])instanceof RegExp&&(h=f[c]={pattern:h}),Array.isArray(h))for(var p=0,m=h.length;p<m;p++)h[p]instanceof RegExp&&(h[p]={pattern:h[p]}),u(h[p]);else u(h)}})}}),r.addSupport(["java","javascript","php"],r)})(ue),(function(e){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,r=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+r.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup);r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(ue),(function(e){var r=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,r=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:r={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+r.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[r,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=r,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),l={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:l,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:l})})(ue),(function(e){var r=/[*&][^\s[\]{},]+/,l=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,i="(?:"+l.source+"(?:[ ]+"+r.source+")?|"+r.source+"(?:[ ]+"+l.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),u=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function c(f,h){h=(h||"").replace(/m/g,"")+"m";var p=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<value>>/g,function(){return f});return RegExp(p,h)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return i})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+u+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:c(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:c(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:c(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:c(u),lookbehind:!0,greedy:!0},number:{pattern:c(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:l,important:r,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml})(ue),(function(e){var r=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function l(p){return p=p.replace(/<inner>/g,function(){return r}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+p+")")}var i=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return i}),u=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,c=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+u+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+u+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+u+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(i),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:l(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:l(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:l(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:l(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(p){["url","bold","italic","strike","code-snippet"].forEach(function(m){p!==m&&(e.languages.markdown[p].inside.content.inside[m]=e.languages.markdown[m])})}),e.hooks.add("after-tokenize",function(p){p.language!=="markdown"&&p.language!=="md"||(function m(b){if(b&&typeof b!="string")for(var v=0,x=b.length;v<x;v++){var S,w=b[v];w.type!=="code"?m(w.content):(S=w.content[1],w=w.content[3],S&&w&&S.type==="code-language"&&w.type==="code-block"&&typeof S.content=="string"&&(S=S.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),S="language-"+(S=(/[a-z][\w-]*/i.exec(S)||[""])[0].toLowerCase()),w.alias?typeof w.alias=="string"?w.alias=[w.alias,S]:w.alias.push(S):w.alias=[S]))}})(p.tokens)}),e.hooks.add("wrap",function(p){if(p.type==="code-block"){for(var m="",b=0,v=p.classes.length;b<v;b++){var x=p.classes[b],x=/language-(.+)/.exec(x);if(x){m=x[1];break}}var S,w=e.languages[m];w?p.content=e.highlight((function(N){return N=N.replace(c,""),N=N.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(E,C){var j;return(C=C.toLowerCase())[0]==="#"?(j=C[1]==="x"?parseInt(C.slice(2),16):Number(C.slice(1)),h(j)):f[C]||E})})(p.content),w,m):m&&m!=="none"&&e.plugins.autoloader&&(S="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),p.attributes.id=S,e.plugins.autoloader.loadLanguages(m,function(){var N=document.getElementById(S);N&&(N.innerHTML=e.highlight(N.textContent,e.languages[m],m))}))}}),RegExp(e.languages.markup.tag.pattern.source,"gi")),f={amp:"&",lt:"<",gt:">",quot:'"'},h=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown})(ue),ue.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:ue.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},ue.hooks.add("after-tokenize",function(e){if(e.language==="graphql")for(var r=e.tokens.filter(function(S){return typeof S!="string"&&S.type!=="comment"&&S.type!=="scalar"}),l=0;l<r.length;){var i=r[l++];if(i.type==="keyword"&&i.content==="mutation"){var o=[];if(b(["definition-mutation","punctuation"])&&m(1).content==="("){l+=2;var u=v(/^\($/,/^\)$/);if(u===-1)continue;for(;l<u;l++){var c=m(0);c.type==="variable"&&(x(c,"variable-input"),o.push(c.content))}l=u+1}if(b(["punctuation","property-query"])&&m(0).content==="{"&&(l++,x(m(0),"property-mutation"),0<o.length)){var f=v(/^\{$/,/^\}$/);if(f!==-1)for(var h=l;h<f;h++){var p=r[h];p.type==="variable"&&0<=o.indexOf(p.content)&&x(p,"variable-input")}}}}function m(S){return r[l+S]}function b(S,w){w=w||0;for(var N=0;N<S.length;N++){var E=m(N+w);if(!E||E.type!==S[N])return}return 1}function v(S,w){for(var N=1,E=l;E<r.length;E++){var C=r[E],j=C.content;if(C.type==="punctuation"&&typeof j=="string"){if(S.test(j))N++;else if(w.test(j)&&--N===0)return E}}return-1}function x(S,w){var N=S.alias;N?Array.isArray(N)||(S.alias=N=[N]):S.alias=N=[],N.push(w)}}),ue.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},(function(e){var r=e.languages.javascript["template-string"],l=r.pattern.source,i=r.inside.interpolation,o=i.inside["interpolation-punctuation"],u=i.pattern.source;function c(b,v){if(e.languages[b])return{pattern:RegExp("((?:"+v+")\\s*)"+l),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:b}}}}function f(b,v,x){return b={code:b,grammar:v,language:x},e.hooks.run("before-tokenize",b),b.tokens=e.tokenize(b.code,b.grammar),e.hooks.run("after-tokenize",b),b.tokens}function h(b,v,x){var N=e.tokenize(b,{interpolation:{pattern:RegExp(u),lookbehind:!0}}),S=0,w={},N=f(N.map(function(C){if(typeof C=="string")return C;for(var j,z,C=C.content;b.indexOf((z=S++,j="___"+x.toUpperCase()+"_"+z+"___"))!==-1;);return w[j]=C,j}).join(""),v,x),E=Object.keys(w);return S=0,(function C(j){for(var z=0;z<j.length;z++){if(S>=E.length)return;var I,L,O,Z,P,F,H,G=j[z];typeof G=="string"||typeof G.content=="string"?(I=E[S],(H=(F=typeof G=="string"?G:G.content).indexOf(I))!==-1&&(++S,L=F.substring(0,H),P=w[I],O=void 0,(Z={})["interpolation-punctuation"]=o,(Z=e.tokenize(P,Z)).length===3&&((O=[1,1]).push.apply(O,f(Z[1],e.languages.javascript,"javascript")),Z.splice.apply(Z,O)),O=new e.Token("interpolation",Z,i.alias,P),Z=F.substring(H+I.length),P=[],L&&P.push(L),P.push(O),Z&&(C(F=[Z]),P.push.apply(P,F)),typeof G=="string"?(j.splice.apply(j,[z,1].concat(P)),z+=P.length-1):G.content=P)):(H=G.content,Array.isArray(H)?C(H):C([H]))}})(N),new e.Token(x,N,"language-"+x,b)}e.languages.javascript["template-string"]=[c("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),c("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),c("svg",/\bsvg/.source),c("markdown",/\b(?:markdown|md)/.source),c("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),c("sql",/\bsql/.source),r].filter(Boolean);var p={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function m(b){return typeof b=="string"?b:Array.isArray(b)?b.map(m).join(""):m(b.content)}e.hooks.add("after-tokenize",function(b){b.language in p&&(function v(x){for(var S=0,w=x.length;S<w;S++){var N,E,C,j=x[S];typeof j!="string"&&(N=j.content,Array.isArray(N)?j.type==="template-string"?(j=N[1],N.length===3&&typeof j!="string"&&j.type==="embedded-code"&&(E=m(j),j=j.alias,j=Array.isArray(j)?j[0]:j,C=e.languages[j])&&(N[1]=h(E,C,j))):v(N):typeof N!="string"&&v([N]))}})(b.tokens)})})(ue),(function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var r=e.languages.extend("typescript",{});delete r["class-name"],e.languages.typescript["class-name"].inside=r,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:r}}}}),e.languages.ts=e.languages.typescript})(ue),(function(e){var r=e.languages.javascript,l=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,i="(@(?:arg|argument|param|property)\\s+(?:"+l+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(i+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(i+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:r,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return l})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+l),lookbehind:!0,inside:{string:r.string,number:r.number,boolean:r.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:r,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)})(ue),(function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})})(ue),ue.languages.n4js=ue.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),ue.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),ue.languages.n4jsd=ue.languages.n4js,(function(e){function r(c,f){return RegExp(c.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),f)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:r(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:r(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:r(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var l=["function","function-variable","method","method-variable","property-access"],i=0;i<l.length;i++){var u=l[i],o=e.languages.javascript[u],u=(o=e.util.type(o)==="RegExp"?e.languages.javascript[u]={pattern:o}:o).inside||{};(o.inside=u)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(ue),(function(e){var r=e.util.clone(e.languages.javascript),l=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,i=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function u(h,p){return h=h.replace(/<S>/g,function(){return l}).replace(/<BRACES>/g,function(){return i}).replace(/<SPREAD>/g,function(){return o}),RegExp(h,p)}o=u(o).source,e.languages.jsx=e.languages.extend("markup",r),e.languages.jsx.tag.pattern=u(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=r.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:u(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:u(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);function c(h){for(var p=[],m=0;m<h.length;m++){var b=h[m],v=!1;typeof b!="string"&&(b.type==="tag"&&b.content[0]&&b.content[0].type==="tag"?b.content[0].content[0].content==="</"?0<p.length&&p[p.length-1].tagName===f(b.content[0].content[1])&&p.pop():b.content[b.content.length-1].content!=="/>"&&p.push({tagName:f(b.content[0].content[1]),openedBraces:0}):0<p.length&&b.type==="punctuation"&&b.content==="{"?p[p.length-1].openedBraces++:0<p.length&&0<p[p.length-1].openedBraces&&b.type==="punctuation"&&b.content==="}"?p[p.length-1].openedBraces--:v=!0),(v||typeof b=="string")&&0<p.length&&p[p.length-1].openedBraces===0&&(v=f(b),m<h.length-1&&(typeof h[m+1]=="string"||h[m+1].type==="plain-text")&&(v+=f(h[m+1]),h.splice(m+1,1)),0<m&&(typeof h[m-1]=="string"||h[m-1].type==="plain-text")&&(v=f(h[m-1])+v,h.splice(m-1,1),m--),h[m]=new e.Token("plain-text",v,null,v)),b.content&&typeof b.content!="string"&&c(b.content)}}var f=function(h){return h?typeof h=="string"?h:typeof h.content=="string"?h.content:h.content.map(f).join(""):""};e.hooks.add("after-tokenize",function(h){h.language!=="jsx"&&h.language!=="tsx"||c(h.tokens)})})(ue),(function(e){var r=e.util.clone(e.languages.typescript),r=(e.languages.tsx=e.languages.extend("jsx",r),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag);r.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+r.pattern.source+")",r.pattern.flags),r.lookbehind=!0})(ue),ue.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},ue.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=ue.languages.swift}),(function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var r={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:r},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:r},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin})(ue),ue.languages.c=ue.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),ue.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),ue.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},ue.languages.c.string],char:ue.languages.c.char,comment:ue.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:ue.languages.c}}}}),ue.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete ue.languages.c.boolean,ue.languages.objectivec=ue.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete ue.languages.objectivec["class-name"],ue.languages.objc=ue.languages.objectivec,ue.languages.reason=ue.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),ue.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete ue.languages.reason.function,(function(e){for(var r=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,l=0;l<2;l++)r=r.replace(/<self>/g,function(){return r});r=r.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+r),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string})(ue),ue.languages.go=ue.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),ue.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete ue.languages.go["class-name"],(function(e){var r=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,l=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return r.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return r.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:r,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return l})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])})(ue),ue.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},ue.languages.python["string-interpolation"].inside.interpolation.inside.rest=ue.languages.python,ue.languages.py=ue.languages.python,ue.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},ue.languages.webmanifest=ue.languages.json;var vn={};Ek(vn,{dracula:()=>jk,duotoneDark:()=>_k,duotoneLight:()=>Dk,github:()=>Mk,gruvboxMaterialDark:()=>cE,gruvboxMaterialLight:()=>dE,jettwaveDark:()=>nE,jettwaveLight:()=>lE,nightOwl:()=>Fk,nightOwlLight:()=>Ik,oceanicNext:()=>Hk,okaidia:()=>Pk,oneDark:()=>aE,oneLight:()=>sE,palenight:()=>Vk,shadesOfPurple:()=>Yk,synthwave84:()=>Zk,ultramin:()=>Qk,vsDark:()=>p1,vsLight:()=>eE});var Tk={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},jk=Tk,Rk={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},_k=Rk,Lk={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},Dk=Lk,Ok={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},Mk=Ok,zk={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},Fk=zk,Bk={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},Ik=Bk,xn={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},Uk={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:xn.keyword}},{types:["attr-value"],style:{color:xn.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:xn.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:xn.primitive}},{types:["boolean"],style:{color:xn.boolean}},{types:["tag"],style:{color:xn.tag}},{types:["string"],style:{color:xn.string}},{types:["punctuation"],style:{color:xn.string}},{types:["selector","char","builtin","inserted"],style:{color:xn.char}},{types:["function"],style:{color:xn.function}},{types:["operator","entity","url","variable"],style:{color:xn.variable}},{types:["keyword"],style:{color:xn.keyword}},{types:["atrule","class-name"],style:{color:xn.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},Hk=Uk,qk={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},Pk=qk,$k={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},Vk=$k,Gk={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},Yk=Gk,Xk={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},Zk=Xk,Kk={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},Qk=Kk,Jk={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},p1=Jk,Wk={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},eE=Wk,tE={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},nE=tE,rE={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},lE=rE,iE={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},aE=iE,oE={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},sE=oE,uE={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},cE=uE,fE={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},dE=fE,hE=e=>T.useCallback(r=>{var l=r,{className:i,style:o,line:u}=l,c=h1(l,["className","style","line"]);const f=su(Jn({},c),{className:c1("token-line",i)});return typeof e=="object"&&"plain"in e&&(f.style=e.plain),typeof o=="object"&&(f.style=Jn(Jn({},f.style||{}),o)),f},[e]),pE=e=>{const r=T.useCallback(({types:l,empty:i})=>{if(e!=null){{if(l.length===1&&l[0]==="plain")return i!=null?{display:"inline-block"}:void 0;if(l.length===1&&i!=null)return e[l[0]]}return Object.assign(i!=null?{display:"inline-block"}:{},...l.map(o=>e[o]))}},[e]);return T.useCallback(l=>{var i=l,{token:o,className:u,style:c}=i,f=h1(i,["token","className","style"]);const h=su(Jn({},f),{className:c1("token",...o.types,u),children:o.content,style:r(o)});return c!=null&&(h.style=Jn(Jn({},h.style||{}),c)),h},[r])},gE=/\r\n|\r|\n/,Xb=e=>{e.length===0?e.push({types:["plain"],content:`
|
|
13
|
-
`,empty:!0}):e.length===1&&e[0].content===""&&(e[0].content=`
|
|
14
|
-
`,e[0].empty=!0)},Zb=(e,r)=>{const l=e.length;return l>0&&e[l-1]===r?e:e.concat(r)},mE=e=>{const r=[[]],l=[e],i=[0],o=[e.length];let u=0,c=0,f=[];const h=[f];for(;c>-1;){for(;(u=i[c]++)<o[c];){let p,m=r[c];const v=l[c][u];if(typeof v=="string"?(m=c>0?m:["plain"],p=v):(m=Zb(m,v.type),v.alias&&(m=Zb(m,v.alias)),p=v.content),typeof p!="string"){c++,r.push(m),l.push(p),i.push(0),o.push(p.length);continue}const x=p.split(gE),S=x.length;f.push({types:m,content:x[0]});for(let w=1;w<S;w++)Xb(f),h.push(f=[]),f.push({types:m,content:x[w]})}c--,r.pop(),l.pop(),i.pop(),o.pop()}return Xb(f),h},Kb=mE,bE=({prism:e,code:r,grammar:l,language:i})=>T.useMemo(()=>{if(l==null)return Kb([r]);const o={code:r,grammar:l,language:i,tokens:[]};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(r,l),e.hooks.run("after-tokenize",o),Kb(o.tokens)},[r,l,i,e]),yE=(e,r)=>{const{plain:l}=e,i=e.styles.reduce((o,u)=>{const{languages:c,style:f}=u;return c&&!c.includes(r)||u.types.forEach(h=>{const p=Jn(Jn({},o[h]),f);o[h]=p}),o},{});return i.root=l,i.plain=su(Jn({},l),{backgroundColor:void 0}),i},xE=yE,vE=({children:e,language:r,code:l,theme:i,prism:o})=>{const u=r.toLowerCase(),c=xE(i,u),f=hE(c),h=pE(c),p=o.languages[u],m=bE({prism:o,language:u,code:l,grammar:p});return e({tokens:m,className:`prism-code language-${u}`,style:c!=null?c.root:{},getLineProps:f,getTokenProps:h})},wE=e=>T.createElement(vE,su(Jn({},e),{prism:e.prism||ue,theme:e.theme||p1,code:e.code,language:e.language}));const SE="modulepreload",kE=function(e){return"/"+e},Qb={},Ht=function(r,l,i){let o=Promise.resolve();if(l&&l.length>0){let h=function(p){return Promise.all(p.map(m=>Promise.resolve(m).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");o=h(l.map(p=>{if(p=kE(p),p in Qb)return;Qb[p]=!0;const m=p.endsWith(".css"),b=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${b}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":SE,m||(v.as="script"),v.crossOrigin="",v.href=p,f&&v.setAttribute("nonce",f),document.head.appendChild(v),m)return new Promise((x,S)=>{v.addEventListener("load",x),v.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${p}`)))})}))}function u(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return o.then(c=>{for(const f of c||[])f.status==="rejected"&&u(f.reason);return r().catch(u)})},ws={};function g1(e){if(!ws[e]){const l={bash:()=>Ht(()=>import("./prism-bash-DTkDXsAh.js"),[]),sh:()=>Ht(()=>import("./prism-bash-DTkDXsAh.js"),[]),shell:()=>Ht(()=>import("./prism-bash-DTkDXsAh.js"),[]),php:async()=>(await Ht(()=>import("./prism-markup-templating-Ct1xsyfA.js"),[]),Ht(()=>import("./prism-php-dNesT8V5.js").then(i=>i.p),[])),sql:()=>Ht(()=>import("./prism-sql-AgAyy5H_.js"),[]),ruby:()=>Ht(()=>import("./prism-ruby-D15pg_tm.js").then(i=>i.p),[]),java:()=>Ht(()=>import("./prism-java-D7yNBm6C.js").then(i=>i.p),[]),scala:async()=>(await g1("java"),Ht(()=>import("./prism-scala-BjNo2HkN.js"),[])),solidity:()=>Ht(()=>import("./prism-solidity-BC_GfpO6.js").then(i=>i.p),[]),vim:()=>Ht(()=>import("./prism-vim-uciLQ2PQ.js"),[]),dart:()=>Ht(()=>import("./prism-dart-MjriiaMt.js"),[]),csharp:()=>Ht(()=>import("./prism-csharp-CZZji5hr.js").then(i=>i.p),[]),protobuf:()=>Ht(()=>import("./prism-protobuf-DiQ_z8B5.js"),[]),hcl:()=>Ht(()=>import("./prism-hcl-C4BeI84H.js").then(i=>i.p),[]),perl:()=>Ht(()=>import("./prism-perl-CZI64w6i.js").then(i=>i.p),[])}[e];if(!l)return console.warn(`No loader available for language: ${e}`),Promise.reject(new Error(`Unsupported language: ${e}`));ws[e]=l().then(()=>{}).catch(i=>{throw delete ws[e],console.warn(`Failed to load language: ${e}`,i),i})}return ws[e]}typeof global<"u"?global.Prism=ue:typeof window<"u"&&(window.Prism=ue);const Jb=["markup","html","xml","svg","javascript","js","typescript","ts","jsx","tsx","css","c","cpp","swift","kotlin","objectivec","reason","rust","go","graphql","yaml","yml","json","markdown","md","python","py"];function EE(e,r){const[l,i]=T.useState(()=>Jb.includes(r)||!!ue.languages[r]);return T.useEffect(()=>{if(!l){if(Jb.includes(r)){i(!0);return}g1(r).then(()=>{i(!0)}).catch(()=>{i(!1)})}},[r,l]),{ready:l,actualLang:l?r:"text"}}function Qa(e){return e&&e.split(".").pop()?.toLowerCase()||null}function CE(e){return e&&e.split("/").pop()||""}const NE={js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"javascript",ts:"typescript",mts:"typescript",cts:"typescript",tsx:"typescript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",cpp:"cpp",c:"c",cs:"csharp",php:"php",swift:"swift",kt:"kotlin",scala:"scala",r:"r",sql:"sql",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",yml:"yaml",yaml:"yaml",json:"json",xml:"xml",html:"html",css:"css",scss:"scss",sass:"sass",less:"less",md:"markdown",markdown:"markdown",tex:"latex",vim:"vim"},AE={ts:"typescript",tsx:"tsx",mts:"typescript",cts:"typescript",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",json:"json",css:"css",scss:"css",html:"html",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",yml:"yaml",yaml:"yaml",md:"markdown",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",cpp:"cpp",c:"c",php:"php",sql:"sql",xml:"xml",swift:"swift",kt:"kotlin",scala:"scala",svelte:"svelte",r:"r",lua:"lua",perl:"perl",pl:"perl",pm:"perl",dockerfile:"docker",makefile:"makefile",gitignore:"git",env:"bash",conf:"nginx",ini:"ini",toml:"toml",sol:"solidity",vim:"vim",dart:"dart",cs:"csharp",proto:"protobuf",tf:"hcl",tfvars:"hcl",hcl:"hcl"},TE={dockerfile:"docker",makefile:"makefile",".gitignore":"git",".env":"bash",".bashrc":"bash",".zshrc":"bash",".bash_profile":"bash",".profile":"bash"};function m1(e,r){if(e)return r[e.toLowerCase()]}function jE(e){return m1(Qa(e),NE)}function RE(e){const r=CE(e).toLowerCase(),l=TE[r];return l||m1(Qa(e),AE)||"text"}function _E(e){return{...e,styles:e.styles.map(r=>({...r,style:{...r.style,background:void 0,backgroundColor:void 0}}))}}function LE(e){let r;switch(e){case"github":r=vn.github;break;case"vsLight":r=vn.vsLight;break;case"oneLight":r=vn.oneLight;break;case"gruvboxMaterialLight":r=vn.gruvboxMaterialLight;break;case"nightOwlLight":r=vn.nightOwlLight;break;case"vsDark":r=vn.vsDark;break;case"oneDark":r=vn.oneDark;break;case"gruvboxMaterialDark":r=vn.gruvboxMaterialDark;break;case"nightOwl":r=vn.nightOwl;break;case"dracula":r=vn.dracula;break;case"okaidia":r=vn.okaidia;break;default:r=vn.vsDark}return _E(r)}const ph=Qt.memo(function({code:r,language:l,className:i,syntaxTheme:o="vsDark",filename:u="",renderToken:c,onMouseOver:f,onMouseOut:h}){const p=l||(u?RE(u):"text"),{actualLang:m}=EE(r,p),b=LE(o),v=T.useCallback(({style:x,tokens:S,getLineProps:w,getTokenProps:N})=>y.jsx("span",{className:i,style:{...x,background:"transparent",backgroundColor:"transparent"},onMouseOver:f,onMouseOut:h,children:S.map((E,C)=>y.jsx("span",{...w({line:E}),children:E.map((j,z)=>c?c(j,z,N):y.jsx("span",{...N({token:j})},z))},C))}),[i,f,h,c]);return y.jsx(wE,{code:r,language:m,theme:b,prism:ue,children:v})}),Va=Qt.memo(function(r){const{handleMouseOver:l,handleMouseOut:i,isWordHighlighted:o}=bk(),u=T.useCallback((c,f,h)=>{const p=h({token:c}),m=c.content.split(/( +)/);if(m.length===1&&m[0]&&!Gb(m[0]))return y.jsx("span",{...p},f);const b=m.map((v,x)=>{if(!v)return null;if(Gb(v)){const S=v.trim(),w=o(S);return y.jsx("span",{className:`word-token ${w?"word-highlight":""}`,"data-word":S,children:v},`${f}-${x}`)}return y.jsx("span",{children:v},`${f}-${x}`)});return y.jsx("span",{...p,children:b},f)},[o]);return y.jsx(ph,{...r,renderToken:u,onMouseOver:l,onMouseOut:i})}),Cd=Qt.memo(function({segments:r,className:l=""}){const i=T.useMemo(()=>r.map((o,u)=>{const c=o.type==="added"?"word-diff-added":o.type==="removed"?"word-diff-removed":"";return y.jsx("span",{className:c,children:o.value},u)}),[r]);return y.jsx("span",{className:l,children:i})}),DE=e=>{switch(e){case"add":return"+";case"delete":return"-";default:return" "}},OE=e=>{switch(e){case"add":return"text-github-accent bg-diff-addition-bg";case"delete":return"text-github-danger bg-diff-deletion-bg";default:return"text-github-text-muted bg-github-bg-secondary"}};function b1({line:e,syntaxTheme:r,filename:l,diffSegments:i,showPrefixBorder:o=!0}){return y.jsxs("div",{className:"flex items-center relative min-h-[16px]",children:[y.jsx("span",{className:`w-5 text-center flex-shrink-0 ${o?"border-r border-github-border":""} ${OE(e.type)}`,children:DE(e.type)}),i?y.jsx(Cd,{segments:i,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(Va,{code:e.content,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit",syntaxTheme:r,filename:l})]})}const ME=e=>e==="add"?"bg-diff-addition-bg":"bg-diff-deletion-bg",zE=(e,r)=>({type:e,content:r});function Wb({code:e,type:r,filename:l,keyPrefix:i,syntaxTheme:o}){return y.jsx(y.Fragment,{children:e.split(`
|
|
15
|
-
`).map((u,c)=>y.jsx("div",{className:ME(r),children:y.jsx(b1,{line:zE(r,u),filename:l,syntaxTheme:o,showPrefixBorder:!1})},`${i}-${c}`))})}function y1(e){return a1(e)}function Nd({body:e,originalCode:r,filename:l,syntaxTheme:i}){const o=T.useMemo(()=>{const u=o1(e);if(u.length===0)return[{type:"text",content:e}];const c=[];let f=0;for(const h of u)h.startIndex>f&&c.push({type:"text",content:e.slice(f,h.startIndex)}),c.push({type:"suggestion",code:h.suggestedCode,original:r||""}),f=h.endIndex;return f<e.length&&c.push({type:"text",content:e.slice(f)}),c},[e,r]);return y.jsx("div",{className:"text-github-text-primary text-sm leading-6",children:o.map((u,c)=>u.type==="text"?y.jsx("span",{className:"whitespace-pre-wrap",children:u.content},c):y.jsx("div",{className:"my-2 border border-github-border rounded-md overflow-hidden",children:y.jsxs("div",{className:"font-mono text-sm",children:[u.original&&y.jsx(Wb,{code:u.original,type:"delete",filename:l,keyPrefix:`orig-${c}`,syntaxTheme:i}),y.jsx(Wb,{code:u.code,type:"add",filename:l,keyPrefix:`sugg-${c}`,syntaxTheme:i})]})},c))})}const FE="text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all flex items-center gap-1";function x1({selectedCode:e,value:r,onChange:l,textareaRef:i,className:o=FE}){if(!e)return null;const u=()=>{const c=fk(e),f=i?.current;if(!f){l(`${r}${r?`
|
|
16
|
-
|
|
17
|
-
`:""}${c}
|
|
18
|
-
|
|
19
|
-
`);return}const h=f.selectionStart,p=f.selectionEnd,m=r.slice(0,h),b=r.slice(p),x=`${m?`
|
|
20
|
-
|
|
21
|
-
`:""}${c}
|
|
22
|
-
|
|
23
|
-
`,S=m+x+b;l(S);const w=m.length+x.length;requestAnimationFrame(()=>{f.focus(),f.setSelectionRange(w,w)})};return y.jsxs("button",{type:"button",onClick:u,className:o,title:"Add code suggestion",children:[y.jsx(v2,{size:12}),"Add suggestion"]})}function gh({comment:e,onGeneratePrompt:r,onRemoveComment:l,onUpdateComment:i,onClick:o,syntaxTheme:u}){const[c,f]=T.useState(!1),[h,p]=T.useState(!1),[m,b]=T.useState(e.body),[v,x]=T.useState("edit"),S=T.useRef(null),w=y1(m),N=w?v:"edit",E=async O=>{O.stopPropagation();try{const Z=r(e);await navigator.clipboard.writeText(Z),f(!0),setTimeout(()=>f(!1),2e3)}catch(Z){console.error("Failed to copy prompt:",Z)}},C=O=>{O.stopPropagation(),p(!0),x("edit"),b(e.body)},j=()=>{p(!1),x("edit"),b(e.body)},z=O=>{O?.stopPropagation(),m.trim()!==e.body&&i(e.id,m.trim()),p(!1),x("edit")},I=O=>{O.stopPropagation(),l(e.id)},L=O=>{O.key==="Enter"&&(O.metaKey||O.ctrlKey)?(O.preventDefault(),z()):O.key==="Escape"&&(O.preventDefault(),j())};return it("escape",()=>{h&&j()},{enableOnFormTags:["textarea"],enabled:h},[h]),it("mod+enter",()=>{h&&z()},{enableOnFormTags:["textarea"],enabled:h},[h,m,e.body]),y.jsxs("div",{id:`comment-${e.id}`,className:`p-3 bg-github-bg-tertiary border border-yellow-600/50 rounded-md border-l-4 border-l-yellow-400 shadow-sm transition-all ${o?"hover:shadow-md cursor-pointer":""}`,onClick:o,children:[y.jsxs("div",{className:"flex items-center justify-between mb-2 gap-3",children:[y.jsx("div",{className:"flex items-center gap-2 text-xs text-github-text-secondary flex-1 min-w-0",children:y.jsxs("span",{className:"font-mono px-1 py-0.5 rounded overflow-hidden text-ellipsis whitespace-nowrap",style:{backgroundColor:"var(--color-yellow-path-bg)",color:"var(--color-yellow-path-text)"},children:[e.file,":",Array.isArray(e.line)?`${e.line[0]}-${e.line[1]}`:e.line]})}),y.jsx("div",{className:"flex items-center gap-2",children:h?w?y.jsxs("div",{className:"flex items-center bg-github-bg-tertiary border border-github-border rounded p-0.5",onClick:O=>O.stopPropagation(),children:[y.jsx("button",{type:"button",onClick:()=>x("edit"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${N==="edit"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:"Edit"}),y.jsx("button",{type:"button",onClick:()=>x("preview"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${N==="preview"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:"Preview"})]}):y.jsx("div",{onClick:O=>O.stopPropagation(),children:y.jsx(x1,{selectedCode:e.codeContent,value:m,onChange:b,textareaRef:S})}):y.jsxs(y.Fragment,{children:[y.jsx("button",{onClick:E,className:"text-xs px-2 py-1 rounded transition-all whitespace-nowrap",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:O=>{O.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",O.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:O=>{O.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",O.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},title:"Copy prompt for AI coding agent",children:c?"Copied!":"Copy Prompt"}),y.jsx("button",{onClick:C,className:"text-xs p-1.5 bg-github-bg-tertiary text-github-text-secondary border border-github-border rounded hover:text-github-text-primary hover:bg-github-bg-primary transition-all",title:"Edit",children:y.jsx(Q2,{size:12})}),y.jsx("button",{onClick:I,className:"text-xs p-1.5 bg-github-bg-tertiary text-green-600 border border-github-border rounded hover:bg-green-500/10 hover:border-green-600 transition-all",title:"Resolve",children:y.jsx($a,{size:12})})]})})]}),h?y.jsxs("div",{children:[w&&N==="preview"?y.jsx(Nd,{body:m,originalCode:e.codeContent,filename:e.file,syntaxTheme:u}):y.jsx(y.Fragment,{children:y.jsx("textarea",{ref:S,value:m,onChange:O=>b(O.target.value),className:"w-full text-github-text-primary text-sm leading-6 bg-github-bg-secondary border border-github-border rounded px-2 py-1 resize-none focus:outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600/30",rows:Math.max(2,m.split(`
|
|
24
|
-
`).length),placeholder:"Edit your comment...",autoFocus:!0,onClick:O=>O.stopPropagation(),onKeyDown:O=>{O.stopPropagation(),L(O)}})}),y.jsxs("div",{className:"flex gap-2 justify-end mt-2",children:[y.jsx("button",{type:"button",onClick:j,className:"text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all",children:"Cancel"}),y.jsx("button",{type:"button",onClick:z,className:"text-xs px-3 py-1.5 rounded transition-all disabled:opacity-50",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:O=>{O.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",O.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:O=>{O.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",O.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},disabled:!m.trim(),children:"Submit"})]})]}):y.jsx(Nd,{body:e.body,originalCode:e.codeContent,filename:e.file,syntaxTheme:u})]})}function BE({isOpen:e,onClose:r,onNavigate:l,comments:i,onRemoveComment:o,onGeneratePrompt:u,onUpdateComment:c,syntaxTheme:f}){const[h,p]=T.useState(0),m=T.useRef([]),{enableScope:b,disableScope:v}=Za(),x=[...i].sort((E,C)=>{const j=E.file.localeCompare(C.file);if(j!==0)return j;const z=Array.isArray(E.line)?E.line[0]:E.line,I=Array.isArray(C.line)?C.line[0]:C.line;return z-I}),S=T.useCallback(E=>{l(E),r()},[l,r]),w=T.useCallback(E=>{confirm(`Delete this comment?
|
|
25
|
-
|
|
26
|
-
"${E.body}"`)&&(o(E.id),h>=x.length-1&&h>0&&p(h-1))},[o,h,x.length]);T.useEffect(()=>(e?(b("comments-list"),v("navigation")):(b("navigation"),v("comments-list"),p(0)),()=>{b("navigation"),v("comments-list")}),[e,b,v]);const N={scopes:"comments-list",enableOnFormTags:!1};return it("escape",()=>r(),N,[r]),it("j, down",()=>p(E=>Math.min(E+1,x.length-1)),N,[x.length]),it("k, up",()=>p(E=>Math.max(E-1,0)),N,[]),it("enter",()=>{x[h]&&S(x[h])},N,[h,x,S]),it("d",()=>{x[h]&&w(x[h])},N,[h,x,w]),T.useEffect(()=>{m.current[h]&&m.current[h]?.scrollIntoView({behavior:"smooth",block:"nearest"})},[h]),e?y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:r}),y.jsxs("div",{className:"relative bg-github-bg-primary border border-github-border rounded-lg shadow-lg max-w-4xl w-full max-h-[80vh] overflow-hidden",children:[y.jsxs("div",{className:"sticky top-0 bg-github-bg-primary border-b border-github-border px-6 py-4",children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"All Comments"}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary transition-colors","aria-label":"Close comments list",children:y.jsx(au,{size:20})})]}),y.jsxs("div",{className:"text-xs text-github-text-secondary",children:[y.jsx("span",{className:"font-mono",children:"j/k"})," or ",y.jsx("span",{className:"font-mono",children:"↑/↓"})," to navigate • ",y.jsx("span",{className:"font-mono",children:"Enter"})," to jump •"," ",y.jsx("span",{className:"font-mono",children:"d"})," to delete • ",y.jsx("span",{className:"font-mono",children:"Esc"})," ","to close"]})]}),y.jsx("div",{className:"overflow-y-auto max-h-[calc(80vh-120px)]",children:y.jsx("div",{className:"p-6",children:x.length===0?y.jsx("p",{className:"text-github-text-secondary text-center",children:"No comments yet"}):y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"space-y-2",children:x.map((E,C)=>y.jsx("div",{ref:j=>{m.current[C]=j},className:`${h===C?"ring-2 ring-blue-500 rounded":""}`,children:y.jsx(gh,{comment:E,onGeneratePrompt:u,onRemoveComment:o,onUpdateComment:c,syntaxTheme:f,onClick:j=>{j.stopPropagation(),p(C),S(E)}})},E.id))}),x.length>0&&y.jsxs("div",{className:"mt-4 pt-4 border-t border-github-border text-xs text-github-text-secondary text-center",children:[h+1," of ",x.length," comments"]})]})})})]})]}):null}function uu(){return typeof window<"u"}function ul(e){return mh(e)?(e.nodeName||"").toLowerCase():"#document"}function un(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function er(e){var r;return(r=(mh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function mh(e){return uu()?e instanceof Node||e instanceof un(e).Node:!1}function ct(e){return uu()?e instanceof Element||e instanceof un(e).Element:!1}function Rt(e){return uu()?e instanceof HTMLElement||e instanceof un(e).HTMLElement:!1}function Fs(e){return!uu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof un(e).ShadowRoot}function Ja(e){const{overflow:r,overflowX:l,overflowY:i,display:o}=Mn(e);return/auto|scroll|overlay|hidden|clip/.test(r+i+l)&&o!=="inline"&&o!=="contents"}function IE(e){return/^(table|td|th)$/.test(ul(e))}function cu(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const UE=/transform|translate|scale|rotate|perspective|filter/,HE=/paint|layout|strict|content/,Rl=e=>!!e&&e!=="none";let Hf;function bh(e){const r=ct(e)?Mn(e):e;return Rl(r.transform)||Rl(r.translate)||Rl(r.scale)||Rl(r.rotate)||Rl(r.perspective)||!fu()&&(Rl(r.backdropFilter)||Rl(r.filter))||UE.test(r.willChange||"")||HE.test(r.contain||"")}function qE(e){let r=Cr(e);for(;Rt(r)&&!Er(r);){if(bh(r))return r;if(cu(r))return null;r=Cr(r)}return null}function fu(){return Hf==null&&(Hf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Hf}function Er(e){return/^(html|body|#document)$/.test(ul(e))}function Mn(e){return un(e).getComputedStyle(e)}function du(e){return ct(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Cr(e){if(ul(e)==="html")return e;const r=e.assignedSlot||e.parentNode||Fs(e)&&e.host||er(e);return Fs(r)?r.host:r}function v1(e){const r=Cr(e);return Er(r)?e.ownerDocument?e.ownerDocument.body:e.body:Rt(r)&&Ja(r)?r:v1(r)}function sl(e,r,l){var i;r===void 0&&(r=[]),l===void 0&&(l=!0);const o=v1(e),u=o===((i=e.ownerDocument)==null?void 0:i.body),c=un(o);if(u){const f=Ad(c);return r.concat(c,c.visualViewport||[],Ja(o)?o:[],f&&l?sl(f):[])}else return r.concat(o,sl(o,[],l))}function Ad(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Bs=Math.min,Dl=Math.max,Is=Math.round,Ss=Math.floor,Wn=e=>({x:e,y:e}),PE={left:"right",right:"left",bottom:"top",top:"bottom"};function ey(e,r,l){return Dl(e,Bs(r,l))}function hu(e,r){return typeof e=="function"?e(r):e}function Ol(e){return e.split("-")[0]}function pu(e){return e.split("-")[1]}function w1(e){return e==="x"?"y":"x"}function S1(e){return e==="y"?"height":"width"}function il(e){const r=e[0];return r==="t"||r==="b"?"y":"x"}function k1(e){return w1(il(e))}function $E(e,r,l){l===void 0&&(l=!1);const i=pu(e),o=k1(e),u=S1(o);let c=o==="x"?i===(l?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[u]>r.floating[u]&&(c=Us(c)),[c,Us(c)]}function VE(e){const r=Us(e);return[Td(e),r,Td(r)]}function Td(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ty=["left","right"],ny=["right","left"],GE=["top","bottom"],YE=["bottom","top"];function XE(e,r,l){switch(e){case"top":case"bottom":return l?r?ny:ty:r?ty:ny;case"left":case"right":return r?GE:YE;default:return[]}}function ZE(e,r,l,i){const o=pu(e);let u=XE(Ol(e),l==="start",i);return o&&(u=u.map(c=>c+"-"+o),r&&(u=u.concat(u.map(Td)))),u}function Us(e){const r=Ol(e);return PE[r]+e.slice(r.length)}function KE(e){return{top:0,right:0,bottom:0,left:0,...e}}function QE(e){return typeof e!="number"?KE(e):{top:e,right:e,bottom:e,left:e}}function Hs(e){const{x:r,y:l,width:i,height:o}=e;return{width:i,height:o,top:l,left:r,right:r+i,bottom:l+o,x:r,y:l}}var JE=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],qs=JE.join(","),E1=typeof Element>"u",Li=E1?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ps=!E1&&Element.prototype.getRootNode?function(e){var r;return e==null||(r=e.getRootNode)===null||r===void 0?void 0:r.call(e)}:function(e){return e?.ownerDocument},$s=function(r,l){var i;l===void 0&&(l=!0);var o=r==null||(i=r.getAttribute)===null||i===void 0?void 0:i.call(r,"inert"),u=o===""||o==="true",c=u||l&&r&&(typeof r.closest=="function"?r.closest("[inert]"):$s(r.parentNode));return c},WE=function(r){var l,i=r==null||(l=r.getAttribute)===null||l===void 0?void 0:l.call(r,"contenteditable");return i===""||i==="true"},C1=function(r,l,i){if($s(r))return[];var o=Array.prototype.slice.apply(r.querySelectorAll(qs));return l&&Li.call(r,qs)&&o.unshift(r),o=o.filter(i),o},Vs=function(r,l,i){for(var o=[],u=Array.from(r);u.length;){var c=u.shift();if(!$s(c,!1))if(c.tagName==="SLOT"){var f=c.assignedElements(),h=f.length?f:c.children,p=Vs(h,!0,i);i.flatten?o.push.apply(o,p):o.push({scopeParent:c,candidates:p})}else{var m=Li.call(c,qs);m&&i.filter(c)&&(l||!r.includes(c))&&o.push(c);var b=c.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(c),v=!$s(b,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(c));if(b&&v){var x=Vs(b===!0?c.children:b.children,!0,i);i.flatten?o.push.apply(o,x):o.push({scopeParent:c,candidates:x})}else u.unshift.apply(u,c.children)}}return o},N1=function(r){return!isNaN(parseInt(r.getAttribute("tabindex"),10))},A1=function(r){if(!r)throw new Error("No node provided");return r.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(r.tagName)||WE(r))&&!N1(r)?0:r.tabIndex},eC=function(r,l){var i=A1(r);return i<0&&l&&!N1(r)?0:i},tC=function(r,l){return r.tabIndex===l.tabIndex?r.documentOrder-l.documentOrder:r.tabIndex-l.tabIndex},T1=function(r){return r.tagName==="INPUT"},nC=function(r){return T1(r)&&r.type==="hidden"},rC=function(r){var l=r.tagName==="DETAILS"&&Array.prototype.slice.apply(r.children).some(function(i){return i.tagName==="SUMMARY"});return l},lC=function(r,l){for(var i=0;i<r.length;i++)if(r[i].checked&&r[i].form===l)return r[i]},iC=function(r){if(!r.name)return!0;var l=r.form||Ps(r),i=function(f){return l.querySelectorAll('input[type="radio"][name="'+f+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=i(window.CSS.escape(r.name));else try{o=i(r.name)}catch(c){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",c.message),!1}var u=lC(o,r.form);return!u||u===r},aC=function(r){return T1(r)&&r.type==="radio"},oC=function(r){return aC(r)&&!iC(r)},sC=function(r){var l,i=r&&Ps(r),o=(l=i)===null||l===void 0?void 0:l.host,u=!1;if(i&&i!==r){var c,f,h;for(u=!!((c=o)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(o)||r!=null&&(h=r.ownerDocument)!==null&&h!==void 0&&h.contains(r));!u&&o;){var p,m,b;i=Ps(o),o=(p=i)===null||p===void 0?void 0:p.host,u=!!((m=o)!==null&&m!==void 0&&(b=m.ownerDocument)!==null&&b!==void 0&&b.contains(o))}}return u},ry=function(r){var l=r.getBoundingClientRect(),i=l.width,o=l.height;return i===0&&o===0},uC=function(r,l){var i=l.displayCheck,o=l.getShadowRoot;if(i==="full-native"&&"checkVisibility"in r){var u=r.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!u}if(getComputedStyle(r).visibility==="hidden")return!0;var c=Li.call(r,"details>summary:first-of-type"),f=c?r.parentElement:r;if(Li.call(f,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="full-native"||i==="legacy-full"){if(typeof o=="function"){for(var h=r;r;){var p=r.parentElement,m=Ps(r);if(p&&!p.shadowRoot&&o(p)===!0)return ry(r);r.assignedSlot?r=r.assignedSlot:!p&&m!==r.ownerDocument?r=m.host:r=p}r=h}if(sC(r))return!r.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return ry(r);return!1},cC=function(r){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(r.tagName))for(var l=r.parentElement;l;){if(l.tagName==="FIELDSET"&&l.disabled){for(var i=0;i<l.children.length;i++){var o=l.children.item(i);if(o.tagName==="LEGEND")return Li.call(l,"fieldset[disabled] *")?!0:!o.contains(r)}return!0}l=l.parentElement}return!1},jd=function(r,l){return!(l.disabled||nC(l)||uC(l,r)||rC(l)||cC(l))},Rd=function(r,l){return!(oC(l)||A1(l)<0||!jd(r,l))},fC=function(r){var l=parseInt(r.getAttribute("tabindex"),10);return!!(isNaN(l)||l>=0)},j1=function(r){var l=[],i=[];return r.forEach(function(o,u){var c=!!o.scopeParent,f=c?o.scopeParent:o,h=eC(f,c),p=c?j1(o.candidates):f;h===0?c?l.push.apply(l,p):l.push(f):i.push({documentOrder:u,tabIndex:h,item:o,isScope:c,content:p})}),i.sort(tC).reduce(function(o,u){return u.isScope?o.push.apply(o,u.content):o.push(u.content),o},[]).concat(l)},gu=function(r,l){l=l||{};var i;return l.getShadowRoot?i=Vs([r],l.includeContainer,{filter:Rd.bind(null,l),flatten:!1,getShadowRoot:l.getShadowRoot,shadowRootFilter:fC}):i=C1(r,l.includeContainer,Rd.bind(null,l)),j1(i)},dC=function(r,l){l=l||{};var i;return l.getShadowRoot?i=Vs([r],l.includeContainer,{filter:jd.bind(null,l),flatten:!0,getShadowRoot:l.getShadowRoot}):i=C1(r,l.includeContainer,jd.bind(null,l)),i},R1=function(r,l){if(l=l||{},!r)throw new Error("No node provided");return Li.call(r,qs)===!1?!1:Rd(l,r)};function _1(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function L1(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(r=>{let{brand:l,version:i}=r;return l+"/"+i}).join(" "):navigator.userAgent}function D1(){return/apple/i.test(navigator.vendor)}function _d(){const e=/android/i;return e.test(_1())||e.test(L1())}function hC(){return _1().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function O1(){return L1().includes("jsdom/")}const ly="data-floating-ui-focusable",pC="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ll(e){let r=e.activeElement;for(;((l=r)==null||(l=l.shadowRoot)==null?void 0:l.activeElement)!=null;){var l;r=r.shadowRoot.activeElement}return r}function qt(e,r){if(!e||!r)return!1;const l=r.getRootNode==null?void 0:r.getRootNode();if(e.contains(r))return!0;if(l&&Fs(l)){let i=r;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Sr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function qf(e,r){if(r==null)return!1;if("composedPath"in e)return e.composedPath().includes(r);const l=e;return l.target!=null&&r.contains(l.target)}function gC(e){return e.matches("html,body")}function Pt(e){return e?.ownerDocument||document}function yh(e){return Rt(e)&&e.matches(pC)}function iy(e){return e?e.getAttribute("role")==="combobox"&&yh(e):!1}function mC(e){if(!e||O1())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ld(e){return e?e.hasAttribute(ly)?e:e.querySelector("["+ly+"]")||e:null}function Ai(e,r,l){return l===void 0&&(l=!0),e.filter(o=>{var u;return o.parentId===r&&(!l||((u=o.context)==null?void 0:u.open))}).flatMap(o=>[o,...Ai(e,o.id,l)])}function ay(e,r){var l;let i=[],o=(l=e.find(u=>u.id===r))==null?void 0:l.parentId;for(;o;){const u=e.find(c=>c.id===o);o=u?.parentId,u&&(i=i.concat(u))}return i}function Pf(e){e.preventDefault(),e.stopPropagation()}function bC(e){return"nativeEvent"in e}function yC(e){return e.mozInputSource===0&&e.isTrusted?!0:_d()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function xC(e){return O1()?!1:!_d()&&e.width===0&&e.height===0||_d()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ga(e,r){const l=["mouse","pen"];return r||l.push("",void 0),l.includes(e)}var vC=typeof document<"u",wC=function(){},sn=vC?T.useLayoutEffect:wC;const SC={...qx};function Ll(e){const r=T.useRef(e);return sn(()=>{r.current=e}),r}const kC=SC.useInsertionEffect,EC=kC||(e=>e());function on(e){const r=T.useRef(()=>{});return EC(()=>{r.current=e}),T.useCallback(function(){for(var l=arguments.length,i=new Array(l),o=0;o<l;o++)i[o]=arguments[o];return r.current==null?void 0:r.current(...i)},[])}const Wa=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function M1(e,r){const l=gu(e,Wa()),i=l.length;if(i===0)return;const o=ll(Pt(e)),u=l.indexOf(o),c=u===-1?r===1?0:i-1:u+r;return l[c]}function z1(e){return M1(Pt(e).body,1)||e}function F1(e){return M1(Pt(e).body,-1)||e}function Ba(e,r){const l=r||e.currentTarget,i=e.relatedTarget;return!i||!qt(l,i)}function CC(e){gu(e,Wa()).forEach(l=>{l.dataset.tabindex=l.getAttribute("tabindex")||"",l.setAttribute("tabindex","-1")})}function oy(e){e.querySelectorAll("[data-tabindex]").forEach(l=>{const i=l.dataset.tabindex;delete l.dataset.tabindex,i?l.setAttribute("tabindex",i):l.removeAttribute("tabindex")})}var B1=Px();function sy(e,r,l){let{reference:i,floating:o}=e;const u=il(r),c=k1(r),f=S1(c),h=Ol(r),p=u==="y",m=i.x+i.width/2-o.width/2,b=i.y+i.height/2-o.height/2,v=i[f]/2-o[f]/2;let x;switch(h){case"top":x={x:m,y:i.y-o.height};break;case"bottom":x={x:m,y:i.y+i.height};break;case"right":x={x:i.x+i.width,y:b};break;case"left":x={x:i.x-o.width,y:b};break;default:x={x:i.x,y:i.y}}switch(pu(r)){case"start":x[c]-=v*(l&&p?-1:1);break;case"end":x[c]+=v*(l&&p?-1:1);break}return x}async function NC(e,r){var l;r===void 0&&(r={});const{x:i,y:o,platform:u,rects:c,elements:f,strategy:h}=e,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:b="floating",altBoundary:v=!1,padding:x=0}=hu(r,e),S=QE(x),N=f[v?b==="floating"?"reference":"floating":b],E=Hs(await u.getClippingRect({element:(l=await(u.isElement==null?void 0:u.isElement(N)))==null||l?N:N.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(f.floating)),boundary:p,rootBoundary:m,strategy:h})),C=b==="floating"?{x:i,y:o,width:c.floating.width,height:c.floating.height}:c.reference,j=await(u.getOffsetParent==null?void 0:u.getOffsetParent(f.floating)),z=await(u.isElement==null?void 0:u.isElement(j))?await(u.getScale==null?void 0:u.getScale(j))||{x:1,y:1}:{x:1,y:1},I=Hs(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:C,offsetParent:j,strategy:h}):C);return{top:(E.top-I.top+S.top)/z.y,bottom:(I.bottom-E.bottom+S.bottom)/z.y,left:(E.left-I.left+S.left)/z.x,right:(I.right-E.right+S.right)/z.x}}const AC=50,TC=async(e,r,l)=>{const{placement:i="bottom",strategy:o="absolute",middleware:u=[],platform:c}=l,f=c.detectOverflow?c:{...c,detectOverflow:NC},h=await(c.isRTL==null?void 0:c.isRTL(r));let p=await c.getElementRects({reference:e,floating:r,strategy:o}),{x:m,y:b}=sy(p,i,h),v=i,x=0;const S={};for(let w=0;w<u.length;w++){const N=u[w];if(!N)continue;const{name:E,fn:C}=N,{x:j,y:z,data:I,reset:L}=await C({x:m,y:b,initialPlacement:i,placement:v,strategy:o,middlewareData:S,rects:p,platform:f,elements:{reference:e,floating:r}});m=j??m,b=z??b,S[E]={...S[E],...I},L&&x<AC&&(x++,typeof L=="object"&&(L.placement&&(v=L.placement),L.rects&&(p=L.rects===!0?await c.getElementRects({reference:e,floating:r,strategy:o}):L.rects),{x:m,y:b}=sy(p,v,h)),w=-1)}return{x:m,y:b,placement:v,strategy:o,middlewareData:S}},jC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var l,i;const{placement:o,middlewareData:u,rects:c,initialPlacement:f,platform:h,elements:p}=r,{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:v,fallbackStrategy:x="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0,...N}=hu(e,r);if((l=u.arrow)!=null&&l.alignmentOffset)return{};const E=Ol(o),C=il(f),j=Ol(f)===f,z=await(h.isRTL==null?void 0:h.isRTL(p.floating)),I=v||(j||!w?[Us(f)]:VE(f)),L=S!=="none";!v&&L&&I.push(...ZE(f,w,S,z));const O=[f,...I],Z=await h.detectOverflow(r,N),P=[];let F=((i=u.flip)==null?void 0:i.overflows)||[];if(m&&P.push(Z[E]),b){const U=$E(o,c,z);P.push(Z[U[0]],Z[U[1]])}if(F=[...F,{placement:o,overflows:P}],!P.every(U=>U<=0)){var H,G;const U=(((H=u.flip)==null?void 0:H.index)||0)+1,Y=O[U];if(Y&&(!(b==="alignment"?C!==il(Y):!1)||F.every(M=>il(M.placement)===C?M.overflows[0]>0:!0)))return{data:{index:U,overflows:F},reset:{placement:Y}};let B=(G=F.filter(X=>X.overflows[0]<=0).sort((X,M)=>X.overflows[1]-M.overflows[1])[0])==null?void 0:G.placement;if(!B)switch(x){case"bestFit":{var Q;const X=(Q=F.filter(M=>{if(L){const V=il(M.placement);return V===C||V==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(V=>V>0).reduce((V,R)=>V+R,0)]).sort((M,V)=>M[1]-V[1])[0])==null?void 0:Q[0];X&&(B=X);break}case"initialPlacement":B=f;break}if(o!==B)return{reset:{placement:B}}}return{}}}},RC=new Set(["left","top"]);async function _C(e,r){const{placement:l,platform:i,elements:o}=e,u=await(i.isRTL==null?void 0:i.isRTL(o.floating)),c=Ol(l),f=pu(l),h=il(l)==="y",p=RC.has(c)?-1:1,m=u&&h?-1:1,b=hu(r,e);let{mainAxis:v,crossAxis:x,alignmentAxis:S}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return f&&typeof S=="number"&&(x=f==="end"?S*-1:S),h?{x:x*m,y:v*p}:{x:v*p,y:x*m}}const LC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var l,i;const{x:o,y:u,placement:c,middlewareData:f}=r,h=await _C(r,e);return c===((l=f.offset)==null?void 0:l.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:o+h.x,y:u+h.y,data:{...h,placement:c}}}}},DC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:l,y:i,placement:o,platform:u}=r,{mainAxis:c=!0,crossAxis:f=!1,limiter:h={fn:E=>{let{x:C,y:j}=E;return{x:C,y:j}}},...p}=hu(e,r),m={x:l,y:i},b=await u.detectOverflow(r,p),v=il(Ol(o)),x=w1(v);let S=m[x],w=m[v];if(c){const E=x==="y"?"top":"left",C=x==="y"?"bottom":"right",j=S+b[E],z=S-b[C];S=ey(j,S,z)}if(f){const E=v==="y"?"top":"left",C=v==="y"?"bottom":"right",j=w+b[E],z=w-b[C];w=ey(j,w,z)}const N=h.fn({...r,[x]:S,[v]:w});return{...N,data:{x:N.x-l,y:N.y-i,enabled:{[x]:c,[v]:f}}}}}};function I1(e){const r=Mn(e);let l=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const o=Rt(e),u=o?e.offsetWidth:l,c=o?e.offsetHeight:i,f=Is(l)!==u||Is(i)!==c;return f&&(l=u,i=c),{width:l,height:i,$:f}}function xh(e){return ct(e)?e:e.contextElement}function Ti(e){const r=xh(e);if(!Rt(r))return Wn(1);const l=r.getBoundingClientRect(),{width:i,height:o,$:u}=I1(r);let c=(u?Is(l.width):l.width)/i,f=(u?Is(l.height):l.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const OC=Wn(0);function U1(e){const r=un(e);return!fu()||!r.visualViewport?OC:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function MC(e,r,l){return r===void 0&&(r=!1),!l||r&&l!==un(e)?!1:r}function Ml(e,r,l,i){r===void 0&&(r=!1),l===void 0&&(l=!1);const o=e.getBoundingClientRect(),u=xh(e);let c=Wn(1);r&&(i?ct(i)&&(c=Ti(i)):c=Ti(e));const f=MC(u,l,i)?U1(u):Wn(0);let h=(o.left+f.x)/c.x,p=(o.top+f.y)/c.y,m=o.width/c.x,b=o.height/c.y;if(u){const v=un(u),x=i&&ct(i)?un(i):i;let S=v,w=Ad(S);for(;w&&i&&x!==S;){const N=Ti(w),E=w.getBoundingClientRect(),C=Mn(w),j=E.left+(w.clientLeft+parseFloat(C.paddingLeft))*N.x,z=E.top+(w.clientTop+parseFloat(C.paddingTop))*N.y;h*=N.x,p*=N.y,m*=N.x,b*=N.y,h+=j,p+=z,S=un(w),w=Ad(S)}}return Hs({width:m,height:b,x:h,y:p})}function mu(e,r){const l=du(e).scrollLeft;return r?r.left+l:Ml(er(e)).left+l}function H1(e,r){const l=e.getBoundingClientRect(),i=l.left+r.scrollLeft-mu(e,l),o=l.top+r.scrollTop;return{x:i,y:o}}function zC(e){let{elements:r,rect:l,offsetParent:i,strategy:o}=e;const u=o==="fixed",c=er(i),f=r?cu(r.floating):!1;if(i===c||f&&u)return l;let h={scrollLeft:0,scrollTop:0},p=Wn(1);const m=Wn(0),b=Rt(i);if((b||!b&&!u)&&((ul(i)!=="body"||Ja(c))&&(h=du(i)),b)){const x=Ml(i);p=Ti(i),m.x=x.x+i.clientLeft,m.y=x.y+i.clientTop}const v=c&&!b&&!u?H1(c,h):Wn(0);return{width:l.width*p.x,height:l.height*p.y,x:l.x*p.x-h.scrollLeft*p.x+m.x+v.x,y:l.y*p.y-h.scrollTop*p.y+m.y+v.y}}function FC(e){return Array.from(e.getClientRects())}function BC(e){const r=er(e),l=du(e),i=e.ownerDocument.body,o=Dl(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),u=Dl(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let c=-l.scrollLeft+mu(e);const f=-l.scrollTop;return Mn(i).direction==="rtl"&&(c+=Dl(r.clientWidth,i.clientWidth)-o),{width:o,height:u,x:c,y:f}}const uy=25;function IC(e,r){const l=un(e),i=er(e),o=l.visualViewport;let u=i.clientWidth,c=i.clientHeight,f=0,h=0;if(o){u=o.width,c=o.height;const m=fu();(!m||m&&r==="fixed")&&(f=o.offsetLeft,h=o.offsetTop)}const p=mu(i);if(p<=0){const m=i.ownerDocument,b=m.body,v=getComputedStyle(b),x=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,S=Math.abs(i.clientWidth-b.clientWidth-x);S<=uy&&(u-=S)}else p<=uy&&(u+=p);return{width:u,height:c,x:f,y:h}}function UC(e,r){const l=Ml(e,!0,r==="fixed"),i=l.top+e.clientTop,o=l.left+e.clientLeft,u=Rt(e)?Ti(e):Wn(1),c=e.clientWidth*u.x,f=e.clientHeight*u.y,h=o*u.x,p=i*u.y;return{width:c,height:f,x:h,y:p}}function cy(e,r,l){let i;if(r==="viewport")i=IC(e,l);else if(r==="document")i=BC(er(e));else if(ct(r))i=UC(r,l);else{const o=U1(e);i={x:r.x-o.x,y:r.y-o.y,width:r.width,height:r.height}}return Hs(i)}function q1(e,r){const l=Cr(e);return l===r||!ct(l)||Er(l)?!1:Mn(l).position==="fixed"||q1(l,r)}function HC(e,r){const l=r.get(e);if(l)return l;let i=sl(e,[],!1).filter(f=>ct(f)&&ul(f)!=="body"),o=null;const u=Mn(e).position==="fixed";let c=u?Cr(e):e;for(;ct(c)&&!Er(c);){const f=Mn(c),h=bh(c);!h&&f.position==="fixed"&&(o=null),(u?!h&&!o:!h&&f.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ja(c)&&!h&&q1(e,c))?i=i.filter(m=>m!==c):o=f,c=Cr(c)}return r.set(e,i),i}function qC(e){let{element:r,boundary:l,rootBoundary:i,strategy:o}=e;const c=[...l==="clippingAncestors"?cu(r)?[]:HC(r,this._c):[].concat(l),i],f=cy(r,c[0],o);let h=f.top,p=f.right,m=f.bottom,b=f.left;for(let v=1;v<c.length;v++){const x=cy(r,c[v],o);h=Dl(x.top,h),p=Bs(x.right,p),m=Bs(x.bottom,m),b=Dl(x.left,b)}return{width:p-b,height:m-h,x:b,y:h}}function PC(e){const{width:r,height:l}=I1(e);return{width:r,height:l}}function $C(e,r,l){const i=Rt(r),o=er(r),u=l==="fixed",c=Ml(e,!0,u,r);let f={scrollLeft:0,scrollTop:0};const h=Wn(0);function p(){h.x=mu(o)}if(i||!i&&!u)if((ul(r)!=="body"||Ja(o))&&(f=du(r)),i){const x=Ml(r,!0,u,r);h.x=x.x+r.clientLeft,h.y=x.y+r.clientTop}else o&&p();u&&!i&&o&&p();const m=o&&!i&&!u?H1(o,f):Wn(0),b=c.left+f.scrollLeft-h.x-m.x,v=c.top+f.scrollTop-h.y-m.y;return{x:b,y:v,width:c.width,height:c.height}}function $f(e){return Mn(e).position==="static"}function fy(e,r){if(!Rt(e)||Mn(e).position==="fixed")return null;if(r)return r(e);let l=e.offsetParent;return er(e)===l&&(l=l.ownerDocument.body),l}function P1(e,r){const l=un(e);if(cu(e))return l;if(!Rt(e)){let o=Cr(e);for(;o&&!Er(o);){if(ct(o)&&!$f(o))return o;o=Cr(o)}return l}let i=fy(e,r);for(;i&&IE(i)&&$f(i);)i=fy(i,r);return i&&Er(i)&&$f(i)&&!bh(i)?l:i||qE(e)||l}const VC=async function(e){const r=this.getOffsetParent||P1,l=this.getDimensions,i=await l(e.floating);return{reference:$C(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function GC(e){return Mn(e).direction==="rtl"}const YC={convertOffsetParentRelativeRectToViewportRelativeRect:zC,getDocumentElement:er,getClippingRect:qC,getOffsetParent:P1,getElementRects:VC,getClientRects:FC,getDimensions:PC,getScale:Ti,isElement:ct,isRTL:GC};function $1(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function XC(e,r){let l=null,i;const o=er(e);function u(){var f;clearTimeout(i),(f=l)==null||f.disconnect(),l=null}function c(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),u();const p=e.getBoundingClientRect(),{left:m,top:b,width:v,height:x}=p;if(f||r(),!v||!x)return;const S=Ss(b),w=Ss(o.clientWidth-(m+v)),N=Ss(o.clientHeight-(b+x)),E=Ss(m),j={rootMargin:-S+"px "+-w+"px "+-N+"px "+-E+"px",threshold:Dl(0,Bs(1,h))||1};let z=!0;function I(L){const O=L[0].intersectionRatio;if(O!==h){if(!z)return c();O?c(!1,O):i=setTimeout(()=>{c(!1,1e-7)},1e3)}O===1&&!$1(p,e.getBoundingClientRect())&&c(),z=!1}try{l=new IntersectionObserver(I,{...j,root:o.ownerDocument})}catch{l=new IntersectionObserver(I,j)}l.observe(e)}return c(!0),u}function Dd(e,r,l,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:u=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,p=xh(e),m=o||u?[...p?sl(p):[],...r?sl(r):[]]:[];m.forEach(E=>{o&&E.addEventListener("scroll",l,{passive:!0}),u&&E.addEventListener("resize",l)});const b=p&&f?XC(p,l):null;let v=-1,x=null;c&&(x=new ResizeObserver(E=>{let[C]=E;C&&C.target===p&&x&&r&&(x.unobserve(r),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var j;(j=x)==null||j.observe(r)})),l()}),p&&!h&&x.observe(p),r&&x.observe(r));let S,w=h?Ml(e):null;h&&N();function N(){const E=Ml(e);w&&!$1(w,E)&&l(),w=E,S=requestAnimationFrame(N)}return l(),()=>{var E;m.forEach(C=>{o&&C.removeEventListener("scroll",l),u&&C.removeEventListener("resize",l)}),b?.(),(E=x)==null||E.disconnect(),x=null,h&&cancelAnimationFrame(S)}}const ZC=LC,KC=DC,QC=jC,JC=(e,r,l)=>{const i=new Map,o={platform:YC,...l},u={...o.platform,_c:i};return TC(e,r,{...o,platform:u})};var WC=typeof document<"u",e3=function(){},Ls=WC?T.useLayoutEffect:e3;function Gs(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let l,i,o;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(l=e.length,l!==r.length)return!1;for(i=l;i--!==0;)if(!Gs(e[i],r[i]))return!1;return!0}if(o=Object.keys(e),l=o.length,l!==Object.keys(r).length)return!1;for(i=l;i--!==0;)if(!{}.hasOwnProperty.call(r,o[i]))return!1;for(i=l;i--!==0;){const u=o[i];if(!(u==="_owner"&&e.$$typeof)&&!Gs(e[u],r[u]))return!1}return!0}return e!==e&&r!==r}function V1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dy(e,r){const l=V1(e);return Math.round(r*l)/l}function Vf(e){const r=T.useRef(e);return Ls(()=>{r.current=e}),r}function t3(e){e===void 0&&(e={});const{placement:r="bottom",strategy:l="absolute",middleware:i=[],platform:o,elements:{reference:u,floating:c}={},transform:f=!0,whileElementsMounted:h,open:p}=e,[m,b]=T.useState({x:0,y:0,strategy:l,placement:r,middlewareData:{},isPositioned:!1}),[v,x]=T.useState(i);Gs(v,i)||x(i);const[S,w]=T.useState(null),[N,E]=T.useState(null),C=T.useCallback(M=>{M!==L.current&&(L.current=M,w(M))},[]),j=T.useCallback(M=>{M!==O.current&&(O.current=M,E(M))},[]),z=u||S,I=c||N,L=T.useRef(null),O=T.useRef(null),Z=T.useRef(m),P=h!=null,F=Vf(h),H=Vf(o),G=Vf(p),Q=T.useCallback(()=>{if(!L.current||!O.current)return;const M={placement:r,strategy:l,middleware:v};H.current&&(M.platform=H.current),JC(L.current,O.current,M).then(V=>{const R={...V,isPositioned:G.current!==!1};U.current&&!Gs(Z.current,R)&&(Z.current=R,B1.flushSync(()=>{b(R)}))})},[v,r,l,H,G]);Ls(()=>{p===!1&&Z.current.isPositioned&&(Z.current.isPositioned=!1,b(M=>({...M,isPositioned:!1})))},[p]);const U=T.useRef(!1);Ls(()=>(U.current=!0,()=>{U.current=!1}),[]),Ls(()=>{if(z&&(L.current=z),I&&(O.current=I),z&&I){if(F.current)return F.current(z,I,Q);Q()}},[z,I,Q,F,P]);const Y=T.useMemo(()=>({reference:L,floating:O,setReference:C,setFloating:j}),[C,j]),B=T.useMemo(()=>({reference:z,floating:I}),[z,I]),X=T.useMemo(()=>{const M={position:l,left:0,top:0};if(!B.floating)return M;const V=dy(B.floating,m.x),R=dy(B.floating,m.y);return f?{...M,transform:"translate("+V+"px, "+R+"px)",...V1(B.floating)>=1.5&&{willChange:"transform"}}:{position:l,left:V,top:R}},[l,f,B.floating,m.x,m.y]);return T.useMemo(()=>({...m,update:Q,refs:Y,elements:B,floatingStyles:X}),[m,Q,Y,B,X])}const Od=(e,r)=>{const l=ZC(e);return{name:l.name,fn:l.fn,options:[e,r]}},Md=(e,r)=>{const l=KC(e);return{name:l.name,fn:l.fn,options:[e,r]}},zd=(e,r)=>{const l=QC(e);return{name:l.name,fn:l.fn,options:[e,r]}},n3="data-floating-ui-focusable",hy="active",py="selected",r3={...qx};let gy=!1,l3=0;const my=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+l3++;function i3(){const[e,r]=T.useState(()=>gy?my():void 0);return sn(()=>{e==null&&r(my())},[]),T.useEffect(()=>{gy=!0},[]),e}const a3=r3.useId,vh=a3||i3;function o3(){const e=new Map;return{emit(r,l){var i;(i=e.get(r))==null||i.forEach(o=>o(l))},on(r,l){e.has(r)||e.set(r,new Set),e.get(r).add(l)},off(r,l){var i;(i=e.get(r))==null||i.delete(l)}}}const s3=T.createContext(null),u3=T.createContext(null),wh=()=>{var e;return((e=T.useContext(s3))==null?void 0:e.id)||null},bu=()=>T.useContext(u3);function zl(e){return"data-floating-ui-"+e}function Zt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const by=zl("safe-polygon");function Gf(e,r,l){if(l&&!Ga(l))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const i=e();return typeof i=="number"?i:i?.[r]}return e?.[r]}function Yf(e){return typeof e=="function"?e():e}function Fd(e,r){r===void 0&&(r={});const{open:l,onOpenChange:i,dataRef:o,events:u,elements:c}=e,{enabled:f=!0,delay:h=0,handleClose:p=null,mouseOnly:m=!1,restMs:b=0,move:v=!0}=r,x=bu(),S=wh(),w=Ll(p),N=Ll(h),E=Ll(l),C=Ll(b),j=T.useRef(),z=T.useRef(-1),I=T.useRef(),L=T.useRef(-1),O=T.useRef(!0),Z=T.useRef(!1),P=T.useRef(()=>{}),F=T.useRef(!1),H=on(()=>{var X;const M=(X=o.current.openEvent)==null?void 0:X.type;return M?.includes("mouse")&&M!=="mousedown"});T.useEffect(()=>{if(!f)return;function X(M){let{open:V}=M;V||(Zt(z),Zt(L),O.current=!0,F.current=!1)}return u.on("openchange",X),()=>{u.off("openchange",X)}},[f,u]),T.useEffect(()=>{if(!f||!w.current||!l)return;function X(V){H()&&i(!1,V,"hover")}const M=Pt(c.floating).documentElement;return M.addEventListener("mouseleave",X),()=>{M.removeEventListener("mouseleave",X)}},[c.floating,l,i,f,w,H]);const G=T.useCallback(function(X,M,V){M===void 0&&(M=!0),V===void 0&&(V="hover");const R=Gf(N.current,"close",j.current);R&&!I.current?(Zt(z),z.current=window.setTimeout(()=>i(!1,X,V),R)):M&&(Zt(z),i(!1,X,V))},[N,i]),Q=on(()=>{P.current(),I.current=void 0}),U=on(()=>{if(Z.current){const X=Pt(c.floating).body;X.style.pointerEvents="",X.removeAttribute(by),Z.current=!1}}),Y=on(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);T.useEffect(()=>{if(!f)return;function X(q){if(Zt(z),O.current=!1,m&&!Ga(j.current)||Yf(C.current)>0&&!Gf(N.current,"open"))return;const A=Gf(N.current,"open",j.current);A?z.current=window.setTimeout(()=>{E.current||i(!0,q,"hover")},A):l||i(!0,q,"hover")}function M(q){if(Y()){U();return}P.current();const A=Pt(c.floating);if(Zt(L),F.current=!1,w.current&&o.current.floatingContext){l||Zt(z),I.current=w.current({...o.current.floatingContext,tree:x,x:q.clientX,y:q.clientY,onClose(){U(),Q(),Y()||G(q,!0,"safe-polygon")}});const le=I.current;A.addEventListener("mousemove",le),P.current=()=>{A.removeEventListener("mousemove",le)};return}(j.current!=="touch"||!qt(c.floating,q.relatedTarget))&&G(q)}function V(q){Y()||o.current.floatingContext&&(w.current==null||w.current({...o.current.floatingContext,tree:x,x:q.clientX,y:q.clientY,onClose(){U(),Q(),Y()||G(q)}})(q))}function R(){Zt(z)}function D(q){Y()||G(q,!1)}if(ct(c.domReference)){const q=c.domReference,A=c.floating;return l&&q.addEventListener("mouseleave",V),v&&q.addEventListener("mousemove",X,{once:!0}),q.addEventListener("mouseenter",X),q.addEventListener("mouseleave",M),A&&(A.addEventListener("mouseleave",V),A.addEventListener("mouseenter",R),A.addEventListener("mouseleave",D)),()=>{l&&q.removeEventListener("mouseleave",V),v&&q.removeEventListener("mousemove",X),q.removeEventListener("mouseenter",X),q.removeEventListener("mouseleave",M),A&&(A.removeEventListener("mouseleave",V),A.removeEventListener("mouseenter",R),A.removeEventListener("mouseleave",D))}}},[c,f,e,m,v,G,Q,U,i,l,E,x,N,w,o,Y,C]),sn(()=>{var X;if(f&&l&&(X=w.current)!=null&&(X=X.__options)!=null&&X.blockPointerEvents&&H()){Z.current=!0;const V=c.floating;if(ct(c.domReference)&&V){var M;const R=Pt(c.floating).body;R.setAttribute(by,"");const D=c.domReference,q=x==null||(M=x.nodesRef.current.find(A=>A.id===S))==null||(M=M.context)==null?void 0:M.elements.floating;return q&&(q.style.pointerEvents=""),R.style.pointerEvents="none",D.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{R.style.pointerEvents="",D.style.pointerEvents="",V.style.pointerEvents=""}}}},[f,l,S,c,x,w,H]),sn(()=>{l||(j.current=void 0,F.current=!1,Q(),U())},[l,Q,U]),T.useEffect(()=>()=>{Q(),Zt(z),Zt(L),U()},[f,c.domReference,Q,U]);const B=T.useMemo(()=>{function X(M){j.current=M.pointerType}return{onPointerDown:X,onPointerEnter:X,onMouseMove(M){const{nativeEvent:V}=M;function R(){!O.current&&!E.current&&i(!0,V,"hover")}m&&!Ga(j.current)||l||Yf(C.current)===0||F.current&&M.movementX**2+M.movementY**2<2||(Zt(L),j.current==="touch"?R():(F.current=!0,L.current=window.setTimeout(R,Yf(C.current))))}}},[m,i,l,E,C]);return T.useMemo(()=>f?{reference:B}:{},[f,B])}let yy=0;function wi(e,r){r===void 0&&(r={});const{preventScroll:l=!1,cancelPrevious:i=!0,sync:o=!1}=r;i&&cancelAnimationFrame(yy);const u=()=>e?.focus({preventScroll:l});o?u():yy=requestAnimationFrame(u)}function Xf(e,r){if(!e||!r)return!1;const l=r.getRootNode==null?void 0:r.getRootNode();if(e.contains(r))return!0;if(l&&Fs(l)){let i=r;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function c3(e){return"composedPath"in e?e.composedPath()[0]:e.target}function f3(e){return e?.ownerDocument||document}const ji={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function xy(e){return e==="inert"?ji.inert:e==="aria-hidden"?ji["aria-hidden"]:ji.none}let ks=new WeakSet,Es={},Zf=0;const d3=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,G1=e=>e&&(e.host||G1(e.parentNode)),h3=(e,r)=>r.map(l=>{if(e.contains(l))return l;const i=G1(l);return e.contains(i)?i:null}).filter(l=>l!=null);function p3(e,r,l,i){const o="data-floating-ui-inert",u=i?"inert":l?"aria-hidden":null,c=h3(r,e),f=new Set,h=new Set(c),p=[];Es[o]||(Es[o]=new WeakMap);const m=Es[o];c.forEach(b),v(r),f.clear();function b(x){!x||f.has(x)||(f.add(x),x.parentNode&&b(x.parentNode))}function v(x){!x||h.has(x)||[].forEach.call(x.children,S=>{if(ul(S)!=="script")if(f.has(S))v(S);else{const w=u?S.getAttribute(u):null,N=w!==null&&w!=="false",E=xy(u),C=(E.get(S)||0)+1,j=(m.get(S)||0)+1;E.set(S,C),m.set(S,j),p.push(S),C===1&&N&&ks.add(S),j===1&&S.setAttribute(o,""),!N&&u&&S.setAttribute(u,u==="inert"?"":"true")}})}return Zf++,()=>{p.forEach(x=>{const S=xy(u),N=(S.get(x)||0)-1,E=(m.get(x)||0)-1;S.set(x,N),m.set(x,E),N||(!ks.has(x)&&u&&x.removeAttribute(u),ks.delete(x)),E||x.removeAttribute(o)}),Zf--,Zf||(ji.inert=new WeakMap,ji["aria-hidden"]=new WeakMap,ji.none=new WeakMap,ks=new WeakSet,Es={})}}function vy(e,r,l){r===void 0&&(r=!1),l===void 0&&(l=!1);const i=f3(e[0]).body;return p3(e.concat(Array.from(i.querySelectorAll('[aria-live],[role="status"],output'))),i,r,l)}const Sh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Ys=T.forwardRef(function(r,l){const[i,o]=T.useState();sn(()=>{D1()&&o("button")},[]);const u={ref:l,tabIndex:0,role:i,"aria-hidden":i?void 0:!0,[zl("focus-guard")]:"",style:Sh};return y.jsx("span",{...r,...u})}),g3={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Y1=T.createContext(null),wy=zl("portal");function m3(e){e===void 0&&(e={});const{id:r,root:l}=e,i=vh(),o=X1(),[u,c]=T.useState(null),f=T.useRef(null);return sn(()=>()=>{u?.remove(),queueMicrotask(()=>{f.current=null})},[u]),sn(()=>{if(!i||f.current)return;const h=r?document.getElementById(r):null;if(!h)return;const p=document.createElement("div");p.id=i,p.setAttribute(wy,""),h.appendChild(p),f.current=p,c(p)},[r,i]),sn(()=>{if(l===null||!i||f.current)return;let h=l||o?.portalNode;h&&!mh(h)&&(h=h.current),h=h||document.body;let p=null;r&&(p=document.createElement("div"),p.id=r,h.appendChild(p));const m=document.createElement("div");m.id=i,m.setAttribute(wy,""),h=p||h,h.appendChild(m),f.current=m,c(m)},[r,l,i,o]),u}function Bd(e){const{children:r,id:l,root:i,preserveTabOrder:o=!0}=e,u=m3({id:l,root:i}),[c,f]=T.useState(null),h=T.useRef(null),p=T.useRef(null),m=T.useRef(null),b=T.useRef(null),v=c?.modal,x=c?.open,S=!!c&&!c.modal&&c.open&&o&&!!(i||u);return T.useEffect(()=>{if(!u||!o||v)return;function w(N){u&&Ba(N)&&(N.type==="focusin"?oy:CC)(u)}return u.addEventListener("focusin",w,!0),u.addEventListener("focusout",w,!0),()=>{u.removeEventListener("focusin",w,!0),u.removeEventListener("focusout",w,!0)}},[u,o,v]),T.useEffect(()=>{u&&(x||oy(u))},[x,u]),y.jsxs(Y1.Provider,{value:T.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:h,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:b,portalNode:u,setFocusManagerState:f}),[o,u]),children:[S&&u&&y.jsx(Ys,{"data-type":"outside",ref:h,onFocus:w=>{if(Ba(w,u)){var N;(N=m.current)==null||N.focus()}else{const E=c?c.domReference:null,C=F1(E);C?.focus()}}}),S&&u&&y.jsx("span",{"aria-owns":u.id,style:g3}),u&&B1.createPortal(r,u),S&&u&&y.jsx(Ys,{"data-type":"outside",ref:p,onFocus:w=>{if(Ba(w,u)){var N;(N=b.current)==null||N.focus()}else{const E=c?c.domReference:null,C=z1(E);C?.focus(),c?.closeOnFocusOut&&c?.onOpenChange(!1,w.nativeEvent,"focus-out")}}})]})}const X1=()=>T.useContext(Y1);function Sy(e){return T.useMemo(()=>r=>{e.forEach(l=>{l&&(l.current=r)})},e)}const b3=20;let al=[];function kh(){al=al.filter(e=>{var r;return(r=e.deref())==null?void 0:r.isConnected})}function y3(e){kh(),e&&ul(e)!=="body"&&(al.push(new WeakRef(e)),al.length>b3&&(al=al.slice(-20)))}function ky(){kh();const e=al[al.length-1];return e?.deref()}function x3(e){const r=Wa();return R1(e,r)?e:gu(e,r)[0]||e}function Ey(e,r){var l;if(!r.current.includes("floating")&&!((l=e.getAttribute("role"))!=null&&l.includes("dialog")))return;const i=Wa(),u=dC(e,i).filter(f=>{const h=f.getAttribute("data-tabindex")||"";return R1(f,i)||f.hasAttribute("data-tabindex")&&!h.startsWith("-")}),c=e.getAttribute("tabindex");r.current.includes("floating")||u.length===0?c!=="0"&&e.setAttribute("tabindex","0"):(c!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const v3=T.forwardRef(function(r,l){return y.jsx("button",{...r,type:"button",ref:l,tabIndex:-1,style:Sh})});function w3(e){const{context:r,children:l,disabled:i=!1,order:o=["content"],guards:u=!0,initialFocus:c=0,returnFocus:f=!0,restoreFocus:h=!1,modal:p=!0,visuallyHiddenDismiss:m=!1,closeOnFocusOut:b=!0,outsideElementsInert:v=!1,getInsideElements:x=()=>[]}=e,{open:S,onOpenChange:w,events:N,dataRef:E,elements:{domReference:C,floating:j}}=r,z=on(()=>{var de;return(de=E.current.floatingContext)==null?void 0:de.nodeId}),I=on(x),L=typeof c=="number"&&c<0,O=iy(C)&&L,Z=d3(),P=Z?u:!0,F=!P||Z&&v,H=Ll(o),G=Ll(c),Q=Ll(f),U=bu(),Y=X1(),B=T.useRef(null),X=T.useRef(null),M=T.useRef(!1),V=T.useRef(!1),R=T.useRef(-1),D=T.useRef(-1),q=Y!=null,A=Ld(j),te=on(function(de){return de===void 0&&(de=A),de?gu(de,Wa()):[]}),le=on(de=>{const we=te(de);return H.current.map(Ee=>C&&Ee==="reference"?C:A&&Ee==="floating"?A:we).filter(Boolean).flat()});T.useEffect(()=>{if(i||!p)return;function de(Ee){if(Ee.key==="Tab"){qt(A,ll(Pt(A)))&&te().length===0&&!O&&Pf(Ee);const $e=le(),Ke=Sr(Ee);H.current[0]==="reference"&&Ke===C&&(Pf(Ee),Ee.shiftKey?wi($e[$e.length-1]):wi($e[1])),H.current[1]==="floating"&&Ke===A&&Ee.shiftKey&&(Pf(Ee),wi($e[0]))}}const we=Pt(A);return we.addEventListener("keydown",de),()=>{we.removeEventListener("keydown",de)}},[i,C,A,p,H,O,te,le]),T.useEffect(()=>{if(i||!j)return;function de(we){const Ee=Sr(we),Ke=te().indexOf(Ee);Ke!==-1&&(R.current=Ke)}return j.addEventListener("focusin",de),()=>{j.removeEventListener("focusin",de)}},[i,j,te]),T.useEffect(()=>{if(i||!b)return;function de(){V.current=!0,setTimeout(()=>{V.current=!1})}function we(Ke){const Me=Ke.relatedTarget,Bt=Ke.currentTarget,pt=Sr(Ke);queueMicrotask(()=>{const gt=z(),Gt=!(qt(C,Me)||qt(j,Me)||qt(Me,j)||qt(Y?.portalNode,Me)||Me!=null&&Me.hasAttribute(zl("focus-guard"))||U&&(Ai(U.nodesRef.current,gt).find(Yt=>{var tt,at;return qt((tt=Yt.context)==null?void 0:tt.elements.floating,Me)||qt((at=Yt.context)==null?void 0:at.elements.domReference,Me)})||ay(U.nodesRef.current,gt).find(Yt=>{var tt,at,nr;return[(tt=Yt.context)==null?void 0:tt.elements.floating,Ld((at=Yt.context)==null?void 0:at.elements.floating)].includes(Me)||((nr=Yt.context)==null?void 0:nr.elements.domReference)===Me})));if(Bt===C&&A&&Ey(A,H),h&&Bt!==C&&!(pt!=null&&pt.isConnected)&&ll(Pt(A))===Pt(A).body){Rt(A)&&A.focus();const Yt=R.current,tt=te(),at=tt[Yt]||tt[tt.length-1]||A;Rt(at)&&at.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}(O||!p)&&Me&&Gt&&!V.current&&Me!==ky()&&(M.current=!0,w(!1,Ke,"focus-out"))})}const Ee=!!(!U&&Y);function $e(){Zt(D),E.current.insideReactTree=!0,D.current=window.setTimeout(()=>{E.current.insideReactTree=!1})}if(j&&Rt(C))return C.addEventListener("focusout",we),C.addEventListener("pointerdown",de),j.addEventListener("focusout",we),Ee&&j.addEventListener("focusout",$e,!0),()=>{C.removeEventListener("focusout",we),C.removeEventListener("pointerdown",de),j.removeEventListener("focusout",we),Ee&&j.removeEventListener("focusout",$e,!0)}},[i,C,j,A,p,U,Y,w,b,h,te,O,z,H,E]);const fe=T.useRef(null),me=T.useRef(null),ye=Sy([fe,Y?.beforeInsideRef]),pe=Sy([me,Y?.afterInsideRef]);T.useEffect(()=>{var de,we;if(i||!j)return;const Ee=Array.from((Y==null||(de=Y.portalNode)==null?void 0:de.querySelectorAll("["+zl("portal")+"]"))||[]),Ke=(we=(U?ay(U.nodesRef.current,z()):[]).find(pt=>{var gt;return iy(((gt=pt.context)==null?void 0:gt.elements.domReference)||null)}))==null||(we=we.context)==null?void 0:we.elements.domReference,Me=[j,Ke,...Ee,...I(),B.current,X.current,fe.current,me.current,Y?.beforeOutsideRef.current,Y?.afterOutsideRef.current,H.current.includes("reference")||O?C:null].filter(pt=>pt!=null),Bt=p||O?vy(Me,!F,F):vy(Me);return()=>{Bt()}},[i,C,j,p,H,Y,O,P,F,U,z,I]),sn(()=>{if(i||!Rt(A))return;const de=Pt(A),we=ll(de);queueMicrotask(()=>{const Ee=le(A),$e=G.current,Ke=(typeof $e=="number"?Ee[$e]:$e.current)||A,Me=qt(A,we);!L&&!Me&&S&&wi(Ke,{preventScroll:Ke===A})})},[i,S,A,L,le,G]),sn(()=>{if(i||!A)return;const de=Pt(A),we=ll(de);y3(we);function Ee(Me){let{reason:Bt,event:pt,nested:gt}=Me;if(["hover","safe-polygon"].includes(Bt)&&pt.type==="mouseleave"&&(M.current=!0),Bt==="outside-press")if(gt)M.current=!1;else if(yC(pt)||xC(pt))M.current=!1;else{let Gt=!1;document.createElement("div").focus({get preventScroll(){return Gt=!0,!1}}),Gt?M.current=!1:M.current=!0}}N.on("openchange",Ee);const $e=de.createElement("span");$e.setAttribute("tabindex","-1"),$e.setAttribute("aria-hidden","true"),Object.assign($e.style,Sh),q&&C&&C.insertAdjacentElement("afterend",$e);function Ke(){if(typeof Q.current=="boolean"){const Me=C||ky();return Me&&Me.isConnected?Me:$e}return Q.current.current||$e}return()=>{N.off("openchange",Ee);const Me=ll(de),Bt=qt(j,Me)||U&&Ai(U.nodesRef.current,z(),!1).some(gt=>{var Gt;return qt((Gt=gt.context)==null?void 0:Gt.elements.floating,Me)}),pt=Ke();queueMicrotask(()=>{const gt=x3(pt);Q.current&&!M.current&&Rt(gt)&&(!(gt!==Me&&Me!==de.body)||Bt)&>.focus({preventScroll:!0}),$e.remove()})}},[i,j,A,Q,E,N,U,q,C,z]),T.useEffect(()=>(queueMicrotask(()=>{M.current=!1}),()=>{queueMicrotask(kh)}),[i]),sn(()=>{if(!i&&Y)return Y.setFocusManagerState({modal:p,closeOnFocusOut:b,open:S,onOpenChange:w,domReference:C}),()=>{Y.setFocusManagerState(null)}},[i,Y,p,S,w,b,C]),sn(()=>{i||A&&Ey(A,H)},[i,A,H]);function ge(de){return i||!m||!p?null:y.jsx(v3,{ref:de==="start"?B:X,onClick:we=>w(!1,we.nativeEvent),children:typeof m=="string"?m:"Dismiss"})}const xe=!i&&P&&(p?!O:!0)&&(q||p);return y.jsxs(y.Fragment,{children:[xe&&y.jsx(Ys,{"data-type":"inside",ref:ye,onFocus:de=>{if(p){const Ee=le();wi(o[0]==="reference"?Ee[0]:Ee[Ee.length-1])}else if(Y!=null&&Y.preserveTabOrder&&Y.portalNode)if(M.current=!1,Ba(de,Y.portalNode)){const Ee=z1(C);Ee?.focus()}else{var we;(we=Y.beforeOutsideRef.current)==null||we.focus()}}}),!O&&ge("start"),l,ge("end"),xe&&y.jsx(Ys,{"data-type":"inside",ref:pe,onFocus:de=>{if(p)wi(le()[0]);else if(Y!=null&&Y.preserveTabOrder&&Y.portalNode)if(b&&(M.current=!0),Ba(de,Y.portalNode)){const Ee=F1(C);Ee?.focus()}else{var we;(we=Y.afterOutsideRef.current)==null||we.focus()}}})]})}function Cy(e){return Rt(e.target)&&e.target.tagName==="BUTTON"}function S3(e){return Rt(e.target)&&e.target.tagName==="A"}function Ny(e){return yh(e)}function Id(e,r){r===void 0&&(r={});const{open:l,onOpenChange:i,dataRef:o,elements:{domReference:u}}=e,{enabled:c=!0,event:f="click",toggle:h=!0,ignoreMouse:p=!1,keyboardHandlers:m=!0,stickIfOpen:b=!0}=r,v=T.useRef(),x=T.useRef(!1),S=T.useMemo(()=>({onPointerDown(w){v.current=w.pointerType},onMouseDown(w){const N=v.current;w.button===0&&f!=="click"&&(Ga(N,!0)&&p||(l&&h&&(!(o.current.openEvent&&b)||o.current.openEvent.type==="mousedown")?i(!1,w.nativeEvent,"click"):(w.preventDefault(),i(!0,w.nativeEvent,"click"))))},onClick(w){const N=v.current;if(f==="mousedown"&&v.current){v.current=void 0;return}Ga(N,!0)&&p||(l&&h&&(!(o.current.openEvent&&b)||o.current.openEvent.type==="click")?i(!1,w.nativeEvent,"click"):i(!0,w.nativeEvent,"click"))},onKeyDown(w){v.current=void 0,!(w.defaultPrevented||!m||Cy(w))&&(w.key===" "&&!Ny(u)&&(w.preventDefault(),x.current=!0),!S3(w)&&w.key==="Enter"&&i(!(l&&h),w.nativeEvent,"click"))},onKeyUp(w){w.defaultPrevented||!m||Cy(w)||Ny(u)||w.key===" "&&x.current&&(x.current=!1,i(!(l&&h),w.nativeEvent,"click"))}}),[o,u,f,p,m,i,l,b,h]);return T.useMemo(()=>c?{reference:S}:{},[c,S])}const k3={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},E3={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ay=e=>{var r,l;return{escapeKey:typeof e=="boolean"?e:(r=e?.escapeKey)!=null?r:!1,outsidePress:typeof e=="boolean"?e:(l=e?.outsidePress)!=null?l:!0}};function Ud(e,r){r===void 0&&(r={});const{open:l,onOpenChange:i,elements:o,dataRef:u}=e,{enabled:c=!0,escapeKey:f=!0,outsidePress:h=!0,outsidePressEvent:p="pointerdown",referencePress:m=!1,referencePressEvent:b="pointerdown",ancestorScroll:v=!1,bubbles:x,capture:S}=r,w=bu(),N=on(typeof h=="function"?h:()=>!1),E=typeof h=="function"?N:h,C=T.useRef(!1),{escapeKey:j,outsidePress:z}=Ay(x),{escapeKey:I,outsidePress:L}=Ay(S),O=T.useRef(!1),Z=on(U=>{var Y;if(!l||!c||!f||U.key!=="Escape"||O.current)return;const B=(Y=u.current.floatingContext)==null?void 0:Y.nodeId,X=w?Ai(w.nodesRef.current,B):[];if(!j&&(U.stopPropagation(),X.length>0)){let M=!0;if(X.forEach(V=>{var R;if((R=V.context)!=null&&R.open&&!V.context.dataRef.current.__escapeKeyBubbles){M=!1;return}}),!M)return}i(!1,bC(U)?U.nativeEvent:U,"escape-key")}),P=on(U=>{var Y;const B=()=>{var X;Z(U),(X=Sr(U))==null||X.removeEventListener("keydown",B)};(Y=Sr(U))==null||Y.addEventListener("keydown",B)}),F=on(U=>{var Y;const B=u.current.insideReactTree;u.current.insideReactTree=!1;const X=C.current;if(C.current=!1,p==="click"&&X||B||typeof E=="function"&&!E(U))return;const M=Sr(U),V="["+zl("inert")+"]",R=Pt(o.floating).querySelectorAll(V);let D=ct(M)?M:null;for(;D&&!Er(D);){const le=Cr(D);if(Er(le)||!ct(le))break;D=le}if(R.length&&ct(M)&&!gC(M)&&!qt(M,o.floating)&&Array.from(R).every(le=>!qt(D,le)))return;if(Rt(M)&&Q){const le=Er(M),fe=Mn(M),me=/auto|scroll/,ye=le||me.test(fe.overflowX),pe=le||me.test(fe.overflowY),ge=ye&&M.clientWidth>0&&M.scrollWidth>M.clientWidth,xe=pe&&M.clientHeight>0&&M.scrollHeight>M.clientHeight,de=fe.direction==="rtl",we=xe&&(de?U.offsetX<=M.offsetWidth-M.clientWidth:U.offsetX>M.clientWidth),Ee=ge&&U.offsetY>M.clientHeight;if(we||Ee)return}const q=(Y=u.current.floatingContext)==null?void 0:Y.nodeId,A=w&&Ai(w.nodesRef.current,q).some(le=>{var fe;return qf(U,(fe=le.context)==null?void 0:fe.elements.floating)});if(qf(U,o.floating)||qf(U,o.domReference)||A)return;const te=w?Ai(w.nodesRef.current,q):[];if(te.length>0){let le=!0;if(te.forEach(fe=>{var me;if((me=fe.context)!=null&&me.open&&!fe.context.dataRef.current.__outsidePressBubbles){le=!1;return}}),!le)return}i(!1,U,"outside-press")}),H=on(U=>{var Y;const B=()=>{var X;F(U),(X=Sr(U))==null||X.removeEventListener(p,B)};(Y=Sr(U))==null||Y.addEventListener(p,B)});T.useEffect(()=>{if(!l||!c)return;u.current.__escapeKeyBubbles=j,u.current.__outsidePressBubbles=z;let U=-1;function Y(R){i(!1,R,"ancestor-scroll")}function B(){window.clearTimeout(U),O.current=!0}function X(){U=window.setTimeout(()=>{O.current=!1},fu()?5:0)}const M=Pt(o.floating);f&&(M.addEventListener("keydown",I?P:Z,I),M.addEventListener("compositionstart",B),M.addEventListener("compositionend",X)),E&&M.addEventListener(p,L?H:F,L);let V=[];return v&&(ct(o.domReference)&&(V=sl(o.domReference)),ct(o.floating)&&(V=V.concat(sl(o.floating))),!ct(o.reference)&&o.reference&&o.reference.contextElement&&(V=V.concat(sl(o.reference.contextElement)))),V=V.filter(R=>{var D;return R!==((D=M.defaultView)==null?void 0:D.visualViewport)}),V.forEach(R=>{R.addEventListener("scroll",Y,{passive:!0})}),()=>{f&&(M.removeEventListener("keydown",I?P:Z,I),M.removeEventListener("compositionstart",B),M.removeEventListener("compositionend",X)),E&&M.removeEventListener(p,L?H:F,L),V.forEach(R=>{R.removeEventListener("scroll",Y)}),window.clearTimeout(U)}},[u,o,f,E,p,l,i,v,c,j,z,Z,I,P,F,L,H]),T.useEffect(()=>{u.current.insideReactTree=!1},[u,E,p]);const G=T.useMemo(()=>({onKeyDown:Z,...m&&{[k3[b]]:U=>{i(!1,U.nativeEvent,"reference-press")},...b!=="click"&&{onClick(U){i(!1,U.nativeEvent,"reference-press")}}}}),[Z,i,m,b]),Q=T.useMemo(()=>({onKeyDown:Z,onMouseDown(){C.current=!0},onMouseUp(){C.current=!0},[E3[p]]:()=>{u.current.insideReactTree=!0}}),[Z,p,u]);return T.useMemo(()=>c?{reference:G,floating:Q}:{},[c,G,Q])}function C3(e){const{open:r=!1,onOpenChange:l,elements:i}=e,o=vh(),u=T.useRef({}),[c]=T.useState(()=>o3()),f=wh()!=null,[h,p]=T.useState(i.reference),m=on((x,S,w)=>{u.current.openEvent=x?S:void 0,c.emit("openchange",{open:x,event:S,reason:w,nested:f}),l?.(x,S,w)}),b=T.useMemo(()=>({setPositionReference:p}),[]),v=T.useMemo(()=>({reference:h||i.reference||null,floating:i.floating||null,domReference:i.reference}),[h,i.reference,i.floating]);return T.useMemo(()=>({dataRef:u,open:r,onOpenChange:m,elements:v,events:c,floatingId:o,refs:b}),[r,m,v,c,o,b])}function Hd(e){e===void 0&&(e={});const{nodeId:r}=e,l=C3({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||l,o=i.elements,[u,c]=T.useState(null),[f,h]=T.useState(null),m=o?.domReference||u,b=T.useRef(null),v=bu();sn(()=>{m&&(b.current=m)},[m]);const x=t3({...e,elements:{...o,...f&&{reference:f}}}),S=T.useCallback(j=>{const z=ct(j)?{getBoundingClientRect:()=>j.getBoundingClientRect(),getClientRects:()=>j.getClientRects(),contextElement:j}:j;h(z),x.refs.setReference(z)},[x.refs]),w=T.useCallback(j=>{(ct(j)||j===null)&&(b.current=j,c(j)),(ct(x.refs.reference.current)||x.refs.reference.current===null||j!==null&&!ct(j))&&x.refs.setReference(j)},[x.refs]),N=T.useMemo(()=>({...x.refs,setReference:w,setPositionReference:S,domReference:b}),[x.refs,w,S]),E=T.useMemo(()=>({...x.elements,domReference:m}),[x.elements,m]),C=T.useMemo(()=>({...x,...i,refs:N,elements:E,nodeId:r}),[x,N,E,r,i]);return sn(()=>{i.dataRef.current.floatingContext=C;const j=v?.nodesRef.current.find(z=>z.id===r);j&&(j.context=C)}),T.useMemo(()=>({...x,context:C,refs:N,elements:E}),[x,N,E,C])}function Kf(){return hC()&&D1()}function N3(e,r){r===void 0&&(r={});const{open:l,onOpenChange:i,events:o,dataRef:u,elements:c}=e,{enabled:f=!0,visibleOnly:h=!0}=r,p=T.useRef(!1),m=T.useRef(-1),b=T.useRef(!0);T.useEffect(()=>{if(!f)return;const x=un(c.domReference);function S(){!l&&Rt(c.domReference)&&c.domReference===ll(Pt(c.domReference))&&(p.current=!0)}function w(){b.current=!0}function N(){b.current=!1}return x.addEventListener("blur",S),Kf()&&(x.addEventListener("keydown",w,!0),x.addEventListener("pointerdown",N,!0)),()=>{x.removeEventListener("blur",S),Kf()&&(x.removeEventListener("keydown",w,!0),x.removeEventListener("pointerdown",N,!0))}},[c.domReference,l,f]),T.useEffect(()=>{if(!f)return;function x(S){let{reason:w}=S;(w==="reference-press"||w==="escape-key")&&(p.current=!0)}return o.on("openchange",x),()=>{o.off("openchange",x)}},[o,f]),T.useEffect(()=>()=>{Zt(m)},[]);const v=T.useMemo(()=>({onMouseLeave(){p.current=!1},onFocus(x){if(p.current)return;const S=Sr(x.nativeEvent);if(h&&ct(S)){if(Kf()&&!x.relatedTarget){if(!b.current&&!yh(S))return}else if(!mC(S))return}i(!0,x.nativeEvent,"focus")},onBlur(x){p.current=!1;const S=x.relatedTarget,w=x.nativeEvent,N=ct(S)&&S.hasAttribute(zl("focus-guard"))&&S.getAttribute("data-type")==="outside";m.current=window.setTimeout(()=>{var E;const C=ll(c.domReference?c.domReference.ownerDocument:document);!S&&C===c.domReference||qt((E=u.current.floatingContext)==null?void 0:E.refs.floating.current,C)||qt(c.domReference,C)||N||i(!1,w,"focus")})}}),[u,c.domReference,i,h]);return T.useMemo(()=>f?{reference:v}:{},[f,v])}function Qf(e,r,l){const i=new Map,o=l==="item";let u=e;if(o&&e){const{[hy]:c,[py]:f,...h}=e;u=h}return{...l==="floating"&&{tabIndex:-1,[n3]:""},...u,...r.map(c=>{const f=c?c[l]:null;return typeof f=="function"?e?f(e):null:f}).concat(e).reduce((c,f)=>(f&&Object.entries(f).forEach(h=>{let[p,m]=h;if(!(o&&[hy,py].includes(p)))if(p.indexOf("on")===0){if(i.has(p)||i.set(p,[]),typeof m=="function"){var b;(b=i.get(p))==null||b.push(m),c[p]=function(){for(var v,x=arguments.length,S=new Array(x),w=0;w<x;w++)S[w]=arguments[w];return(v=i.get(p))==null?void 0:v.map(N=>N(...S)).find(N=>N!==void 0)}}}else c[p]=m}),c),{})}}function qd(e){e===void 0&&(e=[]);const r=e.map(f=>f?.reference),l=e.map(f=>f?.floating),i=e.map(f=>f?.item),o=T.useCallback(f=>Qf(f,e,"reference"),r),u=T.useCallback(f=>Qf(f,e,"floating"),l),c=T.useCallback(f=>Qf(f,e,"item"),i);return T.useMemo(()=>({getReferenceProps:o,getFloatingProps:u,getItemProps:c}),[o,u,c])}const A3=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Pd(e,r){var l,i;r===void 0&&(r={});const{open:o,elements:u,floatingId:c}=e,{enabled:f=!0,role:h="dialog"}=r,p=vh(),m=((l=u.domReference)==null?void 0:l.id)||p,b=T.useMemo(()=>{var C;return((C=Ld(u.floating))==null?void 0:C.id)||c},[u.floating,c]),v=(i=A3.get(h))!=null?i:h,S=wh()!=null,w=T.useMemo(()=>v==="tooltip"||h==="label"?{["aria-"+(h==="label"?"labelledby":"describedby")]:o?b:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":v==="alertdialog"?"dialog":v,"aria-controls":o?b:void 0,...v==="listbox"&&{role:"combobox"},...v==="menu"&&{id:m},...v==="menu"&&S&&{role:"menuitem"},...h==="select"&&{"aria-autocomplete":"none"},...h==="combobox"&&{"aria-autocomplete":"list"}},[v,b,S,o,m,h]),N=T.useMemo(()=>{const C={id:b,...v&&{role:v}};return v==="tooltip"||h==="label"?C:{...C,...v==="menu"&&{"aria-labelledby":m}}},[v,b,m,h]),E=T.useCallback(C=>{let{active:j,selected:z}=C;const I={role:"option",...j&&{id:b+"-fui-option"}};switch(h){case"select":case"combobox":return{...I,"aria-selected":z}}return{}},[b,h]);return T.useMemo(()=>f?{reference:w,floating:N,item:E}:{},[f,w,N,E])}function Z1(e,r,l){return l===void 0&&(l=!0),e.filter(o=>{var u;return o.parentId===r&&(!l||((u=o.context)==null?void 0:u.open))}).flatMap(o=>[o,...Z1(e,o.id,l)])}function Ty(e,r){const[l,i]=e;let o=!1;const u=r.length;for(let c=0,f=u-1;c<u;f=c++){const[h,p]=r[c]||[0,0],[m,b]=r[f]||[0,0];p>=i!=b>=i&&l<=(m-h)*(i-p)/(b-p)+h&&(o=!o)}return o}function T3(e,r){return e[0]>=r.x&&e[0]<=r.x+r.width&&e[1]>=r.y&&e[1]<=r.y+r.height}function $d(e){e===void 0&&(e={});const{buffer:r=.5,blockPointerEvents:l=!1,requireIntent:i=!0}=e,o={current:-1};let u=!1,c=null,f=null,h=typeof performance<"u"?performance.now():0;function p(b,v){const x=performance.now(),S=x-h;if(c===null||f===null||S===0)return c=b,f=v,h=x,null;const w=b-c,N=v-f,C=Math.sqrt(w*w+N*N)/S;return c=b,f=v,h=x,C}const m=b=>{let{x:v,y:x,placement:S,elements:w,onClose:N,nodeId:E,tree:C}=b;return function(z){function I(){Zt(o),N()}if(Zt(o),!w.domReference||!w.floating||S==null||v==null||x==null)return;const{clientX:L,clientY:O}=z,Z=[L,O],P=c3(z),F=z.type==="mouseleave",H=Xf(w.floating,P),G=Xf(w.domReference,P),Q=w.domReference.getBoundingClientRect(),U=w.floating.getBoundingClientRect(),Y=S.split("-")[0],B=v>U.right-U.width/2,X=x>U.bottom-U.height/2,M=T3(Z,Q),V=U.width>Q.width,R=U.height>Q.height,D=(V?Q:U).left,q=(V?Q:U).right,A=(R?Q:U).top,te=(R?Q:U).bottom;if(H&&(u=!0,!F))return;if(G&&(u=!1),G&&!F){u=!0;return}if(F&&ct(z.relatedTarget)&&Xf(w.floating,z.relatedTarget)||C&&Z1(C.nodesRef.current,E).length)return;if(Y==="top"&&x>=Q.bottom-1||Y==="bottom"&&x<=Q.top+1||Y==="left"&&v>=Q.right-1||Y==="right"&&v<=Q.left+1)return I();let le=[];switch(Y){case"top":le=[[D,Q.top+1],[D,U.bottom-1],[q,U.bottom-1],[q,Q.top+1]];break;case"bottom":le=[[D,U.top+1],[D,Q.bottom-1],[q,Q.bottom-1],[q,U.top+1]];break;case"left":le=[[U.right-1,te],[U.right-1,A],[Q.left+1,A],[Q.left+1,te]];break;case"right":le=[[Q.right-1,te],[Q.right-1,A],[U.left+1,A],[U.left+1,te]];break}function fe(me){let[ye,pe]=me;switch(Y){case"top":{const ge=[V?ye+r/2:B?ye+r*4:ye-r*4,pe+r+1],xe=[V?ye-r/2:B?ye+r*4:ye-r*4,pe+r+1],de=[[U.left,B||V?U.bottom-r:U.top],[U.right,B?V?U.bottom-r:U.top:U.bottom-r]];return[ge,xe,...de]}case"bottom":{const ge=[V?ye+r/2:B?ye+r*4:ye-r*4,pe-r],xe=[V?ye-r/2:B?ye+r*4:ye-r*4,pe-r],de=[[U.left,B||V?U.top+r:U.bottom],[U.right,B?V?U.top+r:U.bottom:U.top+r]];return[ge,xe,...de]}case"left":{const ge=[ye+r+1,R?pe+r/2:X?pe+r*4:pe-r*4],xe=[ye+r+1,R?pe-r/2:X?pe+r*4:pe-r*4];return[...[[X||R?U.right-r:U.left,U.top],[X?R?U.right-r:U.left:U.right-r,U.bottom]],ge,xe]}case"right":{const ge=[ye-r,R?pe+r/2:X?pe+r*4:pe-r*4],xe=[ye-r,R?pe-r/2:X?pe+r*4:pe-r*4],de=[[X||R?U.left+r:U.right,U.top],[X?R?U.left+r:U.right:U.left+r,U.bottom]];return[ge,xe,...de]}}}if(!Ty([L,O],le)){if(u&&!M)return I();if(!F&&i){const me=p(z.clientX,z.clientY);if(me!==null&&me<.1)return I()}Ty([L,O],fe([v,x]))?!u&&i&&(o.current=window.setTimeout(I,40)):I()}}};return m.__options={blockPointerEvents:l},m}const j3={".":"Uncommitted Changes",staged:"Staging Area",working:"Working Directory"},R3=new Set([".","staged","working"]),_3=e=>{const r=!e||R3.has(e)?"HEAD":`${e}^`;return{base:`${r}^`,target:r}},jy=(e,r)=>!!r&&e===`${r}^`,Cs=(e,r)=>e?e===r.shortHash||e===r.hash:!1,Ry=(e,r)=>r?`${e.shortHash}^`:e.shortHash,_y=(e,r,l)=>{if(!r)return"Select...";const i=r.endsWith("^"),o=i?r.slice(0,-1):r;if(o.startsWith("HEAD"))return r;const u=j3[r];if(u)return u;const c=e.specialOptions.find(p=>p.value===r);if(c)return c.label;const f=e.branches.find(p=>p.name===o);if(f)return i?`${f.name}^`:f.name;const h=e.commits.find(p=>p.shortHash===o||p.hash===o);if(h)return Ry(h,i);if(l){const p=e.commits.find(m=>m.shortHash===l||m.hash===l);if(p)return Ry(p,!1)}return r};function L3({options:e,baseRevision:r,targetRevision:l,resolvedBaseRevision:i,resolvedTargetRevision:o,onSelectDiff:u,onOpenAdvanced:c,compact:f=!1}){const[h,p]=T.useState(!1),[m,b]=T.useState(!1),v=f,{refs:x,floatingStyles:S,context:w}=Hd({open:h||m,onOpenChange:le=>{!le&&m||p(le)},placement:"bottom-end",middleware:[Od(6),zd(),Md({padding:8})],whileElementsMounted:Dd}),N=Fd(w,{handleClose:$d()}),E=Id(w),C=Ud(w),j=Pd(w,{role:"menu"}),{getReferenceProps:z,getFloatingProps:I}=qd([N,E,C,j]),{refs:L,floatingStyles:O,context:Z}=Hd({open:m,onOpenChange:le=>{le&&p(!0),b(le)},placement:"left-start",middleware:[Od(0),zd(),Md({padding:8})],whileElementsMounted:Dd}),P=Fd(Z,{handleClose:$d()}),F=Id(Z),H=Ud(Z),G=Pd(Z,{role:"menu"}),{getReferenceProps:Q,getFloatingProps:U}=qd([P,F,H,G]);T.useEffect(()=>{h||b(!1)},[h]);const Y=T.useMemo(()=>{const le=jy(r,l),fe=e.commits.find(pe=>le?Cs(l,pe)||Cs(o,pe):!1);if(fe)return`${fe.shortHash} ${fe.message}`;const me=_y(e,r,i),ye=_y(e,l,o);return`${me}...${ye}`},[e,r,l,i,o]),B=T.useMemo(()=>e.branches.find(le=>le.name==="main")||e.branches.find(le=>le.name==="master"),[e.branches]),X=!!B,M=T.useMemo(()=>({base:"HEAD^",target:"HEAD"}),[]),V=T.useMemo(()=>_3(l),[l]),R=(le,fe)=>{u(le,fe),b(!1),p(!1)},D=()=>{b(!1),p(!1),c()},q=(le,fe)=>["w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors",le?"hover:bg-diff-selected-bg focus:bg-diff-selected-bg":"hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary",le?"bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2":"",fe?"opacity-50 cursor-not-allowed":"cursor-pointer"].join(" "),A=(le,fe)=>r===le&&l===fe,te=le=>jy(r,l)?Cs(l,le)||Cs(o,le):!1;return y.jsxs("div",{className:"relative",children:[y.jsx("button",{ref:x.setReference,type:"button",className:"flex items-center gap-1.5 cursor-pointer group","aria-haspopup":"menu","aria-expanded":h,"aria-label":`Revision menu: ${Y}`,title:Y,...z(),children:v?y.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors",children:[y.jsx(B2,{size:14,className:"text-github-text-secondary"}),y.jsx(_i,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]}):y.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors",children:[y.jsx("code",{className:"text-xs text-github-text-primary",children:Y}),y.jsx(_i,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]})}),h&&y.jsx(Bd,{children:y.jsxs("div",{ref:x.setFloating,style:S,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[260px] max-h-[360px] overflow-y-auto",...I(),children:[y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Quick Diffs"}),y.jsx("button",{onClick:()=>R("HEAD","."),className:q(A("HEAD","."),!1),children:"HEAD...Uncommitted"}),X&&B&&y.jsx(y.Fragment,{children:y.jsxs("button",{onClick:()=>R(B.name,"."),className:q(A(B.name,"."),!1),children:[B.name,"...Uncommitted"]})}),y.jsx("button",{onClick:()=>R(M.base,M.target),className:q(A(M.base,M.target),!1),children:"HEAD"})]}),y.jsx("div",{className:"border-b border-github-border",children:y.jsx("button",{onClick:()=>R(V.base,V.target),className:q(A(V.base,V.target),!1),type:"button",children:"Previous commit"})}),y.jsx("div",{className:"border-b border-github-border",children:y.jsx("button",{ref:e.commits.length>0?L.setReference:void 0,className:q(!1,e.commits.length===0),...e.commits.length>0?Q():{},disabled:e.commits.length===0,type:"button",children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(h2,{size:12,className:"text-github-text-secondary"}),y.jsx("span",{children:"Pick Commit..."})]})})}),y.jsx("div",{children:y.jsx("button",{onClick:D,className:q(!1,!1),type:"button",children:"Detailed..."})})]})}),m&&e.commits.length>0&&y.jsx(Bd,{children:y.jsxs("div",{ref:L.setFloating,style:O,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[360px] overflow-y-auto",...U(),children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Recent Commits"}),e.commits.map(le=>y.jsx("button",{onClick:()=>R(`${le.shortHash}^`,le.shortHash),className:q(te(le),!1),type:"button",children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx("code",{className:"text-xs text-github-text-primary font-mono whitespace-nowrap",children:le.shortHash}),y.jsx("span",{className:"text-xs text-github-text-secondary flex-1 break-words",children:le.message})]})},le.hash))]})})]})}const D3=["jpg","jpeg","png","gif","bmp","svg","webp","ico","tiff","tif","avif","heic","heif"];function O3(e){if(!e)return!1;const r=Qa(e);return r?D3.includes(r):!1}const M3=["md","markdown"];function z3(e){if(!e)return!1;const r=Qa(e);return r?M3.includes(r):!1}const F3=["ipynb"];function B3(e){if(!e)return!1;const r=Qa(e);return r?F3.includes(r):!1}function I3({file:e,diffMode:r,baseCommitish:l,targetCommitish:i}){const o=r??Ka,u=e.status==="deleted",c=e.status==="added",f=e.status==="modified"||e.status==="renamed",h=l||"HEAD~1",p=i||"HEAD",[m,b]=T.useState({}),[v,x]=T.useState({}),S=async(C,j)=>{try{const z=C.naturalWidth,I=C.naturalHeight,Z=(await(await fetch(C.src)).blob()).size;j({width:z,height:I,size:Z})}catch(z){console.error("Failed to get image info:",z)}},w=C=>C?C<1024?`${C} B`:C<1024*1024?`${(C/1024).toFixed(1)} KB`:`${(C/(1024*1024)).toFixed(1)} MB`:"",N=C=>!C.width||!C.height?"":`W: ${C.width}px | H: ${C.height}px`,E={backgroundImage:`
|
|
27
|
-
linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%),
|
|
28
|
-
linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%)
|
|
29
|
-
`,backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px",backgroundColor:"white"};return u?y.jsx("div",{className:"bg-github-bg-primary p-4",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"mb-2",children:y.jsx("span",{className:"text-github-danger font-medium",children:"Deleted Image"})}),y.jsxs("div",{className:"inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${h}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>S(C.currentTarget,b),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(m.width||m.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(m),N(m)&&w(m.size)&&" | ",w(m.size)]})]})]})}):c?y.jsx("div",{className:"bg-github-bg-primary p-4",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"mb-2",children:y.jsx("span",{className:"text-github-accent font-medium",children:"Added Image"})}),y.jsxs("div",{className:"inline-block border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"New file:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${p}`,alt:`New image ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>S(C.currentTarget,x),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(v.width||v.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(v),N(v)&&w(v.size)&&" | ",w(v.size)]})]})]})}):f?o==="split"?y.jsxs("div",{className:"bg-github-bg-primary p-4",children:[y.jsx("div",{className:"text-center mb-4",children:y.jsx("span",{className:"text-github-text-primary font-medium",children:"Modified Image"})}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${h}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>S(C.currentTarget,b),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(m.width||m.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(m),N(m)&&w(m.size)&&" | ",w(m.size)]})]})}),y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Current version:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${p}`,alt:`Current version of ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>S(C.currentTarget,x),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(v.width||v.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(v),N(v)&&w(v.size)&&" | ",w(v.size)]})]})})]})]}):y.jsxs("div",{className:"bg-github-bg-primary p-4",children:[y.jsx("div",{className:"text-center mb-4",children:y.jsx("span",{className:"text-github-text-primary font-medium",children:"Modified Image"})}),y.jsxs("div",{className:"space-y-6",children:[y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Previous version:"}),y.jsx("img",{src:`/api/blob/${e.oldPath||e.path}?ref=${h}`,alt:`Previous version of ${e.oldPath||e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>S(C.currentTarget,b),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(m.width||m.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(m),N(m)&&w(m.size)&&" | ",w(m.size)]})]})}),y.jsx("div",{className:"text-center",children:y.jsxs("div",{className:"border border-github-border rounded-md p-4 bg-github-bg-secondary inline-block",children:[y.jsx("div",{className:"text-github-text-muted mb-2",style:{fontSize:"14px"},children:"Current version:"}),y.jsx("img",{src:`/api/blob/${e.path}?ref=${p}`,alt:`Current version of ${e.path}`,className:"max-w-full max-h-96 border border-github-border rounded mx-auto",style:E,onLoad:C=>S(C.currentTarget,x),onError:C=>{const j=C.target;j.style.display="none",j.nextElementSibling?.classList.remove("hidden")}}),y.jsx("div",{className:"hidden text-github-text-muted text-sm mt-2",children:"Image could not be loaded"}),(v.width||v.size)&&y.jsxs("div",{className:"text-github-text-muted mt-2",style:{fontSize:"14px"},children:[N(v),N(v)&&w(v.size)&&" | ",w(v.size)]})]})})]})]}):null}function U3(e,r){const l={};return(e[e.length-1]===""?[...e,""]:e).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const H3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,q3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,P3={};function Ly(e,r){return(P3.jsx?q3:H3).test(e)}const $3=/[ \t\n\f\r]/g;function V3(e){return typeof e=="object"?e.type==="text"?Dy(e.value):!1:Dy(e)}function Dy(e){return e.replace($3,"")===""}class eo{constructor(r,l,i){this.normal=l,this.property=r,i&&(this.space=i)}}eo.prototype.normal={};eo.prototype.property={};eo.prototype.space=void 0;function K1(e,r){const l={},i={};for(const o of e)Object.assign(l,o.property),Object.assign(i,o.normal);return new eo(l,i,r)}function Vd(e){return e.toLowerCase()}class cn{constructor(r,l){this.attribute=l,this.property=r}}cn.prototype.attribute="";cn.prototype.booleanish=!1;cn.prototype.boolean=!1;cn.prototype.commaOrSpaceSeparated=!1;cn.prototype.commaSeparated=!1;cn.prototype.defined=!1;cn.prototype.mustUseProperty=!1;cn.prototype.number=!1;cn.prototype.overloadedBoolean=!1;cn.prototype.property="";cn.prototype.spaceSeparated=!1;cn.prototype.space=void 0;let G3=0;const De=Bl(),At=Bl(),Gd=Bl(),he=Bl(),ut=Bl(),Ri=Bl(),wn=Bl();function Bl(){return 2**++G3}const Yd=Object.freeze(Object.defineProperty({__proto__:null,boolean:De,booleanish:At,commaOrSpaceSeparated:wn,commaSeparated:Ri,number:he,overloadedBoolean:Gd,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),Jf=Object.keys(Yd);class Eh extends cn{constructor(r,l,i,o){let u=-1;if(super(r,l),Oy(this,"space",o),typeof i=="number")for(;++u<Jf.length;){const c=Jf[u];Oy(this,Jf[u],(i&Yd[c])===Yd[c])}}}Eh.prototype.defined=!0;function Oy(e,r,l){l&&(e[r]=l)}function Mi(e){const r={},l={};for(const[i,o]of Object.entries(e.properties)){const u=new Eh(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(u.mustUseProperty=!0),r[i]=u,l[Vd(i)]=i,l[Vd(u.attribute)]=i}return new eo(r,l,e.space)}const Q1=Mi({properties:{ariaActiveDescendant:null,ariaAtomic:At,ariaAutoComplete:null,ariaBusy:At,ariaChecked:At,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:At,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:At,ariaFlowTo:ut,ariaGrabbed:At,ariaHasPopup:null,ariaHidden:At,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:he,ariaLive:null,ariaModal:At,ariaMultiLine:At,ariaMultiSelectable:At,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:At,ariaReadOnly:At,ariaRelevant:null,ariaRequired:At,ariaRoleDescription:ut,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:At,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function J1(e,r){return r in e?e[r]:r}function W1(e,r){return J1(e,r.toLowerCase())}const Y3=Mi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ri,acceptCharset:ut,accessKey:ut,action:null,allow:null,allowFullScreen:De,allowPaymentRequest:De,allowUserMedia:De,alt:null,as:null,async:De,autoCapitalize:null,autoComplete:ut,autoFocus:De,autoPlay:De,blocking:ut,capture:null,charSet:null,checked:De,cite:null,className:ut,cols:he,colSpan:null,content:null,contentEditable:At,controls:De,controlsList:ut,coords:he|Ri,crossOrigin:null,data:null,dateTime:null,decoding:null,default:De,defer:De,dir:null,dirName:null,disabled:De,download:Gd,draggable:At,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:De,formTarget:null,headers:ut,height:he,hidden:Gd,high:he,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:De,inputMode:null,integrity:null,is:null,isMap:De,itemId:null,itemProp:ut,itemRef:ut,itemScope:De,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:De,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,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:he,pattern:null,ping:ut,placeholder:null,playsInline:De,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:De,referrerPolicy:null,rel:ut,required:De,reversed:De,rows:he,rowSpan:he,sandbox:ut,scope:null,scoped:De,seamless:De,selected:De,shadowRootClonable:De,shadowRootDelegatesFocus:De,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:At,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:De,useMap:null,value:At,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ut,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:De,declare:De,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:De,noHref:De,noShade:De,noWrap:De,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:At,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:De,disableRemotePlayback:De,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:W1}),X3=Mi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:wn,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:ut,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:De,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ri,g2:Ri,glyphName:Ri,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:wn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wn,rev:wn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wn,requiredFeatures:wn,requiredFonts:wn,requiredFormats:wn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:wn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wn,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:J1}),e0=Mi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,r){return"xlink:"+r.slice(5).toLowerCase()}}),t0=Mi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:W1}),n0=Mi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,r){return"xml:"+r.slice(3).toLowerCase()}}),Z3={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},K3=/[A-Z]/g,My=/-[a-z]/g,Q3=/^data[-\w.:]+$/i;function J3(e,r){const l=Vd(r);let i=r,o=cn;if(l in e.normal)return e.property[e.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&Q3.test(r)){if(r.charAt(4)==="-"){const u=r.slice(5).replace(My,e4);i="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=r.slice(4);if(!My.test(u)){let c=u.replace(K3,W3);c.charAt(0)!=="-"&&(c="-"+c),r="data"+c}}o=Eh}return new o(i,r)}function W3(e){return"-"+e.toLowerCase()}function e4(e){return e.charAt(1).toUpperCase()}const t4=K1([Q1,Y3,e0,t0,n0],"html"),Ch=K1([Q1,X3,e0,t0,n0],"svg");function n4(e){return e.join(" ").trim()}var Si={},Wf,zy;function r4(){if(zy)return Wf;zy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,l=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
|
|
30
|
-
`,p="/",m="*",b="",v="comment",x="declaration";function S(N,E){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];E=E||{};var C=1,j=1;function z(U){var Y=U.match(r);Y&&(C+=Y.length);var B=U.lastIndexOf(h);j=~B?U.length-B:j+U.length}function I(){var U={line:C,column:j};return function(Y){return Y.position=new L(U),P(),Y}}function L(U){this.start=U,this.end={line:C,column:j},this.source=E.source}L.prototype.content=N;function O(U){var Y=new Error(E.source+":"+C+":"+j+": "+U);if(Y.reason=U,Y.filename=E.source,Y.line=C,Y.column=j,Y.source=N,!E.silent)throw Y}function Z(U){var Y=U.exec(N);if(Y){var B=Y[0];return z(B),N=N.slice(B.length),Y}}function P(){Z(l)}function F(U){var Y;for(U=U||[];Y=H();)Y!==!1&&U.push(Y);return U}function H(){var U=I();if(!(p!=N.charAt(0)||m!=N.charAt(1))){for(var Y=2;b!=N.charAt(Y)&&(m!=N.charAt(Y)||p!=N.charAt(Y+1));)++Y;if(Y+=2,b===N.charAt(Y-1))return O("End of comment missing");var B=N.slice(2,Y-2);return j+=2,z(B),N=N.slice(Y),j+=2,U({type:v,comment:B})}}function G(){var U=I(),Y=Z(i);if(Y){if(H(),!Z(o))return O("property missing ':'");var B=Z(u),X=U({type:x,property:w(Y[0].replace(e,b)),value:B?w(B[0].replace(e,b)):b});return Z(c),X}}function Q(){var U=[];F(U);for(var Y;Y=G();)Y!==!1&&(U.push(Y),F(U));return U}return P(),Q()}function w(N){return N?N.replace(f,b):b}return Wf=S,Wf}var Fy;function l4(){if(Fy)return Si;Fy=1;var e=Si&&Si.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Si,"__esModule",{value:!0}),Si.default=l;const r=e(r4());function l(i,o){let u=null;if(!i||typeof i!="string")return u;const c=(0,r.default)(i),f=typeof o=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:p,value:m}=h;f?o(p,m,h):m&&(u=u||{},u[p]=m)}),u}return Si}var _a={},By;function i4(){if(By)return _a;By=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,l=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(p){return!p||l.test(p)||e.test(p)},c=function(p,m){return m.toUpperCase()},f=function(p,m){return"".concat(m,"-")},h=function(p,m){return m===void 0&&(m={}),u(p)?p:(p=p.toLowerCase(),m.reactCompat?p=p.replace(o,f):p=p.replace(i,f),p.replace(r,c))};return _a.camelCase=h,_a}var La,Iy;function a4(){if(Iy)return La;Iy=1;var e=La&&La.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},r=e(l4()),l=i4();function i(o,u){var c={};return!o||typeof o!="string"||(0,r.default)(o,function(f,h){f&&h&&(c[(0,l.camelCase)(f,u)]=h)}),c}return i.default=i,La=i,La}var o4=a4();const s4=lu(o4),r0=l0("end"),Nh=l0("start");function l0(e){return r;function r(l){const i=l&&l.position&&l.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function u4(e){const r=Nh(e),l=r0(e);if(r&&l)return{start:r,end:l}}function Ia(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Uy(e.position):"start"in e||"end"in e?Uy(e):"line"in e||"column"in e?Xd(e):""}function Xd(e){return Hy(e&&e.line)+":"+Hy(e&&e.column)}function Uy(e){return Xd(e&&e.start)+"-"+Xd(e&&e.end)}function Hy(e){return e&&typeof e=="number"?e:1}class Vt extends Error{constructor(r,l,i){super(),typeof l=="string"&&(i=l,l=void 0);let o="",u={},c=!1;if(l&&("line"in l&&"column"in l?u={place:l}:"start"in l&&"end"in l?u={place:l}:"type"in l?u={ancestors:[l],place:l.position}:u={...l}),typeof r=="string"?o=r:!u.cause&&r&&(c=!0,o=r.message,u.cause=r),!u.ruleId&&!u.source&&typeof i=="string"){const h=i.indexOf(":");h===-1?u.ruleId=i:(u.source=i.slice(0,h),u.ruleId=i.slice(h+1))}if(!u.place&&u.ancestors&&u.ancestors){const h=u.ancestors[u.ancestors.length-1];h&&(u.place=h.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=Ia(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Vt.prototype.file="";Vt.prototype.name="";Vt.prototype.reason="";Vt.prototype.message="";Vt.prototype.stack="";Vt.prototype.column=void 0;Vt.prototype.line=void 0;Vt.prototype.ancestors=void 0;Vt.prototype.cause=void 0;Vt.prototype.fatal=void 0;Vt.prototype.place=void 0;Vt.prototype.ruleId=void 0;Vt.prototype.source=void 0;const Ah={}.hasOwnProperty,c4=new Map,f4=/[A-Z]/g,d4=new Set(["table","tbody","thead","tfoot","tr"]),h4=new Set(["td","th"]),i0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function p4(e,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const l=r.filePath||void 0;let i;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=S4(l,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=w4(l,r.jsx,r.jsxs)}const o={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:i,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:l,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?Ch:t4,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},u=a0(o,e,void 0);return u&&typeof u!="string"?u:o.create(e,o.Fragment,{children:u||void 0},void 0)}function a0(e,r,l){if(r.type==="element")return g4(e,r,l);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return m4(e,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return y4(e,r,l);if(r.type==="mdxjsEsm")return b4(e,r);if(r.type==="root")return x4(e,r,l);if(r.type==="text")return v4(e,r)}function g4(e,r,l){const i=e.schema;let o=i;r.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=Ch,e.schema=o),e.ancestors.push(r);const u=s0(e,r.tagName,!1),c=k4(e,r);let f=jh(e,r);return d4.has(r.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!V3(h):!0})),o0(e,c,u,r),Th(c,f),e.ancestors.pop(),e.schema=i,e.create(r,u,c,l)}function m4(e,r){if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Ya(e,r.position)}function b4(e,r){if(r.data&&r.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(r.data.estree);Ya(e,r.position)}function y4(e,r,l){const i=e.schema;let o=i;r.name==="svg"&&i.space==="html"&&(o=Ch,e.schema=o),e.ancestors.push(r);const u=r.name===null?e.Fragment:s0(e,r.name,!0),c=E4(e,r),f=jh(e,r);return o0(e,c,u,r),Th(c,f),e.ancestors.pop(),e.schema=i,e.create(r,u,c,l)}function x4(e,r,l){const i={};return Th(i,jh(e,r)),e.create(r,e.Fragment,i,l)}function v4(e,r){return r.value}function o0(e,r,l,i){typeof l!="string"&&l!==e.Fragment&&e.passNode&&(r.node=i)}function Th(e,r){if(r.length>0){const l=r.length>1?r:r[0];l&&(e.children=l)}}function w4(e,r,l){return i;function i(o,u,c,f){const p=Array.isArray(c.children)?l:r;return f?p(u,c,f):p(u,c)}}function S4(e,r){return l;function l(i,o,u,c){const f=Array.isArray(u.children),h=Nh(i);return r(o,u,c,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function k4(e,r){const l={};let i,o;for(o in r.properties)if(o!=="children"&&Ah.call(r.properties,o)){const u=C4(e,o,r.properties[o]);if(u){const[c,f]=u;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&h4.has(r.tagName)?i=f:l[c]=f}}if(i){const u=l.style||(l.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return l}function E4(e,r){const l={};for(const i of r.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const u=i.data.estree.body[0];u.type;const c=u.expression;c.type;const f=c.properties[0];f.type,Object.assign(l,e.evaluater.evaluateExpression(f.argument))}else Ya(e,r.position);else{const o=i.name;let u;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const f=i.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else Ya(e,r.position);else u=i.value===null?!0:i.value;l[o]=u}return l}function jh(e,r){const l=[];let i=-1;const o=e.passKeys?new Map:c4;for(;++i<r.children.length;){const u=r.children[i];let c;if(e.passKeys){const h=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(h){const p=o.get(h)||0;c=h+"-"+p,o.set(h,p+1)}}const f=a0(e,u,c);f!==void 0&&l.push(f)}return l}function C4(e,r,l){const i=J3(e.schema,r);if(!(l==null||typeof l=="number"&&Number.isNaN(l))){if(Array.isArray(l)&&(l=i.commaSeparated?U3(l):n4(l)),i.property==="style"){let o=typeof l=="object"?l:N4(e,String(l));return e.stylePropertyNameCase==="css"&&(o=A4(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?Z3[i.property]||i.property:i.attribute,l]}}function N4(e,r){try{return s4(r,{reactCompat:!0})}catch(l){if(e.ignoreInvalidStyle)return{};const i=l,o=new Vt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=i0+"#cannot-parse-style-attribute",o}}function s0(e,r,l){let i;if(!l)i={type:"Literal",value:r};else if(r.includes(".")){const o=r.split(".");let u=-1,c;for(;++u<o.length;){const f=Ly(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}i=c}else i=Ly(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(i.type==="Literal"){const o=i.value;return Ah.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);Ya(e)}function Ya(e,r){const l=new Vt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=i0+"#cannot-handle-mdx-estrees-without-createevaluater",l}function A4(e){const r={};let l;for(l in e)Ah.call(e,l)&&(r[T4(l)]=e[l]);return r}function T4(e){let r=e.replace(f4,j4);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function j4(e){return"-"+e.toLowerCase()}const ed={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},R4={};function Rh(e,r){const l=R4,i=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,o=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return u0(e,i,o)}function u0(e,r,l){if(_4(e)){if("value"in e)return e.type==="html"&&!l?"":e.value;if(r&&"alt"in e&&e.alt)return e.alt;if("children"in e)return qy(e.children,r,l)}return Array.isArray(e)?qy(e,r,l):""}function qy(e,r,l){const i=[];let o=-1;for(;++o<e.length;)i[o]=u0(e[o],r,l);return i.join("")}function _4(e){return!!(e&&typeof e=="object")}const Py=document.createElement("i");function _h(e){const r="&"+e+";";Py.innerHTML=r;const l=Py.textContent;return l.charCodeAt(l.length-1)===59&&e!=="semi"||l===r?!1:l}function kn(e,r,l,i){const o=e.length;let u=0,c;if(r<0?r=-r>o?0:o+r:r=r>o?o:r,l=l>0?l:0,i.length<1e4)c=Array.from(i),c.unshift(r,l),e.splice(...c);else for(l&&e.splice(r,l);u<i.length;)c=i.slice(u,u+1e4),c.unshift(r,0),e.splice(...c),u+=1e4,r+=1e4}function On(e,r){return e.length>0?(kn(e,e.length,0,r),e):r}const $y={}.hasOwnProperty;function c0(e){const r={};let l=-1;for(;++l<e.length;)L4(r,e[l]);return r}function L4(e,r){let l;for(l in r){const o=($y.call(e,l)?e[l]:void 0)||(e[l]={}),u=r[l];let c;if(u)for(c in u){$y.call(o,c)||(o[c]=[]);const f=u[c];D4(o[c],Array.isArray(f)?f:f?[f]:[])}}}function D4(e,r){let l=-1;const i=[];for(;++l<r.length;)(r[l].add==="after"?e:i).push(r[l]);kn(e,0,0,i)}function f0(e,r){const l=Number.parseInt(e,r);return l<9||l===11||l>13&&l<32||l>126&&l<160||l>55295&&l<57344||l>64975&&l<65008||(l&65535)===65535||(l&65535)===65534||l>1114111?"�":String.fromCodePoint(l)}function qn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Kt=cl(/[A-Za-z]/),$t=cl(/[\dA-Za-z]/),O4=cl(/[#-'*+\--9=?A-Z^-~]/);function Xs(e){return e!==null&&(e<32||e===127)}const Zd=cl(/\d/),M4=cl(/[\dA-Fa-f]/),z4=cl(/[!-/:-@[-`{-~]/);function Ae(e){return e!==null&&e<-2}function st(e){return e!==null&&(e<0||e===32)}function Be(e){return e===-2||e===-1||e===32}const yu=cl(new RegExp("\\p{P}|\\p{S}","u")),Fl=cl(/\s/);function cl(e){return r;function r(l){return l!==null&&l>-1&&e.test(String.fromCharCode(l))}}function zi(e){const r=[];let l=-1,i=0,o=0;for(;++l<e.length;){const u=e.charCodeAt(l);let c="";if(u===37&&$t(e.charCodeAt(l+1))&&$t(e.charCodeAt(l+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(l+1);u<56320&&f>56319&&f<57344?(c=String.fromCharCode(u,f),o=1):c="�"}else c=String.fromCharCode(u);c&&(r.push(e.slice(i,l),encodeURIComponent(c)),i=l+o+1,c=""),o&&(l+=o,o=0)}return r.join("")+e.slice(i)}function Ge(e,r,l,i){const o=i?i-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(h){return Be(h)?(e.enter(l),f(h)):r(h)}function f(h){return Be(h)&&u++<o?(e.consume(h),f):(e.exit(l),r(h))}}const F4={tokenize:B4};function B4(e){const r=e.attempt(this.parser.constructs.contentInitial,i,o);let l;return r;function i(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ge(e,r,"linePrefix")}function o(f){return e.enter("paragraph"),u(f)}function u(f){const h=e.enter("chunkText",{contentType:"text",previous:l});return l&&(l.next=h),l=h,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ae(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),c)}}const I4={tokenize:U4},Vy={tokenize:H4};function U4(e){const r=this,l=[];let i=0,o,u,c;return f;function f(j){if(i<l.length){const z=l[i];return r.containerState=z[1],e.attempt(z[0].continuation,h,p)(j)}return p(j)}function h(j){if(i++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,o&&C();const z=r.events.length;let I=z,L;for(;I--;)if(r.events[I][0]==="exit"&&r.events[I][1].type==="chunkFlow"){L=r.events[I][1].end;break}E(i);let O=z;for(;O<r.events.length;)r.events[O][1].end={...L},O++;return kn(r.events,I+1,0,r.events.slice(z)),r.events.length=O,p(j)}return f(j)}function p(j){if(i===l.length){if(!o)return v(j);if(o.currentConstruct&&o.currentConstruct.concrete)return S(j);r.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return r.containerState={},e.check(Vy,m,b)(j)}function m(j){return o&&C(),E(i),v(j)}function b(j){return r.parser.lazy[r.now().line]=i!==l.length,c=r.now().offset,S(j)}function v(j){return r.containerState={},e.attempt(Vy,x,S)(j)}function x(j){return i++,l.push([r.currentConstruct,r.containerState]),v(j)}function S(j){if(j===null){o&&C(),E(0),e.consume(j);return}return o=o||r.parser.flow(r.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),w(j)}function w(j){if(j===null){N(e.exit("chunkFlow"),!0),E(0),e.consume(j);return}return Ae(j)?(e.consume(j),N(e.exit("chunkFlow")),i=0,r.interrupt=void 0,f):(e.consume(j),w)}function N(j,z){const I=r.sliceStream(j);if(z&&I.push(null),j.previous=u,u&&(u.next=j),u=j,o.defineSkip(j.start),o.write(I),r.parser.lazy[j.start.line]){let L=o.events.length;for(;L--;)if(o.events[L][1].start.offset<c&&(!o.events[L][1].end||o.events[L][1].end.offset>c))return;const O=r.events.length;let Z=O,P,F;for(;Z--;)if(r.events[Z][0]==="exit"&&r.events[Z][1].type==="chunkFlow"){if(P){F=r.events[Z][1].end;break}P=!0}for(E(i),L=O;L<r.events.length;)r.events[L][1].end={...F},L++;kn(r.events,Z+1,0,r.events.slice(O)),r.events.length=L}}function E(j){let z=l.length;for(;z-- >j;){const I=l[z];r.containerState=I[1],I[0].exit.call(r,e)}l.length=j}function C(){o.write([null]),u=void 0,o=void 0,r.containerState._closeFlow=void 0}}function H4(e,r,l){return Ge(e,e.attempt(this.parser.constructs.document,r,l),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Di(e){if(e===null||st(e)||Fl(e))return 1;if(yu(e))return 2}function xu(e,r,l){const i=[];let o=-1;for(;++o<e.length;){const u=e[o].resolveAll;u&&!i.includes(u)&&(r=u(r,l),i.push(u))}return r}const Kd={name:"attention",resolveAll:q4,tokenize:P4};function q4(e,r){let l=-1,i,o,u,c,f,h,p,m;for(;++l<e.length;)if(e[l][0]==="enter"&&e[l][1].type==="attentionSequence"&&e[l][1]._close){for(i=l;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&r.sliceSerialize(e[i][1]).charCodeAt(0)===r.sliceSerialize(e[l][1]).charCodeAt(0)){if((e[i][1]._close||e[l][1]._open)&&(e[l][1].end.offset-e[l][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[l][1].end.offset-e[l][1].start.offset)%3))continue;h=e[i][1].end.offset-e[i][1].start.offset>1&&e[l][1].end.offset-e[l][1].start.offset>1?2:1;const b={...e[i][1].end},v={...e[l][1].start};Gy(b,-h),Gy(v,h),c={type:h>1?"strongSequence":"emphasisSequence",start:b,end:{...e[i][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[l][1].start},end:v},u={type:h>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[l][1].start}},o={type:h>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[i][1].end={...c.start},e[l][1].start={...f.end},p=[],e[i][1].end.offset-e[i][1].start.offset&&(p=On(p,[["enter",e[i][1],r],["exit",e[i][1],r]])),p=On(p,[["enter",o,r],["enter",c,r],["exit",c,r],["enter",u,r]]),p=On(p,xu(r.parser.constructs.insideSpan.null,e.slice(i+1,l),r)),p=On(p,[["exit",u,r],["enter",f,r],["exit",f,r],["exit",o,r]]),e[l][1].end.offset-e[l][1].start.offset?(m=2,p=On(p,[["enter",e[l][1],r],["exit",e[l][1],r]])):m=0,kn(e,i-1,l-i+3,p),l=i+p.length-m-2;break}}for(l=-1;++l<e.length;)e[l][1].type==="attentionSequence"&&(e[l][1].type="data");return e}function P4(e,r){const l=this.parser.constructs.attentionMarkers.null,i=this.previous,o=Di(i);let u;return c;function c(h){return u=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===u)return e.consume(h),f;const p=e.exit("attentionSequence"),m=Di(h),b=!m||m===2&&o||l.includes(h),v=!o||o===2&&m||l.includes(i);return p._open=!!(u===42?b:b&&(o||!v)),p._close=!!(u===42?v:v&&(m||!b)),r(h)}}function Gy(e,r){e.column+=r,e.offset+=r,e._bufferIndex+=r}const $4={name:"autolink",tokenize:V4};function V4(e,r,l){let i=0;return o;function o(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(x){return Kt(x)?(e.consume(x),c):x===64?l(x):p(x)}function c(x){return x===43||x===45||x===46||$t(x)?(i=1,f(x)):p(x)}function f(x){return x===58?(e.consume(x),i=0,h):(x===43||x===45||x===46||$t(x))&&i++<32?(e.consume(x),f):(i=0,p(x))}function h(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),r):x===null||x===32||x===60||Xs(x)?l(x):(e.consume(x),h)}function p(x){return x===64?(e.consume(x),m):O4(x)?(e.consume(x),p):l(x)}function m(x){return $t(x)?b(x):l(x)}function b(x){return x===46?(e.consume(x),i=0,m):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),r):v(x)}function v(x){if((x===45||$t(x))&&i++<63){const S=x===45?v:b;return e.consume(x),S}return l(x)}}const to={partial:!0,tokenize:G4};function G4(e,r,l){return i;function i(u){return Be(u)?Ge(e,o,"linePrefix")(u):o(u)}function o(u){return u===null||Ae(u)?r(u):l(u)}}const d0={continuation:{tokenize:X4},exit:Z4,name:"blockQuote",tokenize:Y4};function Y4(e,r,l){const i=this;return o;function o(c){if(c===62){const f=i.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),u}return l(c)}function u(c){return Be(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),r):(e.exit("blockQuotePrefix"),r(c))}}function X4(e,r,l){const i=this;return o;function o(c){return Be(c)?Ge(e,u,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(d0,r,l)(c)}}function Z4(e){e.exit("blockQuote")}const h0={name:"characterEscape",tokenize:K4};function K4(e,r,l){return i;function i(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),o}function o(u){return z4(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),r):l(u)}}const p0={name:"characterReference",tokenize:Q4};function Q4(e,r,l){const i=this;let o=0,u,c;return f;function f(b){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),h}function h(b){return b===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(b),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),u=31,c=$t,m(b))}function p(b){return b===88||b===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(b),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=M4,m):(e.enter("characterReferenceValue"),u=7,c=Zd,m(b))}function m(b){if(b===59&&o){const v=e.exit("characterReferenceValue");return c===$t&&!_h(i.sliceSerialize(v))?l(b):(e.enter("characterReferenceMarker"),e.consume(b),e.exit("characterReferenceMarker"),e.exit("characterReference"),r)}return c(b)&&o++<u?(e.consume(b),m):l(b)}}const Yy={partial:!0,tokenize:W4},Xy={concrete:!0,name:"codeFenced",tokenize:J4};function J4(e,r,l){const i=this,o={partial:!0,tokenize:I};let u=0,c=0,f;return h;function h(L){return p(L)}function p(L){const O=i.events[i.events.length-1];return u=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,f=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(L)}function m(L){return L===f?(c++,e.consume(L),m):c<3?l(L):(e.exit("codeFencedFenceSequence"),Be(L)?Ge(e,b,"whitespace")(L):b(L))}function b(L){return L===null||Ae(L)?(e.exit("codeFencedFence"),i.interrupt?r(L):e.check(Yy,w,z)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(L))}function v(L){return L===null||Ae(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),b(L)):Be(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ge(e,x,"whitespace")(L)):L===96&&L===f?l(L):(e.consume(L),v)}function x(L){return L===null||Ae(L)?b(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(L))}function S(L){return L===null||Ae(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),b(L)):L===96&&L===f?l(L):(e.consume(L),S)}function w(L){return e.attempt(o,z,N)(L)}function N(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),E}function E(L){return u>0&&Be(L)?Ge(e,C,"linePrefix",u+1)(L):C(L)}function C(L){return L===null||Ae(L)?e.check(Yy,w,z)(L):(e.enter("codeFlowValue"),j(L))}function j(L){return L===null||Ae(L)?(e.exit("codeFlowValue"),C(L)):(e.consume(L),j)}function z(L){return e.exit("codeFenced"),r(L)}function I(L,O,Z){let P=0;return F;function F(Y){return L.enter("lineEnding"),L.consume(Y),L.exit("lineEnding"),H}function H(Y){return L.enter("codeFencedFence"),Be(Y)?Ge(L,G,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):G(Y)}function G(Y){return Y===f?(L.enter("codeFencedFenceSequence"),Q(Y)):Z(Y)}function Q(Y){return Y===f?(P++,L.consume(Y),Q):P>=c?(L.exit("codeFencedFenceSequence"),Be(Y)?Ge(L,U,"whitespace")(Y):U(Y)):Z(Y)}function U(Y){return Y===null||Ae(Y)?(L.exit("codeFencedFence"),O(Y)):Z(Y)}}}function W4(e,r,l){const i=this;return o;function o(c){return c===null?l(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return i.parser.lazy[i.now().line]?l(c):r(c)}}const td={name:"codeIndented",tokenize:tN},eN={partial:!0,tokenize:nN};function tN(e,r,l){const i=this;return o;function o(p){return e.enter("codeIndented"),Ge(e,u,"linePrefix",5)(p)}function u(p){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?c(p):l(p)}function c(p){return p===null?h(p):Ae(p)?e.attempt(eN,c,h)(p):(e.enter("codeFlowValue"),f(p))}function f(p){return p===null||Ae(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),f)}function h(p){return e.exit("codeIndented"),r(p)}}function nN(e,r,l){const i=this;return o;function o(c){return i.parser.lazy[i.now().line]?l(c):Ae(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):Ge(e,u,"linePrefix",5)(c)}function u(c){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?r(c):Ae(c)?o(c):l(c)}}const rN={name:"codeText",previous:iN,resolve:lN,tokenize:aN};function lN(e){let r=e.length-4,l=3,i,o;if((e[l][1].type==="lineEnding"||e[l][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(i=l;++i<r;)if(e[i][1].type==="codeTextData"){e[l][1].type="codeTextPadding",e[r][1].type="codeTextPadding",l+=2,r-=2;break}}for(i=l-1,r++;++i<=r;)o===void 0?i!==r&&e[i][1].type!=="lineEnding"&&(o=i):(i===r||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),r-=i-o-2,i=o+2),o=void 0);return e}function iN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function aN(e,r,l){let i=0,o,u;return c;function c(b){return e.enter("codeText"),e.enter("codeTextSequence"),f(b)}function f(b){return b===96?(e.consume(b),i++,f):(e.exit("codeTextSequence"),h(b))}function h(b){return b===null?l(b):b===32?(e.enter("space"),e.consume(b),e.exit("space"),h):b===96?(u=e.enter("codeTextSequence"),o=0,m(b)):Ae(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h):(e.enter("codeTextData"),p(b))}function p(b){return b===null||b===32||b===96||Ae(b)?(e.exit("codeTextData"),h(b)):(e.consume(b),p)}function m(b){return b===96?(e.consume(b),o++,m):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),r(b)):(u.type="codeTextData",p(b))}}class oN{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,l){const i=l??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(r,i):r>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(r,l,i){const o=l||0;this.setCursor(Math.trunc(r));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&Da(this.left,i),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),Da(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Da(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const l=this.left.splice(r,Number.POSITIVE_INFINITY);Da(this.right,l.reverse())}else{const l=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);Da(this.left,l.reverse())}}}function Da(e,r){let l=0;if(r.length<1e4)e.push(...r);else for(;l<r.length;)e.push(...r.slice(l,l+1e4)),l+=1e4}function g0(e){const r={};let l=-1,i,o,u,c,f,h,p;const m=new oN(e);for(;++l<m.length;){for(;l in r;)l=r[l];if(i=m.get(l),l&&i[1].type==="chunkFlow"&&m.get(l-1)[1].type==="listItemPrefix"&&(h=i[1]._tokenizer.events,u=0,u<h.length&&h[u][1].type==="lineEndingBlank"&&(u+=2),u<h.length&&h[u][1].type==="content"))for(;++u<h.length&&h[u][1].type!=="content";)h[u][1].type==="chunkText"&&(h[u][1]._isInFirstContentOfListItem=!0,u++);if(i[0]==="enter")i[1].contentType&&(Object.assign(r,sN(m,l)),l=r[l],p=!0);else if(i[1]._container){for(u=l,o=void 0;u--;)if(c=m.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(m.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(i[1].end={...m.get(o)[1].start},f=m.slice(o,l),f.unshift(i),m.splice(o,l-o+1,f))}}return kn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!p}function sN(e,r){const l=e.get(r)[1],i=e.get(r)[2];let o=r-1;const u=[];let c=l._tokenizer;c||(c=i.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,h=[],p={};let m,b,v=-1,x=l,S=0,w=0;const N=[w];for(;x;){for(;e.get(++o)[1]!==x;);u.push(o),x._tokenizer||(m=i.sliceStream(x),x.next||m.push(null),b&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(m),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),b=x,x=x.next}for(x=l;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(w=v+1,N.push(w),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):N.pop(),v=N.length;v--;){const E=f.slice(N[v],N[v+1]),C=u.pop();h.push([C,C+E.length-1]),e.splice(C,2,E)}for(h.reverse(),v=-1;++v<h.length;)p[S+h[v][0]]=S+h[v][1],S+=h[v][1]-h[v][0]-1;return p}const uN={resolve:fN,tokenize:dN},cN={partial:!0,tokenize:hN};function fN(e){return g0(e),e}function dN(e,r){let l;return i;function i(f){return e.enter("content"),l=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?u(f):Ae(f)?e.check(cN,c,u)(f):(e.consume(f),o)}function u(f){return e.exit("chunkContent"),e.exit("content"),r(f)}function c(f){return e.consume(f),e.exit("chunkContent"),l.next=e.enter("chunkContent",{contentType:"content",previous:l}),l=l.next,o}}function hN(e,r,l){const i=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ge(e,u,"linePrefix")}function u(c){if(c===null||Ae(c))return l(c);const f=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?r(c):e.interrupt(i.parser.constructs.flow,l,r)(c)}}function m0(e,r,l,i,o,u,c,f,h){const p=h||Number.POSITIVE_INFINITY;let m=0;return b;function b(E){return E===60?(e.enter(i),e.enter(o),e.enter(u),e.consume(E),e.exit(u),v):E===null||E===32||E===41||Xs(E)?l(E):(e.enter(i),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),w(E))}function v(E){return E===62?(e.enter(u),e.consume(E),e.exit(u),e.exit(o),e.exit(i),r):(e.enter(f),e.enter("chunkString",{contentType:"string"}),x(E))}function x(E){return E===62?(e.exit("chunkString"),e.exit(f),v(E)):E===null||E===60||Ae(E)?l(E):(e.consume(E),E===92?S:x)}function S(E){return E===60||E===62||E===92?(e.consume(E),x):x(E)}function w(E){return!m&&(E===null||E===41||st(E))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(i),r(E)):m<p&&E===40?(e.consume(E),m++,w):E===41?(e.consume(E),m--,w):E===null||E===32||E===40||Xs(E)?l(E):(e.consume(E),E===92?N:w)}function N(E){return E===40||E===41||E===92?(e.consume(E),w):w(E)}}function b0(e,r,l,i,o,u){const c=this;let f=0,h;return p;function p(x){return e.enter(i),e.enter(o),e.consume(x),e.exit(o),e.enter(u),m}function m(x){return f>999||x===null||x===91||x===93&&!h||x===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?l(x):x===93?(e.exit(u),e.enter(o),e.consume(x),e.exit(o),e.exit(i),r):Ae(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),b(x))}function b(x){return x===null||x===91||x===93||Ae(x)||f++>999?(e.exit("chunkString"),m(x)):(e.consume(x),h||(h=!Be(x)),x===92?v:b)}function v(x){return x===91||x===92||x===93?(e.consume(x),f++,b):b(x)}}function y0(e,r,l,i,o,u){let c;return f;function f(v){return v===34||v===39||v===40?(e.enter(i),e.enter(o),e.consume(v),e.exit(o),c=v===40?41:v,h):l(v)}function h(v){return v===c?(e.enter(o),e.consume(v),e.exit(o),e.exit(i),r):(e.enter(u),p(v))}function p(v){return v===c?(e.exit(u),h(c)):v===null?l(v):Ae(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Ge(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===c||v===null||Ae(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?b:m)}function b(v){return v===c||v===92?(e.consume(v),m):m(v)}}function Ua(e,r){let l;return i;function i(o){return Ae(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l=!0,i):Be(o)?Ge(e,i,l?"linePrefix":"lineSuffix")(o):r(o)}}const pN={name:"definition",tokenize:mN},gN={partial:!0,tokenize:bN};function mN(e,r,l){const i=this;let o;return u;function u(x){return e.enter("definition"),c(x)}function c(x){return b0.call(i,e,f,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function f(x){return o=qn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),h):l(x)}function h(x){return st(x)?Ua(e,p)(x):p(x)}function p(x){return m0(e,m,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function m(x){return e.attempt(gN,b,b)(x)}function b(x){return Be(x)?Ge(e,v,"whitespace")(x):v(x)}function v(x){return x===null||Ae(x)?(e.exit("definition"),i.parser.defined.push(o),r(x)):l(x)}}function bN(e,r,l){return i;function i(f){return st(f)?Ua(e,o)(f):l(f)}function o(f){return y0(e,u,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return Be(f)?Ge(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Ae(f)?r(f):l(f)}}const yN={name:"hardBreakEscape",tokenize:xN};function xN(e,r,l){return i;function i(u){return e.enter("hardBreakEscape"),e.consume(u),o}function o(u){return Ae(u)?(e.exit("hardBreakEscape"),r(u)):l(u)}}const vN={name:"headingAtx",resolve:wN,tokenize:SN};function wN(e,r){let l=e.length-2,i=3,o,u;return e[i][1].type==="whitespace"&&(i+=2),l-2>i&&e[l][1].type==="whitespace"&&(l-=2),e[l][1].type==="atxHeadingSequence"&&(i===l-1||l-4>i&&e[l-2][1].type==="whitespace")&&(l-=i+1===l?2:4),l>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[l][1].end},u={type:"chunkText",start:e[i][1].start,end:e[l][1].end,contentType:"text"},kn(e,i,l-i+1,[["enter",o,r],["enter",u,r],["exit",u,r],["exit",o,r]])),e}function SN(e,r,l){let i=0;return o;function o(m){return e.enter("atxHeading"),u(m)}function u(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&i++<6?(e.consume(m),c):m===null||st(m)?(e.exit("atxHeadingSequence"),f(m)):l(m)}function f(m){return m===35?(e.enter("atxHeadingSequence"),h(m)):m===null||Ae(m)?(e.exit("atxHeading"),r(m)):Be(m)?Ge(e,f,"whitespace")(m):(e.enter("atxHeadingText"),p(m))}function h(m){return m===35?(e.consume(m),h):(e.exit("atxHeadingSequence"),f(m))}function p(m){return m===null||m===35||st(m)?(e.exit("atxHeadingText"),f(m)):(e.consume(m),p)}}const kN=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Zy=["pre","script","style","textarea"],EN={concrete:!0,name:"htmlFlow",resolveTo:AN,tokenize:TN},CN={partial:!0,tokenize:RN},NN={partial:!0,tokenize:jN};function AN(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function TN(e,r,l){const i=this;let o,u,c,f,h;return p;function p(A){return m(A)}function m(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),b}function b(A){return A===33?(e.consume(A),v):A===47?(e.consume(A),u=!0,w):A===63?(e.consume(A),o=3,i.interrupt?r:R):Kt(A)?(e.consume(A),c=String.fromCharCode(A),N):l(A)}function v(A){return A===45?(e.consume(A),o=2,x):A===91?(e.consume(A),o=5,f=0,S):Kt(A)?(e.consume(A),o=4,i.interrupt?r:R):l(A)}function x(A){return A===45?(e.consume(A),i.interrupt?r:R):l(A)}function S(A){const te="CDATA[";return A===te.charCodeAt(f++)?(e.consume(A),f===te.length?i.interrupt?r:G:S):l(A)}function w(A){return Kt(A)?(e.consume(A),c=String.fromCharCode(A),N):l(A)}function N(A){if(A===null||A===47||A===62||st(A)){const te=A===47,le=c.toLowerCase();return!te&&!u&&Zy.includes(le)?(o=1,i.interrupt?r(A):G(A)):kN.includes(c.toLowerCase())?(o=6,te?(e.consume(A),E):i.interrupt?r(A):G(A)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?l(A):u?C(A):j(A))}return A===45||$t(A)?(e.consume(A),c+=String.fromCharCode(A),N):l(A)}function E(A){return A===62?(e.consume(A),i.interrupt?r:G):l(A)}function C(A){return Be(A)?(e.consume(A),C):F(A)}function j(A){return A===47?(e.consume(A),F):A===58||A===95||Kt(A)?(e.consume(A),z):Be(A)?(e.consume(A),j):F(A)}function z(A){return A===45||A===46||A===58||A===95||$t(A)?(e.consume(A),z):I(A)}function I(A){return A===61?(e.consume(A),L):Be(A)?(e.consume(A),I):j(A)}function L(A){return A===null||A===60||A===61||A===62||A===96?l(A):A===34||A===39?(e.consume(A),h=A,O):Be(A)?(e.consume(A),L):Z(A)}function O(A){return A===h?(e.consume(A),h=null,P):A===null||Ae(A)?l(A):(e.consume(A),O)}function Z(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||st(A)?I(A):(e.consume(A),Z)}function P(A){return A===47||A===62||Be(A)?j(A):l(A)}function F(A){return A===62?(e.consume(A),H):l(A)}function H(A){return A===null||Ae(A)?G(A):Be(A)?(e.consume(A),H):l(A)}function G(A){return A===45&&o===2?(e.consume(A),B):A===60&&o===1?(e.consume(A),X):A===62&&o===4?(e.consume(A),D):A===63&&o===3?(e.consume(A),R):A===93&&o===5?(e.consume(A),V):Ae(A)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(CN,q,Q)(A)):A===null||Ae(A)?(e.exit("htmlFlowData"),Q(A)):(e.consume(A),G)}function Q(A){return e.check(NN,U,q)(A)}function U(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),Y}function Y(A){return A===null||Ae(A)?Q(A):(e.enter("htmlFlowData"),G(A))}function B(A){return A===45?(e.consume(A),R):G(A)}function X(A){return A===47?(e.consume(A),c="",M):G(A)}function M(A){if(A===62){const te=c.toLowerCase();return Zy.includes(te)?(e.consume(A),D):G(A)}return Kt(A)&&c.length<8?(e.consume(A),c+=String.fromCharCode(A),M):G(A)}function V(A){return A===93?(e.consume(A),R):G(A)}function R(A){return A===62?(e.consume(A),D):A===45&&o===2?(e.consume(A),R):G(A)}function D(A){return A===null||Ae(A)?(e.exit("htmlFlowData"),q(A)):(e.consume(A),D)}function q(A){return e.exit("htmlFlow"),r(A)}}function jN(e,r,l){const i=this;return o;function o(c){return Ae(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):l(c)}function u(c){return i.parser.lazy[i.now().line]?l(c):r(c)}}function RN(e,r,l){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(to,r,l)}}const _N={name:"htmlText",tokenize:LN};function LN(e,r,l){const i=this;let o,u,c;return f;function f(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),h}function h(R){return R===33?(e.consume(R),p):R===47?(e.consume(R),I):R===63?(e.consume(R),j):Kt(R)?(e.consume(R),Z):l(R)}function p(R){return R===45?(e.consume(R),m):R===91?(e.consume(R),u=0,S):Kt(R)?(e.consume(R),C):l(R)}function m(R){return R===45?(e.consume(R),x):l(R)}function b(R){return R===null?l(R):R===45?(e.consume(R),v):Ae(R)?(c=b,X(R)):(e.consume(R),b)}function v(R){return R===45?(e.consume(R),x):b(R)}function x(R){return R===62?B(R):R===45?v(R):b(R)}function S(R){const D="CDATA[";return R===D.charCodeAt(u++)?(e.consume(R),u===D.length?w:S):l(R)}function w(R){return R===null?l(R):R===93?(e.consume(R),N):Ae(R)?(c=w,X(R)):(e.consume(R),w)}function N(R){return R===93?(e.consume(R),E):w(R)}function E(R){return R===62?B(R):R===93?(e.consume(R),E):w(R)}function C(R){return R===null||R===62?B(R):Ae(R)?(c=C,X(R)):(e.consume(R),C)}function j(R){return R===null?l(R):R===63?(e.consume(R),z):Ae(R)?(c=j,X(R)):(e.consume(R),j)}function z(R){return R===62?B(R):j(R)}function I(R){return Kt(R)?(e.consume(R),L):l(R)}function L(R){return R===45||$t(R)?(e.consume(R),L):O(R)}function O(R){return Ae(R)?(c=O,X(R)):Be(R)?(e.consume(R),O):B(R)}function Z(R){return R===45||$t(R)?(e.consume(R),Z):R===47||R===62||st(R)?P(R):l(R)}function P(R){return R===47?(e.consume(R),B):R===58||R===95||Kt(R)?(e.consume(R),F):Ae(R)?(c=P,X(R)):Be(R)?(e.consume(R),P):B(R)}function F(R){return R===45||R===46||R===58||R===95||$t(R)?(e.consume(R),F):H(R)}function H(R){return R===61?(e.consume(R),G):Ae(R)?(c=H,X(R)):Be(R)?(e.consume(R),H):P(R)}function G(R){return R===null||R===60||R===61||R===62||R===96?l(R):R===34||R===39?(e.consume(R),o=R,Q):Ae(R)?(c=G,X(R)):Be(R)?(e.consume(R),G):(e.consume(R),U)}function Q(R){return R===o?(e.consume(R),o=void 0,Y):R===null?l(R):Ae(R)?(c=Q,X(R)):(e.consume(R),Q)}function U(R){return R===null||R===34||R===39||R===60||R===61||R===96?l(R):R===47||R===62||st(R)?P(R):(e.consume(R),U)}function Y(R){return R===47||R===62||st(R)?P(R):l(R)}function B(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),r):l(R)}function X(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),M}function M(R){return Be(R)?Ge(e,V,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):V(R)}function V(R){return e.enter("htmlTextData"),c(R)}}const Lh={name:"labelEnd",resolveAll:zN,resolveTo:FN,tokenize:BN},DN={tokenize:IN},ON={tokenize:UN},MN={tokenize:HN};function zN(e){let r=-1;const l=[];for(;++r<e.length;){const i=e[r][1];if(l.push(e[r]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",r+=o}}return e.length!==l.length&&kn(e,0,e.length,l),e}function FN(e,r){let l=e.length,i=0,o,u,c,f;for(;l--;)if(o=e[l][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[l][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[l][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=l,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(c=l);const h={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[u][1].start},end:{...e[c][1].end}},m={type:"labelText",start:{...e[u+i+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",h,r],["enter",p,r]],f=On(f,e.slice(u+1,u+i+3)),f=On(f,[["enter",m,r]]),f=On(f,xu(r.parser.constructs.insideSpan.null,e.slice(u+i+4,c-3),r)),f=On(f,[["exit",m,r],e[c-2],e[c-1],["exit",p,r]]),f=On(f,e.slice(c+1)),f=On(f,[["exit",h,r]]),kn(e,u,e.length,f),e}function BN(e,r,l){const i=this;let o=i.events.length,u,c;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){u=i.events[o][1];break}return f;function f(v){return u?u._inactive?b(v):(c=i.parser.defined.includes(qn(i.sliceSerialize({start:u.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),h):l(v)}function h(v){return v===40?e.attempt(DN,m,c?m:b)(v):v===91?e.attempt(ON,m,c?p:b)(v):c?m(v):b(v)}function p(v){return e.attempt(MN,m,b)(v)}function m(v){return r(v)}function b(v){return u._balanced=!0,l(v)}}function IN(e,r,l){return i;function i(b){return e.enter("resource"),e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),o}function o(b){return st(b)?Ua(e,u)(b):u(b)}function u(b){return b===41?m(b):m0(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function c(b){return st(b)?Ua(e,h)(b):m(b)}function f(b){return l(b)}function h(b){return b===34||b===39||b===40?y0(e,p,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):m(b)}function p(b){return st(b)?Ua(e,m)(b):m(b)}function m(b){return b===41?(e.enter("resourceMarker"),e.consume(b),e.exit("resourceMarker"),e.exit("resource"),r):l(b)}}function UN(e,r,l){const i=this;return o;function o(f){return b0.call(i,e,u,c,"reference","referenceMarker","referenceString")(f)}function u(f){return i.parser.defined.includes(qn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?r(f):l(f)}function c(f){return l(f)}}function HN(e,r,l){return i;function i(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),o}function o(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),r):l(u)}}const qN={name:"labelStartImage",resolveAll:Lh.resolveAll,tokenize:PN};function PN(e,r,l){const i=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):l(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in i.parser.constructs?l(f):r(f)}}const $N={name:"labelStartLink",resolveAll:Lh.resolveAll,tokenize:VN};function VN(e,r,l){const i=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?l(c):r(c)}}const nd={name:"lineEnding",tokenize:GN};function GN(e,r){return l;function l(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ge(e,r,"linePrefix")}}const Ds={name:"thematicBreak",tokenize:YN};function YN(e,r,l){let i=0,o;return u;function u(p){return e.enter("thematicBreak"),c(p)}function c(p){return o=p,f(p)}function f(p){return p===o?(e.enter("thematicBreakSequence"),h(p)):i>=3&&(p===null||Ae(p))?(e.exit("thematicBreak"),r(p)):l(p)}function h(p){return p===o?(e.consume(p),i++,h):(e.exit("thematicBreakSequence"),Be(p)?Ge(e,f,"whitespace")(p):f(p))}}const an={continuation:{tokenize:QN},exit:WN,name:"list",tokenize:KN},XN={partial:!0,tokenize:eA},ZN={partial:!0,tokenize:JN};function KN(e,r,l){const i=this,o=i.events[i.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return f;function f(x){const S=i.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!i.containerState.marker||x===i.containerState.marker:Zd(x)){if(i.containerState.type||(i.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Ds,l,p)(x):p(x);if(!i.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(x)}return l(x)}function h(x){return Zd(x)&&++c<10?(e.consume(x),h):(!i.interrupt||c<2)&&(i.containerState.marker?x===i.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),p(x)):l(x)}function p(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||x,e.check(to,i.interrupt?l:m,e.attempt(XN,v,b))}function m(x){return i.containerState.initialBlankLine=!0,u++,v(x)}function b(x){return Be(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),v):l(x)}function v(x){return i.containerState.size=u+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(x)}}function QN(e,r,l){const i=this;return i.containerState._closeFlow=void 0,e.check(to,o,u);function o(f){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ge(e,r,"listItemIndent",i.containerState.size+1)(f)}function u(f){return i.containerState.furtherBlankLines||!Be(f)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(f)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(ZN,r,c)(f))}function c(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ge(e,e.attempt(an,r,l),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function JN(e,r,l){const i=this;return Ge(e,o,"listItemIndent",i.containerState.size+1);function o(u){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?r(u):l(u)}}function WN(e){e.exit(this.containerState.type)}function eA(e,r,l){const i=this;return Ge(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const c=i.events[i.events.length-1];return!Be(u)&&c&&c[1].type==="listItemPrefixWhitespace"?r(u):l(u)}}const Ky={name:"setextUnderline",resolveTo:tA,tokenize:nA};function tA(e,r){let l=e.length,i,o,u;for(;l--;)if(e[l][0]==="enter"){if(e[l][1].type==="content"){i=l;break}e[l][1].type==="paragraph"&&(o=l)}else e[l][1].type==="content"&&e.splice(l,1),!u&&e[l][1].type==="definition"&&(u=l);const c={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",u?(e.splice(o,0,["enter",c,r]),e.splice(u+1,0,["exit",e[i][1],r]),e[i][1].end={...e[u][1].end}):e[i][1]=c,e.push(["exit",c,r]),e}function nA(e,r,l){const i=this;let o;return u;function u(p){let m=i.events.length,b;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){b=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||b)?(e.enter("setextHeadingLine"),o=p,c(p)):l(p)}function c(p){return e.enter("setextHeadingLineSequence"),f(p)}function f(p){return p===o?(e.consume(p),f):(e.exit("setextHeadingLineSequence"),Be(p)?Ge(e,h,"lineSuffix")(p):h(p))}function h(p){return p===null||Ae(p)?(e.exit("setextHeadingLine"),r(p)):l(p)}}const rA={tokenize:lA};function lA(e){const r=this,l=e.attempt(to,i,e.attempt(this.parser.constructs.flowInitial,o,Ge(e,e.attempt(this.parser.constructs.flow,o,e.attempt(uN,o)),"linePrefix")));return l;function i(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),r.currentConstruct=void 0,l}function o(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),r.currentConstruct=void 0,l}}const iA={resolveAll:v0()},aA=x0("string"),oA=x0("text");function x0(e){return{resolveAll:v0(e==="text"?sA:void 0),tokenize:r};function r(l){const i=this,o=this.parser.constructs[e],u=l.attempt(o,c,f);return c;function c(m){return p(m)?u(m):f(m)}function f(m){if(m===null){l.consume(m);return}return l.enter("data"),l.consume(m),h}function h(m){return p(m)?(l.exit("data"),u(m)):(l.consume(m),h)}function p(m){if(m===null)return!0;const b=o[m];let v=-1;if(b)for(;++v<b.length;){const x=b[v];if(!x.previous||x.previous.call(i,i.previous))return!0}return!1}}}function v0(e){return r;function r(l,i){let o=-1,u;for(;++o<=l.length;)u===void 0?l[o]&&l[o][1].type==="data"&&(u=o,o++):(!l[o]||l[o][1].type!=="data")&&(o!==u+2&&(l[u][1].end=l[o-1][1].end,l.splice(u+2,o-u-2),o=u+2),u=void 0);return e?e(l,i):l}}function sA(e,r){let l=0;for(;++l<=e.length;)if((l===e.length||e[l][1].type==="lineEnding")&&e[l-1][1].type==="data"){const i=e[l-1][1],o=r.sliceStream(i);let u=o.length,c=-1,f=0,h;for(;u--;){const p=o[u];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(p===-2)h=!0,f++;else if(p!==-1){u++;break}}if(r._contentTypeTextTrailing&&l===e.length&&(f=0),f){const p={type:l===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:i.start._bufferIndex+c,_index:i.start._index+u,line:i.end.line,column:i.end.column-f,offset:i.end.offset-f},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(e.splice(l,0,["enter",p,r],["exit",p,r]),l+=2)}l++}return e}const uA={42:an,43:an,45:an,48:an,49:an,50:an,51:an,52:an,53:an,54:an,55:an,56:an,57:an,62:d0},cA={91:pN},fA={[-2]:td,[-1]:td,32:td},dA={35:vN,42:Ds,45:[Ky,Ds],60:EN,61:Ky,95:Ds,96:Xy,126:Xy},hA={38:p0,92:h0},pA={[-5]:nd,[-4]:nd,[-3]:nd,33:qN,38:p0,42:Kd,60:[$4,_N],91:$N,92:[yN,h0],93:Lh,95:Kd,96:rN},gA={null:[Kd,iA]},mA={null:[42,95]},bA={null:[]},yA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:mA,contentInitial:cA,disable:bA,document:uA,flow:dA,flowInitial:fA,insideSpan:gA,string:hA,text:pA},Symbol.toStringTag,{value:"Module"}));function xA(e,r,l){let i={_bufferIndex:-1,_index:0,line:l&&l.line||1,column:l&&l.column||1,offset:l&&l.offset||0};const o={},u=[];let c=[],f=[];const h={attempt:O(I),check:O(L),consume:C,enter:j,exit:z,interrupt:O(L,{interrupt:!0})},p={code:null,containerState:{},defineSkip:w,events:[],now:S,parser:e,previous:null,sliceSerialize:v,sliceStream:x,write:b};let m=r.tokenize.call(p,h);return r.resolveAll&&u.push(r),p;function b(H){return c=On(c,H),N(),c[c.length-1]!==null?[]:(Z(r,0),p.events=xu(u,p.events,p),p.events)}function v(H,G){return wA(x(H),G)}function x(H){return vA(c,H)}function S(){const{_bufferIndex:H,_index:G,line:Q,column:U,offset:Y}=i;return{_bufferIndex:H,_index:G,line:Q,column:U,offset:Y}}function w(H){o[H.line]=H.column,F()}function N(){let H;for(;i._index<c.length;){const G=c[i._index];if(typeof G=="string")for(H=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===H&&i._bufferIndex<G.length;)E(G.charCodeAt(i._bufferIndex));else E(G)}}function E(H){m=m(H)}function C(H){Ae(H)?(i.line++,i.column=1,i.offset+=H===-3?2:1,F()):H!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=H}function j(H,G){const Q=G||{};return Q.type=H,Q.start=S(),p.events.push(["enter",Q,p]),f.push(Q),Q}function z(H){const G=f.pop();return G.end=S(),p.events.push(["exit",G,p]),G}function I(H,G){Z(H,G.from)}function L(H,G){G.restore()}function O(H,G){return Q;function Q(U,Y,B){let X,M,V,R;return Array.isArray(U)?q(U):"tokenize"in U?q([U]):D(U);function D(fe){return me;function me(ye){const pe=ye!==null&&fe[ye],ge=ye!==null&&fe.null,xe=[...Array.isArray(pe)?pe:pe?[pe]:[],...Array.isArray(ge)?ge:ge?[ge]:[]];return q(xe)(ye)}}function q(fe){return X=fe,M=0,fe.length===0?B:A(fe[M])}function A(fe){return me;function me(ye){return R=P(),V=fe,fe.partial||(p.currentConstruct=fe),fe.name&&p.parser.constructs.disable.null.includes(fe.name)?le():fe.tokenize.call(G?Object.assign(Object.create(p),G):p,h,te,le)(ye)}}function te(fe){return H(V,R),Y}function le(fe){return R.restore(),++M<X.length?A(X[M]):B}}}function Z(H,G){H.resolveAll&&!u.includes(H)&&u.push(H),H.resolve&&kn(p.events,G,p.events.length-G,H.resolve(p.events.slice(G),p)),H.resolveTo&&(p.events=H.resolveTo(p.events,p))}function P(){const H=S(),G=p.previous,Q=p.currentConstruct,U=p.events.length,Y=Array.from(f);return{from:U,restore:B};function B(){i=H,p.previous=G,p.currentConstruct=Q,p.events.length=U,f=Y,F()}}function F(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function vA(e,r){const l=r.start._index,i=r.start._bufferIndex,o=r.end._index,u=r.end._bufferIndex;let c;if(l===o)c=[e[l].slice(i,u)];else{if(c=e.slice(l,o),i>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(i):c.shift()}u>0&&c.push(e[o].slice(0,u))}return c}function wA(e,r){let l=-1;const i=[];let o;for(;++l<e.length;){const u=e[l];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
|
|
31
|
-
`;break}case-3:{c=`\r
|
|
32
|
-
`;break}case-2:{c=r?" ":" ";break}case-1:{if(!r&&o)continue;c=" ";break}default:c=String.fromCharCode(u)}o=u===-2,i.push(c)}return i.join("")}function SA(e){const i={constructs:c0([yA,...(e||{}).extensions||[]]),content:o(F4),defined:[],document:o(I4),flow:o(rA),lazy:{},string:o(aA),text:o(oA)};return i;function o(u){return c;function c(f){return xA(i,u,f)}}}function kA(e){for(;!g0(e););return e}const Qy=/[\0\t\n\r]/g;function EA(){let e=1,r="",l=!0,i;return o;function o(u,c,f){const h=[];let p,m,b,v,x;for(u=r+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),b=0,r="",l&&(u.charCodeAt(0)===65279&&b++,l=void 0);b<u.length;){if(Qy.lastIndex=b,p=Qy.exec(u),v=p&&p.index!==void 0?p.index:u.length,x=u.charCodeAt(v),!p){r=u.slice(b);break}if(x===10&&b===v&&i)h.push(-3),i=void 0;else switch(i&&(h.push(-5),i=void 0),b<v&&(h.push(u.slice(b,v)),e+=v-b),x){case 0:{h.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,h.push(-2);e++<m;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:i=!0,e=1}b=v+1}return f&&(i&&h.push(-5),r&&h.push(r),h.push(null)),h}}const CA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function NA(e){return e.replace(CA,AA)}function AA(e,r,l){if(r)return r;if(l.charCodeAt(0)===35){const o=l.charCodeAt(1),u=o===120||o===88;return f0(l.slice(u?2:1),u?16:10)}return _h(l)||e}const w0={}.hasOwnProperty;function TA(e,r,l){return typeof r!="string"&&(l=r,r=void 0),jA(l)(kA(SA(l).document().write(EA()(e,r,!0))))}function jA(e){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(pt),autolinkProtocol:P,autolinkEmail:P,atxHeading:u($e),blockQuote:u(ge),characterEscape:P,characterReference:P,codeFenced:u(xe),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(xe,c),codeText:u(de,c),codeTextData:P,data:P,codeFlowValue:P,definition:u(we),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(Ee),hardBreakEscape:u(Ke),hardBreakTrailing:u(Ke),htmlFlow:u(Me,c),htmlFlowData:P,htmlText:u(Me,c),htmlTextData:P,image:u(Bt),label:c,link:u(pt),listItem:u(Gt),listItemValue:v,listOrdered:u(gt,b),listUnordered:u(gt),paragraph:u(Yt),reference:A,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u($e),strong:u(tt),thematicBreak:u(nr)},exit:{atxHeading:h(),atxHeadingSequence:I,autolink:h(),autolinkEmail:pe,autolinkProtocol:ye,blockQuote:h(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:fe,characterReference:me,codeFenced:h(N),codeFencedFence:w,codeFencedFenceInfo:x,codeFencedFenceMeta:S,codeFlowValue:F,codeIndented:h(E),codeText:h(Y),codeTextData:F,data:F,definition:h(),definitionDestinationString:z,definitionLabelString:C,definitionTitleString:j,emphasis:h(),hardBreakEscape:h(G),hardBreakTrailing:h(G),htmlFlow:h(Q),htmlFlowData:F,htmlText:h(U),htmlTextData:F,image:h(X),label:V,labelText:M,lineEnding:H,link:h(B),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:te,resourceDestinationString:R,resourceTitleString:D,resource:q,setextHeading:h(Z),setextHeadingLineSequence:O,setextHeadingText:L,strong:h(),thematicBreak:h()}};S0(r,(e||{}).mdastExtensions||[]);const l={};return i;function i(ae){let be={type:"root",children:[]};const Te={stack:[be],tokenStack:[],config:r,enter:f,exit:p,buffer:c,resume:m,data:l},Oe=[];let Ve=-1;for(;++Ve<ae.length;)if(ae[Ve][1].type==="listOrdered"||ae[Ve][1].type==="listUnordered")if(ae[Ve][0]==="enter")Oe.push(Ve);else{const Lt=Oe.pop();Ve=o(ae,Lt,Ve)}for(Ve=-1;++Ve<ae.length;){const Lt=r[ae[Ve][0]];w0.call(Lt,ae[Ve][1].type)&&Lt[ae[Ve][1].type].call(Object.assign({sliceSerialize:ae[Ve][2].sliceSerialize},Te),ae[Ve][1])}if(Te.tokenStack.length>0){const Lt=Te.tokenStack[Te.tokenStack.length-1];(Lt[1]||Jy).call(Te,void 0,Lt[0])}for(be.position={start:tl(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:tl(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},Ve=-1;++Ve<r.transforms.length;)be=r.transforms[Ve](be)||be;return be}function o(ae,be,Te){let Oe=be-1,Ve=-1,Lt=!1,zn,Dt,mt,It;for(;++Oe<=Te;){const Je=ae[Oe];switch(Je[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Je[0]==="enter"?Ve++:Ve--,It=void 0;break}case"lineEndingBlank":{Je[0]==="enter"&&(zn&&!It&&!Ve&&!mt&&(mt=Oe),It=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:It=void 0}if(!Ve&&Je[0]==="enter"&&Je[1].type==="listItemPrefix"||Ve===-1&&Je[0]==="exit"&&(Je[1].type==="listUnordered"||Je[1].type==="listOrdered")){if(zn){let Pn=Oe;for(Dt=void 0;Pn--;){const fn=ae[Pn];if(fn[1].type==="lineEnding"||fn[1].type==="lineEndingBlank"){if(fn[0]==="exit")continue;Dt&&(ae[Dt][1].type="lineEndingBlank",Lt=!0),fn[1].type="lineEnding",Dt=Pn}else if(!(fn[1].type==="linePrefix"||fn[1].type==="blockQuotePrefix"||fn[1].type==="blockQuotePrefixWhitespace"||fn[1].type==="blockQuoteMarker"||fn[1].type==="listItemIndent"))break}mt&&(!Dt||mt<Dt)&&(zn._spread=!0),zn.end=Object.assign({},Dt?ae[Dt][1].start:Je[1].end),ae.splice(Dt||Oe,0,["exit",zn,Je[2]]),Oe++,Te++}if(Je[1].type==="listItemPrefix"){const Pn={type:"listItem",_spread:!1,start:Object.assign({},Je[1].start),end:void 0};zn=Pn,ae.splice(Oe,0,["enter",Pn,Je[2]]),Oe++,Te++,mt=void 0,It=!0}}}return ae[be][1]._spread=Lt,Te}function u(ae,be){return Te;function Te(Oe){f.call(this,ae(Oe),Oe),be&&be.call(this,Oe)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ae,be,Te){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([be,Te||void 0]),ae.position={start:tl(be.start),end:void 0}}function h(ae){return be;function be(Te){ae&&ae.call(this,Te),p.call(this,Te)}}function p(ae,be){const Te=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==ae.type&&(be?be.call(this,ae,Oe[0]):(Oe[1]||Jy).call(this,ae,Oe[0]));else throw new Error("Cannot close `"+ae.type+"` ("+Ia({start:ae.start,end:ae.end})+"): it’s not open");Te.position.end=tl(ae.end)}function m(){return Rh(this.stack.pop())}function b(){this.data.expectingFirstListItemValue=!0}function v(ae){if(this.data.expectingFirstListItemValue){const be=this.stack[this.stack.length-2];be.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function x(){const ae=this.resume(),be=this.stack[this.stack.length-1];be.lang=ae}function S(){const ae=this.resume(),be=this.stack[this.stack.length-1];be.meta=ae}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const ae=this.resume(),be=this.stack[this.stack.length-1];be.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const ae=this.resume(),be=this.stack[this.stack.length-1];be.value=ae.replace(/(\r?\n|\r)$/g,"")}function C(ae){const be=this.resume(),Te=this.stack[this.stack.length-1];Te.label=be,Te.identifier=qn(this.sliceSerialize(ae)).toLowerCase()}function j(){const ae=this.resume(),be=this.stack[this.stack.length-1];be.title=ae}function z(){const ae=this.resume(),be=this.stack[this.stack.length-1];be.url=ae}function I(ae){const be=this.stack[this.stack.length-1];if(!be.depth){const Te=this.sliceSerialize(ae).length;be.depth=Te}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function O(ae){const be=this.stack[this.stack.length-1];be.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function Z(){this.data.setextHeadingSlurpLineEnding=void 0}function P(ae){const Te=this.stack[this.stack.length-1].children;let Oe=Te[Te.length-1];(!Oe||Oe.type!=="text")&&(Oe=at(),Oe.position={start:tl(ae.start),end:void 0},Te.push(Oe)),this.stack.push(Oe)}function F(ae){const be=this.stack.pop();be.value+=this.sliceSerialize(ae),be.position.end=tl(ae.end)}function H(ae){const be=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Te=be.children[be.children.length-1];Te.position.end=tl(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(be.type)&&(P.call(this,ae),F.call(this,ae))}function G(){this.data.atHardBreak=!0}function Q(){const ae=this.resume(),be=this.stack[this.stack.length-1];be.value=ae}function U(){const ae=this.resume(),be=this.stack[this.stack.length-1];be.value=ae}function Y(){const ae=this.resume(),be=this.stack[this.stack.length-1];be.value=ae}function B(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=be,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function X(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const be=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=be,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function M(ae){const be=this.sliceSerialize(ae),Te=this.stack[this.stack.length-2];Te.label=NA(be),Te.identifier=qn(be).toLowerCase()}function V(){const ae=this.stack[this.stack.length-1],be=this.resume(),Te=this.stack[this.stack.length-1];if(this.data.inReference=!0,Te.type==="link"){const Oe=ae.children;Te.children=Oe}else Te.alt=be}function R(){const ae=this.resume(),be=this.stack[this.stack.length-1];be.url=ae}function D(){const ae=this.resume(),be=this.stack[this.stack.length-1];be.title=ae}function q(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function te(ae){const be=this.resume(),Te=this.stack[this.stack.length-1];Te.label=be,Te.identifier=qn(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function le(ae){this.data.characterReferenceType=ae.type}function fe(ae){const be=this.sliceSerialize(ae),Te=this.data.characterReferenceType;let Oe;Te?(Oe=f0(be,Te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=_h(be);const Ve=this.stack[this.stack.length-1];Ve.value+=Oe}function me(ae){const be=this.stack.pop();be.position.end=tl(ae.end)}function ye(ae){F.call(this,ae);const be=this.stack[this.stack.length-1];be.url=this.sliceSerialize(ae)}function pe(ae){F.call(this,ae);const be=this.stack[this.stack.length-1];be.url="mailto:"+this.sliceSerialize(ae)}function ge(){return{type:"blockquote",children:[]}}function xe(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function we(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ee(){return{type:"emphasis",children:[]}}function $e(){return{type:"heading",depth:0,children:[]}}function Ke(){return{type:"break"}}function Me(){return{type:"html",value:""}}function Bt(){return{type:"image",title:null,url:"",alt:null}}function pt(){return{type:"link",title:null,url:"",children:[]}}function gt(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function Gt(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function Yt(){return{type:"paragraph",children:[]}}function tt(){return{type:"strong",children:[]}}function at(){return{type:"text",value:""}}function nr(){return{type:"thematicBreak"}}}function tl(e){return{line:e.line,column:e.column,offset:e.offset}}function S0(e,r){let l=-1;for(;++l<r.length;){const i=r[l];Array.isArray(i)?S0(e,i):RA(e,i)}}function RA(e,r){let l;for(l in r)if(w0.call(r,l))switch(l){case"canContainEols":{const i=r[l];i&&e[l].push(...i);break}case"transforms":{const i=r[l];i&&e[l].push(...i);break}case"enter":case"exit":{const i=r[l];i&&Object.assign(e[l],i);break}}}function Jy(e,r){throw e?new Error("Cannot close `"+e.type+"` ("+Ia({start:e.start,end:e.end})+"): a different token (`"+r.type+"`, "+Ia({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Ia({start:r.start,end:r.end})+") is still open")}function _A(e){const r=this;r.parser=l;function l(i){return TA(i,{...r.data("settings"),...e,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function LA(e,r){const l={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(r),!0)};return e.patch(r,l),e.applyData(r,l)}function DA(e,r){const l={type:"element",tagName:"br",properties:{},children:[]};return e.patch(r,l),[e.applyData(r,l),{type:"text",value:`
|
|
33
|
-
`}]}function OA(e,r){const l=r.value?r.value+`
|
|
34
|
-
`:"",i={},o=r.lang?r.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let u={type:"element",tagName:"code",properties:i,children:[{type:"text",value:l}]};return r.meta&&(u.data={meta:r.meta}),e.patch(r,u),u=e.applyData(r,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(r,u),u}function MA(e,r){const l={type:"element",tagName:"del",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function zA(e,r){const l={type:"element",tagName:"em",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function FA(e,r){const l=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(r.identifier).toUpperCase(),o=zi(i.toLowerCase()),u=e.footnoteOrder.indexOf(i);let c,f=e.footnoteCounts.get(i);f===void 0?(f=0,e.footnoteOrder.push(i),c=e.footnoteOrder.length):c=u+1,f+=1,e.footnoteCounts.set(i,f);const h={type:"element",tagName:"a",properties:{href:"#"+l+"fn-"+o,id:l+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(r,h);const p={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(r,p),e.applyData(r,p)}function BA(e,r){const l={type:"element",tagName:"h"+r.depth,properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function IA(e,r){if(e.options.allowDangerousHtml){const l={type:"raw",value:r.value};return e.patch(r,l),e.applyData(r,l)}}function k0(e,r){const l=r.referenceType;let i="]";if(l==="collapsed"?i+="[]":l==="full"&&(i+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+i}];const o=e.all(r),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=i:o.push({type:"text",value:i}),o}function UA(e,r){const l=String(r.identifier).toUpperCase(),i=e.definitionById.get(l);if(!i)return k0(e,r);const o={src:zi(i.url||""),alt:r.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const u={type:"element",tagName:"img",properties:o,children:[]};return e.patch(r,u),e.applyData(r,u)}function HA(e,r){const l={src:zi(r.url)};r.alt!==null&&r.alt!==void 0&&(l.alt=r.alt),r.title!==null&&r.title!==void 0&&(l.title=r.title);const i={type:"element",tagName:"img",properties:l,children:[]};return e.patch(r,i),e.applyData(r,i)}function qA(e,r){const l={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};e.patch(r,l);const i={type:"element",tagName:"code",properties:{},children:[l]};return e.patch(r,i),e.applyData(r,i)}function PA(e,r){const l=String(r.identifier).toUpperCase(),i=e.definitionById.get(l);if(!i)return k0(e,r);const o={href:zi(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const u={type:"element",tagName:"a",properties:o,children:e.all(r)};return e.patch(r,u),e.applyData(r,u)}function $A(e,r){const l={href:zi(r.url)};r.title!==null&&r.title!==void 0&&(l.title=r.title);const i={type:"element",tagName:"a",properties:l,children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function VA(e,r,l){const i=e.all(r),o=l?GA(l):E0(r),u={},c=[];if(typeof r.checked=="boolean"){const m=i[0];let b;m&&m.type==="element"&&m.tagName==="p"?b=m:(b={type:"element",tagName:"p",properties:{},children:[]},i.unshift(b)),b.children.length>0&&b.children.unshift({type:"text",value:" "}),b.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<i.length;){const m=i[f];(o||f!==0||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
|
|
35
|
-
`}),m.type==="element"&&m.tagName==="p"&&!o?c.push(...m.children):c.push(m)}const h=i[i.length-1];h&&(o||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
|
|
36
|
-
`});const p={type:"element",tagName:"li",properties:u,children:c};return e.patch(r,p),e.applyData(r,p)}function GA(e){let r=!1;if(e.type==="list"){r=e.spread||!1;const l=e.children;let i=-1;for(;!r&&++i<l.length;)r=E0(l[i])}return r}function E0(e){const r=e.spread;return r??e.children.length>1}function YA(e,r){const l={},i=e.all(r);let o=-1;for(typeof r.start=="number"&&r.start!==1&&(l.start=r.start);++o<i.length;){const c=i[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){l.className=["contains-task-list"];break}}const u={type:"element",tagName:r.ordered?"ol":"ul",properties:l,children:e.wrap(i,!0)};return e.patch(r,u),e.applyData(r,u)}function XA(e,r){const l={type:"element",tagName:"p",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function ZA(e,r){const l={type:"root",children:e.wrap(e.all(r))};return e.patch(r,l),e.applyData(r,l)}function KA(e,r){const l={type:"element",tagName:"strong",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}function QA(e,r){const l=e.all(r),i=l.shift(),o=[];if(i){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(r.children[0],c),o.push(c)}if(l.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(l,!0)},f=Nh(r.children[1]),h=r0(r.children[r.children.length-1]);f&&h&&(c.position={start:f,end:h}),o.push(c)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(r,u),e.applyData(r,u)}function JA(e,r,l){const i=l?l.children:void 0,u=(i?i.indexOf(r):1)===0?"th":"td",c=l&&l.type==="table"?l.align:void 0,f=c?c.length:r.children.length;let h=-1;const p=[];for(;++h<f;){const b=r.children[h],v={},x=c?c[h]:void 0;x&&(v.align=x);let S={type:"element",tagName:u,properties:v,children:[]};b&&(S.children=e.all(b),e.patch(b,S),S=e.applyData(b,S)),p.push(S)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(r,m),e.applyData(r,m)}function WA(e,r){const l={type:"element",tagName:"td",properties:{},children:e.all(r)};return e.patch(r,l),e.applyData(r,l)}const Wy=9,ex=32;function eT(e){const r=String(e),l=/\r?\n|\r/g;let i=l.exec(r),o=0;const u=[];for(;i;)u.push(tx(r.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=l.exec(r);return u.push(tx(r.slice(o),o>0,!1)),u.join("")}function tx(e,r,l){let i=0,o=e.length;if(r){let u=e.codePointAt(i);for(;u===Wy||u===ex;)i++,u=e.codePointAt(i)}if(l){let u=e.codePointAt(o-1);for(;u===Wy||u===ex;)o--,u=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function tT(e,r){const l={type:"text",value:eT(String(r.value))};return e.patch(r,l),e.applyData(r,l)}function nT(e,r){const l={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(r,l),e.applyData(r,l)}const rT={blockquote:LA,break:DA,code:OA,delete:MA,emphasis:zA,footnoteReference:FA,heading:BA,html:IA,imageReference:UA,image:HA,inlineCode:qA,linkReference:PA,link:$A,listItem:VA,list:YA,paragraph:XA,root:ZA,strong:KA,table:QA,tableCell:WA,tableRow:JA,text:tT,thematicBreak:nT,toml:Ns,yaml:Ns,definition:Ns,footnoteDefinition:Ns};function Ns(){}const C0=-1,vu=0,Ha=1,Zs=2,Dh=3,Oh=4,Mh=5,zh=6,N0=7,A0=8,nx=typeof self=="object"?self:globalThis,lT=(e,r)=>{const l=(o,u)=>(e.set(u,o),o),i=o=>{if(e.has(o))return e.get(o);const[u,c]=r[o];switch(u){case vu:case C0:return l(c,o);case Ha:{const f=l([],o);for(const h of c)f.push(i(h));return f}case Zs:{const f=l({},o);for(const[h,p]of c)f[i(h)]=i(p);return f}case Dh:return l(new Date(c),o);case Oh:{const{source:f,flags:h}=c;return l(new RegExp(f,h),o)}case Mh:{const f=l(new Map,o);for(const[h,p]of c)f.set(i(h),i(p));return f}case zh:{const f=l(new Set,o);for(const h of c)f.add(i(h));return f}case N0:{const{name:f,message:h}=c;return l(new nx[f](h),o)}case A0:return l(BigInt(c),o);case"BigInt":return l(Object(BigInt(c)),o);case"ArrayBuffer":return l(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return l(new DataView(f),c)}}return l(new nx[u](c),o)};return i},rx=e=>lT(new Map,e)(0),ki="",{toString:iT}={},{keys:aT}=Object,Oa=e=>{const r=typeof e;if(r!=="object"||!e)return[vu,r];const l=iT.call(e).slice(8,-1);switch(l){case"Array":return[Ha,ki];case"Object":return[Zs,ki];case"Date":return[Dh,ki];case"RegExp":return[Oh,ki];case"Map":return[Mh,ki];case"Set":return[zh,ki];case"DataView":return[Ha,l]}return l.includes("Array")?[Ha,l]:l.includes("Error")?[N0,l]:[Zs,l]},As=([e,r])=>e===vu&&(r==="function"||r==="symbol"),oT=(e,r,l,i)=>{const o=(c,f)=>{const h=i.push(c)-1;return l.set(f,h),h},u=c=>{if(l.has(c))return l.get(c);let[f,h]=Oa(c);switch(f){case vu:{let m=c;switch(h){case"bigint":f=A0,m=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);m=null;break;case"undefined":return o([C0],c)}return o([f,m],c)}case Ha:{if(h){let v=c;return h==="DataView"?v=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(v=new Uint8Array(c)),o([h,[...v]],c)}const m=[],b=o([f,m],c);for(const v of c)m.push(u(v));return b}case Zs:{if(h)switch(h){case"BigInt":return o([h,c.toString()],c);case"Boolean":case"Number":case"String":return o([h,c.valueOf()],c)}if(r&&"toJSON"in c)return u(c.toJSON());const m=[],b=o([f,m],c);for(const v of aT(c))(e||!As(Oa(c[v])))&&m.push([u(v),u(c[v])]);return b}case Dh:return o([f,c.toISOString()],c);case Oh:{const{source:m,flags:b}=c;return o([f,{source:m,flags:b}],c)}case Mh:{const m=[],b=o([f,m],c);for(const[v,x]of c)(e||!(As(Oa(v))||As(Oa(x))))&&m.push([u(v),u(x)]);return b}case zh:{const m=[],b=o([f,m],c);for(const v of c)(e||!As(Oa(v)))&&m.push(u(v));return b}}const{message:p}=c;return o([f,{name:h,message:p}],c)};return u},lx=(e,{json:r,lossy:l}={})=>{const i=[];return oT(!(r||l),!!r,new Map,i)(e),i},Ks=typeof structuredClone=="function"?(e,r)=>r&&("json"in r||"lossy"in r)?rx(lx(e,r)):structuredClone(e):(e,r)=>rx(lx(e,r));function sT(e,r){const l=[{type:"text",value:"↩"}];return r>1&&l.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),l}function uT(e,r){return"Back to reference "+(e+1)+(r>1?"-"+r:"")}function cT(e){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=e.options.footnoteBackContent||sT,i=e.options.footnoteBackLabel||uT,o=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[h]);if(!p)continue;const m=e.all(p),b=String(p.identifier).toUpperCase(),v=zi(b.toLowerCase());let x=0;const S=[],w=e.footnoteCounts.get(b);for(;w!==void 0&&++x<=w;){S.length>0&&S.push({type:"text",value:" "});let C=typeof l=="string"?l:l(h,x);typeof C=="string"&&(C={type:"text",value:C}),S.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+v+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(h,x),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const N=m[m.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const C=N.children[N.children.length-1];C&&C.type==="text"?C.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...S)}else m.push(...S);const E={type:"element",tagName:"li",properties:{id:r+"fn-"+v},children:e.wrap(m,!0)};e.patch(p,E),f.push(E)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Ks(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
37
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
38
|
-
`}]}}const wu=(function(e){if(e==null)return pT;if(typeof e=="function")return Su(e);if(typeof e=="object")return Array.isArray(e)?fT(e):dT(e);if(typeof e=="string")return hT(e);throw new Error("Expected function, string, or object as test")});function fT(e){const r=[];let l=-1;for(;++l<e.length;)r[l]=wu(e[l]);return Su(i);function i(...o){let u=-1;for(;++u<r.length;)if(r[u].apply(this,o))return!0;return!1}}function dT(e){const r=e;return Su(l);function l(i){const o=i;let u;for(u in e)if(o[u]!==r[u])return!1;return!0}}function hT(e){return Su(r);function r(l){return l&&l.type===e}}function Su(e){return r;function r(l,i,o){return!!(gT(l)&&e.call(this,l,typeof i=="number"?i:void 0,o||void 0))}}function pT(){return!0}function gT(e){return e!==null&&typeof e=="object"&&"type"in e}const T0=[],mT=!0,Qd=!1,bT="skip";function j0(e,r,l,i){let o;typeof r=="function"&&typeof l!="function"?(i=l,l=r):o=r;const u=wu(o),c=i?-1:1;f(e,void 0,[])();function f(h,p,m){const b=h&&typeof h=="object"?h:{};if(typeof b.type=="string"){const x=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(h.type+(x?"<"+x+">":""))+")"})}return v;function v(){let x=T0,S,w,N;if((!r||u(h,p,m[m.length-1]||void 0))&&(x=yT(l(h,m)),x[0]===Qd))return x;if("children"in h&&h.children){const E=h;if(E.children&&x[0]!==bT)for(w=(i?E.children.length:-1)+c,N=m.concat(E);w>-1&&w<E.children.length;){const C=E.children[w];if(S=f(C,w,N)(),S[0]===Qd)return S;w=typeof S[1]=="number"?S[1]:w+c}}return x}}}function yT(e){return Array.isArray(e)?e:typeof e=="number"?[mT,e]:e==null?T0:[e]}function Fh(e,r,l,i){let o,u,c;typeof r=="function"&&typeof l!="function"?(u=void 0,c=r,o=l):(u=r,c=l,o=i),j0(e,u,f,o);function f(h,p){const m=p[p.length-1],b=m?m.children.indexOf(h):void 0;return c(h,b,m)}}const Jd={}.hasOwnProperty,xT={};function vT(e,r){const l=r||xT,i=new Map,o=new Map,u=new Map,c={...rT,...l.handlers},f={all:p,applyData:ST,definitionById:i,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:c,one:h,options:l,patch:wT,wrap:ET};return Fh(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const b=m.type==="definition"?i:o,v=String(m.identifier).toUpperCase();b.has(v)||b.set(v,m)}}),f;function h(m,b){const v=m.type,x=f.handlers[v];if(Jd.call(f.handlers,v)&&x)return x(f,m,b);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in m){const{children:w,...N}=m,E=Ks(N);return E.children=f.all(m),E}return Ks(m)}return(f.options.unknownHandler||kT)(f,m,b)}function p(m){const b=[];if("children"in m){const v=m.children;let x=-1;for(;++x<v.length;){const S=f.one(v[x],m);if(S){if(x&&v[x-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=ix(S.value)),!Array.isArray(S)&&S.type==="element")){const w=S.children[0];w&&w.type==="text"&&(w.value=ix(w.value))}Array.isArray(S)?b.push(...S):b.push(S)}}}return b}}function wT(e,r){e.position&&(r.position=u4(e))}function ST(e,r){let l=r;if(e&&e.data){const i=e.data.hName,o=e.data.hChildren,u=e.data.hProperties;if(typeof i=="string")if(l.type==="element")l.tagName=i;else{const c="children"in l?l.children:[l];l={type:"element",tagName:i,properties:{},children:c}}l.type==="element"&&u&&Object.assign(l.properties,Ks(u)),"children"in l&&l.children&&o!==null&&o!==void 0&&(l.children=o)}return l}function kT(e,r){const l=r.data||{},i="value"in r&&!(Jd.call(l,"hProperties")||Jd.call(l,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function ET(e,r){const l=[];let i=-1;for(r&&l.push({type:"text",value:`
|
|
39
|
-
`});++i<e.length;)i&&l.push({type:"text",value:`
|
|
40
|
-
`}),l.push(e[i]);return r&&e.length>0&&l.push({type:"text",value:`
|
|
41
|
-
`}),l}function ix(e){let r=0,l=e.charCodeAt(r);for(;l===9||l===32;)r++,l=e.charCodeAt(r);return e.slice(r)}function ax(e,r){const l=vT(e,r),i=l.one(e,void 0),o=cT(l),u=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
|
|
42
|
-
`},o),u}function CT(e,r){return e&&"run"in e?async function(l,i){const o=ax(l,{file:i,...r});await e.run(o,i)}:function(l,i){return ax(l,{file:i,...e||r})}}function ox(e){if(e)throw e}var rd,sx;function NT(){if(sx)return rd;sx=1;var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,l=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(p){return typeof Array.isArray=="function"?Array.isArray(p):r.call(p)==="[object Array]"},u=function(p){if(!p||r.call(p)!=="[object Object]")return!1;var m=e.call(p,"constructor"),b=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!m&&!b)return!1;var v;for(v in p);return typeof v>"u"||e.call(p,v)},c=function(p,m){l&&m.name==="__proto__"?l(p,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):p[m.name]=m.newValue},f=function(p,m){if(m==="__proto__")if(e.call(p,m)){if(i)return i(p,m).value}else return;return p[m]};return rd=function h(){var p,m,b,v,x,S,w=arguments[0],N=1,E=arguments.length,C=!1;for(typeof w=="boolean"&&(C=w,w=arguments[1]||{},N=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});N<E;++N)if(p=arguments[N],p!=null)for(m in p)b=f(w,m),v=f(p,m),w!==v&&(C&&v&&(u(v)||(x=o(v)))?(x?(x=!1,S=b&&o(b)?b:[]):S=b&&u(b)?b:{},c(w,{name:m,newValue:h(C,S,v)})):typeof v<"u"&&c(w,{name:m,newValue:v}));return w},rd}var AT=NT();const ld=lu(AT);function Wd(e){if(typeof e!="object"||e===null)return!1;const r=Object.getPrototypeOf(e);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function TT(){const e=[],r={run:l,use:i};return r;function l(...o){let u=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...o);function f(h,...p){const m=e[++u];let b=-1;if(h){c(h);return}for(;++b<o.length;)(p[b]===null||p[b]===void 0)&&(p[b]=o[b]);o=p,m?jT(m,f)(...p):c(null,...p)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),r}}function jT(e,r){let l;return i;function i(...c){const f=e.length>c.length;let h;f&&c.push(o);try{h=e.apply(this,c)}catch(p){const m=p;if(f&&l)throw m;return o(m)}f||(h&&h.then&&typeof h.then=="function"?h.then(u,o):h instanceof Error?o(h):u(h))}function o(c,...f){l||(l=!0,r(c,...f))}function u(c){o(null,c)}}const Qn={basename:RT,dirname:_T,extname:LT,join:DT,sep:"/"};function RT(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');no(e);let l=0,i=-1,o=e.length,u;if(r===void 0||r.length===0||r.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(u){l=o+1;break}}else i<0&&(u=!0,i=o+1);return i<0?"":e.slice(l,i)}if(r===e)return"";let c=-1,f=r.length-1;for(;o--;)if(e.codePointAt(o)===47){if(u){l=o+1;break}}else c<0&&(u=!0,c=o+1),f>-1&&(e.codePointAt(o)===r.codePointAt(f--)?f<0&&(i=o):(f=-1,i=c));return l===i?i=c:i<0&&(i=e.length),e.slice(l,i)}function _T(e){if(no(e),e.length===0)return".";let r=-1,l=e.length,i;for(;--l;)if(e.codePointAt(l)===47){if(i){r=l;break}}else i||(i=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)}function LT(e){no(e);let r=e.length,l=-1,i=0,o=-1,u=0,c;for(;r--;){const f=e.codePointAt(r);if(f===47){if(c){i=r+1;break}continue}l<0&&(c=!0,l=r+1),f===46?o<0?o=r:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||l<0||u===0||u===1&&o===l-1&&o===i+1?"":e.slice(o,l)}function DT(...e){let r=-1,l;for(;++r<e.length;)no(e[r]),e[r]&&(l=l===void 0?e[r]:l+"/"+e[r]);return l===void 0?".":OT(l)}function OT(e){no(e);const r=e.codePointAt(0)===47;let l=MT(e,!r);return l.length===0&&!r&&(l="."),l.length>0&&e.codePointAt(e.length-1)===47&&(l+="/"),r?"/"+l:l}function MT(e,r){let l="",i=0,o=-1,u=0,c=-1,f,h;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(o===c-1||u===1))if(o!==c-1&&u===2){if(l.length<2||i!==2||l.codePointAt(l.length-1)!==46||l.codePointAt(l.length-2)!==46){if(l.length>2){if(h=l.lastIndexOf("/"),h!==l.length-1){h<0?(l="",i=0):(l=l.slice(0,h),i=l.length-1-l.lastIndexOf("/")),o=c,u=0;continue}}else if(l.length>0){l="",i=0,o=c,u=0;continue}}r&&(l=l.length>0?l+"/..":"..",i=2)}else l.length>0?l+="/"+e.slice(o+1,c):l=e.slice(o+1,c),i=c-o-1;o=c,u=0}else f===46&&u>-1?u++:u=-1}return l}function no(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const zT={cwd:FT};function FT(){return"/"}function eh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function BT(e){if(typeof e=="string")e=new URL(e);else if(!eh(e)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(e.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return IT(e)}function IT(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const r=e.pathname;let l=-1;for(;++l<r.length;)if(r.codePointAt(l)===37&&r.codePointAt(l+1)===50){const i=r.codePointAt(l+2);if(i===70||i===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(r)}const id=["history","path","basename","stem","extname","dirname"];class R0{constructor(r){let l;r?eh(r)?l={path:r}:typeof r=="string"||UT(r)?l={value:r}:l=r:l={},this.cwd="cwd"in l?"":zT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<id.length;){const u=id[i];u in l&&l[u]!==void 0&&l[u]!==null&&(this[u]=u==="history"?[...l[u]]:l[u])}let o;for(o in l)id.includes(o)||(this[o]=l[o])}get basename(){return typeof this.path=="string"?Qn.basename(this.path):void 0}set basename(r){od(r,"basename"),ad(r,"basename"),this.path=Qn.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?Qn.dirname(this.path):void 0}set dirname(r){ux(this.basename,"dirname"),this.path=Qn.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?Qn.extname(this.path):void 0}set extname(r){if(ad(r,"extname"),ux(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Qn.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){eh(r)&&(r=BT(r)),od(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?Qn.basename(this.path,this.extname):void 0}set stem(r){od(r,"stem"),ad(r,"stem"),this.path=Qn.join(this.dirname||"",r+(this.extname||""))}fail(r,l,i){const o=this.message(r,l,i);throw o.fatal=!0,o}info(r,l,i){const o=this.message(r,l,i);return o.fatal=void 0,o}message(r,l,i){const o=new Vt(r,l,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function ad(e,r){if(e&&e.includes(Qn.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+Qn.sep+"`")}function od(e,r){if(!e)throw new Error("`"+r+"` cannot be empty")}function ux(e,r){if(!e)throw new Error("Setting `"+r+"` requires `path` to be set too")}function UT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const HT=(function(e){const i=this.constructor.prototype,o=i[e],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,i),u}),qT={}.hasOwnProperty;class Bh extends HT{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=TT()}copy(){const r=new Bh;let l=-1;for(;++l<this.attachers.length;){const i=this.attachers[l];r.use(...i)}return r.data(ld(!0,{},this.namespace)),r}data(r,l){return typeof r=="string"?arguments.length===2?(cd("data",this.frozen),this.namespace[r]=l,this):qT.call(this.namespace,r)&&this.namespace[r]||void 0:r?(cd("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[l,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=l.call(r,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const l=Ts(r),i=this.parser||this.Parser;return sd("parse",i),i(String(l),l)}process(r,l){const i=this;return this.freeze(),sd("process",this.parser||this.Parser),ud("process",this.compiler||this.Compiler),l?o(void 0,l):new Promise(o);function o(u,c){const f=Ts(r),h=i.parse(f);i.run(h,f,function(m,b,v){if(m||!b||!v)return p(m);const x=b,S=i.stringify(x,v);VT(S)?v.value=S:v.result=S,p(m,v)});function p(m,b){m||!b?c(m):u?u(b):l(void 0,b)}}}processSync(r){let l=!1,i;return this.freeze(),sd("processSync",this.parser||this.Parser),ud("processSync",this.compiler||this.Compiler),this.process(r,o),fx("processSync","process",l),i;function o(u,c){l=!0,ox(u),i=c}}run(r,l,i){cx(r),this.freeze();const o=this.transformers;return!i&&typeof l=="function"&&(i=l,l=void 0),i?u(void 0,i):new Promise(u);function u(c,f){const h=Ts(l);o.run(r,h,p);function p(m,b,v){const x=b||r;m?f(m):c?c(x):i(void 0,x,v)}}}runSync(r,l){let i=!1,o;return this.run(r,l,u),fx("runSync","run",i),o;function u(c,f){ox(c),o=f,i=!0}}stringify(r,l){this.freeze();const i=Ts(l),o=this.compiler||this.Compiler;return ud("stringify",o),cx(r),o(r,i)}use(r,...l){const i=this.attachers,o=this.namespace;if(cd("use",this.frozen),r!=null)if(typeof r=="function")h(r,l);else if(typeof r=="object")Array.isArray(r)?f(r):c(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function u(p){if(typeof p=="function")h(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[m,...b]=p;h(m,b)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(p.plugins),p.settings&&(o.settings=ld(!0,o.settings,p.settings))}function f(p){let m=-1;if(p!=null)if(Array.isArray(p))for(;++m<p.length;){const b=p[m];u(b)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function h(p,m){let b=-1,v=-1;for(;++b<i.length;)if(i[b][0]===p){v=b;break}if(v===-1)i.push([p,...m]);else if(m.length>0){let[x,...S]=m;const w=i[v][1];Wd(w)&&Wd(x)&&(x=ld(!0,w,x)),i[v]=[p,x,...S]}}}}const PT=new Bh().freeze();function sd(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ud(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function cd(e,r){if(r)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function cx(e){if(!Wd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function fx(e,r,l){if(!l)throw new Error("`"+e+"` finished async. Use `"+r+"` instead")}function Ts(e){return $T(e)?e:new R0(e)}function $T(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function VT(e){return typeof e=="string"||GT(e)}function GT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const YT="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",dx=[],hx={allowDangerousHtml:!0},XT=/^(https?|ircs?|mailto|xmpp)$/i,ZT=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ih(e){const r=KT(e),l=QT(e);return JT(r.runSync(r.parse(l),l),e)}function KT(e){const r=e.rehypePlugins||dx,l=e.remarkPlugins||dx,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...hx}:hx;return PT().use(_A).use(l).use(CT,i).use(r)}function QT(e){const r=e.children||"",l=new R0;return typeof r=="string"&&(l.value=r),l}function JT(e,r){const l=r.allowedElements,i=r.allowElement,o=r.components,u=r.disallowedElements,c=r.skipHtml,f=r.unwrapDisallowed,h=r.urlTransform||WT;for(const m of ZT)Object.hasOwn(r,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+YT+m.id,void 0);return Fh(e,p),p4(e,{Fragment:y.Fragment,components:o,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.jsxs,passKeys:!0,passNode:!0});function p(m,b,v){if(m.type==="raw"&&v&&typeof b=="number")return c?v.children.splice(b,1):v.children[b]={type:"text",value:m.value},b;if(m.type==="element"){let x;for(x in ed)if(Object.hasOwn(ed,x)&&Object.hasOwn(m.properties,x)){const S=m.properties[x],w=ed[x];(w===null||w.includes(m.tagName))&&(m.properties[x]=h(String(S||""),x,m))}}if(m.type==="element"){let x=l?!l.includes(m.tagName):u?u.includes(m.tagName):!1;if(!x&&i&&typeof b=="number"&&(x=!i(m,b,v)),x&&v&&typeof b=="number")return f&&m.children?v.children.splice(b,1,...m.children):v.children.splice(b,1),b}}}function WT(e){const r=e.indexOf(":"),l=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return r===-1||o!==-1&&r>o||l!==-1&&r>l||i!==-1&&r>i||XT.test(e.slice(0,r))?e:""}function px(e,r){const l=String(e);if(typeof r!="string")throw new TypeError("Expected character");let i=0,o=l.indexOf(r);for(;o!==-1;)i++,o=l.indexOf(r,o+r.length);return i}function e6(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function t6(e,r,l){const o=wu((l||{}).ignore||[]),u=n6(r);let c=-1;for(;++c<u.length;)j0(e,"text",f);function f(p,m){let b=-1,v;for(;++b<m.length;){const x=m[b],S=v?v.children:void 0;if(o(x,S?S.indexOf(x):void 0,v))return;v=x}if(v)return h(p,m)}function h(p,m){const b=m[m.length-1],v=u[c][0],x=u[c][1];let S=0;const N=b.children.indexOf(p);let E=!1,C=[];v.lastIndex=0;let j=v.exec(p.value);for(;j;){const z=j.index,I={index:j.index,input:j.input,stack:[...m,p]};let L=x(...j,I);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?v.lastIndex=z+1:(S!==z&&C.push({type:"text",value:p.value.slice(S,z)}),Array.isArray(L)?C.push(...L):L&&C.push(L),S=z+j[0].length,E=!0),!v.global)break;j=v.exec(p.value)}return E?(S<p.value.length&&C.push({type:"text",value:p.value.slice(S)}),b.children.splice(N,1,...C)):C=[p],N+C.length}}function n6(e){const r=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const l=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<l.length;){const o=l[i];r.push([r6(o[0]),l6(o[1])])}return r}function r6(e){return typeof e=="string"?new RegExp(e6(e),"g"):e}function l6(e){return typeof e=="function"?e:function(){return e}}const fd="phrasing",dd=["autolink","link","image","label"];function i6(){return{transforms:[d6],enter:{literalAutolink:o6,literalAutolinkEmail:hd,literalAutolinkHttp:hd,literalAutolinkWww:hd},exit:{literalAutolink:f6,literalAutolinkEmail:c6,literalAutolinkHttp:s6,literalAutolinkWww:u6}}}function a6(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:fd,notInConstruct:dd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:fd,notInConstruct:dd},{character:":",before:"[ps]",after:"\\/",inConstruct:fd,notInConstruct:dd}]}}function o6(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function hd(e){this.config.enter.autolinkProtocol.call(this,e)}function s6(e){this.config.exit.autolinkProtocol.call(this,e)}function u6(e){this.config.exit.data.call(this,e);const r=this.stack[this.stack.length-1];r.type,r.url="http://"+this.sliceSerialize(e)}function c6(e){this.config.exit.autolinkEmail.call(this,e)}function f6(e){this.exit(e)}function d6(e){t6(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,h6],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),p6]],{ignore:["link","linkReference"]})}function h6(e,r,l,i,o){let u="";if(!_0(o)||(/^w/i.test(r)&&(l=r+l,r="",u="http://"),!g6(l)))return!1;const c=m6(l+i);if(!c[0])return!1;const f={type:"link",title:null,url:u+r+c[0],children:[{type:"text",value:r+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function p6(e,r,l,i){return!_0(i,!0)||/[-\d_]$/.test(l)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+l,children:[{type:"text",value:r+"@"+l}]}}function g6(e){const r=e.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function m6(e){const r=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!r)return[e,void 0];e=e.slice(0,r.index);let l=r[0],i=l.indexOf(")");const o=px(e,"(");let u=px(e,")");for(;i!==-1&&o>u;)e+=l.slice(0,i+1),l=l.slice(i+1),i=l.indexOf(")"),u++;return[e,l]}function _0(e,r){const l=e.input.charCodeAt(e.index-1);return(e.index===0||Fl(l)||yu(l))&&(!r||l!==47)}L0.peek=C6;function b6(){this.buffer()}function y6(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function x6(){this.buffer()}function v6(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function w6(e){const r=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=qn(this.sliceSerialize(e)).toLowerCase(),l.label=r}function S6(e){this.exit(e)}function k6(e){const r=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=qn(this.sliceSerialize(e)).toLowerCase(),l.label=r}function E6(e){this.exit(e)}function C6(){return"["}function L0(e,r,l,i){const o=l.createTracker(i);let u=o.move("[^");const c=l.enter("footnoteReference"),f=l.enter("reference");return u+=o.move(l.safe(l.associationId(e),{after:"]",before:u})),f(),c(),u+=o.move("]"),u}function N6(){return{enter:{gfmFootnoteCallString:b6,gfmFootnoteCall:y6,gfmFootnoteDefinitionLabelString:x6,gfmFootnoteDefinition:v6},exit:{gfmFootnoteCallString:w6,gfmFootnoteCall:S6,gfmFootnoteDefinitionLabelString:k6,gfmFootnoteDefinition:E6}}}function A6(e){let r=!1;return e&&e.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:l,footnoteReference:L0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(i,o,u,c){const f=u.createTracker(c);let h=f.move("[^");const p=u.enter("footnoteDefinition"),m=u.enter("label");return h+=f.move(u.safe(u.associationId(i),{before:h,after:"]"})),m(),h+=f.move("]:"),i.children&&i.children.length>0&&(f.shift(4),h+=f.move((r?`
|
|
43
|
-
`:" ")+u.indentLines(u.containerFlow(i,f.current()),r?D0:T6))),p(),h}}function T6(e,r,l){return r===0?e:D0(e,r,l)}function D0(e,r,l){return(l?"":" ")+e}const j6=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];O0.peek=O6;function R6(){return{canContainEols:["delete"],enter:{strikethrough:L6},exit:{strikethrough:D6}}}function _6(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:j6}],handlers:{delete:O0}}}function L6(e){this.enter({type:"delete",children:[]},e)}function D6(e){this.exit(e)}function O0(e,r,l,i){const o=l.createTracker(i),u=l.enter("strikethrough");let c=o.move("~~");return c+=l.containerPhrasing(e,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),u(),c}function O6(){return"~"}function M6(e){return e.length}function z6(e,r){const l=r||{},i=(l.align||[]).concat(),o=l.stringLength||M6,u=[],c=[],f=[],h=[];let p=0,m=-1;for(;++m<e.length;){const w=[],N=[];let E=-1;for(e[m].length>p&&(p=e[m].length);++E<e[m].length;){const C=F6(e[m][E]);if(l.alignDelimiters!==!1){const j=o(C);N[E]=j,(h[E]===void 0||j>h[E])&&(h[E]=j)}w.push(C)}c[m]=w,f[m]=N}let b=-1;if(typeof i=="object"&&"length"in i)for(;++b<p;)u[b]=gx(i[b]);else{const w=gx(i);for(;++b<p;)u[b]=w}b=-1;const v=[],x=[];for(;++b<p;){const w=u[b];let N="",E="";w===99?(N=":",E=":"):w===108?N=":":w===114&&(E=":");let C=l.alignDelimiters===!1?1:Math.max(1,h[b]-N.length-E.length);const j=N+"-".repeat(C)+E;l.alignDelimiters!==!1&&(C=N.length+C+E.length,C>h[b]&&(h[b]=C),x[b]=C),v[b]=j}c.splice(1,0,v),f.splice(1,0,x),m=-1;const S=[];for(;++m<c.length;){const w=c[m],N=f[m];b=-1;const E=[];for(;++b<p;){const C=w[b]||"";let j="",z="";if(l.alignDelimiters!==!1){const I=h[b]-(N[b]||0),L=u[b];L===114?j=" ".repeat(I):L===99?I%2?(j=" ".repeat(I/2+.5),z=" ".repeat(I/2-.5)):(j=" ".repeat(I/2),z=j):z=" ".repeat(I)}l.delimiterStart!==!1&&!b&&E.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&C==="")&&(l.delimiterStart!==!1||b)&&E.push(" "),l.alignDelimiters!==!1&&E.push(j),E.push(C),l.alignDelimiters!==!1&&E.push(z),l.padding!==!1&&E.push(" "),(l.delimiterEnd!==!1||b!==p-1)&&E.push("|")}S.push(l.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return S.join(`
|
|
44
|
-
`)}function F6(e){return e==null?"":String(e)}function gx(e){const r=typeof e=="string"?e.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}function B6(e,r,l,i){const o=l.enter("blockquote"),u=l.createTracker(i);u.move("> "),u.shift(2);const c=l.indentLines(l.containerFlow(e,u.current()),I6);return o(),c}function I6(e,r,l){return">"+(l?"":" ")+e}function U6(e,r){return mx(e,r.inConstruct,!0)&&!mx(e,r.notInConstruct,!1)}function mx(e,r,l){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return l;let i=-1;for(;++i<r.length;)if(e.includes(r[i]))return!0;return!1}function bx(e,r,l,i){let o=-1;for(;++o<l.unsafe.length;)if(l.unsafe[o].character===`
|
|
45
|
-
`&&U6(l.stack,l.unsafe[o]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
46
|
-
`}function H6(e,r){const l=String(e);let i=l.indexOf(r),o=i,u=0,c=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===o?++u>c&&(c=u):u=1,o=i+r.length,i=l.indexOf(r,o);return c}function q6(e,r){return!!(r.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function P6(e){const r=e.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function $6(e,r,l,i){const o=P6(l),u=e.value||"",c=o==="`"?"GraveAccent":"Tilde";if(q6(e,l)){const b=l.enter("codeIndented"),v=l.indentLines(u,V6);return b(),v}const f=l.createTracker(i),h=o.repeat(Math.max(H6(u,o)+1,3)),p=l.enter("codeFenced");let m=f.move(h);if(e.lang){const b=l.enter(`codeFencedLang${c}`);m+=f.move(l.safe(e.lang,{before:m,after:" ",encode:["`"],...f.current()})),b()}if(e.lang&&e.meta){const b=l.enter(`codeFencedMeta${c}`);m+=f.move(" "),m+=f.move(l.safe(e.meta,{before:m,after:`
|
|
47
|
-
`,encode:["`"],...f.current()})),b()}return m+=f.move(`
|
|
48
|
-
`),u&&(m+=f.move(u+`
|
|
49
|
-
`)),m+=f.move(h),p(),m}function V6(e,r,l){return(l?"":" ")+e}function Uh(e){const r=e.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function G6(e,r,l,i){const o=Uh(l),u=o==='"'?"Quote":"Apostrophe",c=l.enter("definition");let f=l.enter("label");const h=l.createTracker(i);let p=h.move("[");return p+=h.move(l.safe(l.associationId(e),{before:p,after:"]",...h.current()})),p+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=l.enter("destinationLiteral"),p+=h.move("<"),p+=h.move(l.safe(e.url,{before:p,after:">",...h.current()})),p+=h.move(">")):(f=l.enter("destinationRaw"),p+=h.move(l.safe(e.url,{before:p,after:e.title?" ":`
|
|
50
|
-
`,...h.current()}))),f(),e.title&&(f=l.enter(`title${u}`),p+=h.move(" "+o),p+=h.move(l.safe(e.title,{before:p,after:o,...h.current()})),p+=h.move(o),f()),c(),p}function Y6(e){const r=e.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function Xa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Qs(e,r,l){const i=Di(e),o=Di(r);return i===void 0?o===void 0?l==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}M0.peek=X6;function M0(e,r,l,i){const o=Y6(l),u=l.enter("emphasis"),c=l.createTracker(i),f=c.move(o);let h=c.move(l.containerPhrasing(e,{after:o,before:f,...c.current()}));const p=h.charCodeAt(0),m=Qs(i.before.charCodeAt(i.before.length-1),p,o);m.inside&&(h=Xa(p)+h.slice(1));const b=h.charCodeAt(h.length-1),v=Qs(i.after.charCodeAt(0),b,o);v.inside&&(h=h.slice(0,-1)+Xa(b));const x=c.move(o);return u(),l.attentionEncodeSurroundingInfo={after:v.outside,before:m.outside},f+h+x}function X6(e,r,l){return l.options.emphasis||"*"}function Z6(e,r){let l=!1;return Fh(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return l=!0,Qd}),!!((!e.depth||e.depth<3)&&Rh(e)&&(r.options.setext||l))}function K6(e,r,l,i){const o=Math.max(Math.min(6,e.depth||1),1),u=l.createTracker(i);if(Z6(e,l)){const m=l.enter("headingSetext"),b=l.enter("phrasing"),v=l.containerPhrasing(e,{...u.current(),before:`
|
|
51
|
-
`,after:`
|
|
52
|
-
`});return b(),m(),v+`
|
|
53
|
-
`+(o===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
|
|
54
|
-
`))+1))}const c="#".repeat(o),f=l.enter("headingAtx"),h=l.enter("phrasing");u.move(c+" ");let p=l.containerPhrasing(e,{before:"# ",after:`
|
|
55
|
-
`,...u.current()});return/^[\t ]/.test(p)&&(p=Xa(p.charCodeAt(0))+p.slice(1)),p=p?c+" "+p:c,l.options.closeAtx&&(p+=" "+c),h(),f(),p}z0.peek=Q6;function z0(e){return e.value||""}function Q6(){return"<"}F0.peek=J6;function F0(e,r,l,i){const o=Uh(l),u=o==='"'?"Quote":"Apostrophe",c=l.enter("image");let f=l.enter("label");const h=l.createTracker(i);let p=h.move("![");return p+=h.move(l.safe(e.alt,{before:p,after:"]",...h.current()})),p+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=l.enter("destinationLiteral"),p+=h.move("<"),p+=h.move(l.safe(e.url,{before:p,after:">",...h.current()})),p+=h.move(">")):(f=l.enter("destinationRaw"),p+=h.move(l.safe(e.url,{before:p,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=l.enter(`title${u}`),p+=h.move(" "+o),p+=h.move(l.safe(e.title,{before:p,after:o,...h.current()})),p+=h.move(o),f()),p+=h.move(")"),c(),p}function J6(){return"!"}B0.peek=W6;function B0(e,r,l,i){const o=e.referenceType,u=l.enter("imageReference");let c=l.enter("label");const f=l.createTracker(i);let h=f.move("![");const p=l.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(p+"]["),c();const m=l.stack;l.stack=[],c=l.enter("reference");const b=l.safe(l.associationId(e),{before:h,after:"]",...f.current()});return c(),l.stack=m,u(),o==="full"||!p||p!==b?h+=f.move(b+"]"):o==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function W6(){return"!"}I0.peek=e5;function I0(e,r,l){let i=e.value||"",o="`",u=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(i);)o+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++u<l.unsafe.length;){const c=l.unsafe[u],f=l.compilePattern(c);let h;if(c.atBreak)for(;h=f.exec(i);){let p=h.index;i.charCodeAt(p)===10&&i.charCodeAt(p-1)===13&&p--,i=i.slice(0,p)+" "+i.slice(h.index+1)}}return o+i+o}function e5(){return"`"}function U0(e,r){const l=Rh(e);return!!(!r.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(l===e.url||"mailto:"+l===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}H0.peek=t5;function H0(e,r,l,i){const o=Uh(l),u=o==='"'?"Quote":"Apostrophe",c=l.createTracker(i);let f,h;if(U0(e,l)){const m=l.stack;l.stack=[],f=l.enter("autolink");let b=c.move("<");return b+=c.move(l.containerPhrasing(e,{before:b,after:">",...c.current()})),b+=c.move(">"),f(),l.stack=m,b}f=l.enter("link"),h=l.enter("label");let p=c.move("[");return p+=c.move(l.containerPhrasing(e,{before:p,after:"](",...c.current()})),p+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=l.enter("destinationLiteral"),p+=c.move("<"),p+=c.move(l.safe(e.url,{before:p,after:">",...c.current()})),p+=c.move(">")):(h=l.enter("destinationRaw"),p+=c.move(l.safe(e.url,{before:p,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=l.enter(`title${u}`),p+=c.move(" "+o),p+=c.move(l.safe(e.title,{before:p,after:o,...c.current()})),p+=c.move(o),h()),p+=c.move(")"),f(),p}function t5(e,r,l){return U0(e,l)?"<":"["}q0.peek=n5;function q0(e,r,l,i){const o=e.referenceType,u=l.enter("linkReference");let c=l.enter("label");const f=l.createTracker(i);let h=f.move("[");const p=l.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(p+"]["),c();const m=l.stack;l.stack=[],c=l.enter("reference");const b=l.safe(l.associationId(e),{before:h,after:"]",...f.current()});return c(),l.stack=m,u(),o==="full"||!p||p!==b?h+=f.move(b+"]"):o==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function n5(){return"["}function Hh(e){const r=e.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function r5(e){const r=Hh(e),l=e.options.bulletOther;if(!l)return r==="*"?"-":"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(l===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+l+"`) to be different");return l}function l5(e){const r=e.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function P0(e){const r=e.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function i5(e,r,l,i){const o=l.enter("list"),u=l.bulletCurrent;let c=e.ordered?l5(l):Hh(l);const f=e.ordered?c==="."?")":".":r5(l);let h=r&&l.bulletLastUsed?c===l.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&m&&(!m.children||!m.children[0])&&l.stack[l.stack.length-1]==="list"&&l.stack[l.stack.length-2]==="listItem"&&l.stack[l.stack.length-3]==="list"&&l.stack[l.stack.length-4]==="listItem"&&l.indexStack[l.indexStack.length-1]===0&&l.indexStack[l.indexStack.length-2]===0&&l.indexStack[l.indexStack.length-3]===0&&(h=!0),P0(l)===c&&m){let b=-1;for(;++b<e.children.length;){const v=e.children[b];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=f),l.bulletCurrent=c;const p=l.containerFlow(e,i);return l.bulletLastUsed=c,l.bulletCurrent=u,o(),p}function a5(e){const r=e.options.listItemIndent||"one";if(r!=="tab"&&r!=="one"&&r!=="mixed")throw new Error("Cannot serialize items with `"+r+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return r}function o5(e,r,l,i){const o=a5(l);let u=l.bulletCurrent||Hh(l);r&&r.type==="list"&&r.ordered&&(u=(typeof r.start=="number"&&r.start>-1?r.start:1)+(l.options.incrementListMarker===!1?0:r.children.indexOf(e))+u);let c=u.length+1;(o==="tab"||o==="mixed"&&(r&&r.type==="list"&&r.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=l.createTracker(i);f.move(u+" ".repeat(c-u.length)),f.shift(c);const h=l.enter("listItem"),p=l.indentLines(l.containerFlow(e,f.current()),m);return h(),p;function m(b,v,x){return v?(x?"":" ".repeat(c))+b:(x?u:u+" ".repeat(c-u.length))+b}}function s5(e,r,l,i){const o=l.enter("paragraph"),u=l.enter("phrasing"),c=l.containerPhrasing(e,i);return u(),o(),c}const u5=wu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function c5(e,r,l,i){return(e.children.some(function(c){return u5(c)})?l.containerPhrasing:l.containerFlow).call(l,e,i)}function f5(e){const r=e.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}$0.peek=d5;function $0(e,r,l,i){const o=f5(l),u=l.enter("strong"),c=l.createTracker(i),f=c.move(o+o);let h=c.move(l.containerPhrasing(e,{after:o,before:f,...c.current()}));const p=h.charCodeAt(0),m=Qs(i.before.charCodeAt(i.before.length-1),p,o);m.inside&&(h=Xa(p)+h.slice(1));const b=h.charCodeAt(h.length-1),v=Qs(i.after.charCodeAt(0),b,o);v.inside&&(h=h.slice(0,-1)+Xa(b));const x=c.move(o+o);return u(),l.attentionEncodeSurroundingInfo={after:v.outside,before:m.outside},f+h+x}function d5(e,r,l){return l.options.strong||"*"}function h5(e,r,l,i){return l.safe(e.value,i)}function p5(e){const r=e.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function g5(e,r,l){const i=(P0(l)+(l.options.ruleSpaces?" ":"")).repeat(p5(l));return l.options.ruleSpaces?i.slice(0,-1):i}const V0={blockquote:B6,break:bx,code:$6,definition:G6,emphasis:M0,hardBreak:bx,heading:K6,html:z0,image:F0,imageReference:B0,inlineCode:I0,link:H0,linkReference:q0,list:i5,listItem:o5,paragraph:s5,root:c5,strong:$0,text:h5,thematicBreak:g5};function m5(){return{enter:{table:b5,tableData:yx,tableHeader:yx,tableRow:x5},exit:{codeText:v5,table:y5,tableData:pd,tableHeader:pd,tableRow:pd}}}function b5(e){const r=e._align;this.enter({type:"table",align:r.map(function(l){return l==="none"?null:l}),children:[]},e),this.data.inTable=!0}function y5(e){this.exit(e),this.data.inTable=void 0}function x5(e){this.enter({type:"tableRow",children:[]},e)}function pd(e){this.exit(e)}function yx(e){this.enter({type:"tableCell",children:[]},e)}function v5(e){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,w5));const l=this.stack[this.stack.length-1];l.type,l.value=r,this.exit(e)}function w5(e,r){return r==="|"?r:e}function S5(e){const r=e||{},l=r.tableCellPadding,i=r.tablePipeAlign,o=r.stringLength,u=l?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
56
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:c,tableCell:h,tableRow:f}};function c(x,S,w,N){return p(m(x,w,N),x.align)}function f(x,S,w,N){const E=b(x,w,N),C=p([E]);return C.slice(0,C.indexOf(`
|
|
57
|
-
`))}function h(x,S,w,N){const E=w.enter("tableCell"),C=w.enter("phrasing"),j=w.containerPhrasing(x,{...N,before:u,after:u});return C(),E(),j}function p(x,S){return z6(x,{align:S,alignDelimiters:i,padding:l,stringLength:o})}function m(x,S,w){const N=x.children;let E=-1;const C=[],j=S.enter("table");for(;++E<N.length;)C[E]=b(N[E],S,w);return j(),C}function b(x,S,w){const N=x.children;let E=-1;const C=[],j=S.enter("tableRow");for(;++E<N.length;)C[E]=h(N[E],x,S,w);return j(),C}function v(x,S,w){let N=V0.inlineCode(x,S,w);return w.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function k5(){return{exit:{taskListCheckValueChecked:xx,taskListCheckValueUnchecked:xx,paragraph:C5}}}function E5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:N5}}}function xx(e){const r=this.stack[this.stack.length-2];r.type,r.checked=e.type==="taskListCheckValueChecked"}function C5(e){const r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){const l=this.stack[this.stack.length-1];l.type;const i=l.children[0];if(i&&i.type==="text"){const o=r.children;let u=-1,c;for(;++u<o.length;){const f=o[u];if(f.type==="paragraph"){c=f;break}}c===l&&(i.value=i.value.slice(1),i.value.length===0?l.children.shift():l.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,l.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function N5(e,r,l,i){const o=e.children[0],u=typeof e.checked=="boolean"&&o&&o.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=l.createTracker(i);u&&f.move(c);let h=V0.listItem(e,r,l,{...i,...f.current()});return u&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),h;function p(m){return m+c}}function A5(){return[i6(),N6(),R6(),m5(),k5()]}function T5(e){return{extensions:[a6(),A6(e),_6(),S5(e),E5()]}}const j5={tokenize:M5,partial:!0},G0={tokenize:z5,partial:!0},Y0={tokenize:F5,partial:!0},X0={tokenize:B5,partial:!0},R5={tokenize:I5,partial:!0},Z0={name:"wwwAutolink",tokenize:D5,previous:Q0},K0={name:"protocolAutolink",tokenize:O5,previous:J0},Nr={name:"emailAutolink",tokenize:L5,previous:W0},tr={};function _5(){return{text:tr}}let _l=48;for(;_l<123;)tr[_l]=Nr,_l++,_l===58?_l=65:_l===91&&(_l=97);tr[43]=Nr;tr[45]=Nr;tr[46]=Nr;tr[95]=Nr;tr[72]=[Nr,K0];tr[104]=[Nr,K0];tr[87]=[Nr,Z0];tr[119]=[Nr,Z0];function L5(e,r,l){const i=this;let o,u;return c;function c(b){return!th(b)||!W0.call(i,i.previous)||qh(i.events)?l(b):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(b))}function f(b){return th(b)?(e.consume(b),f):b===64?(e.consume(b),h):l(b)}function h(b){return b===46?e.check(R5,m,p)(b):b===45||b===95||$t(b)?(u=!0,e.consume(b),h):m(b)}function p(b){return e.consume(b),o=!0,h}function m(b){return u&&o&&Kt(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),r(b)):l(b)}}function D5(e,r,l){const i=this;return o;function o(c){return c!==87&&c!==119||!Q0.call(i,i.previous)||qh(i.events)?l(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(j5,e.attempt(G0,e.attempt(Y0,u),l),l)(c))}function u(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),r(c)}}function O5(e,r,l){const i=this;let o="",u=!1;return c;function c(b){return(b===72||b===104)&&J0.call(i,i.previous)&&!qh(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(b),e.consume(b),f):l(b)}function f(b){if(Kt(b)&&o.length<5)return o+=String.fromCodePoint(b),e.consume(b),f;if(b===58){const v=o.toLowerCase();if(v==="http"||v==="https")return e.consume(b),h}return l(b)}function h(b){return b===47?(e.consume(b),u?p:(u=!0,h)):l(b)}function p(b){return b===null||Xs(b)||st(b)||Fl(b)||yu(b)?l(b):e.attempt(G0,e.attempt(Y0,m),l)(b)}function m(b){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),r(b)}}function M5(e,r,l){let i=0;return o;function o(c){return(c===87||c===119)&&i<3?(i++,e.consume(c),o):c===46&&i===3?(e.consume(c),u):l(c)}function u(c){return c===null?l(c):r(c)}}function z5(e,r,l){let i,o,u;return c;function c(p){return p===46||p===95?e.check(X0,h,f)(p):p===null||st(p)||Fl(p)||p!==45&&yu(p)?h(p):(u=!0,e.consume(p),c)}function f(p){return p===95?i=!0:(o=i,i=void 0),e.consume(p),c}function h(p){return o||i||!u?l(p):r(p)}}function F5(e,r){let l=0,i=0;return o;function o(c){return c===40?(l++,e.consume(c),o):c===41&&i<l?u(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(X0,r,u)(c):c===null||st(c)||Fl(c)?r(c):(e.consume(c),o)}function u(c){return c===41&&i++,e.consume(c),o}}function B5(e,r,l){return i;function i(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),i):f===38?(e.consume(f),u):f===93?(e.consume(f),o):f===60||f===null||st(f)||Fl(f)?r(f):l(f)}function o(f){return f===null||f===40||f===91||st(f)||Fl(f)?r(f):i(f)}function u(f){return Kt(f)?c(f):l(f)}function c(f){return f===59?(e.consume(f),i):Kt(f)?(e.consume(f),c):l(f)}}function I5(e,r,l){return i;function i(u){return e.consume(u),o}function o(u){return $t(u)?l(u):r(u)}}function Q0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||st(e)}function J0(e){return!Kt(e)}function W0(e){return!(e===47||th(e))}function th(e){return e===43||e===45||e===46||e===95||$t(e)}function qh(e){let r=e.length,l=!1;for(;r--;){const i=e[r][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){l=!0;break}if(i._gfmAutolinkLiteralWalkedInto){l=!1;break}}return e.length>0&&!l&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),l}const U5={tokenize:X5,partial:!0};function H5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:V5,continuation:{tokenize:G5},exit:Y5}},text:{91:{name:"gfmFootnoteCall",tokenize:$5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:q5,resolveTo:P5}}}}function q5(e,r,l){const i=this;let o=i.events.length;const u=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;o--;){const h=i.events[o][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!c||!c._balanced)return l(h);const p=qn(i.sliceSerialize({start:c.end,end:i.now()}));return p.codePointAt(0)!==94||!u.includes(p.slice(1))?l(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),r(h))}}function P5(e,r){let l=e.length;for(;l--;)if(e[l][1].type==="labelImage"&&e[l][0]==="enter"){e[l][1];break}e[l+1][1].type="data",e[l+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[l+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[l+3][1].end),end:Object.assign({},e[l+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[l+1],e[l+2],["enter",i,r],e[l+3],e[l+4],["enter",o,r],["exit",o,r],["enter",u,r],["enter",c,r],["exit",c,r],["exit",u,r],e[e.length-2],e[e.length-1],["exit",i,r]];return e.splice(l,e.length-l+1,...f),e}function $5(e,r,l){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u=0,c;return f;function f(b){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),h}function h(b){return b!==94?l(b):(e.enter("gfmFootnoteCallMarker"),e.consume(b),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(b){if(u>999||b===93&&!c||b===null||b===91||st(b))return l(b);if(b===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return o.includes(qn(i.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(b),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),r):l(b)}return st(b)||(c=!0),u++,e.consume(b),b===92?m:p}function m(b){return b===91||b===92||b===93?(e.consume(b),u++,p):p(b)}}function V5(e,r,l){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u,c=0,f;return h;function h(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):l(S)}function m(S){if(c>999||S===93&&!f||S===null||S===91||st(S))return l(S);if(S===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return u=qn(i.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return st(S)||(f=!0),c++,e.consume(S),S===92?b:m}function b(S){return S===91||S===92||S===93?(e.consume(S),c++,m):m(S)}function v(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),o.includes(u)||o.push(u),Ge(e,x,"gfmFootnoteDefinitionWhitespace")):l(S)}function x(S){return r(S)}}function G5(e,r,l){return e.check(to,r,e.attempt(U5,r,l))}function Y5(e){e.exit("gfmFootnoteDefinition")}function X5(e,r,l){const i=this;return Ge(e,o,"gfmFootnoteDefinitionIndent",5);function o(u){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?r(u):l(u)}}function Z5(e){let l=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:u,resolveAll:o};return l==null&&(l=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function o(c,f){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let p=h;for(;p--;)if(c[p][0]==="exit"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[p][1].end.offset-c[p][1].start.offset){c[h][1].type="strikethroughSequence",c[p][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},c[p][1].start),end:Object.assign({},c[h][1].end)},b={type:"strikethroughText",start:Object.assign({},c[p][1].end),end:Object.assign({},c[h][1].start)},v=[["enter",m,f],["enter",c[p][1],f],["exit",c[p][1],f],["enter",b,f]],x=f.parser.constructs.insideSpan.null;x&&kn(v,v.length,0,xu(x,c.slice(p+1,h),f)),kn(v,v.length,0,[["exit",b,f],["enter",c[h][1],f],["exit",c[h][1],f],["exit",m,f]]),kn(c,p-1,h-p+3,v),h=p+v.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function u(c,f,h){const p=this.previous,m=this.events;let b=0;return v;function v(S){return p===126&&m[m.length-1][1].type!=="characterEscape"?h(S):(c.enter("strikethroughSequenceTemporary"),x(S))}function x(S){const w=Di(p);if(S===126)return b>1?h(S):(c.consume(S),b++,x);if(b<2&&!l)return h(S);const N=c.exit("strikethroughSequenceTemporary"),E=Di(S);return N._open=!E||E===2&&!!w,N._close=!w||w===2&&!!E,f(S)}}}class K5{constructor(){this.map=[]}add(r,l,i){Q5(this,r,l,i)}consume(r){if(this.map.sort(function(u,c){return u[0]-c[0]}),this.map.length===0)return;let l=this.map.length;const i=[];for(;l>0;)l-=1,i.push(r.slice(this.map[l][0]+this.map[l][1]),this.map[l][2]),r.length=this.map[l][0];i.push(r.slice()),r.length=0;let o=i.pop();for(;o;){for(const u of o)r.push(u);o=i.pop()}this.map.length=0}}function Q5(e,r,l,i){let o=0;if(!(l===0&&i.length===0)){for(;o<e.map.length;){if(e.map[o][0]===r){e.map[o][1]+=l,e.map[o][2].push(...i);return}o+=1}e.map.push([r,l,i])}}function J5(e,r){let l=!1;const i=[];for(;r<e.length;){const o=e[r];if(l){if(o[0]==="enter")o[1].type==="tableContent"&&i.push(e[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[r-1][1].type==="tableDelimiterMarker"){const u=i.length-1;i[u]=i[u]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(l=!0);r+=1}return i}function W5(){return{flow:{null:{name:"table",tokenize:e8,resolveAll:t8}}}}function e8(e,r,l){const i=this;let o=0,u=0,c;return f;function f(F){let H=i.events.length-1;for(;H>-1;){const U=i.events[H][1].type;if(U==="lineEnding"||U==="linePrefix")H--;else break}const G=H>-1?i.events[H][1].type:null,Q=G==="tableHead"||G==="tableRow"?L:h;return Q===L&&i.parser.lazy[i.now().line]?l(F):Q(F)}function h(F){return e.enter("tableHead"),e.enter("tableRow"),p(F)}function p(F){return F===124||(c=!0,u+=1),m(F)}function m(F){return F===null?l(F):Ae(F)?u>1?(u=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),x):l(F):Be(F)?Ge(e,m,"whitespace")(F):(u+=1,c&&(c=!1,o+=1),F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),c=!0,m):(e.enter("data"),b(F)))}function b(F){return F===null||F===124||st(F)?(e.exit("data"),m(F)):(e.consume(F),F===92?v:b)}function v(F){return F===92||F===124?(e.consume(F),b):b(F)}function x(F){return i.interrupt=!1,i.parser.lazy[i.now().line]?l(F):(e.enter("tableDelimiterRow"),c=!1,Be(F)?Ge(e,S,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):S(F))}function S(F){return F===45||F===58?N(F):F===124?(c=!0,e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),w):I(F)}function w(F){return Be(F)?Ge(e,N,"whitespace")(F):N(F)}function N(F){return F===58?(u+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),E):F===45?(u+=1,E(F)):F===null||Ae(F)?z(F):I(F)}function E(F){return F===45?(e.enter("tableDelimiterFiller"),C(F)):I(F)}function C(F){return F===45?(e.consume(F),C):F===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),j):(e.exit("tableDelimiterFiller"),j(F))}function j(F){return Be(F)?Ge(e,z,"whitespace")(F):z(F)}function z(F){return F===124?S(F):F===null||Ae(F)?!c||o!==u?I(F):(e.exit("tableDelimiterRow"),e.exit("tableHead"),r(F)):I(F)}function I(F){return l(F)}function L(F){return e.enter("tableRow"),O(F)}function O(F){return F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),O):F===null||Ae(F)?(e.exit("tableRow"),r(F)):Be(F)?Ge(e,O,"whitespace")(F):(e.enter("data"),Z(F))}function Z(F){return F===null||F===124||st(F)?(e.exit("data"),O(F)):(e.consume(F),F===92?P:Z)}function P(F){return F===92||F===124?(e.consume(F),Z):Z(F)}}function t8(e,r){let l=-1,i=!0,o=0,u=[0,0,0,0],c=[0,0,0,0],f=!1,h=0,p,m,b;const v=new K5;for(;++l<e.length;){const x=e[l],S=x[1];x[0]==="enter"?S.type==="tableHead"?(f=!1,h!==0&&(vx(v,r,h,p,m),m=void 0,h=0),p={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},v.add(l,0,[["enter",p,r]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(i=!0,b=void 0,u=[0,0,0,0],c=[0,l+1,0,0],f&&(f=!1,m={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},v.add(l,0,[["enter",m,r]])),o=S.type==="tableDelimiterRow"?2:m?3:1):o&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],b=js(v,r,u,o,void 0,b),u=[0,0,0,0]),c[2]=l)):S.type==="tableCellDivider"&&(i?i=!1:(u[1]!==0&&(c[0]=c[1],b=js(v,r,u,o,void 0,b)),u=c,c=[u[1],l,0,0])):S.type==="tableHead"?(f=!0,h=l):S.type==="tableRow"||S.type==="tableDelimiterRow"?(h=l,u[1]!==0?(c[0]=c[1],b=js(v,r,u,o,l,b)):c[1]!==0&&(b=js(v,r,c,o,l,b)),o=0):o&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(c[3]=l)}for(h!==0&&vx(v,r,h,p,m),v.consume(r.events),l=-1;++l<r.events.length;){const x=r.events[l];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=J5(r.events,l))}return e}function js(e,r,l,i,o,u){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",f="tableContent";l[0]!==0&&(u.end=Object.assign({},Ni(r.events,l[0])),e.add(l[0],0,[["exit",u,r]]));const h=Ni(r.events,l[1]);if(u={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(l[1],0,[["enter",u,r]]),l[2]!==0){const p=Ni(r.events,l[2]),m=Ni(r.events,l[3]),b={type:f,start:Object.assign({},p),end:Object.assign({},m)};if(e.add(l[2],0,[["enter",b,r]]),i!==2){const v=r.events[l[2]],x=r.events[l[3]];if(v[1].end=Object.assign({},x[1].end),v[1].type="chunkText",v[1].contentType="text",l[3]>l[2]+1){const S=l[2]+1,w=l[3]-l[2]-1;e.add(S,w,[])}}e.add(l[3]+1,0,[["exit",b,r]])}return o!==void 0&&(u.end=Object.assign({},Ni(r.events,o)),e.add(o,0,[["exit",u,r]]),u=void 0),u}function vx(e,r,l,i,o){const u=[],c=Ni(r.events,l);o&&(o.end=Object.assign({},c),u.push(["exit",o,r])),i.end=Object.assign({},c),u.push(["exit",i,r]),e.add(l+1,0,u)}function Ni(e,r){const l=e[r],i=l[0]==="enter"?"start":"end";return l[1][i]}const n8={name:"tasklistCheck",tokenize:l8};function r8(){return{text:{91:n8}}}function l8(e,r,l){const i=this;return o;function o(h){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?l(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),u)}function u(h){return st(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):l(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):l(h)}function f(h){return Ae(h)?r(h):Be(h)?e.check({tokenize:i8},r,l)(h):l(h)}}function i8(e,r,l){return Ge(e,i,"whitespace");function i(o){return o===null?l(o):r(o)}}function a8(e){return c0([_5(),H5(),Z5(e),W5(),r8()])}const o8={};function Ph(e){const r=this,l=e||o8,i=r.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),u=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push(a8(l)),u.push(A5()),c.push(T5(l))}class $h{diff(r,l,i={}){let o;typeof i=="function"?(o=i,i={}):"callback"in i&&(o=i.callback);const u=this.castInput(r,i),c=this.castInput(l,i),f=this.removeEmpty(this.tokenize(u,i)),h=this.removeEmpty(this.tokenize(c,i));return this.diffWithOptionsObj(f,h,i,o)}diffWithOptionsObj(r,l,i,o){var u;const c=C=>{if(C=this.postProcess(C,i),o){setTimeout(function(){o(C)},0);return}else return C},f=l.length,h=r.length;let p=1,m=f+h;i.maxEditLength!=null&&(m=Math.min(m,i.maxEditLength));const b=(u=i.timeout)!==null&&u!==void 0?u:1/0,v=Date.now()+b,x=[{oldPos:-1,lastComponent:void 0}];let S=this.extractCommon(x[0],l,r,0,i);if(x[0].oldPos+1>=h&&S+1>=f)return c(this.buildValues(x[0].lastComponent,l,r));let w=-1/0,N=1/0;const E=()=>{for(let C=Math.max(w,-p);C<=Math.min(N,p);C+=2){let j;const z=x[C-1],I=x[C+1];z&&(x[C-1]=void 0);let L=!1;if(I){const Z=I.oldPos-C;L=I&&0<=Z&&Z<f}const O=z&&z.oldPos+1<h;if(!L&&!O){x[C]=void 0;continue}if(!O||L&&z.oldPos<I.oldPos?j=this.addToPath(I,!0,!1,0,i):j=this.addToPath(z,!1,!0,1,i),S=this.extractCommon(j,l,r,C,i),j.oldPos+1>=h&&S+1>=f)return c(this.buildValues(j.lastComponent,l,r))||!0;x[C]=j,j.oldPos+1>=h&&(N=Math.min(N,C-1)),S+1>=f&&(w=Math.max(w,C+1))}p++};if(o)(function C(){setTimeout(function(){if(p>m||Date.now()>v)return o(void 0);E()||C()},0)})();else for(;p<=m&&Date.now()<=v;){const C=E();if(C)return C}}addToPath(r,l,i,o,u){const c=r.lastComponent;return c&&!u.oneChangePerToken&&c.added===l&&c.removed===i?{oldPos:r.oldPos+o,lastComponent:{count:c.count+1,added:l,removed:i,previousComponent:c.previousComponent}}:{oldPos:r.oldPos+o,lastComponent:{count:1,added:l,removed:i,previousComponent:c}}}extractCommon(r,l,i,o,u){const c=l.length,f=i.length;let h=r.oldPos,p=h-o,m=0;for(;p+1<c&&h+1<f&&this.equals(i[h+1],l[p+1],u);)p++,h++,m++,u.oneChangePerToken&&(r.lastComponent={count:1,previousComponent:r.lastComponent,added:!1,removed:!1});return m&&!u.oneChangePerToken&&(r.lastComponent={count:m,previousComponent:r.lastComponent,added:!1,removed:!1}),r.oldPos=h,p}equals(r,l,i){return i.comparator?i.comparator(r,l):r===l||!!i.ignoreCase&&r.toLowerCase()===l.toLowerCase()}removeEmpty(r){const l=[];for(let i=0;i<r.length;i++)r[i]&&l.push(r[i]);return l}castInput(r,l){return r}tokenize(r,l){return Array.from(r)}join(r){return r.join("")}postProcess(r,l){return r}get useLongestToken(){return!1}buildValues(r,l,i){const o=[];let u;for(;r;)o.push(r),u=r.previousComponent,delete r.previousComponent,r=u;o.reverse();const c=o.length;let f=0,h=0,p=0;for(;f<c;f++){const m=o[f];if(m.removed)m.value=this.join(i.slice(p,p+m.count)),p+=m.count;else{if(!m.added&&this.useLongestToken){let b=l.slice(h,h+m.count);b=b.map(function(v,x){const S=i[p+x];return S.length>v.length?S:v}),m.value=this.join(b)}else m.value=this.join(l.slice(h,h+m.count));h+=m.count,m.added||(p+=m.count)}}return o}}function wx(e,r){let l;for(l=0;l<e.length&&l<r.length;l++)if(e[l]!=r[l])return e.slice(0,l);return e.slice(0,l)}function Sx(e,r){let l;if(!e||!r||e[e.length-1]!=r[r.length-1])return"";for(l=0;l<e.length&&l<r.length;l++)if(e[e.length-(l+1)]!=r[r.length-(l+1)])return e.slice(-l);return e.slice(-l)}function nh(e,r,l){if(e.slice(0,r.length)!=r)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(r)}; this is a bug`);return l+e.slice(r.length)}function rh(e,r,l){if(!r)return e+l;if(e.slice(-r.length)!=r)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(r)}; this is a bug`);return e.slice(0,-r.length)+l}function Ma(e,r){return nh(e,r,"")}function Rs(e,r){return rh(e,r,"")}function kx(e,r){return r.slice(0,s8(e,r))}function s8(e,r){let l=0;e.length>r.length&&(l=e.length-r.length);let i=r.length;e.length<r.length&&(i=e.length);const o=Array(i);let u=0;o[0]=0;for(let c=1;c<i;c++){for(r[c]==r[u]?o[c]=o[u]:o[c]=u;u>0&&r[c]!=r[u];)u=o[u];r[c]==r[u]&&u++}u=0;for(let c=l;c<e.length;c++){for(;u>0&&e[c]!=r[u];)u=o[u];e[c]==r[u]&&u++}return u}function za(e){let r;for(r=e.length-1;r>=0&&e[r].match(/\s/);r--);return e.substring(r+1)}function nl(e){const r=e.match(/^\s*/);return r?r[0]:""}const Js="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",u8=new RegExp(`[${Js}]+|\\s+|[^${Js}]`,"ug");class c8 extends $h{equals(r,l,i){return i.ignoreCase&&(r=r.toLowerCase(),l=l.toLowerCase()),r.trim()===l.trim()}tokenize(r,l={}){let i;if(l.intlSegmenter){const c=l.intlSegmenter;if(c.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');i=[];for(const f of Array.from(c.segment(r))){const h=f.segment;i.length&&/\s/.test(i[i.length-1])&&/\s/.test(h)?i[i.length-1]+=h:i.push(h)}}else i=r.match(u8)||[];const o=[];let u=null;return i.forEach(c=>{/\s/.test(c)?u==null?o.push(c):o.push(o.pop()+c):u!=null&&/\s/.test(u)?o[o.length-1]==u?o.push(o.pop()+c):o.push(u+c):o.push(c),u=c}),o}join(r){return r.map((l,i)=>i==0?l:l.replace(/^\s+/,"")).join("")}postProcess(r,l){if(!r||l.oneChangePerToken)return r;let i=null,o=null,u=null;return r.forEach(c=>{c.added?o=c:c.removed?u=c:((o||u)&&Ex(i,u,o,c),i=c,o=null,u=null)}),(o||u)&&Ex(i,u,o,null),r}}const f8=new c8;function d8(e,r,l){return f8.diff(e,r,l)}function Ex(e,r,l,i){if(r&&l){const o=nl(r.value),u=za(r.value),c=nl(l.value),f=za(l.value);if(e){const h=wx(o,c);e.value=rh(e.value,c,h),r.value=Ma(r.value,h),l.value=Ma(l.value,h)}if(i){const h=Sx(u,f);i.value=nh(i.value,f,h),r.value=Rs(r.value,h),l.value=Rs(l.value,h)}}else if(l){if(e){const o=nl(l.value);l.value=l.value.substring(o.length)}if(i){const o=nl(i.value);i.value=i.value.substring(o.length)}}else if(e&&i){const o=nl(i.value),u=nl(r.value),c=za(r.value),f=wx(o,u);r.value=Ma(r.value,f);const h=Sx(Ma(o,f),c);r.value=Rs(r.value,h),i.value=nh(i.value,o,h),e.value=rh(e.value,o,o.slice(0,o.length-h.length))}else if(i){const o=nl(i.value),u=za(r.value),c=kx(u,o);r.value=Rs(r.value,c)}else if(e){const o=za(e.value),u=nl(r.value),c=kx(o,u);r.value=Ma(r.value,c)}}class h8 extends $h{tokenize(r){const l=new RegExp(`(\\r?\\n)|[${Js}]+|[^\\S\\n\\r]+|[^${Js}]`,"ug");return r.match(l)||[]}}const p8=new h8;function g8(e,r,l){return p8.diff(e,r,l)}class m8 extends $h{constructor(){super(...arguments),this.tokenize=x8}equals(r,l,i){return i.ignoreWhitespace?((!i.newlineIsToken||!r.includes(`
|
|
58
|
-
`))&&(r=r.trim()),(!i.newlineIsToken||!l.includes(`
|
|
59
|
-
`))&&(l=l.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(r.endsWith(`
|
|
60
|
-
`)&&(r=r.slice(0,-1)),l.endsWith(`
|
|
61
|
-
`)&&(l=l.slice(0,-1))),super.equals(r,l,i)}}const b8=new m8;function y8(e,r,l){return b8.diff(e,r,l)}function x8(e,r){r.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
62
|
-
`));const l=[],i=e.split(/(\n|\r\n)/);i[i.length-1]||i.pop();for(let o=0;o<i.length;o++){const u=i[o];o%2&&!r.newlineIsToken?l[l.length-1]+=u:l.push(u)}return l}function ev(e,r){const l=g8(e,r),i=[],o=[];for(const u of l)u.added?o.push({value:u.value,type:"added"}):u.removed?i.push({value:u.value,type:"removed"}):(i.push({value:u.value,type:"unchanged"}),o.push({value:u.value,type:"unchanged"}));return{oldSegments:i,newSegments:o}}function tv(e,r){if(!e.trim()||!r.trim()||e===r)return!1;const l=d8(e,r);let i=0,o=0;for(const c of l)o+=c.value.length,!c.added&&!c.removed&&(i+=c.value.length);return i/o>=.2}function nv({onSubmit:e,onCancel:r,selectedCode:l,syntaxTheme:i,filename:o}){const[u,c]=T.useState(""),[f,h]=T.useState(!1),[p,m]=T.useState("edit"),b=T.useRef(null),v=y1(u),x=v?p:"edit",S=async N=>{if(N.preventDefault(),!!u.trim()){h(!0);try{await e(u.trim()),c(""),m("edit")}catch(E){console.error("Failed to submit comment:",E)}finally{h(!1)}}},w=N=>{N.key==="Enter"&&(N.metaKey||N.ctrlKey)?S(N):N.key==="Escape"&&r()};return y.jsxs("form",{className:"m-2 mx-3 p-3 bg-github-bg-tertiary border border-yellow-600/50 rounded-md border-l-4 border-l-yellow-400",onSubmit:S,"data-empty":!u.trim(),children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsx("span",{className:"text-sm font-medium",style:{color:"var(--color-yellow-path-text)"},children:"Add a comment"}),v?y.jsxs("div",{className:"flex items-center border border-github-border rounded-md overflow-hidden",children:[y.jsx("button",{type:"button",onClick:()=>m("edit"),className:`text-xs px-2.5 py-1.5 ${x==="edit"?"bg-github-bg-tertiary text-github-text-primary":"bg-github-bg-secondary text-github-text-secondary"} transition-colors`,children:"Edit"}),y.jsx("button",{type:"button",onClick:()=>m("preview"),className:`text-xs px-2.5 py-1.5 border-l border-github-border ${x==="preview"?"bg-github-bg-tertiary text-github-text-primary":"bg-github-bg-secondary text-github-text-secondary"} transition-colors`,children:"Preview"})]}):y.jsx(x1,{selectedCode:l,value:u,onChange:c,textareaRef:b})]}),v&&x==="preview"?y.jsx("div",{className:"min-h-[60px] mb-2 bg-github-bg-secondary border border-github-border rounded px-3 py-2",children:y.jsx(Nd,{body:u,originalCode:l,filename:o,syntaxTheme:i})}):y.jsx("textarea",{ref:b,className:"w-full min-h-[60px] mb-2 resize-y bg-github-bg-secondary border border-github-border rounded px-3 py-2 text-github-text-primary text-sm leading-6 focus:outline-none focus:border-blue-600 focus:ring-2 focus:ring-blue-600/30 focus:min-h-[80px] disabled:opacity-50",value:u,onChange:N=>c(N.target.value),onKeyDown:w,placeholder:"Leave a comment...",rows:Math.max(3,u.split(`
|
|
63
|
-
`).length),autoFocus:!0,disabled:f}),y.jsxs("div",{className:"flex gap-2 justify-end",children:[y.jsx("button",{type:"button",onClick:r,className:"text-xs px-3 py-1.5 bg-github-bg-tertiary text-github-text-primary border border-github-border rounded hover:opacity-80 transition-all disabled:opacity-50",disabled:f,children:"Cancel"}),y.jsx("button",{type:"submit",className:"text-xs px-3 py-1.5 rounded transition-all disabled:opacity-50",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:N=>{N.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",N.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},disabled:!u.trim()||f,children:f?"Submitting...":"Submit"})]})]})}const Ws=Qt.memo(({onMouseDown:e,onMouseUp:r,title:l="Add a comment"})=>y.jsx("button",{className:"absolute -right-2 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded transition-all duration-150 hover:scale-110 z-10","data-comment-button":"true",style:{backgroundColor:"var(--color-yellow-btn-bg)",color:"var(--color-yellow-btn-text)",border:"1px solid var(--color-yellow-btn-border)"},onMouseEnter:i=>{i.currentTarget.style.backgroundColor="var(--color-yellow-btn-hover-bg)",i.currentTarget.style.borderColor="var(--color-yellow-btn-hover-border)"},onMouseLeave:i=>{i.currentTarget.style.backgroundColor="var(--color-yellow-btn-bg)",i.currentTarget.style.borderColor="var(--color-yellow-btn-border)"},onMouseDown:e,onMouseUp:r,title:l,children:y.jsx(r1,{className:"w-4 h-4"})}));Ws.displayName="CommentButton";const eu=Qt.memo(({onClick:e,title:r="Open in editor",className:l})=>y.jsx("button",{className:`absolute -right-10 top-1/2 -translate-y-1/2 w-7 h-7 flex items-center justify-center rounded transition-all duration-150 hover:scale-110 z-10 ${l||""}`,"data-open-in-editor-button":"true",style:{backgroundColor:"var(--color-editor-btn-bg)",color:"var(--color-editor-btn-text)",border:"1px solid var(--color-editor-btn-border)"},onMouseEnter:i=>{i.currentTarget.style.backgroundColor="var(--color-editor-btn-hover-bg)",i.currentTarget.style.borderColor="var(--color-editor-btn-hover-border)"},onMouseLeave:i=>{i.currentTarget.style.backgroundColor="var(--color-editor-btn-bg)",i.currentTarget.style.borderColor="var(--color-editor-btn-border)"},onMouseDown:i=>{i.stopPropagation()},onClick:i=>{i.stopPropagation(),e(i)},title:r,children:y.jsx(A2,{className:"w-4 h-4 opacity-80"})}));eu.displayName="OpenInEditorButton";const v8=e=>{if("isExpanded"in e&&e.isExpanded)return"bg-github-bg-tertiary/80";switch(e.type){case"add":return"bg-diff-addition-bg";case"delete":return"bg-diff-deletion-bg";default:return"bg-transparent"}},rv=Qt.memo(({line:e,index:r,lineId:l,isCurrentLine:i=!1,hoveredLineIndex:o,selectedLineStyle:u,onMouseEnter:c,onMouseLeave:f,onMouseMove:h,onCommentButtonMouseDown:p,onCommentButtonMouseUp:m,onOpenInEditor:b,syntaxTheme:v,onClick:x,filename:S,diffSegments:w})=>{const N=e.newLineNumber||e.oldLineNumber,E=o===r&&N,C=i?"keyboard-cursor":"";return y.jsxs("tr",{id:l,className:`group ${v8(e)} relative ${u} ${C} cursor-pointer`,onMouseEnter:c,onMouseLeave:f,onMouseMove:h,onClick:x,children:[y.jsx("td",{className:"w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative",children:e.oldLineNumber||""}),y.jsxs("td",{className:"w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible",children:[y.jsx("span",{children:e.newLineNumber||""}),E&&y.jsxs(y.Fragment,{children:[b&&y.jsx(eu,{onClick:b}),y.jsx(Ws,{onMouseDown:p,onMouseUp:m})]})]}),y.jsx("td",{className:"p-0 w-full relative align-top",children:y.jsx(b1,{line:e,syntaxTheme:v,filename:S,diffSegments:w})})]})});rv.displayName="DiffLineRow";const Cx=e=>e!==void 0&&"isExpanded"in e&&e.isExpanded===!0,Nx=(e,r)=>r?"bg-github-bg-tertiary/80":e?.type==="delete"?"bg-diff-deletion-bg":e?.type==="add"?"bg-diff-addition-bg":e?.type==="normal"?"bg-transparent":"bg-github-bg-secondary";function w8({chunk:e,chunkIndex:r,comments:l,onAddComment:i,onGeneratePrompt:o,onRemoveComment:u,onUpdateComment:c,syntaxTheme:f,cursor:h=null,fileIndex:p=0,onLineClick:m,commentTrigger:b,onCommentTriggerHandled:v,filename:x,onOpenInEditor:S}){const[w,N]=T.useState(null),[E,C]=T.useState(null),[j,z]=T.useState(!1),[I,L]=T.useState(null),[O,Z]=T.useState(null);T.useEffect(()=>{if(b?.lineIndex!==void 0){const M=e.lines[b.lineIndex];if(M&&M.type!=="delete"){const V=M.newLineNumber;V&&(L({side:"new",lineNumber:V}),v?.())}}},[b,e.lines,v]),T.useEffect(()=>{if(j){const M=()=>{z(!1),N(null),C(null)};return document.addEventListener("mouseup",M),()=>{document.removeEventListener("mouseup",M)}}},[j]);const P=T.useCallback((M,V)=>{I?.side===M&&I?.lineNumber===V?L(null):L({side:M,lineNumber:V})},[I]),F=T.useCallback(()=>{L(null)},[]),H=T.useCallback(()=>{if(!I)return"";const{side:M,lineNumber:V}=I,R=e.lines;if(typeof V=="number")return R.find(q=>M==="old"?q.oldLineNumber===V:q.newLineNumber===V)?.content?.replace(/^[+-]/,"")||"";{const[D,q]=V;return R.filter(te=>{const le=M==="old"?te.oldLineNumber:te.newLineNumber;return le!==void 0&&le>=D&&le<=q}).map(te=>te.content?.replace(/^[+-]/,"")||"").join(`
|
|
64
|
-
`)}},[I,e.lines]),G=T.useCallback(async M=>{if(I!==null){const V=H();await i(I.lineNumber,M,V||void 0,I.side),L(null)}},[I,i,H]),Q=(M,V)=>l.filter(R=>{const D=Array.isArray(R.line)?R.line[1]===M:R.line===M,q=!R.side||R.side===V;return D&&q}),U=M=>M.oldLine?.type==="delete"&&M.newLine?.type==="add"?M.newLineNumber?"right":"left":M.oldLine?.type==="delete"?"left":M.newLine?.type==="add"?"right":"full",Y=(M,V)=>{const R=M==="old"?V.oldLineNumber:V.newLineNumber;if(!R)return"";if(j&&w&&E&&w.side===M&&E.side===M){const D=Math.min(w.lineNumber,E.lineNumber),q=Math.max(w.lineNumber,E.lineNumber);if(R>=D&&R<=q){let A="after:bg-blue-100 after:absolute after:inset-0 after:opacity-30 after:border-l-4 after:border-blue-500 after:pointer-events-none";return R===D&&(A+=" after:border-t-2"),R===q&&(A+=" after:border-b-2"),A}}if(I&&I.side===M){const D=Array.isArray(I.lineNumber)?I.lineNumber:[I.lineNumber,I.lineNumber],q=D[0],A=D[1];if(q!==void 0&&A!==void 0&&R>=q&&R<=A)return"after:bg-diff-selected-bg after:absolute after:inset-0 after:border-l-5 after:border-l-diff-selected-border after:pointer-events-none"}return""},B=T.useCallback(M=>{const V=[];let R=e.oldStart,D=e.newStart,q=0;for(;q<M.length;){const A=M[q];if(!A){q++;continue}if(A.type==="normal")V.push({oldLine:A,newLine:{...A},oldLineNumber:A.oldLineNumber??R,newLineNumber:A.newLineNumber??D,oldLineOriginalIndex:q,newLineOriginalIndex:q}),R++,D++,q++;else if(A.type==="delete"){let te=q+1;for(;te<M.length&&M[te]?.type==="delete";)te++;const le=M.slice(q,te),fe=q,me=[],ye=te;for(;te<M.length&&M[te]?.type==="add";){const ge=M[te];ge&&me.push(ge),te++}const pe=Math.max(le.length,me.length);for(let ge=0;ge<pe;ge++){const xe=le[ge],de=me[ge];let we;xe&&de&&tv(xe.content,de.content)&&(we=ev(xe.content,de.content)),V.push({oldLine:xe,newLine:de,oldLineNumber:xe?xe.oldLineNumber??R+ge:void 0,newLineNumber:de?de.newLineNumber??D+ge:void 0,oldLineOriginalIndex:xe?fe+ge:void 0,newLineOriginalIndex:de?ye+ge:void 0,wordLevelDiff:we})}R+=le.length,D+=me.length,q=te}else A.type==="add"&&(V.push({newLine:A,newLineNumber:A.newLineNumber??D,newLineOriginalIndex:q}),D++,q++)}return V},[e.oldStart,e.newStart]),X=T.useMemo(()=>B(e.lines),[e.lines,B]);return y.jsx("div",{className:"bg-github-bg-primary overflow-hidden",children:y.jsx("table",{className:"w-full table-fixed border-collapse font-mono text-sm leading-5",children:y.jsx("tbody",{children:X.map((M,V)=>{const R=M.oldLineNumber?Q(M.oldLineNumber,"old"):[],D=M.newLineNumber?Q(M.newLineNumber,"new"):[],q=[...R,...D],A=M.oldLineOriginalIndex??-1,te=M.newLineOriginalIndex??-1,le=h?h.side==="left"&&A>=0?h.chunkIndex===r&&h.lineIndex===A:h.side==="right"&&te>=0?h.chunkIndex===r&&h.lineIndex===te:!1:!1,fe=A>=0?`file-${p}-chunk-${r}-line-${A}-left`:void 0,me=te>=0?`file-${p}-chunk-${r}-line-${te}-right`:void 0,ye=le&&h?.side==="left",pe=le&&h?.side==="right",ge="keyboard-cursor";return y.jsxs(Qt.Fragment,{children:[y.jsxs("tr",{className:"group cursor-pointer",onClick:xe=>{if(!j){const de=xe.target;if(!(de instanceof HTMLElement))return;const we=de.closest("td:nth-child(1)")||de.closest("td:nth-child(2)"),Ee=de.closest("td:nth-child(3)")||de.closest("td:nth-child(4)");we&&A>=0?m?.(p,r,A,"left"):Ee&&te>=0&&m?.(p,r,te,"right")}},onMouseEnter:xe=>{const de=xe.target;if(!(de instanceof HTMLElement))return;const we=de.closest("td:nth-child(1)")||de.closest("td:nth-child(2)"),Ee=de.closest("td:nth-child(3)")||de.closest("td:nth-child(4)");we&&M.oldLineNumber?Z({side:"old",lineNumber:M.oldLineNumber}):Ee&&M.newLineNumber&&Z({side:"new",lineNumber:M.newLineNumber})},onMouseMove:xe=>{const de=xe.target;if(!(de instanceof HTMLElement))return;const we=de.closest("td:nth-child(1)")||de.closest("td:nth-child(2)"),Ee=de.closest("td:nth-child(3)")||de.closest("td:nth-child(4)");we&&M.oldLineNumber?(O?.side!=="old"||O?.lineNumber!==M.oldLineNumber)&&Z({side:"old",lineNumber:M.oldLineNumber}):Ee&&M.newLineNumber&&(O?.side!=="new"||O?.lineNumber!==M.newLineNumber)&&Z({side:"new",lineNumber:M.newLineNumber}),j&&w&&(w.side==="old"&&M.oldLineNumber?C({side:"old",lineNumber:M.oldLineNumber}):w.side==="new"&&M.newLineNumber&&C({side:"new",lineNumber:M.newLineNumber}))},onMouseLeave:()=>Z(null),children:[y.jsxs("td",{id:fe,className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible ${ye?ge:""}`,children:[y.jsx("span",{children:M.oldLineNumber||""}),O?.side==="old"&&O?.lineNumber===M.oldLineNumber&&y.jsxs(y.Fragment,{children:[S&&x&&M.oldLine?.type!=="delete"&&M.newLineNumber!==void 0&&y.jsx(eu,{onClick:()=>{const xe=M.newLineNumber;!x||xe===void 0||S(x,xe)}}),y.jsx(Ws,{onMouseDown:xe=>{xe.stopPropagation(),M.oldLineNumber&&(N({side:"old",lineNumber:M.oldLineNumber}),C({side:"old",lineNumber:M.oldLineNumber}),z(!0))},onMouseUp:xe=>{if(xe.stopPropagation(),!M.oldLineNumber||!w){z(!1),N(null),C(null);return}const de=E&&E.side==="old"?E.lineNumber:M.oldLineNumber;if(w.side!=="old"||w.lineNumber===de)P("old",M.oldLineNumber);else{const we=Math.min(w.lineNumber,de),Ee=Math.max(w.lineNumber,de);P("old",[we,Ee])}z(!1),N(null),C(null)}})]})]}),y.jsx("td",{className:`w-1/2 p-0 align-top border-r border-github-border relative ${Nx(M.oldLine,Cx(M.oldLine))} ${Y("old",M)} ${ye?ge:""}`,children:M.oldLine&&y.jsx("div",{className:"flex items-center relative min-h-[20px] px-3",children:M.wordLevelDiff?y.jsx(Cd,{segments:M.wordLevelDiff.oldSegments,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(Va,{code:M.oldLine.content,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit",syntaxTheme:f,filename:x})})}),y.jsxs("td",{id:me,className:`w-[var(--line-number-width)] min-w-[var(--line-number-width)] max-w-[var(--line-number-width)] px-2 text-right text-github-text-muted bg-github-bg-secondary border-r border-github-border select-none align-top relative overflow-visible ${pe?ge:""}`,children:[y.jsx("span",{children:M.newLineNumber||""}),O?.side==="new"&&O?.lineNumber===M.newLineNumber&&y.jsxs(y.Fragment,{children:[S&&x&&M.newLineNumber!==void 0&&y.jsx(eu,{onClick:()=>{const xe=M.newLineNumber;!x||xe===void 0||S(x,xe)}}),y.jsx(Ws,{onMouseDown:xe=>{xe.stopPropagation(),M.newLineNumber&&(N({side:"new",lineNumber:M.newLineNumber}),C({side:"new",lineNumber:M.newLineNumber}),z(!0))},onMouseUp:xe=>{if(xe.stopPropagation(),!M.newLineNumber||!w){z(!1),N(null),C(null);return}const de=E&&E.side==="new"?E.lineNumber:M.newLineNumber;if(w.side!=="new"||w.lineNumber===de)P("new",M.newLineNumber);else{const we=Math.min(w.lineNumber,de),Ee=Math.max(w.lineNumber,de);P("new",[we,Ee])}z(!1),N(null),C(null)}})]})]}),y.jsx("td",{className:`w-1/2 p-0 align-top relative ${Nx(M.newLine,Cx(M.newLine))} ${Y("new",M)} ${pe?ge:""}`,children:M.newLine&&y.jsx("div",{className:"flex items-center relative min-h-[20px] px-3",children:M.wordLevelDiff?y.jsx(Cd,{segments:M.wordLevelDiff.newSegments,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text"}):y.jsx(Va,{code:M.newLine.content,className:"flex-1 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit",syntaxTheme:f,filename:x})})})]}),q.length>0&&y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:4,className:"p-0 border-t border-github-border",children:q.map(xe=>{const de=xe.side||"new";let we;return de==="old"&&M.oldLineNumber?we="left":de==="new"&&M.newLineNumber?we="right":we=U(M),y.jsx("div",{className:`flex ${we==="left"?"justify-start":we==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${we==="full"?"w-full":"w-1/2"}`,children:y.jsx("div",{className:"m-2 mx-3",children:y.jsx(gh,{comment:xe,onGeneratePrompt:o,onRemoveComment:u,onUpdateComment:c,syntaxTheme:f})})})},xe.id)})})}),I&&(I.side==="old"&&I.lineNumber===M.oldLineNumber||I.side==="new"&&I.lineNumber===M.newLineNumber||Array.isArray(I.lineNumber)&&(I.side==="new"&&I.lineNumber[1]===M.newLineNumber||I.side==="old"&&I.lineNumber[1]===M.oldLineNumber))&&y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:4,className:"p-0",children:y.jsx("div",{className:`flex ${I.side==="old"?"justify-start":I.side==="new"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:"w-1/2",children:y.jsx(nv,{onSubmit:G,onCancel:F,selectedCode:H(),syntaxTheme:f,filename:x})})})})})]},V)})})})})}const S8=T.memo(function({chunk:r,chunkIndex:l,comments:i,onAddComment:o,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f,mode:h=Ka,syntaxTheme:p,cursor:m=null,fileIndex:b=0,onLineClick:v,commentTrigger:x,onCommentTriggerHandled:S,filename:w,onOpenInEditor:N}){const[E,C]=T.useState(null),[j,z]=T.useState(null),[I,L]=T.useState(!1),[O,Z]=T.useState(null),[P,F]=T.useState(null);T.useEffect(()=>{if(x?.lineIndex!==void 0){const V=r.lines[x.lineIndex];if(V){const R=V.newLineNumber||V.oldLineNumber,D=V.type==="delete"?"old":"new";R&&(Z({side:D,lineNumber:R}),S?.())}}},[x,r.lines,S]),T.useEffect(()=>{if(I){const V=()=>{L(!1),C(null),z(null)};return document.addEventListener("mouseup",V),()=>{document.removeEventListener("mouseup",V)}}},[I]);const H=T.useCallback((V,R)=>{O?.side===V&&O?.lineNumber===R?Z(null):Z({side:V,lineNumber:R})},[O]),G=T.useCallback(()=>{Z(null)},[]),Q=T.useCallback(()=>{if(!O)return"";const{side:V,lineNumber:R}=O,D=r.lines;if(typeof R=="number")return D.find(A=>V==="old"?A.oldLineNumber===R:A.newLineNumber===R)?.content?.replace(/^[+-]/,"")||"";{const[q,A]=R;return D.filter(le=>{const fe=V==="old"?le.oldLineNumber:le.newLineNumber;return fe!==void 0&&fe>=q&&fe<=A}).map(le=>le.content?.replace(/^[+-]/,"")||"").join(`
|
|
65
|
-
`)}},[O,r.lines]),U=T.useCallback(async V=>{if(O!==null){const R=Q();await o(O.lineNumber,V,R||void 0,O.side),Z(null)}},[O,o,Q]),Y=(V,R)=>i.filter(D=>{const q=Array.isArray(D.line)?D.line[1]===V:D.line===V,A=!D.side||D.side===R;return q&&A}),B=V=>{if(h==="unified")return"full";switch(V.type){case"delete":return"left";case"add":return"right";default:return"full"}},X=(V,R)=>{if(!V)return"";if(I&&E&&j){const D=Math.min(E,j),q=Math.max(E,j);if(V>=D&&V<=q){let A="after:bg-blue-100 after:absolute after:inset-0 after:opacity-30 after:border-l-4 after:border-blue-500 after:pointer-events-none";return V===D&&(A+=" after:border-t-2"),V===q&&(A+=" after:border-b-2"),A}}if(O&&O.side===R){const D=Array.isArray(O.lineNumber)?O.lineNumber[0]:O.lineNumber,q=Array.isArray(O.lineNumber)?O.lineNumber[1]:O.lineNumber;if(V>=D&&V<=q)return"after:bg-diff-selected-bg after:absolute after:inset-0 after:border-l-5 after:border-l-diff-selected-border after:pointer-events-none"}return""},M=T.useMemo(()=>{const V=new Map,R=r.lines;let D=0;for(;D<R.length;){const q=R[D];if(!q){D++;continue}if(q.type==="delete"){let A=D+1;for(;A<R.length&&R[A]?.type==="delete";)A++;const te=R.slice(D,A),le=D,fe=[];for(;A<R.length&&R[A]?.type==="add";){const ye=R[A];ye&&fe.push({line:ye,index:A}),A++}const me=Math.max(te.length,fe.length);for(let ye=0;ye<me;ye++){const pe=te[ye],ge=fe[ye];if(pe&&ge&&tv(pe.content,ge.line.content)){const xe=ev(pe.content,ge.line.content);V.set(le+ye,xe.oldSegments),V.set(ge.index,xe.newSegments)}}D=A}else D++}return V},[r.lines]);return h==="split"?y.jsx(w8,{chunk:r,chunkIndex:l,comments:i,onAddComment:o,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f,onOpenInEditor:N,syntaxTheme:p,cursor:m,fileIndex:b,onLineClick:v,filename:w,commentTrigger:x,onCommentTriggerHandled:S}):y.jsx("div",{className:"bg-github-bg-primary",children:y.jsx("table",{className:"w-full table-fixed border-collapse font-mono text-sm leading-5",children:y.jsx("tbody",{children:r.lines.map((V,R)=>{const D=V.newLineNumber||V.oldLineNumber||0,q=V.type==="delete"?"old":"new",A=O?Array.isArray(O.lineNumber)?O.lineNumber[1]:O.lineNumber:null,te=V.type==="delete"?V.oldLineNumber:V.newLineNumber,le=V.type==="delete"?"old":"new",fe=te?Y(te,le):[],me=`file-${b}-chunk-${l}-line-${R}`,ye=m&&m.chunkIndex===l&&m.lineIndex===R;return y.jsxs(Qt.Fragment,{children:[y.jsx(rv,{line:V,index:R,lineId:me,isCurrentLine:ye||!1,hoveredLineIndex:P,selectedLineStyle:X(V.newLineNumber||V.oldLineNumber,V.type==="delete"?"old":"new"),onMouseEnter:()=>{F(R)},onMouseLeave:()=>F(null),onMouseMove:()=>{if(I&&E){const pe=V.newLineNumber||V.oldLineNumber;pe&&z(pe)}},onCommentButtonMouseDown:pe=>{pe.stopPropagation();const ge=V.newLineNumber||V.oldLineNumber;ge&&(C(ge),z(ge),L(!0))},onCommentButtonMouseUp:pe=>{pe.stopPropagation();const ge=V.newLineNumber||V.oldLineNumber,xe=V.type==="delete"?"old":"new";if(!ge||!E){L(!1),C(null),z(null);return}const de=j||ge;if(E===de)H(xe,ge);else{const we=Math.min(E,de),Ee=Math.max(E,de);H(xe,[we,Ee])}L(!1),C(null),z(null)},onOpenInEditor:N&&w&&V.type!=="delete"&&(V.newLineNumber||V.oldLineNumber)?()=>{const pe=V.newLineNumber||V.oldLineNumber;pe&&w&&N(w,pe)}:void 0,syntaxTheme:p,filename:w,diffSegments:M.get(R),onClick:()=>{const pe=V.type==="delete"?"left":"right";v?.(b,l,R,pe)}}),fe.map(pe=>{const ge=B(V);return y.jsx("tr",{className:"bg-github-bg-secondary",children:y.jsx("td",{colSpan:3,className:"p-0 border-t border-github-border",children:y.jsx("div",{className:`flex ${ge==="left"?"justify-start":ge==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${ge==="full"?"w-full":"w-1/2"} m-2 mx-4`,children:y.jsx(gh,{comment:pe,onGeneratePrompt:u,onRemoveComment:c,onUpdateComment:f,syntaxTheme:p})})})})},pe.id)}),O&&O.side===q&&A===D&&y.jsx("tr",{className:"bg-[var(--bg-secondary)]",children:y.jsx("td",{colSpan:3,className:"p-0",children:y.jsx("div",{className:`flex ${B(V)==="left"?"justify-start":B(V)==="right"?"justify-end":"justify-center"}`,children:y.jsx("div",{className:`${B(V)==="full"?"w-full":"w-1/2"}`,children:y.jsx(nv,{onSubmit:U,onCancel:G,selectedCode:Q(),syntaxTheme:p,filename:w})})})})})]},R)})})})})}),gd=20,md=T.memo(function({direction:r,hiddenLines:l,onExpandUp:i,onExpandDown:o,onExpandAll:u,isLoading:c=!1}){if(l<=0)return null;const f=`${l} ${l===1?"line":"lines"}`,h=l<=gd,p="grid-cols-[var(--line-number-width)_1fr]",m="flex flex-1 w-full items-center justify-center py-1 text-github-text-primary hover:bg-github-bg-secondary hover:text-github-text-muted transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed",b=[];return h?b.push({key:"all",onClick:u,ariaLabel:`Expand all ${l} hidden lines`,icon:y.jsx(sk,{size:16,"aria-hidden":"true"})}):((r==="up"||r==="both")&&b.push({key:"up",onClick:i,ariaLabel:`Expand ${gd} hidden lines above`,icon:y.jsx(u2,{size:12,"aria-hidden":"true",className:"translate-y-0.5"})}),(r==="down"||r==="both")&&b.push({key:"down",onClick:o,ariaLabel:`Expand ${gd} hidden lines below`,icon:y.jsx(o2,{size:12,"aria-hidden":"true",className:"-translate-y-0.5"})})),y.jsxs("div",{className:`grid w-full border-l border-r border-github-border bg-github-bg-tertiary text-sm ${p}`,children:[y.jsx("div",{className:"flex flex-col items-stretch justify-center gap-0.5 border-r border-github-border",children:c?y.jsx($2,{size:14,className:"animate-spin text-github-text-muted self-center","aria-hidden":"true"}):b.map(v=>y.jsx("button",{type:"button",onClick:v.onClick,disabled:c||!v.onClick,className:m,title:v.ariaLabel,"aria-label":v.ariaLabel,children:v.icon},v.key))}),y.jsx("div",{className:"flex items-center justify-start px-3 py-1.5 font-mono text-github-text-muted select-none",children:f})]})});function tu({file:e,comments:r,diffMode:l,syntaxTheme:i,cursor:o,fileIndex:u,mergedChunks:c,isExpandLoading:f,expandHiddenLines:h,expandAllBetweenChunks:p,onAddComment:m,onGeneratePrompt:b,onRemoveComment:v,onUpdateComment:x,onLineClick:S,onOpenInEditor:w,commentTrigger:N,onCommentTriggerHandled:E}){const C=(j,z,I,L)=>j==="top"&&z.hiddenLinesBefore>0?y.jsx(md,{direction:"down",hiddenLines:z.hiddenLinesBefore,onExpandDown:()=>h(e,I,"up"),onExpandAll:()=>p(e,I,z.hiddenLinesBefore),isLoading:f}):j==="middle"&&z.hiddenLinesBefore>0?y.jsx(md,{direction:"both",hiddenLines:z.hiddenLinesBefore,onExpandUp:()=>h(e,I-1,"down"),onExpandDown:()=>h(e,I,"up"),onExpandAll:()=>p(e,I,z.hiddenLinesBefore),isLoading:f}):j==="bottom"&&z.hiddenLinesAfter>0?y.jsx(md,{direction:"up",hiddenLines:z.hiddenLinesAfter,onExpandUp:()=>h(e,L,"down"),onExpandAll:()=>h(e,L,"down",z.hiddenLinesAfter),isLoading:f}):null;return y.jsx(y.Fragment,{children:c.map((j,z)=>{const I=z===0,L=z===c.length-1,O=j.originalIndices[0]??0,Z=j.originalIndices[j.originalIndices.length-1]??0;return y.jsxs(Qt.Fragment,{children:[I&&C("top",j,O,Z),!I&&C("middle",j,O,Z),y.jsx("div",{id:`chunk-${e.path.replace(/[^a-zA-Z0-9]/g,"-")}-${z}`,children:y.jsx(S8,{chunk:j,chunkIndex:z,comments:r,onAddComment:m,onGeneratePrompt:b,onRemoveComment:v,onUpdateComment:x,onOpenInEditor:w,mode:l,syntaxTheme:i,cursor:o&&o.chunkIndex===z?o:null,fileIndex:u,onLineClick:S,commentTrigger:N&&N.chunkIndex===z?N:null,onCommentTriggerHandled:E,filename:e.path})}),L&&C("bottom",j,O,Z)]},z)})})}const k8=e=>!!(e&&e!=="stdin"),Ei=["text-[26px] font-semibold","text-[22px] font-semibold","text-xl font-semibold","text-lg font-semibold","text-base font-semibold uppercase tracking-wide","text-base font-semibold"],E8=e=>e.type==="delete"||e.type==="remove",C8=e=>e.type==="normal"||e.type==="context",nu=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),lh=(e,r,l)=>{const i=e[e.length-1];if(i&&i.type===r){i.lines.push(l);return}e.push({type:r,lines:[l]})},bd=(e,r)=>{r.forEach(l=>lh(e,"delete",l)),r.length=0},N8=e=>{const r=[],l=[];let i=!1;return e.forEach(o=>{o.lines.forEach(u=>{if(!(u.type==="header"||u.type==="hunk")){if(E8(u)){l.push(u.content);return}if(u.type==="add"){l.length>0&&(bd(r,l),i=!0),lh(r,i?"change":"add",u.content);return}C8(u)&&(bd(r,l),i=!1,lh(r,"context",u.content))}}),bd(r,l),i=!1}),r},A8=e=>Qt.isValidElement(e),T8=e=>Qt.isValidElement(e),ih=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(ih).join(""):A8(e)?ih(e.props.children):"",lv=e=>({h1:({children:r})=>y.jsx("h1",{className:`${Ei[0]} mt-6 mb-2 first:mt-0`,children:r}),h2:({children:r})=>y.jsx("h2",{className:`${Ei[1]} mt-6 mb-2 first:mt-0`,children:r}),h3:({children:r})=>y.jsx("h3",{className:`${Ei[2]} mt-6 mb-2 first:mt-0`,children:r}),h4:({children:r})=>y.jsx("h4",{className:`${Ei[3]} mt-6 mb-2 first:mt-0`,children:r}),h5:({children:r})=>y.jsx("h5",{className:`${Ei[4]} mt-6 mb-2 first:mt-0`,children:r}),h6:({children:r})=>y.jsx("h6",{className:`${Ei[5]} mt-6 mb-2 first:mt-0`,children:r}),p:({children:r})=>y.jsx("p",{className:"text-base leading-7",children:r}),ul:({children:r})=>y.jsx("ul",{className:"list-disc pl-6 text-base space-y-1",children:r}),ol:({children:r})=>y.jsx("ol",{className:"list-decimal pl-6 text-base space-y-1",children:r}),li:({children:r})=>y.jsx("li",{children:r}),blockquote:({children:r})=>y.jsx("blockquote",{className:"border-l-4 border-github-border pl-4 text-github-text-muted italic",children:r}),hr:()=>y.jsx("hr",{className:"border-github-border"}),a:({href:r,children:l})=>{const i=r??"";if(!i||!nu(i))return y.jsx("span",{children:l});const o=i.startsWith("http");return y.jsx("a",{href:i,target:o?"_blank":void 0,rel:o?"noreferrer":void 0,className:"text-sky-400 hover:text-sky-300 underline underline-offset-4",children:l})},img:({src:r,alt:l})=>{const i=r??"";return!i||!nu(i)?null:y.jsx("img",{src:i,alt:l??"",loading:"lazy",className:"max-w-full rounded border border-github-border"})},pre:({children:r})=>{const i=(Array.isArray(r)?r:[r]).find(T8),o=ih(i??r),c=/language-(\S+)/.exec(i?.props.className??"")?.[1];return o.trim()?y.jsx("pre",{className:"markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm",children:y.jsx(ph,{code:o.replace(/\n$/,""),language:c,syntaxTheme:e,className:"font-mono text-github-text-primary"})}):y.jsx("pre",{className:"markdown-preview-code border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-sm",children:r})},code:({className:r,children:l})=>r?y.jsx("code",{className:r,children:l}):y.jsx("code",{className:"px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-sm font-mono",children:l})}),j8=e=>{switch(e){case"add":return"border-l-4 border-diff-addition-border";case"delete":return"border-l-4 border-diff-deletion-border";case"change":return"border-l-4 border-diff-addition-border";default:return"border-l-4 border-transparent"}},R8=e=>/^\s*\[[^\]]+\]:\s+\S+/.test(e),_8=e=>/^\s*\[\^[^\]]+\]:\s+/.test(e),L8=e=>/^\s*<!--.*-->\s*$/.test(e),D8=e=>e.trim()===""||R8(e)||_8(e)||L8(e),O8=e=>e.every(D8),M8=({blocks:e,syntaxTheme:r})=>{const l=T.useMemo(()=>lv(r),[r]);return y.jsx("div",{className:"space-y-4",children:e.map((i,o)=>{const c=i.lines.join(`
|
|
66
|
-
`).trim();if(!c)return null;const f=O8(i.lines);return y.jsx("div",{className:`px-4 ${j8(i.type)}`,children:f?y.jsx("pre",{className:"whitespace-pre-wrap text-sm text-github-text-primary font-mono",children:c}):y.jsx(Ih,{remarkPlugins:[Ph],urlTransform:h=>nu(h)?h:"",components:l,children:c})},`preview-block-${o}`)})})},z8=({content:e,syntaxTheme:r})=>{const l=T.useMemo(()=>lv(r),[r]);return y.jsx("div",{className:"space-y-4",children:y.jsx(Ih,{remarkPlugins:[Ph],urlTransform:i=>nu(i)?i:"",components:l,children:e})})};function F8(e){const{file:r,baseCommitish:l,targetCommitish:i,mergedChunks:o,syntaxTheme:u}=e,[c,f]=T.useState("diff"),[h,p]=T.useState(null),[m,b]=T.useState(!1),[v,x]=T.useState(null),[S,w]=T.useState(null),N=T.useMemo(()=>N8(o),[o]),E=T.useMemo(()=>!l&&!i?null:r.status==="added"?i?{path:r.path,ref:i}:null:r.status==="deleted"?l?{path:r.oldPath||r.path,ref:l}:null:i?{path:r.path,ref:i}:l?{path:r.oldPath||r.path,ref:l}:null,[l,i,r.path,r.oldPath,r.status]),C=T.useMemo(()=>E?`${E.ref}:${E.path}`:null,[E]);T.useEffect(()=>{if(!E||!C||!k8(E.ref)){p(null),w(null),x(null),b(!1);return}let z=!1;return(C!==S||h===null)&&(async()=>{C!==S&&p(null),b(!0),x(null);try{const L=encodeURIComponent(E.path),O=await fetch(`/api/blob/${L}?ref=${encodeURIComponent(E.ref)}`);if(!O.ok)throw new Error(`Failed to fetch preview: ${O.statusText}`);const Z=await O.text();z||(p(Z),w(C))}catch(L){z||(p(null),w(null),x(L instanceof Error?L.message:"Failed to load preview"))}finally{z||b(!1)}})(),()=>{z=!0}},[h,S,E,C]);const j=T.useMemo(()=>C===S&&h!==null,[h,S,C]);return T.useEffect(()=>{c==="full-preview"&&!j&&f("diff-preview")},[j,c]),y.jsxs("div",{className:"bg-github-bg-primary",children:[y.jsx("div",{className:"flex items-center justify-between border-b border-github-border px-4 py-2",children:y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("button",{onClick:()=>f("diff"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="diff"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Code Diff",children:[y.jsx(iu,{size:14}),"Diff"]}),y.jsxs("button",{onClick:()=>f("diff-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="diff-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Diff Preview",children:[y.jsx(Ms,{size:14}),"Diff Preview"]}),j&&y.jsxs("button",{onClick:()=>f("full-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${c==="full-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Full Preview",children:[y.jsx(Ms,{size:14}),"Full Preview"]})]})}),c==="diff"&&y.jsx(tu,{...e}),c==="diff-preview"&&y.jsx("div",{className:"p-4",children:y.jsx(M8,{blocks:N,syntaxTheme:u})}),c==="full-preview"&&y.jsxs("div",{className:"p-4",children:[m&&y.jsx("div",{className:"text-sm text-github-text-muted mb-3",children:"Loading preview..."}),v&&y.jsx("div",{className:"text-sm text-github-danger mb-3",children:v}),!m&&!v&&h!==null&&y.jsx(z8,{content:h,syntaxTheme:u}),!m&&!v&&h===null&&y.jsx("div",{className:"text-sm text-github-text-muted",children:"Preview unavailable."})]})]})}const Ci=["text-2xl font-semibold","text-xl font-semibold","text-lg font-semibold","text-base font-semibold","text-sm font-semibold uppercase tracking-wide","text-sm font-semibold"],iv={markdown:"Markdown",code:"Code",raw:"Raw",unknown:"Cell"},B8=/"cell_type"\s*:\s*"([^"]+)"/,Ax=/"source"\s*:/,I8=/"execution_count"\s*:\s*(null|[0-9]+)/,U8=/"id"\s*:\s*"([^"]+)"/,H8=e=>e.type==="delete"||e.type==="remove",q8=e=>e.type==="normal"||e.type==="context",av=e=>e.type==="add"?"add":H8(e)?"delete":q8(e)?"context":null,ov=e=>e==="markdown"||e==="code"||e==="raw"?e:"unknown",P8=e=>{const r=e.trim();if(!r.startsWith('"'))return null;let l=r;l.endsWith(",")&&(l=l.slice(0,-1));try{const i=JSON.parse(l);return typeof i=="string"?i:null}catch{return l.replace(/^"/,"").replace(/"$/,"").replace(/\\n/g,`
|
|
67
|
-
`).replace(/\\t/g," ").replace(/\\"/g,'"').replace(/\\\\/g,"\\")}},$8=e=>{const r=e.indexOf('"source"');if(r===-1)return null;const l=e.indexOf(":",r);if(l===-1)return null;let i=e.slice(l+1).trim();if(!i)return null;if(i.endsWith(",")&&(i=i.slice(0,-1).trim()),i.startsWith("[")){const o=i.lastIndexOf("]");if(o===-1)return null;const u=i.slice(0,o+1);try{const c=JSON.parse(u);if(Array.isArray(c))return c.filter(f=>typeof f=="string")}catch{return null}return[]}if(i.startsWith('"'))try{const o=JSON.parse(i);return typeof o=="string"?[o]:null}catch{return null}return null},V8=e=>{const r=G8(e);if(r)return r;const l=[];let i=null,o=!1,u=!1,c=!1;const f=()=>{i&&(i.status=o&&u?"change":o?"add":u?"delete":"context",l.push(i),i=null,o=!1,u=!1,c=!1)},h=p=>{f(),i={cellType:p,sourceLines:[],status:"context"}};return e.forEach(p=>{p.lines.forEach(m=>{const b=av(m);if(!b)return;const v=m.content.match(B8);if(v?h(ov(v[1]??"")):!i&&Ax.test(m.content)&&h("unknown"),!i)return;if(b==="add"&&(o=!0),b==="delete"&&(u=!0),!i.id){const w=m.content.match(U8);w&&(i.id=w[1])}if(i.executionCount===void 0){const w=m.content.match(I8);w&&(i.executionCount=w[1]==="null"?null:w[1])}if(Ax.test(m.content)){const w=$8(m.content);if(w){w.forEach(N=>{i?.sourceLines.push({type:b,content:N})}),c=!1;return}c=!0;return}if(!c)return;if(m.content.trim().startsWith("]")){c=!1;return}const S=P8(m.content);S!==null&&i.sourceLines.push({type:b,content:S})})}),f(),{cells:l}},G8=e=>{const r=Tx(e,["add","context"]),l=Tx(e,["delete","context"]),i=qa(r),o=qa(l);if(!i&&!o||i&&i.cells.length===0&&!o)return null;const u=i?.language??o?.language;return{cells:sv(o?.cells??[],i?.cells??[]),language:u}},Tx=(e,r)=>e.flatMap(l=>l.lines).map(l=>{const i=av(l);return!i||!r.includes(i)?null:l.content}).filter(l=>l!==null).join(`
|
|
68
|
-
`),qa=e=>{if(!e.trim())return null;try{const r=JSON.parse(e);if(!r||typeof r!="object"||!("cells"in r))return null;const l=r.cells;if(!Array.isArray(l))return null;const i=r.metadata,o=Y8(i);return{cells:l.map(u=>X8(u)),language:o}}catch{return null}},Y8=e=>{if(!e||typeof e!="object")return;const r=e,l=r.language_info;if(l&&typeof l=="object"){const o=l.name;if(typeof o=="string"&&o.trim())return o}const i=r.kernelspec;if(i&&typeof i=="object"){const o=i.language;if(typeof o=="string"&&o.trim())return o}},X8=e=>{const r=typeof e=="object"&&e?e:{},l=typeof r.cell_type=="string"?r.cell_type:"",i=ov(l),o=typeof r.id=="string"?r.id:void 0,u=r.execution_count,c=u===null?null:typeof u=="number"?String(u):typeof u=="string"?u:void 0,f=Z8(r.source);return{cellType:i,sourceText:f,id:o,executionCount:c}},Z8=e=>typeof e=="string"?e:Array.isArray(e)?e.filter(r=>typeof r=="string").join(""):"",sv=(e,r)=>{const l=[];if(e.some(u=>!!u.id)||r.some(u=>!!u.id)){const u=new Map;e.forEach((f,h)=>{f.id&&u.set(f.id,{cell:f,index:h})});const c=new Set;return r.forEach(f=>{const h=f.id?u.get(f.id):void 0;h&&c.add(h.index),l.push(yd(h?.cell??null,f))}),e.forEach((f,h)=>{c.has(h)||l.push(yd(f,null))}),l}const o=Math.max(e.length,r.length);for(let u=0;u<o;u+=1){const c=e[u]??null,f=r[u]??null;l.push(yd(c,f))}return l},yd=(e,r)=>{if(!r&&e)return{cellType:e.cellType,sourceLines:Fa(e.sourceText,"delete"),status:"delete",id:e.id,executionCount:e.executionCount};if(r&&!e)return{cellType:r.cellType,sourceLines:Fa(r.sourceText,"add"),status:"add",id:r.id,executionCount:r.executionCount};const l=e?.sourceText??"",i=r?.sourceText??"",o=r?.cellType??e?.cellType??"unknown",u=r?.id??e?.id,c=r?.executionCount??e?.executionCount;return l===i&&(e?.cellType??"")===(r?.cellType??"")?{cellType:o,sourceLines:Fa(i,"context"),status:"context",id:u,executionCount:c}:{cellType:o,sourceLines:[...Fa(l,"delete"),...Fa(i,"add")],status:"change",id:u,executionCount:c}},Fa=(e,r)=>e?[{type:r,content:e}]:[],xd=e=>!!(e&&e!=="stdin"),vd=async(e,r)=>{const l=encodeURIComponent(e),i=await fetch(`/api/blob/${l}?ref=${encodeURIComponent(r)}`);return i.ok?i.text():null},Oi=(e,r)=>e.filter(l=>r.includes(l.type)).map(l=>l.content).join(""),wd=e=>{if(!e)return[];const r=e.split(`
|
|
69
|
-
`);return r.length>0&&r[r.length-1]===""&&r.pop(),r},uv=(e,r)=>!e&&!r?[]:e?r?y8(e,r).flatMap(l=>{const i=l.added?"add":l.removed?"delete":"context";return wd(l.value).map(o=>({type:i,content:o}))}):wd(e).map(l=>({type:"delete",content:l})):wd(r).map(l=>({type:"add",content:l})),K8=e=>Qt.isValidElement(e),Q8=e=>Qt.isValidElement(e),ah=e=>e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(ah).join(""):K8(e)?ah(e.props.children):"",J8=e=>{switch(e){case"add":return"border-l-4 border-diff-addition-border";case"delete":return"border-l-4 border-diff-deletion-border";case"change":return"border-l-4 border-diff-addition-border";default:return"border-l-4 border-transparent"}},jx=e=>{switch(e){case"before":return"border-l-4 border-diff-deletion-border";case"after":return"border-l-4 border-diff-addition-border";default:return"border-l-4 border-transparent"}},W8=e=>{switch(e){case"add":return"bg-diff-addition-bg";case"delete":return"bg-diff-deletion-bg";default:return"bg-transparent"}},ej=e=>{switch(e){case"add":return"+";case"delete":return"-";default:return" "}},tj=e=>{switch(e){case"add":return"text-github-accent";case"delete":return"text-github-danger";default:return"text-github-text-muted"}},oh=e=>/^(https?:|mailto:|#|\.{0,2}\/|\/)/i.test(e.trim()),nj=e=>({h1:({children:r})=>y.jsx("h1",{className:`${Ci[0]} mb-2`,children:r}),h2:({children:r})=>y.jsx("h2",{className:`${Ci[1]} mb-2`,children:r}),h3:({children:r})=>y.jsx("h3",{className:`${Ci[2]} mb-2`,children:r}),h4:({children:r})=>y.jsx("h4",{className:`${Ci[3]} mb-2`,children:r}),h5:({children:r})=>y.jsx("h5",{className:`${Ci[4]} mb-2`,children:r}),h6:({children:r})=>y.jsx("h6",{className:`${Ci[5]} mb-2`,children:r}),p:({children:r})=>y.jsx("p",{className:"text-sm leading-7",children:r}),ul:({children:r})=>y.jsx("ul",{className:"list-disc pl-6 text-sm space-y-1",children:r}),ol:({children:r})=>y.jsx("ol",{className:"list-decimal pl-6 text-sm space-y-1",children:r}),li:({children:r})=>y.jsx("li",{children:r}),blockquote:({children:r})=>y.jsx("blockquote",{className:"border-l-4 border-github-border pl-4 text-github-text-muted italic",children:r}),hr:()=>y.jsx("hr",{className:"border-github-border"}),a:({href:r,children:l})=>{const i=r??"";if(!i||!oh(i))return y.jsx("span",{children:l});const o=i.startsWith("http");return y.jsx("a",{href:i,target:o?"_blank":void 0,rel:o?"noreferrer":void 0,className:"text-sky-400 hover:text-sky-300 underline underline-offset-4",children:l})},img:({src:r,alt:l})=>{const i=r??"";return!i||!oh(i)?null:y.jsx("img",{src:i,alt:l??"",loading:"lazy",className:"max-w-full rounded border border-github-border"})},pre:({children:r})=>{const i=(Array.isArray(r)?r:[r]).find(Q8),o=ah(i??r),c=/language-(\S+)/.exec(i?.props.className??"")?.[1];return o.trim()?y.jsx("pre",{className:"border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs",children:y.jsx(ph,{code:o.replace(/\n$/,""),language:c,syntaxTheme:e,className:"font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre"})}):y.jsx("pre",{className:"border border-github-border bg-github-bg-secondary p-3 overflow-x-auto text-xs",children:r})},code:({className:r,children:l})=>r?y.jsx("code",{className:r,children:l}):y.jsx("code",{className:"px-1 py-0.5 rounded bg-github-bg-tertiary border border-github-border text-xs font-mono",children:l}),table:({children:r})=>y.jsx("div",{className:"overflow-x-auto",children:y.jsx("table",{className:"min-w-full border border-github-border",children:r})}),th:({children:r})=>y.jsx("th",{className:"border border-github-border px-2 py-1 bg-github-bg-tertiary text-sm",children:r}),td:({children:r})=>y.jsx("td",{className:"border border-github-border px-2 py-1 text-sm",children:r})}),rj=e=>{const r=Oi(e.sourceLines,["context","delete"]),l=Oi(e.sourceLines,["context","add"]),i=[];return e.status==="change"?(r.trim()&&i.push({label:"Before",content:r,tone:"before"}),l.trim()&&i.push({label:"After",content:l,tone:"after"}),i.length===0&&i.push({label:"After",content:l,tone:"after"}),i):e.status==="delete"?(i.push({label:"Before",content:r||l,tone:"before"}),i):(i.push({label:"After",content:l||r,tone:"after"}),i)},cv=(e,r,l,i)=>{if(!r.trim())return y.jsx("span",{className:"text-xs text-github-text-muted",children:"Empty cell"});if(e==="markdown"){const o=nj(l);return y.jsx(Ih,{remarkPlugins:[Ph],urlTransform:u=>oh(u)?u:"",components:o,children:r})}return e==="raw"?y.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs font-mono text-github-text-primary",children:r}):y.jsx("pre",{className:"overflow-x-auto text-xs",children:y.jsx(Va,{code:r.replace(/\n$/,""),language:i||"python",syntaxTheme:l,className:"font-mono text-github-text-primary [&_.token-line]:block [&_.token-line]:whitespace-pre"})})},lj=({lines:e,syntaxTheme:r,language:l})=>e.length===0?y.jsx("span",{className:"text-xs text-github-text-muted",children:"Empty cell"}):y.jsx("div",{className:"overflow-x-auto",children:y.jsx("div",{className:"font-mono text-xs",children:e.map((i,o)=>y.jsxs("div",{className:`flex items-start min-h-[16px] ${W8(i.type)}`,children:[y.jsx("span",{className:`w-5 text-center flex-shrink-0 select-none ${tj(i.type)}`,children:ej(i.type)}),y.jsx(Va,{code:i.content||" ",language:l||"python",syntaxTheme:r,className:"flex-1 px-3 text-github-text-primary whitespace-pre-wrap break-all overflow-wrap-break-word select-text [&_pre]:m-0 [&_pre]:p-0 [&_pre]:!bg-transparent [&_pre]:font-inherit [&_pre]:text-inherit [&_pre]:leading-inherit [&_code]:!bg-transparent [&_code]:font-inherit [&_code]:text-inherit [&_code]:leading-inherit"})]},`notebook-code-line-${o}`))})}),ij=({cells:e,syntaxTheme:r,language:l})=>y.jsx("div",{className:"space-y-4",children:e.map((i,o)=>{const u=rj(i),c=i.cellType==="code"&&i.executionCount!==void 0?`In[${i.executionCount??" "}]`:null,f=i.cellType==="code",h=f?uv(Oi(i.sourceLines,["context","delete"]),Oi(i.sourceLines,["context","add"])).filter(p=>p.type!=="context"):[];return f&&h.length===0?null:y.jsxs("div",{className:`rounded border border-github-border bg-github-bg-secondary/40 p-4 ${J8(i.status)}`,children:[y.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2 mb-3",children:y.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-github-text-muted",children:iv[i.cellType]}),c&&y.jsx("span",{className:"text-xs font-mono text-github-text-secondary",children:c}),i.id&&y.jsx("span",{className:"text-xs font-mono text-github-text-muted",children:i.id})]})}),y.jsx("div",{className:"space-y-3",children:f?y.jsx("div",{className:`px-4 py-3 ${jx(i.status==="delete"?"before":"after")}`,children:y.jsx(lj,{lines:h,syntaxTheme:r,language:l})}):u.map((p,m)=>y.jsx("div",{className:`px-4 py-3 ${jx(p.tone)}`,children:y.jsx("div",{className:"text-sm text-github-text-primary",children:cv(i.cellType,p.content,r,l)})},`notebook-cell-${o}-section-${m}`))})]},`notebook-cell-${o}`)})}),aj=({cells:e,syntaxTheme:r,language:l})=>y.jsx("div",{className:"space-y-4",children:e.map((i,o)=>{const u=i.cellType==="code"&&i.executionCount!==void 0?`In[${i.executionCount??" "}]`:null;return y.jsxs("div",{className:"rounded border border-github-border bg-github-bg-secondary/40 p-4",children:[y.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[y.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-github-text-muted",children:iv[i.cellType]}),u&&y.jsx("span",{className:"text-xs font-mono text-github-text-secondary",children:u}),i.id&&y.jsx("span",{className:"text-xs font-mono text-github-text-muted",children:i.id})]}),y.jsx("div",{className:"text-sm text-github-text-primary",children:cv(i.cellType,i.sourceText,r,l)})]},`notebook-full-cell-${o}`)})});function oj(e){const{file:r,baseCommitish:l,targetCommitish:i}=e,[o,u]=T.useState("diff"),c=T.useMemo(()=>V8(e.mergedChunks),[e.mergedChunks]),[f,h]=T.useState({status:"idle",cells:c.cells,language:c.language}),p=T.useMemo(()=>f.cells.filter(L=>L.status==="context"?!1:L.cellType!=="code"?!0:uv(Oi(L.sourceLines,["context","delete"]),Oi(L.sourceLines,["context","add"])).filter(Z=>Z.type!=="context").length>0),[f.cells]),[m,b]=T.useState(null),[v,x]=T.useState(c.language),[S,w]=T.useState(!1),[N,E]=T.useState(null),[C,j]=T.useState(null),z=T.useMemo(()=>!l&&!i?null:r.status==="added"?i?{path:r.path,ref:i}:null:r.status==="deleted"?l?{path:r.oldPath||r.path,ref:l}:null:i?{path:r.path,ref:i}:l?{path:r.oldPath||r.path,ref:l}:null,[l,i,r.oldPath,r.path,r.status]),I=T.useMemo(()=>z?`${z.ref}:${z.path}`:null,[z]);return T.useEffect(()=>{let L=!1;return(async()=>{const Z=l||"HEAD~1",P=i||"HEAD",F=r.oldPath||r.path,H=r.status!=="added"&&xd(Z),G=r.status!=="deleted"&&xd(P);if(!H&&!G){h({status:"ready",cells:c.cells,language:c.language,source:"diff",message:"Notebook content could not be loaded, falling back to diff preview."});return}h(Q=>({...Q,status:"loading"}));try{const[Q,U]=await Promise.all([H?vd(F,Z):Promise.resolve(null),G?vd(r.path,P):Promise.resolve(null)]),Y=Q?qa(Q):null,B=U?qa(U):null;if(!Y&&!B){L||h({status:"ready",cells:c.cells,language:c.language,source:"diff",message:"Notebook content could not be parsed, falling back to diff preview."});return}const X=B?.language??Y?.language??c.language,M=sv(Y?.cells??[],B?.cells??[]);L||h({status:"ready",cells:M,source:"blob",language:X})}catch(Q){L||h({status:"error",cells:c.cells,language:c.language,source:"diff",message:Q instanceof Error?Q.message:"Failed to load notebook preview."})}})(),()=>{L=!0}},[l,r.oldPath,r.path,r.status,e.mergedChunks,i,c]),T.useEffect(()=>{if(o!=="full-preview")return;if(!z||!I||!xd(z.ref)){b(null),j(null),E(null),w(!1);return}let L=!1;return(I!==C||!m)&&(async()=>{I!==C&&b(null),w(!0),E(null);try{const Z=await vd(z.path,z.ref);if(!Z)throw new Error("Failed to load preview.");const P=qa(Z);if(!P)throw new Error("Notebook content could not be parsed.");L||(b(P.cells),x(P.language??c.language),j(I))}catch(Z){L||(b(null),j(null),E(Z instanceof Error?Z.message:"Failed to load preview"))}finally{L||w(!1)}})(),()=>{L=!0}},[c.language,m,C,o,z,I]),y.jsxs("div",{className:"bg-github-bg-primary",children:[y.jsx("div",{className:"flex items-center justify-between border-b border-github-border px-4 py-2",children:y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsxs("button",{onClick:()=>u("diff"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${o==="diff"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Code Diff",children:[y.jsx(iu,{size:14}),"Diff"]}),y.jsxs("button",{onClick:()=>u("diff-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${o==="diff-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Diff Preview",children:[y.jsx(Ms,{size:14}),"Diff Preview"]}),y.jsxs("button",{onClick:()=>u("full-preview"),className:`px-2 py-1 text-xs font-medium rounded transition-colors duration-200 flex items-center gap-1 cursor-pointer ${o==="full-preview"?"text-github-text-primary":"text-github-text-secondary hover:text-github-text-primary"}`,title:"Full Preview",children:[y.jsx(Ms,{size:14}),"Full Preview"]})]})}),o==="diff"&&y.jsx(tu,{...e}),o==="diff-preview"&&y.jsxs("div",{className:"p-4",children:[f.status==="loading"&&y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:"Loading notebook preview…"}),f.message&&y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:f.message}),p.length===0?y.jsxs("div",{children:[y.jsx("div",{className:"text-xs text-github-text-muted mb-3",children:"No changed notebook cells were found. Showing raw diff instead."}),y.jsx(tu,{...e})]}):y.jsx(ij,{cells:p,syntaxTheme:e.syntaxTheme,language:f.language})]}),o==="full-preview"&&y.jsxs("div",{className:"p-4",children:[S&&y.jsx("div",{className:"text-sm text-github-text-muted mb-3",children:"Loading preview..."}),N&&y.jsx("div",{className:"text-sm text-github-danger mb-3",children:N}),!S&&!N&&m&&y.jsx(aj,{cells:m,syntaxTheme:e.syntaxTheme,language:v??c.language}),!S&&!N&&!m&&y.jsx("div",{className:"text-sm text-github-text-muted",children:"Preview unavailable."})]})]})}const Sd=[{id:"image",match:e=>O3(e.path),Component:I3,canExpandHiddenLines:()=>!1},{id:"markdown",match:e=>z3(e.path),Component:F8,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"},{id:"notebook",match:e=>B3(e.path),Component:oj,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"},{id:"default",match:()=>!0,Component:tu,canExpandHiddenLines:e=>e.status!=="added"&&e.status!=="deleted"}],sj=e=>{const r=Sd[Sd.length-1];if(!r)throw new Error("No diff viewers registered");return Sd.find(l=>l.match(e))??r},uj=e=>{switch(e){case"added":return y.jsx(t1,{size:16,className:"text-github-accent"});case"deleted":return y.jsx(n1,{size:16,className:"text-github-danger"});case"renamed":return y.jsx(e1,{size:16,className:"text-github-warning"});default:return y.jsx(iu,{size:16,className:"text-github-text-secondary"})}},cj=({file:e,isCollapsed:r,isReviewed:l,onToggleCollapsed:i,onToggleAllCollapsed:o,onToggleReviewed:u})=>{const[c,f]=T.useState(!1);return y.jsxs("div",{className:"bg-github-bg-secondary border-t-2 border-t-github-accent border-b border-github-border px-5 py-4 flex items-center justify-between flex-wrap gap-3 sticky top-0 z-10",children:[y.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[y.jsx("button",{onClick:h=>{h.altKey?o(!r):i(e.path)},className:"text-github-text-muted hover:text-github-text-primary transition-colors cursor-pointer",title:r?"Expand file (Alt+Click to expand all)":"Collapse file (Alt+Click to collapse all)",children:r?y.jsx(Jx,{size:16}):y.jsx(_i,{size:16})}),uj(e.status),y.jsx("h2",{className:"text-sm font-mono text-github-text-primary m-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e.path}),y.jsx("button",{className:`bg-transparent border-none cursor-pointer px-1.5 py-1 rounded text-sm transition-all hover:bg-github-bg-tertiary ${c?"text-github-accent":"text-github-text-secondary hover:text-github-text-primary"}`,onClick:()=>{navigator.clipboard.writeText(e.path).then(()=>{console.log("File path copied to clipboard:",e.path),f(!0),setTimeout(()=>f(!1),2e3)}).catch(h=>{console.error("Failed to copy file path:",h)})},title:"Copy file path",children:c?y.jsx($a,{size:14}):y.jsx(Wx,{size:14})}),e.oldPath&&e.oldPath!==e.path&&y.jsxs("span",{className:"text-xs text-github-text-muted italic",children:["(renamed from ",e.oldPath,")"]})]}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[y.jsxs("span",{className:"font-medium px-1 py-0.5 rounded text-github-accent bg-green-100/10",children:["+",e.additions]}),y.jsxs("span",{className:"font-medium px-1 py-0.5 rounded text-github-danger bg-red-100/10",children:["-",e.deletions]})]}),y.jsxs("button",{onClick:()=>u(e.path),className:`flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium transition-all duration-200 ${l?"bg-github-accent text-white":"dark:bg-slate-600 dark:text-white dark:border-slate-500 dark:hover:bg-slate-500 dark:hover:border-slate-400 bg-github-bg-secondary text-github-text-primary border border-github-border hover:bg-github-bg-tertiary hover:border-github-text-muted"}`,title:l?"Mark as not reviewed":"Mark as reviewed",children:[l?y.jsx($a,{size:14}):y.jsx(lk,{size:14}),"Viewed"]})]})]})},fj=e=>{const r={old:[],new:[]};return e.forEach(l=>{const i=l.side??"new",[o,u]=Array.isArray(l.line)?[l.line[0],l.line[1]]:[l.line,l.line];o<=0||u<=0||r[i].push({start:Math.min(o,u),end:Math.max(o,u)})}),r},dj=(e,r)=>e.chunks.map((l,i)=>{const o=r==="old"?l.oldStart:l.newStart,u=r==="old"?l.oldLines:l.newLines;return!o||u<=0?null:{start:o,end:o+u-1,index:i}}).filter(l=>!!l),hj=e=>{const r=[],l=e[0];if(!l)return r;l.start>1&&r.push({type:"before",start:1,end:l.start-1,nextChunkIndex:l.index});for(let o=1;o<e.length;o+=1){const u=e[o-1],c=e[o];!u||!c||c.start>u.end+1&&r.push({type:"between",start:u.end+1,end:c.start-1,prevChunkIndex:u.index,nextChunkIndex:c.index})}const i=e[e.length-1];return i&&r.push({type:"after",start:i.end+1,end:Number.POSITIVE_INFINITY,prevChunkIndex:i.index}),r},pj=e=>{const r=new Map;return e.forEach(l=>{const i=l.originalIndices[0];i!==void 0&&r.set(i,l)}),r},gj=e=>{const r=e[e.length-1];return r?.originalIndices[r.originalIndices.length-1]??null},mj=T.memo(function({file:r,comments:l,diffMode:i,reviewedFiles:o,onToggleReviewed:u,collapsedFiles:c,onToggleCollapsed:f,onToggleAllCollapsed:h,onAddComment:p,onGeneratePrompt:m,onRemoveComment:b,onUpdateComment:v,onOpenInEditor:x,syntaxTheme:S,baseCommitish:w,targetCommitish:N,cursor:E=null,fileIndex:C=0,onLineClick:j,commentTrigger:z,onCommentTriggerHandled:I,mergedChunks:L,expandLines:O,expandAllBetweenChunks:Z,prefetchFileContent:P,isExpandLoading:F}){const H=c.has(r.path),G=T.useRef(null),[Q,U]=T.useState(!1),Y=sj(r),B=Y.canExpandHiddenLines?.(r)??!1;T.useEffect(()=>{if(!B)return;const D=G.current;if(!D)return;const q=new IntersectionObserver(([A])=>{A?.isIntersecting&&U(!0)},{rootMargin:"200px"});return q.observe(D),()=>q.disconnect()},[B]),T.useEffect(()=>{Q&&!H&&B&&P(r)},[Q,H,B,r,P]);const X=T.useCallback(async(D,q,A,te)=>{try{await p(r.path,D,q,A,te)}catch(le){console.error("Failed to add comment:",le)}},[r.path,p]);T.useEffect(()=>{if(H||F||!B||l.length===0||r.chunks.length===0||L.length===0)return;const D=fj(l),q=pj(L),A=gj(L),te=L[L.length-1],le=new Set,fe=(me,ye)=>{le.has(me)||(le.add(me),ye())};["old","new"].forEach(me=>{const ye=D[me];if(ye.length===0)return;const pe=dj(r,me);hj(pe).forEach(xe=>{if(!ye.some($e=>$e.start<=xe.end&&$e.end>=xe.start))return;if(xe.type==="after"&&te&&A!==null){te.hiddenLinesAfter>0&&fe(`after-${A}`,()=>{O(r,A,"down",te.hiddenLinesAfter)});return}const we=xe.nextChunkIndex;if(we===void 0)return;const Ee=q.get(we);!Ee||Ee.hiddenLinesBefore<=0||(xe.type==="before"?fe(`before-${we}`,()=>{O(r,we,"up",Ee.hiddenLinesBefore)}):xe.type==="between"&&fe(`between-${we}`,()=>{Z(r,we,Ee.hiddenLinesBefore)}))})})},[l,Z,O,r,H,F,L,B]);const M="4em",V=Y.Component,R={file:r,comments:l,diffMode:i,syntaxTheme:S,baseCommitish:w,targetCommitish:N,cursor:E,fileIndex:C,mergedChunks:L,isExpandLoading:F,expandHiddenLines:O,expandAllBetweenChunks:Z,onAddComment:X,onGeneratePrompt:m,onRemoveComment:b,onUpdateComment:v,onOpenInEditor:x,onLineClick:j,commentTrigger:z,onCommentTriggerHandled:I};return y.jsxs("div",{ref:G,className:"bg-github-bg-primary",style:{"--line-number-width":M},children:[y.jsx(cj,{file:r,isCollapsed:H,isReviewed:o.has(r.path),onToggleCollapsed:f,onToggleAllCollapsed:h,onToggleReviewed:u}),!H&&y.jsx("div",{className:"overflow-y-auto",children:y.jsx(V,{...R})})]})});function sh(e){if(!e.isDirectory||!e.children)return[];const r=[];return e.path&&r.push(e.path),e.children.forEach(l=>{r.push(...sh(l))}),r}function bj(e){const r={name:"",path:"",isDirectory:!0,children:[]};e.forEach(i=>{const o=i.path.split("/");let u=r;for(let c=0;c<o.length;c++){const f=o[c];if(!f)continue;const h=c===o.length-1,p=o.slice(0,c+1).join("/");u.children||(u.children=[]);let m=u.children.find(b=>b.name===f);m||(m={name:f,path:p,isDirectory:!h,children:h?void 0:[],file:h?i:void 0},u.children.push(m)),u=m}});const l=i=>{if(!i.isDirectory||!i.children)return i;if(i.children=i.children.map(l),i.children.length===1&&i.children[0]?.isDirectory&&i.children[0]?.children){const o=i.children[0];if(o)return i.name?{...i,name:`${i.name}/${o.name}`,path:o.path,children:o.children}:i}return i};return l(r)}function yj({files:e,onScrollToFile:r,onFileSelected:l,comments:i,reviewedFiles:o,onToggleReviewed:u,selectedFileIndex:c}){const f=T.useMemo(()=>bj(e),[e]),h=T.useRef(null),p=T.useRef(new Map),m={"--dir-row-height":"calc(var(--spacing, 0.25rem) * 9)"},[b,v]=T.useState(()=>new Set(sh(f))),[x,S]=T.useState(""),w=T.useMemo(()=>{const P=new Map;return i.forEach(F=>{P.set(F.file,(P.get(F.file)??0)+1)}),P},[i]),N=T.useMemo(()=>{const P=new Map;return e.forEach((F,H)=>{P.set(F.path,H)}),P},[e]),E=T.useMemo(()=>{const P=x.trim().toLowerCase(),F=H=>{if(!P)return H;if(H.isDirectory&&H.children){const G=H.children.map(Q=>F(Q)).filter(Q=>Q!==null);return G.length>0?{...H,children:G}:null}else if(H.file)return H.file.path.toLowerCase().includes(P)?H:null;return null};return F(f)||{...f,children:[]}},[f,x]),C=P=>{switch(P){case"added":return y.jsx(t1,{size:16,className:"text-github-accent"});case"deleted":return y.jsx(n1,{size:16,className:"text-github-danger"});case"renamed":return y.jsx(e1,{size:16,className:"text-github-warning"});default:return y.jsx(iu,{size:16,className:"text-github-text-secondary"})}},j=P=>{v(F=>{const H=new Set(F);return H.has(P)?H.delete(P):H.add(P),H})},z=T.useMemo(()=>sh(f),[f]),I=b.size===z.length&&z.length>0,L=()=>{v(I?new Set:new Set(z))},O=(P,F)=>{const H=h.current,G=P.currentTarget;if(!H){j(F);return}const Q=H.getBoundingClientRect(),U=G.getBoundingClientRect(),Y=Number.parseFloat(getComputedStyle(G).top||"0");if(U.top-Q.top<=Y+1){const V=p.current.get(F)?.querySelector('[data-tree-row="true"]:not([data-dir-header="true"])'),R=G.getBoundingClientRect().height||0,D=V??G,q=Number.parseInt(D.dataset.depth||G.dataset.depth||"0",10),A=R*q,te=Math.max(0,D.offsetTop-A);if(Math.abs(H.scrollTop-te)<=1){j(F);return}H.scrollTo({top:te,behavior:"smooth"});return}j(F)},Z=(P,F=0)=>{if(P.isDirectory&&P.children){const H=b.has(P.path);return y.jsxs("div",{"data-dir-container":P.path||void 0,ref:G=>{P.path&&(G?p.current.set(P.path,G):p.current.delete(P.path))},children:[P.name&&y.jsxs("div",{className:"sticky flex h-9 items-center gap-2 bg-github-bg-secondary px-4 hover:bg-github-bg-tertiary cursor-pointer","data-dir-header":"true","data-tree-row":"true","data-depth":F,style:{paddingLeft:`${F*16+16}px`,top:`calc(${F} * var(--dir-row-height))`,zIndex:1e3-F},onClick:G=>O(G,P.path),children:[H?y.jsx(_i,{size:16}):y.jsx(Jx,{size:16}),H?y.jsx(O2,{size:16,className:"text-github-text-secondary"}):y.jsx(z2,{size:16,className:"text-github-text-secondary"}),y.jsx("span",{className:"text-sm text-github-text-primary font-medium flex-1 overflow-hidden text-ellipsis whitespace-nowrap",title:P.name,children:P.name})]}),(H||!P.name)&&P.children.map(G=>Z(G,P.name?F+1:F))]},P.path)}else if(P.file){const H=P.file,G=w.get(H.path)??0,Q=o.has(H.path),U=N.get(H.path)??-1,Y=c!==null&&c===U;return y.jsxs("div",{className:`flex items-center gap-2 px-4 py-2 hover:bg-github-bg-tertiary cursor-pointer transition-colors ${Q?"opacity-70":""} ${Y?"bg-github-bg-tertiary":""}`,"data-file-row":"true","data-tree-row":"true","data-depth":F,style:{paddingLeft:`${F*16+16}px`},onClick:()=>{r(H.path),l?.()},children:[y.jsx(i1,{checked:Q,onChange:()=>{u(H.path)},title:Q?"Mark as not reviewed":"Mark as reviewed",className:"z-10"}),C(P.file.status),y.jsx("span",{className:`text-sm text-github-text-primary flex-1 overflow-hidden text-ellipsis whitespace-nowrap ${Q?"line-through text-github-text-muted":""}`,title:P.file.path,children:P.name}),G>0&&y.jsxs("span",{className:"text-github-warning text-sm font-medium ml-auto flex items-center gap-1",children:[y.jsx(r1,{size:14}),G]})]},H.path)}return null};return y.jsxs("div",{className:"h-full flex flex-col",children:[y.jsxs("div",{className:"px-4 py-3 border-b border-github-border bg-github-bg-tertiary",children:[y.jsxs("div",{className:"flex items-center justify-between mb-3",children:[y.jsxs("h3",{className:"text-sm font-semibold text-github-text-primary m-0",children:["Files changed (",e.length,")"]}),y.jsx("button",{onClick:L,className:"p-1 hover:bg-github-bg-primary rounded transition-colors",title:I?"Collapse all":"Expand all",children:I?y.jsx(m2,{size:16,className:"text-github-text-secondary"}):y.jsx(y2,{size:16,className:"text-github-text-secondary"})})]}),y.jsxs("div",{className:"relative",children:[y.jsx(tk,{size:16,className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-github-text-muted"}),y.jsx("input",{type:"text",placeholder:"Filter files...",value:x,onChange:P=>S(P.target.value),className:"w-full pl-9 pr-3 py-2 text-sm bg-github-bg-primary border border-github-border rounded-md focus:outline-none focus:border-github-accent text-github-text-primary placeholder-github-text-muted"})]})]}),y.jsx("div",{className:"flex-1 overflow-y-auto relative z-0",style:m,ref:h,children:E.children?.map(P=>Z(P))})]})}function xj({style:e}){return y.jsx("svg",{width:"98",height:"96",viewBox:"0, 0, 98, 96",style:e,xmlns:"http://www.w3.org/2000/svg","aria-label":"GitHub",role:"img",children:y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z",fill:"currentColor"})})}function vj({isOpen:e,onClose:r}){const{enableScope:l,disableScope:i}=Za();return it("escape",()=>r(),{enabled:e},[r,e]),T.useEffect(()=>(e?i("navigation"):l("navigation"),()=>{l("navigation")}),[e,l,i]),e?y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:r}),y.jsxs("div",{className:"relative bg-github-bg-primary border border-github-border rounded-lg shadow-lg max-w-4xl w-full mx-4 max-h-[80vh] overflow-y-auto",children:[y.jsxs("div",{className:"sticky top-0 bg-github-bg-primary border-b border-github-border px-6 py-4 flex items-center justify-between",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"Keyboard Shortcuts"}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary transition-colors","aria-label":"Close help modal",children:y.jsx(au,{size:20})})]}),y.jsxs("div",{className:"px-6 py-4 grid grid-cols-1 lg:grid-cols-2 gap-6",children:[y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Line Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"j"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"↓"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Next line"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"k"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"↑"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous line"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"File Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"]"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"["}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"["})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Jump to first file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"]"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Jump to last file"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Chunk Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"n"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next change chunk (added/deleted lines)"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"p"}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous change chunk (added/deleted lines)"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Comment Navigation"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"N"}),y.jsx("span",{className:"text-github-text-secondary",children:"Next comment"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"P"}),y.jsx("span",{className:"text-github-text-secondary",children:"Previous comment"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Side Navigation (Side-by-side mode)"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"h"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"←"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Focus left side"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"l"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"→"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Focus right side"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Comment Management"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"L"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"View all comments list"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"C"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Copy all comments prompt"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"D"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Delete all comments"})]})]})]}),y.jsxs("section",{children:[y.jsx("h3",{className:"text-sm font-semibold text-github-text-primary mb-2",children:"Actions"}),y.jsxs("div",{className:"space-y-1",children:[y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"v"}),y.jsx("span",{className:"text-github-text-secondary",children:"Toggle viewed state of current file"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"Shift"}),y.jsx("span",{className:"text-github-text-muted",children:"+"}),y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"R"})]}),y.jsx("span",{className:"text-github-text-secondary",children:"Refresh diff when changes detected"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"c"}),y.jsx("span",{className:"text-github-text-secondary",children:"Add comment at current line"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"."}),y.jsx("span",{className:"text-github-text-secondary",children:"Move cursor to center of viewport"})]}),y.jsxs("div",{className:"flex justify-between text-sm",children:[y.jsx("kbd",{className:"px-2 py-1 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary font-mono",children:"?"}),y.jsx("span",{className:"text-github-text-secondary",children:"Show/hide this help"})]})]})]}),y.jsx("div",{className:"pt-4 border-t border-github-border lg:col-span-2",children:y.jsx("p",{className:"text-xs text-github-text-secondary",children:"Shortcuts are disabled when typing in input fields."})})]})]})]}):null}function wj({style:e}){return y.jsxs("svg",{style:e,viewBox:"0 0 720 190",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"difit",role:"img",children:[y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M440.487 5.90627C432.164 9.01695 427.318 16.2817 427.318 25.649C427.318 35.9474 433.206 43.6458 442.714 45.7819C451.336 47.7188 459.606 44.3893 464.84 36.8737C466.923 33.8843 467.35 32.4073 467.606 27.3105C467.773 23.9957 467.492 20.0154 466.983 18.4654C465.699 14.5629 460.869 9.13088 456.854 7.07513C452.57 4.88086 444.73 4.32102 440.487 5.90627ZM596.658 6.653C588.927 9.55794 584.572 15.4908 583.887 24.0465C583.17 33.0212 586.83 39.8868 594.382 43.7278C603.739 48.4877 615.574 44.5081 620.482 34.9515C625.35 25.4728 622.15 13.4916 613.37 8.32678C608.986 5.74808 601.154 4.96365 596.658 6.653ZM368.585 7.68006C367.464 8.80629 367.302 12.903 367.302 40.2286V71.4878L363.832 68.1329C353.432 58.0787 335.595 52.668 319.246 54.6082C310.542 55.641 299.81 59.1369 293.3 63.0607C278.56 71.9427 266.453 89.5576 263.139 106.945C261.765 114.155 261.602 129.431 262.825 136.365C265.723 152.796 274.795 168.36 286.716 177.355C298.275 186.077 310.237 190 325.274 190C340.687 190 353.943 185.273 362.869 176.594L367.302 172.284V178.215C367.302 186.902 366.946 186.724 384.303 186.709C392.243 186.702 399.29 186.347 399.964 185.919C401.04 185.236 401.189 174.47 401.189 97.1224C401.189 23.7236 401.003 8.87842 400.068 7.74809C398.433 5.77021 370.547 5.71037 368.585 7.68006ZM526.937 7.94153C519.783 10.0325 515.359 12.5834 510.029 17.6867C501.959 25.4129 498.766 34.4597 498.766 49.5975V58.8517H490.659C484.378 58.8517 482.263 59.1418 481.268 60.1394C480.214 61.1976 479.986 63.6558 479.986 73.91C479.986 82.5264 480.289 86.6977 480.966 87.3764C481.601 88.0141 484.903 88.36 490.356 88.36H498.766V136.692C498.766 183.638 498.811 185.048 500.345 185.873C502.433 186.994 529.394 186.994 531.482 185.873C533.016 185.048 533.061 183.638 533.061 136.692V88.36H549.334C563.038 88.36 565.809 88.1568 566.89 87.0723C568.782 85.1723 568.782 62.0394 566.89 60.1394C565.808 59.0541 563.029 58.8517 549.231 58.8517H532.856L533.216 51.9721C533.604 44.5499 534.721 41.9147 538.546 39.3958C540.377 38.1901 543.049 37.904 554.661 37.6737C562.626 37.5155 569.018 37.0343 569.602 36.5483C570.892 35.4761 571.046 10.3579 569.777 7.9776C568.978 6.47923 567.918 6.39562 550.384 6.45054C535.269 6.49808 530.93 6.77431 526.937 7.94153ZM654.931 26.4834C653.136 27.7662 653.094 28.1572 653.094 43.3245V58.8517H644.567C633.342 58.8517 633.497 58.6443 633.497 73.6059C633.497 88.5674 633.342 88.36 644.567 88.36H653.094V122.636C653.094 159.998 653.439 163.935 657.362 171.354C661.848 179.838 669.111 184.99 680.857 188.022C687.996 189.866 707.647 189.269 714.309 187.007C719.756 185.158 719.86 184.87 719.969 171.298C720.082 157.364 720.441 157.791 709.174 158.48C695.386 159.324 689.341 156.938 687.388 149.883C686.927 148.214 686.58 134.435 686.577 117.663L686.572 88.36H702.068H717.564L718.87 86.3592C719.946 84.7108 720.129 82.3461 719.91 72.9575C719.719 64.8279 719.321 61.1689 718.522 60.2041C717.553 59.0345 715.315 58.8517 701.987 58.8517H686.572L686.546 43.8926C686.526 31.8556 686.28 28.613 685.288 27.2941C684.156 25.7884 682.945 25.6351 670.412 25.4129C658.94 25.2088 656.476 25.3793 654.931 26.4834ZM431.459 60.1394C430.316 61.2877 430.178 68.0001 430.188 121.82C430.197 168.838 430.429 182.667 431.232 184.262L432.264 186.311L446.657 186.535C458.941 186.725 461.242 186.567 462.353 185.452C463.521 184.279 463.655 177.845 463.655 122.786C463.655 68.0985 463.515 61.2877 462.372 60.1394C460.469 58.2287 433.362 58.2287 431.459 60.1394ZM587.799 60.4369C587.238 61.4894 586.954 82.56 586.954 123.084C586.954 177.502 587.093 184.285 588.236 185.434C590.138 187.342 616.431 187.342 618.333 185.434C619.476 184.285 619.615 177.447 619.615 122.482C619.615 75.6149 619.38 60.5828 618.636 59.8353C617.947 59.1443 613.344 58.8517 603.15 58.8517C589.644 58.8517 588.586 58.9607 587.799 60.4369ZM347.956 87.3469C362.023 93.9543 369.138 107.306 367.775 124.535C366.623 139.097 359.678 149.866 347.83 155.463C337.073 160.544 325.541 160.523 315.049 155.403C293.381 144.83 288.765 112.315 306.417 94.5961C313.92 87.0641 322.021 84.1412 334.301 84.5354C341.49 84.7666 343.224 85.124 347.956 87.3469Z",fill:"currentColor"}),y.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.42299 0.744751C4.61699 2.15275 2.03999 5.66375 0.956994 12.2768C-0.369006 20.3728 -0.294006 170.791 1.03899 176.572C2.29699 182.031 4.81699 185.308 9.65399 187.774C13.265 189.615 16.865 189.684 108.63 189.684C163.129 189.684 204.095 189.304 204.41 188.795C206 188.5 206 188.795 207.5 188C211.167 187.079 216.779 180.138 218.005 175.584C218.682 173.068 218.939 143.952 218.756 90.4718C218.487 11.7478 218.417 9.10275 216.535 6.62675C215.466 5.22075 213.441 3.19575 212.035 2.12675C209.546 0.23575 206.839 0.17975 110.978 0.0167504C55.373 -0.0782496 11.148 0.239751 9.42299 0.744751ZM203.778 14.8838C205.558 16.6638 205.509 172.577 203.728 175.005C202.577 176.574 198.865 176.688 156.978 176.446L111.478 176.184L111.226 138.684L110.974 101.184H84.059C69.255 101.184 56.808 101.52 56.397 101.931C55.986 102.343 60.674 107.82 66.814 114.104C72.954 120.388 77.978 126.202 77.978 127.026C77.978 129.577 74.769 134.267 71.896 135.916C69.609 137.229 68.75 137.278 66.704 136.217C63.533 134.572 28.705 99.1448 27.757 96.5998C27.36 95.5348 27.491 93.4308 28.049 91.9238C28.955 89.4768 68.498 49.6838 70.024 49.6838C70.366 49.6838 72.356 51.1627 74.447 52.9697C77.589 55.6867 78.118 56.6658 77.498 58.6198C77.086 59.9198 72.075 65.8308 66.363 71.7568C60.651 77.6818 55.978 83.0148 55.978 83.6068C55.978 84.3488 64.068 84.6838 81.952 84.6838H107.927H110.666C111.144 82.5 110.978 73.4537 110.978 46.2337V13.6838H156.778C191.067 13.6838 202.88 13.9858 203.778 14.8838ZM148.803 52.7217C146.51 54.0597 144.845 59.5997 145.74 62.9107C146.146 64.4107 150.657 69.9308 155.764 75.1788C161.411 80.9788 164.547 84.8988 163.764 85.1788C163.057 85.4318 151.549 85.7608 138.19 85.9108C117.896 86.1388 113.747 86.4308 112.956 87.6838C112.435 88.5088 112.002 91.7228 111.993 94.8268C111.982 99.0598 112.373 100.622 113.56 101.077C114.43 101.411 126.13 101.684 139.56 101.684C156.121 101.684 163.978 102.026 163.978 102.746C163.978 103.33 160.187 107.607 155.554 112.251C146.244 121.582 144.276 125.371 146.069 130.514C147.321 134.107 149.576 135.684 153.463 135.684C155.522 135.684 159.843 131.902 173.778 117.904C191.699 99.9008 194.978 96.0678 194.978 93.1208C194.978 91.1338 157.422 53.8238 154.163 52.5728C151.322 51.4818 150.908 51.4937 148.803 52.7217Z",fill:"currentColor"})]})}function Sj({shouldReload:e,isReloading:r,onReload:l,changeType:i,className:o="",compact:u=!1}){if(!e)return null;const c=()=>{switch(i){case"commit":return"New commits available";case"staging":return"Staging changes detected";case"file":return"File changes detected";default:return"Changes detected"}};return y.jsxs("button",{onClick:l,disabled:r,className:`
|
|
70
|
-
flex items-center gap-1.5 text-xs rounded-md border ${o} ${u?"px-2 py-2":"px-3 py-1.5"}
|
|
71
|
-
${r?"bg-github-text-primary text-github-bg-primary border-github-text-primary cursor-not-allowed":"bg-github-text-primary text-github-bg-primary border-github-text-primary"}
|
|
72
|
-
`,title:`${c()} - Click to refresh`,"aria-label":u?"Refresh":void 0,children:[y.jsx(W2,{size:12,className:`${r?"animate-spin":""}`}),u?y.jsx("span",{className:"sr-only",children:"Refresh"}):"Refresh"]})}function Rx({label:e,value:r,resolvedValue:l,onChange:i,options:o,disabledValues:u=[]}){const[c,f]=T.useState(!1),{refs:h,floatingStyles:p,context:m}=Hd({open:c,onOpenChange:f,middleware:[Od(4),zd(),Md({padding:8})],whileElementsMounted:Dd}),b=Fd(m,{handleClose:$d()}),v=Id(m),x=N3(m),S=Ud(m),w=Pd(m),{getReferenceProps:N,getFloatingProps:E}=qd([b,v,x,S,w]),C=r==="working"&&u.includes("staged")||r==="staged"&&u.includes("working"),j=()=>{const P=o.specialOptions.find(G=>G.value===r);if(P)return P.label;const F=o.branches.find(G=>G.name===r);if(F)return`${F.name}${F.current?" (current)":""}`;const H=o.commits.find(G=>G.shortHash===r||G.hash===r);return H?`${H.shortHash} - ${H.message}`:r||"Select..."},z=P=>{i(P),f(!1)},I=P=>u.includes(P),L=(P,F)=>["w-full text-left px-3 py-2 text-xs focus:outline-none transition-colors",P?"hover:bg-diff-selected-bg focus:bg-diff-selected-bg":"hover:bg-github-bg-tertiary focus:bg-github-bg-tertiary",P?"bg-diff-selected-bg border-l-4 border-l-diff-selected-border font-semibold pl-2":"",F?"opacity-50 cursor-not-allowed":"cursor-pointer"].join(" "),O=(P,F)=>P===r||F===r?!0:l?P===l||F===l:!1,Z=()=>{let P=0;const F=o.specialOptions.findIndex(H=>H.value===r);if(F!==-1)return F;if(P+=o.specialOptions.length,!C){const H=o.commits.findIndex(Q=>Q.shortHash===r);if(H!==-1)return P+H;P+=o.commits.length;const G=o.branches.findIndex(Q=>Q.name===r);if(G!==-1)return P+G}return 0};return y.jsxs(y.Fragment,{children:[y.jsxs("button",{ref:h.setReference,type:"button",className:"flex items-center gap-1.5 cursor-pointer group","aria-haspopup":"listbox","aria-expanded":c,...N(),children:[y.jsxs("span",{className:"text-xs text-github-text-secondary",children:[e,":"]}),y.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-github-bg-tertiary border border-github-border rounded hover:border-github-text-secondary transition-colors",children:[y.jsx("code",{className:"text-xs text-github-text-primary max-w-[150px] truncate",children:j()}),y.jsx(_i,{size:12,className:"text-github-text-secondary group-hover:text-github-text-primary transition-colors"})]})]}),c&&y.jsx(Bd,{children:y.jsx(w3,{context:m,modal:!1,initialFocus:Z(),children:y.jsxs("div",{ref:h.setFloating,style:p,className:"bg-github-bg-secondary border border-github-border rounded shadow-lg z-50 w-[360px] max-h-[400px] overflow-y-auto",...E(),children:[o.specialOptions.length>0&&y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Special"}),o.specialOptions.map(P=>y.jsx("button",{onClick:()=>z(P.value),disabled:I(P.value),className:L(P.value===r,I(P.value)),children:P.label},P.value))]}),!C&&o.commits.length>0&&y.jsxs("div",{className:"border-b border-github-border",children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Recent Commits"}),o.commits.map(P=>y.jsx("button",{onClick:()=>z(P.shortHash),disabled:I(P.shortHash),className:L(O(P.shortHash,P.hash),I(P.shortHash)),children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx("code",{className:"text-xs text-github-text-primary font-mono whitespace-nowrap",children:P.shortHash}),y.jsx("span",{className:"text-xs text-github-text-secondary flex-1 break-words",children:P.message})]})},P.hash))]}),!C&&o.branches.length>0&&y.jsxs("div",{children:[y.jsx("div",{className:"px-3 py-2 text-xs font-semibold text-github-text-secondary bg-github-bg-tertiary",children:"Branches"}),o.branches.map(P=>y.jsx("button",{onClick:()=>z(P.name),disabled:I(P.name),className:L(P.name===r,I(P.name)),children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-github-text-primary",children:P.name}),P.current&&y.jsx("span",{className:"text-xs text-github-text-muted",children:"(current)"})]})},P.name))]})]})})})]})}function kj({isOpen:e,onClose:r,options:l,baseRevision:i,targetRevision:o,resolvedBaseRevision:u,resolvedTargetRevision:c,onApply:f}){const[h,p]=T.useState(i),[m,b]=T.useState(o),{enableScope:v,disableScope:x}=Za();T.useEffect(()=>(e?x("navigation"):v("navigation"),()=>{v("navigation")}),[e,v,x]);const S=T.useMemo(()=>{const E=c||m,C=l.commits.findIndex(z=>z.shortHash===E||z.hash===E);if(C===-1)return m?[m]:[];const j=l.commits.slice(0,C+1).map(z=>z.shortHash);return m&&!j.includes(m)&&j.push(m),j.includes("working")||j.push("working"),j},[m,c,l.commits]),w=T.useMemo(()=>{const E=u||h,C=l.commits.findIndex(z=>z.shortHash===E||z.hash===E);if(C===-1)return h?[h]:[];const j=l.commits.slice(C).map(z=>z.shortHash);return h&&!j.includes(h)&&j.push(h),j},[h,u,l.commits]);if(!e)return null;const N=()=>{f(h,m),r()};return y.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[y.jsx("div",{className:"absolute inset-0 bg-black/40",onClick:r}),y.jsxs("div",{className:"relative bg-github-bg-secondary border border-github-border rounded-lg shadow-lg w-full max-w-lg mx-4",children:[y.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-github-border",children:[y.jsx("h2",{className:"text-lg font-semibold text-github-text-primary",children:"Detailed Diff"}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary p-1","aria-label":"Close detailed diff",children:y.jsx(au,{size:18})})]}),y.jsxs("div",{className:"p-4 space-y-4",children:[y.jsxs("div",{className:"flex items-center justify-center gap-3",children:[y.jsx(Rx,{label:"Base",value:h,resolvedValue:u,onChange:p,options:l,disabledValues:S}),y.jsx("span",{className:"text-github-text-muted",children:"..."}),y.jsx(Rx,{label:"Target",value:m,resolvedValue:c,onChange:b,options:l,disabledValues:w})]}),y.jsxs("div",{className:"flex justify-end gap-2",children:[y.jsx("button",{onClick:r,className:"px-3 py-1.5 text-xs font-medium rounded border border-github-border text-github-text-secondary hover:text-github-text-primary transition-colors",type:"button",children:"Cancel"}),y.jsx("button",{onClick:N,className:"px-3 py-1.5 text-xs font-medium rounded bg-github-accent text-white hover:bg-github-accent/90 transition-colors",type:"button",children:"Apply"})]})]})]})]})}const Ej=[{id:"vscode",label:"VS Code",protocol:"vscode",cliCommand:"code",cliArgs:[],lineFormat:"goto-flag",aliases:["vscode","code"]},{id:"cursor",label:"Cursor",protocol:"cursor",cliCommand:"cursor",cliArgs:[],lineFormat:"goto-flag",aliases:["cursor"]},{id:"zed",label:"Zed",protocol:"zed",cliCommand:"zed",cliArgs:[],lineFormat:"path-suffix",aliases:["zed"]},{id:"none",label:"Hide “Open in editor” button",protocol:null,cliCommand:null,cliArgs:[],lineFormat:"goto-flag",aliases:["none","disabled","off"]}],fv="vscode",_x=[{id:"github",label:"GitHub Light"},{id:"vsLight",label:"VS Light"},{id:"oneLight",label:"One Light"},{id:"gruvboxMaterialLight",label:"Gruvbox Material Light"},{id:"nightOwlLight",label:"Night Owl Light"}],Lx=[{id:"vsDark",label:"VS Dark"},{id:"oneDark",label:"One Dark"},{id:"gruvboxMaterialDark",label:"Gruvbox Material Dark"},{id:"nightOwl",label:"Night Owl"},{id:"dracula",label:"Dracula"},{id:"okaidia",label:"Okaidia"}],Cj={fontSize:14,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',theme:"dark",syntaxTheme:"vsDark",editor:fv},Nj=[{name:"System Font",value:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif'},{name:"Menlo",value:'Menlo, Monaco, "Courier New", monospace'},{name:"SF Mono",value:'SF Mono, Consolas, "Liberation Mono", monospace'},{name:"Fira Code",value:'"Fira Code", "Courier New", monospace'},{name:"JetBrains Mono",value:'"JetBrains Mono", "Courier New", monospace'}];function Aj({isOpen:e,onClose:r,settings:l,onSettingsChange:i}){const[o,u]=T.useState(l),{enableScope:c,disableScope:f}=Za();T.useEffect(()=>{u(l)},[l]),T.useEffect(()=>{i(o)},[o,i]),T.useEffect(()=>(e?f("navigation"):c("navigation"),()=>{c("navigation")}),[e,c,f]);const h=()=>o.theme==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":o.theme,p=()=>h()==="light"?_x:Lx,m=v=>{const x={...o,theme:v},w=(v==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":v)==="light"?_x:Lx;if(!w.some(E=>E.id===o.syntaxTheme)&&w.length>0){const E=w[0];E&&(x.syntaxTheme=E.id)}u(x)},b=()=>{u(Cj)};return e?y.jsx("div",{className:"fixed inset-0 flex items-center justify-center z-50 pointer-events-none",children:y.jsxs("div",{className:"bg-github-bg-secondary border border-github-border rounded-lg w-full max-w-md mx-4 pointer-events-auto",children:[y.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-github-border",children:[y.jsxs("h2",{className:"text-lg font-semibold text-github-text-primary flex items-center gap-2",children:[y.jsx(l1,{size:20}),"Appearance Settings"]}),y.jsx("button",{onClick:r,className:"text-github-text-secondary hover:text-github-text-primary p-1",children:y.jsx(au,{size:18})})]}),y.jsxs("div",{className:"p-4 space-y-6",children:[y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Font Size"}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("input",{type:"range",min:"10",max:"20",step:"1",value:o.fontSize,onChange:v=>u({...o,fontSize:parseInt(v.target.value)}),className:"flex-1 accent-github-accent"}),y.jsxs("span",{className:"text-sm text-github-text-secondary w-8 text-right",children:[o.fontSize,"px"]})]})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Font Family"}),y.jsx("select",{value:o.fontFamily,onChange:v=>u({...o,fontFamily:v.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:Nj.map(v=>y.jsx("option",{value:v.value,children:v.name},v.value))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Theme"}),y.jsx("div",{className:"flex gap-2",children:["light","dark","auto"].map(v=>y.jsx("button",{onClick:()=>m(v),className:`px-3 py-2 text-sm rounded border transition-colors ${o.theme===v?"bg-github-accent text-white border-github-accent":"bg-github-bg-tertiary text-github-text-secondary border-github-border hover:text-github-text-primary"}`,children:v.charAt(0).toUpperCase()+v.slice(1)},v))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Syntax Highlighting Theme"}),y.jsx("select",{value:o.syntaxTheme,onChange:v=>u({...o,syntaxTheme:v.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:p().map(v=>y.jsx("option",{value:v.id,children:v.label},v.id))})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium text-github-text-primary mb-2",children:"Open In Editor"}),y.jsx("select",{value:o.editor,onChange:v=>u({...o,editor:v.target.value}),className:"w-full p-2 bg-github-bg-tertiary border border-github-border rounded text-github-text-primary text-sm",children:Ej.map(v=>y.jsx("option",{value:v.id,children:v.label},v.id))})]})]}),y.jsxs("div",{className:"flex items-center justify-between p-4 border-t border-github-border",children:[y.jsx("button",{onClick:b,className:"px-3 py-2 text-sm text-github-text-secondary hover:text-github-text-primary",children:"Reset to Default"}),y.jsx("button",{onClick:r,className:"px-4 py-2 text-sm bg-github-accent text-white rounded hover:bg-green-600",children:"Close"})]})]})}):null}const Dx={position:"absolute",fontSize:"16px",pointerEvents:"none",zIndex:100,transform:"translateY(20px) scale(0.5)",opacity:0},Tj=({isActive:e})=>e?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"animate-sparkle-rise",style:{...Dx,left:"-12px",animationDelay:"0s"},children:"✨"}),y.jsx("div",{className:"animate-sparkle-rise",style:{...Dx,right:"-12px",animationDelay:"0.3s"},children:"✨"})]}):null,Ox={fontSize:14,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',theme:"dark",syntaxTheme:"vsDark",editor:fv},Mx="reviewit-appearance-settings";function jj(){const[e,r]=T.useState(()=>{try{const o=localStorage.getItem(Mx);if(o)return{...Ox,...JSON.parse(o)}}catch(o){console.warn("Failed to load appearance settings from localStorage:",o)}return Ox}),l=T.useCallback(o=>{const u=document.documentElement;u.setAttribute("data-theme",o),o==="light"?(u.style.setProperty("--color-github-bg-primary","#ffffff"),u.style.setProperty("--color-github-bg-secondary","#f6f8fa"),u.style.setProperty("--color-github-bg-tertiary","#f1f3f4"),u.style.setProperty("--color-github-border","#d1d9e0"),u.style.setProperty("--color-github-text-primary","#24292f"),u.style.setProperty("--color-github-text-secondary","#656d76"),u.style.setProperty("--color-github-text-muted","#8c959f"),u.style.setProperty("--color-github-accent","#1f883d"),u.style.setProperty("--color-github-danger","#cf222e"),u.style.setProperty("--color-github-warning","#bf8700"),u.style.setProperty("--color-diff-addition-bg","#d1f4cd"),u.style.setProperty("--color-diff-addition-border","#1f883d"),u.style.setProperty("--color-diff-deletion-bg","#ffd8d3"),u.style.setProperty("--color-diff-deletion-border","#cf222e"),u.style.setProperty("--color-diff-neutral-bg","#f1f3f4"),u.style.setProperty("--color-comment-bg","#fff8e1"),u.style.setProperty("--color-comment-border","#ffd54f"),u.style.setProperty("--color-comment-text","#5d4037"),u.style.setProperty("--color-yellow-btn-bg","#fef3c7"),u.style.setProperty("--color-yellow-btn-border","#f59e0b"),u.style.setProperty("--color-yellow-btn-text","#92400e"),u.style.setProperty("--color-yellow-btn-hover-bg","#fde68a"),u.style.setProperty("--color-yellow-btn-hover-border","#d97706"),u.style.setProperty("--color-yellow-path-bg","#fde68a"),u.style.setProperty("--color-yellow-path-text","#92400e"),u.style.setProperty("--color-editor-btn-bg","rgba(248, 250, 252, 0.1)"),u.style.setProperty("--color-editor-btn-border","rgba(31, 41, 55, 0.35)"),u.style.setProperty("--color-editor-btn-text","#1f2937"),u.style.setProperty("--color-editor-btn-hover-bg","rgba(248, 250, 252, 0.2)"),u.style.setProperty("--color-editor-btn-hover-border","rgba(31, 41, 55, 0.5)")):(u.style.setProperty("--color-github-bg-primary","#0d1117"),u.style.setProperty("--color-github-bg-secondary","#161b22"),u.style.setProperty("--color-github-bg-tertiary","#21262d"),u.style.setProperty("--color-github-border","#30363d"),u.style.setProperty("--color-github-text-primary","#f0f6fc"),u.style.setProperty("--color-github-text-secondary","#8b949e"),u.style.setProperty("--color-github-text-muted","#6e7681"),u.style.setProperty("--color-github-accent","#238636"),u.style.setProperty("--color-github-danger","#da3633"),u.style.setProperty("--color-github-warning","#d29922"),u.style.setProperty("--color-diff-addition-bg","#0d4429"),u.style.setProperty("--color-diff-addition-border","#1b7c3d"),u.style.setProperty("--color-diff-deletion-bg","#67060c"),u.style.setProperty("--color-diff-deletion-border","#da3633"),u.style.setProperty("--color-diff-neutral-bg","#21262d"),u.style.setProperty("--color-comment-bg","#1c2128"),u.style.setProperty("--color-comment-border","#373e47"),u.style.setProperty("--color-comment-text","#e6edf3"),u.style.setProperty("--color-yellow-btn-bg","rgba(180, 83, 9, 0.2)"),u.style.setProperty("--color-yellow-btn-border","rgba(217, 119, 6, 0.5)"),u.style.setProperty("--color-yellow-btn-text","#fbbf24"),u.style.setProperty("--color-yellow-btn-hover-bg","rgba(180, 83, 9, 0.3)"),u.style.setProperty("--color-yellow-btn-hover-border","#d97706"),u.style.setProperty("--color-yellow-path-bg","rgba(180, 83, 9, 0.3)"),u.style.setProperty("--color-yellow-path-text","#fbbf24"),u.style.setProperty("--color-editor-btn-bg","rgba(248, 250, 252, 0.1)"),u.style.setProperty("--color-editor-btn-border","rgba(248, 250, 252, 0.3)"),u.style.setProperty("--color-editor-btn-text","#f0f6fc"),u.style.setProperty("--color-editor-btn-hover-bg","rgba(248, 250, 252, 0.2)"),u.style.setProperty("--color-editor-btn-hover-border","rgba(248, 250, 252, 0.45)")),document.body.style.backgroundColor="var(--color-github-bg-primary)",document.body.style.color="var(--color-github-text-primary)"},[]);return T.useEffect(()=>{const o=document.documentElement;if(o.style.setProperty("--app-font-size",`${e.fontSize}px`),o.style.setProperty("--app-font-family",e.fontFamily),e.theme==="auto"){const u=window.matchMedia("(prefers-color-scheme: dark)");l(u.matches?"dark":"light");const c=f=>{l(f.matches?"dark":"light")};return u.addEventListener("change",c),()=>u.removeEventListener("change",c)}else{l(e.theme);return}},[e,l]),{settings:e,updateSettings:o=>{r(o);try{localStorage.setItem(Mx,JSON.stringify(o))}catch(u){console.warn("Failed to save appearance settings to localStorage:",u)}}}}function dv(e,r,l,i){const o=typeof r=="number"?`L${r}`:Array.isArray(r)?`L${r[0]}-L${r[1]}`:"",u=e||"<unknown file>";if(a1(l)){const c=o1(l);if(c.length>0){let f=`${u}:${o}`,h=0;for(const m of c){const b=l.slice(h,m.startIndex).trim();b&&(f+=`
|
|
73
|
-
${b}`),i&&(f+=`
|
|
74
|
-
ORIGINAL:
|
|
75
|
-
\`\`\`
|
|
76
|
-
${i}
|
|
77
|
-
\`\`\``),f+=`
|
|
78
|
-
SUGGESTED:
|
|
79
|
-
\`\`\`
|
|
80
|
-
${m.suggestedCode}
|
|
81
|
-
\`\`\``,h=m.endIndex}const p=l.slice(h).trim();return p&&(f+=`
|
|
82
|
-
${p}`),f}}return`${u}:${o}
|
|
83
|
-
${l}`}function Rj(e){return e.length===0?"":e.map(l=>dv(l.file,l.line,l.body,l.codeContent)).join(`
|
|
84
|
-
=====
|
|
85
|
-
`)}const _s="difit-storage-v1";class _j{generateStorageKey(r,l){const i=o=>o.replace(/[^a-zA-Z0-9-_]/g,u=>`_${u.charCodeAt(0).toString(16)}_`);return`${i(r)}-${i(l)}`}normalizeCommitish(r,l,i){if(r==="."||r==="working")return"WORKING";if(r==="staged")return"STAGED";if((r==="HEAD"||r==="@")&&l)return l;if(i?.has(r)){const o=i.get(r);if(o)return o}return(r.startsWith("@")||r.includes("^")||r.includes("~")||r.includes("HEAD"))&&console.warn(`[StorageService] Cannot normalize symbolic ref '${r}' - may cause key collision. currentCommitHash=${l}`),r}getStorageKey(r,l,i,o,u){let c,f;l==="."||l==="working"?(c=i||r,f="WORKING"):l==="staged"?(c=i||r,f="STAGED"):(c=this.normalizeCommitish(r,i,o),f=this.normalizeCommitish(l,i,o));const h=this.generateStorageKey(c,f);return u?`${_s}/${u}/${h}`:`${_s}/${h}`}getDiffContextData(r,l,i,o,u){try{const c=this.getStorageKey(r,l,i,o,u),f=localStorage.getItem(c);if(!f)return null;const h=JSON.parse(f);return h.version!==1?(console.warn(`Unknown storage version: ${h.version}`),null):h}catch(c){return console.error("Error reading diff context data:",c),null}}saveDiffContextData(r,l,i,o,u,c){try{const f=this.getStorageKey(r,l,o,u,c),h={...i,baseCommitish:r,targetCommitish:l,lastModifiedAt:new Date().toISOString()};localStorage.setItem(f,JSON.stringify(h))}catch(f){f instanceof DOMException&&f.name==="QuotaExceededError"?console.error("localStorage quota exceeded"):console.error("Error saving diff context data:",f)}}getComments(r,l,i,o,u){return this.getDiffContextData(r,l,i,o,u)?.comments||[]}saveComments(r,l,i,o,u,c){const h=this.getDiffContextData(r,l,o,u,c)||{version:1,baseCommitish:r,targetCommitish:l,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),comments:[],viewedFiles:[]};h.comments=i,this.saveDiffContextData(r,l,h,o,u,c)}getViewedFiles(r,l,i,o,u){return this.getDiffContextData(r,l,i,o,u)?.viewedFiles||[]}saveViewedFiles(r,l,i,o,u,c){const h=this.getDiffContextData(r,l,o,u,c)||{version:1,baseCommitish:r,targetCommitish:l,createdAt:new Date().toISOString(),lastModifiedAt:new Date().toISOString(),comments:[],viewedFiles:[]};h.viewedFiles=i,this.saveDiffContextData(r,l,h,o,u,c)}cleanupOldData(r){const l=new Date;l.setDate(l.getDate()-r);const i=l.getTime(),o=[];for(let u=0;u<localStorage.length;u++){const c=localStorage.key(u);if(c?.startsWith(_s))try{const f=localStorage.getItem(c);if(!f)continue;const h=JSON.parse(f);new Date(h.lastModifiedAt).getTime()<i&&o.push(c)}catch{}}o.forEach(u=>localStorage.removeItem(u))}getStorageSize(){let r=0;for(let l=0;l<localStorage.length;l++){const i=localStorage.key(l);if(!i?.startsWith(_s))continue;const o=localStorage.getItem(i);o&&(r+=(i.length+o.length)*2)}return r}}const Pa=new _j;async function zx(e){try{const l=new TextEncoder().encode(e),i=await crypto.subtle.digest("SHA-256",l);return Array.from(new Uint8Array(i)).map(u=>u.toString(16).padStart(2,"0")).join("")}catch{return console.warn("Crypto API not available, using fallback hash"),Lj(e)}}function Lj(e){let r=0;for(let l=0;l<e.length;l++){const i=e.charCodeAt(l);r=(r<<5)-r+i,r=r&r}return Math.abs(r).toString(16)}function Fx(e){const r=e.chunks.map(l=>{const i=l.lines.filter(o=>o.type!=="hunk"&&o.type!=="header").map(o=>`${o.type}:${o.content}`).join(`
|
|
86
|
-
`);return`${l.header}
|
|
87
|
-
${i}`}).join(`
|
|
88
|
-
|
|
89
|
-
`);return`${e.path}
|
|
90
|
-
${e.status}
|
|
91
|
-
${r}`}function Dj(e,r,l,i,o){const[u,c]=T.useState([]);T.useEffect(()=>{if(!e||!r)return;const S=Pa.getComments(e,r,l,i,o);c(S)},[e,r,l,i,o]);const f=T.useCallback(S=>{!e||!r||(Pa.saveComments(e,r,S,l,i,o),c(S))},[e,r,l,i,o]),h=T.useCallback(S=>{const w={id:crypto.randomUUID(),filePath:S.filePath,body:S.body,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),position:{side:S.side,line:S.line},codeSnapshot:S.codeSnapshot||{content:"",language:jE(S.filePath)}},N=[...u,w];return f(N),w},[u,f]),p=T.useCallback(S=>{const w=u.filter(N=>N.id!==S);f(w)},[u,f]),m=T.useCallback((S,w)=>{const N=u.map(E=>E.id===S?{...E,body:w,updatedAt:new Date().toISOString()}:E);f(N)},[u,f]),b=T.useCallback(()=>{f([])},[f]),v=T.useCallback(S=>{const w=u.find(E=>E.id===S);if(!w)return"";const N=typeof w.position.line=="number"?w.position.line:[w.position.line.start,w.position.line.end];return dv(w.filePath,N,w.body,w.codeSnapshot?.content)},[u]),x=T.useCallback(()=>{const S=u.map(w=>({id:w.id,file:w.filePath,line:typeof w.position.line=="number"?w.position.line:[w.position.line.start,w.position.line.end],body:w.body,timestamp:w.createdAt,codeContent:w.codeSnapshot?.content}));return Rj(S)},[u]);return{comments:u,addComment:h,removeComment:p,updateComment:m,clearAllComments:b,generatePrompt:v,generateAllCommentsPrompt:x}}const Oj=20;async function Bx(e,r){const l=encodeURIComponent(e),i=await fetch(`/api/blob/${l}?ref=${encodeURIComponent(r)}`);if(!i.ok)throw new Error(`Failed to fetch file content: ${i.statusText}`);const u=(await i.text()).split(`
|
|
92
|
-
`);return u.length>0&&u[u.length-1]===""&&u.pop(),{lines:u,totalLines:u.length}}async function Mj(e,r,l,i){const o=encodeURIComponent(e),u=new URLSearchParams;r&&u.set("oldRef",r),l&&u.set("newRef",l),i&&i!==e&&u.set("oldPath",i);const c=await fetch(`/api/line-count/${o}?${u}`);if(!c.ok)throw new Error(`Failed to fetch line count: ${c.statusText}`);return c.json()}function zj({baseCommitish:e,targetCommitish:r}){const[l,i]=T.useState({}),[o,u]=T.useState(!1),[c,f]=T.useState(null),[h,p]=T.useState(0),m=T.useRef(new Map),b=T.useRef({});b.current=l;const v=T.useCallback(async L=>{const O=m.current.get(L.path);if(O)return O;const Z=(async()=>{const P=b.current[L.path];if(P?.oldContent&&P?.newContent)return P;const F={...P,expandedRanges:P?.expandedRanges||[]};if(L.status!=="added"&&e){const H=L.oldPath||L.path;try{const{lines:G,totalLines:Q}=await Bx(H,e);F.oldContent=G,F.oldTotalLines=Q}catch(G){console.error("Failed to fetch old file content:",G),F.oldContent=[],F.oldTotalLines=0}}if(L.status!=="deleted"&&r)try{const{lines:H,totalLines:G}=await Bx(L.path,r);F.newContent=H,F.newTotalLines=G}catch(H){console.error("Failed to fetch new file content:",H),F.newContent=[],F.newTotalLines=0}return F})();m.current.set(L.path,Z);try{return await Z}finally{m.current.delete(L.path)}},[e,r]),x=T.useCallback(L=>{f(L),p(O=>O+1)},[]),S=T.useCallback(async(L,O,Z,P=Oj)=>{u(!0);try{const F=await v(L);i(H=>{const G=H[L.path],Q=G?.expandedRanges||F.expandedRanges||[],U=Q.findIndex(B=>B.chunkIndex===O&&B.direction===Z),Y=[...Q];if(U>=0&&Y[U]){const B=Y[U];Y[U]={chunkIndex:B.chunkIndex,direction:B.direction,count:B.count+P}}else Y.push({chunkIndex:O,direction:Z,count:P});return{...H,[L.path]:{oldContent:G?.oldContent??F.oldContent,newContent:G?.newContent??F.newContent,oldTotalLines:G?.oldTotalLines??F.oldTotalLines,newTotalLines:G?.newTotalLines??F.newTotalLines,expandedRanges:Y}}}),x(L.path)}finally{u(!1)}},[v,x]),w=T.useCallback(async(L,O,Z)=>{u(!0);try{const P=await v(L);i(F=>{const H=F[L.path],Q=[...H?.expandedRanges||P.expandedRanges||[]],U=Q.findIndex(D=>D.chunkIndex===O&&D.direction==="up"),Y=Q.findIndex(D=>D.chunkIndex===O-1&&D.direction==="down");let B=0,X=0;U>=0&&Q[U]&&(B=Q[U].count),Y>=0&&Q[Y]&&(X=Q[Y].count);const M=B+X+Z,V=Q.filter(D=>!(D.chunkIndex===O-1&&D.direction==="down")),R=V.findIndex(D=>D.chunkIndex===O&&D.direction==="up");return R>=0&&V[R]?V[R]={chunkIndex:O,direction:"up",count:M}:V.push({chunkIndex:O,direction:"up",count:M}),{...F,[L.path]:{oldContent:H?.oldContent??P.oldContent,newContent:H?.newContent??P.newContent,oldTotalLines:H?.oldTotalLines??P.oldTotalLines,newTotalLines:H?.newTotalLines??P.newTotalLines,expandedRanges:V}}}),x(L.path)}finally{u(!1)}},[v,x]),N=T.useCallback(async L=>{const O=b.current[L.path];if(O?.oldTotalLines!==void 0||O?.newTotalLines!==void 0)return;const Z=L.status!=="added"?e:void 0,P=L.status!=="deleted"?r:void 0;if(!(!Z&&!P))try{const{oldLineCount:F,newLineCount:H}=await Mj(L.path,Z,P,L.oldPath);i(G=>{const Q=G[L.path];return Q?.oldTotalLines!==void 0||Q?.newTotalLines!==void 0?G:{...G,[L.path]:{...Q,expandedRanges:Q?.expandedRanges||[],oldTotalLines:F,newTotalLines:H}}}),x(L.path)}catch(F){console.error("Failed to prefetch line count:",F)}},[e,r,x]),E=T.useCallback((L,O,Z)=>{const P=l[L];return P&&P.expandedRanges.find(H=>H.chunkIndex===O&&H.direction===Z)?.count||0},[l]),C=T.useCallback((L,O,Z)=>{if(L.status==="added"||L.status==="deleted")return 0;const P=L.chunks[Z-1];let F;if(!P)F=O.oldStart-1;else{const Q=P.oldStart+P.oldLines;F=O.oldStart-Q}const H=E(L.path,Z,"up"),G=Z>0?E(L.path,Z-1,"down"):0;return Math.max(0,F-H-G)},[E]),j=T.useCallback((L,O,Z)=>{if(L.status==="added"||L.status==="deleted")return 0;const P=l[L.path],F=P?.oldTotalLines||P?.newTotalLines;if(F===void 0)return L.chunks[Z+1]?0:-1;if(L.chunks[Z+1])return 0;const G=O.oldStart+O.oldLines-1,Q=F-G,U=E(L.path,Z,"down");return Math.max(0,Q-U)},[l,E]),z=T.useCallback((L,O,Z)=>{const P=l[L.path];if(!P)return O;const F=E(L.path,Z,"up"),H=E(L.path,Z,"down");if(F===0&&H===0)return O;const G=P.oldContent||[],Q=P.newContent||[],U=[];if(F>0){const X=L.chunks[Z-1];let M;X?M=X.oldStart+X.oldLines-1:M=Math.max(0,O.oldStart-1-F);const V=O.oldStart-1,R=O.newStart-1,D=Math.min(F,V-M),q=V-D,A=R-D;for(let te=0;te<D;te++){const le=q+te+1,fe=A+te+1,me=G[le-1]??Q[fe-1]??"";U.push({type:"normal",content:me,oldLineNumber:le,newLineNumber:fe,isExpanded:!0})}}if(U.push(...O.lines),H>0){const X=O.oldStart+O.oldLines-1,M=O.newStart+O.newLines-1,V=L.chunks[Z+1],R=V?V.oldStart-1:P.oldTotalLines||X,D=Math.min(H,R-X);for(let q=0;q<D;q++){const A=X+q+1,te=M+q+1,le=G[A-1]??Q[te-1]??"";U.push({type:"normal",content:le,oldLineNumber:A,newLineNumber:te,isExpanded:!0})}}const Y=U[0],B=U[U.length-1];return{...O,lines:U,oldStart:Y?.oldLineNumber??O.oldStart,newStart:Y?.newLineNumber??O.newStart,oldLines:(B?.oldLineNumber??O.oldStart+O.oldLines-1)-(Y?.oldLineNumber??O.oldStart)+1,newLines:(B?.newLineNumber??O.newStart+O.newLines-1)-(Y?.newLineNumber??O.newStart)+1}},[l,E]),I=T.useCallback(L=>{const O=[];for(let Z=0;Z<L.chunks.length;Z++){const P=L.chunks[Z];if(!P)continue;const F=z(L,P,Z),H=C(L,P,Z),G=j(L,P,Z),Q=O[O.length-1];if(Q&&H===0){Q.lines=[...Q.lines,...F.lines],Q.originalIndices.push(Z),Q.hiddenLinesAfter=G;const U=Q.lines[Q.lines.length-1];Q.oldLines=(U?.oldLineNumber??Q.oldStart+Q.oldLines-1)-Q.oldStart+1,Q.newLines=(U?.newLineNumber??Q.newStart+Q.newLines-1)-Q.newStart+1}else O.push({...F,originalIndices:[Z],hiddenLinesBefore:H,hiddenLinesAfter:G})}return O},[z,C,j]);return{expandedState:l,isLoading:o,lastUpdatedFilePath:c,lastUpdatedAt:h,expandLines:S,expandAllBetweenChunks:w,prefetchFileContent:N,getMergedChunks:I,getHiddenLinesBefore:C,getHiddenLinesAfter:j}}var hv=(e=>(e.DEFAULT="default",e.WORKING="working",e.STAGED="staged",e.DOT="dot",e.SPECIFIC="specific",e))(hv||{});function Fj(e){const r=T.useRef(null),l=T.useRef(null),i=T.useRef(0),o=5,u=3e3,[c,f]=T.useState({isWatchEnabled:!1,diffMode:hv.DEFAULT,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null,connectionStatus:"disconnected"}),[h,p]=T.useState(null),m=T.useCallback(()=>{if(!r.current)try{const x=new EventSource("/api/watch");r.current=x,x.onopen=()=>{console.log("Connected to file watch service"),f(S=>({...S,connectionStatus:"connected"})),i.current=0,p(null)},x.onmessage=S=>{try{const w=JSON.parse(S.data);switch(w.type){case"connected":f(N=>({...N,isWatchEnabled:!0,diffMode:w.diffMode,connectionStatus:"connected"}));break;case"reload":console.log("File changes detected, showing reload button:",w.changeType),f(N=>({...N,shouldReload:!0,lastChangeTime:new Date,lastChangeType:w.changeType}));break;case"error":console.error("File watch error:",w.message),p(w.message||"File watch error occurred");break}}catch(w){console.error("Error parsing watch event:",w)}},x.onerror=()=>{console.log("File watch connection lost"),f(S=>({...S,connectionStatus:"disconnected"})),r.current&&(r.current.close(),r.current=null),i.current<o?(f(S=>({...S,connectionStatus:"reconnecting"})),i.current+=1,l.current=setTimeout(()=>{console.log(`Attempting to reconnect to file watch service (${i.current}/${o})...`),m()},u)):(console.error("Max reconnection attempts reached"),p("Lost connection to file watch service"))}}catch(x){console.error("Failed to connect to file watch service:",x),p("Failed to connect to file watch service")}},[o,u]),b=T.useCallback(async()=>{if(!c.isReloading){f(x=>({...x,isReloading:!0}));try{e&&await e(),f(x=>({...x,shouldReload:!1,isReloading:!1,lastChangeTime:null,lastChangeType:null}))}catch(x){console.error("Reload failed:",x),p("Failed to reload diff data"),f(S=>({...S,isReloading:!1}))}}},[e,c.isReloading]),v=()=>{r.current&&(r.current.close(),r.current=null),l.current&&(clearTimeout(l.current),l.current=null)};return T.useEffect(()=>(m(),v),[m]),T.useEffect(()=>v,[]),{shouldReload:c.shouldReload,isConnected:c.connectionStatus==="connected",error:h,reload:b,watchState:c}}const uh={SCROLL_CONTAINER:"main.overflow-y-auto"};function rl(e,r){const l=`file-${e.fileIndex}-chunk-${e.chunkIndex}-line-${e.lineIndex}`;return r==="split"?`${l}-${e.side}`:l}function pv(e,r){return`${e}:${r}`}function Bj(e,r){const l=r[e.fileIndex]?.chunks[e.chunkIndex]?.lines[e.lineIndex];return l&&(l.type==="add"||l.type==="delete"||l.type==="normal")?l.type:null}function Sn(e,r){const l=Bj(e,r);return l?l==="normal"?!0:l==="delete"?e.side==="left":l==="add"?e.side==="right":!1:!1}function gv(e,r){return Sn(e,r)?e:{...e,side:e.side==="left"?"right":"left"}}const Ix={VIEWPORT_OFFSET_RATIO:1/3};function Ij(e,r,l,i){return{line:o=>{const u=e[o.fileIndex];return!u||i?.has(u.path)?!1:l==="unified"||Sn(o,e)},chunk:o=>{const u=e[o.fileIndex];if(!u||i?.has(u.path))return!1;const c=u.chunks[o.chunkIndex]?.lines[o.lineIndex];if(!c||c.type==="normal")return!1;if(o.lineIndex===0)return!0;const f=u.chunks[o.chunkIndex]?.lines[o.lineIndex-1];return!f||f.type==="normal"},comment:o=>{const u=e[o.fileIndex];if(!u||i?.has(u.path))return!1;const c=u.chunks[o.chunkIndex]?.lines[o.lineIndex];if(!c||c.type==="delete")return!1;const f=c.newLineNumber;if(!f)return!1;const h=pv(u.path,f);return r.has(h)},file:o=>o.chunkIndex===0&&o.lineIndex===0}}function Uj(){return e=>{const r=document.getElementById(e);if(!r)return;const l=document.querySelector(uh.SCROLL_CONTAINER);if(!l)throw new Error(`Scrollable container (${uh.SCROLL_CONTAINER}) not found`);const i=r.getBoundingClientRect(),o=l.getBoundingClientRect(),u=l.clientHeight,c=l.scrollTop,f=Math.max(o.top,0),h=Math.min(o.bottom,window.innerHeight);if(!(i.top>=f&&i.bottom<=h)){const w=Hj(r,l)-u*Ix.VIEWPORT_OFFSET_RATIO;l.scrollTop=Math.max(0,w);return}const m=i.bottom>Math.min(o.bottom,window.innerHeight),v=r.offsetTop-l.offsetTop-u*Ix.VIEWPORT_OFFSET_RATIO,x=v>c;m&&x&&(l.scrollTop=Math.max(0,v))}}function Hj(e,r){let l=e,i=0;for(;l&&l!==r&&l.offsetParent;)i+=l.offsetTop,l=l.offsetParent;return l&&l!==r&&(i+=l.offsetTop),i}function qj(e){return e||{fileIndex:0,chunkIndex:0,lineIndex:-1,side:"right"}}function Pj(e,r,l){return l&&e.fileIndex===r.fileIndex&&e.chunkIndex===r.chunkIndex&&e.lineIndex===r.lineIndex}function $j(e,r,l){let{fileIndex:i,chunkIndex:o,lineIndex:u}=e;const c=l.length;let f=0;if(r==="next")for(u++;f<c;){if(l[i]?.chunks[o]?.lines[u])return{...e,fileIndex:i,chunkIndex:o,lineIndex:u};o++,u=0,l[i]?.chunks[o]||(i++,o=0,u=0,i>=c&&(i=0,f++))}else for(u--;f<c;){if(u<0)if(o--,o<0){i--,i<0&&(i=c-1,f++);const h=l[i];if(h&&h.chunks.length>0){o=h.chunks.length-1;const p=h.chunks[o];u=p&&p.lines.length>0?p.lines.length-1:-1}else o=-1,u=-1}else{const h=l[i]?.chunks[o];u=h&&h.lines.length>0?h.lines.length-1:-1}if(u>=0&&l[i]?.chunks[o]?.lines[u])return{...e,fileIndex:i,chunkIndex:o,lineIndex:u};u<0||u--}return null}function Vj(e,r,l,i,o){let u=e,c=!1;for(;u;){const f=$j(u,r,i);if(!f||(u=f,Pj(u,e,c)))break;if(c=!0,l(u,i)){const h=gv(u,i);return{position:h,scrollTarget:rl(h,o)}}}return{position:null,scrollTarget:null}}function Gj({files:e,comments:r,viewMode:l=Ka,reviewedFiles:i,onToggleReviewed:o,onCreateComment:u,onCopyAllComments:c,onDeleteAllComments:f,onShowCommentsList:h,onRefresh:p}){const[m,b]=T.useState(null),[v,x]=T.useState(!1),S=T.useMemo(()=>Uj(),[]),w=T.useMemo(()=>{const H=new Map;return r.forEach(G=>{const Q=Array.isArray(G.line)?G.line[0]:G.line,U=pv(G.file,Q);H.has(U)||H.set(U,[]),H.get(U)?.push(G)}),H},[r]),N=T.useMemo(()=>Ij(e,w,l,i),[e,w,l,i]),E=T.useCallback((H,G)=>{if(e.length===0)return{position:null,scrollTarget:null};const Q=qj(m);return Vj(Q,H,G,e,l)},[m,e,l]),C=T.useCallback(H=>G=>{const Q=E(G,H);Q.position&&(b(Q.position),Q.scrollTarget&&S(Q.scrollTarget))},[E,S]),j=T.useMemo(()=>C(N.line),[C,N.line]),z=T.useMemo(()=>C(N.chunk),[C,N.chunk]),I=T.useMemo(()=>C(N.file),[C,N.file]),L=T.useMemo(()=>C(N.comment),[C,N.comment]),O=T.useCallback(H=>{if(!m||l!=="split")return;let G={...m,side:H};const Q=e[m.fileIndex]?.chunks[m.chunkIndex]?.lines[m.lineIndex];if(Q){if(H==="left"&&Q.type==="add"&&m.lineIndex>0){if(e[m.fileIndex]?.chunks[m.chunkIndex]?.lines[m.lineIndex-1]?.type==="delete"){G={...G,lineIndex:m.lineIndex-1},b(G),S(rl(G,l));return}}else if(H==="right"&&Q.type==="delete"&&e[m.fileIndex]?.chunks[m.chunkIndex]?.lines[m.lineIndex+1]?.type==="add"){G={...G,lineIndex:m.lineIndex+1},b(G),S(rl(G,l));return}}if(!Sn(G,e)){const U=e[m.fileIndex];if(!U)return;const Y=U.chunks[m.chunkIndex];if(Y){for(let B=m.lineIndex+1;B<Y.lines.length;B++){const X={...G,lineIndex:B};if(Sn(X,e)){G=X;break}}if(!Sn(G,e))for(let B=m.lineIndex-1;B>=0;B--){const X={...G,lineIndex:B};if(Sn(X,e)){G=X;break}}}if(!Sn(G,e)){for(let B=m.chunkIndex+1;B<U.chunks.length;B++){const X=U.chunks[B];if(X){for(let M=0;M<X.lines.length;M++){const V={...G,chunkIndex:B,lineIndex:M};if(Sn(V,e)){G=V;break}}if(Sn(G,e))break}}if(!Sn(G,e))for(let B=m.chunkIndex-1;B>=0;B--){const X=U.chunks[B];if(X){for(let M=X.lines.length-1;M>=0;M--){const V={...G,chunkIndex:B,lineIndex:M};if(Sn(V,e)){G=V;break}}if(Sn(G,e))break}}}}b(G),S(rl(G,l))},[m,l,S,e]),Z=T.useCallback(()=>{const H=document.querySelector(uh.SCROLL_CONTAINER);if(!H)return;const G=H.getBoundingClientRect(),Q=G.top+G.height/2;let U=1/0,Y=null;e.forEach((B,X)=>{B.chunks.forEach((M,V)=>{M.lines.forEach((R,D)=>{const q=l==="split"?["left","right"]:["right"];for(const A of q){const te={fileIndex:X,chunkIndex:V,lineIndex:D,side:A};if(l==="split"&&!Sn(te,e))continue;const le=rl(te,l),fe=document.getElementById(le);if(fe){const me=fe.getBoundingClientRect(),ye=me.top+me.height/2,pe=Math.abs(ye-Q);me.top<G.bottom&&me.bottom>G.top&&pe<U&&(U=pe,Y=te)}}})})}),Y&&b(Y)},[e,l,b]),P=T.useCallback(H=>{if(!H){b(null);return}const G=gv(H,e);b(G),S(rl(G,l))},[e,l,S]),F={scopes:"navigation",enableOnFormTags:!1,preventDefault:!0};return it("j, down",()=>j("next"),F,[j]),it("k, up",()=>j("prev"),F,[j]),it("n",()=>z("next"),F,[z]),it("p",()=>z("prev"),F,[z]),it("shift+n",()=>L("next"),F,[L]),it("shift+p",()=>L("prev"),F,[L]),it("]",()=>I("next"),{...F,useKey:!0},[I]),it("[",()=>I("prev"),{...F,useKey:!0},[I]),it("{",()=>{e.length>0&&(b({fileIndex:0,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"}),S(rl({fileIndex:0,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"},l)))},{...F,useKey:!0},[e,l,S]),it("}",()=>{if(e.length>0){const H=e.length-1,G=e[H];G&&G.chunks.length>0&&(b({fileIndex:H,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"}),S(rl({fileIndex:H,chunkIndex:0,lineIndex:0,side:l==="split"?"left":"right"},l)))}},{...F,useKey:!0},[e,l,S]),it("h, left",()=>O("left"),{...F,enabled:l==="split"},[O,l]),it("l, right",()=>O("right"),{...F,enabled:l==="split"},[O,l]),it("v",()=>{if(m){const H=e[m.fileIndex];H&&o(H.path)}},F,[m,e,o]),it("shift+r",()=>{p&&p()},F,[p]),it("c",()=>{if(m&&u){const H=e[m.fileIndex]?.chunks[m.chunkIndex]?.lines[m.lineIndex];H&&H.type!=="delete"&&u()}},F,[m,e,u]),it("?",()=>x(!v),{...F,useKey:!0},[v]),it(".",H=>{H.ctrlKey||H.altKey||H.shiftKey||H.metaKey||(Z(),H.preventDefault())},{...F,useKey:!0,preventDefault:!1},[Z]),it("shift+c",()=>{c&&c()},{...F,scopes:["navigation","comments-list"]},[c]),it("shift+d",()=>{f&&f()},{...F,scopes:["navigation","comments-list"]},[f]),it("shift+l",()=>{h&&h()},F,[h]),{cursor:m,isHelpOpen:v,setIsHelpOpen:x,setCursorPosition:P}}const kd=new Map;let Yj=0;function Os(e){return kd.has(e)||kd.set(e,`file-${++Yj}`),kd.get(e)??""}const Xj=8,Zj="1200px 0px",Ux=60,Kj=180;function Qj({diffData:e,diffScrollContainerRef:r,setDiffData:l}){const[i,o]=T.useState(new Set),u=T.useRef(new Set),c=T.useRef(null),f=T.useRef(new Map),h=T.useRef(new Set),p=T.useRef(null),m=T.useRef(0);T.useEffect(()=>{if(!e){const C=new Set;u.current=C,o(C),h.current.clear(),p.current=null;return}const w=`${e.requestedBaseCommitish??""}:${e.requestedTargetCommitish??""}`;if(p.current===w)return;p.current=w;const N=e.files.slice(0,Xj).map(C=>C.path),E=new Set(N);u.current=E,o(E),h.current.clear()},[e]);const b=T.useCallback(w=>{const N=f.current.get(w);N&&c.current&&c.current.unobserve(N),o(E=>{if(E.has(w))return E;const C=new Set(E);return C.add(w),u.current=C,C})},[]),v=T.useCallback((w,N)=>{const E=c.current,C=f.current.get(w);if(C&&E&&E.unobserve(C),!N){f.current.delete(w);return}f.current.set(w,N),!(u.current.has(w)||!E)&&E.observe(N)},[]);T.useEffect(()=>{if(c.current&&c.current.disconnect(),!e){c.current=null;return}const w=new IntersectionObserver(N=>{o(E=>{let C=!1;const j=new Set(E);return N.forEach(z=>{if(!z.isIntersecting)return;const I=z.target.dataset.filePath;!I||j.has(I)||(j.add(I),w.unobserve(z.target),C=!0)}),C&&(u.current=j),C?j:E})},{root:r.current,rootMargin:Zj});return c.current=w,f.current.forEach((N,E)=>{u.current.has(E)||w.observe(N)}),()=>{w.disconnect(),c.current=null}},[e,r]);const x=T.useCallback(w=>{if(!e)return;const N=e.files.findIndex(C=>C.path===w);if(N<0)return;const E=c.current;o(C=>{let j=!1;const z=new Set(C);for(let I=0;I<=N;I++){const L=e.files[I]?.path;if(L&&!z.has(L)){z.add(L),j=!0;const O=f.current.get(L);O&&E&&E.unobserve(O)}}return j&&(u.current=z),j?z:C})},[e]),S=T.useCallback(w=>{x(w);const N=e?.files.findIndex(O=>O.path===w)??-1,E=e&&N>=0?e.files.slice(0,N+1).map(O=>Os(O.path)):[Os(w)],C=m.current+1;m.current=C;const j=()=>{for(const O of E){const Z=document.getElementById(O);if(!Z||Z.dataset.rendered!=="true")return!1}return!0},z=O=>{const Z=r.current,P=document.getElementById(Os(w));if(!Z||!P)return!1;const F=Z.getBoundingClientRect(),H=P.getBoundingClientRect(),G=Z.scrollTop+(H.top-F.top);return Z.scrollTo({top:Math.max(0,G),behavior:O}),!0};let I=0;const L=()=>{requestAnimationFrame(()=>{if(m.current===C){if(!j()){I<Ux&&(I++,L());return}if(!z("smooth")){I<Ux&&(I++,L());return}window.setTimeout(()=>{m.current===C&&z("smooth")},Kj)}})};L()},[e,r,x]);return T.useEffect(()=>{if(!e||e.targetCommitish==="stdin")return;const w=e.targetCommitish||"HEAD",N=`${e.requestedBaseCommitish??""}...${e.requestedTargetCommitish??""}`;e.files.forEach(E=>{if(!i.has(E.path)||E.isGenerated!==!1||E.status==="deleted")return;const C=`${N}:${w}:${E.path}`;if(h.current.has(C))return;h.current.add(C);const j=encodeURIComponent(E.path);fetch(`/api/generated-status/${j}?ref=${encodeURIComponent(w)}`).then(z=>z.ok?z.json():null).then(z=>{!z||z.isGenerated!==!0||l(I=>{if(!I||I.requestedBaseCommitish!==e.requestedBaseCommitish||I.requestedTargetCommitish!==e.requestedTargetCommitish)return I;let L=!1;const O=I.files.map(Z=>Z.path!==E.path||Z.isGenerated?Z:(L=!0,{...Z,isGenerated:!0}));return L?{...I,files:O}:I})}).catch(()=>{})})},[e,i,l]),{renderedFilePaths:i,ensureFileRendered:b,ensureFilesRenderedUpTo:x,registerLazyFileContainer:v,scrollFileIntoDiffContainer:S}}function Jj(e,r,l,i,o,u){const[c,f]=T.useState([]),[h,p]=T.useState(new Map);T.useEffect(()=>{if(!e||!r)return;const E=Pa.getViewedFiles(e,r,l,i,u);(async()=>{if(o&&o.length>0){const j=[],z=new Set(E.map(I=>I.filePath));for(const I of o)if((I.isGenerated||I.status==="deleted")&&!z.has(I.path))try{const L=Fx(I),O=await zx(L),Z={filePath:I.path,viewedAt:new Date().toISOString(),diffContentHash:O};j.push(Z)}catch(L){console.error("Failed to generate hash for auto-collapsed file:",L)}if(j.length>0){const I=[...E,...j];Pa.saveViewedFiles(e,r,I,l,i,u),f(I);return}}f(E)})()},[e,r,l,i,u]);const m=T.useCallback(E=>{!e||!r||(Pa.saveViewedFiles(e,r,E,l,i,u),f(E))},[e,r,l,i,u]),b=T.useMemo(()=>new Set(c.map(E=>E.filePath)),[c]),v=T.useCallback(E=>c.find(C=>C.filePath===E),[c]),x=T.useCallback(async E=>{const C=h.get(E.path);if(C)return C;const j=Fx(E),z=await zx(j);return p(I=>new Map(I).set(E.path,z)),z},[h]),S=T.useCallback(async(E,C)=>{const j=v(E);if(!j)return!1;const z=await x(C);return j.diffContentHash!==z},[v,x]),w=T.useCallback(async(E,C)=>{if(v(E)){const z=c.filter(I=>I.filePath!==E);m(z)}else{const z=await x(C),I={filePath:E,viewedAt:new Date().toISOString(),diffContentHash:z},L=[...c,I];m(L)}},[c,v,x,m]),N=T.useCallback(()=>{m([]),p(new Map)},[m]);return{viewedFiles:b,toggleFileViewed:w,isFileContentChanged:S,getViewedFileRecord:v,clearViewedFiles:N}}const Hx={mobileMax:767,desktopMin:1024},ru={mobile:`(max-width: ${Hx.mobileMax}px)`,desktop:`(min-width: ${Hx.desktopMin}px)`},Wj=()=>typeof window>"u"?{isMobile:!1,isDesktop:!0}:{isMobile:window.matchMedia(ru.mobile).matches,isDesktop:window.matchMedia(ru.desktop).matches};function eR(){const[e,r]=T.useState(()=>Wj());return T.useEffect(()=>{if(typeof window>"u")return;const l=window.matchMedia(ru.mobile),i=window.matchMedia(ru.desktop),o=()=>{r({isMobile:l.matches,isDesktop:i.matches})};return o(),l.addEventListener("change",o),i.addEventListener("change",o),()=>{l.removeEventListener("change",o),i.removeEventListener("change",o)}},[]),e}function tR(e,r,l){for(let i=0;i<e.chunks.length;i++){const o=e.chunks[i];if(o)for(let u=0;u<o.lines.length;u++){const c=o.lines[u];if(!c)continue;if((c.newLineNumber||c.oldLineNumber)===l)return{fileIndex:r,chunkIndex:i,lineIndex:u,side:c.newLineNumber?"right":"left"}}}return null}function nR(e,r){const l=r.findIndex(u=>u.path===e.file);if(l===-1)return null;const i=r[l];if(!i)return null;const o=Array.isArray(e.line)?e.line[1]:e.line;return tR(i,l,o)}const rR=[],lR=[],mv="difit.sidebarWidth",bv="difit.sidebarOpen",yv=200,xv=600,Ed=280,iR=()=>{if(typeof window>"u")return Ed;const e=window.localStorage.getItem(mv);if(!e)return Ed;const r=Number.parseInt(e,10);return Number.isFinite(r)?Math.min(xv,Math.max(yv,r)):Ed},aR=()=>{if(typeof window>"u")return!0;const e=window.localStorage.getItem(bv);return e===null||e==="true"?!0:e!=="false"};function oR(){const[e,r]=T.useState(null),[l,i]=T.useState(Ka),o=T.useRef(!1),[u,c]=T.useState(!0),[f,h]=T.useState(!0),[p,m]=T.useState(null),[b,v]=T.useState(!1),[x,S]=T.useState(iR),[w,N]=T.useState(!1),[E,C]=T.useState(aR),[j,z]=T.useState(!1),[I,L]=T.useState(!1),[O,Z]=T.useState(!1),[P,F]=T.useState(!1),[H,G]=T.useState(!1),[Q,U]=T.useState(new Set),Y=T.useRef(!1),B=T.useRef(null),[X,M]=T.useState(null),[V,R]=T.useState(""),[D,q]=T.useState(""),[A,te]=T.useState(""),[le,fe]=T.useState(""),me=T.useRef(!1),{settings:ye,updateSettings:pe}=jj(),{isMobile:ge,isDesktop:xe}=eR(),{comments:de,addComment:we,removeComment:Ee,updateComment:$e,clearAllComments:Ke,generatePrompt:Me,generateAllCommentsPrompt:Bt}=Dj(e?.baseCommitish,e?.targetCommitish,e?.commit,void 0,e?.repositoryId),pt=T.useMemo(()=>de.map(re=>({id:re.id,file:re.filePath,line:typeof re.position.line=="number"?re.position.line:[re.position.line.start,re.position.line.end],body:re.body,timestamp:re.createdAt,codeContent:re.codeSnapshot?.content,side:re.position.side})),[de]),gt=T.useMemo(()=>de.map(re=>({id:re.id,file:re.filePath,line:typeof re.position.line=="number"?re.position.line:[re.position.line.start,re.position.line.end],body:re.body,timestamp:re.createdAt,side:re.position.side})),[de]),Gt=T.useMemo(()=>{const re=new Map;return pt.forEach(ve=>{const Se=re.get(ve.file);Se?Se.push(ve):re.set(ve.file,[ve])}),re},[pt]),Yt=ge&&de.length>0,{viewedFiles:tt,toggleFileViewed:at,clearViewedFiles:nr}=Jj(e?.baseCommitish,e?.targetCommitish,e?.commit,void 0,e?.files,e?.repositoryId);T.useEffect(()=>{Y.current=!1},[e?.repositoryId,e?.commit]),T.useEffect(()=>{Y.current||(U(new Set(tt)),Y.current=!0)},[tt]);const{renderedFilePaths:ae,ensureFileRendered:be,ensureFilesRenderedUpTo:Te,registerLazyFileContainer:Oe,scrollFileIntoDiffContainer:Ve}=Qj({diffData:e,diffScrollContainerRef:B,setDiffData:r}),Lt=T.useCallback(async re=>{if(!e)return;const ve=e.files.find(Qe=>Qe.path===re);if(!ve)return;const Se=tt.has(re);await at(re,ve),U(Qe=>{const Ie=new Set(Qe);return Se?Ie.delete(re):Ie.add(re),Ie}),Se||setTimeout(()=>{Ve(re)},100)},[e,Ve,at,tt]),zn=T.useCallback(re=>{U(ve=>{const Se=new Set(ve);return Se.has(re)?Se.delete(re):Se.add(re),Se})},[]),Dt=T.useCallback(re=>{e&&U(re?new Set(e.files.map(ve=>ve.path)):new Set)},[e]),mt=T.useCallback(re=>{o.current=!0,i(re)},[]),{isLoading:It,expandLines:Je,expandAllBetweenChunks:Pn,prefetchFileContent:fn,getMergedChunks:Fi,lastUpdatedFilePath:Ar,lastUpdatedAt:Il}=zj({baseCommitish:e?.baseCommitish,targetCommitish:e?.targetCommitish}),Tr=T.useRef(Fi);T.useEffect(()=>{Tr.current=Fi},[Fi]);const[Fn,jr]=T.useState(new Map),$n=T.useMemo(()=>{const re=new Map;return e?.files.forEach(ve=>{re.set(ve.path,ve)}),re},[e]);T.useEffect(()=>{if(!e){jr(new Map);return}jr(re=>{let ve=!1;const Se=new Map(re),Qe=new Set(e.files.map(Ie=>Ie.path));return Se.forEach((Ie,St)=>{Qe.has(St)||(Se.delete(St),ve=!0)}),ae.forEach(Ie=>{if(Se.has(Ie))return;const St=$n.get(Ie);St&&(Se.set(Ie,Tr.current(St)),ve=!0)}),ve?Se:re})},[e,$n,ae]),T.useEffect(()=>{if(!e||!Ar)return;const re=$n.get(Ar);re&&jr(ve=>{if(!ve.has(re.path))return ve;const Se=new Map(ve);return Se.set(re.path,Tr.current(re)),Se})},[e,$n,Ar,Il]);const ku=T.useMemo(()=>e?e.files.map(re=>({...re,chunks:Fn.get(re.path)||re.chunks})):[],[e,Fn]),[Bi,fl]=T.useState(null),{shouldReload:dl,reload:ro,watchState:Ii}=Fj(async()=>{await wt()}),{cursor:Jt,isHelpOpen:lo,setIsHelpOpen:Ul,setCursorPosition:Vn}=Gj({files:ku,comments:pt,viewMode:l,reviewedFiles:tt,onToggleReviewed:Lt,onCreateComment:()=>{Jt&&fl({fileIndex:Jt.fileIndex,chunkIndex:Jt.chunkIndex,lineIndex:Jt.lineIndex})},onCopyAllComments:()=>{de.length>0&&Ui()},onDeleteAllComments:()=>{de.length>0&&confirm("Delete all comments?")&&Ke()},onShowCommentsList:()=>{F(!0)},onRefresh:()=>{ro()}});T.useEffect(()=>{if(!e||!Jt)return;const re=e.files[Jt.fileIndex]?.path;!re||ae.has(re)||(Te(re),requestAnimationFrame(()=>{Vn(Jt)}))},[Jt,e,Te,ae,Vn]);const io=T.useCallback((re,ve,Se,Qe)=>{Vn({fileIndex:re,chunkIndex:ve,lineIndex:Se,side:Qe})},[Vn]),ao=T.useCallback(()=>{fl(null)},[fl]),Gn=T.useCallback(re=>Me(re.id),[Me]),Tt=re=>{re.preventDefault(),z(!0);const ve=re.clientX,Se=x,Qe=St=>{const Bn=Math.max(yv,Math.min(xv,Se+(St.clientX-ve)));S(Bn)},Ie=()=>{z(!1),document.removeEventListener("mousemove",Qe),document.removeEventListener("mouseup",Ie)};document.addEventListener("mousemove",Qe),document.addEventListener("mouseup",Ie)},wt=T.useCallback(async(re,ve)=>{try{const Se=new URLSearchParams({ignoreWhitespace:String(u)});re&&Se.set("base",re),ve&&Se.set("target",ve);const Qe=await fetch(`/api/diff?${Se}`);if(!Qe.ok)throw new Error("Failed to fetch diff data");const Ie=await Qe.json();if(r(Ie),Ie.baseCommitish&&te(Ie.baseCommitish),Ie.targetCommitish&&fe(Ie.targetCommitish),!me.current){const St=Ie.requestedBaseCommitish??Ie.baseCommitish,Bn=Ie.requestedTargetCommitish??Ie.targetCommitish;St&&R(St),Bn&&q(Bn)}Ie.mode&&!o.current&&i(ck(Ie.mode))}catch(Se){m(Se instanceof Error?Se.message:"Unknown error")}finally{h(!1)}},[u]);T.useEffect(()=>{wt()},[wt]),T.useEffect(()=>{ge&&l!=="unified"&&i("unified")},[l,ge]),T.useEffect(()=>{try{window.localStorage.setItem(mv,String(x))}catch{}},[x]),T.useEffect(()=>{try{window.localStorage.setItem(bv,String(E))}catch{}},[E]),T.useEffect(()=>{fetch("/api/revisions").then(re=>re.ok?re.json():null).then(re=>{M(re),re?.resolvedBase&&te(ve=>ve||re.resolvedBase||""),re?.resolvedTarget&&fe(ve=>ve||re.resolvedTarget||"")}).catch(()=>M(null))},[]);const rr=T.useCallback(async(re,ve)=>{re===V&&ve===D||(me.current=!0,R(re),q(ve),h(!0),m(null),await wt(re,ve))},[V,D,wt]),Hl=T.useRef(!1);T.useEffect(()=>{e?.clearComments&&!Hl.current&&(Hl.current=!0,Ke(),nr(),console.log("✅ All existing comments and viewed files cleared as requested via --clean flag"))},[e?.clearComments,Ke,nr]),T.useEffect(()=>{e&&(tt.size<e.files.length?Z(!1):tt.size===e.files.length&&!O&&(L(!0),Z(!0),setTimeout(()=>{L(!1)},1e3)))},[tt.size,e,O]),T.useEffect(()=>{const re=JSON.stringify({comments:gt});fetch("/api/comments",{method:"POST",headers:{"Content-Type":"application/json"},body:re}).catch(Se=>{console.error("Failed to sync comments:",Se)});const ve=()=>{navigator.sendBeacon("/api/comments",re)};return window.addEventListener("beforeunload",ve),()=>{window.removeEventListener("beforeunload",ve)}},[gt]),T.useEffect(()=>{const re=new EventSource("/api/heartbeat");return re.onopen=()=>{console.log("Connected to server heartbeat")},re.onerror=()=>{console.log("Server connection lost"),re.close()},()=>{re.close()}},[]);const Eu=T.useCallback((re,ve,Se,Qe,Ie)=>(we({filePath:re,body:Se,side:Ie||"new",line:typeof ve=="number"?ve:{start:ve[0],end:ve[1]},codeSnapshot:Qe?{content:Qe,language:void 0}:void 0}),Promise.resolve()),[we]),Ui=async()=>{try{const re=Bt();await navigator.clipboard.writeText(re),v(!0),setTimeout(()=>v(!1),2e3)}catch(re){console.error("Failed to copy all comments prompt:",re)}},oo=re=>{if(!e)return;const ve=nR(re,e.files);ve&&Vn(ve)},hl=T.useCallback(async(re,ve)=>{try{const Se=await fetch("/api/open-in-editor",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:re,line:ve,editor:ye.editor})});if(!Se.ok){const Qe=await Se.json().catch(()=>null);let Ie=Se.statusText;Qe&&typeof Qe=="object"&&"error"in Qe&&typeof Qe.error=="string"&&(Ie=Qe.error),console.error("Failed to open file in editor:",Ie)}}catch(Se){console.error("Failed to open file in editor:",Se)}},[ye.editor]),Hi=re=>{Vn(null);const ve=re.target,Se=ve.closest('[data-comment-button="true"]'),Qe=ve.closest('[data-open-in-editor-button="true"]');!Se&&!Qe&&Rr(re)},Rr=re=>{document.querySelectorAll('form[data-empty="true"]').forEach(Se=>{Se.contains(re.target)||Se.querySelector('button[type="button"]')?.click()})};if(f)return y.jsx("div",{className:"flex items-center justify-center h-screen bg-github-bg-primary",children:y.jsx("div",{className:"text-github-text-secondary text-base",children:"Loading diff..."})});if(p)return y.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2",children:[y.jsx("h2",{className:"text-github-danger text-2xl mb-2",children:"Error"}),y.jsx("p",{className:"text-github-text-secondary text-base",children:p})]});if(!e)return y.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-github-bg-primary text-center gap-2",children:[y.jsx("h2",{className:"text-github-danger text-2xl mb-2",children:"No data"}),y.jsx("p",{className:"text-github-text-secondary text-base",children:"No diff data available"})]});const _r=ye.editor!=="none"&&e.openInEditorAvailable!==!1;return y.jsx(mk,{children:y.jsxs("div",{className:"h-screen flex flex-col",onClickCapture:Hi,children:[y.jsxs("header",{className:`bg-github-bg-secondary border-b border-github-border flex ${ge?"flex-col":"flex-row items-center"}`,children:[y.jsxs("div",{className:`flex items-center justify-between w-full ${ge?"px-3 py-2 gap-3":"px-4 py-3 gap-4 w-auto"} ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:ge?"100%":E?`${x}px`:"auto",minWidth:ge?"0px":E?"200px":"auto",maxWidth:ge?"none":E?"600px":"none"},children:[y.jsx("h1",{children:y.jsx(wj,{style:{height:"18px",color:"var(--color-github-text-secondary)"}})}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("button",{onClick:()=>C(!E),className:"p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors",title:E?"Collapse file tree":"Expand file tree","aria-expanded":E,"aria-controls":"file-tree-panel","aria-label":"Toggle file tree panel",children:E?y.jsx(Y2,{size:18}):y.jsx(Z2,{size:18})}),y.jsx("button",{onClick:()=>N(!0),className:"p-2 text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary rounded transition-colors",title:"Appearance Settings",children:y.jsx(l1,{size:18})})]})]}),!ge&&y.jsx("div",{className:`border-r border-github-border ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:E?"4px":"0px",height:"calc(100% - 16px)",margin:"8px 0",transform:"translateX(-2px)"}}),y.jsxs("div",{className:`flex-1 flex flex-wrap items-center justify-between ${ge?"px-3 pb-2 gap-3":"px-4 py-3 gap-4"}`,children:[y.jsxs("div",{className:`flex flex-wrap items-center ${ge?"gap-2":"gap-3"}`,children:[!ge&&y.jsxs("div",{className:"flex bg-github-bg-tertiary border border-github-border rounded-md p-1",children:[y.jsxs("button",{onClick:()=>mt("split"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${l==="split"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:[y.jsx(S2,{size:14}),"Split"]}),y.jsxs("button",{onClick:()=>mt("unified"),className:`px-3 py-1.5 text-xs font-medium rounded transition-all duration-200 flex items-center gap-1.5 cursor-pointer ${l==="unified"?"bg-github-bg-primary text-github-text-primary shadow-sm":"text-github-text-secondary hover:text-github-text-primary"}`,children:[y.jsx(ak,{size:14}),"Unified"]})]}),y.jsx(i1,{checked:u,onChange:c,label:"Ignore Whitespace",title:u?"Show whitespace changes":"Ignore whitespace changes"}),y.jsx(Sj,{shouldReload:dl,isReloading:Ii.isReloading,onReload:ro,changeType:Ii.lastChangeType,compact:ge})]}),y.jsxs("div",{className:`flex flex-wrap items-center text-sm text-github-text-secondary ${ge?"gap-3":"gap-4"}`,children:[!ge&&de.length>0&&y.jsx($b,{commentsCount:de.length,isCopiedAll:b,onCopyAll:Ui,onDeleteAll:Ke,onViewAll:()=>F(!0)}),y.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[y.jsxs("div",{className:"text-xs relative",children:[tt.size===e.files.length?"All diffs difit-ed!":`${tt.size} / ${e.files.length} files viewed`,y.jsx(Tj,{isActive:I})]}),y.jsx("div",{className:"relative h-2 bg-github-bg-tertiary rounded-full overflow-hidden",style:{width:"90px",border:"1px solid var(--color-github-border)"},children:y.jsx("div",{className:"absolute top-0 right-0 h-full transition-all duration-300 ease-out",style:{width:`${(e.files.length-tt.size)/e.files.length*100}%`,backgroundColor:(()=>{const re=(e.files.length-tt.size)/e.files.length*100;return re>50?"var(--color-github-accent)":re>20?"var(--color-github-warning)":"var(--color-github-danger)"})()}})})]}),X?y.jsx(L3,{options:X,baseRevision:V,targetRevision:D,resolvedBaseRevision:A,resolvedTargetRevision:le,onSelectDiff:(re,ve)=>{rr(re,ve)},onOpenAdvanced:()=>G(!0),compact:!xe}):y.jsxs("span",{className:"text-xs",children:["Reviewing:"," ",y.jsx("code",{className:"bg-github-bg-tertiary px-1.5 py-0.5 rounded text-xs text-github-text-primary",children:e.commit.includes("...")?y.jsxs(y.Fragment,{children:[y.jsxs("span",{className:"text-github-text-secondary font-medium",children:[e.commit.split("...")[0],"..."]}),y.jsx("span",{className:"font-medium",children:e.commit.split("...")[1]})]}):e.commit})]})]})]})]}),X&&y.jsx(kj,{isOpen:H,onClose:()=>G(!1),options:X,baseRevision:V,targetRevision:D,resolvedBaseRevision:A,resolvedTargetRevision:le,onApply:(re,ve)=>{rr(re,ve)}},H?`${V}:${D}`:"closed"),ge&&E&&y.jsx("button",{type:"button","aria-label":"Close file tree",className:"fixed inset-0 bg-black/40 z-30",onClick:()=>C(!1)}),y.jsxs("div",{className:"flex flex-1 overflow-hidden relative",children:[y.jsx("div",{className:`relative overflow-hidden ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:ge?"0px":E?`${x}px`:"0px"},children:y.jsxs("aside",{id:"file-tree-panel",className:`bg-github-bg-secondary overflow-y-auto flex flex-col ${ge?"fixed inset-y-0 right-0 z-40 w-[min(85vw,360px)] border-l border-github-border transition-transform duration-300 ease-out":"relative border-r border-github-border"}`,style:{width:ge?"min(85vw, 360px)":`${x}px`,minWidth:ge?"0px":"200px",maxWidth:ge?"none":"600px",height:"100%",transform:ge?E?"translateX(0)":"translateX(100%)":void 0},children:[y.jsx("div",{className:"flex-1 overflow-y-auto",children:y.jsx(yj,{files:e.files,onScrollToFile:Ve,onFileSelected:ge?()=>C(!1):void 0,comments:de.map(re=>({id:re.id,file:re.filePath,line:typeof re.position.line=="number"?re.position.line:[re.position.line.start,re.position.line.end],body:re.body,timestamp:re.createdAt,codeContent:re.codeSnapshot?.content})),reviewedFiles:tt,onToggleReviewed:Lt,selectedFileIndex:Jt?.fileIndex??null})}),!ge&&y.jsxs("div",{className:"p-4 border-t border-github-border flex justify-between items-center",children:[y.jsxs("button",{onClick:()=>Ul(!0),className:"flex items-center gap-1.5 text-github-text-secondary hover:text-github-text-primary transition-colors",title:"Keyboard shortcuts (Shift+?)",children:[y.jsx(U2,{size:16}),y.jsx("span",{className:"text-sm",children:"Shortcuts"})]}),y.jsxs("a",{href:"https://github.com/yoshiko-pg/difit",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-github-text-secondary hover:text-github-text-primary transition-colors",title:"View on GitHub",children:[y.jsx("span",{className:"text-sm",children:"Star on GitHub"}),y.jsx(xj,{style:{height:"18px",width:"18px"}})]})]})]})}),!ge&&y.jsx("div",{className:`bg-github-border hover:bg-github-text-muted cursor-col-resize ${j?"":"!transition-all !duration-300 !ease-in-out"}`,style:{width:E?"4px":"0px"},onMouseDown:Tt,title:"Drag to resize file list"}),y.jsx("main",{ref:B,className:`flex-1 overflow-y-auto ${Yt?"pb-16":""}`,children:e.files.map((re,ve)=>{const Se=Gt.get(re.path)??rR,Qe=Fn.get(re.path)??lR,Ie=ae.has(re.path);return y.jsx("div",{id:Os(re.path),"data-file-path":re.path,"data-rendered":Ie?"true":"false",ref:St=>Oe(re.path,St),className:"mb-6",children:Ie?y.jsx(mj,{file:re,comments:Se,diffMode:l,reviewedFiles:tt,onToggleReviewed:Lt,collapsedFiles:Q,onToggleCollapsed:zn,onToggleAllCollapsed:Dt,onAddComment:Eu,onGeneratePrompt:Gn,onRemoveComment:Ee,onUpdateComment:$e,onOpenInEditor:_r?hl:void 0,syntaxTheme:ye.syntaxTheme,baseCommitish:e.baseCommitish,targetCommitish:e.targetCommitish,cursor:Jt?.fileIndex===ve?Jt:null,fileIndex:ve,onLineClick:io,commentTrigger:Bi?.fileIndex===ve?Bi:null,onCommentTriggerHandled:ao,mergedChunks:Qe,expandLines:Je,expandAllBetweenChunks:Pn,prefetchFileContent:fn,isExpandLoading:It}):y.jsx("div",{className:"bg-github-bg-secondary border border-github-border rounded-md px-4 py-3",children:y.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y.jsxs("div",{className:"min-w-0",children:[y.jsx("div",{className:"text-xs uppercase tracking-wide text-github-text-muted",children:"Deferred Rendering"}),y.jsx("div",{className:"text-sm font-mono text-github-text-primary truncate",children:re.path})]}),y.jsx("button",{type:"button",onClick:()=>be(re.path),className:"px-3 py-1.5 text-xs rounded border border-github-border text-github-text-secondary hover:text-github-text-primary hover:bg-github-bg-tertiary",children:"Load now"})]})})},re.path)})})]}),Yt&&y.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-20 bg-github-bg-secondary border-t border-github-border px-4 py-2 flex justify-end",children:y.jsx($b,{commentsCount:de.length,isCopiedAll:b,onCopyAll:Ui,onDeleteAll:Ke,onViewAll:()=>F(!0),direction:"up",compact:!0})}),y.jsx(Aj,{isOpen:w,onClose:()=>N(!1),settings:ye,onSettingsChange:pe}),y.jsx(vj,{isOpen:lo,onClose:()=>Ul(!1)}),y.jsx(BE,{isOpen:P,onClose:()=>F(!1),onNavigate:oo,comments:de.map(re=>({id:re.id,file:re.filePath,line:typeof re.position.line=="number"?re.position.line:[re.position.line.start,re.position.line.end],body:re.body,timestamp:re.createdAt,codeContent:re.codeSnapshot?.content})),onRemoveComment:Ee,onGeneratePrompt:re=>Me(re.id),onUpdateComment:$e,syntaxTheme:ye.syntaxTheme})]})})}const vv=document.getElementById("root");if(!vv)throw new Error("Root element not found");US.createRoot(vv).render(y.jsx(Qt.StrictMode,{children:y.jsx(JS,{initiallyActiveScopes:["navigation"],children:y.jsx(oR,{})})}));export{lu as g};
|