From 1bed4bbd9a0606f9d3edfbf0ccfd1499793f8712 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Mon, 16 Feb 2026 08:59:56 -0800 Subject: Fix v3 theme contrast and sync with v2 colors, add v3 logo, and fix v2 test stability - Sync v3 dark/light theme colors with v2 defaults - Fix v3 settings input/select contrast in dark mode - Add logo emoji to v3 sidebar - Fix duplicate key warnings and side-effect issues in FeedItems.tsx (v2) - Rebuild production assets --- web/dist/v2/assets/index-Cx5xz1G6.js | 11 +++ web/dist/v2/assets/index-aSc_HGFN.js | 11 --- web/dist/v2/index.html | 2 +- web/dist/v3/assets/index-BZ4E0pnc.css | 1 + web/dist/v3/assets/index-DmGSlScV.js | 144 ++++++++++++++++++++++++++++++++++ web/dist/v3/assets/index-DtCsR798.css | 1 - web/dist/v3/assets/index-T5yK9TsL.js | 143 --------------------------------- web/dist/v3/index.html | 4 +- 8 files changed, 159 insertions(+), 158 deletions(-) create mode 100644 web/dist/v2/assets/index-Cx5xz1G6.js delete mode 100644 web/dist/v2/assets/index-aSc_HGFN.js create mode 100644 web/dist/v3/assets/index-BZ4E0pnc.css create mode 100644 web/dist/v3/assets/index-DmGSlScV.js delete mode 100644 web/dist/v3/assets/index-DtCsR798.css delete mode 100644 web/dist/v3/assets/index-T5yK9TsL.js (limited to 'web/dist') diff --git a/web/dist/v2/assets/index-Cx5xz1G6.js b/web/dist/v2/assets/index-Cx5xz1G6.js new file mode 100644 index 0000000..f344b57 --- /dev/null +++ b/web/dist/v2/assets/index-Cx5xz1G6.js @@ -0,0 +1,11 @@ +(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))f(d);new MutationObserver(d=>{for(const h of d)if(h.type==="childList")for(const p of h.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&f(p)}).observe(document,{childList:!0,subtree:!0});function o(d){const h={};return d.integrity&&(h.integrity=d.integrity),d.referrerPolicy&&(h.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?h.credentials="include":d.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function f(d){if(d.ep)return;d.ep=!0;const h=o(d);fetch(d.href,h)}})();function nv(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var Mf={exports:{}},Un={};var Pd;function uv(){if(Pd)return Un;Pd=1;var c=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(f,d,h){var p=null;if(h!==void 0&&(p=""+h),d.key!==void 0&&(p=""+d.key),"key"in d){h={};for(var _ in d)_!=="key"&&(h[_]=d[_])}else h=d;return d=h.ref,{$$typeof:c,type:f,key:p,ref:d!==void 0?d:null,props:h}}return Un.Fragment=r,Un.jsx=o,Un.jsxs=o,Un}var th;function iv(){return th||(th=1,Mf.exports=uv()),Mf.exports}var x=iv(),Nf={exports:{}},lt={};var eh;function cv(){if(eh)return lt;eh=1;var c=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),p=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),B=Symbol.iterator;function w(v){return v===null||typeof v!="object"?null:(v=B&&v[B]||v["@@iterator"],typeof v=="function"?v:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Q=Object.assign,X={};function H(v,D,Y){this.props=v,this.context=D,this.refs=X,this.updater=Y||k}H.prototype.isReactComponent={},H.prototype.setState=function(v,D){if(typeof v!="object"&&typeof v!="function"&&v!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,v,D,"setState")},H.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function q(){}q.prototype=H.prototype;function G(v,D,Y){this.props=v,this.context=D,this.refs=X,this.updater=Y||k}var gt=G.prototype=new q;gt.constructor=G,Q(gt,H.prototype),gt.isPureReactComponent=!0;var ht=Array.isArray;function Et(){}var et={H:null,A:null,T:null,S:null},St=Object.prototype.hasOwnProperty;function Ot(v,D,Y){var Z=Y.ref;return{$$typeof:c,type:v,key:D,ref:Z!==void 0?Z:null,props:Y}}function P(v,D){return Ot(v.type,D,v.props)}function ct(v){return typeof v=="object"&&v!==null&&v.$$typeof===c}function K(v){var D={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(Y){return D[Y]})}var ut=/\/+/g;function jt(v,D){return typeof v=="object"&&v!==null&&v.key!=null?K(""+v.key):D.toString(36)}function Mt(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(Et,Et):(v.status="pending",v.then(function(D){v.status==="pending"&&(v.status="fulfilled",v.value=D)},function(D){v.status==="pending"&&(v.status="rejected",v.reason=D)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function N(v,D,Y,Z,tt){var it=typeof v;(it==="undefined"||it==="boolean")&&(v=null);var bt=!1;if(v===null)bt=!0;else switch(it){case"bigint":case"string":case"number":bt=!0;break;case"object":switch(v.$$typeof){case c:case r:bt=!0;break;case M:return bt=v._init,N(bt(v._payload),D,Y,Z,tt)}}if(bt)return tt=tt(v),bt=Z===""?"."+jt(v,0):Z,ht(tt)?(Y="",bt!=null&&(Y=bt.replace(ut,"$&/")+"/"),N(tt,D,Y,"",function(Ya){return Ya})):tt!=null&&(ct(tt)&&(tt=P(tt,Y+(tt.key==null||v&&v.key===tt.key?"":(""+tt.key).replace(ut,"$&/")+"/")+bt)),D.push(tt)),1;bt=0;var Pt=Z===""?".":Z+":";if(ht(v))for(var qt=0;qt>>1,J=N[mt];if(0>>1;mtd(Y,F))Zd(tt,Y)?(N[mt]=tt,N[Z]=F,mt=Z):(N[mt]=Y,N[D]=F,mt=D);else if(Zd(tt,F))N[mt]=tt,N[Z]=F,mt=Z;else break t}}return L}function d(N,L){var F=N.sortIndex-L.sortIndex;return F!==0?F:N.id-L.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;c.unstable_now=function(){return h.now()}}else{var p=Date,_=p.now();c.unstable_now=function(){return p.now()-_}}var S=[],y=[],M=1,R=null,B=3,w=!1,k=!1,Q=!1,X=!1,H=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function gt(N){for(var L=o(y);L!==null;){if(L.callback===null)f(y);else if(L.startTime<=N)f(y),L.sortIndex=L.expirationTime,r(S,L);else break;L=o(y)}}function ht(N){if(Q=!1,gt(N),!k)if(o(S)!==null)k=!0,Et||(Et=!0,K());else{var L=o(y);L!==null&&Mt(ht,L.startTime-N)}}var Et=!1,et=-1,St=5,Ot=-1;function P(){return X?!0:!(c.unstable_now()-OtN&&P());){var mt=R.callback;if(typeof mt=="function"){R.callback=null,B=R.priorityLevel;var J=mt(R.expirationTime<=N);if(N=c.unstable_now(),typeof J=="function"){R.callback=J,gt(N),L=!0;break e}R===o(S)&&f(S),gt(N)}else f(S);R=o(S)}if(R!==null)L=!0;else{var v=o(y);v!==null&&Mt(ht,v.startTime-N),L=!1}}break t}finally{R=null,B=F,w=!1}L=void 0}}finally{L?K():Et=!1}}}var K;if(typeof G=="function")K=function(){G(ct)};else if(typeof MessageChannel<"u"){var ut=new MessageChannel,jt=ut.port2;ut.port1.onmessage=ct,K=function(){jt.postMessage(null)}}else K=function(){H(ct,0)};function Mt(N,L){et=H(function(){N(c.unstable_now())},L)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(N){N.callback=null},c.unstable_forceFrameRate=function(N){0>N||125mt?(N.sortIndex=F,r(y,N),o(S)===null&&N===o(y)&&(Q?(q(et),et=-1):Q=!0,Mt(ht,F-mt))):(N.sortIndex=J,r(S,N),k||w||(k=!0,Et||(Et=!0,K()))),N},c.unstable_shouldYield=P,c.unstable_wrapCallback=function(N){var L=B;return function(){var F=B;B=L;try{return N.apply(this,arguments)}finally{B=F}}}})(Uf)),Uf}var nh;function rv(){return nh||(nh=1,Df.exports=sv()),Df.exports}var jf={exports:{}},It={};var uh;function ov(){if(uh)return It;uh=1;var c=Zf();function r(S){var y="https://react.dev/errors/"+S;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(r){console.error(r)}}return c(),jf.exports=ov(),jf.exports}var ch;function hv(){if(ch)return jn;ch=1;var c=rv(),r=Zf(),o=dv();function f(t){var e="https://react.dev/errors/"+t;if(1J||(t.current=mt[J],mt[J]=null,J--)}function Y(t,e){J++,mt[J]=t.current,t.current=e}var Z=v(null),tt=v(null),it=v(null),bt=v(null);function Pt(t,e){switch(Y(it,e),Y(tt,t),Y(Z,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?Td(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Td(e),t=zd(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}D(Z),Y(Z,t)}function qt(){D(Z),D(tt),D(it)}function Ya(t){t.memoizedState!==null&&Y(bt,t);var e=Z.current,l=zd(e,t.type);e!==l&&(Y(tt,t),Y(Z,l))}function Xn(t){tt.current===t&&(D(Z),D(tt)),bt.current===t&&(D(bt),Mn._currentValue=F)}var ri,Wf;function Dl(t){if(ri===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);ri=e&&e[1]||"",Wf=-1)":-1n||m[a]!==z[n]){var C=` +`+m[a].replace(" at new "," at ");return t.displayName&&C.includes("")&&(C=C.replace("",t.displayName)),C}while(1<=a&&0<=n);break}}}finally{oi=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Dl(l):""}function Hh(t,e){switch(t.tag){case 26:case 27:case 5:return Dl(t.type);case 16:return Dl("Lazy");case 13:return t.child!==e&&e!==null?Dl("Suspense Fallback"):Dl("Suspense");case 19:return Dl("SuspenseList");case 0:case 15:return di(t.type,!1);case 11:return di(t.type.render,!1);case 1:return di(t.type,!0);case 31:return Dl("Activity");default:return""}}function If(t){try{var e="",l=null;do e+=Hh(t,l),l=t,t=t.return;while(t);return e}catch(a){return` +Error generating stack: `+a.message+` +`+a.stack}}var hi=Object.prototype.hasOwnProperty,mi=c.unstable_scheduleCallback,yi=c.unstable_cancelCallback,Bh=c.unstable_shouldYield,qh=c.unstable_requestPaint,se=c.unstable_now,Lh=c.unstable_getCurrentPriorityLevel,Pf=c.unstable_ImmediatePriority,ts=c.unstable_UserBlockingPriority,Qn=c.unstable_NormalPriority,Yh=c.unstable_LowPriority,es=c.unstable_IdlePriority,Gh=c.log,Xh=c.unstable_setDisableYieldValue,Ga=null,re=null;function il(t){if(typeof Gh=="function"&&Xh(t),re&&typeof re.setStrictMode=="function")try{re.setStrictMode(Ga,t)}catch{}}var oe=Math.clz32?Math.clz32:Vh,Qh=Math.log,Zh=Math.LN2;function Vh(t){return t>>>=0,t===0?32:31-(Qh(t)/Zh|0)|0}var Zn=256,Vn=262144,wn=4194304;function Ul(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Kn(t,e,l){var a=t.pendingLanes;if(a===0)return 0;var n=0,u=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var s=a&134217727;return s!==0?(a=s&~u,a!==0?n=Ul(a):(i&=s,i!==0?n=Ul(i):l||(l=s&~t,l!==0&&(n=Ul(l))))):(s=a&~u,s!==0?n=Ul(s):i!==0?n=Ul(i):l||(l=a&~t,l!==0&&(n=Ul(l)))),n===0?0:e!==0&&e!==n&&(e&u)===0&&(u=n&-n,l=e&-e,u>=l||u===32&&(l&4194048)!==0)?e:n}function Xa(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function wh(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ls(){var t=wn;return wn<<=1,(wn&62914560)===0&&(wn=4194304),t}function vi(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function Qa(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Kh(t,e,l,a,n,u){var i=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var s=t.entanglements,m=t.expirationTimes,z=t.hiddenUpdates;for(l=i&~l;0"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Ih=/[\n"\\]/g;function Te(t){return t.replace(Ih,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Ti(t,e,l,a,n,u,i,s){t.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?t.type=i:t.removeAttribute("type"),e!=null?i==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Ee(e)):t.value!==""+Ee(e)&&(t.value=""+Ee(e)):i!=="submit"&&i!=="reset"||t.removeAttribute("value"),e!=null?zi(t,i,Ee(e)):l!=null?zi(t,i,Ee(l)):a!=null&&t.removeAttribute("value"),n==null&&u!=null&&(t.defaultChecked=!!u),n!=null&&(t.checked=n&&typeof n!="function"&&typeof n!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?t.name=""+Ee(s):t.removeAttribute("name")}function ys(t,e,l,a,n,u,i,s){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||e!=null)){Ei(t);return}l=l!=null?""+Ee(l):"",e=e!=null?""+Ee(e):l,s||e===t.value||(t.value=e),t.defaultValue=e}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,t.checked=s?t.checked:!!a,t.defaultChecked=!!a,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.name=i),Ei(t)}function zi(t,e,l){e==="number"&&kn(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function ua(t,e,l,a){if(t=t.options,e){e={};for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xi=!1;if(Qe)try{var Ka={};Object.defineProperty(Ka,"passive",{get:function(){xi=!0}}),window.addEventListener("test",Ka,Ka),window.removeEventListener("test",Ka,Ka)}catch{xi=!1}var fl=null,Mi=null,Wn=null;function Ts(){if(Wn)return Wn;var t,e=Mi,l=e.length,a,n="value"in fl?fl.value:fl.textContent,u=n.length;for(t=0;t=ka),xs=" ",Ms=!1;function Ns(t,e){switch(t){case"keyup":return Rm.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cs(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var sa=!1;function xm(t,e){switch(t){case"compositionend":return Cs(e);case"keypress":return e.which!==32?null:(Ms=!0,xs);case"textInput":return t=e.data,t===xs&&Ms?null:t;default:return null}}function Mm(t,e){if(sa)return t==="compositionend"||!ji&&Ns(t,e)?(t=Ts(),Wn=Mi=fl=null,sa=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:l,offset:e-t};t=a}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=Ys(l)}}function Xs(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Xs(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Qs(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=kn(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=kn(t.document)}return e}function qi(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var qm=Qe&&"documentMode"in document&&11>=document.documentMode,ra=null,Li=null,Pa=null,Yi=!1;function Zs(t,e,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Yi||ra==null||ra!==kn(a)||(a=ra,"selectionStart"in a&&qi(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Pa&&Ia(Pa,a)||(Pa=a,a=Vu(Li,"onSelect"),0>=i,n-=i,Be=1<<32-oe(e)+n|l<nt?(ot=$,$=null):ot=$.sibling;var vt=A(b,$,T[nt],U);if(vt===null){$===null&&($=ot);break}t&&$&&vt.alternate===null&&e(b,$),g=u(vt,g,nt),yt===null?W=vt:yt.sibling=vt,yt=vt,$=ot}if(nt===T.length)return l(b,$),dt&&Ve(b,nt),W;if($===null){for(;ntnt?(ot=$,$=null):ot=$.sibling;var Nl=A(b,$,vt.value,U);if(Nl===null){$===null&&($=ot);break}t&&$&&Nl.alternate===null&&e(b,$),g=u(Nl,g,nt),yt===null?W=Nl:yt.sibling=Nl,yt=Nl,$=ot}if(vt.done)return l(b,$),dt&&Ve(b,nt),W;if($===null){for(;!vt.done;nt++,vt=T.next())vt=j(b,vt.value,U),vt!==null&&(g=u(vt,g,nt),yt===null?W=vt:yt.sibling=vt,yt=vt);return dt&&Ve(b,nt),W}for($=a($);!vt.done;nt++,vt=T.next())vt=O($,b,nt,vt.value,U),vt!==null&&(t&&vt.alternate!==null&&$.delete(vt.key===null?nt:vt.key),g=u(vt,g,nt),yt===null?W=vt:yt.sibling=vt,yt=vt);return t&&$.forEach(function(av){return e(b,av)}),dt&&Ve(b,nt),W}function Rt(b,g,T,U){if(typeof T=="object"&&T!==null&&T.type===Q&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case w:t:{for(var W=T.key;g!==null;){if(g.key===W){if(W=T.type,W===Q){if(g.tag===7){l(b,g.sibling),U=n(g,T.props.children),U.return=b,b=U;break t}}else if(g.elementType===W||typeof W=="object"&&W!==null&&W.$$typeof===St&&Vl(W)===g.type){l(b,g.sibling),U=n(g,T.props),un(U,T),U.return=b,b=U;break t}l(b,g);break}else e(b,g);g=g.sibling}T.type===Q?(U=Yl(T.props.children,b.mode,U,T.key),U.return=b,b=U):(U=cu(T.type,T.key,T.props,null,b.mode,U),un(U,T),U.return=b,b=U)}return i(b);case k:t:{for(W=T.key;g!==null;){if(g.key===W)if(g.tag===4&&g.stateNode.containerInfo===T.containerInfo&&g.stateNode.implementation===T.implementation){l(b,g.sibling),U=n(g,T.children||[]),U.return=b,b=U;break t}else{l(b,g);break}else e(b,g);g=g.sibling}U=Ki(T,b.mode,U),U.return=b,b=U}return i(b);case St:return T=Vl(T),Rt(b,g,T,U)}if(Mt(T))return V(b,g,T,U);if(K(T)){if(W=K(T),typeof W!="function")throw Error(f(150));return T=W.call(T),I(b,g,T,U)}if(typeof T.then=="function")return Rt(b,g,mu(T),U);if(T.$$typeof===G)return Rt(b,g,ru(b,T),U);yu(b,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,g!==null&&g.tag===6?(l(b,g.sibling),U=n(g,T),U.return=b,b=U):(l(b,g),U=wi(T,b.mode,U),U.return=b,b=U),i(b)):l(b,g)}return function(b,g,T,U){try{nn=0;var W=Rt(b,g,T,U);return Ea=null,W}catch($){if($===ba||$===du)throw $;var yt=he(29,$,null,b.mode);return yt.lanes=U,yt.return=b,yt}}}var Kl=dr(!0),hr=dr(!1),hl=!1;function nc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function uc(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ml(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function yl(t,e,l){var a=t.updateQueue;if(a===null)return null;if(a=a.shared,(pt&2)!==0){var n=a.pending;return n===null?e.next=e:(e.next=n.next,n.next=e),a.pending=e,e=iu(t),Fs(t,null,l),e}return uu(t,a,e,l),iu(t)}function cn(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var a=e.lanes;a&=t.pendingLanes,l|=a,e.lanes=l,ns(t,l)}}function ic(t,e){var l=t.updateQueue,a=t.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var i={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?n=u=i:u=u.next=i,l=l.next}while(l!==null);u===null?n=u=e:u=u.next=e}else n=u=e;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var cc=!1;function fn(){if(cc){var t=Sa;if(t!==null)throw t}}function sn(t,e,l,a){cc=!1;var n=t.updateQueue;hl=!1;var u=n.firstBaseUpdate,i=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var m=s,z=m.next;m.next=null,i===null?u=z:i.next=z,i=m;var C=t.alternate;C!==null&&(C=C.updateQueue,s=C.lastBaseUpdate,s!==i&&(s===null?C.firstBaseUpdate=z:s.next=z,C.lastBaseUpdate=m))}if(u!==null){var j=n.baseState;i=0,C=z=m=null,s=u;do{var A=s.lane&-536870913,O=A!==s.lane;if(O?(rt&A)===A:(a&A)===A){A!==0&&A===pa&&(cc=!0),C!==null&&(C=C.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});t:{var V=t,I=s;A=e;var Rt=l;switch(I.tag){case 1:if(V=I.payload,typeof V=="function"){j=V.call(Rt,j,A);break t}j=V;break t;case 3:V.flags=V.flags&-65537|128;case 0:if(V=I.payload,A=typeof V=="function"?V.call(Rt,j,A):V,A==null)break t;j=R({},j,A);break t;case 2:hl=!0}}A=s.callback,A!==null&&(t.flags|=64,O&&(t.flags|=8192),O=n.callbacks,O===null?n.callbacks=[A]:O.push(A))}else O={lane:A,tag:s.tag,payload:s.payload,callback:s.callback,next:null},C===null?(z=C=O,m=j):C=C.next=O,i|=A;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;O=s,s=O.next,O.next=null,n.lastBaseUpdate=O,n.shared.pending=null}}while(!0);C===null&&(m=j),n.baseState=m,n.firstBaseUpdate=z,n.lastBaseUpdate=C,u===null&&(n.shared.lanes=0),bl|=i,t.lanes=i,t.memoizedState=j}}function mr(t,e){if(typeof t!="function")throw Error(f(191,t));t.call(e)}function yr(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;tu?u:8;var i=N.T,s={};N.T=s,Rc(t,!1,e,l);try{var m=n(),z=N.S;if(z!==null&&z(s,m),m!==null&&typeof m=="object"&&typeof m.then=="function"){var C=Km(m,a);dn(t,e,C,pe(t))}else dn(t,e,a,pe(t))}catch(j){dn(t,e,{then:function(){},status:"rejected",reason:j},pe())}finally{L.p=u,i!==null&&s.types!==null&&(i.types=s.types),N.T=i}}function Im(){}function Ac(t,e,l,a){if(t.tag!==5)throw Error(f(476));var n=Jr(t).queue;Kr(t,n,e,F,l===null?Im:function(){return $r(t),l(a)})}function Jr(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$e,lastRenderedState:F},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$e,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function $r(t){var e=Jr(t);e.next===null&&(e=t.alternate.memoizedState),dn(t,e.next.queue,{},pe())}function _c(){return kt(Mn)}function kr(){return Yt().memoizedState}function Fr(){return Yt().memoizedState}function Pm(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=pe();t=ml(l);var a=yl(e,t,l);a!==null&&(ce(a,e,l),cn(a,e,l)),e={cache:tc()},t.payload=e;return}e=e.return}}function ty(t,e,l){var a=pe();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},_u(t)?Ir(e,l):(l=Zi(t,e,l,a),l!==null&&(ce(l,t,a),Pr(l,e,a)))}function Wr(t,e,l){var a=pe();dn(t,e,l,a)}function dn(t,e,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(_u(t))Ir(e,n);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var i=e.lastRenderedState,s=u(i,l);if(n.hasEagerState=!0,n.eagerState=s,de(s,i))return uu(t,e,n,0),xt===null&&nu(),!1}catch{}if(l=Zi(t,e,n,a),l!==null)return ce(l,t,a),Pr(l,e,a),!0}return!1}function Rc(t,e,l,a){if(a={lane:2,revertLane:nf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},_u(t)){if(e)throw Error(f(479))}else e=Zi(t,l,a,2),e!==null&&ce(e,t,2)}function _u(t){var e=t.alternate;return t===at||e!==null&&e===at}function Ir(t,e){za=pu=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function Pr(t,e,l){if((l&4194048)!==0){var a=e.lanes;a&=t.pendingLanes,l|=a,e.lanes=l,ns(t,l)}}var hn={readContext:kt,use:Eu,useCallback:Ht,useContext:Ht,useEffect:Ht,useImperativeHandle:Ht,useLayoutEffect:Ht,useInsertionEffect:Ht,useMemo:Ht,useReducer:Ht,useRef:Ht,useState:Ht,useDebugValue:Ht,useDeferredValue:Ht,useTransition:Ht,useSyncExternalStore:Ht,useId:Ht,useHostTransitionStatus:Ht,useFormState:Ht,useActionState:Ht,useOptimistic:Ht,useMemoCache:Ht,useCacheRefresh:Ht};hn.useEffectEvent=Ht;var to={readContext:kt,use:Eu,useCallback:function(t,e){return te().memoizedState=[t,e===void 0?null:e],t},useContext:kt,useEffect:qr,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,zu(4194308,4,Xr.bind(null,e,t),l)},useLayoutEffect:function(t,e){return zu(4194308,4,t,e)},useInsertionEffect:function(t,e){zu(4,2,t,e)},useMemo:function(t,e){var l=te();e=e===void 0?null:e;var a=t();if(Jl){il(!0);try{t()}finally{il(!1)}}return l.memoizedState=[a,e],a},useReducer:function(t,e,l){var a=te();if(l!==void 0){var n=l(e);if(Jl){il(!0);try{l(e)}finally{il(!1)}}}else n=e;return a.memoizedState=a.baseState=n,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},a.queue=t,t=t.dispatch=ty.bind(null,at,t),[a.memoizedState,t]},useRef:function(t){var e=te();return t={current:t},e.memoizedState=t},useState:function(t){t=Sc(t);var e=t.queue,l=Wr.bind(null,at,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:Tc,useDeferredValue:function(t,e){var l=te();return zc(l,t,e)},useTransition:function(){var t=Sc(!1);return t=Kr.bind(null,at,t.queue,!0,!1),te().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var a=at,n=te();if(dt){if(l===void 0)throw Error(f(407));l=l()}else{if(l=e(),xt===null)throw Error(f(349));(rt&127)!==0||Er(a,e,l)}n.memoizedState=l;var u={value:l,getSnapshot:e};return n.queue=u,qr(zr.bind(null,a,u,t),[t]),a.flags|=2048,_a(9,{destroy:void 0},Tr.bind(null,a,u,l,e),null),l},useId:function(){var t=te(),e=xt.identifierPrefix;if(dt){var l=qe,a=Be;l=(a&~(1<<32-oe(a)-1)).toString(32)+l,e="_"+e+"R_"+l,l=Su++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?i.createElement(n,{is:a.is}):i.createElement(n)}}u[Jt]=e,u[ee]=a;t:for(i=e.child;i!==null;){if(i.tag===5||i.tag===6)u.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break t;for(;i.sibling===null;){if(i.return===null||i.return===e)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}e.stateNode=u;t:switch(Wt(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break t;case"img":a=!0;break t;default:a=!1}a&&Fe(e)}}return Ct(e),Gc(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==a&&Fe(e);else{if(typeof a!="string"&&e.stateNode===null)throw Error(f(166));if(t=it.current,va(e)){if(t=e.stateNode,l=e.memoizedProps,a=null,n=$t,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}t[Jt]=e,t=!!(t.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||bd(t.nodeValue,l)),t||ol(e,!0)}else t=wu(t).createTextNode(a),t[Jt]=e,e.stateNode=t}return Ct(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(a=va(e),l!==null){if(t===null){if(!a)throw Error(f(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(f(557));t[Jt]=e}else Gl(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ct(e),t=!1}else l=Fi(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(ye(e),e):(ye(e),null);if((e.flags&128)!==0)throw Error(f(558))}return Ct(e),null;case 13:if(a=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(n=va(e),a!==null&&a.dehydrated!==null){if(t===null){if(!n)throw Error(f(318));if(n=e.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(f(317));n[Jt]=e}else Gl(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Ct(e),n=!1}else n=Fi(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),n=!0;if(!n)return e.flags&256?(ye(e),e):(ye(e),null)}return ye(e),(e.flags&128)!==0?(e.lanes=l,e):(l=a!==null,t=t!==null&&t.memoizedState!==null,l&&(a=e.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),Nu(e,e.updateQueue),Ct(e),null);case 4:return qt(),t===null&&sf(e.stateNode.containerInfo),Ct(e),null;case 10:return Ke(e.type),Ct(e),null;case 19:if(D(Lt),a=e.memoizedState,a===null)return Ct(e),null;if(n=(e.flags&128)!==0,u=a.rendering,u===null)if(n)yn(a,!1);else{if(Bt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(u=gu(t),u!==null){for(e.flags|=128,yn(a,!1),t=u.updateQueue,e.updateQueue=t,Nu(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)Ws(l,t),l=l.sibling;return Y(Lt,Lt.current&1|2),dt&&Ve(e,a.treeForkCount),e.child}t=t.sibling}a.tail!==null&&se()>Hu&&(e.flags|=128,n=!0,yn(a,!1),e.lanes=4194304)}else{if(!n)if(t=gu(u),t!==null){if(e.flags|=128,n=!0,t=t.updateQueue,e.updateQueue=t,Nu(e,t),yn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!dt)return Ct(e),null}else 2*se()-a.renderingStartTime>Hu&&l!==536870912&&(e.flags|=128,n=!0,yn(a,!1),e.lanes=4194304);a.isBackwards?(u.sibling=e.child,e.child=u):(t=a.last,t!==null?t.sibling=u:e.child=u,a.last=u)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=se(),t.sibling=null,l=Lt.current,Y(Lt,n?l&1|2:l&1),dt&&Ve(e,a.treeForkCount),t):(Ct(e),null);case 22:case 23:return ye(e),sc(),a=e.memoizedState!==null,t!==null?t.memoizedState!==null!==a&&(e.flags|=8192):a&&(e.flags|=8192),a?(l&536870912)!==0&&(e.flags&128)===0&&(Ct(e),e.subtreeFlags&6&&(e.flags|=8192)):Ct(e),l=e.updateQueue,l!==null&&Nu(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),a=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),a!==l&&(e.flags|=2048),t!==null&&D(Zl),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),Ke(Gt),Ct(e),null;case 25:return null;case 30:return null}throw Error(f(156,e.tag))}function uy(t,e){switch($i(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ke(Gt),qt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Xn(e),null;case 31:if(e.memoizedState!==null){if(ye(e),e.alternate===null)throw Error(f(340));Gl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(ye(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(f(340));Gl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return D(Lt),null;case 4:return qt(),null;case 10:return Ke(e.type),null;case 22:case 23:return ye(e),sc(),t!==null&&D(Zl),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Ke(Gt),null;case 25:return null;default:return null}}function _o(t,e){switch($i(e),e.tag){case 3:Ke(Gt),qt();break;case 26:case 27:case 5:Xn(e);break;case 4:qt();break;case 31:e.memoizedState!==null&&ye(e);break;case 13:ye(e);break;case 19:D(Lt);break;case 10:Ke(e.type);break;case 22:case 23:ye(e),sc(),t!==null&&D(Zl);break;case 24:Ke(Gt)}}function vn(t,e){try{var l=e.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&t)===t){a=void 0;var u=l.create,i=l.inst;a=u(),i.destroy=a}l=l.next}while(l!==n)}}catch(s){zt(e,e.return,s)}}function pl(t,e,l){try{var a=e.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&t)===t){var i=a.inst,s=i.destroy;if(s!==void 0){i.destroy=void 0,n=e;var m=l,z=s;try{z()}catch(C){zt(n,m,C)}}}a=a.next}while(a!==u)}}catch(C){zt(e,e.return,C)}}function Ro(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{yr(e,l)}catch(a){zt(t,t.return,a)}}}function Oo(t,e,l){l.props=$l(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(a){zt(t,e,a)}}function gn(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var a=t.stateNode;break;case 30:a=t.stateNode;break;default:a=t.stateNode}typeof l=="function"?t.refCleanup=l(a):l.current=a}}catch(n){zt(t,e,n)}}function Le(t,e){var l=t.ref,a=t.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){zt(t,e,n)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){zt(t,e,n)}else l.current=null}function xo(t){var e=t.type,l=t.memoizedProps,a=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break t;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){zt(t,t.return,n)}}function Xc(t,e,l){try{var a=t.stateNode;Oy(a,t.type,l,e),a[ee]=e}catch(n){zt(t,t.return,n)}}function Mo(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&_l(t.type)||t.tag===4}function Qc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Mo(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&_l(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Zc(t,e,l){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(t),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=Xe));else if(a!==4&&(a===27&&_l(t.type)&&(l=t.stateNode,e=null),t=t.child,t!==null))for(Zc(t,e,l),t=t.sibling;t!==null;)Zc(t,e,l),t=t.sibling}function Cu(t,e,l){var a=t.tag;if(a===5||a===6)t=t.stateNode,e?l.insertBefore(t,e):l.appendChild(t);else if(a!==4&&(a===27&&_l(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Cu(t,e,l),t=t.sibling;t!==null;)Cu(t,e,l),t=t.sibling}function No(t){var e=t.stateNode,l=t.memoizedProps;try{for(var a=t.type,n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Wt(e,a,l),e[Jt]=t,e[ee]=l}catch(u){zt(t,t.return,u)}}var We=!1,Zt=!1,Vc=!1,Co=typeof WeakSet=="function"?WeakSet:Set,Kt=null;function iy(t,e){if(t=t.containerInfo,df=Iu,t=Qs(t),qi(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break t}var i=0,s=-1,m=-1,z=0,C=0,j=t,A=null;e:for(;;){for(var O;j!==l||n!==0&&j.nodeType!==3||(s=i+n),j!==u||a!==0&&j.nodeType!==3||(m=i+a),j.nodeType===3&&(i+=j.nodeValue.length),(O=j.firstChild)!==null;)A=j,j=O;for(;;){if(j===t)break e;if(A===l&&++z===n&&(s=i),A===u&&++C===a&&(m=i),(O=j.nextSibling)!==null)break;j=A,A=j.parentNode}j=O}l=s===-1||m===-1?null:{start:s,end:m}}else l=null}l=l||{start:0,end:0}}else l=null;for(hf={focusedElem:t,selectionRange:l},Iu=!1,Kt=e;Kt!==null;)if(e=Kt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Kt=t;else for(;Kt!==null;){switch(e=Kt,u=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l title"))),Wt(u,a,l),u[Jt]=t,wt(u),a=u;break t;case"link":var i=qd("link","href",n).get(a+(l.href||""));if(i){for(var s=0;sRt&&(i=Rt,Rt=I,I=i);var b=Gs(s,I),g=Gs(s,Rt);if(b&&g&&(O.rangeCount!==1||O.anchorNode!==b.node||O.anchorOffset!==b.offset||O.focusNode!==g.node||O.focusOffset!==g.offset)){var T=j.createRange();T.setStart(b.node,b.offset),O.removeAllRanges(),I>Rt?(O.addRange(T),O.extend(g.node,g.offset)):(T.setEnd(g.node,g.offset),O.addRange(T))}}}}for(j=[],O=s;O=O.parentNode;)O.nodeType===1&&j.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;sl?32:l,N.T=null,l=Wc,Wc=null;var u=Tl,i=ll;if(Vt=0,Na=Tl=null,ll=0,(pt&6)!==0)throw Error(f(331));var s=pt;if(pt|=4,Qo(u.current),Yo(u,u.current,i,l),pt=s,zn(0,!1),re&&typeof re.onPostCommitFiberRoot=="function")try{re.onPostCommitFiberRoot(Ga,u)}catch{}return!0}finally{L.p=n,N.T=a,id(t,e)}}function fd(t,e,l){e=Ae(l,e),e=Nc(t.stateNode,e,2),t=yl(t,e,2),t!==null&&(Qa(t,2),Ye(t))}function zt(t,e,l){if(t.tag===3)fd(t,t,l);else for(;e!==null;){if(e.tag===3){fd(e,t,l);break}else if(e.tag===1){var a=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(El===null||!El.has(a))){t=Ae(l,t),l=fo(2),a=yl(e,l,2),a!==null&&(so(l,a,e,t),Qa(a,2),Ye(a));break}}e=e.return}}function ef(t,e,l){var a=t.pingCache;if(a===null){a=t.pingCache=new sy;var n=new Set;a.set(e,n)}else n=a.get(e),n===void 0&&(n=new Set,a.set(e,n));n.has(l)||(Jc=!0,n.add(l),t=my.bind(null,t,e,l),e.then(t,t))}function my(t,e,l){var a=t.pingCache;a!==null&&a.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,xt===t&&(rt&l)===l&&(Bt===4||Bt===3&&(rt&62914560)===rt&&300>se()-ju?(pt&2)===0&&Ca(t,0):$c|=l,Ma===rt&&(Ma=0)),Ye(t)}function sd(t,e){e===0&&(e=ls()),t=Ll(t,e),t!==null&&(Qa(t,e),Ye(t))}function yy(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),sd(t,l)}function vy(t,e){var l=0;switch(t.tag){case 31:case 13:var a=t.stateNode,n=t.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=t.stateNode;break;case 22:a=t.stateNode._retryCache;break;default:throw Error(f(314))}a!==null&&a.delete(e),sd(t,l)}function gy(t,e){return mi(t,e)}var Xu=null,Ua=null,lf=!1,Qu=!1,af=!1,Al=0;function Ye(t){t!==Ua&&t.next===null&&(Ua===null?Xu=Ua=t:Ua=Ua.next=t),Qu=!0,lf||(lf=!0,Sy())}function zn(t,e){if(!af&&Qu){af=!0;do for(var l=!1,a=Xu;a!==null;){if(t!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var i=a.suspendedLanes,s=a.pingedLanes;u=(1<<31-oe(42|t)+1)-1,u&=n&~(i&~s),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,hd(a,u))}else u=rt,u=Kn(a,a===xt?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Xa(a,u)||(l=!0,hd(a,u));a=a.next}while(l);af=!1}}function py(){rd()}function rd(){Qu=lf=!1;var t=0;Al!==0&&My()&&(t=Al);for(var e=se(),l=null,a=Xu;a!==null;){var n=a.next,u=od(a,e);u===0?(a.next=null,l===null?Xu=n:l.next=n,n===null&&(Ua=l)):(l=a,(t!==0||(u&3)!==0)&&(Qu=!0)),a=n}Vt!==0&&Vt!==5||zn(t),Al!==0&&(Al=0)}function od(t,e){for(var l=t.suspendedLanes,a=t.pingedLanes,n=t.expirationTimes,u=t.pendingLanes&-62914561;0s)break;var C=m.transferSize,j=m.initiatorType;C&&Ed(j)&&(m=m.responseEnd,i+=C*(m"u"?null:document;function Ud(t,e,l){var a=ja;if(a&&typeof e=="string"&&e){var n=Te(e);n='link[rel="'+t+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),Dd.has(n)||(Dd.add(n),t={rel:t,crossOrigin:l,href:e},a.querySelector(n)===null&&(e=a.createElement("link"),Wt(e,"link",t),wt(e),a.head.appendChild(e)))}}function Ly(t){al.D(t),Ud("dns-prefetch",t,null)}function Yy(t,e){al.C(t,e),Ud("preconnect",t,e)}function Gy(t,e,l){al.L(t,e,l);var a=ja;if(a&&t&&e){var n='link[rel="preload"][as="'+Te(e)+'"]';e==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+Te(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+Te(l.imageSizes)+'"]')):n+='[href="'+Te(t)+'"]';var u=n;switch(e){case"style":u=Ha(t);break;case"script":u=Ba(t)}Ne.has(u)||(t=R({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),Ne.set(u,t),a.querySelector(n)!==null||e==="style"&&a.querySelector(On(u))||e==="script"&&a.querySelector(xn(u))||(e=a.createElement("link"),Wt(e,"link",t),wt(e),a.head.appendChild(e)))}}function Xy(t,e){al.m(t,e);var l=ja;if(l&&t){var a=e&&typeof e.as=="string"?e.as:"script",n='link[rel="modulepreload"][as="'+Te(a)+'"][href="'+Te(t)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ba(t)}if(!Ne.has(u)&&(t=R({rel:"modulepreload",href:t},e),Ne.set(u,t),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(xn(u)))return}a=l.createElement("link"),Wt(a,"link",t),wt(a),l.head.appendChild(a)}}}function Qy(t,e,l){al.S(t,e,l);var a=ja;if(a&&t){var n=aa(a).hoistableStyles,u=Ha(t);e=e||"default";var i=n.get(u);if(!i){var s={loading:0,preload:null};if(i=a.querySelector(On(u)))s.loading=5;else{t=R({rel:"stylesheet",href:t,"data-precedence":e},l),(l=Ne.get(u))&&bf(t,l);var m=i=a.createElement("link");wt(m),Wt(m,"link",t),m._p=new Promise(function(z,C){m.onload=z,m.onerror=C}),m.addEventListener("load",function(){s.loading|=1}),m.addEventListener("error",function(){s.loading|=2}),s.loading|=4,Ju(i,e,a)}i={type:"stylesheet",instance:i,count:1,state:s},n.set(u,i)}}}function Zy(t,e){al.X(t,e);var l=ja;if(l&&t){var a=aa(l).hoistableScripts,n=Ba(t),u=a.get(n);u||(u=l.querySelector(xn(n)),u||(t=R({src:t,async:!0},e),(e=Ne.get(n))&&Ef(t,e),u=l.createElement("script"),wt(u),Wt(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function Vy(t,e){al.M(t,e);var l=ja;if(l&&t){var a=aa(l).hoistableScripts,n=Ba(t),u=a.get(n);u||(u=l.querySelector(xn(n)),u||(t=R({src:t,async:!0,type:"module"},e),(e=Ne.get(n))&&Ef(t,e),u=l.createElement("script"),wt(u),Wt(u,"link",t),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function jd(t,e,l,a){var n=(n=it.current)?Ku(n):null;if(!n)throw Error(f(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(e=Ha(l.href),l=aa(n).hoistableStyles,a=l.get(e),a||(a={type:"style",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Ha(l.href);var u=aa(n).hoistableStyles,i=u.get(t);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,i),(u=n.querySelector(On(t)))&&!u._p&&(i.instance=u,i.state.loading=5),Ne.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ne.set(t,l),u||wy(n,t,l,i.state))),e&&a===null)throw Error(f(528,""));return i}if(e&&a!==null)throw Error(f(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Ba(l),l=aa(n).hoistableScripts,a=l.get(e),a||(a={type:"script",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(f(444,t))}}function Ha(t){return'href="'+Te(t)+'"'}function On(t){return'link[rel="stylesheet"]['+t+"]"}function Hd(t){return R({},t,{"data-precedence":t.precedence,precedence:null})}function wy(t,e,l,a){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?a.loading=1:(e=t.createElement("link"),a.preload=e,e.addEventListener("load",function(){return a.loading|=1}),e.addEventListener("error",function(){return a.loading|=2}),Wt(e,"link",l),wt(e),t.head.appendChild(e))}function Ba(t){return'[src="'+Te(t)+'"]'}function xn(t){return"script[async]"+t}function Bd(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var a=t.querySelector('style[data-href~="'+Te(l.href)+'"]');if(a)return e.instance=a,wt(a),a;var n=R({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(t.ownerDocument||t).createElement("style"),wt(a),Wt(a,"style",n),Ju(a,l.precedence,t),e.instance=a;case"stylesheet":n=Ha(l.href);var u=t.querySelector(On(n));if(u)return e.state.loading|=4,e.instance=u,wt(u),u;a=Hd(l),(n=Ne.get(n))&&bf(a,n),u=(t.ownerDocument||t).createElement("link"),wt(u);var i=u;return i._p=new Promise(function(s,m){i.onload=s,i.onerror=m}),Wt(u,"link",a),e.state.loading|=4,Ju(u,l.precedence,t),e.instance=u;case"script":return u=Ba(l.src),(n=t.querySelector(xn(u)))?(e.instance=n,wt(n),n):(a=l,(n=Ne.get(u))&&(a=R({},l),Ef(a,n)),t=t.ownerDocument||t,n=t.createElement("script"),wt(n),Wt(n,"link",a),t.head.appendChild(n),e.instance=n);case"void":return null;default:throw Error(f(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(a=e.instance,e.state.loading|=4,Ju(a,l.precedence,t));return e.instance}function Ju(t,e,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,i=0;i title"):null)}function Ky(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;return e.rel==="stylesheet"?(t=e.disabled,typeof e.precedence=="string"&&t==null):!0;case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Yd(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Jy(t,e,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=Ha(a.href),u=e.querySelector(On(n));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=ku.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=u,wt(u);return}u=e.ownerDocument||e,a=Hd(a),(n=Ne.get(n))&&bf(a,n),u=u.createElement("link"),wt(u);var i=u;i._p=new Promise(function(s,m){i.onload=s,i.onerror=m}),Wt(u,"link",a),l.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=ku.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var Tf=0;function $y(t,e){return t.stylesheets&&t.count===0&&Wu(t,t.stylesheets),0Tf?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function ku(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Wu(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Fu=null;function Wu(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Fu=new Map,e.forEach(ky,t),Fu=null,ku.call(t))}function ky(t,e){if(!(e.state.loading&4)){var l=Fu.get(t);if(l)var a=l.get(null);else{l=new Map,Fu.set(t,l);for(var n=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(r){console.error(r)}}return c(),Cf.exports=hv(),Cf.exports}var yv=mv();var sh="popstate";function vv(c={}){function r(d,h){let{pathname:p="/",search:_="",hash:S=""}=Il(d.location.hash.substring(1));return!p.startsWith("/")&&!p.startsWith(".")&&(p="/"+p),Gf("",{pathname:p,search:_,hash:S},h.state&&h.state.usr||null,h.state&&h.state.key||"default")}function o(d,h){let p=d.document.querySelector("base"),_="";if(p&&p.getAttribute("href")){let S=d.location.href,y=S.indexOf("#");_=y===-1?S:S.slice(0,y)}return _+"#"+(typeof h=="string"?h:Bn(h))}function f(d,h){Se(d.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(h)})`)}return pv(r,o,f,c)}function Dt(c,r){if(c===!1||c===null||typeof c>"u")throw new Error(r)}function Se(c,r){if(!c){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function gv(){return Math.random().toString(36).substring(2,10)}function rh(c,r){return{usr:c.state,key:c.key,idx:r}}function Gf(c,r,o=null,f){return{pathname:typeof c=="string"?c:c.pathname,search:"",hash:"",...typeof r=="string"?Il(r):r,state:o,key:r&&r.key||f||gv()}}function Bn({pathname:c="/",search:r="",hash:o=""}){return r&&r!=="?"&&(c+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(c+=o.charAt(0)==="#"?o:"#"+o),c}function Il(c){let r={};if(c){let o=c.indexOf("#");o>=0&&(r.hash=c.substring(o),c=c.substring(0,o));let f=c.indexOf("?");f>=0&&(r.search=c.substring(f),c=c.substring(0,f)),c&&(r.pathname=c)}return r}function pv(c,r,o,f={}){let{window:d=document.defaultView,v5Compat:h=!1}=f,p=d.history,_="POP",S=null,y=M();y==null&&(y=0,p.replaceState({...p.state,idx:y},""));function M(){return(p.state||{idx:null}).idx}function R(){_="POP";let X=M(),H=X==null?null:X-y;y=X,S&&S({action:_,location:Q.location,delta:H})}function B(X,H){_="PUSH";let q=Gf(Q.location,X,H);o&&o(q,X),y=M()+1;let G=rh(q,y),gt=Q.createHref(q);try{p.pushState(G,"",gt)}catch(ht){if(ht instanceof DOMException&&ht.name==="DataCloneError")throw ht;d.location.assign(gt)}h&&S&&S({action:_,location:Q.location,delta:1})}function w(X,H){_="REPLACE";let q=Gf(Q.location,X,H);o&&o(q,X),y=M();let G=rh(q,y),gt=Q.createHref(q);p.replaceState(G,"",gt),h&&S&&S({action:_,location:Q.location,delta:0})}function k(X){return Sv(X)}let Q={get action(){return _},get location(){return c(d,p)},listen(X){if(S)throw new Error("A history only accepts one active listener");return d.addEventListener(sh,R),S=X,()=>{d.removeEventListener(sh,R),S=null}},createHref(X){return r(d,X)},createURL:k,encodeLocation(X){let H=k(X);return{pathname:H.pathname,search:H.search,hash:H.hash}},push:B,replace:w,go(X){return p.go(X)}};return Q}function Sv(c,r=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),Dt(o,"No window.location.(origin|href) available to create URL");let f=typeof c=="string"?c:Bn(c);return f=f.replace(/ $/,"%20"),!r&&f.startsWith("//")&&(f=o+f),new URL(f,o)}function yh(c,r,o="/"){return bv(c,r,o,!1)}function bv(c,r,o,f){let d=typeof r=="string"?Il(r):r,h=ul(d.pathname||"/",o);if(h==null)return null;let p=vh(c);Ev(p);let _=null;for(let S=0;_==null&&S{let M={relativePath:y===void 0?p.path||"":y,caseSensitive:p.caseSensitive===!0,childrenIndex:_,route:p};if(M.relativePath.startsWith("/")){if(!M.relativePath.startsWith(f)&&S)return;Dt(M.relativePath.startsWith(f),`Absolute route path "${M.relativePath}" nested under path "${f}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),M.relativePath=M.relativePath.slice(f.length)}let R=nl([f,M.relativePath]),B=o.concat(M);p.children&&p.children.length>0&&(Dt(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${R}".`),vh(p.children,r,B,R,S)),!(p.path==null&&!p.index)&&r.push({path:R,score:xv(R,p.index),routesMeta:B})};return c.forEach((p,_)=>{if(p.path===""||!p.path?.includes("?"))h(p,_);else for(let S of gh(p.path))h(p,_,!0,S)}),r}function gh(c){let r=c.split("/");if(r.length===0)return[];let[o,...f]=r,d=o.endsWith("?"),h=o.replace(/\?$/,"");if(f.length===0)return d?[h,""]:[h];let p=gh(f.join("/")),_=[];return _.push(...p.map(S=>S===""?h:[h,S].join("/"))),d&&_.push(...p),_.map(S=>c.startsWith("/")&&S===""?"/":S)}function Ev(c){c.sort((r,o)=>r.score!==o.score?o.score-r.score:Mv(r.routesMeta.map(f=>f.childrenIndex),o.routesMeta.map(f=>f.childrenIndex)))}var Tv=/^:[\w-]+$/,zv=3,Av=2,_v=1,Rv=10,Ov=-2,oh=c=>c==="*";function xv(c,r){let o=c.split("/"),f=o.length;return o.some(oh)&&(f+=Ov),r&&(f+=Av),o.filter(d=>!oh(d)).reduce((d,h)=>d+(Tv.test(h)?zv:h===""?_v:Rv),f)}function Mv(c,r){return c.length===r.length&&c.slice(0,-1).every((f,d)=>f===r[d])?c[c.length-1]-r[r.length-1]:0}function Nv(c,r,o=!1){let{routesMeta:f}=c,d={},h="/",p=[];for(let _=0;_{if(M==="*"){let k=_[B]||"";p=h.slice(0,h.length-k.length).replace(/(.)\/+$/,"$1")}const w=_[B];return R&&!w?y[M]=void 0:y[M]=(w||"").replace(/%2F/g,"/"),y},{}),pathname:h,pathnameBase:p,pattern:c}}function Cv(c,r=!1,o=!0){Se(c==="*"||!c.endsWith("*")||c.endsWith("/*"),`Route path "${c}" will be treated as if it were "${c.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${c.replace(/\*$/,"/*")}".`);let f=[],d="^"+c.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,_,S)=>(f.push({paramName:_,isOptional:S!=null}),S?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return c.endsWith("*")?(f.push({paramName:"*"}),d+=c==="*"||c==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?d+="\\/*$":c!==""&&c!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,r?void 0:"i"),f]}function ph(c){try{return c.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Se(!1,`The URL path "${c}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),c}}function ul(c,r){if(r==="/")return c;if(!c.toLowerCase().startsWith(r.toLowerCase()))return null;let o=r.endsWith("/")?r.length-1:r.length,f=c.charAt(o);return f&&f!=="/"?null:c.slice(o)||"/"}var Dv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Uv(c,r="/"){let{pathname:o,search:f="",hash:d=""}=typeof c=="string"?Il(c):c,h;return o?(o=o.replace(/\/\/+/g,"/"),o.startsWith("/")?h=dh(o.substring(1),"/"):h=dh(o,r)):h=r,{pathname:h,search:Bv(f),hash:qv(d)}}function dh(c,r){let o=r.replace(/\/+$/,"").split("/");return c.split("/").forEach(d=>{d===".."?o.length>1&&o.pop():d!=="."&&o.push(d)}),o.length>1?o.join("/"):"/"}function Hf(c,r,o,f){return`Cannot include a '${c}' character in a manually specified \`to.${r}\` field [${JSON.stringify(f)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function jv(c){return c.filter((r,o)=>o===0||r.route.path&&r.route.path.length>0)}function Vf(c){let r=jv(c);return r.map((o,f)=>f===r.length-1?o.pathname:o.pathnameBase)}function wf(c,r,o,f=!1){let d;typeof c=="string"?d=Il(c):(d={...c},Dt(!d.pathname||!d.pathname.includes("?"),Hf("?","pathname","search",d)),Dt(!d.pathname||!d.pathname.includes("#"),Hf("#","pathname","hash",d)),Dt(!d.search||!d.search.includes("#"),Hf("#","search","hash",d)));let h=c===""||d.pathname==="",p=h?"/":d.pathname,_;if(p==null)_=o;else{let R=r.length-1;if(!f&&p.startsWith("..")){let B=p.split("/");for(;B[0]==="..";)B.shift(),R-=1;d.pathname=B.join("/")}_=R>=0?r[R]:"/"}let S=Uv(d,_),y=p&&p!=="/"&&p.endsWith("/"),M=(h||p===".")&&o.endsWith("/");return!S.pathname.endsWith("/")&&(y||M)&&(S.pathname+="/"),S}var nl=c=>c.join("/").replace(/\/\/+/g,"/"),Hv=c=>c.replace(/\/+$/,"").replace(/^\/*/,"/"),Bv=c=>!c||c==="?"?"":c.startsWith("?")?c:"?"+c,qv=c=>!c||c==="#"?"":c.startsWith("#")?c:"#"+c,Lv=class{constructor(c,r,o,f=!1){this.status=c,this.statusText=r||"",this.internal=f,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function Yv(c){return c!=null&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.internal=="boolean"&&"data"in c}function Gv(c){return c.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Sh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function bh(c,r){let o=c;if(typeof o!="string"||!Dv.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let f=o,d=!1;if(Sh)try{let h=new URL(window.location.href),p=o.startsWith("//")?new URL(h.protocol+o):new URL(o),_=ul(p.pathname,r);p.origin===h.origin&&_!=null?o=_+p.search+p.hash:d=!0}catch{Se(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:f,isExternal:d,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Eh=["POST","PUT","PATCH","DELETE"];new Set(Eh);var Xv=["GET",...Eh];new Set(Xv);var La=E.createContext(null);La.displayName="DataRouter";var fi=E.createContext(null);fi.displayName="DataRouterState";var Qv=E.createContext(!1),Th=E.createContext({isTransitioning:!1});Th.displayName="ViewTransition";var Zv=E.createContext(new Map);Zv.displayName="Fetchers";var Vv=E.createContext(null);Vv.displayName="Await";var be=E.createContext(null);be.displayName="Navigation";var Ln=E.createContext(null);Ln.displayName="Location";var He=E.createContext({outlet:null,matches:[],isDataRoute:!1});He.displayName="Route";var Kf=E.createContext(null);Kf.displayName="RouteError";var zh="REACT_ROUTER_ERROR",wv="REDIRECT",Kv="ROUTE_ERROR_RESPONSE";function Jv(c){if(c.startsWith(`${zh}:${wv}:{`))try{let r=JSON.parse(c.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function $v(c){if(c.startsWith(`${zh}:${Kv}:{`))try{let r=JSON.parse(c.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Lv(r.status,r.statusText,r.data)}catch{}}function kv(c,{relative:r}={}){Dt(Pl(),"useHref() may be used only in the context of a component.");let{basename:o,navigator:f}=E.useContext(be),{hash:d,pathname:h,search:p}=Gn(c,{relative:r}),_=h;return o!=="/"&&(_=h==="/"?o:nl([o,h])),f.createHref({pathname:_,search:p,hash:d})}function Pl(){return E.useContext(Ln)!=null}function Ce(){return Dt(Pl(),"useLocation() may be used only in the context of a component."),E.useContext(Ln).location}function Bf(c){Dt(Pl(),"useMatch() may be used only in the context of a component.");let{pathname:r}=Ce();return E.useMemo(()=>qn(c,ph(r)),[r,c])}var Ah="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _h(c){E.useContext(be).static||E.useLayoutEffect(c)}function Yn(){let{isDataRoute:c}=E.useContext(He);return c?s0():Fv()}function Fv(){Dt(Pl(),"useNavigate() may be used only in the context of a component.");let c=E.useContext(La),{basename:r,navigator:o}=E.useContext(be),{matches:f}=E.useContext(He),{pathname:d}=Ce(),h=JSON.stringify(Vf(f)),p=E.useRef(!1);return _h(()=>{p.current=!0}),E.useCallback((S,y={})=>{if(Se(p.current,Ah),!p.current)return;if(typeof S=="number"){o.go(S);return}let M=wf(S,JSON.parse(h),d,y.relative==="path");c==null&&r!=="/"&&(M.pathname=M.pathname==="/"?r:nl([r,M.pathname])),(y.replace?o.replace:o.push)(M,y.state,y)},[r,o,h,d,c])}E.createContext(null);function Wv(){let{matches:c}=E.useContext(He),r=c[c.length-1];return r?r.params:{}}function Gn(c,{relative:r}={}){let{matches:o}=E.useContext(He),{pathname:f}=Ce(),d=JSON.stringify(Vf(o));return E.useMemo(()=>wf(c,JSON.parse(d),f,r==="path"),[c,d,f,r])}function Iv(c,r){return Rh(c,r)}function Rh(c,r,o,f,d){Dt(Pl(),"useRoutes() may be used only in the context of a component.");let{navigator:h}=E.useContext(be),{matches:p}=E.useContext(He),_=p[p.length-1],S=_?_.params:{},y=_?_.pathname:"/",M=_?_.pathnameBase:"/",R=_&&_.route;{let q=R&&R.path||"";xh(y,!R||q.endsWith("*")||q.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${y}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let B=Ce(),w;if(r){let q=typeof r=="string"?Il(r):r;Dt(M==="/"||q.pathname?.startsWith(M),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${M}" but pathname "${q.pathname}" was given in the \`location\` prop.`),w=q}else w=B;let k=w.pathname||"/",Q=k;if(M!=="/"){let q=M.replace(/^\//,"").split("/");Q="/"+k.replace(/^\//,"").split("/").slice(q.length).join("/")}let X=yh(c,{pathname:Q});Se(R||X!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),Se(X==null||X[X.length-1].route.element!==void 0||X[X.length-1].route.Component!==void 0||X[X.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let H=a0(X&&X.map(q=>Object.assign({},q,{params:Object.assign({},S,q.params),pathname:nl([M,h.encodeLocation?h.encodeLocation(q.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathname]),pathnameBase:q.pathnameBase==="/"?M:nl([M,h.encodeLocation?h.encodeLocation(q.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:q.pathnameBase])})),p,o,f,d);return r&&H?E.createElement(Ln.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...w},navigationType:"POP"}},H):H}function Pv(){let c=f0(),r=Yv(c)?`${c.status} ${c.statusText}`:c instanceof Error?c.message:JSON.stringify(c),o=c instanceof Error?c.stack:null,f="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:f},h={padding:"2px 4px",backgroundColor:f},p=null;return console.error("Error handled by React Router default ErrorBoundary:",c),p=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:h},"ErrorBoundary")," or"," ",E.createElement("code",{style:h},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},r),o?E.createElement("pre",{style:d},o):null,p)}var t0=E.createElement(Pv,null),Oh=class extends E.Component{constructor(c){super(c),this.state={location:c.location,revalidation:c.revalidation,error:c.error}}static getDerivedStateFromError(c){return{error:c}}static getDerivedStateFromProps(c,r){return r.location!==c.location||r.revalidation!=="idle"&&c.revalidation==="idle"?{error:c.error,location:c.location,revalidation:c.revalidation}:{error:c.error!==void 0?c.error:r.error,location:r.location,revalidation:c.revalidation||r.revalidation}}componentDidCatch(c,r){this.props.onError?this.props.onError(c,r):console.error("React Router caught the following error during render",c)}render(){let c=this.state.error;if(this.context&&typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){const o=$v(c.digest);o&&(c=o)}let r=c!==void 0?E.createElement(He.Provider,{value:this.props.routeContext},E.createElement(Kf.Provider,{value:c,children:this.props.component})):this.props.children;return this.context?E.createElement(e0,{error:c},r):r}};Oh.contextType=Qv;var qf=new WeakMap;function e0({children:c,error:r}){let{basename:o}=E.useContext(be);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let f=Jv(r.digest);if(f){let d=qf.get(r);if(d)throw d;let h=bh(f.location,o);if(Sh&&!qf.get(r))if(h.isExternal||f.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:f.replace}));throw qf.set(r,p),p}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return c}function l0({routeContext:c,match:r,children:o}){let f=E.useContext(La);return f&&f.static&&f.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(f.staticContext._deepestRenderedBoundaryId=r.route.id),E.createElement(He.Provider,{value:c},o)}function a0(c,r=[],o=null,f=null,d=null){if(c==null){if(!o)return null;if(o.errors)c=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)c=o.matches;else return null}let h=c,p=o?.errors;if(p!=null){let M=h.findIndex(R=>R.route.id&&p?.[R.route.id]!==void 0);Dt(M>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(p).join(",")}`),h=h.slice(0,Math.min(h.length,M+1))}let _=!1,S=-1;if(o)for(let M=0;M=0?h=h.slice(0,S+1):h=[h[0]];break}}}let y=o&&f?(M,R)=>{f(M,{location:o.location,params:o.matches?.[0]?.params??{},unstable_pattern:Gv(o.matches),errorInfo:R})}:void 0;return h.reduceRight((M,R,B)=>{let w,k=!1,Q=null,X=null;o&&(w=p&&R.route.id?p[R.route.id]:void 0,Q=R.route.errorElement||t0,_&&(S<0&&B===0?(xh("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,X=null):S===B&&(k=!0,X=R.route.hydrateFallbackElement||null)));let H=r.concat(h.slice(0,B+1)),q=()=>{let G;return w?G=Q:k?G=X:R.route.Component?G=E.createElement(R.route.Component,null):R.route.element?G=R.route.element:G=M,E.createElement(l0,{match:R,routeContext:{outlet:M,matches:H,isDataRoute:o!=null},children:G})};return o&&(R.route.ErrorBoundary||R.route.errorElement||B===0)?E.createElement(Oh,{location:o.location,revalidation:o.revalidation,component:Q,error:w,children:q(),routeContext:{outlet:null,matches:H,isDataRoute:!0},onError:y}):q()},null)}function Jf(c){return`${c} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function n0(c){let r=E.useContext(La);return Dt(r,Jf(c)),r}function u0(c){let r=E.useContext(fi);return Dt(r,Jf(c)),r}function i0(c){let r=E.useContext(He);return Dt(r,Jf(c)),r}function $f(c){let r=i0(c),o=r.matches[r.matches.length-1];return Dt(o.route.id,`${c} can only be used on routes that contain a unique "id"`),o.route.id}function c0(){return $f("useRouteId")}function f0(){let c=E.useContext(Kf),r=u0("useRouteError"),o=$f("useRouteError");return c!==void 0?c:r.errors?.[o]}function s0(){let{router:c}=n0("useNavigate"),r=$f("useNavigate"),o=E.useRef(!1);return _h(()=>{o.current=!0}),E.useCallback(async(d,h={})=>{Se(o.current,Ah),o.current&&(typeof d=="number"?await c.navigate(d):await c.navigate(d,{fromRouteId:r,...h}))},[c,r])}var hh={};function xh(c,r,o){!r&&!hh[c]&&(hh[c]=!0,Se(!1,o))}E.memo(r0);function r0({routes:c,future:r,state:o,onError:f}){return Rh(c,void 0,o,f,r)}function o0({to:c,replace:r,state:o,relative:f}){Dt(Pl()," may be used only in the context of a component.");let{static:d}=E.useContext(be);Se(!d," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:h}=E.useContext(He),{pathname:p}=Ce(),_=Yn(),S=wf(c,Vf(h),p,f==="path"),y=JSON.stringify(S);return E.useEffect(()=>{_(JSON.parse(y),{replace:r,state:o,relative:f})},[_,y,f,r,o]),null}function Wl(c){Dt(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function d0({basename:c="/",children:r=null,location:o,navigationType:f="POP",navigator:d,static:h=!1,unstable_useTransitions:p}){Dt(!Pl(),"You cannot render a inside another . You should never have more than one in your app.");let _=c.replace(/^\/*/,"/"),S=E.useMemo(()=>({basename:_,navigator:d,static:h,unstable_useTransitions:p,future:{}}),[_,d,h,p]);typeof o=="string"&&(o=Il(o));let{pathname:y="/",search:M="",hash:R="",state:B=null,key:w="default"}=o,k=E.useMemo(()=>{let Q=ul(y,_);return Q==null?null:{location:{pathname:Q,search:M,hash:R,state:B,key:w},navigationType:f}},[_,y,M,R,B,w,f]);return Se(k!=null,` is not able to match the URL "${y}${M}${R}" because it does not start with the basename, so the won't render anything.`),k==null?null:E.createElement(be.Provider,{value:S},E.createElement(Ln.Provider,{children:r,value:k}))}function Mh({children:c,location:r}){return Iv(Xf(c),r)}function Xf(c,r=[]){let o=[];return E.Children.forEach(c,(f,d)=>{if(!E.isValidElement(f))return;let h=[...r,d];if(f.type===E.Fragment){o.push.apply(o,Xf(f.props.children,h));return}Dt(f.type===Wl,`[${typeof f.type=="string"?f.type:f.type.name}] is not a component. All component children of must be a or `),Dt(!f.props.index||!f.props.children,"An index route cannot have child routes.");let p={id:f.props.id||h.join("-"),caseSensitive:f.props.caseSensitive,element:f.props.element,Component:f.props.Component,index:f.props.index,path:f.props.path,middleware:f.props.middleware,loader:f.props.loader,action:f.props.action,hydrateFallbackElement:f.props.hydrateFallbackElement,HydrateFallback:f.props.HydrateFallback,errorElement:f.props.errorElement,ErrorBoundary:f.props.ErrorBoundary,hasErrorBoundary:f.props.hasErrorBoundary===!0||f.props.ErrorBoundary!=null||f.props.errorElement!=null,shouldRevalidate:f.props.shouldRevalidate,handle:f.props.handle,lazy:f.props.lazy};f.props.children&&(p.children=Xf(f.props.children,h)),o.push(p)}),o}var ii="get",ci="application/x-www-form-urlencoded";function si(c){return typeof HTMLElement<"u"&&c instanceof HTMLElement}function h0(c){return si(c)&&c.tagName.toLowerCase()==="button"}function m0(c){return si(c)&&c.tagName.toLowerCase()==="form"}function y0(c){return si(c)&&c.tagName.toLowerCase()==="input"}function v0(c){return!!(c.metaKey||c.altKey||c.ctrlKey||c.shiftKey)}function g0(c,r){return c.button===0&&(!r||r==="_self")&&!v0(c)}function Qf(c=""){return new URLSearchParams(typeof c=="string"||Array.isArray(c)||c instanceof URLSearchParams?c:Object.keys(c).reduce((r,o)=>{let f=c[o];return r.concat(Array.isArray(f)?f.map(d=>[o,d]):[[o,f]])},[]))}function p0(c,r){let o=Qf(c);return r&&r.forEach((f,d)=>{o.has(d)||r.getAll(d).forEach(h=>{o.append(d,h)})}),o}var ui=null;function S0(){if(ui===null)try{new FormData(document.createElement("form"),0),ui=!1}catch{ui=!0}return ui}var b0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Lf(c){return c!=null&&!b0.has(c)?(Se(!1,`"${c}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${ci}"`),null):c}function E0(c,r){let o,f,d,h,p;if(m0(c)){let _=c.getAttribute("action");f=_?ul(_,r):null,o=c.getAttribute("method")||ii,d=Lf(c.getAttribute("enctype"))||ci,h=new FormData(c)}else if(h0(c)||y0(c)&&(c.type==="submit"||c.type==="image")){let _=c.form;if(_==null)throw new Error('Cannot submit a + + + ${t.full_content||t.description?` +
+ ${t.full_content||t.description} +
+ `:""} + + `}let f=null,p=null,b=null;function P(){p=document.querySelector("#app"),p&&(p.className=`theme-${i.theme} font-${i.fontTheme}`,p.innerHTML=` +
+ + + +
+
+
+
+ `,O())}function O(){document.getElementById("search-input")?.addEventListener("input",s=>{const r=s.target.value;o.updateQuery({q:r})}),document.getElementById("logo-link")?.addEventListener("click",()=>o.navigate("/")),document.getElementById("logout-button")?.addEventListener("click",s=>{s.preventDefault(),U()}),document.getElementById("sidebar-toggle-btn")?.addEventListener("click",()=>{i.toggleSidebar()}),document.getElementById("sidebar-backdrop")?.addEventListener("click",()=>{i.setSidebarVisible(!1)}),window.addEventListener("resize",()=>{window.innerWidth>768&&!i.sidebarVisible&&i.setSidebarVisible(!0)}),document.querySelectorAll(".sidebar-section.collapsible h3").forEach(s=>{s.addEventListener("click",()=>{s.parentElement?.classList.toggle("collapsed")})}),document.getElementById("sidebar")?.addEventListener("click",s=>{const r=s.target,d=r.closest("a");if(!d){r.classList.contains("logo")&&(s.preventDefault(),o.navigate("/",{}));return}const c=d.getAttribute("data-nav"),u=Object.fromEntries(o.getCurrentRoute().query.entries());if(c==="filter"){s.preventDefault();const l=d.getAttribute("data-value");o.getCurrentRoute().path==="/settings"?o.navigate("/",{...u,filter:l}):o.updateQuery({filter:l})}else if(c==="tag"){s.preventDefault();const l=d.getAttribute("data-value");o.navigate(`/tag/${encodeURIComponent(l)}`,u)}else if(c==="feed"){s.preventDefault();const l=d.getAttribute("data-value");i.activeFeedId===parseInt(l)?o.navigate("/",u):o.navigate(`/feed/${l}`,u)}else c==="settings"&&(s.preventDefault(),o.getCurrentRoute().path==="/settings"?o.navigate("/",u):o.navigate("/settings",u));window.innerWidth<=768&&i.setSidebarVisible(!1)}),document.getElementById("content-area")?.addEventListener("click",s=>{const r=s.target,d=r.closest('[data-action="toggle-star"]');if(d){const g=d.closest("[data-id]");if(g){const v=parseInt(g.getAttribute("data-id"));D(v)}return}const c=r.closest('[data-action="scrape"]');if(c){const g=c.closest("[data-id]");if(g){const v=parseInt(g.getAttribute("data-id"));Q(v)}return}const u=r.closest('[data-action="open"]'),l=r.closest(".feed-item");if(l&&!u){const g=parseInt(l.getAttribute("data-id")),v=i.items.find(_=>_._id===g);v&&!v.read&&h(g,{read:!0})}})}function T(){const{feeds:t,activeFeedId:e}=i,a=document.getElementById("feed-list");a&&(a.innerHTML=t.map(n=>` +
  • + + ${n.title||n.url} + +
  • + `).join(""))}function $(){const{tags:t,activeTagName:e}=i,a=document.getElementById("tag-list");a&&(a.innerHTML=t.map(n=>` +
  • + + ${n.title} + +
  • + `).join(""))}function k(){const{filter:t}=i,e=document.getElementById("filter-list");e&&e.querySelectorAll("li").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-filter")===t)})}function I(){const{items:t,loading:e}=i;b&&(b.disconnect(),b=null);const a=document.getElementById("content-area");if(!a||o.getCurrentRoute().path==="/settings")return;if(e&&t.length===0){a.innerHTML='

    Loading items...

    ';return}if(t.length===0){a.innerHTML='

    No items found.

    ';return}a.innerHTML=` +
      + ${t.map(s=>C(s)).join("")} +
    + ${i.hasMore?'
    Loading more...
    ':""} + `;const n=document.getElementById("load-more-sentinel");n&&new IntersectionObserver(r=>{r[0].isIntersecting&&!i.loading&&i.hasMore&&j()},{threshold:.1}).observe(n),b=new IntersectionObserver(s=>{s.forEach(r=>{if(r.isIntersecting){const d=r.target,c=parseInt(d.getAttribute("data-id")||"0");if(c){const u=i.items.find(l=>l._id===c);u&&!u.read&&(h(c,{read:!0}),b?.unobserve(d))}}})},{threshold:.5}),a.querySelectorAll(".feed-item").forEach(s=>b.observe(s))}function w(){const t=document.getElementById("content-area");t&&(t.innerHTML=` +
    +

    Settings

    + +
    +

    Add Feed

    +
    + + +
    +
    + +
    +

    Appearance

    +
    + +
    + + +
    +
    +
    + + +
    +
    + +
    +

    Manage Feeds

    +
      + ${i.feeds.map(e=>` +
    • +
      +
      ${e.title||e.url}
      +
      ${e.url}
      +
      +
      + + + +
      +
    • + `).join("")} +
    +
    + +
    +

    Data Management

    +
    + +
    + + +
    +
    +
    +
    + `,document.getElementById("theme-options")?.addEventListener("click",e=>{const a=e.target.closest("button");if(a){const n=a.getAttribute("data-theme");i.setTheme(n),w()}}),document.getElementById("font-selector")?.addEventListener("change",e=>{i.setFontTheme(e.target.value)}),document.getElementById("add-feed-btn")?.addEventListener("click",async()=>{const e=document.getElementById("new-feed-url"),a=e.value.trim();a&&(await M(a)?(e.value="",alert("Feed added successfully!"),y()):alert("Failed to add feed."))}),document.getElementById("export-opml-btn")?.addEventListener("click",()=>{window.location.href="/api/export/opml"}),document.getElementById("import-opml-file")?.addEventListener("change",async e=>{const a=e.target.files?.[0];a&&(await q(a)?(alert("OPML imported successfully! Crawling started."),y()):alert("Failed to import OPML."))}),document.querySelectorAll(".delete-feed-btn").forEach(e=>{e.addEventListener("click",async a=>{const n=parseInt(a.target.getAttribute("data-id"));confirm("Are you sure you want to delete this feed?")&&(await x(n),y(),await y(),w())})}),document.querySelectorAll(".update-feed-tag-btn").forEach(e=>{e.addEventListener("click",async a=>{const n=parseInt(a.target.getAttribute("data-id")),r=document.querySelector(`.feed-tag-input[data-id="${n}"]`).value.trim();await N(n,{category:r}),await y(),await F(),w(),alert("Feed updated")})}))}async function M(t){try{return(await m("/api/feed",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t})})).ok}catch(e){return console.error("Failed to add feed",e),!1}}async function q(t){try{const e=new FormData;e.append("file",t),e.append("format","opml");const a=document.cookie.split("; ").find(s=>s.startsWith("csrf_token="))?.split("=")[1];return(await fetch("/api/import",{method:"POST",headers:{"X-CSRF-Token":a||""},body:e})).ok}catch(e){return console.error("Failed to import OPML",e),!1}}async function x(t){try{return(await m(`/api/feed/${t}`,{method:"DELETE"})).ok}catch(e){return console.error("Failed to delete feed",e),!1}}async function N(t,e){try{return(await m("/api/feed",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,_id:t})})).ok}catch(a){return console.error("Failed to update feed",a),!1}}async function D(t){const e=i.items.find(a=>a._id===t);e&&h(t,{starred:!e.starred})}async function Q(t){if(i.items.find(a=>a._id===t))try{const a=await m(`/api/item/${t}/content`);if(a.ok){const n=await a.json();n.full_content&&h(t,{full_content:n.full_content})}}catch(a){console.error("Failed to fetch full content",a)}}async function h(t,e){try{if((await m(`/api/item/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok){const n=i.items.find(s=>s._id===t);if(n){Object.assign(n,e);const s=document.querySelector(`.feed-item[data-id="${t}"]`);if(s){if(e.read!==void 0&&s.classList.toggle("read",e.read),e.starred!==void 0){const r=s.querySelector(".star-btn");r&&(r.classList.toggle("is-starred",e.starred),r.classList.toggle("is-unstarred",!e.starred),r.setAttribute("title",e.starred?"Unstar":"Star"))}e.full_content&&I()}}}}catch(a){console.error("Failed to update item",a)}}async function y(){const t=await m("/api/feed/");if(t.ok){const e=await t.json();i.setFeeds(e)}}async function F(){const t=await m("/api/tag");if(t.ok){const e=await t.json();i.setTags(e)}}async function E(t,e,a=!1){i.setLoading(!0);try{const n=new URLSearchParams;t&&n.append("feed_id",t),e&&n.append("tag",e),i.searchQuery&&n.append("q",i.searchQuery),(i.filter==="starred"||i.filter==="all")&&n.append("read_filter","all"),i.filter==="starred"&&n.append("starred","true"),a&&i.items.length>0&&n.append("max_id",String(i.items[i.items.length-1]._id));const s=await m(`/api/stream?${n.toString()}`);if(s.ok){const r=await s.json();i.setHasMore(r.length>=50),i.setItems(r,a)}}finally{i.setLoading(!1)}}async function j(){const t=o.getCurrentRoute();E(t.params.feedId,t.params.tagName,!0)}async function U(){await m("/api/logout",{method:"POST"}),window.location.href="/login/"}function L(){const t=o.getCurrentRoute(),e=t.query.get("filter");i.setFilter(e||"unread");const a=t.query.get("q");if(a!==null&&i.setSearchQuery(a),t.path==="/settings"){w();return}if(t.path==="/feed"&&t.params.feedId){const n=parseInt(t.params.feedId);i.setActiveFeed(n),E(t.params.feedId),document.getElementById("section-feeds")?.classList.remove("collapsed")}else t.path==="/tag"&&t.params.tagName?(i.setActiveTag(t.params.tagName),E(void 0,t.params.tagName),document.getElementById("section-tags")?.classList.remove("collapsed")):(i.setActiveFeed(null),i.setActiveTag(null),E())}window.addEventListener("keydown",t=>{if(!["INPUT","TEXTAREA"].includes(t.target.tagName))switch(t.key){case"j":S(1);break;case"k":S(-1);break;case"r":if(f){const e=i.items.find(a=>a._id===f);e&&h(e._id,{read:!e.read})}break;case"s":if(f){const e=i.items.find(a=>a._id===f);e&&h(e._id,{starred:!e.starred})}break;case"/":t.preventDefault(),document.getElementById("search-input")?.focus();break}});function S(t){if(i.items.length===0)return;let e=i.items.findIndex(a=>a._id===f);if(e+=t,e>=0&&e{const t=document.getElementById("search-input");t&&t.value!==i.searchQuery&&(t.value=i.searchQuery),L()});i.on("theme-updated",()=>{p||(p=document.querySelector("#app")),p&&(p.className=`theme-${i.theme} font-${i.fontTheme}`)});i.on("sidebar-toggle",()=>{const t=document.querySelector(".layout");t&&(i.sidebarVisible?(t.classList.remove("sidebar-hidden"),t.classList.add("sidebar-visible")):(t.classList.remove("sidebar-visible"),t.classList.add("sidebar-hidden")))});i.on("items-updated",I);i.on("loading-state-changed",I);o.addEventListener("route-changed",L);window.app={navigate:t=>o.navigate(t)};async function V(){const t=await m("/api/auth");if(!t||t.status===401){window.location.href="/login/";return}P(),k();try{await Promise.all([y(),F()])}catch(e){console.error("Initial fetch failed",e)}L()}typeof window<"u"&&!window.__VITEST__&&V(); diff --git a/web/dist/v3/assets/index-DtCsR798.css b/web/dist/v3/assets/index-DtCsR798.css deleted file mode 100644 index 0ba7283..0000000 --- a/web/dist/v3/assets/index-DtCsR798.css +++ /dev/null @@ -1 +0,0 @@ -:root{--font-body: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;--font-heading: "Helvetica Neue", Helvetica, Arial, sans-serif;--font-sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;line-height:1.5;font-size:18px;--bg-color: #ffffff;--text-color: rgba(0, 0, 0, .87);--sidebar-bg: #f5f5f5;--link-color: #0000ee;--border-color: #e5e5e5;--accent-color: #007bff;color-scheme:light dark}*{box-sizing:border-box}body{margin:0;font-family:var(--font-body);background-color:var(--bg-color);color:var(--text-color);height:100vh;width:100%;max-width:100vw;overflow:hidden}html{overflow-x:hidden;max-width:100vw}#app{height:100%;width:100%}.layout{display:flex;height:100%;width:100%;overflow-x:hidden;position:relative}.sidebar{width:11rem;background:#ffffff0d;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-right:1px solid rgba(255,255,255,.1);display:flex;flex-direction:column;height:100%;overflow:hidden;z-index:100;padding:1.5rem}.theme-dark .sidebar{background:#0003;border-right-color:#ffffff0d}.sidebar-search{margin-bottom:2rem}.sidebar-search input{width:100%;border-radius:20px;background:#0000000d;border:1px solid rgba(255,255,255,.1);color:var(--text-color);padding:.5rem 1rem;font-size:.9rem}.sidebar-scroll{flex:1;overflow-y:auto;margin:0 -1.5rem;padding:0 1.5rem}.sidebar-section h3{font-family:var(--font-sans);font-size:.7rem;text-transform:uppercase;letter-spacing:.1em;opacity:.5;margin-top:2rem;margin-bottom:.5rem;font-weight:700;display:flex;align-items:center;justify-content:space-between;cursor:pointer;-webkit-user-select:none;user-select:none}.sidebar-section h3:hover{opacity:.8}.sidebar-section .caret{font-size:.6rem;transition:transform .2s ease;transform:rotate(90deg)}.sidebar-section.collapsed .caret{transform:rotate(0)}.sidebar-section.collapsed ul{display:none}.sidebar-section ul{list-style:none;padding:0;margin:0}.sidebar-section li a{display:block;padding:.3rem .8rem;margin:.1rem 0;border-radius:8px;transition:all .2s ease;font-weight:500;font-size:.85rem;text-decoration:none;color:var(--text-color);opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--font-sans)}.sidebar-section li a:hover{background:#ffffff1a;opacity:1;transform:translate(4px)}.sidebar-section li.active a{background:#ffffff40;opacity:1;font-weight:700;box-shadow:0 4px 12px #0000001a;border:1px solid rgba(255,255,255,.2)}.sidebar-footer{margin-top:auto;padding-top:1.5rem;border-top:1px solid rgba(255,255,255,.1);display:flex;flex-direction:column;gap:.5rem}.sidebar-footer a{opacity:.6;padding:.5rem .8rem;border-radius:8px;text-decoration:none;color:var(--text-color);font-size:.9rem;font-family:var(--font-sans)}.sidebar-footer a:hover{background:#ffffff0d;opacity:1}.main-content{flex:1;min-width:0;overflow-y:auto;background-color:var(--bg-color);padding:1.5rem 2rem;transition:padding .3s ease}@media(max-width:768px){.main-content{padding:4rem 1rem 1rem}}.main-content>*{max-width:35em;margin-left:auto;margin-right:auto}.sidebar-toggle{position:fixed;top:1rem;left:1rem;z-index:1001;background:var(--sidebar-bg);border:1px solid var(--border-color);border-radius:50%;width:3rem;height:3rem;font-size:1.5rem;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #0000001a;transition:transform .2s cubic-bezier(.175,.885,.32,1.275);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.sidebar-toggle:hover{transform:scale(1.1)}.sidebar-toggle:active{transform:scale(.95)}.sidebar-backdrop{display:none;position:fixed;inset:0;background:#0000004d;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);z-index:999}@media(max-width:768px){.sidebar-visible .sidebar-backdrop{display:block}.sidebar{position:fixed;top:0;left:0;bottom:0;z-index:1000;transform:translate(-100%);transition:transform .3s cubic-bezier(.4,0,.2,1);box-shadow:none}.sidebar-visible .sidebar{transform:translate(0);box-shadow:10px 0 20px #0000001a}.sidebar-visible .sidebar-toggle{left:12rem}}@media(min-width:769px){.sidebar-visible .sidebar-toggle{left:12rem}}.sidebar-hidden .sidebar{display:none}@media(min-width:769px){.sidebar-hidden .sidebar{display:none}.sidebar-visible .sidebar{display:flex}}.item-list{list-style:none;padding:0;margin:0}.feed-item{padding:1rem 0;margin-top:5rem;border-bottom:none}.item-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:.5rem}.item-title{font-family:var(--font-heading);font-size:1.8rem;font-weight:700;text-decoration:none;color:var(--link-color);display:block;flex:1;cursor:pointer}.item-title:hover{text-decoration:underline}.star-btn{background:none;border:none;cursor:pointer;font-size:1.25rem;padding:0 0 0 .5rem;vertical-align:middle;transition:color .2s;line-height:1}.star-btn.is-starred{color:#00f}.star-btn.is-unstarred{color:var(--text-color);opacity:.3}.dateline{margin-top:0;font-weight:400;font-size:.75em;color:#ccc;margin-bottom:1rem}.dateline a{color:#ccc;text-decoration:none}.item-description{color:var(--text-color);line-height:1.5;font-size:1rem;margin-top:1rem;overflow-wrap:break-word;word-break:break-word}.item-description img,.item-description video,.item-description pre{max-width:100%;height:auto;display:block;margin:1rem 0}.item-description pre{white-space:pre-wrap;word-wrap:break-word;overflow-x:auto;background:#0000000d;padding:1em;border-radius:4px}.scrape-btn{background:var(--bg-color);border:1px solid var(--border-color, #ccc);color:#00f;cursor:pointer;font-family:var(--font-heading);font-weight:700;font-size:.8rem;padding:2px 6px;margin-left:.5rem}.theme-dark{--bg-color: #000000;--text-color: #ffffff;--sidebar-bg: #111111;--link-color: rgb(90, 200, 250);--border-color: #333}.font-serif{--font-body: Georgia, "Times New Roman", Times, serif;font-family:var(--font-body)}.font-sans{--font-body: var(--font-heading);font-family:var(--font-body)}.font-mono{--font-body: Menlo, Monaco, Consolas, "Courier New", monospace;font-family:var(--font-body)}.settings-view{padding-top:2rem}.settings-section{margin-bottom:2.5rem}.settings-section h3{font-family:var(--font-heading);border-bottom:1px solid var(--border-color);padding-bottom:.5rem;margin-bottom:1rem}.theme-options{display:flex;gap:1rem}button{border-radius:8px;border:1px solid var(--border-color);padding:.6em 1.2em;font-size:1em;font-weight:700;font-family:inherit;background-color:#f9f9f9;cursor:pointer;transition:all .2s}.theme-dark button{background-color:#1a1a1a;color:#fff;border-color:#333}button.active{border-color:var(--accent-color);background-color:#eef}.theme-dark button.active{background-color:#224;border-color:var(--accent-color)}.add-feed-form{display:flex;gap:.5rem}.add-feed-form input{flex:1;padding:.6rem 1rem;border-radius:8px;border:1px solid var(--border-color);background:var(--bg-color);color:var(--text-color)}.settings-group label{display:block;font-size:.85rem;font-weight:600;margin-bottom:.5rem;opacity:.7}#font-selector{width:100%;padding:.6rem;border-radius:8px;border:1px solid var(--border-color);background:var(--bg-color);color:var(--text-color)}.data-actions button,.data-actions .button{display:inline-block;text-align:center;width:100%}label.button{cursor:pointer} diff --git a/web/dist/v3/assets/index-T5yK9TsL.js b/web/dist/v3/assets/index-T5yK9TsL.js deleted file mode 100644 index 8fa87a5..0000000 --- a/web/dist/v3/assets/index-T5yK9TsL.js +++ /dev/null @@ -1,143 +0,0 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const d of r.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&n(d)}).observe(document,{childList:!0,subtree:!0});function a(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(s){if(s.ep)return;s.ep=!0;const r=a(s);fetch(s.href,r)}})();function A(t){const a=`; ${document.cookie}`.split(`; ${t}=`);if(a.length===2)return a.pop()?.split(";").shift()}async function m(t,e){const a=e?.method?.toUpperCase()||"GET",n=["POST","PUT","DELETE"].includes(a),s=new Headers(e?.headers||{});if(n){const r=A("csrf_token");r&&s.set("X-CSRF-Token",r)}return fetch(t,{...e,headers:s,credentials:"include"})}class R extends EventTarget{feeds=[];tags=[];items=[];activeFeedId=null;activeTagName=null;filter="unread";searchQuery="";loading=!1;hasMore=!0;theme=localStorage.getItem("neko-theme")||"light";fontTheme=localStorage.getItem("neko-font-theme")||"default";sidebarVisible=window.innerWidth>768;setFeeds(e){this.feeds=e,this.emit("feeds-updated")}setTags(e){this.tags=e,this.emit("tags-updated")}setItems(e,a=!1){a?this.items=[...this.items,...e]:this.items=e,this.emit("items-updated")}setActiveFeed(e){this.activeFeedId=e,this.activeTagName=null,this.emit("active-feed-updated")}setActiveTag(e){this.activeTagName=e,this.activeFeedId=null,this.emit("active-tag-updated")}setFilter(e){this.filter!==e&&(this.filter=e,this.emit("filter-updated"))}setSearchQuery(e){this.searchQuery!==e&&(this.searchQuery=e,this.emit("search-updated"))}setLoading(e){this.loading=e,this.emit("loading-state-changed")}setHasMore(e){this.hasMore=e}setTheme(e){this.theme=e,localStorage.setItem("neko-theme",e),this.emit("theme-updated")}setFontTheme(e){this.fontTheme=e,localStorage.setItem("neko-font-theme",e),this.emit("theme-updated")}setSidebarVisible(e){this.sidebarVisible=e,this.emit("sidebar-toggle")}toggleSidebar(){this.setSidebarVisible(!this.sidebarVisible)}emit(e,a){this.dispatchEvent(new CustomEvent(e,{detail:a}))}on(e,a){this.addEventListener(e,a)}}const i=new R;class B extends EventTarget{constructor(){super(),window.addEventListener("popstate",()=>this.handleRouteChange())}handleRouteChange(){this.dispatchEvent(new CustomEvent("route-changed",{detail:this.getCurrentRoute()}))}getCurrentRoute(){const e=new URL(window.location.href),n=e.pathname.replace(/^\/v3\//,"").split("/").filter(Boolean);let s="/";const r={};return n[0]==="feed"&&n[1]?(s="/feed",r.feedId=n[1]):n[0]==="tag"&&n[1]?(s="/tag",r.tagName=decodeURIComponent(n[1])):n[0]==="settings"&&(s="/settings"),{path:s,params:r,query:e.searchParams}}navigate(e,a){let n=`/v3${e}`;if(a){const s=new URLSearchParams(a);n+=`?${s.toString()}`}window.history.pushState({},"",n),this.handleRouteChange()}updateQuery(e){const a=new URL(window.location.href);for(const[n,s]of Object.entries(e))s?a.searchParams.set(n,s):a.searchParams.delete(n);window.history.pushState({},"",a.toString()),this.handleRouteChange()}}const o=new B;function C(t){const e=new Date(t.publish_date).toLocaleDateString();return` -
  • - - - ${t.full_content||t.description?` -
    - ${t.full_content||t.description} -
    - `:""} -
  • - `}let f=null,p=null,b=null;function P(){p=document.querySelector("#app"),p&&(p.className=`theme-${i.theme} font-${i.fontTheme}`,p.innerHTML=` -
    - - - -
    -
    -
    -
    - `,O())}function O(){document.getElementById("search-input")?.addEventListener("input",s=>{const r=s.target.value;o.updateQuery({q:r})}),document.getElementById("logo-link")?.addEventListener("click",()=>o.navigate("/")),document.getElementById("logout-button")?.addEventListener("click",s=>{s.preventDefault(),U()}),document.getElementById("sidebar-toggle-btn")?.addEventListener("click",()=>{i.toggleSidebar()}),document.getElementById("sidebar-backdrop")?.addEventListener("click",()=>{i.setSidebarVisible(!1)}),window.addEventListener("resize",()=>{window.innerWidth>768&&!i.sidebarVisible&&i.setSidebarVisible(!0)}),document.querySelectorAll(".sidebar-section.collapsible h3").forEach(s=>{s.addEventListener("click",()=>{s.parentElement?.classList.toggle("collapsed")})}),document.getElementById("sidebar")?.addEventListener("click",s=>{const d=s.target.closest("a");if(!d)return;const c=d.getAttribute("data-nav"),u=Object.fromEntries(o.getCurrentRoute().query.entries());if(c==="filter"){s.preventDefault();const l=d.getAttribute("data-value");o.getCurrentRoute().path==="/settings"?o.navigate("/",{...u,filter:l}):o.updateQuery({filter:l})}else if(c==="tag"){s.preventDefault();const l=d.getAttribute("data-value");o.navigate(`/tag/${encodeURIComponent(l)}`,u)}else if(c==="feed"){s.preventDefault();const l=d.getAttribute("data-value");i.activeFeedId===parseInt(l)?o.navigate("/",u):o.navigate(`/feed/${l}`,u)}else c==="settings"&&(s.preventDefault(),o.getCurrentRoute().path==="/settings"?o.navigate("/",u):o.navigate("/settings",u));window.innerWidth<=768&&i.setSidebarVisible(!1)}),document.getElementById("content-area")?.addEventListener("click",s=>{const r=s.target,d=r.closest('[data-action="toggle-star"]');if(d){const g=d.closest("[data-id]");if(g){const v=parseInt(g.getAttribute("data-id"));D(v)}return}const c=r.closest('[data-action="scrape"]');if(c){const g=c.closest("[data-id]");if(g){const v=parseInt(g.getAttribute("data-id"));Q(v)}return}const u=r.closest('[data-action="open"]'),l=r.closest(".feed-item");if(l&&!u){const g=parseInt(l.getAttribute("data-id")),v=i.items.find(_=>_._id===g);v&&!v.read&&h(g,{read:!0})}})}function T(){const{feeds:t,activeFeedId:e}=i,a=document.getElementById("feed-list");a&&(a.innerHTML=t.map(n=>` -
  • - - ${n.title||n.url} - -
  • - `).join(""))}function $(){const{tags:t,activeTagName:e}=i,a=document.getElementById("tag-list");a&&(a.innerHTML=t.map(n=>` -
  • - - ${n.title} - -
  • - `).join(""))}function k(){const{filter:t}=i,e=document.getElementById("filter-list");e&&e.querySelectorAll("li").forEach(a=>{a.classList.toggle("active",a.getAttribute("data-filter")===t)})}function I(){const{items:t,loading:e}=i;b&&(b.disconnect(),b=null);const a=document.getElementById("content-area");if(!a||o.getCurrentRoute().path==="/settings")return;if(e&&t.length===0){a.innerHTML='

    Loading items...

    ';return}if(t.length===0){a.innerHTML='

    No items found.

    ';return}a.innerHTML=` -
      - ${t.map(s=>C(s)).join("")} -
    - ${i.hasMore?'
    Loading more...
    ':""} - `;const n=document.getElementById("load-more-sentinel");n&&new IntersectionObserver(r=>{r[0].isIntersecting&&!i.loading&&i.hasMore&&j()},{threshold:.1}).observe(n),b=new IntersectionObserver(s=>{s.forEach(r=>{if(r.isIntersecting){const d=r.target,c=parseInt(d.getAttribute("data-id")||"0");if(c){const u=i.items.find(l=>l._id===c);u&&!u.read&&(h(c,{read:!0}),b?.unobserve(d))}}})},{threshold:.5}),a.querySelectorAll(".feed-item").forEach(s=>b.observe(s))}function w(){const t=document.getElementById("content-area");t&&(t.innerHTML=` -
    -

    Settings

    - -
    -

    Add Feed

    -
    - - -
    -
    - -
    -

    Appearance

    -
    - -
    - - -
    -
    -
    - - -
    -
    - -
    -

    Manage Feeds

    -
      - ${i.feeds.map(e=>` -
    • -
      -
      ${e.title||e.url}
      -
      ${e.url}
      -
      -
      - - - -
      -
    • - `).join("")} -
    -
    - -
    -

    Data Management

    -
    - -
    - - -
    -
    -
    -
    - `,document.getElementById("theme-options")?.addEventListener("click",e=>{const a=e.target.closest("button");if(a){const n=a.getAttribute("data-theme");i.setTheme(n),w()}}),document.getElementById("font-selector")?.addEventListener("change",e=>{i.setFontTheme(e.target.value)}),document.getElementById("add-feed-btn")?.addEventListener("click",async()=>{const e=document.getElementById("new-feed-url"),a=e.value.trim();a&&(await M(a)?(e.value="",alert("Feed added successfully!"),y()):alert("Failed to add feed."))}),document.getElementById("export-opml-btn")?.addEventListener("click",()=>{window.location.href="/api/export/opml"}),document.getElementById("import-opml-file")?.addEventListener("change",async e=>{const a=e.target.files?.[0];a&&(await q(a)?(alert("OPML imported successfully! Crawling started."),y()):alert("Failed to import OPML."))}),document.querySelectorAll(".delete-feed-btn").forEach(e=>{e.addEventListener("click",async a=>{const n=parseInt(a.target.getAttribute("data-id"));confirm("Are you sure you want to delete this feed?")&&(await x(n),y(),await y(),w())})}),document.querySelectorAll(".update-feed-tag-btn").forEach(e=>{e.addEventListener("click",async a=>{const n=parseInt(a.target.getAttribute("data-id")),r=document.querySelector(`.feed-tag-input[data-id="${n}"]`).value.trim();await N(n,{category:r}),await y(),await F(),w(),alert("Feed updated")})}))}async function M(t){try{return(await m("/api/feed",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t})})).ok}catch(e){return console.error("Failed to add feed",e),!1}}async function q(t){try{const e=new FormData;e.append("file",t),e.append("format","opml");const a=document.cookie.split("; ").find(s=>s.startsWith("csrf_token="))?.split("=")[1];return(await fetch("/api/import",{method:"POST",headers:{"X-CSRF-Token":a||""},body:e})).ok}catch(e){return console.error("Failed to import OPML",e),!1}}async function x(t){try{return(await m(`/api/feed/${t}`,{method:"DELETE"})).ok}catch(e){return console.error("Failed to delete feed",e),!1}}async function N(t,e){try{return(await m("/api/feed",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,_id:t})})).ok}catch(a){return console.error("Failed to update feed",a),!1}}async function D(t){const e=i.items.find(a=>a._id===t);e&&h(t,{starred:!e.starred})}async function Q(t){if(i.items.find(a=>a._id===t))try{const a=await m(`/api/item/${t}/content`);if(a.ok){const n=await a.json();n.full_content&&h(t,{full_content:n.full_content})}}catch(a){console.error("Failed to fetch full content",a)}}async function h(t,e){try{if((await m(`/api/item/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok){const n=i.items.find(s=>s._id===t);if(n){Object.assign(n,e);const s=document.querySelector(`.feed-item[data-id="${t}"]`);if(s){if(e.read!==void 0&&s.classList.toggle("read",e.read),e.starred!==void 0){const r=s.querySelector(".star-btn");r&&(r.classList.toggle("is-starred",e.starred),r.classList.toggle("is-unstarred",!e.starred),r.setAttribute("title",e.starred?"Unstar":"Star"))}e.full_content&&I()}}}}catch(a){console.error("Failed to update item",a)}}async function y(){const t=await m("/api/feed/");if(t.ok){const e=await t.json();i.setFeeds(e)}}async function F(){const t=await m("/api/tag");if(t.ok){const e=await t.json();i.setTags(e)}}async function E(t,e,a=!1){i.setLoading(!0);try{const n=new URLSearchParams;t&&n.append("feed_id",t),e&&n.append("tag",e),i.searchQuery&&n.append("q",i.searchQuery),(i.filter==="starred"||i.filter==="all")&&n.append("read_filter","all"),i.filter==="starred"&&n.append("starred","true"),a&&i.items.length>0&&n.append("max_id",String(i.items[i.items.length-1]._id));const s=await m(`/api/stream?${n.toString()}`);if(s.ok){const r=await s.json();i.setHasMore(r.length>=50),i.setItems(r,a)}}finally{i.setLoading(!1)}}async function j(){const t=o.getCurrentRoute();E(t.params.feedId,t.params.tagName,!0)}async function U(){await m("/api/logout",{method:"POST"}),window.location.href="/login/"}function L(){const t=o.getCurrentRoute(),e=t.query.get("filter");i.setFilter(e||"unread");const a=t.query.get("q");if(a!==null&&i.setSearchQuery(a),t.path==="/settings"){w();return}if(t.path==="/feed"&&t.params.feedId){const n=parseInt(t.params.feedId);i.setActiveFeed(n),E(t.params.feedId),document.getElementById("section-feeds")?.classList.remove("collapsed")}else t.path==="/tag"&&t.params.tagName?(i.setActiveTag(t.params.tagName),E(void 0,t.params.tagName),document.getElementById("section-tags")?.classList.remove("collapsed")):(i.setActiveFeed(null),i.setActiveTag(null),E())}window.addEventListener("keydown",t=>{if(!["INPUT","TEXTAREA"].includes(t.target.tagName))switch(t.key){case"j":S(1);break;case"k":S(-1);break;case"r":if(f){const e=i.items.find(a=>a._id===f);e&&h(e._id,{read:!e.read})}break;case"s":if(f){const e=i.items.find(a=>a._id===f);e&&h(e._id,{starred:!e.starred})}break;case"/":t.preventDefault(),document.getElementById("search-input")?.focus();break}});function S(t){if(i.items.length===0)return;let e=i.items.findIndex(a=>a._id===f);if(e+=t,e>=0&&e{const t=document.getElementById("search-input");t&&t.value!==i.searchQuery&&(t.value=i.searchQuery),L()});i.on("theme-updated",()=>{p||(p=document.querySelector("#app")),p&&(p.className=`theme-${i.theme} font-${i.fontTheme}`)});i.on("sidebar-toggle",()=>{const t=document.querySelector(".layout");t&&(i.sidebarVisible?(t.classList.remove("sidebar-hidden"),t.classList.add("sidebar-visible")):(t.classList.remove("sidebar-visible"),t.classList.add("sidebar-hidden")))});i.on("items-updated",I);i.on("loading-state-changed",I);o.addEventListener("route-changed",L);window.app={navigate:t=>o.navigate(t)};async function V(){const t=await m("/api/auth");if(!t||t.status===401){window.location.href="/login/";return}P(),k();try{await Promise.all([y(),F()])}catch(e){console.error("Initial fetch failed",e)}L()}typeof window<"u"&&!window.__VITEST__&&V(); diff --git a/web/dist/v3/index.html b/web/dist/v3/index.html index 596362b..881d51e 100644 --- a/web/dist/v3/index.html +++ b/web/dist/v3/index.html @@ -5,8 +5,8 @@ frontend-vanilla - - + +
    -- cgit v1.2.3