fix(ui): 会话操作菜单改按视口空间上下翻转,不再被裁剪

之前固定向下弹且挂在侧栏滚动容器内(absolute),列表末尾几行的菜单会被
容器裁掉/被状态栏遮住。改为 fixed 定位脱离滚动裁剪,按 ⋯ 按钮的
getBoundingClientRect 计算:底部空间不足时向上弹(bottom 锚定,确认态
变高也朝上生长)
This commit is contained in:
xiaomakuaiz committed 2026-07-15 10:07:56 +00:00
1 parent 14a1b4cdb2
commit dbfb60e52a
2 files changed
+41 -30

No files matched your search

+26 -26
View File
@@ -22,7 +22,7 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var df;function Zp(){if(df)return pe;df=1;var s=Symbol.for("react.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),w=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),k=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),M=Symbol.iterator;function L(y){return y===null||typeof y!="object"?null:(y=M&&y[M]||y["@@iterator"],typeof y=="function"?y:null)}var te={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},K=Object.assign,$={};function se(y,I,ue){this.props=y,this.context=I,this.refs=$,this.updater=ue||te}se.prototype.isReactComponent={},se.prototype.setState=function(y,I){if(typeof y!="object"&&typeof y!="function"&&y!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,y,I,"setState")},se.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function Q(){}Q.prototype=se.prototype;function W(y,I,ue){this.props=y,this.context=I,this.refs=$,this.updater=ue||te}var X=W.prototype=new Q;X.constructor=W,K(X,se.prototype),X.isPureReactComponent=!0;var ie=Array.isArray,fe=Object.prototype.hasOwnProperty,de={current:null},Te={key:!0,ref:!0,__self:!0,__source:!0};function Ge(y,I,ue){var ce,he={},me=null,Se=null;if(I!=null)for(ce in I.ref!==void 0&&(Se=I.ref),I.key!==void 0&&(me=""+I.key),I)fe.call(I,ce)&&!Te.hasOwnProperty(ce)&&(he[ce]=I[ce]);var ge=arguments.length-2;if(ge===1)he.children=ue;else if(1<ge){for(var Ee=Array(ge),lt=0;lt<ge;lt++)Ee[lt]=arguments[lt+2];he.children=Ee}if(y&&y.defaultProps)for(ce in ge=y.defaultProps,ge)he[ce]===void 0&&(he[ce]=ge[ce]);return{$$typeof:s,type:y,key:me,ref:Se,props:he,_owner:de.current}}function vt(y,I){return{$$typeof:s,type:y.type,key:I,ref:y.ref,props:y.props,_owner:y._owner}}function Fe(y){return typeof y=="object"&&y!==null&&y.$$typeof===s}function $t(y){var I={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(ue){return I[ue]})}var be=/\/+/g;function Xe(y,I){return typeof y=="object"&&y!==null&&y.key!=null?$t(""+y.key):I.toString(36)}function Ke(y,I,ue,ce,he){var me=typeof y;(me==="undefined"||me==="boolean")&&(y=null);var Se=!1;if(y===null)Se=!0;else switch(me){case"string":case"number":Se=!0;break;case"object":switch(y.$$typeof){case s:case i:Se=!0}}if(Se)return Se=y,he=he(Se),y=ce===""?"."+Xe(Se,0):ce,ie(he)?(ue="",y!=null&&(ue=y.replace(be,"$&/")+"/"),Ke(he,I,ue,"",function(lt){return lt})):he!=null&&(Fe(he)&&(he=vt(he,ue+(!he.key||Se&&Se.key===he.key?"":(""+he.key).replace(be,"$&/")+"/")+y)),I.push(he)),1;if(Se=0,ce=ce===""?".":ce+":",ie(y))for(var ge=0;ge<y.length;ge++){me=y[ge];var Ee=ce+Xe(me,ge);Se+=Ke(me,I,ue,Ee,he)}else if(Ee=L(y),typeof Ee=="function")for(y=Ee.call(y),ge=0;!(me=y.next()).done;)me=me.value,Ee=ce+Xe(me,ge++),Se+=Ke(me,I,ue,Ee,he);else if(me==="object")throw I=String(y),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.");return Se}function He(y,I,ue){if(y==null)return y;var ce=[],he=0;return Ke(y,ce,"","",function(me){return I.call(ue,me,he++)}),ce}function Ve(y){if(y._status===-1){var I=y._result;I=I(),I.then(function(ue){(y._status===0||y._status===-1)&&(y._status=1,y._result=ue)},function(ue){(y._status===0||y._status===-1)&&(y._status=2,y._result=ue)}),y._status===-1&&(y._status=0,y._result=I)}if(y._status===1)return y._result.default;throw y._result}var ve={current:null},b={transition:null},ee={ReactCurrentDispatcher:ve,ReactCurrentBatchConfig:b,ReactCurrentOwner:de};function B(){throw Error("act(...) is not supported in production builds of React.")}return pe.Children={map:He,forEach:function(y,I,ue){He(y,function(){I.apply(this,arguments)},ue)},count:function(y){var I=0;return He(y,function(){I++}),I},toArray:function(y){return He(y,function(I){return I})||[]},only:function(y){if(!Fe(y))throw Error("React.Children.only expected to receive a single React element child.");return y}},pe.Component=se,pe.Fragment=a,pe.Profiler=f,pe.PureComponent=W,pe.StrictMode=c,pe.Suspense=_,pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,pe.act=B,pe.cloneElement=function(y,I,ue){if(y==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+y+".");var ce=K({},y.props),he=y.key,me=y.ref,Se=y._owner;if(I!=null){if(I.ref!==void 0&&(me=I.ref,Se=de.current),I.key!==void 0&&(he=""+I.key),y.type&&y.type.defaultProps)var ge=y.type.defaultProps;for(Ee in I)fe.call(I,Ee)&&!Te.hasOwnProperty(Ee)&&(ce[Ee]=I[Ee]===void 0&&ge!==void 0?ge[Ee]:I[Ee])}var Ee=arguments.length-2;if(Ee===1)ce.children=ue;else if(1<Ee){ge=Array(Ee);for(var lt=0;lt<Ee;lt++)ge[lt]=arguments[lt+2];Line truncated
*/var df;function Zp(){if(df)return pe;df=1;var s=Symbol.for("react.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),w=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),k=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),F=Symbol.iterator;function N(y){return y===null||typeof y!="object"?null:(y=F&&y[F]||y["@@iterator"],typeof y=="function"?y:null)}var ee={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},W=Object.assign,q={};function ie(y,I,ue){this.props=y,this.context=I,this.refs=q,this.updater=ue||ee}ie.prototype.isReactComponent={},ie.prototype.setState=function(y,I){if(typeof y!="object"&&typeof y!="function"&&y!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,y,I,"setState")},ie.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function Y(){}Y.prototype=ie.prototype;function H(y,I,ue){this.props=y,this.context=I,this.refs=q,this.updater=ue||ee}var J=H.prototype=new Y;J.constructor=H,W(J,ie.prototype),J.isPureReactComponent=!0;var oe=Array.isArray,fe=Object.prototype.hasOwnProperty,de={current:null},Te={key:!0,ref:!0,__self:!0,__source:!0};function Ge(y,I,ue){var ce,he={},me=null,Se=null;if(I!=null)for(ce in I.ref!==void 0&&(Se=I.ref),I.key!==void 0&&(me=""+I.key),I)fe.call(I,ce)&&!Te.hasOwnProperty(ce)&&(he[ce]=I[ce]);var ge=arguments.length-2;if(ge===1)he.children=ue;else if(1<ge){for(var Ee=Array(ge),lt=0;lt<ge;lt++)Ee[lt]=arguments[lt+2];he.children=Ee}if(y&&y.defaultProps)for(ce in ge=y.defaultProps,ge)he[ce]===void 0&&(he[ce]=ge[ce]);return{$$typeof:s,type:y,key:me,ref:Se,props:he,_owner:de.current}}function vt(y,I){return{$$typeof:s,type:y.type,key:I,ref:y.ref,props:y.props,_owner:y._owner}}function Fe(y){return typeof y=="object"&&y!==null&&y.$$typeof===s}function $t(y){var I={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(ue){return I[ue]})}var be=/\/+/g;function Xe(y,I){return typeof y=="object"&&y!==null&&y.key!=null?$t(""+y.key):I.toString(36)}function Ke(y,I,ue,ce,he){var me=typeof y;(me==="undefined"||me==="boolean")&&(y=null);var Se=!1;if(y===null)Se=!0;else switch(me){case"string":case"number":Se=!0;break;case"object":switch(y.$$typeof){case s:case i:Se=!0}}if(Se)return Se=y,he=he(Se),y=ce===""?"."+Xe(Se,0):ce,oe(he)?(ue="",y!=null&&(ue=y.replace(be,"$&/")+"/"),Ke(he,I,ue,"",function(lt){return lt})):he!=null&&(Fe(he)&&(he=vt(he,ue+(!he.key||Se&&Se.key===he.key?"":(""+he.key).replace(be,"$&/")+"/")+y)),I.push(he)),1;if(Se=0,ce=ce===""?".":ce+":",oe(y))for(var ge=0;ge<y.length;ge++){me=y[ge];var Ee=ce+Xe(me,ge);Se+=Ke(me,I,ue,Ee,he)}else if(Ee=N(y),typeof Ee=="function")for(y=Ee.call(y),ge=0;!(me=y.next()).done;)me=me.value,Ee=ce+Xe(me,ge++),Se+=Ke(me,I,ue,Ee,he);else if(me==="object")throw I=String(y),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.");return Se}function He(y,I,ue){if(y==null)return y;var ce=[],he=0;return Ke(y,ce,"","",function(me){return I.call(ue,me,he++)}),ce}function Ve(y){if(y._status===-1){var I=y._result;I=I(),I.then(function(ue){(y._status===0||y._status===-1)&&(y._status=1,y._result=ue)},function(ue){(y._status===0||y._status===-1)&&(y._status=2,y._result=ue)}),y._status===-1&&(y._status=0,y._result=I)}if(y._status===1)return y._result.default;throw y._result}var ve={current:null},b={transition:null},te={ReactCurrentDispatcher:ve,ReactCurrentBatchConfig:b,ReactCurrentOwner:de};function B(){throw Error("act(...) is not supported in production builds of React.")}return pe.Children={map:He,forEach:function(y,I,ue){He(y,function(){I.apply(this,arguments)},ue)},count:function(y){var I=0;return He(y,function(){I++}),I},toArray:function(y){return He(y,function(I){return I})||[]},only:function(y){if(!Fe(y))throw Error("React.Children.only expected to receive a single React element child.");return y}},pe.Component=ie,pe.Fragment=a,pe.Profiler=f,pe.PureComponent=H,pe.StrictMode=c,pe.Suspense=_,pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=te,pe.act=B,pe.cloneElement=function(y,I,ue){if(y==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+y+".");var ce=W({},y.props),he=y.key,me=y.ref,Se=y._owner;if(I!=null){if(I.ref!==void 0&&(me=I.ref,Se=de.current),I.key!==void 0&&(he=""+I.key),y.type&&y.type.defaultProps)var ge=y.type.defaultProps;for(Ee in I)fe.call(I,Ee)&&!Te.hasOwnProperty(Ee)&&(ce[Ee]=I[Ee]===void 0&&ge!==void 0?ge[Ee]:I[Ee])}var Ee=arguments.length-2;if(Ee===1)ce.children=ue;else if(1<Ee){ge=Array(Ee);for(var lt=0;lt<Ee;lt++)ge[lt]=arguments[lt+2];Line truncated
* @license React
* react-jsx-runtime.production.min.js
*
@@ -30,7 +30,7 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var hf;function $p(){if(hf)return ci;hf=1;var s=Da(),i=Symbol.for("react.element"),a=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,f=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h={key:!0,ref:!0,__self:!0,__source:!0};function w(v,_,k){var A,M={},L=null,te=null;k!==void 0&&(L=""+k),_.key!==void 0&&(L=""+_.key),_.ref!==void 0&&(te=_.ref);for(A in _)c.call(_,A)&&!h.hasOwnProperty(A)&&(M[A]=_[A]);if(v&&v.defaultProps)for(A in _=v.defaultProps,_)M[A]===void 0&&(M[A]=_[A]);return{$$typeof:i,type:v,key:L,ref:te,props:M,_owner:f.current}}return ci.Fragment=a,ci.jsx=w,ci.jsxs=w,ci}var mf;function eh(){return mf||(mf=1,ga.exports=$p()),ga.exports}var p=eh(),G=Da(),Ao={},ya={exports:{}},Ut={},xa={exports:{}},wa={};/**
*/var hf;function $p(){if(hf)return ci;hf=1;var s=Da(),i=Symbol.for("react.element"),a=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,f=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h={key:!0,ref:!0,__self:!0,__source:!0};function w(v,_,k){var A,F={},N=null,ee=null;k!==void 0&&(N=""+k),_.key!==void 0&&(N=""+_.key),_.ref!==void 0&&(ee=_.ref);for(A in _)c.call(_,A)&&!h.hasOwnProperty(A)&&(F[A]=_[A]);if(v&&v.defaultProps)for(A in _=v.defaultProps,_)F[A]===void 0&&(F[A]=_[A]);return{$$typeof:i,type:v,key:N,ref:ee,props:F,_owner:f.current}}return ci.Fragment=a,ci.jsx=w,ci.jsxs=w,ci}var mf;function eh(){return mf||(mf=1,ga.exports=$p()),ga.exports}var p=eh(),G=Da(),Ao={},ya={exports:{}},Ut={},xa={exports:{}},wa={};/**
* @license React
* scheduler.production.min.js
*
@@ -38,7 +38,7 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var gf;function th(){return gf||(gf=1,(function(s){function i(b,ee){var B=b.length;b.push(ee);e:for(;0<B;){var y=B-1>>>1,I=b[y];if(0<f(I,ee))b[y]=ee,b[B]=I,B=y;else break e}}function a(b){return b.length===0?null:b[0]}function c(b){if(b.length===0)return null;var ee=b[0],B=b.pop();if(B!==ee){b[0]=B;e:for(var y=0,I=b.length,ue=I>>>1;y<ue;){var ce=2*(y+1)-1,he=b[ce],me=ce+1,Se=b[me];if(0>f(he,B))me<I&&0>f(Se,he)?(b[y]=Se,b[me]=B,y=me):(b[y]=he,b[ce]=B,y=ce);else if(me<I&&0>f(Se,B))b[y]=Se,b[me]=B,y=me;else break e}}return ee}function f(b,ee){var B=b.sortIndex-ee.sortIndex;return B!==0?B:b.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var h=performance;s.unstable_now=function(){return h.now()}}else{var w=Date,v=w.now();s.unstable_now=function(){return w.now()-v}}var _=[],k=[],A=1,M=null,L=3,te=!1,K=!1,$=!1,se=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function X(b){for(var ee=a(k);ee!==null;){if(ee.callback===null)c(k);else if(ee.startTime<=b)c(k),ee.sortIndex=ee.expirationTime,i(_,ee);else break;ee=a(k)}}function ie(b){if($=!1,X(b),!K)if(a(_)!==null)K=!0,Ve(fe);else{var ee=a(k);ee!==null&&ve(ie,ee.startTime-b)}}function fe(b,ee){K=!1,$&&($=!1,Q(Ge),Ge=-1),te=!0;var B=L;try{for(X(ee),M=a(_);M!==null&&(!(M.expirationTime>ee)||b&&!$t());){var y=M.callback;if(typeof y=="function"){M.callback=null,L=M.priorityLevel;var I=y(M.expirationTime<=ee);ee=s.unstable_now(),typeof I=="function"?M.callback=I:M===a(_)&&c(_),X(ee)}else c(_);M=a(_)}if(M!==null)var ue=!0;else{var ce=a(k);ce!==null&&ve(ie,ce.startTime-ee),ue=!1}return ue}finally{M=null,L=B,te=!1}}var de=!1,Te=null,Ge=-1,vt=5,Fe=-1;function $t(){return!(s.unstable_now()-Fe<vt)}function be(){if(Te!==null){var b=s.unstable_now();Fe=b;var ee=!0;try{ee=Te(!0,b)}finally{ee?Xe():(de=!1,Te=null)}}else de=!1}var Xe;if(typeof W=="function")Xe=function(){W(be)};else if(typeof MessageChannel<"u"){var Ke=new MessageChannel,He=Ke.port2;Ke.port1.onmessage=be,Xe=function(){He.postMessage(null)}}else Xe=function(){se(be,0)};function Ve(b){Te=b,de||(de=!0,Xe())}function ve(b,ee){Ge=se(function(){b(s.unstable_now())},ee)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(b){b.callback=null},s.unstable_continueExecution=function(){K||te||(K=!0,Ve(fe))},s.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"):vt=0<b?Math.floor(1e3/b):5},s.unstable_getCurrentPriorityLevel=function(){return L},s.unstable_getFirstCallbackNode=function(){return a(_)},s.unstable_next=function(b){switch(L){case 1:case 2:case 3:var ee=3;break;default:ee=L}var B=L;L=ee;try{return b()}finally{L=B}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=function(){},s.unstable_runWithPriority=function(b,ee){switch(b){case 1:case 2:case 3:case 4:case 5:break;default:b=3}var B=L;L=b;try{return ee()}finally{L=B}},s.unstable_scheduleCallback=function(b,ee,B){var y=s.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?y+B:y):B=y,b){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=B+I,b={id:A++,callback:ee,priorityLevel:b,startTime:B,expirationTime:I,sortIndex:-1},B>y?(b.sortIndex=B,i(k,b),a(_)===null&&b===a(k)&&($?(Q(Ge),Ge=-1):$=!0,ve(ie,B-y))):(b.sortIndex=I,i(_,b),K||te||(K=!0,Ve(fe))),b},s.unstable_shouldYield=$t,s.unstable_wrapCallback=function(b){var ee=L;return function(){var B=L;L=ee;try{return b.apply(this,arguments)}finally{L=B}}}})(wa)),wa}var vf;function nh(){return vf||(vf=1,xa.exports=th()),xa.exports}/**
*/var gf;function th(){return gf||(gf=1,(function(s){function i(b,te){var B=b.length;b.push(te);e:for(;0<B;){var y=B-1>>>1,I=b[y];if(0<f(I,te))b[y]=te,b[B]=I,B=y;else break e}}function a(b){return b.length===0?null:b[0]}function c(b){if(b.length===0)return null;var te=b[0],B=b.pop();if(B!==te){b[0]=B;e:for(var y=0,I=b.length,ue=I>>>1;y<ue;){var ce=2*(y+1)-1,he=b[ce],me=ce+1,Se=b[me];if(0>f(he,B))me<I&&0>f(Se,he)?(b[y]=Se,b[me]=B,y=me):(b[y]=he,b[ce]=B,y=ce);else if(me<I&&0>f(Se,B))b[y]=Se,b[me]=B,y=me;else break e}}return te}function f(b,te){var B=b.sortIndex-te.sortIndex;return B!==0?B:b.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var h=performance;s.unstable_now=function(){return h.now()}}else{var w=Date,v=w.now();s.unstable_now=function(){return w.now()-v}}var _=[],k=[],A=1,F=null,N=3,ee=!1,W=!1,q=!1,ie=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function J(b){for(var te=a(k);te!==null;){if(te.callback===null)c(k);else if(te.startTime<=b)c(k),te.sortIndex=te.expirationTime,i(_,te);else break;te=a(k)}}function oe(b){if(q=!1,J(b),!W)if(a(_)!==null)W=!0,Ve(fe);else{var te=a(k);te!==null&&ve(oe,te.startTime-b)}}function fe(b,te){W=!1,q&&(q=!1,Y(Ge),Ge=-1),ee=!0;var B=N;try{for(J(te),F=a(_);F!==null&&(!(F.expirationTime>te)||b&&!$t());){var y=F.callback;if(typeof y=="function"){F.callback=null,N=F.priorityLevel;var I=y(F.expirationTime<=te);te=s.unstable_now(),typeof I=="function"?F.callback=I:F===a(_)&&c(_),J(te)}else c(_);F=a(_)}if(F!==null)var ue=!0;else{var ce=a(k);ce!==null&&ve(oe,ce.startTime-te),ue=!1}return ue}finally{F=null,N=B,ee=!1}}var de=!1,Te=null,Ge=-1,vt=5,Fe=-1;function $t(){return!(s.unstable_now()-Fe<vt)}function be(){if(Te!==null){var b=s.unstable_now();Fe=b;var te=!0;try{te=Te(!0,b)}finally{te?Xe():(de=!1,Te=null)}}else de=!1}var Xe;if(typeof H=="function")Xe=function(){H(be)};else if(typeof MessageChannel<"u"){var Ke=new MessageChannel,He=Ke.port2;Ke.port1.onmessage=be,Xe=function(){He.postMessage(null)}}else Xe=function(){ie(be,0)};function Ve(b){Te=b,de||(de=!0,Xe())}function ve(b,te){Ge=ie(function(){b(s.unstable_now())},te)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(b){b.callback=null},s.unstable_continueExecution=function(){W||ee||(W=!0,Ve(fe))},s.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"):vt=0<b?Math.floor(1e3/b):5},s.unstable_getCurrentPriorityLevel=function(){return N},s.unstable_getFirstCallbackNode=function(){return a(_)},s.unstable_next=function(b){switch(N){case 1:case 2:case 3:var te=3;break;default:te=N}var B=N;N=te;try{return b()}finally{N=B}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=function(){},s.unstable_runWithPriority=function(b,te){switch(b){case 1:case 2:case 3:case 4:case 5:break;default:b=3}var B=N;N=b;try{return te()}finally{N=B}},s.unstable_scheduleCallback=function(b,te,B){var y=s.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?y+B:y):B=y,b){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=B+I,b={id:A++,callback:te,priorityLevel:b,startTime:B,expirationTime:I,sortIndex:-1},B>y?(b.sortIndex=B,i(k,b),a(_)===null&&b===a(k)&&(q?(Y(Ge),Ge=-1):q=!0,ve(oe,B-y))):(b.sortIndex=I,i(_,b),W||ee||(W=!0,Ve(fe))),b},s.unstable_shouldYield=$t,s.unstable_wrapCallback=function(b){var te=N;return function(){var B=N;N=te;try{return b.apply(this,arguments)}finally{N=B}}}})(wa)),wa}var vf;function nh(){return vf||(vf=1,xa.exports=th()),xa.exports}/**
* @license React
* react-dom.production.min.js
*
@@ -46,16 +46,16 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var yf;function rh(){if(yf)return Ut;yf=1;var s=Da(),i=nh();function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=new Set,f={};function h(e,t){w(e,t),w(e+"Capture",t)}function w(e,t){for(f[e]=t,e=0;e<t.length;e++)c.add(t[e])}var v=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_=Object.prototype.hasOwnProperty,k=/^[: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]*$/,A={},M={};function L(e){return _.call(M,e)?!0:_.call(A,e)?!1:k.test(e)?M[e]=!0:(A[e]=!0,!1)}function te(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function K(e,t,n,r){if(t===null||typeof t>"u"||te(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function $(e,t,n,r,l,o,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=u}var se={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){se[e]=new $(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];se[t]=new $(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){se[e]=new $(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){se[e]=new $(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){se[e]=new $(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){se[e]=new $(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){se[e]=new $(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){se[e]=new $(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){se[e]=new $(e,5,!1,e.toLowerCase(),null,!1,!1)});var Q=/[\-:]([a-z])/g;function W(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Q,W);se[t]=new $(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Q,W);se[t]=new $(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Q,W);se[t]=new $(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){se[e]=new $(e,1,!1,e.toLowerCase(),null,!1,!1)}),se.xlinkHref=new $("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){se[e]=new $(e,1,!1,e.toLowerCase(),null,!0,!0)});function X(e,t,n,r){var l=se.hasOwnProperty(t)?se[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"Line truncated
*/var yf;function rh(){if(yf)return Ut;yf=1;var s=Da(),i=nh();function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=new Set,f={};function h(e,t){w(e,t),w(e+"Capture",t)}function w(e,t){for(f[e]=t,e=0;e<t.length;e++)c.add(t[e])}var v=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_=Object.prototype.hasOwnProperty,k=/^[: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]*$/,A={},F={};function N(e){return _.call(F,e)?!0:_.call(A,e)?!1:k.test(e)?F[e]=!0:(A[e]=!0,!1)}function ee(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function W(e,t,n,r){if(t===null||typeof t>"u"||ee(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function q(e,t,n,r,l,o,u){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=u}var ie={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ie[e]=new q(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ie[t]=new q(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ie[e]=new q(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ie[e]=new q(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ie[e]=new q(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){ie[e]=new q(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){ie[e]=new q(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){ie[e]=new q(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){ie[e]=new q(e,5,!1,e.toLowerCase(),null,!1,!1)});var Y=/[\-:]([a-z])/g;function H(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Y,H);ie[t]=new q(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Y,H);ie[t]=new q(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Y,H);ie[t]=new q(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){ie[e]=new q(e,1,!1,e.toLowerCase(),null,!1,!1)}),ie.xlinkHref=new q("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){ie[e]=new q(e,1,!1,e.toLowerCase(),null,!0,!0)});function J(e,t,n,r){var l=ie.hasOwnProperty(t)?ie[t]:null;(l!==null?l.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"Line truncated
`+y+e}var ue=!1;function ce(e,t){if(!e||ue)return"";ue=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(R){var r=R}Reflect.construct(e,[],t)}else{try{t.call()}catch(R){r=R}e.call(t.prototype)}else{try{throw Error()}catch(R){r=R}e()}}catch(R){if(R&&r&&typeof R.stack=="string"){for(var l=R.stack.split(`
`),o=r.stack.split(`
`),u=l.length-1,m=o.length-1;1<=u&&0<=m&&l[u]!==o[m];)m--;for(;1<=u&&0<=m;u--,m--)if(l[u]!==o[m]){if(u!==1||m!==1)do if(u--,m--,0>m||l[u]!==o[m]){var g=`
`+l[u].replace(" at new "," at ");return e.displayName&&g.includes("<anonymous>")&&(g=g.replace("<anonymous>",e.displayName)),g}while(1<=u&&0<=m);break}}}finally{ue=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?I(e):""}function he(e){switch(e.tag){case 5:return I(e.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 2:case 15:return e=ce(e.type,!1),e;case 11:return e=ce(e.type.render,!1),e;case 1:return e=ce(e.type,!0),e;default:return""}}function me(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Te:return"Fragment";case de:return"Portal";case vt:return"Profiler";case Ge:return"StrictMode";case Xe:return"Suspense";case Ke:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $t:return(e.displayName||"Context")+".Consumer";case Fe:return(e._context.displayName||"Context")+".Provider";case be:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case He:return t=e.displayName||null,t!==null?t:me(e.type)||"Memo";case Ve:t=e._payload,e=e._init;try{return me(e(t))}catch{}}return null}function Se(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me(t);case 8:return t===Ge?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ge(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lt(e){var t=Ee(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(u){r=""+u,o.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function we(e){e._valueTracker||(e._valueTracker=lt(e))}function rr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ee(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ce(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Pn(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Le(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ge(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function dn(e,t){t=t.checked,t!=null&&X(e,"checked",t,!1)}function lr(e,t){dn(e,t);var n=ge(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ir(e,t.type,n):t.hasOwnProperty("defaultValue")&&ir(e,t.type,ge(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Wt(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ir(e,t,n){(t!=="number"||Ce(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ne=Array.isArray;function Ht(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ge(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function On(e,t){if(t.dangerouslLine truncated
`).replace(up,"")}function Bi(e,t,n){if(t=Nu(t),Nu(e)!==t&&n)throw Error(a(425))}function Ui(){}var ss=null,as=null;function us(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var cs=typeof setTimeout=="function"?setTimeout:void 0,cp=typeof clearTimeout=="function"?clearTimeout:void 0,Iu=typeof Promise=="function"?Promise:void 0,fp=typeof queueMicrotask=="function"?queueMicrotask:typeof Iu<"u"?function(e){return Iu.resolve(null).then(e).catch(dp)}:cs;function dp(e){setTimeout(function(){throw e})}function fs(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),Dl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);Dl(t)}function pr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ju(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var sl=Math.random().toString(36).slice(2),An="__reactFiber$"+sl,Kl="__reactProps$"+sl,Yn="__reactContainer$"+sl,ds="__reactEvents$"+sl,pp="__reactListeners$"+sl,hp="__reactHandles$"+sl;function Or(e){var t=e[An];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yn]||n[An]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ju(e);e!==null;){if(n=e[An])return n;e=ju(e)}return t}e=n,n=e.parentNode}return null}function ql(e){return e=e[An]||e[Yn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function al(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(a(33))}function Wi(e){return e[Kl]||null}var ps=[],ul=-1;function hr(e){return{current:e}}function Oe(e){0>ul||(e.current=ps[ul],ps[ul]=null,ul--)}function je(e,t){ul++,ps[ul]=e.current,e.current=t}var mr={},wt=hr(mr),Mt=hr(!1),Mr=mr;function cl(e,t){var n=e.type.contextTypes;if(!n)return mr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Dt(e){return e=e.childContextTypes,e!=null}function Hi(){Oe(Mt),Oe(wt)}function zu(e,t,n){if(wt.current!==mr)throw Error(a(168));je(wt,t),je(Mt,n)}function Pu(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(a(108,Se(e)||"Unknown",l));return B({},n,r)}function Vi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mr,Mr=wt.current,je(wt,e),je(Mt,Mt.current),!0}function Ou(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Pu(e,t,Mr),r.__reactInternalMemoizedMergedChildContext=e,Oe(Mt),Oe(wt),je(wt,e)):Oe(Mt),je(Mt,n)}var Gn=null,Qi=!1,hs=!1;function Mu(e){Gn===null?Gn=[e]:Gn.push(e)}function mp(e){Qi=!0,Mu(e)}function gr(){if(!hs&&Gn!==null){hs=!0;var e=0,t=d;try{var n=Gn;for(d=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Gn=null,Qi=!1}catch(l){throw Gn!==null&&(Gn=Gn.slice(e+1)),Ei(yn,gr),l}finally{d=t,hs=!1}}return null}var fl=[],dl=0,Yi=null,Gi=0,on=[],sn=0,Dr=null,Kn=1,qn="";function Fr(e,t){fl[dl++]=Gi,fl[dl++]=Yi,Yi=e,Gi=t}function Du(e,t,n){on[sn++]=Kn,on[sn++]=qn,on[sn++]=Dr,Dr=e;var r=Kn;e=qn;var l=32-yt(r)-1;r&=~(1<<l),n+=1;var o=32-yt(t)+l;if(30<o){var u=l-l%5;o=(r&(1<<u)-1).toString(32),r>>=u,l-=u,Kn=1<<32-yt(t)+l|n<<l|r,qn=o+e}else Kn=1<<o|n<<l|r,qn=e}function ms(e){e.return!==null&&(Fr(e,1),Du(e,1,0))}function gs(e){for(;e===Yi;)Yi=fl[--dl],fl[dl]=null,Gi=fl[--dl],fl[dl]=null;for(;e===Dr;)Dr=on[--sn],on[sn]=null,qn=on[--sn],on[sn]=null,Kn=on[--sn],on[sn]=null}var qt=null,Xt=null,De=!1,wn=null;function Fu(e,t){var n=fn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function bu(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,qt=e,Xt=pr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,qt=e,Xt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Dr!==null?{id:Kn,overflow:qn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=fn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,qt=e,Xt=null,!0):!1;default:return!1}}function vs(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ys(e){if(De){var t=Xt;if(t){var n=t;if(!bu(e,t)){if(vs(e))throw Error(a(418));t=pr(n.nextSibling);var r=qt;t&&bu(e,t)?Fu(r,n):(e.flags=e.flags&-4097|2,De=!1,qt=e)}}else{if(vs(e))throw Error(a(418));e.flags=e.flags&-4097|2,De=!1,qt=e}}}function Bu(e){for(e=e.retLine truncated
`+l[u].replace(" at new "," at ");return e.displayName&&g.includes("<anonymous>")&&(g=g.replace("<anonymous>",e.displayName)),g}while(1<=u&&0<=m);break}}}finally{ue=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?I(e):""}function he(e){switch(e.tag){case 5:return I(e.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 2:case 15:return e=ce(e.type,!1),e;case 11:return e=ce(e.type.render,!1),e;case 1:return e=ce(e.type,!0),e;default:return""}}function me(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Te:return"Fragment";case de:return"Portal";case vt:return"Profiler";case Ge:return"StrictMode";case Xe:return"Suspense";case Ke:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $t:return(e.displayName||"Context")+".Consumer";case Fe:return(e._context.displayName||"Context")+".Provider";case be:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case He:return t=e.displayName||null,t!==null?t:me(e.type)||"Memo";case Ve:t=e._payload,e=e._init;try{return me(e(t))}catch{}}return null}function Se(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me(t);case 8:return t===Ge?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ge(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lt(e){var t=Ee(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(u){r=""+u,o.call(this,u)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function we(e){e._valueTracker||(e._valueTracker=lt(e))}function rr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ee(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ce(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Pn(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Le(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ge(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function dn(e,t){t=t.checked,t!=null&&J(e,"checked",t,!1)}function lr(e,t){dn(e,t);var n=ge(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ir(e,t.type,n):t.hasOwnProperty("defaultValue")&&ir(e,t.type,ge(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Wt(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ir(e,t,n){(t!=="number"||Ce(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ne=Array.isArray;function Ht(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ge(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function On(e,t){if(t.dangerouslLine truncated
`).replace(up,"")}function Bi(e,t,n){if(t=Nu(t),Nu(e)!==t&&n)throw Error(a(425))}function Ui(){}var ss=null,as=null;function us(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var cs=typeof setTimeout=="function"?setTimeout:void 0,cp=typeof clearTimeout=="function"?clearTimeout:void 0,Iu=typeof Promise=="function"?Promise:void 0,fp=typeof queueMicrotask=="function"?queueMicrotask:typeof Iu<"u"?function(e){return Iu.resolve(null).then(e).catch(dp)}:cs;function dp(e){setTimeout(function(){throw e})}function fs(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),Dl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);Dl(t)}function pr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ju(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var sl=Math.random().toString(36).slice(2),An="__reactFiber$"+sl,Kl="__reactProps$"+sl,Yn="__reactContainer$"+sl,ds="__reactEvents$"+sl,pp="__reactListeners$"+sl,hp="__reactHandles$"+sl;function Or(e){var t=e[An];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yn]||n[An]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ju(e);e!==null;){if(n=e[An])return n;e=ju(e)}return t}e=n,n=e.parentNode}return null}function ql(e){return e=e[An]||e[Yn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function al(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(a(33))}function Wi(e){return e[Kl]||null}var ps=[],ul=-1;function hr(e){return{current:e}}function Oe(e){0>ul||(e.current=ps[ul],ps[ul]=null,ul--)}function je(e,t){ul++,ps[ul]=e.current,e.current=t}var mr={},wt=hr(mr),Mt=hr(!1),Mr=mr;function cl(e,t){var n=e.type.contextTypes;if(!n)return mr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Dt(e){return e=e.childContextTypes,e!=null}function Hi(){Oe(Mt),Oe(wt)}function zu(e,t,n){if(wt.current!==mr)throw Error(a(168));je(wt,t),je(Mt,n)}function Pu(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(a(108,Se(e)||"Unknown",l));return B({},n,r)}function Vi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mr,Mr=wt.current,je(wt,e),je(Mt,Mt.current),!0}function Ou(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Pu(e,t,Mr),r.__reactInternalMemoizedMergedChildContext=e,Oe(Mt),Oe(wt),je(wt,e)):Oe(Mt),je(Mt,n)}var Gn=null,Qi=!1,hs=!1;function Mu(e){Gn===null?Gn=[e]:Gn.push(e)}function mp(e){Qi=!0,Mu(e)}function gr(){if(!hs&&Gn!==null){hs=!0;var e=0,t=d;try{var n=Gn;for(d=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Gn=null,Qi=!1}catch(l){throw Gn!==null&&(Gn=Gn.slice(e+1)),Ei(yn,gr),l}finally{d=t,hs=!1}}return null}var fl=[],dl=0,Yi=null,Gi=0,on=[],sn=0,Dr=null,Kn=1,qn="";function Fr(e,t){fl[dl++]=Gi,fl[dl++]=Yi,Yi=e,Gi=t}function Du(e,t,n){on[sn++]=Kn,on[sn++]=qn,on[sn++]=Dr,Dr=e;var r=Kn;e=qn;var l=32-yt(r)-1;r&=~(1<<l),n+=1;var o=32-yt(t)+l;if(30<o){var u=l-l%5;o=(r&(1<<u)-1).toString(32),r>>=u,l-=u,Kn=1<<32-yt(t)+l|n<<l|r,qn=o+e}else Kn=1<<o|n<<l|r,qn=e}function ms(e){e.return!==null&&(Fr(e,1),Du(e,1,0))}function gs(e){for(;e===Yi;)Yi=fl[--dl],fl[dl]=null,Gi=fl[--dl],fl[dl]=null;for(;e===Dr;)Dr=on[--sn],on[sn]=null,qn=on[--sn],on[sn]=null,Kn=on[--sn],on[sn]=null}var qt=null,Xt=null,De=!1,wn=null;function Fu(e,t){var n=fn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function bu(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,qt=e,Xt=pr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,qt=e,Xt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Dr!==null?{id:Kn,overflow:qn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=fn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,qt=e,Xt=null,!0):!1;default:return!1}}function vs(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ys(e){if(De){var t=Xt;if(t){var n=t;if(!bu(e,t)){if(vs(e))throw Error(a(418));t=pr(n.nextSibling);var r=qt;t&&bu(e,t)?Fu(r,n):(e.flags=e.flags&-4097|2,De=!1,qt=e)}}else{if(vs(e))throw Error(a(418));e.flags=e.flags&-4097|2,De=!1,qt=e}}}function Bu(e){for(e=e.retLine truncated
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:l,digest:null}}function Bs(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Us(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Tp=typeof WeakMap=="function"?WeakMap:Map;function wc(e,t,n){n=Jn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ho||(ho=!0,na=r),Us(e,t)},n}function kc(e,t,n){n=Jn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){Us(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Us(e,t),typeof r!="function"&&(wr===null?wr=new Set([this]):wr.add(this));var u=t.stack;this.componentDidCatch(t.value,{componentStack:u!==null?u:""})}),n}function Sc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Tp;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Fp.bind(null,e,t,n),t.then(e,e))}function Ec(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Tc(e,t,n,r,l){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Jn(-1,1),t.tag=2,yr(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var Cp=ie.ReactCurrentOwner,Ft=!1;function At(e,t,n,r){t.child=e===null?Vu(t,null,n,r):hl(t,e.child,n,r)}function Cc(e,t,n,r,l){n=n.render;var o=t.ref;return gl(t,l),r=js(e,t,n,r,o,l),n=zs(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Zn(e,t,l)):(De&&n&&ms(t),t.flags|=1,At(e,t,r,l),t.child)}function _c(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!ua(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Rc(e,t,o,r,l)):(e=wo(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&l)===0){var u=o.memoizedProps;if(n=n.compare,n=n!==null?n:Hl,n(u,r)&&e.ref===t.ref)return Zn(e,t,l)}return t.flags|=1,e=Tr(o,r),e.ref=t.ref,e.return=t,t.child=e}function Rc(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(Hl(o,r)&&e.ref===t.ref)if(Ft=!1,t.pendingProps=r=o,(e.lanes&l)!==0)(e.flags&131072)!==0&&(Ft=!0);else return t.lanes=e.lanes,Zn(e,t,l)}return Ws(e,t,n,r,l)}function Ac(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},je(wl,Jt),Jt|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,je(wl,Jt),Jt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,je(wl,Jt),Jt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,je(wl,Jt),Jt|=r;return At(e,t,l,n),t.child}function Lc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ws(e,t,n,r,l){var o=Dt(n)?Mr:wt.current;return o=cl(t,o),gl(t,l),n=js(e,t,n,r,o,l),r=zs(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Zn(e,t,l)):(De&&r&&ms(t),t.flags|=1,At(e,t,n,l),t.child)}function Nc(e,t,n,r,l){if(Dt(n)){var o=!0;Vi(t)}else o=!1;if(gl(t,l),t.stateNode===null)ao(e,t),yc(t,n,r),bs(t,n,r,l),r=!0;else if(e===null){var u=t.stateNode,m=t.memoizedProps;u.props=m;var g=u.context,R=n.contextType;typeof R=="object"&&R!==null?R=an(R):(R=Dt(n)?Mr:wt.current,R=cl(t,R));var P=n.getDerivedStateFromProps,O=typeof P=="function"||typeof u.getSnapshotBeforeUpdate=="function";O||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m!==r||g!==R)&&xc(t,u,r,R),vr=!1;var z=t.memoizedState;u.state=z,$i(t,r,u,l),g=t.memoizedState,m!==r||z!==g||Mt.current||vr?(typeof P=="function"&&(Fs(t,n,P,r),g=t.memoizedState),(m=vr||vc(t,n,m,r,z,g,R))?(O||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=g),u.props=r,u.state=g,u.context=R,r=m):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{u=t.stateNode,Yu(e,t),m=t.memoizedProps,R=t.type===t.elementType?m:kn(t.type,m),u.props=R,O=t.pendingProps,z=u.context,g=n.contextType,typeof g=="object"&&g!==null?g=an(g):(g=Dt(n)?Mr:wt.current,g=cl(t,g));var U=n.getDerivedStateFromProps;(P=typeof U=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m!==O||z!==g)&&xc(t,u,r,g),vr=!1,z=t.memoizedState,u.state=z,$i(t,r,u,Line truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sh(s,i){return xh(s)||wh(s,i)||Eh(s,i)||kh()}function Eh(s,i){if(s){if(typeof s=="string")return kf(s,i);var a={}.toString.call(s).slice(8,-1);return a==="Object"&&s.constructor&&(a=s.constructor.name),a==="Map"||a==="Set"?Array.from(s):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?kf(s,i):void 0}}const td=Object.entries,Sf=Object.setPrototypeOf,Th=Object.isFrozen,Ch=Object.getPrototypeOf,_h=Object.getOwnPropertyDescriptor;let mt=Object.freeze,gt=Object.seal,Rl=Object.create,nd=typeof Reflect<"u"&&Reflect,ja=nd.apply,za=nd.construct;mt||(mt=function(i){return i});gt||(gt=function(i){return i});ja||(ja=function(i,a){for(var c=arguments.length,f=new Array(c>2?c-2:0),h=2;h<c;h++)f[h-2]=arguments[h];return i.apply(a,f)});za||(za=function(i){for(var a=arguments.length,c=new Array(a>1?a-1:0),f=1;f<a;f++)c[f-1]=arguments[f];return new i(...c)});const El=et(Array.prototype.forEach),Rh=et(Array.prototype.lastIndexOf),Ef=et(Array.prototype.pop),Tl=et(Array.prototype.push),Ah=et(Array.prototype.splice),Ar=Array.isArray,yi=et(String.prototype.toLowerCase),ka=et(String.prototype.toString),Tf=et(String.prototype.match),di=et(String.prototype.replace),Cf=et(String.prototype.indexOf),Lh=et(String.prototype.trim),Nh=et(Number.prototype.toString),Ih=et(Boolean.prototype.toString),_f=typeof BigInt>"u"?null:et(BigInt.prototype.toString),Rf=typeof Symbol>"u"?null:et(Symbol.prototype.toString),ut=et(Object.prototype.hasOwnProperty),pi=et(Object.prototype.toString),at=et(RegExp.prototype.test),Gr=jh(TypeError);function et(s){return function(i){i instanceof RegExp&&(i.lastIndex=0);for(var a=arguments.length,c=new Array(a>1?a-1:0),f=1;f<a;f++)c[f-1]=arguments[f];return ja(s,i,c)}}function jh(s){return function(){for(var i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];return za(s,a)}}function ye(s,i){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yi;if(Sf&&Sf(s,null),!Ar(i))return s;let c=i.length;for(;c--;){let f=i[c];if(typeof f=="string"){const h=a(f);h!==f&&(Th(i)||(i[c]=h),f=h)}s[f]=!0}return s}function zh(s){for(let i=0;i<s.length;i++)ut(s,i)||(s[i]=null);return s}function Nt(s){const i=Rl(null);for(const c of td(s)){var a=Sh(c,2);const f=a[0],h=a[1];ut(s,f)&&(Ar(h)?i[f]=zh(h):h&&typeof h=="object"&&h.constructor===Object?i[f]=Nt(h):i[f]=h)}return i}function Ph(s){switch(typeof s){case"string":return s;case"number":return Nh(s);case"boolean":return Ih(s);case"bigint":return _f?_f(s):"0";case"symbol":return Rf?Rf(s):"Symbol()";case"undefined":return pi(s);case"function":case"object":{if(s===null)return pi(s);const i=s,a=jn(i,"toString");if(typeof a=="function"){const c=a(i);return typeof c=="string"?c:pi(c)}return pi(s)}default:return pi(s)}}function jn(s,i){for(;s!==null;){const c=_h(s,i);if(c){if(c.get)return et(c.get);if(typeof c.value=="function")return et(c.value)}s=Ch(s)}function a(){return null}return a}function Oh(s){try{return at(s,""),!0}catch{return!1}}const Af=mt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Sa=mt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ea=mt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Mh=mt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","sLine truncated
`+xt),jt&&(xt=Rt(xt)),de&&Dn?be(xt):xt},i.setConfig=function(){let D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_n(D),pn=!0,ct=we,Ot=Ce},i.clearConfig=function(){J=null,pn=!1,ct=null,Ot=null,de=Ge,Te=""},i.isValidAttribute=function(D,d,C){J||_n({});const j=N(D),H=N(d);return Pr(j,H,C)},i.addHook=function(D,d){typeof d=="function"&&ut(y,D)&&Tl(y[D],d)},i.removeHook=function(D,d){if(ut(y,D)){if(d!==void 0){const C=Rh(y[D],d);return C===-1?void 0:Ah(y[D],C,1)[0]}return Ef(y[D])}},i.removeHooks=function(D){ut(y,D)&&(y[D]=[])},i.removeAllHooks=function(){y=Of()},i}var Jh=rd();function ba(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var qr=ba();function ld(s){qr=s}var wi={exec:()=>null};function Ae(s,i=""){let a=typeof s=="string"?s:s.source;const c={replace:(f,h)=>{let w=typeof h=="string"?h:h.source;return w=w.replace(It.caret,"$1"),a=a.replace(f,w),c},getRegex:()=>new RegExp(a,i)};return c}var It={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i")},Zh=/^(?:[ \t]*(?:\n|$))+/,$h=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,em=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Si=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tm=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ba=/(?:[*+-]|\d{1,9}[.)])/,id=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,od=Ae(id).replace(/bull/g,Ba).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nm=Ae(id).replace(/bull/g,Ba).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ua=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rm=/^[^\n]+/,Wa=/(?!\s*\])(?:\\.|[^\[\]\\])+/,lm=Ae(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wa).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),im=Ae(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ba).getRegex(),Mo="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ha=/\x3C!--(?:-?>|[\s\S]*?(?:-->|$))/,om=Ae("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\Line truncated
`+o.stack}return{value:e,source:t,stack:l,digest:null}}function Bs(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Us(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Tp=typeof WeakMap=="function"?WeakMap:Map;function wc(e,t,n){n=Jn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ho||(ho=!0,na=r),Us(e,t)},n}function kc(e,t,n){n=Jn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){Us(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Us(e,t),typeof r!="function"&&(wr===null?wr=new Set([this]):wr.add(this));var u=t.stack;this.componentDidCatch(t.value,{componentStack:u!==null?u:""})}),n}function Sc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Tp;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Fp.bind(null,e,t,n),t.then(e,e))}function Ec(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Tc(e,t,n,r,l){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Jn(-1,1),t.tag=2,yr(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=l,e)}var Cp=oe.ReactCurrentOwner,Ft=!1;function At(e,t,n,r){t.child=e===null?Vu(t,null,n,r):hl(t,e.child,n,r)}function Cc(e,t,n,r,l){n=n.render;var o=t.ref;return gl(t,l),r=js(e,t,n,r,o,l),n=zs(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Zn(e,t,l)):(De&&n&&ms(t),t.flags|=1,At(e,t,r,l),t.child)}function _c(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!ua(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Rc(e,t,o,r,l)):(e=wo(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&l)===0){var u=o.memoizedProps;if(n=n.compare,n=n!==null?n:Hl,n(u,r)&&e.ref===t.ref)return Zn(e,t,l)}return t.flags|=1,e=Tr(o,r),e.ref=t.ref,e.return=t,t.child=e}function Rc(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(Hl(o,r)&&e.ref===t.ref)if(Ft=!1,t.pendingProps=r=o,(e.lanes&l)!==0)(e.flags&131072)!==0&&(Ft=!0);else return t.lanes=e.lanes,Zn(e,t,l)}return Ws(e,t,n,r,l)}function Ac(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},je(wl,Jt),Jt|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,je(wl,Jt),Jt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,je(wl,Jt),Jt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,je(wl,Jt),Jt|=r;return At(e,t,l,n),t.child}function Lc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ws(e,t,n,r,l){var o=Dt(n)?Mr:wt.current;return o=cl(t,o),gl(t,l),n=js(e,t,n,r,o,l),r=zs(),e!==null&&!Ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Zn(e,t,l)):(De&&r&&ms(t),t.flags|=1,At(e,t,n,l),t.child)}function Nc(e,t,n,r,l){if(Dt(n)){var o=!0;Vi(t)}else o=!1;if(gl(t,l),t.stateNode===null)ao(e,t),yc(t,n,r),bs(t,n,r,l),r=!0;else if(e===null){var u=t.stateNode,m=t.memoizedProps;u.props=m;var g=u.context,R=n.contextType;typeof R=="object"&&R!==null?R=an(R):(R=Dt(n)?Mr:wt.current,R=cl(t,R));var P=n.getDerivedStateFromProps,O=typeof P=="function"||typeof u.getSnapshotBeforeUpdate=="function";O||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m!==r||g!==R)&&xc(t,u,r,R),vr=!1;var z=t.memoizedState;u.state=z,$i(t,r,u,l),g=t.memoizedState,m!==r||z!==g||Mt.current||vr?(typeof P=="function"&&(Fs(t,n,P,r),g=t.memoizedState),(m=vr||vc(t,n,m,r,z,g,R))?(O||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=g),u.props=r,u.state=g,u.context=R,r=m):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{u=t.stateNode,Yu(e,t),m=t.memoizedProps,R=t.type===t.elementType?m:kn(t.type,m),u.props=R,O=t.pendingProps,z=u.context,g=n.contextType,typeof g=="object"&&g!==null?g=an(g):(g=Dt(n)?Mr:wt.current,g=cl(t,g));var U=n.getDerivedStateFromProps;(P=typeof U=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m!==O||z!==g)&&xc(t,u,r,g),vr=!1,z=t.memoizedState,u.state=z,$i(t,r,u,Line truncated
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sh(s,i){return xh(s)||wh(s,i)||Eh(s,i)||kh()}function Eh(s,i){if(s){if(typeof s=="string")return kf(s,i);var a={}.toString.call(s).slice(8,-1);return a==="Object"&&s.constructor&&(a=s.constructor.name),a==="Map"||a==="Set"?Array.from(s):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?kf(s,i):void 0}}const td=Object.entries,Sf=Object.setPrototypeOf,Th=Object.isFrozen,Ch=Object.getPrototypeOf,_h=Object.getOwnPropertyDescriptor;let mt=Object.freeze,gt=Object.seal,Rl=Object.create,nd=typeof Reflect<"u"&&Reflect,ja=nd.apply,za=nd.construct;mt||(mt=function(i){return i});gt||(gt=function(i){return i});ja||(ja=function(i,a){for(var c=arguments.length,f=new Array(c>2?c-2:0),h=2;h<c;h++)f[h-2]=arguments[h];return i.apply(a,f)});za||(za=function(i){for(var a=arguments.length,c=new Array(a>1?a-1:0),f=1;f<a;f++)c[f-1]=arguments[f];return new i(...c)});const El=et(Array.prototype.forEach),Rh=et(Array.prototype.lastIndexOf),Ef=et(Array.prototype.pop),Tl=et(Array.prototype.push),Ah=et(Array.prototype.splice),Ar=Array.isArray,yi=et(String.prototype.toLowerCase),ka=et(String.prototype.toString),Tf=et(String.prototype.match),di=et(String.prototype.replace),Cf=et(String.prototype.indexOf),Lh=et(String.prototype.trim),Nh=et(Number.prototype.toString),Ih=et(Boolean.prototype.toString),_f=typeof BigInt>"u"?null:et(BigInt.prototype.toString),Rf=typeof Symbol>"u"?null:et(Symbol.prototype.toString),ut=et(Object.prototype.hasOwnProperty),pi=et(Object.prototype.toString),at=et(RegExp.prototype.test),Gr=jh(TypeError);function et(s){return function(i){i instanceof RegExp&&(i.lastIndex=0);for(var a=arguments.length,c=new Array(a>1?a-1:0),f=1;f<a;f++)c[f-1]=arguments[f];return ja(s,i,c)}}function jh(s){return function(){for(var i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];return za(s,a)}}function ye(s,i){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:yi;if(Sf&&Sf(s,null),!Ar(i))return s;let c=i.length;for(;c--;){let f=i[c];if(typeof f=="string"){const h=a(f);h!==f&&(Th(i)||(i[c]=h),f=h)}s[f]=!0}return s}function zh(s){for(let i=0;i<s.length;i++)ut(s,i)||(s[i]=null);return s}function Nt(s){const i=Rl(null);for(const c of td(s)){var a=Sh(c,2);const f=a[0],h=a[1];ut(s,f)&&(Ar(h)?i[f]=zh(h):h&&typeof h=="object"&&h.constructor===Object?i[f]=Nt(h):i[f]=h)}return i}function Ph(s){switch(typeof s){case"string":return s;case"number":return Nh(s);case"boolean":return Ih(s);case"bigint":return _f?_f(s):"0";case"symbol":return Rf?Rf(s):"Symbol()";case"undefined":return pi(s);case"function":case"object":{if(s===null)return pi(s);const i=s,a=jn(i,"toString");if(typeof a=="function"){const c=a(i);return typeof c=="string"?c:pi(c)}return pi(s)}default:return pi(s)}}function jn(s,i){for(;s!==null;){const c=_h(s,i);if(c){if(c.get)return et(c.get);if(typeof c.value=="function")return et(c.value)}s=Ch(s)}function a(){return null}return a}function Oh(s){try{return at(s,""),!0}catch{return!1}}const Af=mt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Sa=mt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ea=mt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Mh=mt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","sLine truncated
`+xt),jt&&(xt=Rt(xt)),de&&Dn?be(xt):xt},i.setConfig=function(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_n(M),pn=!0,ct=we,Ot=Ce},i.clearConfig=function(){Z=null,pn=!1,ct=null,Ot=null,de=Ge,Te=""},i.isValidAttribute=function(M,d,C){Z||_n({});const j=L(M),V=L(d);return Pr(j,V,C)},i.addHook=function(M,d){typeof d=="function"&&ut(y,M)&&Tl(y[M],d)},i.removeHook=function(M,d){if(ut(y,M)){if(d!==void 0){const C=Rh(y[M],d);return C===-1?void 0:Ah(y[M],C,1)[0]}return Ef(y[M])}},i.removeHooks=function(M){ut(y,M)&&(y[M]=[])},i.removeAllHooks=function(){y=Of()},i}var Jh=rd();function ba(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var qr=ba();function ld(s){qr=s}var wi={exec:()=>null};function Ae(s,i=""){let a=typeof s=="string"?s:s.source;const c={replace:(f,h)=>{let w=typeof h=="string"?h:h.source;return w=w.replace(It.caret,"$1"),a=a.replace(f,w),c},getRegex:()=>new RegExp(a,i)};return c}var It={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i")},Zh=/^(?:[ \t]*(?:\n|$))+/,$h=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,em=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Si=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tm=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ba=/(?:[*+-]|\d{1,9}[.)])/,id=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,od=Ae(id).replace(/bull/g,Ba).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),nm=Ae(id).replace(/bull/g,Ba).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ua=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rm=/^[^\n]+/,Wa=/(?!\s*\])(?:\\.|[^\[\]\\])+/,lm=Ae(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wa).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),im=Ae(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ba).getRegex(),Mo="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ha=/\x3C!--(?:-?>|[\s\S]*?(?:-->|$))/,om=Ae("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\Line truncated
]`).replace("lheading",od).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},cm=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,fm=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ad=/^( {2,}|\\)\n(?!\s*$)/,dm=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Do=/[\p{P}\p{S}]/u,Qa=/[\s\p{P}\p{S}]/u,ud=/[^\s\p{P}\p{S}]/u,pm=Ae(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Qa).getRegex(),cd=/(?!~)[\p{P}\p{S}]/u,hm=/(?!~)[\s\p{P}\p{S}]/u,mm=/(?:[^\s\p{P}\p{S}]|~)/u,gm=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,fd=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,vm=Ae(fd,"u").replace(/punct/g,Do).getRegex(),ym=Ae(fd,"u").replace(/punct/g,cd).getRegex(),dd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xm=Ae(dd,"gu").replace(/notPunctSpace/g,ud).replace(/punctSpace/g,Qa).replace(/punct/g,Do).getRegex(),wm=Ae(dd,"gu").replace(/notPunctSpace/g,mm).replace(/punctSpace/g,hm).replace(/punct/g,cd).getRegex(),km=Ae("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ud).replace(/punctSpace/g,Qa).replace(/punct/g,Do).getRegex(),Sm=Ae(/\\(punct)/,"gu").replace(/punct/g,Do).getRegex(),Em=Ae(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Tm=Ae(Ha).replace("(?:-->|$)","-->").getRegex(),Cm=Ae("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Tm).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),zo=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,_m=Ae(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",zo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pd=Ae(/^!?\[(label)\]\[(ref)\]/).replace("label",zo).replace("ref",Wa).getRegex(),hd=Ae(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wa).getRegex(),Rm=Ae("reflink|nolink(?!\\()","g").replace("reflink",pd).replace("nolink",hd).getRegex(),Ya={_backpedal:wi,anyPunctuation:Sm,autolink:Em,blockSkip:gm,br:ad,code:fm,del:wi,emStrongLDelim:vm,emStrongRDelimAst:xm,emStrongRDelimUnd:km,escape:cm,link:_m,nolink:hd,punctuation:pm,reflink:pd,reflinkSearch:Rm,tag:Cm,text:dm,url:wi},Am={...Ya,link:Ae(/^!?\[(label)\]\((.*?)\)/).replace("label",zo).getRegex(),reflink:Ae(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",zo).getRegex()},Pa={...Ya,emStrongRDelimAst:wm,emStrongLDelim:ym,url:Ae(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Lm={...Pa,br:Ae(ad).replace("{2,}","*").getRegex(),text:Ae(Pa.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},No={normal:Va,gfm:am,pedantic:um},hi={normal:Ya,gfm:Pa,breaks:Lm,pedantic:Am},Nm={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Df=s=>Nm[s];function zn(s,i){if(i){if(It.escapeTest.test(s))return s.replace(It.escapeReplace,Df)}else if(It.escapeTestNoEncode.test(s))return s.replace(It.escapeReplaceNoEncode,Df);return s}function Ff(s){try{s=encodeURI(s).replace(It.percentDecode,"%")}catch{return null}return s}function bf(s,i){var h;const a=s.replace(It.findPipe,(w,v,_)=>{let k=!1,A=v;for(;--A>=0&&_[A]==="\\";)k=!k;return k?"|":" |"}),c=a.split(It.splitPipe);let f=0;if(c[0].trim()||c.shift(),c.length>0&&!((h=c.at(-1))!=null&&h.trim())&&c.pop(),i)if(c.length>i)c.splice(i);else for(;c.length<i;)c.push("");for(;f<c.length;f++)c[f]=c[f].trim().replace(It.slashPipe,"|");return c}function mi(s,i,a){const c=s.length;if(c===0)return"";let f=0;for(;f<c&&s.charAt(c-f-1)===i;)f++;return s.slice(0,c-f)}function Im(s,i){if(s.indexOf(i[1])===-1)return-1;let a=0;for(let c=0;c<s.length;c++)if(s[c]==="\\")c++;else if(s[c]===i[0])a++;else if(s[c]===i[1]Line truncated
`).map(h=>{const w=h.match(a.other.beginningSpace);if(w===null)return h;const[v]=w;return v.length>=f.length?h.slice(f.length):h}).join(`
`)}var Po=class{constructor(s){Ie(this,"options");Ie(this,"rules");Ie(this,"lexer");this.options=s||qr}space(s){const i=this.rules.block.newline.exec(s);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(s){const i=this.rules.block.code.exec(s);if(i){const a=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?a:mi(a,`
@@ -66,31 +66,31 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
`),A=k.replace(this.rules.other.blockquoteSetextReplace,`
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");c=c?`${c}
${k}`:k,f=f?`${f}
${A}`:A;const M=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(A,h,!0),this.lexer.state.top=M,a.length===0)break;const L=h.at(-1);if((L==null?void 0:L.type)==="code")break;if((L==null?void 0:L.type)==="blockquote"){const te=L,K=te.raw+`
${A}`:A;const F=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(A,h,!0),this.lexer.state.top=F,a.length===0)break;const N=h.at(-1);if((N==null?void 0:N.type)==="code")break;if((N==null?void 0:N.type)==="blockquote"){const ee=N,W=ee.raw+`
`+a.join(`
`),$=this.blockquote(K);h[h.length-1]=$,c=c.substring(0,c.length-te.raw.length)+$.raw,f=f.substring(0,f.length-te.text.length)+$.text;break}else if((L==null?void 0:L.type)==="list"){const te=L,K=te.raw+`
`),q=this.blockquote(W);h[h.length-1]=q,c=c.substring(0,c.length-ee.raw.length)+q.raw,f=f.substring(0,f.length-ee.text.length)+q.text;break}else if((N==null?void 0:N.type)==="list"){const ee=N,W=ee.raw+`
`+a.join(`
`),$=this.list(K);h[h.length-1]=$,c=c.substring(0,c.length-L.raw.length)+$.raw,f=f.substring(0,f.length-te.raw.length)+$.raw,a=K.substring(h.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:c,tokens:h,text:f}}}list(s){let i=this.rules.block.list.exec(s);if(i){let a=i[1].trim();const c=a.length>1,f={type:"list",raw:"",ordered:c,start:c?+a.slice(0,-1):"",loose:!1,items:[]};a=c?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=c?a:"[*+-]");const h=this.rules.other.listItemRegex(a);let w=!1;for(;s;){let _=!1,k="",A="";if(!(i=h.exec(s))||this.rules.block.hr.test(s))break;k=i[0],s=s.substring(k.length);let M=i[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,Q=>" ".repeat(3*Q.length)),L=s.split(`
`,1)[0],te=!M.trim(),K=0;if(this.options.pedantic?(K=2,A=M.trimStart()):te?K=i[1].length+1:(K=i[2].search(this.rules.other.nonSpaceChar),K=K>4?1:K,A=M.slice(K),K+=i[1].length),te&&this.rules.other.blankLine.test(L)&&(k+=L+`
`,s=s.substring(L.length+1),_=!0),!_){const Q=this.rules.other.nextBulletRegex(K),W=this.rules.other.hrRegex(K),X=this.rules.other.fencesBeginRegex(K),ie=this.rules.other.headingBeginRegex(K),fe=this.rules.other.htmlBeginRegex(K);for(;s;){const de=s.split(`
`,1)[0];let Te;if(L=de,this.options.pedantic?(L=L.replace(this.rules.other.listReplaceNesting," "),Te=L):Te=L.replace(this.rules.other.tabCharGlobal," "),X.test(L)||ie.test(L)||fe.test(L)||Q.test(L)||W.test(L))break;if(Te.search(this.rules.other.nonSpaceChar)>=K||!L.trim())A+=`
`+Te.slice(K);else{if(te||M.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||X.test(M)||ie.test(M)||W.test(M))break;A+=`
`+L}!te&&!L.trim()&&(te=!0),k+=de+`
`,s=s.substring(de.length+1),M=Te.slice(K)}}f.loose||(w?f.loose=!0:this.rules.other.doubleBlankLine.test(k)&&(w=!0));let $=null,se;this.options.gfm&&($=this.rules.other.listIsTask.exec(A),$&&(se=$[0]!=="[ ] ",A=A.replace(this.rules.other.listReplaceTask,""))),f.items.push({type:"list_item",raw:k,task:!!$,checked:se,loose:!1,text:A,tokens:[]}),f.raw+=k}const v=f.items.at(-1);if(v)v.raw=v.raw.trimEnd(),v.text=v.text.trimEnd();else return;f.raw=f.raw.trimEnd();for(let _=0;_<f.items.length;_++)if(this.lexer.state.top=!1,f.items[_].tokens=this.lexer.blockTokens(f.items[_].text,[]),!f.loose){const k=f.items[_].tokens.filter(M=>M.type==="space"),A=k.length>0&&k.some(M=>this.rules.other.anyLine.test(M.raw));f.loose=A}if(f.loose)for(let _=0;_<f.items.length;_++)f.items[_].loose=!0;return f}}html(s){const i=this.rules.block.html.exec(s);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(s){const i=this.rules.block.def.exec(s);if(i){const a=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),c=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",f=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:a,raw:i[0],href:c,title:f}}}table(s){var w;const i=this.rules.block.table.exec(s);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;const a=bf(i[1]),c=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),f=(w=i[3])!=null&&w.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`),q=this.list(W);h[h.length-1]=q,c=c.substring(0,c.length-N.raw.length)+q.raw,f=f.substring(0,f.length-ee.raw.length)+q.raw,a=W.substring(h.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:c,tokens:h,text:f}}}list(s){let i=this.rules.block.list.exec(s);if(i){let a=i[1].trim();const c=a.length>1,f={type:"list",raw:"",ordered:c,start:c?+a.slice(0,-1):"",loose:!1,items:[]};a=c?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=c?a:"[*+-]");const h=this.rules.other.listItemRegex(a);let w=!1;for(;s;){let _=!1,k="",A="";if(!(i=h.exec(s))||this.rules.block.hr.test(s))break;k=i[0],s=s.substring(k.length);let F=i[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,Y=>" ".repeat(3*Y.length)),N=s.split(`
`,1)[0],ee=!F.trim(),W=0;if(this.options.pedantic?(W=2,A=F.trimStart()):ee?W=i[1].length+1:(W=i[2].search(this.rules.other.nonSpaceChar),W=W>4?1:W,A=F.slice(W),W+=i[1].length),ee&&this.rules.other.blankLine.test(N)&&(k+=N+`
`,s=s.substring(N.length+1),_=!0),!_){const Y=this.rules.other.nextBulletRegex(W),H=this.rules.other.hrRegex(W),J=this.rules.other.fencesBeginRegex(W),oe=this.rules.other.headingBeginRegex(W),fe=this.rules.other.htmlBeginRegex(W);for(;s;){const de=s.split(`
`,1)[0];let Te;if(N=de,this.options.pedantic?(N=N.replace(this.rules.other.listReplaceNesting," "),Te=N):Te=N.replace(this.rules.other.tabCharGlobal," "),J.test(N)||oe.test(N)||fe.test(N)||Y.test(N)||H.test(N))break;if(Te.search(this.rules.other.nonSpaceChar)>=W||!N.trim())A+=`
`+Te.slice(W);else{if(ee||F.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||J.test(F)||oe.test(F)||H.test(F))break;A+=`
`+N}!ee&&!N.trim()&&(ee=!0),k+=de+`
`,s=s.substring(de.length+1),F=Te.slice(W)}}f.loose||(w?f.loose=!0:this.rules.other.doubleBlankLine.test(k)&&(w=!0));let q=null,ie;this.options.gfm&&(q=this.rules.other.listIsTask.exec(A),q&&(ie=q[0]!=="[ ] ",A=A.replace(this.rules.other.listReplaceTask,""))),f.items.push({type:"list_item",raw:k,task:!!q,checked:ie,loose:!1,text:A,tokens:[]}),f.raw+=k}const v=f.items.at(-1);if(v)v.raw=v.raw.trimEnd(),v.text=v.text.trimEnd();else return;f.raw=f.raw.trimEnd();for(let _=0;_<f.items.length;_++)if(this.lexer.state.top=!1,f.items[_].tokens=this.lexer.blockTokens(f.items[_].text,[]),!f.loose){const k=f.items[_].tokens.filter(F=>F.type==="space"),A=k.length>0&&k.some(F=>this.rules.other.anyLine.test(F.raw));f.loose=A}if(f.loose)for(let _=0;_<f.items.length;_++)f.items[_].loose=!0;return f}}html(s){const i=this.rules.block.html.exec(s);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(s){const i=this.rules.block.def.exec(s);if(i){const a=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),c=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",f=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:a,raw:i[0],href:c,title:f}}}table(s){var w;const i=this.rules.block.table.exec(s);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;const a=bf(i[1]),c=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),f=(w=i[3])!=null&&w.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],h={type:"table",raw:i[0],header:[],align:[],rows:[]};if(a.length===c.length){for(const v of c)this.rules.other.tableAlignRight.test(v)?h.align.push("right"):this.rules.other.tableAlignCenter.test(v)?h.align.push("center"):this.rules.other.tableAlignLeft.test(v)?h.align.push("left"):h.align.push(null);for(let v=0;v<a.length;v++)h.header.push({text:a[v],tokens:this.lexer.inline(a[v]),header:!0,align:h.align[v]});for(const v of f)h.rows.push(bf(v,h.header.length).map((_,k)=>({text:_,tokens:this.lexer.inline(_),header:!1,align:h.align[k]})));return h}}lheading(s){const i=this.rules.block.lheading.exec(s);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(s){const i=this.rules.block.paragraph.exec(s);if(i){const a=i[1].charAt(i[1].length-1)===`
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:a,tokens:this.lexer.inline(a)}}}text(s){const i=this.rules.block.text.exec(s);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(s){const i=this.rules.inline.escape.exec(s);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(s){const i=this.rules.inline.tag.exec(s);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(s){const i=this.rules.inline.link.exec(s);if(i){const a=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;const h=mi(a.slice(0,-1),"\\");if((a.length-h.length)%2===0)return}else{const h=Im(i[2],"()");if(h===-2)return;if(h>-1){const v=(i[0].indexOf("!")===0?5:4)+i[1].length+h;i[2]=i[2].substring(0,h),i[0]=i[0].substring(0,v).trim(),i[3]=""}}let c=i[2],f="";if(this.options.pedantic){const h=this.rules.other.pedanticHrefTitle.exec(c);h&&(c=h[1],f=h[3])}else f=i[3]?i[3].slice(1,-1):"";return c=c.trim(),this.rules.other.startAngleBracket.test(c)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?c=c.slice(1):c=c.slice(1,-1)),Bf(i,{href:c&&c.replace(this.rules.inline.anyPunctuation,"$1"),title:f&&f.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(s,i){let a;if((a=this.rules.inline.reflink.exec(s))||(a=this.rules.inline.nolink.exec(s))){const c=(a[2]||a[1]).replace(this.rules.other.multipleSpaceGlobal," "),f=i[c.toLowerCase()];if(!f){const h=a[0].charAt(0);return{type:"text",raw:h,text:h}}return Bf(a,f,a[0],this.lexer,this.rules)}}emStrong(s,i,a=""){let c=this.rules.inline.emStrongLDelim.exec(s);if(!c||c[3]&&a.match(this.rules.other.unicodeAlphaNumeric))return;if(!(c[1]||c[2]||"")||!a||this.rules.inline.punctuation.exec(a)){const h=[...c[0]].length-1;let w,v,_=h,k=0;const A=c[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(A.lastIndex=0,i=i.slice(-1*s.length+h);(c=A.exec(i))!=null;){if(w=c[1]||c[2]||c[3]||c[4]||c[5]||c[6],!w)continue;if(v=[...w].length,c[3]||c[4]){_+=v;continue}else if((c[5]||c[6])&&h%3&&!((h+v)%3)){k+=v;continue}if(_-=v,_>0)continue;v=Math.min(v,v+_+k);const M=[...c[0]][0].length,L=s.slice(0,h+c.index+M+v);if(Math.min(h,v)%2){const K=L.slice(1,-1);return{type:"em",raw:L,text:K,tokens:this.lexer.inlineTokens(K)}}const te=L.slice(2,-2);return{type:"strong",raw:L,text:te,tokens:this.lexer.inlineTokens(te)}}}}codespan(s){const i=this.rules.inline.code.exec(s);if(i){let a=i[2].replace(this.rules.other.newLineCharGlobal," ");const c=this.rules.other.nonSpaceChar.test(a),f=this.rules.other.startingSpaceChar.test(a)&&this.rules.other.endingSpaceChar.test(a);return c&&f&&(a=a.substring(1,a.length-1)),{type:"codespan",raw:i[0],text:a}}}br(s){const i=this.rules.inline.br.exec(s);if(i)return{type:"br",raw:i[0]}}del(s){const i=this.rules.inline.del.exec(s);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(s){const i=this.rules.inline.autolink.exec(s);if(i){let a,c;return i[2]==="@"?(a=i[1],c="mailto:"+a):(a=i[1],c=a),{type:"link",raw:i[0],text:a,href:c,tokens:[{type:"text",raw:a,text:a}]}}}url(s){var a;let i;if(i=this.rules.inline.url.exec(s)){let c,f;if(i[2]==="@")c=i[0],f="mailto:"+c;else{let h;do h=i[0],i[0]=((a=this.rules.inline._backpedal.exec(i[0]))==null?void 0:a[0])??"";while(h!==i[0]);c=i[0],i[1]==="www."?f="http://"+i[0]:f=i[0]}return{type:"link",raw:i[0],text:c,href:f,tokens:[{type:"text",raw:c,text:c}]}}}inlineText(s){const i=this.rules.inline.text.exec(s);if(i){const a=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:a}}}},tr=class Oa{constructor(i){Ie(this,"tokens");Ie(this,"options");Ie(this,"state");Ie(this,"tokenizer");Ie(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=i||qr,this.options.tokenizer=this.options.tokenizer||new Po,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const a={other:It,block:No.normal,inline:hi.normal};this.options.pedantic?(a.block=No.pedantic,a.inline=hi.pedantic):this.options.gfm&&(a.block=No.gfm,this.options.breaks?a.inline=hi.breaks:a.inline=hi.gfm),this.tokenizer.rules=a}static get rules(){return{block:No,inline:hi}}static lex(i,a){return new Oa(a).lex(i)}static lexInline(i,a){return new Oa(a).inlineTokens(i)}lex(i){i=i.replace(It.carriageReturn,`
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:a,tokens:this.lexer.inline(a)}}}text(s){const i=this.rules.block.text.exec(s);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(s){const i=this.rules.inline.escape.exec(s);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(s){const i=this.rules.inline.tag.exec(s);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(s){const i=this.rules.inline.link.exec(s);if(i){const a=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(a)){if(!this.rules.other.endAngleBracket.test(a))return;const h=mi(a.slice(0,-1),"\\");if((a.length-h.length)%2===0)return}else{const h=Im(i[2],"()");if(h===-2)return;if(h>-1){const v=(i[0].indexOf("!")===0?5:4)+i[1].length+h;i[2]=i[2].substring(0,h),i[0]=i[0].substring(0,v).trim(),i[3]=""}}let c=i[2],f="";if(this.options.pedantic){const h=this.rules.other.pedanticHrefTitle.exec(c);h&&(c=h[1],f=h[3])}else f=i[3]?i[3].slice(1,-1):"";return c=c.trim(),this.rules.other.startAngleBracket.test(c)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(a)?c=c.slice(1):c=c.slice(1,-1)),Bf(i,{href:c&&c.replace(this.rules.inline.anyPunctuation,"$1"),title:f&&f.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(s,i){let a;if((a=this.rules.inline.reflink.exec(s))||(a=this.rules.inline.nolink.exec(s))){const c=(a[2]||a[1]).replace(this.rules.other.multipleSpaceGlobal," "),f=i[c.toLowerCase()];if(!f){const h=a[0].charAt(0);return{type:"text",raw:h,text:h}}return Bf(a,f,a[0],this.lexer,this.rules)}}emStrong(s,i,a=""){let c=this.rules.inline.emStrongLDelim.exec(s);if(!c||c[3]&&a.match(this.rules.other.unicodeAlphaNumeric))return;if(!(c[1]||c[2]||"")||!a||this.rules.inline.punctuation.exec(a)){const h=[...c[0]].length-1;let w,v,_=h,k=0;const A=c[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(A.lastIndex=0,i=i.slice(-1*s.length+h);(c=A.exec(i))!=null;){if(w=c[1]||c[2]||c[3]||c[4]||c[5]||c[6],!w)continue;if(v=[...w].length,c[3]||c[4]){_+=v;continue}else if((c[5]||c[6])&&h%3&&!((h+v)%3)){k+=v;continue}if(_-=v,_>0)continue;v=Math.min(v,v+_+k);const F=[...c[0]][0].length,N=s.slice(0,h+c.index+F+v);if(Math.min(h,v)%2){const W=N.slice(1,-1);return{type:"em",raw:N,text:W,tokens:this.lexer.inlineTokens(W)}}const ee=N.slice(2,-2);return{type:"strong",raw:N,text:ee,tokens:this.lexer.inlineTokens(ee)}}}}codespan(s){const i=this.rules.inline.code.exec(s);if(i){let a=i[2].replace(this.rules.other.newLineCharGlobal," ");const c=this.rules.other.nonSpaceChar.test(a),f=this.rules.other.startingSpaceChar.test(a)&&this.rules.other.endingSpaceChar.test(a);return c&&f&&(a=a.substring(1,a.length-1)),{type:"codespan",raw:i[0],text:a}}}br(s){const i=this.rules.inline.br.exec(s);if(i)return{type:"br",raw:i[0]}}del(s){const i=this.rules.inline.del.exec(s);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(s){const i=this.rules.inline.autolink.exec(s);if(i){let a,c;return i[2]==="@"?(a=i[1],c="mailto:"+a):(a=i[1],c=a),{type:"link",raw:i[0],text:a,href:c,tokens:[{type:"text",raw:a,text:a}]}}}url(s){var a;let i;if(i=this.rules.inline.url.exec(s)){let c,f;if(i[2]==="@")c=i[0],f="mailto:"+c;else{let h;do h=i[0],i[0]=((a=this.rules.inline._backpedal.exec(i[0]))==null?void 0:a[0])??"";while(h!==i[0]);c=i[0],i[1]==="www."?f="http://"+i[0]:f=i[0]}return{type:"link",raw:i[0],text:c,href:f,tokens:[{type:"text",raw:c,text:c}]}}}inlineText(s){const i=this.rules.inline.text.exec(s);if(i){const a=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:a}}}},tr=class Oa{constructor(i){Ie(this,"tokens");Ie(this,"options");Ie(this,"state");Ie(this,"tokenizer");Ie(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=i||qr,this.options.tokenizer=this.options.tokenizer||new Po,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const a={other:It,block:No.normal,inline:hi.normal};this.options.pedantic?(a.block=No.pedantic,a.inline=hi.pedantic):this.options.gfm&&(a.block=No.gfm,this.options.breaks?a.inline=hi.breaks:a.inline=hi.gfm),this.tokenizer.rules=a}static get rules(){return{block:No,inline:hi}}static lex(i,a){return new Oa(a).lex(i)}static lexInline(i,a){return new Oa(a).inlineTokens(i)}lex(i){i=i.replace(It.carriageReturn,`
`),this.blockTokens(i,this.tokens);for(let a=0;a<this.inlineQueue.length;a++){const c=this.inlineQueue[a];this.inlineTokens(c.src,c.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,a=[],c=!1){var f,h,w;for(this.options.pedantic&&(i=i.replace(It.tabCharGlobal," ").replace(It.spaceLine,""));i;){let v;if((h=(f=this.options.extensions)==null?void 0:f.block)!=null&&h.some(k=>(v=k.call({lexer:this},i,a))?(i=i.substring(v.raw.length),a.push(v),!0):!1))continue;if(v=this.tokenizer.space(i)){i=i.substring(v.raw.length);const k=a.at(-1);v.raw.length===1&&k!==void 0?k.raw+=`
`:a.push(v);continue}if(v=this.tokenizer.code(i)){i=i.substring(v.raw.length);const k=a.at(-1);(k==null?void 0:k.type)==="paragraph"||(k==null?void 0:k.type)==="text"?(k.raw+=`
`+v.raw,k.text+=`
`+v.text,this.inlineQueue.at(-1).src=k.text):a.push(v);continue}if(v=this.tokenizer.fences(i)){i=i.substring(v.raw.length),a.push(v);continue}if(v=this.tokenizer.heading(i)){i=i.substring(v.raw.length),a.push(v);continue}if(v=this.tokenizer.hr(i)){i=i.substring(v.raw.length),a.push(v);continue}if(v=this.tokenizer.blockquote(i)){i=i.substring(v.raw.length),a.push(v);continue}if(v=this.tokenizer.list(i)){i=i.substring(v.raw.length),a.push(v);continue}if(v=this.tokenizer.html(i)){i=i.substring(v.raw.length),a.push(v);continue}if(v=this.tokenizer.def(i)){i=i.substring(v.raw.length);const k=a.at(-1);(k==null?void 0:k.type)==="paragraph"||(k==null?void 0:k.type)==="text"?(k.raw+=`
`+v.raw,k.text+=`
`+v.raw,this.inlineQueue.at(-1).src=k.text):this.tokens.links[v.tag]||(this.tokens.links[v.tag]={href:v.href,title:v.title});continue}if(v=this.tokenizer.table(i)){i=i.substring(v.raw.length),a.push(v);continue}if(v=this.tokenizer.lheading(i)){i=i.substring(v.raw.length),a.push(v);continue}let _=i;if((w=this.options.extensions)!=null&&w.startBlock){let k=1/0;const A=i.slice(1);let M;this.options.extensions.startBlock.forEach(L=>{M=L.call({lexer:this},A),typeof M=="number"&&M>=0&&(k=Math.min(k,M))}),k<1/0&&k>=0&&(_=i.substring(0,k+1))}if(this.state.top&&(v=this.tokenizer.paragraph(_))){const k=a.at(-1);c&&(k==null?void 0:k.type)==="paragraph"?(k.raw+=`
`+v.raw,this.inlineQueue.at(-1).src=k.text):this.tokens.links[v.tag]||(this.tokens.links[v.tag]={href:v.href,title:v.title});continue}if(v=this.tokenizer.table(i)){i=i.substring(v.raw.length),a.push(v);continue}if(v=this.tokenizer.lheading(i)){i=i.substring(v.raw.length),a.push(v);continue}let _=i;if((w=this.options.extensions)!=null&&w.startBlock){let k=1/0;const A=i.slice(1);let F;this.options.extensions.startBlock.forEach(N=>{F=N.call({lexer:this},A),typeof F=="number"&&F>=0&&(k=Math.min(k,F))}),k<1/0&&k>=0&&(_=i.substring(0,k+1))}if(this.state.top&&(v=this.tokenizer.paragraph(_))){const k=a.at(-1);c&&(k==null?void 0:k.type)==="paragraph"?(k.raw+=`
`+v.raw,k.text+=`
`+v.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=k.text):a.push(v),c=_.length!==i.length,i=i.substring(v.raw.length);continue}if(v=this.tokenizer.text(i)){i=i.substring(v.raw.length);const k=a.at(-1);(k==null?void 0:k.type)==="text"?(k.raw+=`
`+v.raw,k.text+=`
`+v.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=k.text):a.push(v);continue}if(i){const k="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw new Error(k)}}return this.state.top=!0,a}inline(i,a=[]){return this.inlineQueue.push({src:i,tokens:a}),a}inlineTokens(i,a=[]){var v,_,k;let c=i,f=null;if(this.tokens.links){const A=Object.keys(this.tokens.links);if(A.length>0)for(;(f=this.tokenizer.rules.inline.reflinkSearch.exec(c))!=null;)A.includes(f[0].slice(f[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,f.index)+"["+"a".repeat(f[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(f=this.tokenizer.rules.inline.anyPunctuation.exec(c))!=null;)c=c.slice(0,f.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(f=this.tokenizer.rules.inline.blockSkip.exec(c))!=null;)c=c.slice(0,f.index)+"["+"a".repeat(f[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let h=!1,w="";for(;i;){h||(w=""),h=!1;let A;if((_=(v=this.options.extensions)==null?void 0:v.inline)!=null&&_.some(L=>(A=L.call({lexer:this},i,a))?(i=i.substring(A.raw.length),a.push(A),!0):!1))continue;if(A=this.tokenizer.escape(i)){i=i.substring(A.raw.length),a.push(A);continue}if(A=this.tokenizer.tag(i)){i=i.substring(A.raw.length),a.push(A);continue}if(A=this.tokenizer.link(i)){i=i.substring(A.raw.length),a.push(A);continue}if(A=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(A.raw.length);const L=a.at(-1);A.type==="text"&&(L==null?void 0:L.type)==="text"?(L.raw+=A.raw,L.text+=A.text):a.push(A);continue}if(A=this.tokenizer.emStrong(i,c,w)){i=i.substring(A.raw.length),a.push(A);continue}if(A=this.tokenizer.codespan(i)){i=i.substring(A.raw.length),a.push(A);continue}if(A=this.tokenizer.br(i)){i=i.substring(A.raw.length),a.push(A);continue}if(A=this.tokenizer.del(i)){i=i.substring(A.raw.length),a.push(A);continue}if(A=this.tokenizer.autolink(i)){i=i.substring(A.raw.length),a.push(A);continue}if(!this.state.inLink&&(A=this.tokenizer.url(i))){i=i.substring(A.raw.length),a.push(A);continue}let M=i;if((k=this.options.extensions)!=null&&k.startInline){let L=1/0;const te=i.slice(1);let K;this.options.extensions.startInline.forEach($=>{K=$.call({lexer:this},te),typeof K=="number"&&K>=0&&(L=Math.min(L,K))}),L<1/0&&L>=0&&(M=i.substring(0,L+1))}if(A=this.tokenizer.inlineText(M)){i=i.substring(A.raw.length),A.raw.slice(-1)!=="_"&&(w=A.raw.slice(-1)),h=!0;const L=a.at(-1);(L==null?void 0:L.type)==="text"?(L.raw+=A.raw,L.text+=A.text):a.push(A);continue}if(i){const L="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(L);break}else throw new Error(L)}}return a}},Oo=class{constructor(s){Ie(this,"options");Ie(this,"parser");this.options=s||qr}space(s){return""}code({text:s,lang:i,escaped:a}){var h;const c=(h=(i||"").match(It.notSpaceStart))==null?void 0:h[0],f=s.replace(It.endingNewline,"")+`
`+v.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=k.text):a.push(v);continue}if(i){const k="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(k);break}else throw new Error(k)}}return this.state.top=!0,a}inline(i,a=[]){return this.inlineQueue.push({src:i,tokens:a}),a}inlineTokens(i,a=[]){var v,_,k;let c=i,f=null;if(this.tokens.links){const A=Object.keys(this.tokens.links);if(A.length>0)for(;(f=this.tokenizer.rules.inline.reflinkSearch.exec(c))!=null;)A.includes(f[0].slice(f[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,f.index)+"["+"a".repeat(f[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(f=this.tokenizer.rules.inline.anyPunctuation.exec(c))!=null;)c=c.slice(0,f.index)+"++"+c.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(f=this.tokenizer.rules.inline.blockSkip.exec(c))!=null;)c=c.slice(0,f.index)+"["+"a".repeat(f[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let h=!1,w="";for(;i;){h||(w=""),h=!1;let A;if((_=(v=this.options.extensions)==null?void 0:v.inline)!=null&&_.some(N=>(A=N.call({lexer:this},i,a))?(i=i.substring(A.raw.length),a.push(A),!0):!1))continue;if(A=this.tokenizer.escape(i)){i=i.substring(A.raw.length),a.push(A);continue}if(A=this.tokenizer.tag(i)){i=i.substring(A.raw.length),a.push(A);continue}if(A=this.tokenizer.link(i)){i=i.substring(A.raw.length),a.push(A);continue}if(A=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(A.raw.length);const N=a.at(-1);A.type==="text"&&(N==null?void 0:N.type)==="text"?(N.raw+=A.raw,N.text+=A.text):a.push(A);continue}if(A=this.tokenizer.emStrong(i,c,w)){i=i.substring(A.raw.length),a.push(A);continue}if(A=this.tokenizer.codespan(i)){i=i.substring(A.raw.length),a.push(A);continue}if(A=this.tokenizer.br(i)){i=i.substring(A.raw.length),a.push(A);continue}if(A=this.tokenizer.del(i)){i=i.substring(A.raw.length),a.push(A);continue}if(A=this.tokenizer.autolink(i)){i=i.substring(A.raw.length),a.push(A);continue}if(!this.state.inLink&&(A=this.tokenizer.url(i))){i=i.substring(A.raw.length),a.push(A);continue}let F=i;if((k=this.options.extensions)!=null&&k.startInline){let N=1/0;const ee=i.slice(1);let W;this.options.extensions.startInline.forEach(q=>{W=q.call({lexer:this},ee),typeof W=="number"&&W>=0&&(N=Math.min(N,W))}),N<1/0&&N>=0&&(F=i.substring(0,N+1))}if(A=this.tokenizer.inlineText(F)){i=i.substring(A.raw.length),A.raw.slice(-1)!=="_"&&(w=A.raw.slice(-1)),h=!0;const N=a.at(-1);(N==null?void 0:N.type)==="text"?(N.raw+=A.raw,N.text+=A.text):a.push(A);continue}if(i){const N="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(N);break}else throw new Error(N)}}return a}},Oo=class{constructor(s){Ie(this,"options");Ie(this,"parser");this.options=s||qr}space(s){return""}code({text:s,lang:i,escaped:a}){var h;const c=(h=(i||"").match(It.notSpaceStart))==null?void 0:h[0],f=s.replace(It.endingNewline,"")+`
`;return c?'<pre><code class="language-'+zn(c)+'">'+(a?f:zn(f,!0))+`</code></pre>
`:"<pre><code>"+(a?f:zn(f,!0))+`</code></pre>
`}blockquote({tokens:s}){return`<blockquote>
@@ -109,13 +109,13 @@ ${this.parser.parse(s)}</blockquote>
${s}</tr>
`}tablecell(s){const i=this.parser.parseInline(s.tokens),a=s.header?"th":"td";return(s.align?`<${a} align="${s.align}">`:`<${a}>`)+i+`</${a}>
`}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${zn(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:i,tokens:a}){const c=this.parser.parseInline(a),f=Ff(s);if(f===null)return c;s=f;let h='<a href="'+s+'"';return i&&(h+=' title="'+zn(i)+'"'),h+=">"+c+"</a>",h}image({href:s,title:i,text:a,tokens:c}){c&&(a=this.parser.parseInline(c,this.parser.textRenderer));const f=Ff(s);if(f===null)return zn(a);s=f;let h=`<img src="${s}" alt="${a}"`;return i&&(h+=` title="${zn(i)}"`),h+=">",h}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:zn(s.text)}},Ga=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return""+s}image({text:s}){return""+s}br(){return""}},nr=class Ma{constructor(i){Ie(this,"options");Ie(this,"renderer");Ie(this,"textRenderer");this.options=i||qr,this.options.renderer=this.options.renderer||new Oo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ga}static parse(i,a){return new Ma(a).parse(i)}static parseInline(i,a){return new Ma(a).parseInline(i)}parse(i,a=!0){var f,h;let c="";for(let w=0;w<i.length;w++){const v=i[w];if((h=(f=this.options.extensions)==null?void 0:f.renderers)!=null&&h[v.type]){const k=v,A=this.options.extensions.renderers[k.type].call({parser:this},k);if(A!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(k.type)){c+=A||"";continue}}const _=v;switch(_.type){case"space":{c+=this.renderer.space(_);continue}case"hr":{c+=this.renderer.hr(_);continue}case"heading":{c+=this.renderer.heading(_);continue}case"code":{c+=this.renderer.code(_);continue}case"table":{c+=this.renderer.table(_);continue}case"blockquote":{c+=this.renderer.blockquote(_);continue}case"list":{c+=this.renderer.list(_);continue}case"html":{c+=this.renderer.html(_);continue}case"paragraph":{c+=this.renderer.paragraph(_);continue}case"text":{let k=_,A=this.renderer.text(k);for(;w+1<i.length&&i[w+1].type==="text";)k=i[++w],A+=`
`+this.renderer.text(k);a?c+=this.renderer.paragraph({type:"paragraph",raw:A,text:A,tokens:[{type:"text",raw:A,text:A,escaped:!0}]}):c+=A;continue}default:{const k='Token with "'+_.type+'" type was not found.';if(this.options.silent)return console.error(k),"";throw new Error(k)}}}return c}parseInline(i,a=this.renderer){var f,h;let c="";for(let w=0;w<i.length;w++){const v=i[w];if((h=(f=this.options.extensions)==null?void 0:f.renderers)!=null&&h[v.type]){const k=this.options.extensions.renderers[v.type].call({parser:this},v);if(k!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(v.type)){c+=k||"";continue}}const _=v;switch(_.type){case"escape":{c+=a.text(_);break}case"html":{c+=a.html(_);break}case"link":{c+=a.link(_);break}case"image":{c+=a.image(_);break}case"strong":{c+=a.strong(_);break}case"em":{c+=a.em(_);break}case"codespan":{c+=a.codespan(_);break}case"br":{c+=a.br(_);break}case"del":{c+=a.del(_);break}case"text":{c+=a.text(_);break}default:{const k='Token with "'+_.type+'" type was not found.';if(this.options.silent)return console.error(k),"";throw new Error(k)}}}return c}},Na,Io=(Na=class{constructor(s){Ie(this,"options");Ie(this,"block");this.options=s||qr}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}provideLexer(){return this.block?tr.lex:tr.lexInline}provideParser(){return this.block?nr.parse:nr.parseInline}},Ie(Na,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Na),zm=class{constructor(...s){Ie(this,"defaults",ba());Ie(this,"options",this.setOptions);Ie(this,"parse",this.parseMarkdown(!0));Ie(this,"parseInline",this.parseMarkdown(!1));Ie(this,"Parser",nr);Ie(this,"Renderer",Oo);Ie(this,"TextRenderer",Ga);Ie(this,"Lexer",tr);Ie(this,"Tokenizer",Po);Ie(this,"Hooks",Io);this.use(...s)}walkTokens(s,i){var c,f;let a=[];for(const h of s)switch(a=a.concat(i.call(this,h)),h.type){case"table":{const w=h;for(const v of w.header)a=a.concat(this.walkTokens(v.tokens,i));for(const v of w.rows)for(const _ of v)a=a.concat(this.walkTokens(_.tokens,i));break}case"list":{const w=h;a=a.concat(this.walkTokens(w.items,i));break}default:{const w=h;(f=(c=this.defaults.extensions)==null?void 0:c.childTokens)!=null&&f[w.type]?this.defaults.extensions.childTokens[w.type].forEach(v=>{const _=w[v].flat(1/0);a=a.concat(this.walkTokens(_,i))}):w.tokens&&(a=a.concat(this.walkTokens(w.tokens,i)))}}return a}use(...s){const i=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(a=>{const c={...a};if(c.async=this.defaults.async||c.async||!1,a.extensions&&(a.extensions.forEach(f=>{if(!f.name)throw new Error("extension name required");if("renderer"in f){const h=i.renderers[f.name];h?i.renderers[f.name]=function(...w){let v=f.renderer.apply(this,w);return v===!1&&(v=h.apply(this,w)),v}:i.renderers[f.name]=f.renderer}if("tokenizer"in f){if(!f.level||f.level!=="block"&&f.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const h=i[f.level];h?h.unshift(f.tokenizer):i[f.level]=[f.tokenizer],f.start&&(f.level==="block"?i.startBlock?i.startBlock.push(f.start):i.startBlock=[f.start]:f.level==="inline"&&(i.startInline?i.startInline.push(f.start):i.startInline=[f.start]))}"childTokens"in f&&f.childTokens&&(i.childTokens[f.name]=f.childTokens)}),c.extensions=i),a.renderer){const f=this.defaults.renderer||new Oo(this.defaults);for(const h in a.renderer){if(!(h in f))throw new Error(`renderer '${h}' does not exist`);if(["options","parser"].includes(h))continue;const w=h,v=a.renderer[w],_=f[w];f[w]=(...k)=>{let A=v.apply(f,k);return A===!1&&(A=_.apply(f,k)),A||""}}c.renderer=f}if(a.tokenizer){const f=this.defaults.tokenizer||new Po(this.defaults);for(const h in a.tokenizer){if(!(h in f))throw new Error(`tokenizer '${h}' does not exist`);if(["options","rules","lexer"].includes(h))continue;const w=h,v=a.tokenizer[w],_=f[w];f[w]=(...k)=>{let A=v.apply(f,k);return A===!1&&(A=_.apply(f,k)),A}}c.tokenizer=f}if(a.hooks){const f=this.defaults.hooks||new Io;for(const h in a.hooks){if(!(h in f))throw new Error(`hook '${h}' does not exist`);if(["options","block"].includes(h))continue;const w=h,v=a.hooks[w],_=f[w];Io.passThroughHooks.has(h)?f[w]=k=>{if(this.defaults.async)return Promise.resolve(v.call(f,k)).then(M=>_.call(f,M));const A=v.call(f,k);return _.call(f,A)}:f[w]=(...k)=>{let A=v.apply(f,k);return A===!1&&(A=_.apply(f,k)),A}}c.hooks=f}if(a.walkTokens){const f=this.defaults.walkTokens,h=a.walkTokens;c.walkTokens=function(w){let v=[];return v.push(h.call(this,w)),f&&(v=v.concat(f.call(this,w))),v}}this.defaults={...this.defaults,...c}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,i){return tr.lex(s,i??this.defaults)}parser(s,i){return nr.parse(s,i??this.defaults)}parseMarkdown(s){return(a,c)=>{const f={...c},h={...this.defaults,...f},w=this.onError(!!h.silent,!!h.async);if(this.defaults.async===!0&&f.async===!1)return w(new Error("marked(): The async option was set to tLine truncated
`+this.renderer.text(k);a?c+=this.renderer.paragraph({type:"paragraph",raw:A,text:A,tokens:[{type:"text",raw:A,text:A,escaped:!0}]}):c+=A;continue}default:{const k='Token with "'+_.type+'" type was not found.';if(this.options.silent)return console.error(k),"";throw new Error(k)}}}return c}parseInline(i,a=this.renderer){var f,h;let c="";for(let w=0;w<i.length;w++){const v=i[w];if((h=(f=this.options.extensions)==null?void 0:f.renderers)!=null&&h[v.type]){const k=this.options.extensions.renderers[v.type].call({parser:this},v);if(k!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(v.type)){c+=k||"";continue}}const _=v;switch(_.type){case"escape":{c+=a.text(_);break}case"html":{c+=a.html(_);break}case"link":{c+=a.link(_);break}case"image":{c+=a.image(_);break}case"strong":{c+=a.strong(_);break}case"em":{c+=a.em(_);break}case"codespan":{c+=a.codespan(_);break}case"br":{c+=a.br(_);break}case"del":{c+=a.del(_);break}case"text":{c+=a.text(_);break}default:{const k='Token with "'+_.type+'" type was not found.';if(this.options.silent)return console.error(k),"";throw new Error(k)}}}return c}},Na,Io=(Na=class{constructor(s){Ie(this,"options");Ie(this,"block");this.options=s||qr}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}provideLexer(){return this.block?tr.lex:tr.lexInline}provideParser(){return this.block?nr.parse:nr.parseInline}},Ie(Na,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Na),zm=class{constructor(...s){Ie(this,"defaults",ba());Ie(this,"options",this.setOptions);Ie(this,"parse",this.parseMarkdown(!0));Ie(this,"parseInline",this.parseMarkdown(!1));Ie(this,"Parser",nr);Ie(this,"Renderer",Oo);Ie(this,"TextRenderer",Ga);Ie(this,"Lexer",tr);Ie(this,"Tokenizer",Po);Ie(this,"Hooks",Io);this.use(...s)}walkTokens(s,i){var c,f;let a=[];for(const h of s)switch(a=a.concat(i.call(this,h)),h.type){case"table":{const w=h;for(const v of w.header)a=a.concat(this.walkTokens(v.tokens,i));for(const v of w.rows)for(const _ of v)a=a.concat(this.walkTokens(_.tokens,i));break}case"list":{const w=h;a=a.concat(this.walkTokens(w.items,i));break}default:{const w=h;(f=(c=this.defaults.extensions)==null?void 0:c.childTokens)!=null&&f[w.type]?this.defaults.extensions.childTokens[w.type].forEach(v=>{const _=w[v].flat(1/0);a=a.concat(this.walkTokens(_,i))}):w.tokens&&(a=a.concat(this.walkTokens(w.tokens,i)))}}return a}use(...s){const i=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(a=>{const c={...a};if(c.async=this.defaults.async||c.async||!1,a.extensions&&(a.extensions.forEach(f=>{if(!f.name)throw new Error("extension name required");if("renderer"in f){const h=i.renderers[f.name];h?i.renderers[f.name]=function(...w){let v=f.renderer.apply(this,w);return v===!1&&(v=h.apply(this,w)),v}:i.renderers[f.name]=f.renderer}if("tokenizer"in f){if(!f.level||f.level!=="block"&&f.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const h=i[f.level];h?h.unshift(f.tokenizer):i[f.level]=[f.tokenizer],f.start&&(f.level==="block"?i.startBlock?i.startBlock.push(f.start):i.startBlock=[f.start]:f.level==="inline"&&(i.startInline?i.startInline.push(f.start):i.startInline=[f.start]))}"childTokens"in f&&f.childTokens&&(i.childTokens[f.name]=f.childTokens)}),c.extensions=i),a.renderer){const f=this.defaults.renderer||new Oo(this.defaults);for(const h in a.renderer){if(!(h in f))throw new Error(`renderer '${h}' does not exist`);if(["options","parser"].includes(h))continue;const w=h,v=a.renderer[w],_=f[w];f[w]=(...k)=>{let A=v.apply(f,k);return A===!1&&(A=_.apply(f,k)),A||""}}c.renderer=f}if(a.tokenizer){const f=this.defaults.tokenizer||new Po(this.defaults);for(const h in a.tokenizer){if(!(h in f))throw new Error(`tokenizer '${h}' does not exist`);if(["options","rules","lexer"].includes(h))continue;const w=h,v=a.tokenizer[w],_=f[w];f[w]=(...k)=>{let A=v.apply(f,k);return A===!1&&(A=_.apply(f,k)),A}}c.tokenizer=f}if(a.hooks){const f=this.defaults.hooks||new Io;for(const h in a.hooks){if(!(h in f))throw new Error(`hook '${h}' does not exist`);if(["options","block"].includes(h))continue;const w=h,v=a.hooks[w],_=f[w];Io.passThroughHooks.has(h)?f[w]=k=>{if(this.defaults.async)return Promise.resolve(v.call(f,k)).then(F=>_.call(f,F));const A=v.call(f,k);return _.call(f,A)}:f[w]=(...k)=>{let A=v.apply(f,k);return A===!1&&(A=_.apply(f,k)),A}}c.hooks=f}if(a.walkTokens){const f=this.defaults.walkTokens,h=a.walkTokens;c.walkTokens=function(w){let v=[];return v.push(h.call(this,w)),f&&(v=v.concat(f.call(this,w))),v}}this.defaults={...this.defaults,...c}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,i){return tr.lex(s,i??this.defaults)}parser(s,i){return nr.parse(s,i??this.defaults)}parseMarkdown(s){return(a,c)=>{const f={...c},h={...this.defaults,...f},w=this.onError(!!h.silent,!!h.async);if(this.defaults.async===!0&&f.async===!1)return w(new Error("marked(): The async option was set to tLine truncated
Please report this to https://github.com/markedjs/marked.`,s){const c="<p>An error occurred:</p><pre>"+zn(a.message+"",!0)+"</pre>";return i?Promise.resolve(c):c}if(i)return Promise.reject(a);throw a}}},Kr=new zm;function Re(s,i){return Kr.parse(s,i)}Re.options=Re.setOptions=function(s){return Kr.setOptions(s),Re.defaults=Kr.defaults,ld(Re.defaults),Re};Re.getDefaults=ba;Re.defaults=qr;Re.use=function(...s){return Kr.use(...s),Re.defaults=Kr.defaults,ld(Re.defaults),Re};Re.walkTokens=function(s,i){return Kr.walkTokens(s,i)};Re.parseInline=Kr.parseInline;Re.Parser=nr;Re.parser=nr.parse;Re.Renderer=Oo;Re.TextRenderer=Ga;Re.Lexer=tr;Re.lexer=tr.lex;Re.Tokenizer=Po;Re.Hooks=Io;Re.parse=Re;Re.options;Re.setOptions;Re.use;Re.walkTokens;Re.parseInline;nr.parse;tr.lex;const jo={items:[],running:!1,usage:null,streamKind:"",turnEnded:!1,model:"",permMode:""},Pm={approved:"已允许",denied:"已拒绝",timeout:"已超时(按拒绝处理)",cancelled:"已取消"};function Uf(s){switch(s){case"allowed":return"已允许";case"rejected":return"已拒绝";case"expired":return"(已过期)";default:return Pm[s]??s}}function Wf(s,i,a){const c=s.items.slice(),f=c[c.length-1];return s.streamKind===i&&f&&f.kind===i?c[c.length-1]={...f,text:f.text+a}:c.push({kind:i,text:a}),{...s,items:c,streamKind:i}}function Rr(s,i){return{...s,items:[...s.items,i],streamKind:""}}function Hf(s){return s.map(i=>i.kind==="perm"&&i.state==="open"?{...i,state:"expired"}:i)}function Om(s,i,a){const c=s.items.slice();for(let f=c.length-1;f>=0;f--){const h=c[f];if(!(h.kind!=="tool"||h.tcId!==i)){switch(a.kind){case"subagent_tool":{const w=(h.subItems??[]).slice(),v=w.findIndex(k=>k.id===a.id),_={id:a.id??String(w.length),title:a.title??"",status:a.status??"run"};v>=0?w[v]={..._,title:_.title||w[v].title}:w.push(_),c[f]={...h,subItems:w};break}case"output":c[f]={...h,lastLine:a.line};break;case"child_session":c[f]={...h,childSessionId:a.childSessionId};break}return{...s,items:c}}}return s}function Mm(s,i){var a,c;switch(i.sessionUpdate){case"agent_message_chunk":return Wf(s,"agent",((a=i.content)==null?void 0:a.text)??"");case"agent_thought_chunk":return Wf(s,"thought",((c=i.content)==null?void 0:c.text)??"");case"tool_call":return Rr(s,{kind:"tool",tcId:i.toolCallId??"",title:i.title||i.kind||"工具调用",status:"run",out:""});case"tool_call_update":{if(i.status==="in_progress")return i.progress?Om(s,i.toolCallId??"",i.progress):s;const f=s.items.slice();for(let h=f.length-1;h>=0;h--){const w=f[h];if(w.kind==="tool"&&w.tcId===i.toolCallId){const v=typeof i.rawOutput=="string"?i.rawOutput.split(`
`)[0].slice(0,160):"";f[h]={...w,status:i.status==="completed"?"ok":"fail",out:v,lastLine:void 0};break}}return{...s,items:f}}case"plan":{const f=s.items.slice();for(let h=f.length-1;h>=0;h--)if(f[h].kind==="plan")return f[h]={kind:"plan",entries:i.entries??[]},{...s,items:f,streamKind:""};return Rr(s,{kind:"plan",entries:i.entries??[]})}case"llm_call_retry":return Rr(s,{kind:"sys",text:`模型调用重试 #${i.attempt??"?"}: ${i.message??""}`});case"usage_update":return{...s,usage:{used:i.used??0,size:i.size??0}};case"compact_status":return Rr(s,{kind:"sys",text:i.status==="started"?"⟳ 上下文接近上限,正在压缩…":"⟳ 上下文压缩完成"});case"model_update":{const f=i.model??"";return{...Rr(s,{kind:"sys",text:`模型已切换为 ${f}`}),model:f}}case"permission_mode_update":{const f=i.mode??"default";return{...Rr(s,{kind:"sys",text:f==="yolo"?"⚡ 已开启 YOLO 模式:所有操作不再询问,直接执行":"已恢复默认权限模式"}),permMode:f}}default:return s}}function Dm(s,i){switch(i.type){case"task-started":return{...s,running:!0};case"task-ended":return{...s,running:!1,streamKind:"",turnEnded:!0,items:[...Hf(s.items),{kind:"sys",text:"— 本轮结束 —"}]};case"task-error":{const a=fi(i);return{...s,running:!1,streamKind:"",items:[...Hf(s.items),{kind:"sys",text:"✗ "+((a==null?void 0:a.error)||"未知错误"),error:!0}]}}case"user-input":{const a=fi(i);let c="";try{c=a!=null&&a.content?Fa(a.content):""}catch{c=(a==null?void 0:a.content)??""}return Rr(s,{kind:"user",text:c})}case"permission-req":{const a=fi(i);return a!=null&&a.id?Rr(s,{kind:"perm",id:a.id,title:a.title??"",tool:a.tool??"",state:"open"}):s}case"permission-resolved":{const a=fi(i);return a!=null&&a.id?{...s,items:s.items.map(c=>c.kind==="perm"&&c.id===a.id&&c.state==="open"?{...c,state:a.outcome??"expired"}:c)}:s}case"task-running":if(i.kind==="acp_event"){const a=fi(i);if(a!=null&&a.update)return Mm(s,a.update)}return s;default:return s}}function md(s,i){let a=s;for(const c of i)a=Dm(a,c);return a}function Fm(s,i,a){return{...s,items:s.items.map(c=>c.kind==="perm"&&c.id===i&&c.state==="open"?{...c,state:a?"allowed":"rejected"}:c)}}Re.setOptions({gfm:!0,breaks:!0});const Tt="ui-monospace,Menlo,monospace";function bm(s){const i=s.target.closest("a");if(!i)return;s.preventDefault();const a=i.getAttribute("href")||"";/^https?:/i.test(a)&&mh(a)}function Bm({text:s}){const i=G.useMemo(()=>Jh.sanitize(Re.parse(s,{async:!1})),[s]);return p.jsx("div",{className:"md",onClick:bm,dangerouslySetInnerHTML:{__html:i}})}const gi={padding:"8px 12px",fontSize:12.5,cursor:"pointer",whiteSpace:"nowrap",borderRadius:8,userSelect:"none"};function Vf({meta:s,active:i,onClick:a,onArchive:c,onDelete:f}){const[h,w]=G.useState(!1),[v,_]=G.useState("closed"),k=s.status==="running",A=k?{text:"运行中",color:"var(--amberT)"}:s.status==="error"?{text:"出错",color:"var(--err)"}:s.status==="interrupted"?{text:"已中断",color:"var(--t5)"}:{text:s.turns>0?s.turns+" 轮":"",color:"var(--t5)"},M=()=>_("closed");return p.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:[p.jsx("div",{className:"hv-cardh",title:s.workdir,onClick:a,style:{background:i?"var(--card2)":"transparent",borderRadius:10,padding:"9px 13px",cursor:"pointer"},children:p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:13,fontWeight:i?600:400,color:i?"var(--t1)":"var(--t3)",whiteSpace:"nowrap"},children:[p.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis"},children:s.title||"(未命名)"}),s.worktree&&p.jsx("span",{title:"隔离 worktree 会话",style:{flex:"none",fontSize:10,fontWeight:600,color:"var(--amberT)",background:"var(--amberBg)",borderRadius:5,padding:"1px 6px"},children:"隔离"}),h||v!=="closed"?p.jsx("span",{className:"hv-t1",title:"会话操作",onClick:L=>{L.stopPropagation(),_(v==="closed"?"open":"closed")},style:{marginLeft:"auto",flex:"none",fontSize:14,fontWeight:700,color:"var(--t4)",padding:"0 3px",cursor:"pointer"},children:"⋯"}):p.jsx("span",{style:{marginLeft:"auto",fontSize:11,fontWeight:400,color:A.color},children:A.text})]})}),v!=="closed"&&p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{position:"fixed",inset:0,zIndex:29},onClick:L=>{L.stopPropagation(),M()}}),p.jsx("div",{style:{position:"absolute",right:6,top:"85%",zIndex:30,background:"var(--pop)",border:"1px solid var(--line)",borderRadius:10,boxShadow:"var(--shadow)",padding:4,minWidth:150,animation:"mcin .15s ease"},onClick:L=>L.stopPropagation(),children:v==="open"?p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"hv-card",style:gi,onClick:()=>{M(),c()},children:s.archived?"取消归档":"归档"}),k?p.jsx("div",{style:{...gi,cursor:"default",color:"var(--t5)"},title:"运行中,请先停止",children:"删除"}):p.jsx("div",{className:"hv-card",style:{...gi,color:"var(--err)"},onClick:()=>_("confirm"),children:"删除"})]}):p.jsxs(p.Fragment,{children:[p.jsxs("div",{style:{padding:"8px 12px 4px",fontSizLine truncated
`)[0].slice(0,160):"";f[h]={...w,status:i.status==="completed"?"ok":"fail",out:v,lastLine:void 0};break}}return{...s,items:f}}case"plan":{const f=s.items.slice();for(let h=f.length-1;h>=0;h--)if(f[h].kind==="plan")return f[h]={kind:"plan",entries:i.entries??[]},{...s,items:f,streamKind:""};return Rr(s,{kind:"plan",entries:i.entries??[]})}case"llm_call_retry":return Rr(s,{kind:"sys",text:`模型调用重试 #${i.attempt??"?"}: ${i.message??""}`});case"usage_update":return{...s,usage:{used:i.used??0,size:i.size??0}};case"compact_status":return Rr(s,{kind:"sys",text:i.status==="started"?"⟳ 上下文接近上限,正在压缩…":"⟳ 上下文压缩完成"});case"model_update":{const f=i.model??"";return{...Rr(s,{kind:"sys",text:`模型已切换为 ${f}`}),model:f}}case"permission_mode_update":{const f=i.mode??"default";return{...Rr(s,{kind:"sys",text:f==="yolo"?"⚡ 已开启 YOLO 模式:所有操作不再询问,直接执行":"已恢复默认权限模式"}),permMode:f}}default:return s}}function Dm(s,i){switch(i.type){case"task-started":return{...s,running:!0};case"task-ended":return{...s,running:!1,streamKind:"",turnEnded:!0,items:[...Hf(s.items),{kind:"sys",text:"— 本轮结束 —"}]};case"task-error":{const a=fi(i);return{...s,running:!1,streamKind:"",items:[...Hf(s.items),{kind:"sys",text:"✗ "+((a==null?void 0:a.error)||"未知错误"),error:!0}]}}case"user-input":{const a=fi(i);let c="";try{c=a!=null&&a.content?Fa(a.content):""}catch{c=(a==null?void 0:a.content)??""}return Rr(s,{kind:"user",text:c})}case"permission-req":{const a=fi(i);return a!=null&&a.id?Rr(s,{kind:"perm",id:a.id,title:a.title??"",tool:a.tool??"",state:"open"}):s}case"permission-resolved":{const a=fi(i);return a!=null&&a.id?{...s,items:s.items.map(c=>c.kind==="perm"&&c.id===a.id&&c.state==="open"?{...c,state:a.outcome??"expired"}:c)}:s}case"task-running":if(i.kind==="acp_event"){const a=fi(i);if(a!=null&&a.update)return Mm(s,a.update)}return s;default:return s}}function md(s,i){let a=s;for(const c of i)a=Dm(a,c);return a}function Fm(s,i,a){return{...s,items:s.items.map(c=>c.kind==="perm"&&c.id===i&&c.state==="open"?{...c,state:a?"allowed":"rejected"}:c)}}Re.setOptions({gfm:!0,breaks:!0});const Tt="ui-monospace,Menlo,monospace";function bm(s){const i=s.target.closest("a");if(!i)return;s.preventDefault();const a=i.getAttribute("href")||"";/^https?:/i.test(a)&&mh(a)}function Bm({text:s}){const i=G.useMemo(()=>Jh.sanitize(Re.parse(s,{async:!1})),[s]);return p.jsx("div",{className:"md",onClick:bm,dangerouslySetInnerHTML:{__html:i}})}const gi={padding:"8px 12px",fontSize:12.5,cursor:"pointer",whiteSpace:"nowrap",borderRadius:8,userSelect:"none"};function Vf({meta:s,active:i,onClick:a,onArchive:c,onDelete:f}){const[h,w]=G.useState(!1),[v,_]=G.useState("closed"),[k,A]=G.useState({right:0}),F=s.status==="running",N=F?{text:"运行中",color:"var(--amberT)"}:s.status==="error"?{text:"出错",color:"var(--err)"}:s.status==="interrupted"?{text:"已中断",color:"var(--t5)"}:{text:s.turns>0?s.turns+" 轮":"",color:"var(--t5)"},ee=()=>_("closed");return p.jsxs("div",{style:{position:"relative"},onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:[p.jsx("div",{className:"hv-cardh",title:s.workdir,onClick:a,style:{background:i?"var(--card2)":"transparent",borderRadius:10,padding:"9px 13px",cursor:"pointer"},children:p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:13,fontWeight:i?600:400,color:i?"var(--t1)":"var(--t3)",whiteSpace:"nowrap"},children:[p.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis"},children:s.title||"(未命名)"}),s.worktree&&p.jsx("span",{title:"隔离 worktree 会话",style:{flex:"none",fontSize:10,fontWeight:600,color:"var(--amberT)",background:"var(--amberBg)",borderRadius:5,padding:"1px 6px"},children:"隔离"}),h||v!=="closed"?p.jsx("span",{className:"hv-t1",title:"会话操作",onClick:W=>{if(W.stopPropagation(),v!=="closed")return _("closed");const q=W.currentTarget.getBoundingClientRect(),ie=q.bottom+150>window.innerHeight;A({right:Math.max(8,window.innerWidth-q.right),...ie?{bottom:window.innerHeight-q.top+4}:{top:q.bottom+4}}),_("open")},style:{marginLeft:"auto",flex:"none",fontSize:14,fontWeight:700,color:"var(--t4)",padding:"0 3px",cursor:"pointer"},children:"⋯"}):p.jsx("span",{style:{marginLeft:"auto",fontSize:11,fontWeight:400,color:N.color},children:N.text})]})}),v!=="closed"&&p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{position:"fixed",inset:0,zIndex:29},onClick:W=>{W.stopPropagation(),ee()}}),p.jsx("div",{style:{position:"fixed",right:k.right,top:k.top,bottom:k.bottom,zIndex:30,background:"var(--pop)",border:"1px solid var(--line)",borderRadius:10,boxShadow:"var(--shadow)",padding:4,minWidth:150,animation:"mcin .15s ease"},onClick:W=>W.stopPropagation(),children:v==="open"?p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"hv-card",style:gi,onClick:()=>{ee(),c()},children:s.archived?"取消归档":"归档"}),F?p.jsx("div",{style:{...gi,cursor:"default",color:"varLine truncated
`)[0]||"…";return p.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[p.jsxs("div",{className:"hv-t3",onClick:()=>a(!i),style:{display:"flex",alignItems:"center",gap:9,fontSize:12,color:"var(--t4)",cursor:"pointer",whiteSpace:"nowrap",minWidth:0},children:[p.jsx("span",{style:{flex:"none"},children:"✦ 思考"}),p.jsxs("span",{style:{color:"var(--t5)",overflow:"hidden",textOverflow:"ellipsis"},children:["— ",c]}),p.jsx("span",{style:{color:"var(--t5)",flex:"none"},children:i?"▾":"▸"})]}),i&&p.jsx("div",{style:{borderLeft:"2px solid var(--line)",padding:"2px 0 2px 14px",fontSize:12.5,color:"var(--t4)",lineHeight:1.8,whiteSpace:"pre-wrap",animation:"mcin .2s ease"},children:s})]})}function Wm({entries:s}){const i=a=>a==="completed"?"☑":a==="in_progress"?"◐":"☐";return p.jsx("div",{style:{border:"1px solid var(--line)",borderRadius:14,background:"var(--card)",padding:"13px 16px",fontSize:12.5,display:"flex",flexDirection:"column",gap:4,animation:"mcin .25s ease"},children:s.map((a,c)=>p.jsxs("div",{style:{color:a.status==="completed"?"var(--t5)":a.status==="in_progress"?"var(--amberT)":"var(--t3)",textDecoration:a.status==="completed"?"line-through":"none"},children:[p.jsx("span",{style:{display:"inline-block",width:18},children:i(a.status)})," ",a.content]},c))})}function Qf(s){return s==="run"?"◌":s==="ok"?"✓":"✗"}const Yf=5;function Hm({item:s,radius:i,onOpenChild:a}){const c=s.subItems??[],f=c.length-Yf,h=s.title.indexOf(" "),w=h>0?s.title.slice(0,h):"",v=h>0?s.title.slice(h+1):s.title,_={display:"flex",gap:8,alignItems:"baseline",padding:"0 14px 7px 35px",font:"11.5px/1.7 "+Tt,color:"var(--t4)",whiteSpace:"nowrap",minWidth:0};return p.jsxs("div",{style:{background:"var(--card)",borderRadius:i,overflow:"hidden"},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"9px 14px",fontSize:12.5,whiteSpace:"nowrap",minWidth:0},children:[p.jsx("span",{style:{color:s.status==="run"?"var(--t4)":s.status==="ok"?"var(--ok)":"var(--err)",fontSize:11,flex:"none",display:"inline-block",animation:s.status==="run"?"mcspin 1s linear infinite":"none"},children:Qf(s.status)}),w&&p.jsx("span",{style:{color:"var(--t3)",flex:"none"},children:w}),p.jsx("span",{style:{font:"12px "+Tt,color:"var(--t1)",overflow:"hidden",textOverflow:"ellipsis"},children:v}),s.childSessionId&&a&&p.jsx("span",{className:"hv-t1",onClick:()=>a(s.childSessionId),style:{font:"11.5px "+Tt,color:"var(--amberT)",cursor:"pointer",flex:"none"},children:"查看子会话"}),s.out&&p.jsx("span",{style:{marginLeft:"auto",color:"var(--t5)",fontSize:11,flex:"none",maxWidth:"45%",overflow:"hidden",textOverflow:"ellipsis"},children:s.out})]}),f>0&&p.jsxs("div",{style:{..._,color:"var(--t5)"},children:[p.jsx("span",{style:{flex:"none"},children:"↳"}),"… 已省略前 ",f," 步"]}),c.slice(-Yf).map(k=>p.jsxs("div",{style:_,children:[p.jsx("span",{style:{color:"var(--t5)",flex:"none"},children:"↳"}),p.jsx("span",{style:{color:k.status==="run"?"var(--t4)":k.status==="ok"?"var(--ok)":"var(--err)",fontSize:10,flex:"none"},children:Qf(k.status)}),p.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",minWidth:0},children:k.title})]},k.id)),s.status==="run"&&s.lastLine&&p.jsxs("div",{style:{..._,display:"block",color:"var(--t5)",fontStyle:"italic",overflow:"hidden",textOverflow:"ellipsis",animation:"mcpulse 1.2s infinite"},children:["↳ ",s.lastLine]})]})}function Gf(s){switch(s){case"allowed":case"approved":return{text:"✓ 已允许",color:"var(--ok)"};case"rejected":case"denied":return{text:"✕ 已拒绝",color:"var(--err)"};case"timeout":return{text:"✕ "+Uf(s),color:"var(--err)"};default:return{text:Uf(s),color:"var(--t5)"}}}function Vm({item:s,onAnswer:i}){const a={padding:"7px 18px",background:"var(--card2)",color:"var(--t2)",borderRadius:9,cursor:"pointer"};return p.jsxs("div",{style:{border:"1px solid var(--amberBd)",borderRadius:14,background:"var(--amberBg)",padding:"15px 17px",maxWidth:540,animation:"mcin .25s ease"},children:[p.jsxs("div",{style:{fontSize:13,fontWeight:600,color:"var(--amberT)",whiteSpace:"nowrap"},children:["需要确认 · ",s.tool||"执行操作"]}),p.jsx("div",{style:{margin:"10px 0 12px",padding:"9px 13px",background:"var(--codeBg)",borderRadius:9,font:"12.5px "+Tt,color:"var(--t1)",wordBreak:"break-all"},children:s.title}),s.state==="open"?p.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",fontSize:12.5,fontWeight:600,flexWrap:"wrap"},children:[p.jsx("div",{className:"hv-op",onClick:()=>i(s.id,"allow"),style:{...a,background:"var(--amber)",color:"var(--onAmber)"},children:"允许"}),p.jsx("div",{className:"hv-cardh",onClick:()=>i(s.id,"always"),style:a,children:"本会话始终"}),p.jsx("div",{className:"hv-cardh",onClick:()=>i(s.id,"persist"),style:a,children:"此项目永久"}),p.jsx("div",{className:"hv-err",onClick:()=>i(s.id,"deny"),style:{padding:"7px 14px",color:"var(--t4)",borderRadius:9,cursor:"pointer"},children:"拒绝"}),p.jsx("Line truncated
`)){const h=f.match(/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);if(h){a=+h[1],c=+h[2],i.push({no:"",text:f,kind:"h"});continue}f.startsWith("diff ")||f.startsWith("index ")||f.startsWith("+++")||f.startsWith("---")||f.startsWith("new file")||f.startsWith("deleted file")||f.startsWith("similarity")||f.startsWith("rename")||f.startsWith("old mode")||f.startsWith("new mode")||(f.startsWith("+")?i.push({no:String(c++),text:f,kind:"add"}):f.startsWith("-")?i.push({no:String(a++),text:f,kind:"del"}):(i.push({no:String(c),text:f,kind:"ctx"}),a++,c++))}return i}function Gm({text:s}){const i=G.useMemo(()=>Ym(s),[s]);return i.some(a=>a.kind==="h")?p.jsx("div",{style:{font:"12px/1.9 "+Tt},children:i.map((a,c)=>a.kind==="h"?p.jsxs("div",{style:{display:"flex",padding:"2px 24px",background:"var(--card)",color:"var(--t4)",fontSize:11},children:[p.jsx("span",{style:{width:36,flex:"none"}}),p.jsx("span",{style:{whiteSpace:"pre-wrap",wordBreak:"break-all"},children:a.text})]},c):p.jsxs("div",{style:{display:"flex",padding:"0 24px",background:a.kind==="add"?"var(--addBg)":a.kind==="del"?"var(--delBg)":"transparent",color:a.kind==="add"?"var(--addT)":a.kind==="del"?"var(--delT)":"var(--t3)"},children:[p.jsx("span",{style:{width:36,color:"var(--t5)",flex:"none",opacity:.6},children:a.no}),p.jsx("span",{style:{whiteSpace:"pre-wrap",wordBreak:"break-all",minWidth:0},children:a.text||" "})]},c))}):p.jsx("pre",{style:{margin:0,padding:"10px 24px",font:"12px/1.9 "+Tt,color:"var(--t4)",whiteSpace:"pre-wrap"},children:s})}const Kf="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAqiklEQVR42u1dB3xUVfb+3ps+kx5CCB0EEQVlBZUiglRhseEq6toLKLpiZ1fR1cX2d1fXhoKKYGFRRFBUiiIiAgqKIlV6JwkJKZNMy5T3/+59byaTELDsRorv5je/STJvXrnn3FO/c65V44A5frfDak6ByQDmMBnAHCYDmMNkAHOYDGAOkwHMYTKAOUwGMIfJAOYwGcAcJgOYw2QAc5gMYA6TAcxhMoA5TAYwh8kA5jAZwBwmA5jDZABzmAxgDpMBzGEywDE0NPnSEu9iKPwRw2K8mwxwjBE8ZpBcJYFVSe44oZVj/vmV32NlkCB2lC9B6NqruioWxY6IF1sjpdgaLsPOmA+bouXo726BEe6O8rvKMcQYvxsGEA8Z5VqvTXRvLISVwX1YEtiDryKF2IBy7LL6ELBEKfN5nC8IBMKUlXbsbnwjmlhSpcRQjxEmOOZVgCCWeFlJMvESIz9Sic99u/BR1TZ8qRVgt5VEtsb0L5SFoe71wrFrP9Q1e6F2bgVfzxboFs6WxE+2CUwGOMIJL34sJLpYrYFYBB/7t2Cqbz3mR/PhdZLgNj5+sQ/29QWwfLMN2ood0DYWQiuqAMorEXM5EPt8NEVHBPdmnKarCC1KwaBAyk3yQdxm0I5SqWA9Ngkft9gVbImUYVL5akwNbsFWhx+w89OCStjn7YIyfz2wbDPA1R6rophXKCFs/KbLptv/Dw9F1QmZONuXgws8beT57YqlTvtQZ4Kjz2y0HmuGXVzMr64qwtOl32JaZCv8Hk0sVTiW7Iby4ffQFqwDduwnt1AKOO36y+OAEtMkBbWyAJQebRG6tBPc+yN4tdnAhOrID1fSOCzHFhqIO2IV2KFVYq/mw6MZPTDY0fKosw+OCQaIcNp1Ha9gY1Up/lG6BP+JbIbmtsJSGYVrxmpoU79CjCIeVREobhI83SUtQ00QnfJciRq2cESTn0X/fh7/H0VezIWHSxfj+1gR9ighlFjD+jIX0kLoAZ/4O4h3rJtMBjhc4l4Qv5zW/MOlSzHOtxpVKfTny6pgf20ZtClfQ9tQwINoDaToKx0kuhaNIS6zlTi9LCSqtxLR0YMQ6dsOln2V2JKicbVvAPwRYL8f6s5SWHeWQd1eBmVbMZTRA+A/LhPDnMcdlQai9Whf9WK8XbkedxZ/gfyUKggN7ZhAor+6CNhaBNVBome4DY6JGQ6hoauVmlpcfmSzQfmO9sFHqwAS2rqpCJYtJPTOItoOXnoJtCMiZD0tAK1rR4RaN0DbSCoGeFrKs6gmA/w2/rwgflE0gBH7PsHMyCYgzQPHp9uBxz8CftgBxcmVnunhwfyGWO3KoQhjfCbUAdWDZeFGqAt+1L8nrqiq0IRxSCkiPtcYH1AqyHx/6Stn8HbnyfJ+glQZzriRaDJA/Yh8IWLFZM8ObMPVRXNQ7IrBXkQijf4PtGkrSCsSJjNFJ3wkVot1fs5FBBPYDAmhJHhD2AqJmFlFCFrHJogOOIG/+7EzrULemyB+VNoAR48qUI8W4kcN40pM65jSL/HHohkoTlfhmPMjtCH/hjJ1OZQUp1yhkvDJAU7l4NKk5m9anNOMV0yXAtGk80k1wVVeWEFvYj2sqan4v/D3aLvjNczybZHup/iJQjNDwf9L4luMSb0kfxZmRDfCYnFCHTsbykufQ3FQkLl0witxUa/8tCo5hDI4+PGaIRkiUelRRPueCMsd5yDUJZf2QSVGpnXBCzn95HmS7RSTAf5L4vu0MPrvnY6vrIWw0zfXbp4MZdEGKGkp1aJb0uanGeDnPLBysOPjf8TVgzegM9/IPojeMYBepB9dYjn4sPFFaGTx8G8ygaKaDPBrdb4Q+34tgp6738Z3jhI4t3oRveplqJv26da9WIlJ5FKkMa8TR/kvGODnco9C11ETqsLrQ/TME2B77koE8uxo4rdjcYs/o6Ul7YhmgiOWAZLDqn33vocF6h44tnkRu/gFJmvK9UBOOFrTn1Nqrd/6ZAKl1omsJHCpD7Hm2bBMGo5gx2w0DzixrOnlaKS6E5LMNAJ/weoX45biBVig7IKjIIDY5S9ByacvnuasSXyltsjXfpGI/9USIPl3IYnodqp7yxC79AU4V5VgpzOIAbunISQSSLxi7Ag0DNUjNcgjJmxK5Qa8GPgOtgjdq+GToGxn/D7VCa2Ge3cIa007NCsoP4cRtFqvg/KYYRjSE1EYLIpd+RJc2yqxWi3GNYVz/nup83thgHjuvoBInL+Ufs4JTYX24Eyo32xJ0vl1hPK0A725/2rWtV/xXRoginAZBRMUliEy8nU4ww68HVyPNyrXSaaOIGYywM+RsH/dvwSlKVHYZ62FOnkpxX6KLvZxYFBPonwsFlitZB2+i2CQRRV/W+T/D7XOtZ8gvKoqifOI88pzx6+lqjWMz4RGIhMoGR5YvtuK2NhZZNw03L5/IQpjfsncR5IqOKKMwLih9F3VPnQueheWML2Ac/4JhbF4MEcvXL1k4gsCKLSuA8EgtJDf+K9Fhm71uH9U8rjVzTCxg+AO4v2SH1c7hIQQRBbHB/0i9l9loD+sOqWjYf2LFjtcHup9egLRaLROiaBVhhikGolgr2a4UW2Plxv0P6LiA0dkKPjpiu+44u2wPrOQmby9tPhTddGvVBvgFq5Av89HqRBCi+PaonfPHuhyaie0aN4MLpcLPn62Zes2fLX8WyxavBT79u6GxZXCzxyIRKK1iK/VYCox/GUlRH840LnzqTirRzd0POlENM5rJKXNvqIirPtxA77geb9a9g20cBiejHQyTExnsPjpVF0saE/PgbXbSLweXYe70jujnS3riEkbW48UHH6MEyd85c0EW0wP79QNqUlfQCER9KRMtagVRBIEat/hZPztnjtwwZDBSM1qeBA/jVHbPTvw5n/ewdPPv4j8XbvgyczkitXRgjUmg6Le52Nghyv/kksvxaiRw9G9K6FgNg+qY8RJmjMWxJLFX+HRJ5/GnI/nwMGwsIX3FtOM44QqoD0Q+3oLrPPWInhBO7xYvhLPNuhTIzZwOBnhsKgAHYsfk0Sq7Rs/WfoNRivLYX9nJXDT6zLLl8wAgvjBinLcPPJmPPPPx2B3p1MK+BDhKhSPoiTpiPjfVifdRtWJ/QW7Mere+zDlzbfgTMvQWc94fKHTfaVlaNW2DSY8/2/0HzhIN0lDFVJiSAPPsDh06aHpdoEzRf7vxXEv4La7/0aciIUZZYsONBGHSYwBmapXe4TfJqq4yorNTa6thpYleT7xuoRjWgLE9bzFWEUVBHLsDHv5HkYGiTQrQIyegxM4e/UBGTUx4QFvKR4ZOxb3jxlDwleiykeAhiVu7B3Es6iqIhH9yG6YjbfeeAOndOyAe/82Bk7qb2lAipVfWoIze/fGrHfeQmbDxuSpUsk8usF3cH0Line truncated
`)){const f=c.indexOf("=");if(f<=0)continue;const h=c.slice(0,f).trim();h&&(i[h]=c.slice(f+1).trim(),a++)}return a?i:void 0}const Km=s=>s&&typeof s=="object"?Object.entries(s).map(([i,a])=>`${i}=${String(a)}`).join(`
`):"";function qm(s){const i={};for(const a of s){const c=a.name.trim();if(c)if(a.type==="stdio"){if(!a.command.trim())continue;const f=a.args.trim()?a.args.trim().split(/\s+/):void 0;i[c]={command:a.command.trim(),args:f,env:qf(a.kv)}}else{if(!a.url.trim())continue;i[c]={url:a.url.trim(),headers:qf(a.kv)}}}return i}function Xm(s){return Object.entries(s).map(([i,a])=>{const c=a??{},f=typeof c.command=="string"&&c.command!=="";return{name:i,type:f?"stdio":"http",url:typeof c.url=="string"?c.url:"",command:typeof c.command=="string"?c.command:"",args:Array.isArray(c.args)?c.args.map(String).join(" "):"",kv:Km(f?c.env:c.headers)}})}const Cl={width:588,maxWidth:"100%",background:"var(--card)",border:"1px solid var(--line)",borderRadius:16,padding:18,boxSizing:"border-box"},er={width:"100%",background:"var(--codeBg)",border:"1px solid var(--line)",borderRadius:9,padding:"8px 11px",font:"11.5px "+Tt,color:"var(--t1)",outline:"none",minWidth:0,boxSizing:"border-box"},Xf={background:"var(--codeBg)",border:"1px solid var(--line)",borderRadius:9,padding:"8px 8px",fontSize:12,color:"var(--t1)",outline:"none",cursor:"pointer"},_a={padding:"7px 14px",background:"var(--card2)",borderRadius:9,cursor:"pointer",fontSize:12,fontWeight:600,color:"var(--t2)",whiteSpace:"nowrap",userSelect:"none"};function Cn({label:s,children:i}){return p.jsxs("div",{style:{flex:1,minWidth:0},children:[p.jsx("div",{style:{fontSize:11,color:"var(--t4)",marginBottom:4},children:s}),i]})}function Jm(){try{return localStorage.getItem("mc.theme")==="light"?"light":"dark"}catch{return"dark"}}function Zm(s){document.documentElement.classList.toggle("light",s==="light");try{localStorage.setItem("mc.theme",s)}catch{}}function $m(){const[s,i]=G.useState(Jm()),a=f=>{Zm(f),i(f)},c=(f,h)=>p.jsx("div",{onClick:()=>a(f),style:{padding:"6px 18px",fontSize:12.5,fontWeight:600,borderRadius:8,cursor:"pointer",userSelect:"none",background:s===f?"var(--amber)":"transparent",color:s===f?"var(--onAmber)":"var(--t3)"},children:h});return p.jsxs("div",{style:{display:"inline-flex",background:"var(--card)",borderRadius:10,padding:3,gap:2},children:[c("dark","深色"),c("light","浅色")]})}const Jf=()=>({name:"",provider:"anthropic",base_url:"",api_key:"",model:""}),eg=()=>({name:"",type:"http",url:"",command:"",args:"",kv:""});function tg({onClose:s}){const i=Ia(),[a,c]=G.useState([]),[f,h]=G.useState(0),[w,v]=G.useState([]),[_,k]=G.useState(!1),[A,M]=G.useState(""),[L,te]=G.useState(!1);G.useEffect(()=>{i&&ph().then(Q=>{const W=(Q==null?void 0:Q.models)??[];c(W.length?W:[Jf()]),h(Math.max(0,W.findIndex(X=>X.default))),v(Xm((Q==null?void 0:Q.mcp_servers)??{})),k(!0)}).catch(Q=>M("读取配置失败: "+(Q instanceof Error?Q.message:String(Q))))},[i]);const K=(Q,W)=>c(X=>X.map((ie,fe)=>fe===Q?{...ie,...W}:ie)),$=(Q,W)=>v(X=>X.map((ie,fe)=>fe===Q?{...ie,...W}:ie)),se=async()=>{for(const W of a)if(!W.name.trim()||!W.base_url.trim()||!W.api_key.trim()||!W.model.trim()){M(`模型「${W.name.trim()||"未命名"}」信息不完整(需名称/接口地址/API Key/模型标识)`);return}const Q=new Set;for(const W of a){if(Q.has(W.name.trim())){M(`模型名称重复: ${W.name.trim()}`);return}Q.add(W.name.trim())}M(""),te(!0);try{await hh({models:a.map((W,X)=>({...W,name:W.name.trim(),default:X===f})),mcp_servers:qm(w)})}catch(W){M(W instanceof Error?W.message:String(W)),te(!1)}};return p.jsx("div",{style:{flex:1,overflowY:"auto",animation:"mcin .25s ease"},children:p.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:14,padding:"40px 24px 60px"},children:[p.jsxs("div",{style:{width:588,maxWidth:"100%",display:"flex",alignItems:"center"},children:[p.jsx("div",{style:{fontSize:18,fontWeight:700,color:"var(--t1)",letterSpacing:"-.01em"},children:"设置"}),p.jsx("div",{className:"hv-cardh",onClick:s,style:{..._a,marginLeft:"auto"},children:"返回"})]}),p.jsx("div",{style:{width:588,maxWidth:"100%",display:"flex",alignItems:"center",marginTop:6},children:p.jsx("span",{style:{font:"600 10.5px system-ui",color:"var(--t4)",letterSpacing:".1em"},children:"外观"})}),p.jsxs("div",{style:{...Cl,display:"flex",alignItems:"center",gap:12},children:[p.jsx($m,{}),p.jsx("span",{style:{fontSize:12,color:"var(--t5)"},children:"跟随本机保存,重启后保持。"})]}),!i&&p.jsx("div",{style:{...Cl,color:"var(--t4)",fontSize:12.5,lineHeight:1.7},children:"浏览器模式下配置只读:模型与 MCP 由启动 mc-agent 的宿主(桌面应用或环境变量)管理。"}),i&&!_&&!A&&p.jsx("div",{style:{fontSize:12.5,color:"var(--t5)"},children:"读取配置中…"}),i&&_&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{style:{width:588,maxWidth:"100%",display:"flex",alignItems:"center",marginTop:6},children:[p.jsx("span",{style:{font:"600 10.5px system-ui",color:"var(--t4)",letterSpacing:".1em"},children:"模型"}),p.jsx("div",{className:"hv-cardh",onClick:()=>c(Q=>[...Q,Jf()]),style:{..._a,marginLeft:"auto",padding:"4px 10px"},children:"+ 添加模型"})]}),a.length==Line truncated
`):"";function qm(s){const i={};for(const a of s){const c=a.name.trim();if(c)if(a.type==="stdio"){if(!a.command.trim())continue;const f=a.args.trim()?a.args.trim().split(/\s+/):void 0;i[c]={command:a.command.trim(),args:f,env:qf(a.kv)}}else{if(!a.url.trim())continue;i[c]={url:a.url.trim(),headers:qf(a.kv)}}}return i}function Xm(s){return Object.entries(s).map(([i,a])=>{const c=a??{},f=typeof c.command=="string"&&c.command!=="";return{name:i,type:f?"stdio":"http",url:typeof c.url=="string"?c.url:"",command:typeof c.command=="string"?c.command:"",args:Array.isArray(c.args)?c.args.map(String).join(" "):"",kv:Km(f?c.env:c.headers)}})}const Cl={width:588,maxWidth:"100%",background:"var(--card)",border:"1px solid var(--line)",borderRadius:16,padding:18,boxSizing:"border-box"},er={width:"100%",background:"var(--codeBg)",border:"1px solid var(--line)",borderRadius:9,padding:"8px 11px",font:"11.5px "+Tt,color:"var(--t1)",outline:"none",minWidth:0,boxSizing:"border-box"},Xf={background:"var(--codeBg)",border:"1px solid var(--line)",borderRadius:9,padding:"8px 8px",fontSize:12,color:"var(--t1)",outline:"none",cursor:"pointer"},_a={padding:"7px 14px",background:"var(--card2)",borderRadius:9,cursor:"pointer",fontSize:12,fontWeight:600,color:"var(--t2)",whiteSpace:"nowrap",userSelect:"none"};function Cn({label:s,children:i}){return p.jsxs("div",{style:{flex:1,minWidth:0},children:[p.jsx("div",{style:{fontSize:11,color:"var(--t4)",marginBottom:4},children:s}),i]})}function Jm(){try{return localStorage.getItem("mc.theme")==="light"?"light":"dark"}catch{return"dark"}}function Zm(s){document.documentElement.classList.toggle("light",s==="light");try{localStorage.setItem("mc.theme",s)}catch{}}function $m(){const[s,i]=G.useState(Jm()),a=f=>{Zm(f),i(f)},c=(f,h)=>p.jsx("div",{onClick:()=>a(f),style:{padding:"6px 18px",fontSize:12.5,fontWeight:600,borderRadius:8,cursor:"pointer",userSelect:"none",background:s===f?"var(--amber)":"transparent",color:s===f?"var(--onAmber)":"var(--t3)"},children:h});return p.jsxs("div",{style:{display:"inline-flex",background:"var(--card)",borderRadius:10,padding:3,gap:2},children:[c("dark","深色"),c("light","浅色")]})}const Jf=()=>({name:"",provider:"anthropic",base_url:"",api_key:"",model:""}),eg=()=>({name:"",type:"http",url:"",command:"",args:"",kv:""});function tg({onClose:s}){const i=Ia(),[a,c]=G.useState([]),[f,h]=G.useState(0),[w,v]=G.useState([]),[_,k]=G.useState(!1),[A,F]=G.useState(""),[N,ee]=G.useState(!1);G.useEffect(()=>{i&&ph().then(Y=>{const H=(Y==null?void 0:Y.models)??[];c(H.length?H:[Jf()]),h(Math.max(0,H.findIndex(J=>J.default))),v(Xm((Y==null?void 0:Y.mcp_servers)??{})),k(!0)}).catch(Y=>F("读取配置失败: "+(Y instanceof Error?Y.message:String(Y))))},[i]);const W=(Y,H)=>c(J=>J.map((oe,fe)=>fe===Y?{...oe,...H}:oe)),q=(Y,H)=>v(J=>J.map((oe,fe)=>fe===Y?{...oe,...H}:oe)),ie=async()=>{for(const H of a)if(!H.name.trim()||!H.base_url.trim()||!H.api_key.trim()||!H.model.trim()){F(`模型「${H.name.trim()||"未命名"}」信息不完整(需名称/接口地址/API Key/模型标识)`);return}const Y=new Set;for(const H of a){if(Y.has(H.name.trim())){F(`模型名称重复: ${H.name.trim()}`);return}Y.add(H.name.trim())}F(""),ee(!0);try{await hh({models:a.map((H,J)=>({...H,name:H.name.trim(),default:J===f})),mcp_servers:qm(w)})}catch(H){F(H instanceof Error?H.message:String(H)),ee(!1)}};return p.jsx("div",{style:{flex:1,overflowY:"auto",animation:"mcin .25s ease"},children:p.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:14,padding:"40px 24px 60px"},children:[p.jsxs("div",{style:{width:588,maxWidth:"100%",display:"flex",alignItems:"center"},children:[p.jsx("div",{style:{fontSize:18,fontWeight:700,color:"var(--t1)",letterSpacing:"-.01em"},children:"设置"}),p.jsx("div",{className:"hv-cardh",onClick:s,style:{..._a,marginLeft:"auto"},children:"返回"})]}),p.jsx("div",{style:{width:588,maxWidth:"100%",display:"flex",alignItems:"center",marginTop:6},children:p.jsx("span",{style:{font:"600 10.5px system-ui",color:"var(--t4)",letterSpacing:".1em"},children:"外观"})}),p.jsxs("div",{style:{...Cl,display:"flex",alignItems:"center",gap:12},children:[p.jsx($m,{}),p.jsx("span",{style:{fontSize:12,color:"var(--t5)"},children:"跟随本机保存,重启后保持。"})]}),!i&&p.jsx("div",{style:{...Cl,color:"var(--t4)",fontSize:12.5,lineHeight:1.7},children:"浏览器模式下配置只读:模型与 MCP 由启动 mc-agent 的宿主(桌面应用或环境变量)管理。"}),i&&!_&&!A&&p.jsx("div",{style:{fontSize:12.5,color:"var(--t5)"},children:"读取配置中…"}),i&&_&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{style:{width:588,maxWidth:"100%",display:"flex",alignItems:"center",marginTop:6},children:[p.jsx("span",{style:{font:"600 10.5px system-ui",color:"var(--t4)",letterSpacing:".1em"},children:"模型"}),p.jsx("div",{className:"hv-cardh",onClick:()=>c(Y=>[...Y,Jf()]),style:{..._a,marginLeft:"auto",padding:"4px 10px"},children:"+ 添加模型"})]}),a.length==Line truncated
<style rel="stylesheet" crossorigin>:root{--bg: #131316;--side: #0e0e10;--card: rgba(255, 255, 255, .04);--card2: rgba(255, 255, 255, .07);--cardh: rgba(255, 255, 255, .09);--line: rgba(255, 255, 255, .05);--t1: #fafafa;--t2: #d8d8de;--t3: #a1a1ac;--t4: #71717c;--t5: #55555e;--amber: #10b981;--amberT: #34d399;--amberBg: rgba(16, 185, 129, .08);--amberBd: rgba(16, 185, 129, .28);--ok: #34d399;--err: #f87171;--onAmber: #04130c;--codeBg: rgba(0, 0, 0, .35);--addBg: rgba(52, 211, 153, .07);--addT: #9fe8c9;--delBg: rgba(248, 113, 113, .08);--delT: #f0a8a8;--pop: #1b1b1f;--shadow: 0 24px 64px rgba(0, 0, 0, .55)}:root.light{--bg: #f7f6f4;--side: #efedea;--card: rgba(0, 0, 0, .04);--card2: rgba(0, 0, 0, .07);--cardh: rgba(0, 0, 0, .09);--line: rgba(0, 0, 0, .06);--t1: #1f1d1a;--t2: #44413c;--t3: #6b665e;--t4: #8f8a82;--t5: #b3ada3;--amber: #059669;--amberT: #047857;--amberBg: rgba(5, 150, 105, .09);--amberBd: rgba(5, 150, 105, .3);--ok: #16a34a;--err: #dc2626;--onAmber: #fff;--codeBg: rgba(0, 0, 0, .05);--addBg: rgba(22, 163, 74, .08);--addT: #15803d;--delBg: rgba(220, 38, 38, .07);--delT: #b91c1c;--pop: #ffffff;--shadow: 0 24px 64px rgba(0, 0, 0, .18)}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;font-family:system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif;background:var(--bg);color:var(--t2);font-size:13.5px}a{color:var(--amberT)}a:hover{color:var(--amber)}input,textarea,select,button{font-family:inherit}::placeholder{color:var(--t5)}@keyframes mcspin{to{transform:rotate(360deg)}}@keyframes mcpulse{0%,to{opacity:1}50%{opacity:.35}}@keyframes mcin{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}@keyframes mcslide{0%{transform:translate(40px);opacity:0}to{transform:none;opacity:1}}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#ffffff24;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#ffffff3d}*{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.14) transparent}:root.light ::-webkit-scrollbar-thumb{background:#00000024}:root.light ::-webkit-scrollbar-thumb:hover{background:#0000003d}:root.light *{scrollbar-color:rgba(0,0,0,.14) transparent}.hv-card:hover{background:var(--card)!important}.hv-card2:hover{background:var(--card2)!important}.hv-cardh:hover{background:var(--cardh)!important}.hv-t1:hover{color:var(--t1)!important}.hv-t3:hover{color:var(--t3)!important}.hv-err:hover{color:var(--err)!important}.hv-op:hover{opacity:.85}.md>:first-child{margin-top:0}.md>:last-child{margin-bottom:0}.md pre{background:var(--codeBg);border-radius:9px;padding:10px 14px;overflow-x:auto;font:12px/1.7 ui-monospace,Menlo,monospace}.md code{background:var(--card2);border-radius:4px;padding:1px 5px;font-family:ui-monospace,Menlo,monospace;font-size:12px}.md pre code{background:transparent;padding:0}.md table{border-collapse:collapse}.md th,.md td{border:1px solid var(--line);padding:4px 10px}.md blockquote{border-left:3px solid var(--line);margin-left:0;padding-left:12px;color:var(--t4)}select option{background:var(--pop);color:var(--t1)}</style>
</head>
<body>
+15 -4
View File
@@ -60,6 +60,9 @@ export function SessionRow({
}) {
const [hover, setHover] = useState(false); // WKWebView 的 CSS :hover 不可靠,用状态控制
const [menu, setMenu] = useState<"closed" | "open" | "confirm">("closed");
// 菜单以 fixed 定位(脱离侧栏滚动容器的裁剪),按 ⋯ 的视口位置计算;
// 底部空间不足(列表末尾几行)时向上弹,避免被视口/状态栏遮住
const [pos, setPos] = useState<{ right: number; top?: number; bottom?: number }>({ right: 0 });
const running = meta.status === "running";
const m = running
? { text: "运行中", color: "var(--amberT)" }
@@ -120,7 +123,14 @@ export function SessionRow({
title="会话操作"
onClick={(e) => {
e.stopPropagation();
setMenu(menu === "closed" ? "open" : "closed");
if (menu !== "closed") return setMenu("closed");
const r = (e.currentTarget as HTMLElement).getBoundingClientRect();
const up = r.bottom + 150 > window.innerHeight; // 预估菜单高度(确认态更高)
setPos({
right: Math.max(8, window.innerWidth - r.right),
...(up ? { bottom: window.innerHeight - r.top + 4 } : { top: r.bottom + 4 }),
});
setMenu("open");
}}
style={{
marginLeft: "auto",
@@ -150,9 +160,10 @@ export function SessionRow({
/>
<div
style={{
position: "absolute",
right: 6,
top: "85%",
position: "fixed",
right: pos.right,
top: pos.top,
bottom: pos.bottom,
zIndex: 30,
background: "var(--pop)",
border: "1px solid var(--line)",