turbollm 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
function PT(e,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const s in a)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(a,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>a[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function r(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(s){if(s.ep)return;s.ep=!0;const l=r(s);fetch(s.href,l)}})();function Gl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tm={exports:{}},gl={};var Lv;function UT(){if(Lv)return gl;Lv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var f in s)f!=="key"&&(l[f]=s[f])}else l=s;return s=l.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:l}}return gl.Fragment=t,gl.jsx=r,gl.jsxs=r,gl}var Iv;function FT(){return Iv||(Iv=1,tm.exports=UT()),tm.exports}var d=FT(),nm={exports:{}},Ve={};var zv;function HT(){if(zv)return Ve;zv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),x=Symbol.iterator;function v(I){return I===null||typeof I!="object"?null:(I=x&&I[x]||I["@@iterator"],typeof I=="function"?I:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,N={};function k(I,q,A){this.props=I,this.context=q,this.refs=N,this.updater=A||E}k.prototype.isReactComponent={},k.prototype.setState=function(I,q){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,q,"setState")},k.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function M(){}M.prototype=k.prototype;function R(I,q,A){this.props=I,this.context=q,this.refs=N,this.updater=A||E}var O=R.prototype=new M;O.constructor=R,S(O,k.prototype),O.isPureReactComponent=!0;var P=Array.isArray;function D(){}var U={H:null,A:null,T:null,S:null},B=Object.prototype.hasOwnProperty;function J(I,q,A){var $=A.ref;return{$$typeof:e,type:I,key:q,ref:$!==void 0?$:null,props:A}}function F(I,q){return J(I.type,q,I.props)}function ae(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function ee(I){var q={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(A){return q[A]})}var ce=/\/+/g;function te(I,q){return typeof I=="object"&&I!==null&&I.key!=null?ee(""+I.key):q.toString(36)}function Q(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(D,D):(I.status="pending",I.then(function(q){I.status==="pending"&&(I.status="fulfilled",I.value=q)},function(q){I.status==="pending"&&(I.status="rejected",I.reason=q)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function j(I,q,A,$,ue){var de=typeof I;(de==="undefined"||de==="boolean")&&(I=null);var Se=!1;if(I===null)Se=!0;else switch(de){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(I.$$typeof){case e:case t:Se=!0;break;case g:return Se=I._init,j(Se(I._payload),q,A,$,ue)}}if(Se)return ue=ue(I),Se=$===""?"."+te(I,0):$,P(ue)?(A="",Se!=null&&(A=Se.replace(ce,"$&/")+"/"),j(ue,q,A,"",function(dt){return dt})):ue!=null&&(ae(ue)&&(ue=F(ue,A+(ue.key==null||I&&I.key===ue.key?"":(""+ue.key).replace(ce,"$&/")+"/")+Se)),q.push(ue)),1;Se=0;var Ee=$===""?".":$+":";if(P(I))for(var Ce=0;Ce<I.length;Ce++)$=I[Ce],de=Ee+te($,Ce),Se+=j($,q,A,de,ue);else if(Ce=v(I),typeof Ce=="function")for(I=Ce.call(I),Ce=0;!($=I.next()).done;)$=$.value,de=Ee+te($,Ce++),Se+=j($,q,A,de,ue);else if(de==="object"){if(typeof I.then=="function")return j(Q(I),q,A,$,ue);throw q=String(I),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Se}function V(I,q,A){if(I==null)return I;var $=[],ue=0;return j(I,$,"","",function(de){return q.call(A,de,ue++)}),$}function Z(I){if(I._status===-1){var q=I._result;q=q(),q.then(function(A){(I._status===0||I._status===-1)&&(I._status=1,I._result=A)},function(A){(I._status===0||I._status===-1)&&(I._status=2,I._result=A)}),I._status===-1&&(I._status=0,I._result=q)}if(I._status===1)return I._result.default;throw I._result}var ie=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},T={map:V,forEach:function(I,q,A){V(I,function(){q.apply(this,arguments)},A)},count:function(I){var q=0;return V(I,function(){q++}),q},toArray:function(I){return V(I,function(q){return q})||[]},only:function(I){if(!ae(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return Ve.Activity=h,Ve.Children=T,Ve.Component=k,Ve.Fragment=r,Ve.Profiler=s,Ve.PureComponent=R,Ve.StrictMode=a,Ve.Suspense=m,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(I){return U.H.useMemoCache(I)}},Ve.cache=function(I){return function(){return I.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(I,q,A){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var $=S({},I.props),ue=I.key;if(q!=null)for(de in q.key!==void 0&&(ue=""+q.key),q)!B.call(q,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&q.ref===void 0||($[de]=q[de]);var de=arguments.length-2;if(de===1)$.children=A;else if(1<de){for(var Se=Array(de),Ee=0;Ee<de;Ee++)Se[Ee]=arguments[Ee+2];$.children=Se}return J(I.type,ue,$)},Ve.createContext=function(I){return I={$$typeof:c,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:l,_context:I},I},Ve.createElement=function(I,q,A){var $,ue={},de=null;if(q!=null)for($ in q.key!==void 0&&(de=""+q.key),q)B.call(q,$)&&$!=="key"&&$!=="__self"&&$!=="__source"&&(ue[$]=q[$]);var Se=arguments.length-2;if(Se===1)ue.children=A;else if(1<Se){for(var Ee=Array(Se),Ce=0;Ce<Se;Ce++)Ee[Ce]=arguments[Ce+2];ue.children=Ee}if(I&&I.defaultProps)for($ in Se=I.defaultProps,Se)ue[$]===void 0&&(ue[$]=Se[$]);return J(I,de,ue)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(I){return{$$typeof:f,render:I}},Ve.isValidElement=ae,Ve.lazy=function(I){return{$$typeof:g,_payload:{_status:-1,_result:I},_init:Z}},Ve.memo=function(I,q){return{$$typeof:p,type:I,compare:q===void 0?null:q}},Ve.startTransition=function(I){var q=U.T,A={};U.T=A;try{var $=I(),ue=U.S;ue!==null&&ue(A,$),typeof $=="object"&&$!==null&&typeof $.then=="function"&&$.then(D,ie)}catch(de){ie(de)}finally{q!==null&&A.types!==null&&(q.types=A.types),U.T=q}},Ve.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},Ve.use=function(I){return U.H.use(I)},Ve.useActionState=function(I,q,A){return U.H.useActionState(I,q,A)},Ve.useCallback=function(I,q){return U.H.useCallback(I,q)},Ve.useContext=function(I){return U.H.useContext(I)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(I,q){return U.H.useDeferredValue(I,q)},Ve.useEffect=function(I,q){return U.H.useEffect(I,q)},Ve.useEffectEvent=function(I){return U.H.useEffectEvent(I)},Ve.useId=function(){return U.H.useId()},Ve.useImperativeHandle=function(I,q,A){return U.H.useImperativeHandle(I,q,A)},Ve.useInsertionEffect=function(I,q){return U.H.useInsertionEffect(I,q)},Ve.useLayoutEffect=function(I,q){return U.H.useLayoutEffect(I,q)},Ve.useMemo=function(I,q){return U.H.useMemo(I,q)},Ve.useOptimistic=function(I,q){return U.H.useOptimistic(I,q)},Ve.useReducer=function(I,q,A){return U.H.useReducer(I,q,A)},Ve.useRef=function(I){return U.H.useRef(I)},Ve.useState=function(I){return U.H.useState(I)},Ve.useSyncExternalStore=function(I,q,A){return U.H.useSyncExternalStore(I,q,A)},Ve.useTransition=function(){return U.H.useTransition()},Ve.version="19.2.7",Ve}var Bv;function Rh(){return Bv||(Bv=1,nm.exports=HT()),nm.exports}var w=Rh();const be=Gl(w),Mh=PT({__proto__:null,default:be},[w]);var rm={exports:{}},bl={},im={exports:{}},am={};var Pv;function $T(){return Pv||(Pv=1,(function(e){function t(j,V){var Z=j.length;j.push(V);e:for(;0<Z;){var ie=Z-1>>>1,T=j[ie];if(0<s(T,V))j[ie]=V,j[Z]=T,Z=ie;else break e}}function r(j){return j.length===0?null:j[0]}function a(j){if(j.length===0)return null;var V=j[0],Z=j.pop();if(Z!==V){j[0]=Z;e:for(var ie=0,T=j.length,I=T>>>1;ie<I;){var q=2*(ie+1)-1,A=j[q],$=q+1,ue=j[$];if(0>s(A,Z))$<T&&0>s(ue,A)?(j[ie]=ue,j[$]=Z,ie=$):(j[ie]=A,j[q]=Z,ie=q);else if($<T&&0>s(ue,Z))j[ie]=ue,j[$]=Z,ie=$;else break e}}return V}function s(j,V){var Z=j.sortIndex-V.sortIndex;return Z!==0?Z:j.id-V.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var m=[],p=[],g=1,h=null,x=3,v=!1,E=!1,S=!1,N=!1,k=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function O(j){for(var V=r(p);V!==null;){if(V.callback===null)a(p);else if(V.startTime<=j)a(p),V.sortIndex=V.expirationTime,t(m,V);else break;V=r(p)}}function P(j){if(S=!1,O(j),!E)if(r(m)!==null)E=!0,D||(D=!0,ee());else{var V=r(p);V!==null&&Q(P,V.startTime-j)}}var D=!1,U=-1,B=5,J=-1;function F(){return N?!0:!(e.unstable_now()-J<B)}function ae(){if(N=!1,D){var j=e.unstable_now();J=j;var V=!0;try{e:{E=!1,S&&(S=!1,M(U),U=-1),v=!0;var Z=x;try{t:{for(O(j),h=r(m);h!==null&&!(h.expirationTime>j&&F());){var ie=h.callback;if(typeof ie=="function"){h.callback=null,x=h.priorityLevel;var T=ie(h.expirationTime<=j);if(j=e.unstable_now(),typeof T=="function"){h.callback=T,O(j),V=!0;break t}h===r(m)&&a(m),O(j)}else a(m);h=r(m)}if(h!==null)V=!0;else{var I=r(p);I!==null&&Q(P,I.startTime-j),V=!1}}break e}finally{h=null,x=Z,v=!1}V=void 0}}finally{V?ee():D=!1}}}var ee;if(typeof R=="function")ee=function(){R(ae)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,te=ce.port2;ce.port1.onmessage=ae,ee=function(){te.postMessage(null)}}else ee=function(){k(ae,0)};function Q(j,V){U=k(function(){j(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(j){switch(x){case 1:case 2:case 3:var V=3;break;default:V=x}var Z=x;x=V;try{return j()}finally{x=Z}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(j,V){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var Z=x;x=j;try{return V()}finally{x=Z}},e.unstable_scheduleCallback=function(j,V,Z){var ie=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?ie+Z:ie):Z=ie,j){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=Z+T,j={id:g++,callback:V,priorityLevel:j,startTime:Z,expirationTime:T,sortIndex:-1},Z>ie?(j.sortIndex=Z,t(p,j),r(m)===null&&j===r(p)&&(S?(M(U),U=-1):S=!0,Q(P,Z-ie))):(j.sortIndex=T,t(m,j),E||v||(E=!0,D||(D=!0,ee()))),j},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(j){var V=x;return function(){var Z=x;x=V;try{return j.apply(this,arguments)}finally{x=Z}}}})(am)),am}var Uv;function qT(){return Uv||(Uv=1,im.exports=$T()),im.exports}var om={exports:{}},An={};var Fv;function GT(){if(Fv)return An;Fv=1;var e=Rh();function t(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(m,p,g){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:h==null?null:""+h,children:m,containerInfo:p,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return An.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,An.createPortal=function(m,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return l(m,p,null,g)},An.flushSync=function(m){var p=c.T,g=a.p;try{if(c.T=null,a.p=2,m)return m()}finally{c.T=p,a.p=g,a.d.f()}},An.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(m,p))},An.prefetchDNS=function(m){typeof m=="string"&&a.d.D(m)},An.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var g=p.as,h=f(g,p.crossOrigin),x=typeof p.integrity=="string"?p.integrity:void 0,v=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?a.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:h,integrity:x,fetchPriority:v}):g==="script"&&a.d.X(m,{crossOrigin:h,integrity:x,fetchPriority:v,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},An.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=f(p.as,p.crossOrigin);a.d.M(m,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(m)},An.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,h=f(g,p.crossOrigin);a.d.L(m,g,{crossOrigin:h,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},An.preloadModule=function(m,p){if(typeof m=="string")if(p){var g=f(p.as,p.crossOrigin);a.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(m)},An.requestFormReset=function(m){a.d.r(m)},An.unstable_batchedUpdates=function(m,p){return m(p)},An.useFormState=function(m,p,g){return c.H.useFormState(m,p,g)},An.useFormStatus=function(){return c.H.useHostTransitionStatus()},An.version="19.2.7",An}var Hv;function pE(){if(Hv)return om.exports;Hv=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),om.exports=GT(),om.exports}var $v;function KT(){if($v)return bl;$v=1;var e=qT(),t=Rh(),r=pE();function a(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)i+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function l(n){var i=n,o=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(o=i.return),n=i.return;while(n)}return i.tag===3?o:null}function c(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function f(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function m(n){if(l(n)!==n)throw Error(a(188))}function p(n){var i=n.alternate;if(!i){if(i=l(n),i===null)throw Error(a(188));return i!==n?null:n}for(var o=n,u=i;;){var b=o.return;if(b===null)break;var y=b.alternate;if(y===null){if(u=b.return,u!==null){o=u;continue}break}if(b.child===y.child){for(y=b.child;y;){if(y===o)return m(b),n;if(y===u)return m(b),i;y=y.sibling}throw Error(a(188))}if(o.return!==u.return)o=b,u=y;else{for(var _=!1,C=b.child;C;){if(C===o){_=!0,o=b,u=y;break}if(C===u){_=!0,u=b,o=y;break}C=C.sibling}if(!_){for(C=y.child;C;){if(C===o){_=!0,o=y,u=b;break}if(C===u){_=!0,u=y,o=b;break}C=C.sibling}if(!_)throw Error(a(189))}}if(o.alternate!==u)throw Error(a(190))}if(o.tag!==3)throw Error(a(188));return o.stateNode.current===o?n:i}function g(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=g(n),i!==null)return i;n=n.sibling}return null}var h=Object.assign,x=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),R=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function ee(n){return n===null||typeof n!="object"?null:(n=ae&&n[ae]||n["@@iterator"],typeof n=="function"?n:null)}var ce=Symbol.for("react.client.reference");function te(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ce?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case S:return"Fragment";case k:return"Profiler";case N:return"StrictMode";case P:return"Suspense";case D:return"SuspenseList";case J:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case E:return"Portal";case R:return n.displayName||"Context";case M:return(n._context.displayName||"Context")+".Consumer";case O:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case U:return i=n.displayName||null,i!==null?i:te(n.type)||"Memo";case B:i=n._payload,n=n._init;try{return te(n(i))}catch{}}return null}var Q=Array.isArray,j=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},ie=[],T=-1;function I(n){return{current:n}}function q(n){0>T||(n.current=ie[T],ie[T]=null,T--)}function A(n,i){T++,ie[T]=n.current,n.current=i}var $=I(null),ue=I(null),de=I(null),Se=I(null);function Ee(n,i){switch(A(de,i),A(ue,n),A($,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?iv(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=iv(i),n=av(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}q($),A($,n)}function Ce(){q($),q(ue),q(de)}function dt(n){n.memoizedState!==null&&A(Se,n);var i=$.current,o=av(i,n.type);i!==o&&(A(ue,n),A($,o))}function St(n){ue.current===n&&(q($),q(ue)),Se.current===n&&(q(Se),fl._currentValue=Z)}var Lt,ln;function gt(n){if(Lt===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);Lt=i&&i[1]||"",ln=-1<o.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+Lt+n+ln}var On=!1;function Je(n,i){if(!n||On)return"";On=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(i){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(ne){var W=ne}Reflect.construct(n,[],le)}else{try{le.call()}catch(ne){W=ne}n.call(le.prototype)}}else{try{throw Error()}catch(ne){W=ne}(le=n())&&typeof le.catch=="function"&&le.catch(function(){})}}catch(ne){if(ne&&W&&typeof ne.stack=="string")return[ne.stack,W.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var b=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");b&&b.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),_=y[0],C=y[1];if(_&&C){var z=_.split(`
|
|
4
|
-
`),X=C.split(`
|
|
5
|
-
`);for(b=u=0;u<z.length&&!z[u].includes("DetermineComponentFrameRoot");)u++;for(;b<X.length&&!X[b].includes("DetermineComponentFrameRoot");)b++;if(u===z.length||b===X.length)for(u=z.length-1,b=X.length-1;1<=u&&0<=b&&z[u]!==X[b];)b--;for(;1<=u&&0<=b;u--,b--)if(z[u]!==X[b]){if(u!==1||b!==1)do if(u--,b--,0>b||z[u]!==X[b]){var oe=`
|
|
6
|
-
`+z[u].replace(" at new "," at ");return n.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",n.displayName)),oe}while(1<=u&&0<=b);break}}}finally{On=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?gt(o):""}function cn(n,i){switch(n.tag){case 26:case 27:case 5:return gt(n.type);case 16:return gt("Lazy");case 13:return n.child!==i&&i!==null?gt("Suspense Fallback"):gt("Suspense");case 19:return gt("SuspenseList");case 0:case 15:return Je(n.type,!1);case 11:return Je(n.type.render,!1);case 1:return Je(n.type,!0);case 31:return gt("Activity");default:return""}}function bn(n){try{var i="",o=null;do i+=cn(n,o),o=n,n=n.return;while(n);return i}catch(u){return`
|
|
7
|
-
Error generating stack: `+u.message+`
|
|
8
|
-
`+u.stack}}var $t=Object.prototype.hasOwnProperty,Pn=e.unstable_scheduleCallback,kr=e.unstable_cancelCallback,Qt=e.unstable_shouldYield,un=e.unstable_requestPaint,fe=e.unstable_now,Qe=e.unstable_getCurrentPriorityLevel,K=e.unstable_ImmediatePriority,pe=e.unstable_UserBlockingPriority,we=e.unstable_NormalPriority,$e=e.unstable_LowPriority,Te=e.unstable_IdlePriority,Vt=e.log,Jt=e.unstable_setDisableYieldValue,qt=null,Bt=null;function dn(n){if(typeof Vt=="function"&&Jt(n),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(qt,n)}catch{}}var ft=Math.clz32?Math.clz32:Zn,pr=Math.log,fn=Math.LN2;function Zn(n){return n>>>=0,n===0?32:31-(pr(n)/fn|0)|0}var oi=256,Bi=262144,Pr=4194304;function yn(n){var i=n&42;if(i!==0)return i;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function L(n,i,o){var u=n.pendingLanes;if(u===0)return 0;var b=0,y=n.suspendedLanes,_=n.pingedLanes;n=n.warmLanes;var C=u&134217727;return C!==0?(u=C&~y,u!==0?b=yn(u):(_&=C,_!==0?b=yn(_):o||(o=C&~n,o!==0&&(b=yn(o))))):(C=u&~y,C!==0?b=yn(C):_!==0?b=yn(_):o||(o=u&~n,o!==0&&(b=yn(o)))),b===0?0:i!==0&&i!==b&&(i&y)===0&&(y=b&-b,o=i&-i,y>=o||y===32&&(o&4194048)!==0)?i:b}function re(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function me(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ae(){var n=Pr;return Pr<<=1,(Pr&62914560)===0&&(Pr=4194304),n}function yt(n){for(var i=[],o=0;31>o;o++)i.push(n);return i}function Ge(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function xe(n,i,o,u,b,y){var _=n.pendingLanes;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=o,n.entangledLanes&=o,n.errorRecoveryDisabledLanes&=o,n.shellSuspendCounter=0;var C=n.entanglements,z=n.expirationTimes,X=n.hiddenUpdates;for(o=_&~o;0<o;){var oe=31-ft(o),le=1<<oe;C[oe]=0,z[oe]=-1;var W=X[oe];if(W!==null)for(X[oe]=null,oe=0;oe<W.length;oe++){var ne=W[oe];ne!==null&&(ne.lane&=-536870913)}o&=~le}u!==0&&ve(n,u,0),y!==0&&b===0&&n.tag!==0&&(n.suspendedLanes|=y&~(_&~i))}function ve(n,i,o){n.pendingLanes|=i,n.suspendedLanes&=~i;var u=31-ft(i);n.entangledLanes|=i,n.entanglements[u]=n.entanglements[u]|1073741824|o&261930}function Re(n,i){var o=n.entangledLanes|=i;for(n=n.entanglements;o;){var u=31-ft(o),b=1<<u;b&i|n[u]&i&&(n[u]|=i),o&=~b}}function ut(n,i){var o=i&-i;return o=(o&42)!==0?1:At(o),(o&(n.suspendedLanes|i))!==0?0:o}function At(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function xn(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function Sa(){var n=V.p;return n!==0?n:(n=window.event,n===void 0?32:Tv(n.type))}function lo(n,i){var o=V.p;try{return V.p=n,i()}finally{V.p=o}}var Ur=Math.random().toString(36).slice(2),Yt="__reactFiber$"+Ur,Cn="__reactProps$"+Ur,Pi="__reactContainer$"+Ur,Ss="__reactEvents$"+Ur,lc="__reactListeners$"+Ur,co="__reactHandles$"+Ur,cc="__reactResources$"+Ur,_a="__reactMarker$"+Ur;function _s(n){delete n[Yt],delete n[Cn],delete n[Ss],delete n[lc],delete n[co]}function Dn(n){var i=n[Yt];if(i)return i;for(var o=n.parentNode;o;){if(i=o[Pi]||o[Yt]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(n=fv(n);n!==null;){if(o=n[Yt])return o;n=fv(n)}return i}n=o,o=n.parentNode}return null}function si(n){if(n=n[Yt]||n[Pi]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function Ui(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(a(33))}function Fi(n){var i=n[cc];return i||(i=n[cc]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function en(n){n[_a]=!0}var uc=new Set,ka={};function li(n,i){he(n,i),he(n+"Capture",i)}function he(n,i){for(ka[n]=i,n=0;n<i.length;n++)uc.add(i[n])}var Ie=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),tt={},xt={};function Xt(n){return $t.call(xt,n)?!0:$t.call(tt,n)?!1:Ie.test(n)?xt[n]=!0:(tt[n]=!0,!1)}function Tn(n,i,o){if(Xt(i))if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var u=i.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+o)}}function Wn(n,i,o){if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttribute(i,""+o)}}function Un(n,i,o,u){if(u===null)n.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(i,o,""+u)}}function jt(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Jn(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function dc(n,i,o){var u=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var b=u.get,y=u.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return b.call(this)},set:function(_){o=""+_,y.call(this,_)}}),Object.defineProperty(n,i,{enumerable:u.enumerable}),{getValue:function(){return o},setValue:function(_){o=""+_},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function uo(n){if(!n._valueTracker){var i=Jn(n)?"checked":"value";n._valueTracker=dc(n,i,""+n[i])}}function ks(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var o=i.getValue(),u="";return n&&(u=Jn(n)?n.checked?"true":"false":n.value),n=u,n!==o?(i.setValue(n),!0):!1}function fo(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Jd=/[\n"\\]/g;function Fn(n){return n.replace(Jd,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Ns(n,i,o,u,b,y,_,C){n.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?n.type=_:n.removeAttribute("type"),i!=null?_==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+jt(i)):n.value!==""+jt(i)&&(n.value=""+jt(i)):_!=="submit"&&_!=="reset"||n.removeAttribute("value"),i!=null?po(n,_,jt(i)):o!=null?po(n,_,jt(o)):u!=null&&n.removeAttribute("value"),b==null&&y!=null&&(n.defaultChecked=!!y),b!=null&&(n.checked=b&&typeof b!="function"&&typeof b!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?n.name=""+jt(C):n.removeAttribute("name")}function Na(n,i,o,u,b,y,_,C){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.type=y),i!=null||o!=null){if(!(y!=="submit"&&y!=="reset"||i!=null)){uo(n);return}o=o!=null?""+jt(o):"",i=i!=null?""+jt(i):o,C||i===n.value||(n.value=i),n.defaultValue=i}u=u??b,u=typeof u!="function"&&typeof u!="symbol"&&!!u,n.checked=C?n.checked:!!u,n.defaultChecked=!!u,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(n.name=_),uo(n)}function po(n,i,o){i==="number"&&fo(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function vn(n,i,o,u){if(n=n.options,i){i={};for(var b=0;b<o.length;b++)i["$"+o[b]]=!0;for(o=0;o<n.length;o++)b=i.hasOwnProperty("$"+n[o].value),n[o].selected!==b&&(n[o].selected=b),b&&u&&(n[o].defaultSelected=!0)}else{for(o=""+jt(o),i=null,b=0;b<n.length;b++){if(n[b].value===o){n[b].selected=!0,u&&(n[b].defaultSelected=!0);return}i!==null||n[b].disabled||(i=n[b])}i!==null&&(i.selected=!0)}}function fc(n,i,o){if(i!=null&&(i=""+jt(i),i!==n.value&&(n.value=i),o==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=o!=null?""+jt(o):""}function mo(n,i,o,u){if(i==null){if(u!=null){if(o!=null)throw Error(a(92));if(Q(u)){if(1<u.length)throw Error(a(93));u=u[0]}o=u}o==null&&(o=""),i=o}o=jt(i),n.defaultValue=o,u=n.textContent,u===o&&u!==""&&u!==null&&(n.value=u),uo(n)}function Fe(n,i){if(i){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=i;return}}n.textContent=i}var pc=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function tn(n,i,o){var u=i.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":u?n.setProperty(i,o):typeof o!="number"||o===0||pc.has(i)?i==="float"?n.cssFloat=o:n[i]=(""+o).trim():n[i]=o+"px"}function vt(n,i,o){if(i!=null&&typeof i!="object")throw Error(a(62));if(n=n.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||i!=null&&i.hasOwnProperty(u)||(u.indexOf("--")===0?n.setProperty(u,""):u==="float"?n.cssFloat="":n[u]="");for(var b in i)u=i[b],i.hasOwnProperty(b)&&o[b]!==u&&tn(n,b,u)}else for(var y in i)i.hasOwnProperty(y)&&tn(n,y,i[y])}function Hi(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ci=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Cs=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $i(n){return Cs.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function ye(){}var Me=null;function Ye(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var at=null,Ht=null;function mr(n){var i=si(n);if(i&&(n=i.stateNode)){var o=n[Cn]||null;e:switch(n=i.stateNode,i.type){case"input":if(Ns(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),i=o.name,o.type==="radio"&&i!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Fn(""+i)+'"][type="radio"]'),i=0;i<o.length;i++){var u=o[i];if(u!==n&&u.form===n.form){var b=u[Cn]||null;if(!b)throw Error(a(90));Ns(u,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(i=0;i<o.length;i++)u=o[i],u.form===n.form&&ks(u)}break e;case"textarea":fc(n,o.value,o.defaultValue);break e;case"select":i=o.value,i!=null&&vn(n,!!o.multiple,i,!1)}}}var Ts=!1;function mc(n,i,o){if(Ts)return n(i,o);Ts=!0;try{var u=n(i);return u}finally{if(Ts=!1,(at!==null||Ht!==null)&&(tu(),at&&(i=at,n=Ht,Ht=at=null,mr(i),n)))for(i=0;i<n.length;i++)mr(n[i])}}function As(n,i){var o=n.stateNode;if(o===null)return null;var u=o[Cn]||null;if(u===null)return null;o=u[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(a(231,i,typeof o));return o}var ui=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ef=!1;if(ui)try{var Rs={};Object.defineProperty(Rs,"passive",{get:function(){ef=!0}}),window.addEventListener("test",Rs,Rs),window.removeEventListener("test",Rs,Rs)}catch{ef=!1}var qi=null,tf=null,hc=null;function ab(){if(hc)return hc;var n,i=tf,o=i.length,u,b="value"in qi?qi.value:qi.textContent,y=b.length;for(n=0;n<o&&i[n]===b[n];n++);var _=o-n;for(u=1;u<=_&&i[o-u]===b[y-u];u++);return hc=b.slice(n,1<u?1-u:void 0)}function gc(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function bc(){return!0}function ob(){return!1}function Hn(n){function i(o,u,b,y,_){this._reactName=o,this._targetInst=b,this.type=u,this.nativeEvent=y,this.target=_,this.currentTarget=null;for(var C in n)n.hasOwnProperty(C)&&(o=n[C],this[C]=o?o(y):y[C]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?bc:ob,this.isPropagationStopped=ob,this}return h(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=bc)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=bc)},persist:function(){},isPersistent:bc}),i}var Ca={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yc=Hn(Ca),Ms=h({},Ca,{view:0,detail:0}),zN=Hn(Ms),nf,rf,Os,xc=h({},Ms,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:of,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Os&&(Os&&n.type==="mousemove"?(nf=n.screenX-Os.screenX,rf=n.screenY-Os.screenY):rf=nf=0,Os=n),nf)},movementY:function(n){return"movementY"in n?n.movementY:rf}}),sb=Hn(xc),BN=h({},xc,{dataTransfer:0}),PN=Hn(BN),UN=h({},Ms,{relatedTarget:0}),af=Hn(UN),FN=h({},Ca,{animationName:0,elapsedTime:0,pseudoElement:0}),HN=Hn(FN),$N=h({},Ca,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),qN=Hn($N),GN=h({},Ca,{data:0}),lb=Hn(GN),KN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},QN={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},VN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function YN(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=VN[n])?!!i[n]:!1}function of(){return YN}var XN=h({},Ms,{key:function(n){if(n.key){var i=KN[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=gc(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?QN[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:of,charCode:function(n){return n.type==="keypress"?gc(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?gc(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),ZN=Hn(XN),WN=h({},xc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cb=Hn(WN),JN=h({},Ms,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:of}),eC=Hn(JN),tC=h({},Ca,{propertyName:0,elapsedTime:0,pseudoElement:0}),nC=Hn(tC),rC=h({},xc,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),iC=Hn(rC),aC=h({},Ca,{newState:0,oldState:0}),oC=Hn(aC),sC=[9,13,27,32],sf=ui&&"CompositionEvent"in window,Ds=null;ui&&"documentMode"in document&&(Ds=document.documentMode);var lC=ui&&"TextEvent"in window&&!Ds,ub=ui&&(!sf||Ds&&8<Ds&&11>=Ds),db=" ",fb=!1;function pb(n,i){switch(n){case"keyup":return sC.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mb(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ho=!1;function cC(n,i){switch(n){case"compositionend":return mb(i);case"keypress":return i.which!==32?null:(fb=!0,db);case"textInput":return n=i.data,n===db&&fb?null:n;default:return null}}function uC(n,i){if(ho)return n==="compositionend"||!sf&&pb(n,i)?(n=ab(),hc=tf=qi=null,ho=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return ub&&i.locale!=="ko"?null:i.data;default:return null}}var dC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function hb(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!dC[n.type]:i==="textarea"}function gb(n,i,o,u){at?Ht?Ht.push(u):Ht=[u]:at=u,i=lu(i,"onChange"),0<i.length&&(o=new yc("onChange","change",null,o,u),n.push({event:o,listeners:i}))}var js=null,Ls=null;function fC(n){Wx(n,0)}function vc(n){var i=Ui(n);if(ks(i))return n}function bb(n,i){if(n==="change")return i}var yb=!1;if(ui){var lf;if(ui){var cf="oninput"in document;if(!cf){var xb=document.createElement("div");xb.setAttribute("oninput","return;"),cf=typeof xb.oninput=="function"}lf=cf}else lf=!1;yb=lf&&(!document.documentMode||9<document.documentMode)}function vb(){js&&(js.detachEvent("onpropertychange",Eb),Ls=js=null)}function Eb(n){if(n.propertyName==="value"&&vc(Ls)){var i=[];gb(i,Ls,n,Ye(n)),mc(fC,i)}}function pC(n,i,o){n==="focusin"?(vb(),js=i,Ls=o,js.attachEvent("onpropertychange",Eb)):n==="focusout"&&vb()}function mC(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return vc(Ls)}function hC(n,i){if(n==="click")return vc(i)}function gC(n,i){if(n==="input"||n==="change")return vc(i)}function bC(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var er=typeof Object.is=="function"?Object.is:bC;function Is(n,i){if(er(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var o=Object.keys(n),u=Object.keys(i);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var b=o[u];if(!$t.call(i,b)||!er(n[b],i[b]))return!1}return!0}function wb(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Sb(n,i){var o=wb(n);n=0;for(var u;o;){if(o.nodeType===3){if(u=n+o.textContent.length,n<=i&&u>=i)return{node:o,offset:i-n};n=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=wb(o)}}function _b(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?_b(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function kb(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=fo(n.document);i instanceof n.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)n=i.contentWindow;else break;i=fo(n.document)}return i}function uf(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var yC=ui&&"documentMode"in document&&11>=document.documentMode,go=null,df=null,zs=null,ff=!1;function Nb(n,i,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;ff||go==null||go!==fo(u)||(u=go,"selectionStart"in u&&uf(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),zs&&Is(zs,u)||(zs=u,u=lu(df,"onSelect"),0<u.length&&(i=new yc("onSelect","select",null,i,o),n.push({event:i,listeners:u}),i.target=go)))}function Ta(n,i){var o={};return o[n.toLowerCase()]=i.toLowerCase(),o["Webkit"+n]="webkit"+i,o["Moz"+n]="moz"+i,o}var bo={animationend:Ta("Animation","AnimationEnd"),animationiteration:Ta("Animation","AnimationIteration"),animationstart:Ta("Animation","AnimationStart"),transitionrun:Ta("Transition","TransitionRun"),transitionstart:Ta("Transition","TransitionStart"),transitioncancel:Ta("Transition","TransitionCancel"),transitionend:Ta("Transition","TransitionEnd")},pf={},Cb={};ui&&(Cb=document.createElement("div").style,"AnimationEvent"in window||(delete bo.animationend.animation,delete bo.animationiteration.animation,delete bo.animationstart.animation),"TransitionEvent"in window||delete bo.transitionend.transition);function Aa(n){if(pf[n])return pf[n];if(!bo[n])return n;var i=bo[n],o;for(o in i)if(i.hasOwnProperty(o)&&o in Cb)return pf[n]=i[o];return n}var Tb=Aa("animationend"),Ab=Aa("animationiteration"),Rb=Aa("animationstart"),xC=Aa("transitionrun"),vC=Aa("transitionstart"),EC=Aa("transitioncancel"),Mb=Aa("transitionend"),Ob=new Map,mf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");mf.push("scrollEnd");function Nr(n,i){Ob.set(n,i),li(i,[n])}var Ec=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},hr=[],yo=0,hf=0;function wc(){for(var n=yo,i=hf=yo=0;i<n;){var o=hr[i];hr[i++]=null;var u=hr[i];hr[i++]=null;var b=hr[i];hr[i++]=null;var y=hr[i];if(hr[i++]=null,u!==null&&b!==null){var _=u.pending;_===null?b.next=b:(b.next=_.next,_.next=b),u.pending=b}y!==0&&Db(o,b,y)}}function Sc(n,i,o,u){hr[yo++]=n,hr[yo++]=i,hr[yo++]=o,hr[yo++]=u,hf|=u,n.lanes|=u,n=n.alternate,n!==null&&(n.lanes|=u)}function gf(n,i,o,u){return Sc(n,i,o,u),_c(n)}function Ra(n,i){return Sc(n,null,null,i),_c(n)}function Db(n,i,o){n.lanes|=o;var u=n.alternate;u!==null&&(u.lanes|=o);for(var b=!1,y=n.return;y!==null;)y.childLanes|=o,u=y.alternate,u!==null&&(u.childLanes|=o),y.tag===22&&(n=y.stateNode,n===null||n._visibility&1||(b=!0)),n=y,y=y.return;return n.tag===3?(y=n.stateNode,b&&i!==null&&(b=31-ft(o),n=y.hiddenUpdates,u=n[b],u===null?n[b]=[i]:u.push(i),i.lane=o|536870912),y):null}function _c(n){if(50<al)throw al=0,kp=null,Error(a(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var xo={};function wC(n,i,o,u){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tr(n,i,o,u){return new wC(n,i,o,u)}function bf(n){return n=n.prototype,!(!n||!n.isReactComponent)}function di(n,i){var o=n.alternate;return o===null?(o=tr(n.tag,i,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=i,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&65011712,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,i=n.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o.refCleanup=n.refCleanup,o}function jb(n,i){n.flags&=65011714;var o=n.alternate;return o===null?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,i=o.dependencies,n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),n}function kc(n,i,o,u,b,y){var _=0;if(u=n,typeof n=="function")bf(n)&&(_=1);else if(typeof n=="string")_=CT(n,o,$.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case J:return n=tr(31,o,i,b),n.elementType=J,n.lanes=y,n;case S:return Ma(o.children,b,y,i);case N:_=8,b|=24;break;case k:return n=tr(12,o,i,b|2),n.elementType=k,n.lanes=y,n;case P:return n=tr(13,o,i,b),n.elementType=P,n.lanes=y,n;case D:return n=tr(19,o,i,b),n.elementType=D,n.lanes=y,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case R:_=10;break e;case M:_=9;break e;case O:_=11;break e;case U:_=14;break e;case B:_=16,u=null;break e}_=29,o=Error(a(130,n===null?"null":typeof n,"")),u=null}return i=tr(_,o,i,b),i.elementType=n,i.type=u,i.lanes=y,i}function Ma(n,i,o,u){return n=tr(7,n,u,i),n.lanes=o,n}function yf(n,i,o){return n=tr(6,n,null,i),n.lanes=o,n}function Lb(n){var i=tr(18,null,null,0);return i.stateNode=n,i}function xf(n,i,o){return i=tr(4,n.children!==null?n.children:[],n.key,i),i.lanes=o,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var Ib=new WeakMap;function gr(n,i){if(typeof n=="object"&&n!==null){var o=Ib.get(n);return o!==void 0?o:(i={value:n,source:i,stack:bn(i)},Ib.set(n,i),i)}return{value:n,source:i,stack:bn(i)}}var vo=[],Eo=0,Nc=null,Bs=0,br=[],yr=0,Gi=null,Fr=1,Hr="";function fi(n,i){vo[Eo++]=Bs,vo[Eo++]=Nc,Nc=n,Bs=i}function zb(n,i,o){br[yr++]=Fr,br[yr++]=Hr,br[yr++]=Gi,Gi=n;var u=Fr;n=Hr;var b=32-ft(u)-1;u&=~(1<<b),o+=1;var y=32-ft(i)+b;if(30<y){var _=b-b%5;y=(u&(1<<_)-1).toString(32),u>>=_,b-=_,Fr=1<<32-ft(i)+b|o<<b|u,Hr=y+n}else Fr=1<<y|o<<b|u,Hr=n}function vf(n){n.return!==null&&(fi(n,1),zb(n,1,0))}function Ef(n){for(;n===Nc;)Nc=vo[--Eo],vo[Eo]=null,Bs=vo[--Eo],vo[Eo]=null;for(;n===Gi;)Gi=br[--yr],br[yr]=null,Hr=br[--yr],br[yr]=null,Fr=br[--yr],br[yr]=null}function Bb(n,i){br[yr++]=Fr,br[yr++]=Hr,br[yr++]=Gi,Fr=i.id,Hr=i.overflow,Gi=n}var En=null,It=null,lt=!1,Ki=null,xr=!1,wf=Error(a(519));function Qi(n){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ps(gr(i,n)),wf}function Pb(n){var i=n.stateNode,o=n.type,u=n.memoizedProps;switch(i[Yt]=n,i[Cn]=u,o){case"dialog":rt("cancel",i),rt("close",i);break;case"iframe":case"object":case"embed":rt("load",i);break;case"video":case"audio":for(o=0;o<sl.length;o++)rt(sl[o],i);break;case"source":rt("error",i);break;case"img":case"image":case"link":rt("error",i),rt("load",i);break;case"details":rt("toggle",i);break;case"input":rt("invalid",i),Na(i,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":rt("invalid",i);break;case"textarea":rt("invalid",i),mo(i,u.value,u.defaultValue,u.children)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||i.textContent===""+o||u.suppressHydrationWarning===!0||nv(i.textContent,o)?(u.popover!=null&&(rt("beforetoggle",i),rt("toggle",i)),u.onScroll!=null&&rt("scroll",i),u.onScrollEnd!=null&&rt("scrollend",i),u.onClick!=null&&(i.onclick=ye),i=!0):i=!1,i||Qi(n,!0)}function Ub(n){for(En=n.return;En;)switch(En.tag){case 5:case 31:case 13:xr=!1;return;case 27:case 3:xr=!0;return;default:En=En.return}}function wo(n){if(n!==En)return!1;if(!lt)return Ub(n),lt=!0,!1;var i=n.tag,o;if((o=i!==3&&i!==27)&&((o=i===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||Up(n.type,n.memoizedProps)),o=!o),o&&It&&Qi(n),Ub(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));It=dv(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(317));It=dv(n)}else i===27?(i=It,sa(n.type)?(n=Gp,Gp=null,It=n):It=i):It=En?Er(n.stateNode.nextSibling):null;return!0}function Oa(){It=En=null,lt=!1}function Sf(){var n=Ki;return n!==null&&(Kn===null?Kn=n:Kn.push.apply(Kn,n),Ki=null),n}function Ps(n){Ki===null?Ki=[n]:Ki.push(n)}var _f=I(null),Da=null,pi=null;function Vi(n,i,o){A(_f,i._currentValue),i._currentValue=o}function mi(n){n._currentValue=_f.current,q(_f)}function kf(n,i,o){for(;n!==null;){var u=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,u!==null&&(u.childLanes|=i)):u!==null&&(u.childLanes&i)!==i&&(u.childLanes|=i),n===o)break;n=n.return}}function Nf(n,i,o,u){var b=n.child;for(b!==null&&(b.return=n);b!==null;){var y=b.dependencies;if(y!==null){var _=b.child;y=y.firstContext;e:for(;y!==null;){var C=y;y=b;for(var z=0;z<i.length;z++)if(C.context===i[z]){y.lanes|=o,C=y.alternate,C!==null&&(C.lanes|=o),kf(y.return,o,n),u||(_=null);break e}y=C.next}}else if(b.tag===18){if(_=b.return,_===null)throw Error(a(341));_.lanes|=o,y=_.alternate,y!==null&&(y.lanes|=o),kf(_,o,n),_=null}else _=b.child;if(_!==null)_.return=b;else for(_=b;_!==null;){if(_===n){_=null;break}if(b=_.sibling,b!==null){b.return=_.return,_=b;break}_=_.return}b=_}}function So(n,i,o,u){n=null;for(var b=i,y=!1;b!==null;){if(!y){if((b.flags&524288)!==0)y=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var _=b.alternate;if(_===null)throw Error(a(387));if(_=_.memoizedProps,_!==null){var C=b.type;er(b.pendingProps.value,_.value)||(n!==null?n.push(C):n=[C])}}else if(b===Se.current){if(_=b.alternate,_===null)throw Error(a(387));_.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(n!==null?n.push(fl):n=[fl])}b=b.return}n!==null&&Nf(i,n,o,u),i.flags|=262144}function Cc(n){for(n=n.firstContext;n!==null;){if(!er(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function ja(n){Da=n,pi=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function wn(n){return Fb(Da,n)}function Tc(n,i){return Da===null&&ja(n),Fb(n,i)}function Fb(n,i){var o=i._currentValue;if(i={context:i,memoizedValue:o,next:null},pi===null){if(n===null)throw Error(a(308));pi=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else pi=pi.next=i;return o}var SC=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(o,u){n.push(u)}};this.abort=function(){i.aborted=!0,n.forEach(function(o){return o()})}},_C=e.unstable_scheduleCallback,kC=e.unstable_NormalPriority,nn={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cf(){return{controller:new SC,data:new Map,refCount:0}}function Us(n){n.refCount--,n.refCount===0&&_C(kC,function(){n.controller.abort()})}var Fs=null,Tf=0,_o=0,ko=null;function NC(n,i){if(Fs===null){var o=Fs=[];Tf=0,_o=Mp(),ko={status:"pending",value:void 0,then:function(u){o.push(u)}}}return Tf++,i.then(Hb,Hb),i}function Hb(){if(--Tf===0&&Fs!==null){ko!==null&&(ko.status="fulfilled");var n=Fs;Fs=null,_o=0,ko=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function CC(n,i){var o=[],u={status:"pending",value:null,reason:null,then:function(b){o.push(b)}};return n.then(function(){u.status="fulfilled",u.value=i;for(var b=0;b<o.length;b++)(0,o[b])(i)},function(b){for(u.status="rejected",u.reason=b,b=0;b<o.length;b++)(0,o[b])(void 0)}),u}var $b=j.S;j.S=function(n,i){Nx=fe(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&NC(n,i),$b!==null&&$b(n,i)};var La=I(null);function Af(){var n=La.current;return n!==null?n:Rt.pooledCache}function Ac(n,i){i===null?A(La,La.current):A(La,i.pool)}function qb(){var n=Af();return n===null?null:{parent:nn._currentValue,pool:n}}var No=Error(a(460)),Rf=Error(a(474)),Rc=Error(a(542)),Mc={then:function(){}};function Gb(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Kb(n,i,o){switch(o=n[o],o===void 0?n.push(i):o!==i&&(i.then(ye,ye),i=o),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,Vb(n),n;default:if(typeof i.status=="string")i.then(ye,ye);else{if(n=Rt,n!==null&&100<n.shellSuspendCounter)throw Error(a(482));n=i,n.status="pending",n.then(function(u){if(i.status==="pending"){var b=i;b.status="fulfilled",b.value=u}},function(u){if(i.status==="pending"){var b=i;b.status="rejected",b.reason=u}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,Vb(n),n}throw za=i,No}}function Ia(n){try{var i=n._init;return i(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(za=o,No):o}}var za=null;function Qb(){if(za===null)throw Error(a(459));var n=za;return za=null,n}function Vb(n){if(n===No||n===Rc)throw Error(a(483))}var Co=null,Hs=0;function Oc(n){var i=Hs;return Hs+=1,Co===null&&(Co=[]),Kb(Co,n,i)}function $s(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function Dc(n,i){throw i.$$typeof===x?Error(a(525)):(n=Object.prototype.toString.call(i),Error(a(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function Yb(n){function i(G,H){if(n){var Y=G.deletions;Y===null?(G.deletions=[H],G.flags|=16):Y.push(H)}}function o(G,H){if(!n)return null;for(;H!==null;)i(G,H),H=H.sibling;return null}function u(G){for(var H=new Map;G!==null;)G.key!==null?H.set(G.key,G):H.set(G.index,G),G=G.sibling;return H}function b(G,H){return G=di(G,H),G.index=0,G.sibling=null,G}function y(G,H,Y){return G.index=Y,n?(Y=G.alternate,Y!==null?(Y=Y.index,Y<H?(G.flags|=67108866,H):Y):(G.flags|=67108866,H)):(G.flags|=1048576,H)}function _(G){return n&&G.alternate===null&&(G.flags|=67108866),G}function C(G,H,Y,se){return H===null||H.tag!==6?(H=yf(Y,G.mode,se),H.return=G,H):(H=b(H,Y),H.return=G,H)}function z(G,H,Y,se){var ze=Y.type;return ze===S?oe(G,H,Y.props.children,se,Y.key):H!==null&&(H.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===B&&Ia(ze)===H.type)?(H=b(H,Y.props),$s(H,Y),H.return=G,H):(H=kc(Y.type,Y.key,Y.props,null,G.mode,se),$s(H,Y),H.return=G,H)}function X(G,H,Y,se){return H===null||H.tag!==4||H.stateNode.containerInfo!==Y.containerInfo||H.stateNode.implementation!==Y.implementation?(H=xf(Y,G.mode,se),H.return=G,H):(H=b(H,Y.children||[]),H.return=G,H)}function oe(G,H,Y,se,ze){return H===null||H.tag!==7?(H=Ma(Y,G.mode,se,ze),H.return=G,H):(H=b(H,Y),H.return=G,H)}function le(G,H,Y){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=yf(""+H,G.mode,Y),H.return=G,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case v:return Y=kc(H.type,H.key,H.props,null,G.mode,Y),$s(Y,H),Y.return=G,Y;case E:return H=xf(H,G.mode,Y),H.return=G,H;case B:return H=Ia(H),le(G,H,Y)}if(Q(H)||ee(H))return H=Ma(H,G.mode,Y,null),H.return=G,H;if(typeof H.then=="function")return le(G,Oc(H),Y);if(H.$$typeof===R)return le(G,Tc(G,H),Y);Dc(G,H)}return null}function W(G,H,Y,se){var ze=H!==null?H.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return ze!==null?null:C(G,H,""+Y,se);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case v:return Y.key===ze?z(G,H,Y,se):null;case E:return Y.key===ze?X(G,H,Y,se):null;case B:return Y=Ia(Y),W(G,H,Y,se)}if(Q(Y)||ee(Y))return ze!==null?null:oe(G,H,Y,se,null);if(typeof Y.then=="function")return W(G,H,Oc(Y),se);if(Y.$$typeof===R)return W(G,H,Tc(G,Y),se);Dc(G,Y)}return null}function ne(G,H,Y,se,ze){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return G=G.get(Y)||null,C(H,G,""+se,ze);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case v:return G=G.get(se.key===null?Y:se.key)||null,z(H,G,se,ze);case E:return G=G.get(se.key===null?Y:se.key)||null,X(H,G,se,ze);case B:return se=Ia(se),ne(G,H,Y,se,ze)}if(Q(se)||ee(se))return G=G.get(Y)||null,oe(H,G,se,ze,null);if(typeof se.then=="function")return ne(G,H,Y,Oc(se),ze);if(se.$$typeof===R)return ne(G,H,Y,Tc(H,se),ze);Dc(H,se)}return null}function Ne(G,H,Y,se){for(var ze=null,pt=null,Oe=H,We=H=0,st=null;Oe!==null&&We<Y.length;We++){Oe.index>We?(st=Oe,Oe=null):st=Oe.sibling;var mt=W(G,Oe,Y[We],se);if(mt===null){Oe===null&&(Oe=st);break}n&&Oe&&mt.alternate===null&&i(G,Oe),H=y(mt,H,We),pt===null?ze=mt:pt.sibling=mt,pt=mt,Oe=st}if(We===Y.length)return o(G,Oe),lt&&fi(G,We),ze;if(Oe===null){for(;We<Y.length;We++)Oe=le(G,Y[We],se),Oe!==null&&(H=y(Oe,H,We),pt===null?ze=Oe:pt.sibling=Oe,pt=Oe);return lt&&fi(G,We),ze}for(Oe=u(Oe);We<Y.length;We++)st=ne(Oe,G,We,Y[We],se),st!==null&&(n&&st.alternate!==null&&Oe.delete(st.key===null?We:st.key),H=y(st,H,We),pt===null?ze=st:pt.sibling=st,pt=st);return n&&Oe.forEach(function(fa){return i(G,fa)}),lt&&fi(G,We),ze}function Pe(G,H,Y,se){if(Y==null)throw Error(a(151));for(var ze=null,pt=null,Oe=H,We=H=0,st=null,mt=Y.next();Oe!==null&&!mt.done;We++,mt=Y.next()){Oe.index>We?(st=Oe,Oe=null):st=Oe.sibling;var fa=W(G,Oe,mt.value,se);if(fa===null){Oe===null&&(Oe=st);break}n&&Oe&&fa.alternate===null&&i(G,Oe),H=y(fa,H,We),pt===null?ze=fa:pt.sibling=fa,pt=fa,Oe=st}if(mt.done)return o(G,Oe),lt&&fi(G,We),ze;if(Oe===null){for(;!mt.done;We++,mt=Y.next())mt=le(G,mt.value,se),mt!==null&&(H=y(mt,H,We),pt===null?ze=mt:pt.sibling=mt,pt=mt);return lt&&fi(G,We),ze}for(Oe=u(Oe);!mt.done;We++,mt=Y.next())mt=ne(Oe,G,We,mt.value,se),mt!==null&&(n&&mt.alternate!==null&&Oe.delete(mt.key===null?We:mt.key),H=y(mt,H,We),pt===null?ze=mt:pt.sibling=mt,pt=mt);return n&&Oe.forEach(function(BT){return i(G,BT)}),lt&&fi(G,We),ze}function Nt(G,H,Y,se){if(typeof Y=="object"&&Y!==null&&Y.type===S&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case v:e:{for(var ze=Y.key;H!==null;){if(H.key===ze){if(ze=Y.type,ze===S){if(H.tag===7){o(G,H.sibling),se=b(H,Y.props.children),se.return=G,G=se;break e}}else if(H.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===B&&Ia(ze)===H.type){o(G,H.sibling),se=b(H,Y.props),$s(se,Y),se.return=G,G=se;break e}o(G,H);break}else i(G,H);H=H.sibling}Y.type===S?(se=Ma(Y.props.children,G.mode,se,Y.key),se.return=G,G=se):(se=kc(Y.type,Y.key,Y.props,null,G.mode,se),$s(se,Y),se.return=G,G=se)}return _(G);case E:e:{for(ze=Y.key;H!==null;){if(H.key===ze)if(H.tag===4&&H.stateNode.containerInfo===Y.containerInfo&&H.stateNode.implementation===Y.implementation){o(G,H.sibling),se=b(H,Y.children||[]),se.return=G,G=se;break e}else{o(G,H);break}else i(G,H);H=H.sibling}se=xf(Y,G.mode,se),se.return=G,G=se}return _(G);case B:return Y=Ia(Y),Nt(G,H,Y,se)}if(Q(Y))return Ne(G,H,Y,se);if(ee(Y)){if(ze=ee(Y),typeof ze!="function")throw Error(a(150));return Y=ze.call(Y),Pe(G,H,Y,se)}if(typeof Y.then=="function")return Nt(G,H,Oc(Y),se);if(Y.$$typeof===R)return Nt(G,H,Tc(G,Y),se);Dc(G,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,H!==null&&H.tag===6?(o(G,H.sibling),se=b(H,Y),se.return=G,G=se):(o(G,H),se=yf(Y,G.mode,se),se.return=G,G=se),_(G)):o(G,H)}return function(G,H,Y,se){try{Hs=0;var ze=Nt(G,H,Y,se);return Co=null,ze}catch(Oe){if(Oe===No||Oe===Rc)throw Oe;var pt=tr(29,Oe,null,G.mode);return pt.lanes=se,pt.return=G,pt}}}var Ba=Yb(!0),Xb=Yb(!1),Yi=!1;function Mf(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Of(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Xi(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function Zi(n,i,o){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(bt&2)!==0){var b=u.pending;return b===null?i.next=i:(i.next=b.next,b.next=i),u.pending=i,i=_c(n),Db(n,null,o),i}return Sc(n,u,i,o),_c(n)}function qs(n,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194048)!==0)){var u=i.lanes;u&=n.pendingLanes,o|=u,i.lanes=o,Re(n,o)}}function Df(n,i){var o=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var b=null,y=null;if(o=o.firstBaseUpdate,o!==null){do{var _={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};y===null?b=y=_:y=y.next=_,o=o.next}while(o!==null);y===null?b=y=i:y=y.next=i}else b=y=i;o={baseState:u.baseState,firstBaseUpdate:b,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=i:n.next=i,o.lastBaseUpdate=i}var jf=!1;function Gs(){if(jf){var n=ko;if(n!==null)throw n}}function Ks(n,i,o,u){jf=!1;var b=n.updateQueue;Yi=!1;var y=b.firstBaseUpdate,_=b.lastBaseUpdate,C=b.shared.pending;if(C!==null){b.shared.pending=null;var z=C,X=z.next;z.next=null,_===null?y=X:_.next=X,_=z;var oe=n.alternate;oe!==null&&(oe=oe.updateQueue,C=oe.lastBaseUpdate,C!==_&&(C===null?oe.firstBaseUpdate=X:C.next=X,oe.lastBaseUpdate=z))}if(y!==null){var le=b.baseState;_=0,oe=X=z=null,C=y;do{var W=C.lane&-536870913,ne=W!==C.lane;if(ne?(ot&W)===W:(u&W)===W){W!==0&&W===_o&&(jf=!0),oe!==null&&(oe=oe.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{var Ne=n,Pe=C;W=i;var Nt=o;switch(Pe.tag){case 1:if(Ne=Pe.payload,typeof Ne=="function"){le=Ne.call(Nt,le,W);break e}le=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Pe.payload,W=typeof Ne=="function"?Ne.call(Nt,le,W):Ne,W==null)break e;le=h({},le,W);break e;case 2:Yi=!0}}W=C.callback,W!==null&&(n.flags|=64,ne&&(n.flags|=8192),ne=b.callbacks,ne===null?b.callbacks=[W]:ne.push(W))}else ne={lane:W,tag:C.tag,payload:C.payload,callback:C.callback,next:null},oe===null?(X=oe=ne,z=le):oe=oe.next=ne,_|=W;if(C=C.next,C===null){if(C=b.shared.pending,C===null)break;ne=C,C=ne.next,ne.next=null,b.lastBaseUpdate=ne,b.shared.pending=null}}while(!0);oe===null&&(z=le),b.baseState=z,b.firstBaseUpdate=X,b.lastBaseUpdate=oe,y===null&&(b.shared.lanes=0),na|=_,n.lanes=_,n.memoizedState=le}}function Zb(n,i){if(typeof n!="function")throw Error(a(191,n));n.call(i)}function Wb(n,i){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)Zb(o[n],i)}var To=I(null),jc=I(0);function Jb(n,i){n=Si,A(jc,n),A(To,i),Si=n|i.baseLanes}function Lf(){A(jc,Si),A(To,To.current)}function If(){Si=jc.current,q(To),q(jc)}var nr=I(null),vr=null;function Wi(n){var i=n.alternate;A(Zt,Zt.current&1),A(nr,n),vr===null&&(i===null||To.current!==null||i.memoizedState!==null)&&(vr=n)}function zf(n){A(Zt,Zt.current),A(nr,n),vr===null&&(vr=n)}function ey(n){n.tag===22?(A(Zt,Zt.current),A(nr,n),vr===null&&(vr=n)):Ji()}function Ji(){A(Zt,Zt.current),A(nr,nr.current)}function rr(n){q(nr),vr===n&&(vr=null),q(Zt)}var Zt=I(0);function Lc(n){for(var i=n;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||$p(o)||qp(o)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var hi=0,Ze=null,_t=null,rn=null,Ic=!1,Ao=!1,Pa=!1,zc=0,Qs=0,Ro=null,TC=0;function Gt(){throw Error(a(321))}function Bf(n,i){if(i===null)return!1;for(var o=0;o<i.length&&o<n.length;o++)if(!er(n[o],i[o]))return!1;return!0}function Pf(n,i,o,u,b,y){return hi=y,Ze=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,j.H=n===null||n.memoizedState===null?zy:ep,Pa=!1,y=o(u,b),Pa=!1,Ao&&(y=ny(i,o,u,b)),ty(n),y}function ty(n){j.H=Xs;var i=_t!==null&&_t.next!==null;if(hi=0,rn=_t=Ze=null,Ic=!1,Qs=0,Ro=null,i)throw Error(a(300));n===null||an||(n=n.dependencies,n!==null&&Cc(n)&&(an=!0))}function ny(n,i,o,u){Ze=n;var b=0;do{if(Ao&&(Ro=null),Qs=0,Ao=!1,25<=b)throw Error(a(301));if(b+=1,rn=_t=null,n.updateQueue!=null){var y=n.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}j.H=By,y=i(o,u)}while(Ao);return y}function AC(){var n=j.H,i=n.useState()[0];return i=typeof i.then=="function"?Vs(i):i,n=n.useState()[0],(_t!==null?_t.memoizedState:null)!==n&&(Ze.flags|=1024),i}function Uf(){var n=zc!==0;return zc=0,n}function Ff(n,i,o){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~o}function Hf(n){if(Ic){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Ic=!1}hi=0,rn=_t=Ze=null,Ao=!1,Qs=zc=0,Ro=null}function jn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rn===null?Ze.memoizedState=rn=n:rn=rn.next=n,rn}function Wt(){if(_t===null){var n=Ze.alternate;n=n!==null?n.memoizedState:null}else n=_t.next;var i=rn===null?Ze.memoizedState:rn.next;if(i!==null)rn=i,_t=n;else{if(n===null)throw Ze.alternate===null?Error(a(467)):Error(a(310));_t=n,n={memoizedState:_t.memoizedState,baseState:_t.baseState,baseQueue:_t.baseQueue,queue:_t.queue,next:null},rn===null?Ze.memoizedState=rn=n:rn=rn.next=n}return rn}function Bc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Vs(n){var i=Qs;return Qs+=1,Ro===null&&(Ro=[]),n=Kb(Ro,n,i),i=Ze,(rn===null?i.memoizedState:rn.next)===null&&(i=i.alternate,j.H=i===null||i.memoizedState===null?zy:ep),n}function Pc(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Vs(n);if(n.$$typeof===R)return wn(n)}throw Error(a(438,String(n)))}function $f(n){var i=null,o=Ze.updateQueue;if(o!==null&&(i=o.memoCache),i==null){var u=Ze.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(i={data:u.data.map(function(b){return b.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),o===null&&(o=Bc(),Ze.updateQueue=o),o.memoCache=i,o=i.data[i.index],o===void 0)for(o=i.data[i.index]=Array(n),u=0;u<n;u++)o[u]=F;return i.index++,o}function gi(n,i){return typeof i=="function"?i(n):i}function Uc(n){var i=Wt();return qf(i,_t,n)}function qf(n,i,o){var u=n.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=o;var b=n.baseQueue,y=u.pending;if(y!==null){if(b!==null){var _=b.next;b.next=y.next,y.next=_}i.baseQueue=b=y,u.pending=null}if(y=n.baseState,b===null)n.memoizedState=y;else{i=b.next;var C=_=null,z=null,X=i,oe=!1;do{var le=X.lane&-536870913;if(le!==X.lane?(ot&le)===le:(hi&le)===le){var W=X.revertLane;if(W===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),le===_o&&(oe=!0);else if((hi&W)===W){X=X.next,W===_o&&(oe=!0);continue}else le={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},z===null?(C=z=le,_=y):z=z.next=le,Ze.lanes|=W,na|=W;le=X.action,Pa&&o(y,le),y=X.hasEagerState?X.eagerState:o(y,le)}else W={lane:le,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},z===null?(C=z=W,_=y):z=z.next=W,Ze.lanes|=le,na|=le;X=X.next}while(X!==null&&X!==i);if(z===null?_=y:z.next=C,!er(y,n.memoizedState)&&(an=!0,oe&&(o=ko,o!==null)))throw o;n.memoizedState=y,n.baseState=_,n.baseQueue=z,u.lastRenderedState=y}return b===null&&(u.lanes=0),[n.memoizedState,u.dispatch]}function Gf(n){var i=Wt(),o=i.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=n;var u=o.dispatch,b=o.pending,y=i.memoizedState;if(b!==null){o.pending=null;var _=b=b.next;do y=n(y,_.action),_=_.next;while(_!==b);er(y,i.memoizedState)||(an=!0),i.memoizedState=y,i.baseQueue===null&&(i.baseState=y),o.lastRenderedState=y}return[y,u]}function ry(n,i,o){var u=Ze,b=Wt(),y=lt;if(y){if(o===void 0)throw Error(a(407));o=o()}else o=i();var _=!er((_t||b).memoizedState,o);if(_&&(b.memoizedState=o,an=!0),b=b.queue,Vf(oy.bind(null,u,b,n),[n]),b.getSnapshot!==i||_||rn!==null&&rn.memoizedState.tag&1){if(u.flags|=2048,Mo(9,{destroy:void 0},ay.bind(null,u,b,o,i),null),Rt===null)throw Error(a(349));y||(hi&127)!==0||iy(u,i,o)}return o}function iy(n,i,o){n.flags|=16384,n={getSnapshot:i,value:o},i=Ze.updateQueue,i===null?(i=Bc(),Ze.updateQueue=i,i.stores=[n]):(o=i.stores,o===null?i.stores=[n]:o.push(n))}function ay(n,i,o,u){i.value=o,i.getSnapshot=u,sy(i)&&ly(n)}function oy(n,i,o){return o(function(){sy(i)&&ly(n)})}function sy(n){var i=n.getSnapshot;n=n.value;try{var o=i();return!er(n,o)}catch{return!0}}function ly(n){var i=Ra(n,2);i!==null&&Qn(i,n,2)}function Kf(n){var i=jn();if(typeof n=="function"){var o=n;if(n=o(),Pa){dn(!0);try{o()}finally{dn(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:n},i}function cy(n,i,o,u){return n.baseState=o,qf(n,_t,typeof u=="function"?u:gi)}function RC(n,i,o,u,b){if($c(n))throw Error(a(485));if(n=i.action,n!==null){var y={payload:b,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){y.listeners.push(_)}};j.T!==null?o(!0):y.isTransition=!1,u(y),o=i.pending,o===null?(y.next=i.pending=y,uy(i,y)):(y.next=o.next,i.pending=o.next=y)}}function uy(n,i){var o=i.action,u=i.payload,b=n.state;if(i.isTransition){var y=j.T,_={};j.T=_;try{var C=o(b,u),z=j.S;z!==null&&z(_,C),dy(n,i,C)}catch(X){Qf(n,i,X)}finally{y!==null&&_.types!==null&&(y.types=_.types),j.T=y}}else try{y=o(b,u),dy(n,i,y)}catch(X){Qf(n,i,X)}}function dy(n,i,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){fy(n,i,u)},function(u){return Qf(n,i,u)}):fy(n,i,o)}function fy(n,i,o){i.status="fulfilled",i.value=o,py(i),n.state=o,i=n.pending,i!==null&&(o=i.next,o===i?n.pending=null:(o=o.next,i.next=o,uy(n,o)))}function Qf(n,i,o){var u=n.pending;if(n.pending=null,u!==null){u=u.next;do i.status="rejected",i.reason=o,py(i),i=i.next;while(i!==u)}n.action=null}function py(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function my(n,i){return i}function hy(n,i){if(lt){var o=Rt.formState;if(o!==null){e:{var u=Ze;if(lt){if(It){t:{for(var b=It,y=xr;b.nodeType!==8;){if(!y){b=null;break t}if(b=Er(b.nextSibling),b===null){b=null;break t}}y=b.data,b=y==="F!"||y==="F"?b:null}if(b){It=Er(b.nextSibling),u=b.data==="F!";break e}}Qi(u)}u=!1}u&&(i=o[0])}}return o=jn(),o.memoizedState=o.baseState=i,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:my,lastRenderedState:i},o.queue=u,o=jy.bind(null,Ze,u),u.dispatch=o,u=Kf(!1),y=Jf.bind(null,Ze,!1,u.queue),u=jn(),b={state:i,dispatch:null,action:n,pending:null},u.queue=b,o=RC.bind(null,Ze,b,y,o),b.dispatch=o,u.memoizedState=n,[i,o,!1]}function gy(n){var i=Wt();return by(i,_t,n)}function by(n,i,o){if(i=qf(n,i,my)[0],n=Uc(gi)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var u=Vs(i)}catch(_){throw _===No?Rc:_}else u=i;i=Wt();var b=i.queue,y=b.dispatch;return o!==i.memoizedState&&(Ze.flags|=2048,Mo(9,{destroy:void 0},MC.bind(null,b,o),null)),[u,y,n]}function MC(n,i){n.action=i}function yy(n){var i=Wt(),o=_t;if(o!==null)return by(i,o,n);Wt(),i=i.memoizedState,o=Wt();var u=o.queue.dispatch;return o.memoizedState=n,[i,u,!1]}function Mo(n,i,o,u){return n={tag:n,create:o,deps:u,inst:i,next:null},i=Ze.updateQueue,i===null&&(i=Bc(),Ze.updateQueue=i),o=i.lastEffect,o===null?i.lastEffect=n.next=n:(u=o.next,o.next=n,n.next=u,i.lastEffect=n),n}function xy(){return Wt().memoizedState}function Fc(n,i,o,u){var b=jn();Ze.flags|=n,b.memoizedState=Mo(1|i,{destroy:void 0},o,u===void 0?null:u)}function Hc(n,i,o,u){var b=Wt();u=u===void 0?null:u;var y=b.memoizedState.inst;_t!==null&&u!==null&&Bf(u,_t.memoizedState.deps)?b.memoizedState=Mo(i,y,o,u):(Ze.flags|=n,b.memoizedState=Mo(1|i,y,o,u))}function vy(n,i){Fc(8390656,8,n,i)}function Vf(n,i){Hc(2048,8,n,i)}function OC(n){Ze.flags|=4;var i=Ze.updateQueue;if(i===null)i=Bc(),Ze.updateQueue=i,i.events=[n];else{var o=i.events;o===null?i.events=[n]:o.push(n)}}function Ey(n){var i=Wt().memoizedState;return OC({ref:i,nextImpl:n}),function(){if((bt&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function wy(n,i){return Hc(4,2,n,i)}function Sy(n,i){return Hc(4,4,n,i)}function _y(n,i){if(typeof i=="function"){n=n();var o=i(n);return function(){typeof o=="function"?o():i(null)}}if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function ky(n,i,o){o=o!=null?o.concat([n]):null,Hc(4,4,_y.bind(null,i,n),o)}function Yf(){}function Ny(n,i){var o=Wt();i=i===void 0?null:i;var u=o.memoizedState;return i!==null&&Bf(i,u[1])?u[0]:(o.memoizedState=[n,i],n)}function Cy(n,i){var o=Wt();i=i===void 0?null:i;var u=o.memoizedState;if(i!==null&&Bf(i,u[1]))return u[0];if(u=n(),Pa){dn(!0);try{n()}finally{dn(!1)}}return o.memoizedState=[u,i],u}function Xf(n,i,o){return o===void 0||(hi&1073741824)!==0&&(ot&261930)===0?n.memoizedState=i:(n.memoizedState=o,n=Tx(),Ze.lanes|=n,na|=n,o)}function Ty(n,i,o,u){return er(o,i)?o:To.current!==null?(n=Xf(n,o,u),er(n,i)||(an=!0),n):(hi&42)===0||(hi&1073741824)!==0&&(ot&261930)===0?(an=!0,n.memoizedState=o):(n=Tx(),Ze.lanes|=n,na|=n,i)}function Ay(n,i,o,u,b){var y=V.p;V.p=y!==0&&8>y?y:8;var _=j.T,C={};j.T=C,Jf(n,!1,i,o);try{var z=b(),X=j.S;if(X!==null&&X(C,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var oe=CC(z,u);Ys(n,i,oe,or(n))}else Ys(n,i,u,or(n))}catch(le){Ys(n,i,{then:function(){},status:"rejected",reason:le},or())}finally{V.p=y,_!==null&&C.types!==null&&(_.types=C.types),j.T=_}}function DC(){}function Zf(n,i,o,u){if(n.tag!==5)throw Error(a(476));var b=Ry(n).queue;Ay(n,b,i,Z,o===null?DC:function(){return My(n),o(u)})}function Ry(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:Z},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:o},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function My(n){var i=Ry(n);i.next===null&&(i=n.alternate.memoizedState),Ys(n,i.next.queue,{},or())}function Wf(){return wn(fl)}function Oy(){return Wt().memoizedState}function Dy(){return Wt().memoizedState}function jC(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var o=or();n=Xi(o);var u=Zi(i,n,o);u!==null&&(Qn(u,i,o),qs(u,i,o)),i={cache:Cf()},n.payload=i;return}i=i.return}}function LC(n,i,o){var u=or();o={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},$c(n)?Ly(i,o):(o=gf(n,i,o,u),o!==null&&(Qn(o,n,u),Iy(o,i,u)))}function jy(n,i,o){var u=or();Ys(n,i,o,u)}function Ys(n,i,o,u){var b={lane:u,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if($c(n))Ly(i,b);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=i.lastRenderedReducer,y!==null))try{var _=i.lastRenderedState,C=y(_,o);if(b.hasEagerState=!0,b.eagerState=C,er(C,_))return Sc(n,i,b,0),Rt===null&&wc(),!1}catch{}if(o=gf(n,i,b,u),o!==null)return Qn(o,n,u),Iy(o,i,u),!0}return!1}function Jf(n,i,o,u){if(u={lane:2,revertLane:Mp(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},$c(n)){if(i)throw Error(a(479))}else i=gf(n,o,u,2),i!==null&&Qn(i,n,2)}function $c(n){var i=n.alternate;return n===Ze||i!==null&&i===Ze}function Ly(n,i){Ao=Ic=!0;var o=n.pending;o===null?i.next=i:(i.next=o.next,o.next=i),n.pending=i}function Iy(n,i,o){if((o&4194048)!==0){var u=i.lanes;u&=n.pendingLanes,o|=u,i.lanes=o,Re(n,o)}}var Xs={readContext:wn,use:Pc,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useLayoutEffect:Gt,useInsertionEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useSyncExternalStore:Gt,useId:Gt,useHostTransitionStatus:Gt,useFormState:Gt,useActionState:Gt,useOptimistic:Gt,useMemoCache:Gt,useCacheRefresh:Gt};Xs.useEffectEvent=Gt;var zy={readContext:wn,use:Pc,useCallback:function(n,i){return jn().memoizedState=[n,i===void 0?null:i],n},useContext:wn,useEffect:vy,useImperativeHandle:function(n,i,o){o=o!=null?o.concat([n]):null,Fc(4194308,4,_y.bind(null,i,n),o)},useLayoutEffect:function(n,i){return Fc(4194308,4,n,i)},useInsertionEffect:function(n,i){Fc(4,2,n,i)},useMemo:function(n,i){var o=jn();i=i===void 0?null:i;var u=n();if(Pa){dn(!0);try{n()}finally{dn(!1)}}return o.memoizedState=[u,i],u},useReducer:function(n,i,o){var u=jn();if(o!==void 0){var b=o(i);if(Pa){dn(!0);try{o(i)}finally{dn(!1)}}}else b=i;return u.memoizedState=u.baseState=b,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:b},u.queue=n,n=n.dispatch=LC.bind(null,Ze,n),[u.memoizedState,n]},useRef:function(n){var i=jn();return n={current:n},i.memoizedState=n},useState:function(n){n=Kf(n);var i=n.queue,o=jy.bind(null,Ze,i);return i.dispatch=o,[n.memoizedState,o]},useDebugValue:Yf,useDeferredValue:function(n,i){var o=jn();return Xf(o,n,i)},useTransition:function(){var n=Kf(!1);return n=Ay.bind(null,Ze,n.queue,!0,!1),jn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,o){var u=Ze,b=jn();if(lt){if(o===void 0)throw Error(a(407));o=o()}else{if(o=i(),Rt===null)throw Error(a(349));(ot&127)!==0||iy(u,i,o)}b.memoizedState=o;var y={value:o,getSnapshot:i};return b.queue=y,vy(oy.bind(null,u,y,n),[n]),u.flags|=2048,Mo(9,{destroy:void 0},ay.bind(null,u,y,o,i),null),o},useId:function(){var n=jn(),i=Rt.identifierPrefix;if(lt){var o=Hr,u=Fr;o=(u&~(1<<32-ft(u)-1)).toString(32)+o,i="_"+i+"R_"+o,o=zc++,0<o&&(i+="H"+o.toString(32)),i+="_"}else o=TC++,i="_"+i+"r_"+o.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:Wf,useFormState:hy,useActionState:hy,useOptimistic:function(n){var i=jn();i.memoizedState=i.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=o,i=Jf.bind(null,Ze,!0,o),o.dispatch=i,[n,i]},useMemoCache:$f,useCacheRefresh:function(){return jn().memoizedState=jC.bind(null,Ze)},useEffectEvent:function(n){var i=jn(),o={impl:n};return i.memoizedState=o,function(){if((bt&2)!==0)throw Error(a(440));return o.impl.apply(void 0,arguments)}}},ep={readContext:wn,use:Pc,useCallback:Ny,useContext:wn,useEffect:Vf,useImperativeHandle:ky,useInsertionEffect:wy,useLayoutEffect:Sy,useMemo:Cy,useReducer:Uc,useRef:xy,useState:function(){return Uc(gi)},useDebugValue:Yf,useDeferredValue:function(n,i){var o=Wt();return Ty(o,_t.memoizedState,n,i)},useTransition:function(){var n=Uc(gi)[0],i=Wt().memoizedState;return[typeof n=="boolean"?n:Vs(n),i]},useSyncExternalStore:ry,useId:Oy,useHostTransitionStatus:Wf,useFormState:gy,useActionState:gy,useOptimistic:function(n,i){var o=Wt();return cy(o,_t,n,i)},useMemoCache:$f,useCacheRefresh:Dy};ep.useEffectEvent=Ey;var By={readContext:wn,use:Pc,useCallback:Ny,useContext:wn,useEffect:Vf,useImperativeHandle:ky,useInsertionEffect:wy,useLayoutEffect:Sy,useMemo:Cy,useReducer:Gf,useRef:xy,useState:function(){return Gf(gi)},useDebugValue:Yf,useDeferredValue:function(n,i){var o=Wt();return _t===null?Xf(o,n,i):Ty(o,_t.memoizedState,n,i)},useTransition:function(){var n=Gf(gi)[0],i=Wt().memoizedState;return[typeof n=="boolean"?n:Vs(n),i]},useSyncExternalStore:ry,useId:Oy,useHostTransitionStatus:Wf,useFormState:yy,useActionState:yy,useOptimistic:function(n,i){var o=Wt();return _t!==null?cy(o,_t,n,i):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:$f,useCacheRefresh:Dy};By.useEffectEvent=Ey;function tp(n,i,o,u){i=n.memoizedState,o=o(u,i),o=o==null?i:h({},i,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var np={enqueueSetState:function(n,i,o){n=n._reactInternals;var u=or(),b=Xi(u);b.payload=i,o!=null&&(b.callback=o),i=Zi(n,b,u),i!==null&&(Qn(i,n,u),qs(i,n,u))},enqueueReplaceState:function(n,i,o){n=n._reactInternals;var u=or(),b=Xi(u);b.tag=1,b.payload=i,o!=null&&(b.callback=o),i=Zi(n,b,u),i!==null&&(Qn(i,n,u),qs(i,n,u))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var o=or(),u=Xi(o);u.tag=2,i!=null&&(u.callback=i),i=Zi(n,u,o),i!==null&&(Qn(i,n,o),qs(i,n,o))}};function Py(n,i,o,u,b,y,_){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,y,_):i.prototype&&i.prototype.isPureReactComponent?!Is(o,u)||!Is(b,y):!0}function Uy(n,i,o,u){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,u),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,u),i.state!==n&&np.enqueueReplaceState(i,i.state,null)}function Ua(n,i){var o=i;if("ref"in i){o={};for(var u in i)u!=="ref"&&(o[u]=i[u])}if(n=n.defaultProps){o===i&&(o=h({},o));for(var b in n)o[b]===void 0&&(o[b]=n[b])}return o}function Fy(n){Ec(n)}function Hy(n){console.error(n)}function $y(n){Ec(n)}function qc(n,i){try{var o=n.onUncaughtError;o(i.value,{componentStack:i.stack})}catch(u){setTimeout(function(){throw u})}}function qy(n,i,o){try{var u=n.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function rp(n,i,o){return o=Xi(o),o.tag=3,o.payload={element:null},o.callback=function(){qc(n,i)},o}function Gy(n){return n=Xi(n),n.tag=3,n}function Ky(n,i,o,u){var b=o.type.getDerivedStateFromError;if(typeof b=="function"){var y=u.value;n.payload=function(){return b(y)},n.callback=function(){qy(i,o,u)}}var _=o.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(n.callback=function(){qy(i,o,u),typeof b!="function"&&(ra===null?ra=new Set([this]):ra.add(this));var C=u.stack;this.componentDidCatch(u.value,{componentStack:C!==null?C:""})})}function IC(n,i,o,u,b){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(i=o.alternate,i!==null&&So(i,o,b,!0),o=nr.current,o!==null){switch(o.tag){case 31:case 13:return vr===null?nu():o.alternate===null&&Kt===0&&(Kt=3),o.flags&=-257,o.flags|=65536,o.lanes=b,u===Mc?o.flags|=16384:(i=o.updateQueue,i===null?o.updateQueue=new Set([u]):i.add(u),Tp(n,u,b)),!1;case 22:return o.flags|=65536,u===Mc?o.flags|=16384:(i=o.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=i):(o=i.retryQueue,o===null?i.retryQueue=new Set([u]):o.add(u)),Tp(n,u,b)),!1}throw Error(a(435,o.tag))}return Tp(n,u,b),nu(),!1}if(lt)return i=nr.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=b,u!==wf&&(n=Error(a(422),{cause:u}),Ps(gr(n,o)))):(u!==wf&&(i=Error(a(423),{cause:u}),Ps(gr(i,o))),n=n.current.alternate,n.flags|=65536,b&=-b,n.lanes|=b,u=gr(u,o),b=rp(n.stateNode,u,b),Df(n,b),Kt!==4&&(Kt=2)),!1;var y=Error(a(520),{cause:u});if(y=gr(y,o),il===null?il=[y]:il.push(y),Kt!==4&&(Kt=2),i===null)return!0;u=gr(u,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,n=b&-b,o.lanes|=n,n=rp(o.stateNode,u,n),Df(o,n),!1;case 1:if(i=o.type,y=o.stateNode,(o.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ra===null||!ra.has(y))))return o.flags|=65536,b&=-b,o.lanes|=b,b=Gy(b),Ky(b,n,o,u),Df(o,b),!1}o=o.return}while(o!==null);return!1}var ip=Error(a(461)),an=!1;function Sn(n,i,o,u){i.child=n===null?Xb(i,null,o,u):Ba(i,n.child,o,u)}function Qy(n,i,o,u,b){o=o.render;var y=i.ref;if("ref"in u){var _={};for(var C in u)C!=="ref"&&(_[C]=u[C])}else _=u;return ja(i),u=Pf(n,i,o,_,y,b),C=Uf(),n!==null&&!an?(Ff(n,i,b),bi(n,i,b)):(lt&&C&&vf(i),i.flags|=1,Sn(n,i,u,b),i.child)}function Vy(n,i,o,u,b){if(n===null){var y=o.type;return typeof y=="function"&&!bf(y)&&y.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=y,Yy(n,i,y,u,b)):(n=kc(o.type,null,u,i,i.mode,b),n.ref=i.ref,n.return=i,i.child=n)}if(y=n.child,!fp(n,b)){var _=y.memoizedProps;if(o=o.compare,o=o!==null?o:Is,o(_,u)&&n.ref===i.ref)return bi(n,i,b)}return i.flags|=1,n=di(y,u),n.ref=i.ref,n.return=i,i.child=n}function Yy(n,i,o,u,b){if(n!==null){var y=n.memoizedProps;if(Is(y,u)&&n.ref===i.ref)if(an=!1,i.pendingProps=u=y,fp(n,b))(n.flags&131072)!==0&&(an=!0);else return i.lanes=n.lanes,bi(n,i,b)}return ap(n,i,o,u,b)}function Xy(n,i,o,u){var b=u.children,y=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((i.flags&128)!==0){if(y=y!==null?y.baseLanes|o:o,n!==null){for(u=i.child=n.child,b=0;u!==null;)b=b|u.lanes|u.childLanes,u=u.sibling;u=b&~y}else u=0,i.child=null;return Zy(n,i,y,o,u)}if((o&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&Ac(i,y!==null?y.cachePool:null),y!==null?Jb(i,y):Lf(),ey(i);else return u=i.lanes=536870912,Zy(n,i,y!==null?y.baseLanes|o:o,o,u)}else y!==null?(Ac(i,y.cachePool),Jb(i,y),Ji(),i.memoizedState=null):(n!==null&&Ac(i,null),Lf(),Ji());return Sn(n,i,b,o),i.child}function Zs(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Zy(n,i,o,u,b){var y=Af();return y=y===null?null:{parent:nn._currentValue,pool:y},i.memoizedState={baseLanes:o,cachePool:y},n!==null&&Ac(i,null),Lf(),ey(i),n!==null&&So(n,i,u,!0),i.childLanes=b,null}function Gc(n,i){return i=Qc({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function Wy(n,i,o){return Ba(i,n.child,null,o),n=Gc(i,i.pendingProps),n.flags|=2,rr(i),i.memoizedState=null,n}function zC(n,i,o){var u=i.pendingProps,b=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(lt){if(u.mode==="hidden")return n=Gc(i,u),i.lanes=536870912,Zs(null,n);if(zf(i),(n=It)?(n=uv(n,xr),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Gi!==null?{id:Fr,overflow:Hr}:null,retryLane:536870912,hydrationErrors:null},o=Lb(n),o.return=i,i.child=o,En=i,It=null)):n=null,n===null)throw Qi(i);return i.lanes=536870912,null}return Gc(i,u)}var y=n.memoizedState;if(y!==null){var _=y.dehydrated;if(zf(i),b)if(i.flags&256)i.flags&=-257,i=Wy(n,i,o);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(a(558));else if(an||So(n,i,o,!1),b=(o&n.childLanes)!==0,an||b){if(u=Rt,u!==null&&(_=ut(u,o),_!==0&&_!==y.retryLane))throw y.retryLane=_,Ra(n,_),Qn(u,n,_),ip;nu(),i=Wy(n,i,o)}else n=y.treeContext,It=Er(_.nextSibling),En=i,lt=!0,Ki=null,xr=!1,n!==null&&Bb(i,n),i=Gc(i,u),i.flags|=4096;return i}return n=di(n.child,{mode:u.mode,children:u.children}),n.ref=i.ref,i.child=n,n.return=i,n}function Kc(n,i){var o=i.ref;if(o===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(a(284));(n===null||n.ref!==o)&&(i.flags|=4194816)}}function ap(n,i,o,u,b){return ja(i),o=Pf(n,i,o,u,void 0,b),u=Uf(),n!==null&&!an?(Ff(n,i,b),bi(n,i,b)):(lt&&u&&vf(i),i.flags|=1,Sn(n,i,o,b),i.child)}function Jy(n,i,o,u,b,y){return ja(i),i.updateQueue=null,o=ny(i,u,o,b),ty(n),u=Uf(),n!==null&&!an?(Ff(n,i,y),bi(n,i,y)):(lt&&u&&vf(i),i.flags|=1,Sn(n,i,o,y),i.child)}function ex(n,i,o,u,b){if(ja(i),i.stateNode===null){var y=xo,_=o.contextType;typeof _=="object"&&_!==null&&(y=wn(_)),y=new o(u,y),i.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=np,i.stateNode=y,y._reactInternals=i,y=i.stateNode,y.props=u,y.state=i.memoizedState,y.refs={},Mf(i),_=o.contextType,y.context=typeof _=="object"&&_!==null?wn(_):xo,y.state=i.memoizedState,_=o.getDerivedStateFromProps,typeof _=="function"&&(tp(i,o,_,u),y.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(_=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),_!==y.state&&np.enqueueReplaceState(y,y.state,null),Ks(i,u,y,b),Gs(),y.state=i.memoizedState),typeof y.componentDidMount=="function"&&(i.flags|=4194308),u=!0}else if(n===null){y=i.stateNode;var C=i.memoizedProps,z=Ua(o,C);y.props=z;var X=y.context,oe=o.contextType;_=xo,typeof oe=="object"&&oe!==null&&(_=wn(oe));var le=o.getDerivedStateFromProps;oe=typeof le=="function"||typeof y.getSnapshotBeforeUpdate=="function",C=i.pendingProps!==C,oe||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(C||X!==_)&&Uy(i,y,u,_),Yi=!1;var W=i.memoizedState;y.state=W,Ks(i,u,y,b),Gs(),X=i.memoizedState,C||W!==X||Yi?(typeof le=="function"&&(tp(i,o,le,u),X=i.memoizedState),(z=Yi||Py(i,o,z,u,W,X,_))?(oe||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(i.flags|=4194308)):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=u,i.memoizedState=X),y.props=u,y.state=X,y.context=_,u=z):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),u=!1)}else{y=i.stateNode,Of(n,i),_=i.memoizedProps,oe=Ua(o,_),y.props=oe,le=i.pendingProps,W=y.context,X=o.contextType,z=xo,typeof X=="object"&&X!==null&&(z=wn(X)),C=o.getDerivedStateFromProps,(X=typeof C=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(_!==le||W!==z)&&Uy(i,y,u,z),Yi=!1,W=i.memoizedState,y.state=W,Ks(i,u,y,b),Gs();var ne=i.memoizedState;_!==le||W!==ne||Yi||n!==null&&n.dependencies!==null&&Cc(n.dependencies)?(typeof C=="function"&&(tp(i,o,C,u),ne=i.memoizedState),(oe=Yi||Py(i,o,oe,u,W,ne,z)||n!==null&&n.dependencies!==null&&Cc(n.dependencies))?(X||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,ne,z),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,ne,z)),typeof y.componentDidUpdate=="function"&&(i.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof y.componentDidUpdate!="function"||_===n.memoizedProps&&W===n.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&W===n.memoizedState||(i.flags|=1024),i.memoizedProps=u,i.memoizedState=ne),y.props=u,y.state=ne,y.context=z,u=oe):(typeof y.componentDidUpdate!="function"||_===n.memoizedProps&&W===n.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||_===n.memoizedProps&&W===n.memoizedState||(i.flags|=1024),u=!1)}return y=u,Kc(n,i),u=(i.flags&128)!==0,y||u?(y=i.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:y.render(),i.flags|=1,n!==null&&u?(i.child=Ba(i,n.child,null,b),i.child=Ba(i,null,o,b)):Sn(n,i,o,b),i.memoizedState=y.state,n=i.child):n=bi(n,i,b),n}function tx(n,i,o,u){return Oa(),i.flags|=256,Sn(n,i,o,u),i.child}var op={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sp(n){return{baseLanes:n,cachePool:qb()}}function lp(n,i,o){return n=n!==null?n.childLanes&~o:0,i&&(n|=ar),n}function nx(n,i,o){var u=i.pendingProps,b=!1,y=(i.flags&128)!==0,_;if((_=y)||(_=n!==null&&n.memoizedState===null?!1:(Zt.current&2)!==0),_&&(b=!0,i.flags&=-129),_=(i.flags&32)!==0,i.flags&=-33,n===null){if(lt){if(b?Wi(i):Ji(),(n=It)?(n=uv(n,xr),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Gi!==null?{id:Fr,overflow:Hr}:null,retryLane:536870912,hydrationErrors:null},o=Lb(n),o.return=i,i.child=o,En=i,It=null)):n=null,n===null)throw Qi(i);return qp(n)?i.lanes=32:i.lanes=536870912,null}var C=u.children;return u=u.fallback,b?(Ji(),b=i.mode,C=Qc({mode:"hidden",children:C},b),u=Ma(u,b,o,null),C.return=i,u.return=i,C.sibling=u,i.child=C,u=i.child,u.memoizedState=sp(o),u.childLanes=lp(n,_,o),i.memoizedState=op,Zs(null,u)):(Wi(i),cp(i,C))}var z=n.memoizedState;if(z!==null&&(C=z.dehydrated,C!==null)){if(y)i.flags&256?(Wi(i),i.flags&=-257,i=up(n,i,o)):i.memoizedState!==null?(Ji(),i.child=n.child,i.flags|=128,i=null):(Ji(),C=u.fallback,b=i.mode,u=Qc({mode:"visible",children:u.children},b),C=Ma(C,b,o,null),C.flags|=2,u.return=i,C.return=i,u.sibling=C,i.child=u,Ba(i,n.child,null,o),u=i.child,u.memoizedState=sp(o),u.childLanes=lp(n,_,o),i.memoizedState=op,i=Zs(null,u));else if(Wi(i),qp(C)){if(_=C.nextSibling&&C.nextSibling.dataset,_)var X=_.dgst;_=X,u=Error(a(419)),u.stack="",u.digest=_,Ps({value:u,source:null,stack:null}),i=up(n,i,o)}else if(an||So(n,i,o,!1),_=(o&n.childLanes)!==0,an||_){if(_=Rt,_!==null&&(u=ut(_,o),u!==0&&u!==z.retryLane))throw z.retryLane=u,Ra(n,u),Qn(_,n,u),ip;$p(C)||nu(),i=up(n,i,o)}else $p(C)?(i.flags|=192,i.child=n.child,i=null):(n=z.treeContext,It=Er(C.nextSibling),En=i,lt=!0,Ki=null,xr=!1,n!==null&&Bb(i,n),i=cp(i,u.children),i.flags|=4096);return i}return b?(Ji(),C=u.fallback,b=i.mode,z=n.child,X=z.sibling,u=di(z,{mode:"hidden",children:u.children}),u.subtreeFlags=z.subtreeFlags&65011712,X!==null?C=di(X,C):(C=Ma(C,b,o,null),C.flags|=2),C.return=i,u.return=i,u.sibling=C,i.child=u,Zs(null,u),u=i.child,C=n.child.memoizedState,C===null?C=sp(o):(b=C.cachePool,b!==null?(z=nn._currentValue,b=b.parent!==z?{parent:z,pool:z}:b):b=qb(),C={baseLanes:C.baseLanes|o,cachePool:b}),u.memoizedState=C,u.childLanes=lp(n,_,o),i.memoizedState=op,Zs(n.child,u)):(Wi(i),o=n.child,n=o.sibling,o=di(o,{mode:"visible",children:u.children}),o.return=i,o.sibling=null,n!==null&&(_=i.deletions,_===null?(i.deletions=[n],i.flags|=16):_.push(n)),i.child=o,i.memoizedState=null,o)}function cp(n,i){return i=Qc({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function Qc(n,i){return n=tr(22,n,null,i),n.lanes=0,n}function up(n,i,o){return Ba(i,n.child,null,o),n=cp(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function rx(n,i,o){n.lanes|=i;var u=n.alternate;u!==null&&(u.lanes|=i),kf(n.return,i,o)}function dp(n,i,o,u,b,y){var _=n.memoizedState;_===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:b,treeForkCount:y}:(_.isBackwards=i,_.rendering=null,_.renderingStartTime=0,_.last=u,_.tail=o,_.tailMode=b,_.treeForkCount=y)}function ix(n,i,o){var u=i.pendingProps,b=u.revealOrder,y=u.tail;u=u.children;var _=Zt.current,C=(_&2)!==0;if(C?(_=_&1|2,i.flags|=128):_&=1,A(Zt,_),Sn(n,i,u,o),u=lt?Bs:0,!C&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&rx(n,o,i);else if(n.tag===19)rx(n,o,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(b){case"forwards":for(o=i.child,b=null;o!==null;)n=o.alternate,n!==null&&Lc(n)===null&&(b=o),o=o.sibling;o=b,o===null?(b=i.child,i.child=null):(b=o.sibling,o.sibling=null),dp(i,!1,b,o,y,u);break;case"backwards":case"unstable_legacy-backwards":for(o=null,b=i.child,i.child=null;b!==null;){if(n=b.alternate,n!==null&&Lc(n)===null){i.child=b;break}n=b.sibling,b.sibling=o,o=b,b=n}dp(i,!0,o,null,y,u);break;case"together":dp(i,!1,null,null,void 0,u);break;default:i.memoizedState=null}return i.child}function bi(n,i,o){if(n!==null&&(i.dependencies=n.dependencies),na|=i.lanes,(o&i.childLanes)===0)if(n!==null){if(So(n,i,o,!1),(o&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(a(153));if(i.child!==null){for(n=i.child,o=di(n,n.pendingProps),i.child=o,o.return=i;n.sibling!==null;)n=n.sibling,o=o.sibling=di(n,n.pendingProps),o.return=i;o.sibling=null}return i.child}function fp(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&Cc(n)))}function BC(n,i,o){switch(i.tag){case 3:Ee(i,i.stateNode.containerInfo),Vi(i,nn,n.memoizedState.cache),Oa();break;case 27:case 5:dt(i);break;case 4:Ee(i,i.stateNode.containerInfo);break;case 10:Vi(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,zf(i),null;break;case 13:var u=i.memoizedState;if(u!==null)return u.dehydrated!==null?(Wi(i),i.flags|=128,null):(o&i.child.childLanes)!==0?nx(n,i,o):(Wi(i),n=bi(n,i,o),n!==null?n.sibling:null);Wi(i);break;case 19:var b=(n.flags&128)!==0;if(u=(o&i.childLanes)!==0,u||(So(n,i,o,!1),u=(o&i.childLanes)!==0),b){if(u)return ix(n,i,o);i.flags|=128}if(b=i.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),A(Zt,Zt.current),u)break;return null;case 22:return i.lanes=0,Xy(n,i,o,i.pendingProps);case 24:Vi(i,nn,n.memoizedState.cache)}return bi(n,i,o)}function ax(n,i,o){if(n!==null)if(n.memoizedProps!==i.pendingProps)an=!0;else{if(!fp(n,o)&&(i.flags&128)===0)return an=!1,BC(n,i,o);an=(n.flags&131072)!==0}else an=!1,lt&&(i.flags&1048576)!==0&&zb(i,Bs,i.index);switch(i.lanes=0,i.tag){case 16:e:{var u=i.pendingProps;if(n=Ia(i.elementType),i.type=n,typeof n=="function")bf(n)?(u=Ua(n,u),i.tag=1,i=ex(null,i,n,u,o)):(i.tag=0,i=ap(null,i,n,u,o));else{if(n!=null){var b=n.$$typeof;if(b===O){i.tag=11,i=Qy(null,i,n,u,o);break e}else if(b===U){i.tag=14,i=Vy(null,i,n,u,o);break e}}throw i=te(n)||n,Error(a(306,i,""))}}return i;case 0:return ap(n,i,i.type,i.pendingProps,o);case 1:return u=i.type,b=Ua(u,i.pendingProps),ex(n,i,u,b,o);case 3:e:{if(Ee(i,i.stateNode.containerInfo),n===null)throw Error(a(387));u=i.pendingProps;var y=i.memoizedState;b=y.element,Of(n,i),Ks(i,u,null,o);var _=i.memoizedState;if(u=_.cache,Vi(i,nn,u),u!==y.cache&&Nf(i,[nn],o,!0),Gs(),u=_.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:_.cache},i.updateQueue.baseState=y,i.memoizedState=y,i.flags&256){i=tx(n,i,u,o);break e}else if(u!==b){b=gr(Error(a(424)),i),Ps(b),i=tx(n,i,u,o);break e}else for(n=i.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,It=Er(n.firstChild),En=i,lt=!0,Ki=null,xr=!0,o=Xb(i,null,u,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Oa(),u===b){i=bi(n,i,o);break e}Sn(n,i,u,o)}i=i.child}return i;case 26:return Kc(n,i),n===null?(o=gv(i.type,null,i.pendingProps,null))?i.memoizedState=o:lt||(o=i.type,n=i.pendingProps,u=cu(de.current).createElement(o),u[Yt]=i,u[Cn]=n,_n(u,o,n),en(u),i.stateNode=u):i.memoizedState=gv(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return dt(i),n===null&<&&(u=i.stateNode=pv(i.type,i.pendingProps,de.current),En=i,xr=!0,b=It,sa(i.type)?(Gp=b,It=Er(u.firstChild)):It=b),Sn(n,i,i.pendingProps.children,o),Kc(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&<&&((b=u=It)&&(u=mT(u,i.type,i.pendingProps,xr),u!==null?(i.stateNode=u,En=i,It=Er(u.firstChild),xr=!1,b=!0):b=!1),b||Qi(i)),dt(i),b=i.type,y=i.pendingProps,_=n!==null?n.memoizedProps:null,u=y.children,Up(b,y)?u=null:_!==null&&Up(b,_)&&(i.flags|=32),i.memoizedState!==null&&(b=Pf(n,i,AC,null,null,o),fl._currentValue=b),Kc(n,i),Sn(n,i,u,o),i.child;case 6:return n===null&<&&((n=o=It)&&(o=hT(o,i.pendingProps,xr),o!==null?(i.stateNode=o,En=i,It=null,n=!0):n=!1),n||Qi(i)),null;case 13:return nx(n,i,o);case 4:return Ee(i,i.stateNode.containerInfo),u=i.pendingProps,n===null?i.child=Ba(i,null,u,o):Sn(n,i,u,o),i.child;case 11:return Qy(n,i,i.type,i.pendingProps,o);case 7:return Sn(n,i,i.pendingProps,o),i.child;case 8:return Sn(n,i,i.pendingProps.children,o),i.child;case 12:return Sn(n,i,i.pendingProps.children,o),i.child;case 10:return u=i.pendingProps,Vi(i,i.type,u.value),Sn(n,i,u.children,o),i.child;case 9:return b=i.type._context,u=i.pendingProps.children,ja(i),b=wn(b),u=u(b),i.flags|=1,Sn(n,i,u,o),i.child;case 14:return Vy(n,i,i.type,i.pendingProps,o);case 15:return Yy(n,i,i.type,i.pendingProps,o);case 19:return ix(n,i,o);case 31:return zC(n,i,o);case 22:return Xy(n,i,o,i.pendingProps);case 24:return ja(i),u=wn(nn),n===null?(b=Af(),b===null&&(b=Rt,y=Cf(),b.pooledCache=y,y.refCount++,y!==null&&(b.pooledCacheLanes|=o),b=y),i.memoizedState={parent:u,cache:b},Mf(i),Vi(i,nn,b)):((n.lanes&o)!==0&&(Of(n,i),Ks(i,null,null,o),Gs()),b=n.memoizedState,y=i.memoizedState,b.parent!==u?(b={parent:u,cache:u},i.memoizedState=b,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=b),Vi(i,nn,u)):(u=y.cache,Vi(i,nn,u),u!==b.cache&&Nf(i,[nn],o,!0))),Sn(n,i,i.pendingProps.children,o),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function yi(n){n.flags|=4}function pp(n,i,o,u,b){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(b&335544128)===b)if(n.stateNode.complete)n.flags|=8192;else if(Ox())n.flags|=8192;else throw za=Mc,Rf}else n.flags&=-16777217}function ox(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Ev(i))if(Ox())n.flags|=8192;else throw za=Mc,Rf}function Vc(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?Ae():536870912,n.lanes|=i,Lo|=i)}function Ws(n,i){if(!lt)switch(n.tailMode){case"hidden":i=n.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function zt(n){var i=n.alternate!==null&&n.alternate.child===n.child,o=0,u=0;if(i)for(var b=n.child;b!==null;)o|=b.lanes|b.childLanes,u|=b.subtreeFlags&65011712,u|=b.flags&65011712,b.return=n,b=b.sibling;else for(b=n.child;b!==null;)o|=b.lanes|b.childLanes,u|=b.subtreeFlags,u|=b.flags,b.return=n,b=b.sibling;return n.subtreeFlags|=u,n.childLanes=o,i}function PC(n,i,o){var u=i.pendingProps;switch(Ef(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(i),null;case 1:return zt(i),null;case 3:return o=i.stateNode,u=null,n!==null&&(u=n.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),mi(nn),Ce(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(wo(i)?yi(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Sf())),zt(i),null;case 26:var b=i.type,y=i.memoizedState;return n===null?(yi(i),y!==null?(zt(i),ox(i,y)):(zt(i),pp(i,b,null,u,o))):y?y!==n.memoizedState?(yi(i),zt(i),ox(i,y)):(zt(i),i.flags&=-16777217):(n=n.memoizedProps,n!==u&&yi(i),zt(i),pp(i,b,n,u,o)),null;case 27:if(St(i),o=de.current,b=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==u&&yi(i);else{if(!u){if(i.stateNode===null)throw Error(a(166));return zt(i),null}n=$.current,wo(i)?Pb(i):(n=pv(b,u,o),i.stateNode=n,yi(i))}return zt(i),null;case 5:if(St(i),b=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==u&&yi(i);else{if(!u){if(i.stateNode===null)throw Error(a(166));return zt(i),null}if(y=$.current,wo(i))Pb(i);else{var _=cu(de.current);switch(y){case 1:y=_.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:y=_.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":y=_.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":y=_.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;case"script":y=_.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?_.createElement("select",{is:u.is}):_.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?_.createElement(b,{is:u.is}):_.createElement(b)}}y[Yt]=i,y[Cn]=u;e:for(_=i.child;_!==null;){if(_.tag===5||_.tag===6)y.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===i)break e;for(;_.sibling===null;){if(_.return===null||_.return===i)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}i.stateNode=y;e:switch(_n(y,b,u),b){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&yi(i)}}return zt(i),pp(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,o),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==u&&yi(i);else{if(typeof u!="string"&&i.stateNode===null)throw Error(a(166));if(n=de.current,wo(i)){if(n=i.stateNode,o=i.memoizedProps,u=null,b=En,b!==null)switch(b.tag){case 27:case 5:u=b.memoizedProps}n[Yt]=i,n=!!(n.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||nv(n.nodeValue,o)),n||Qi(i,!0)}else n=cu(n).createTextNode(u),n[Yt]=i,i.stateNode=n}return zt(i),null;case 31:if(o=i.memoizedState,n===null||n.memoizedState!==null){if(u=wo(i),o!==null){if(n===null){if(!u)throw Error(a(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Yt]=i}else Oa(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;zt(i),n=!1}else o=Sf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return i.flags&256?(rr(i),i):(rr(i),null);if((i.flags&128)!==0)throw Error(a(558))}return zt(i),null;case 13:if(u=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(b=wo(i),u!==null&&u.dehydrated!==null){if(n===null){if(!b)throw Error(a(318));if(b=i.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(a(317));b[Yt]=i}else Oa(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;zt(i),b=!1}else b=Sf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=b),b=!0;if(!b)return i.flags&256?(rr(i),i):(rr(i),null)}return rr(i),(i.flags&128)!==0?(i.lanes=o,i):(o=u!==null,n=n!==null&&n.memoizedState!==null,o&&(u=i.child,b=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(b=u.alternate.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==b&&(u.flags|=2048)),o!==n&&o&&(i.child.flags|=8192),Vc(i,i.updateQueue),zt(i),null);case 4:return Ce(),n===null&&Lp(i.stateNode.containerInfo),zt(i),null;case 10:return mi(i.type),zt(i),null;case 19:if(q(Zt),u=i.memoizedState,u===null)return zt(i),null;if(b=(i.flags&128)!==0,y=u.rendering,y===null)if(b)Ws(u,!1);else{if(Kt!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(y=Lc(n),y!==null){for(i.flags|=128,Ws(u,!1),n=y.updateQueue,i.updateQueue=n,Vc(i,n),i.subtreeFlags=0,n=o,o=i.child;o!==null;)jb(o,n),o=o.sibling;return A(Zt,Zt.current&1|2),lt&&fi(i,u.treeForkCount),i.child}n=n.sibling}u.tail!==null&&fe()>Jc&&(i.flags|=128,b=!0,Ws(u,!1),i.lanes=4194304)}else{if(!b)if(n=Lc(y),n!==null){if(i.flags|=128,b=!0,n=n.updateQueue,i.updateQueue=n,Vc(i,n),Ws(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!lt)return zt(i),null}else 2*fe()-u.renderingStartTime>Jc&&o!==536870912&&(i.flags|=128,b=!0,Ws(u,!1),i.lanes=4194304);u.isBackwards?(y.sibling=i.child,i.child=y):(n=u.last,n!==null?n.sibling=y:i.child=y,u.last=y)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=fe(),n.sibling=null,o=Zt.current,A(Zt,b?o&1|2:o&1),lt&&fi(i,u.treeForkCount),n):(zt(i),null);case 22:case 23:return rr(i),If(),u=i.memoizedState!==null,n!==null?n.memoizedState!==null!==u&&(i.flags|=8192):u&&(i.flags|=8192),u?(o&536870912)!==0&&(i.flags&128)===0&&(zt(i),i.subtreeFlags&6&&(i.flags|=8192)):zt(i),o=i.updateQueue,o!==null&&Vc(i,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==o&&(i.flags|=2048),n!==null&&q(La),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),mi(nn),zt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function UC(n,i){switch(Ef(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return mi(nn),Ce(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return St(i),null;case 31:if(i.memoizedState!==null){if(rr(i),i.alternate===null)throw Error(a(340));Oa()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(rr(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Oa()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return q(Zt),null;case 4:return Ce(),null;case 10:return mi(i.type),null;case 22:case 23:return rr(i),If(),n!==null&&q(La),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return mi(nn),null;case 25:return null;default:return null}}function sx(n,i){switch(Ef(i),i.tag){case 3:mi(nn),Ce();break;case 26:case 27:case 5:St(i);break;case 4:Ce();break;case 31:i.memoizedState!==null&&rr(i);break;case 13:rr(i);break;case 19:q(Zt);break;case 10:mi(i.type);break;case 22:case 23:rr(i),If(),n!==null&&q(La);break;case 24:mi(nn)}}function Js(n,i){try{var o=i.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var b=u.next;o=b;do{if((o.tag&n)===n){u=void 0;var y=o.create,_=o.inst;u=y(),_.destroy=u}o=o.next}while(o!==b)}}catch(C){wt(i,i.return,C)}}function ea(n,i,o){try{var u=i.updateQueue,b=u!==null?u.lastEffect:null;if(b!==null){var y=b.next;u=y;do{if((u.tag&n)===n){var _=u.inst,C=_.destroy;if(C!==void 0){_.destroy=void 0,b=i;var z=o,X=C;try{X()}catch(oe){wt(b,z,oe)}}}u=u.next}while(u!==y)}}catch(oe){wt(i,i.return,oe)}}function lx(n){var i=n.updateQueue;if(i!==null){var o=n.stateNode;try{Wb(i,o)}catch(u){wt(n,n.return,u)}}}function cx(n,i,o){o.props=Ua(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(u){wt(n,i,u)}}function el(n,i){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var u=n.stateNode;break;case 30:u=n.stateNode;break;default:u=n.stateNode}typeof o=="function"?n.refCleanup=o(u):o.current=u}}catch(b){wt(n,i,b)}}function $r(n,i){var o=n.ref,u=n.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(b){wt(n,i,b)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(b){wt(n,i,b)}else o.current=null}function ux(n){var i=n.type,o=n.memoizedProps,u=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break e;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(b){wt(n,n.return,b)}}function mp(n,i,o){try{var u=n.stateNode;lT(u,n.type,o,i),u[Cn]=i}catch(b){wt(n,n.return,b)}}function dx(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&sa(n.type)||n.tag===4}function hp(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||dx(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&sa(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function gp(n,i,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,i?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(n,i):(i=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,i.appendChild(n),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=ye));else if(u!==4&&(u===27&&sa(n.type)&&(o=n.stateNode,i=null),n=n.child,n!==null))for(gp(n,i,o),n=n.sibling;n!==null;)gp(n,i,o),n=n.sibling}function Yc(n,i,o){var u=n.tag;if(u===5||u===6)n=n.stateNode,i?o.insertBefore(n,i):o.appendChild(n);else if(u!==4&&(u===27&&sa(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(Yc(n,i,o),n=n.sibling;n!==null;)Yc(n,i,o),n=n.sibling}function fx(n){var i=n.stateNode,o=n.memoizedProps;try{for(var u=n.type,b=i.attributes;b.length;)i.removeAttributeNode(b[0]);_n(i,u,o),i[Yt]=n,i[Cn]=o}catch(y){wt(n,n.return,y)}}var xi=!1,on=!1,bp=!1,px=typeof WeakSet=="function"?WeakSet:Set,gn=null;function FC(n,i){if(n=n.containerInfo,Bp=gu,n=kb(n),uf(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var b=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var _=0,C=-1,z=-1,X=0,oe=0,le=n,W=null;t:for(;;){for(var ne;le!==o||b!==0&&le.nodeType!==3||(C=_+b),le!==y||u!==0&&le.nodeType!==3||(z=_+u),le.nodeType===3&&(_+=le.nodeValue.length),(ne=le.firstChild)!==null;)W=le,le=ne;for(;;){if(le===n)break t;if(W===o&&++X===b&&(C=_),W===y&&++oe===u&&(z=_),(ne=le.nextSibling)!==null)break;le=W,W=le.parentNode}le=ne}o=C===-1||z===-1?null:{start:C,end:z}}else o=null}o=o||{start:0,end:0}}else o=null;for(Pp={focusedElem:n,selectionRange:o},gu=!1,gn=i;gn!==null;)if(i=gn,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,gn=n;else for(;gn!==null;){switch(i=gn,y=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(o=0;o<n.length;o++)b=n[o],b.ref.impl=b.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&y!==null){n=void 0,o=i,b=y.memoizedProps,y=y.memoizedState,u=o.stateNode;try{var Ne=Ua(o.type,b);n=u.getSnapshotBeforeUpdate(Ne,y),u.__reactInternalSnapshotBeforeUpdate=n}catch(Pe){wt(o,o.return,Pe)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,o=n.nodeType,o===9)Hp(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Hp(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(a(163))}if(n=i.sibling,n!==null){n.return=i.return,gn=n;break}gn=i.return}}function mx(n,i,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:Ei(n,o),u&4&&Js(5,o);break;case 1:if(Ei(n,o),u&4)if(n=o.stateNode,i===null)try{n.componentDidMount()}catch(_){wt(o,o.return,_)}else{var b=Ua(o.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(b,i,n.__reactInternalSnapshotBeforeUpdate)}catch(_){wt(o,o.return,_)}}u&64&&lx(o),u&512&&el(o,o.return);break;case 3:if(Ei(n,o),u&64&&(n=o.updateQueue,n!==null)){if(i=null,o.child!==null)switch(o.child.tag){case 27:case 5:i=o.child.stateNode;break;case 1:i=o.child.stateNode}try{Wb(n,i)}catch(_){wt(o,o.return,_)}}break;case 27:i===null&&u&4&&fx(o);case 26:case 5:Ei(n,o),i===null&&u&4&&ux(o),u&512&&el(o,o.return);break;case 12:Ei(n,o);break;case 31:Ei(n,o),u&4&&bx(n,o);break;case 13:Ei(n,o),u&4&&yx(n,o),u&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=XC.bind(null,o),gT(n,o))));break;case 22:if(u=o.memoizedState!==null||xi,!u){i=i!==null&&i.memoizedState!==null||on,b=xi;var y=on;xi=u,(on=i)&&!y?wi(n,o,(o.subtreeFlags&8772)!==0):Ei(n,o),xi=b,on=y}break;case 30:break;default:Ei(n,o)}}function hx(n){var i=n.alternate;i!==null&&(n.alternate=null,hx(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&_s(i)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Pt=null,$n=!1;function vi(n,i,o){for(o=o.child;o!==null;)gx(n,i,o),o=o.sibling}function gx(n,i,o){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(qt,o)}catch{}switch(o.tag){case 26:on||$r(o,i),vi(n,i,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:on||$r(o,i);var u=Pt,b=$n;sa(o.type)&&(Pt=o.stateNode,$n=!1),vi(n,i,o),cl(o.stateNode),Pt=u,$n=b;break;case 5:on||$r(o,i);case 6:if(u=Pt,b=$n,Pt=null,vi(n,i,o),Pt=u,$n=b,Pt!==null)if($n)try{(Pt.nodeType===9?Pt.body:Pt.nodeName==="HTML"?Pt.ownerDocument.body:Pt).removeChild(o.stateNode)}catch(y){wt(o,i,y)}else try{Pt.removeChild(o.stateNode)}catch(y){wt(o,i,y)}break;case 18:Pt!==null&&($n?(n=Pt,lv(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),$o(n)):lv(Pt,o.stateNode));break;case 4:u=Pt,b=$n,Pt=o.stateNode.containerInfo,$n=!0,vi(n,i,o),Pt=u,$n=b;break;case 0:case 11:case 14:case 15:ea(2,o,i),on||ea(4,o,i),vi(n,i,o);break;case 1:on||($r(o,i),u=o.stateNode,typeof u.componentWillUnmount=="function"&&cx(o,i,u)),vi(n,i,o);break;case 21:vi(n,i,o);break;case 22:on=(u=on)||o.memoizedState!==null,vi(n,i,o),on=u;break;default:vi(n,i,o)}}function bx(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{$o(n)}catch(o){wt(i,i.return,o)}}}function yx(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{$o(n)}catch(o){wt(i,i.return,o)}}function HC(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new px),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new px),i;default:throw Error(a(435,n.tag))}}function Xc(n,i){var o=HC(n);i.forEach(function(u){if(!o.has(u)){o.add(u);var b=ZC.bind(null,n,u);u.then(b,b)}})}function qn(n,i){var o=i.deletions;if(o!==null)for(var u=0;u<o.length;u++){var b=o[u],y=n,_=i,C=_;e:for(;C!==null;){switch(C.tag){case 27:if(sa(C.type)){Pt=C.stateNode,$n=!1;break e}break;case 5:Pt=C.stateNode,$n=!1;break e;case 3:case 4:Pt=C.stateNode.containerInfo,$n=!0;break e}C=C.return}if(Pt===null)throw Error(a(160));gx(y,_,b),Pt=null,$n=!1,y=b.alternate,y!==null&&(y.return=null),b.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)xx(i,n),i=i.sibling}var Cr=null;function xx(n,i){var o=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:qn(i,n),Gn(n),u&4&&(ea(3,n,n.return),Js(3,n),ea(5,n,n.return));break;case 1:qn(i,n),Gn(n),u&512&&(on||o===null||$r(o,o.return)),u&64&&xi&&(n=n.updateQueue,n!==null&&(u=n.callbacks,u!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var b=Cr;if(qn(i,n),Gn(n),u&512&&(on||o===null||$r(o,o.return)),u&4){var y=o!==null?o.memoizedState:null;if(u=n.memoizedState,o===null)if(u===null)if(n.stateNode===null){e:{u=n.type,o=n.memoizedProps,b=b.ownerDocument||b;t:switch(u){case"title":y=b.getElementsByTagName("title")[0],(!y||y[_a]||y[Yt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=b.createElement(u),b.head.insertBefore(y,b.querySelector("head > title"))),_n(y,u,o),y[Yt]=n,en(y),u=y;break e;case"link":var _=xv("link","href",b).get(u+(o.href||""));if(_){for(var C=0;C<_.length;C++)if(y=_[C],y.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&y.getAttribute("rel")===(o.rel==null?null:o.rel)&&y.getAttribute("title")===(o.title==null?null:o.title)&&y.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){_.splice(C,1);break t}}y=b.createElement(u),_n(y,u,o),b.head.appendChild(y);break;case"meta":if(_=xv("meta","content",b).get(u+(o.content||""))){for(C=0;C<_.length;C++)if(y=_[C],y.getAttribute("content")===(o.content==null?null:""+o.content)&&y.getAttribute("name")===(o.name==null?null:o.name)&&y.getAttribute("property")===(o.property==null?null:o.property)&&y.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&y.getAttribute("charset")===(o.charSet==null?null:o.charSet)){_.splice(C,1);break t}}y=b.createElement(u),_n(y,u,o),b.head.appendChild(y);break;default:throw Error(a(468,u))}y[Yt]=n,en(y),u=y}n.stateNode=u}else vv(b,n.type,n.stateNode);else n.stateNode=yv(b,u,n.memoizedProps);else y!==u?(y===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):y.count--,u===null?vv(b,n.type,n.stateNode):yv(b,u,n.memoizedProps)):u===null&&n.stateNode!==null&&mp(n,n.memoizedProps,o.memoizedProps)}break;case 27:qn(i,n),Gn(n),u&512&&(on||o===null||$r(o,o.return)),o!==null&&u&4&&mp(n,n.memoizedProps,o.memoizedProps);break;case 5:if(qn(i,n),Gn(n),u&512&&(on||o===null||$r(o,o.return)),n.flags&32){b=n.stateNode;try{Fe(b,"")}catch(Ne){wt(n,n.return,Ne)}}u&4&&n.stateNode!=null&&(b=n.memoizedProps,mp(n,b,o!==null?o.memoizedProps:b)),u&1024&&(bp=!0);break;case 6:if(qn(i,n),Gn(n),u&4){if(n.stateNode===null)throw Error(a(162));u=n.memoizedProps,o=n.stateNode;try{o.nodeValue=u}catch(Ne){wt(n,n.return,Ne)}}break;case 3:if(fu=null,b=Cr,Cr=uu(i.containerInfo),qn(i,n),Cr=b,Gn(n),u&4&&o!==null&&o.memoizedState.isDehydrated)try{$o(i.containerInfo)}catch(Ne){wt(n,n.return,Ne)}bp&&(bp=!1,vx(n));break;case 4:u=Cr,Cr=uu(n.stateNode.containerInfo),qn(i,n),Gn(n),Cr=u;break;case 12:qn(i,n),Gn(n);break;case 31:qn(i,n),Gn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Xc(n,u)));break;case 13:qn(i,n),Gn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Wc=fe()),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Xc(n,u)));break;case 22:b=n.memoizedState!==null;var z=o!==null&&o.memoizedState!==null,X=xi,oe=on;if(xi=X||b,on=oe||z,qn(i,n),on=oe,xi=X,Gn(n),u&8192)e:for(i=n.stateNode,i._visibility=b?i._visibility&-2:i._visibility|1,b&&(o===null||z||xi||on||Fa(n)),o=null,i=n;;){if(i.tag===5||i.tag===26){if(o===null){z=o=i;try{if(y=z.stateNode,b)_=y.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{C=z.stateNode;var le=z.memoizedProps.style,W=le!=null&&le.hasOwnProperty("display")?le.display:null;C.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(Ne){wt(z,z.return,Ne)}}}else if(i.tag===6){if(o===null){z=i;try{z.stateNode.nodeValue=b?"":z.memoizedProps}catch(Ne){wt(z,z.return,Ne)}}}else if(i.tag===18){if(o===null){z=i;try{var ne=z.stateNode;b?cv(ne,!0):cv(z.stateNode,!1)}catch(Ne){wt(z,z.return,Ne)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===n)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break e;for(;i.sibling===null;){if(i.return===null||i.return===n)break e;o===i&&(o=null),i=i.return}o===i&&(o=null),i.sibling.return=i.return,i=i.sibling}u&4&&(u=n.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Xc(n,o))));break;case 19:qn(i,n),Gn(n),u&4&&(u=n.updateQueue,u!==null&&(n.updateQueue=null,Xc(n,u)));break;case 30:break;case 21:break;default:qn(i,n),Gn(n)}}function Gn(n){var i=n.flags;if(i&2){try{for(var o,u=n.return;u!==null;){if(dx(u)){o=u;break}u=u.return}if(o==null)throw Error(a(160));switch(o.tag){case 27:var b=o.stateNode,y=hp(n);Yc(n,y,b);break;case 5:var _=o.stateNode;o.flags&32&&(Fe(_,""),o.flags&=-33);var C=hp(n);Yc(n,C,_);break;case 3:case 4:var z=o.stateNode.containerInfo,X=hp(n);gp(n,X,z);break;default:throw Error(a(161))}}catch(oe){wt(n,n.return,oe)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function vx(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;vx(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function Ei(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)mx(n,i.alternate,i),i=i.sibling}function Fa(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:ea(4,i,i.return),Fa(i);break;case 1:$r(i,i.return);var o=i.stateNode;typeof o.componentWillUnmount=="function"&&cx(i,i.return,o),Fa(i);break;case 27:cl(i.stateNode);case 26:case 5:$r(i,i.return),Fa(i);break;case 22:i.memoizedState===null&&Fa(i);break;case 30:Fa(i);break;default:Fa(i)}n=n.sibling}}function wi(n,i,o){for(o=o&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var u=i.alternate,b=n,y=i,_=y.flags;switch(y.tag){case 0:case 11:case 15:wi(b,y,o),Js(4,y);break;case 1:if(wi(b,y,o),u=y,b=u.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(X){wt(u,u.return,X)}if(u=y,b=u.updateQueue,b!==null){var C=u.stateNode;try{var z=b.shared.hiddenCallbacks;if(z!==null)for(b.shared.hiddenCallbacks=null,b=0;b<z.length;b++)Zb(z[b],C)}catch(X){wt(u,u.return,X)}}o&&_&64&&lx(y),el(y,y.return);break;case 27:fx(y);case 26:case 5:wi(b,y,o),o&&u===null&&_&4&&ux(y),el(y,y.return);break;case 12:wi(b,y,o);break;case 31:wi(b,y,o),o&&_&4&&bx(b,y);break;case 13:wi(b,y,o),o&&_&4&&yx(b,y);break;case 22:y.memoizedState===null&&wi(b,y,o),el(y,y.return);break;case 30:break;default:wi(b,y,o)}i=i.sibling}}function yp(n,i){var o=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==o&&(n!=null&&n.refCount++,o!=null&&Us(o))}function xp(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&Us(n))}function Tr(n,i,o,u){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Ex(n,i,o,u),i=i.sibling}function Ex(n,i,o,u){var b=i.flags;switch(i.tag){case 0:case 11:case 15:Tr(n,i,o,u),b&2048&&Js(9,i);break;case 1:Tr(n,i,o,u);break;case 3:Tr(n,i,o,u),b&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&Us(n)));break;case 12:if(b&2048){Tr(n,i,o,u),n=i.stateNode;try{var y=i.memoizedProps,_=y.id,C=y.onPostCommit;typeof C=="function"&&C(_,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(z){wt(i,i.return,z)}}else Tr(n,i,o,u);break;case 31:Tr(n,i,o,u);break;case 13:Tr(n,i,o,u);break;case 23:break;case 22:y=i.stateNode,_=i.alternate,i.memoizedState!==null?y._visibility&2?Tr(n,i,o,u):tl(n,i):y._visibility&2?Tr(n,i,o,u):(y._visibility|=2,Oo(n,i,o,u,(i.subtreeFlags&10256)!==0||!1)),b&2048&&yp(_,i);break;case 24:Tr(n,i,o,u),b&2048&&xp(i.alternate,i);break;default:Tr(n,i,o,u)}}function Oo(n,i,o,u,b){for(b=b&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var y=n,_=i,C=o,z=u,X=_.flags;switch(_.tag){case 0:case 11:case 15:Oo(y,_,C,z,b),Js(8,_);break;case 23:break;case 22:var oe=_.stateNode;_.memoizedState!==null?oe._visibility&2?Oo(y,_,C,z,b):tl(y,_):(oe._visibility|=2,Oo(y,_,C,z,b)),b&&X&2048&&yp(_.alternate,_);break;case 24:Oo(y,_,C,z,b),b&&X&2048&&xp(_.alternate,_);break;default:Oo(y,_,C,z,b)}i=i.sibling}}function tl(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var o=n,u=i,b=u.flags;switch(u.tag){case 22:tl(o,u),b&2048&&yp(u.alternate,u);break;case 24:tl(o,u),b&2048&&xp(u.alternate,u);break;default:tl(o,u)}i=i.sibling}}var nl=8192;function Do(n,i,o){if(n.subtreeFlags&nl)for(n=n.child;n!==null;)wx(n,i,o),n=n.sibling}function wx(n,i,o){switch(n.tag){case 26:Do(n,i,o),n.flags&nl&&n.memoizedState!==null&&TT(o,Cr,n.memoizedState,n.memoizedProps);break;case 5:Do(n,i,o);break;case 3:case 4:var u=Cr;Cr=uu(n.stateNode.containerInfo),Do(n,i,o),Cr=u;break;case 22:n.memoizedState===null&&(u=n.alternate,u!==null&&u.memoizedState!==null?(u=nl,nl=16777216,Do(n,i,o),nl=u):Do(n,i,o));break;default:Do(n,i,o)}}function Sx(n){var i=n.alternate;if(i!==null&&(n=i.child,n!==null)){i.child=null;do i=n.sibling,n.sibling=null,n=i;while(n!==null)}}function rl(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var u=i[o];gn=u,kx(u,n)}Sx(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)_x(n),n=n.sibling}function _x(n){switch(n.tag){case 0:case 11:case 15:rl(n),n.flags&2048&&ea(9,n,n.return);break;case 3:rl(n);break;case 12:rl(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,Zc(n)):rl(n);break;default:rl(n)}}function Zc(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var u=i[o];gn=u,kx(u,n)}Sx(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:ea(8,i,i.return),Zc(i);break;case 22:o=i.stateNode,o._visibility&2&&(o._visibility&=-3,Zc(i));break;default:Zc(i)}n=n.sibling}}function kx(n,i){for(;gn!==null;){var o=gn;switch(o.tag){case 0:case 11:case 15:ea(8,o,i);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Us(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,gn=u;else e:for(o=n;gn!==null;){u=gn;var b=u.sibling,y=u.return;if(hx(u),u===o){gn=null;break e}if(b!==null){b.return=y,gn=b;break e}gn=y}}}var $C={getCacheForType:function(n){var i=wn(nn),o=i.data.get(n);return o===void 0&&(o=n(),i.data.set(n,o)),o},cacheSignal:function(){return wn(nn).controller.signal}},qC=typeof WeakMap=="function"?WeakMap:Map,bt=0,Rt=null,nt=null,ot=0,Et=0,ir=null,ta=!1,jo=!1,vp=!1,Si=0,Kt=0,na=0,Ha=0,Ep=0,ar=0,Lo=0,il=null,Kn=null,wp=!1,Wc=0,Nx=0,Jc=1/0,eu=null,ra=null,pn=0,ia=null,Io=null,_i=0,Sp=0,_p=null,Cx=null,al=0,kp=null;function or(){return(bt&2)!==0&&ot!==0?ot&-ot:j.T!==null?Mp():Sa()}function Tx(){if(ar===0)if((ot&536870912)===0||lt){var n=Bi;Bi<<=1,(Bi&3932160)===0&&(Bi=262144),ar=n}else ar=536870912;return n=nr.current,n!==null&&(n.flags|=32),ar}function Qn(n,i,o){(n===Rt&&(Et===2||Et===9)||n.cancelPendingCommit!==null)&&(zo(n,0),aa(n,ot,ar,!1)),Ge(n,o),((bt&2)===0||n!==Rt)&&(n===Rt&&((bt&2)===0&&(Ha|=o),Kt===4&&aa(n,ot,ar,!1)),qr(n))}function Ax(n,i,o){if((bt&6)!==0)throw Error(a(327));var u=!o&&(i&127)===0&&(i&n.expiredLanes)===0||re(n,i),b=u?QC(n,i):Cp(n,i,!0),y=u;do{if(b===0){jo&&!u&&aa(n,i,0,!1);break}else{if(o=n.current.alternate,y&&!GC(o)){b=Cp(n,i,!1),y=!1;continue}if(b===2){if(y=i,n.errorRecoveryDisabledLanes&y)var _=0;else _=n.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){i=_;e:{var C=n;b=il;var z=C.current.memoizedState.isDehydrated;if(z&&(zo(C,_).flags|=256),_=Cp(C,_,!1),_!==2){if(vp&&!z){C.errorRecoveryDisabledLanes|=y,Ha|=y,b=4;break e}y=Kn,Kn=b,y!==null&&(Kn===null?Kn=y:Kn.push.apply(Kn,y))}b=_}if(y=!1,b!==2)continue}}if(b===1){zo(n,0),aa(n,i,0,!0);break}e:{switch(u=n,y=b,y){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:aa(u,i,ar,!ta);break e;case 2:Kn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(b=Wc+300-fe(),10<b)){if(aa(u,i,ar,!ta),L(u,0,!0)!==0)break e;_i=i,u.timeoutHandle=ov(Rx.bind(null,u,o,Kn,eu,wp,i,ar,Ha,Lo,ta,y,"Throttled",-0,0),b);break e}Rx(u,o,Kn,eu,wp,i,ar,Ha,Lo,ta,y,null,-0,0)}}break}while(!0);qr(n)}function Rx(n,i,o,u,b,y,_,C,z,X,oe,le,W,ne){if(n.timeoutHandle=-1,le=i.subtreeFlags,le&8192||(le&16785408)===16785408){le={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ye},wx(i,y,le);var Ne=(y&62914560)===y?Wc-fe():(y&4194048)===y?Nx-fe():0;if(Ne=AT(le,Ne),Ne!==null){_i=y,n.cancelPendingCommit=Ne(Bx.bind(null,n,i,y,o,u,b,_,C,z,oe,le,null,W,ne)),aa(n,y,_,!X);return}}Bx(n,i,y,o,u,b,_,C,z)}function GC(n){for(var i=n;;){var o=i.tag;if((o===0||o===11||o===15)&&i.flags&16384&&(o=i.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var b=o[u],y=b.getSnapshot;b=b.value;try{if(!er(y(),b))return!1}catch{return!1}}if(o=i.child,i.subtreeFlags&16384&&o!==null)o.return=i,i=o;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function aa(n,i,o,u){i&=~Ep,i&=~Ha,n.suspendedLanes|=i,n.pingedLanes&=~i,u&&(n.warmLanes|=i),u=n.expirationTimes;for(var b=i;0<b;){var y=31-ft(b),_=1<<y;u[y]=-1,b&=~_}o!==0&&ve(n,o,i)}function tu(){return(bt&6)===0?(ol(0),!1):!0}function Np(){if(nt!==null){if(Et===0)var n=nt.return;else n=nt,pi=Da=null,Hf(n),Co=null,Hs=0,n=nt;for(;n!==null;)sx(n.alternate,n),n=n.return;nt=null}}function zo(n,i){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,dT(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),_i=0,Np(),Rt=n,nt=o=di(n.current,null),ot=i,Et=0,ir=null,ta=!1,jo=re(n,i),vp=!1,Lo=ar=Ep=Ha=na=Kt=0,Kn=il=null,wp=!1,(i&8)!==0&&(i|=i&32);var u=n.entangledLanes;if(u!==0)for(n=n.entanglements,u&=i;0<u;){var b=31-ft(u),y=1<<b;i|=n[b],u&=~y}return Si=i,wc(),o}function Mx(n,i){Ze=null,j.H=Xs,i===No||i===Rc?(i=Qb(),Et=3):i===Rf?(i=Qb(),Et=4):Et=i===ip?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,ir=i,nt===null&&(Kt=1,qc(n,gr(i,n.current)))}function Ox(){var n=nr.current;return n===null?!0:(ot&4194048)===ot?vr===null:(ot&62914560)===ot||(ot&536870912)!==0?n===vr:!1}function Dx(){var n=j.H;return j.H=Xs,n===null?Xs:n}function jx(){var n=j.A;return j.A=$C,n}function nu(){Kt=4,ta||(ot&4194048)!==ot&&nr.current!==null||(jo=!0),(na&134217727)===0&&(Ha&134217727)===0||Rt===null||aa(Rt,ot,ar,!1)}function Cp(n,i,o){var u=bt;bt|=2;var b=Dx(),y=jx();(Rt!==n||ot!==i)&&(eu=null,zo(n,i)),i=!1;var _=Kt;e:do try{if(Et!==0&&nt!==null){var C=nt,z=ir;switch(Et){case 8:Np(),_=6;break e;case 3:case 2:case 9:case 6:nr.current===null&&(i=!0);var X=Et;if(Et=0,ir=null,Bo(n,C,z,X),o&&jo){_=0;break e}break;default:X=Et,Et=0,ir=null,Bo(n,C,z,X)}}KC(),_=Kt;break}catch(oe){Mx(n,oe)}while(!0);return i&&n.shellSuspendCounter++,pi=Da=null,bt=u,j.H=b,j.A=y,nt===null&&(Rt=null,ot=0,wc()),_}function KC(){for(;nt!==null;)Lx(nt)}function QC(n,i){var o=bt;bt|=2;var u=Dx(),b=jx();Rt!==n||ot!==i?(eu=null,Jc=fe()+500,zo(n,i)):jo=re(n,i);e:do try{if(Et!==0&&nt!==null){i=nt;var y=ir;t:switch(Et){case 1:Et=0,ir=null,Bo(n,i,y,1);break;case 2:case 9:if(Gb(y)){Et=0,ir=null,Ix(i);break}i=function(){Et!==2&&Et!==9||Rt!==n||(Et=7),qr(n)},y.then(i,i);break e;case 3:Et=7;break e;case 4:Et=5;break e;case 7:Gb(y)?(Et=0,ir=null,Ix(i)):(Et=0,ir=null,Bo(n,i,y,7));break;case 5:var _=null;switch(nt.tag){case 26:_=nt.memoizedState;case 5:case 27:var C=nt;if(_?Ev(_):C.stateNode.complete){Et=0,ir=null;var z=C.sibling;if(z!==null)nt=z;else{var X=C.return;X!==null?(nt=X,ru(X)):nt=null}break t}}Et=0,ir=null,Bo(n,i,y,5);break;case 6:Et=0,ir=null,Bo(n,i,y,6);break;case 8:Np(),Kt=6;break e;default:throw Error(a(462))}}VC();break}catch(oe){Mx(n,oe)}while(!0);return pi=Da=null,j.H=u,j.A=b,bt=o,nt!==null?0:(Rt=null,ot=0,wc(),Kt)}function VC(){for(;nt!==null&&!Qt();)Lx(nt)}function Lx(n){var i=ax(n.alternate,n,Si);n.memoizedProps=n.pendingProps,i===null?ru(n):nt=i}function Ix(n){var i=n,o=i.alternate;switch(i.tag){case 15:case 0:i=Jy(o,i,i.pendingProps,i.type,void 0,ot);break;case 11:i=Jy(o,i,i.pendingProps,i.type.render,i.ref,ot);break;case 5:Hf(i);default:sx(o,i),i=nt=jb(i,Si),i=ax(o,i,Si)}n.memoizedProps=n.pendingProps,i===null?ru(n):nt=i}function Bo(n,i,o,u){pi=Da=null,Hf(i),Co=null,Hs=0;var b=i.return;try{if(IC(n,b,i,o,ot)){Kt=1,qc(n,gr(o,n.current)),nt=null;return}}catch(y){if(b!==null)throw nt=b,y;Kt=1,qc(n,gr(o,n.current)),nt=null;return}i.flags&32768?(lt||u===1?n=!0:jo||(ot&536870912)!==0?n=!1:(ta=n=!0,(u===2||u===9||u===3||u===6)&&(u=nr.current,u!==null&&u.tag===13&&(u.flags|=16384))),zx(i,n)):ru(i)}function ru(n){var i=n;do{if((i.flags&32768)!==0){zx(i,ta);return}n=i.return;var o=PC(i.alternate,i,Si);if(o!==null){nt=o;return}if(i=i.sibling,i!==null){nt=i;return}nt=i=n}while(i!==null);Kt===0&&(Kt=5)}function zx(n,i){do{var o=UC(n.alternate,n);if(o!==null){o.flags&=32767,nt=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!i&&(n=n.sibling,n!==null)){nt=n;return}nt=n=o}while(n!==null);Kt=6,nt=null}function Bx(n,i,o,u,b,y,_,C,z){n.cancelPendingCommit=null;do iu();while(pn!==0);if((bt&6)!==0)throw Error(a(327));if(i!==null){if(i===n.current)throw Error(a(177));if(y=i.lanes|i.childLanes,y|=hf,xe(n,o,y,_,C,z),n===Rt&&(nt=Rt=null,ot=0),Io=i,ia=n,_i=o,Sp=y,_p=b,Cx=u,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,WC(we,function(){return $x(),null})):(n.callbackNode=null,n.callbackPriority=0),u=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||u){u=j.T,j.T=null,b=V.p,V.p=2,_=bt,bt|=4;try{FC(n,i,o)}finally{bt=_,V.p=b,j.T=u}}pn=1,Px(),Ux(),Fx()}}function Px(){if(pn===1){pn=0;var n=ia,i=Io,o=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||o){o=j.T,j.T=null;var u=V.p;V.p=2;var b=bt;bt|=4;try{xx(i,n);var y=Pp,_=kb(n.containerInfo),C=y.focusedElem,z=y.selectionRange;if(_!==C&&C&&C.ownerDocument&&_b(C.ownerDocument.documentElement,C)){if(z!==null&&uf(C)){var X=z.start,oe=z.end;if(oe===void 0&&(oe=X),"selectionStart"in C)C.selectionStart=X,C.selectionEnd=Math.min(oe,C.value.length);else{var le=C.ownerDocument||document,W=le&&le.defaultView||window;if(W.getSelection){var ne=W.getSelection(),Ne=C.textContent.length,Pe=Math.min(z.start,Ne),Nt=z.end===void 0?Pe:Math.min(z.end,Ne);!ne.extend&&Pe>Nt&&(_=Nt,Nt=Pe,Pe=_);var G=Sb(C,Pe),H=Sb(C,Nt);if(G&&H&&(ne.rangeCount!==1||ne.anchorNode!==G.node||ne.anchorOffset!==G.offset||ne.focusNode!==H.node||ne.focusOffset!==H.offset)){var Y=le.createRange();Y.setStart(G.node,G.offset),ne.removeAllRanges(),Pe>Nt?(ne.addRange(Y),ne.extend(H.node,H.offset)):(Y.setEnd(H.node,H.offset),ne.addRange(Y))}}}}for(le=[],ne=C;ne=ne.parentNode;)ne.nodeType===1&&le.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<le.length;C++){var se=le[C];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}gu=!!Bp,Pp=Bp=null}finally{bt=b,V.p=u,j.T=o}}n.current=i,pn=2}}function Ux(){if(pn===2){pn=0;var n=ia,i=Io,o=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||o){o=j.T,j.T=null;var u=V.p;V.p=2;var b=bt;bt|=4;try{mx(n,i.alternate,i)}finally{bt=b,V.p=u,j.T=o}}pn=3}}function Fx(){if(pn===4||pn===3){pn=0,un();var n=ia,i=Io,o=_i,u=Cx;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?pn=5:(pn=0,Io=ia=null,Hx(n,n.pendingLanes));var b=n.pendingLanes;if(b===0&&(ra=null),xn(o),i=i.stateNode,Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(qt,i,void 0,(i.current.flags&128)===128)}catch{}if(u!==null){i=j.T,b=V.p,V.p=2,j.T=null;try{for(var y=n.onRecoverableError,_=0;_<u.length;_++){var C=u[_];y(C.value,{componentStack:C.stack})}}finally{j.T=i,V.p=b}}(_i&3)!==0&&iu(),qr(n),b=n.pendingLanes,(o&261930)!==0&&(b&42)!==0?n===kp?al++:(al=0,kp=n):al=0,ol(0)}}function Hx(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,Us(i)))}function iu(){return Px(),Ux(),Fx(),$x()}function $x(){if(pn!==5)return!1;var n=ia,i=Sp;Sp=0;var o=xn(_i),u=j.T,b=V.p;try{V.p=32>o?32:o,j.T=null,o=_p,_p=null;var y=ia,_=_i;if(pn=0,Io=ia=null,_i=0,(bt&6)!==0)throw Error(a(331));var C=bt;if(bt|=4,_x(y.current),Ex(y,y.current,_,o),bt=C,ol(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(qt,y)}catch{}return!0}finally{V.p=b,j.T=u,Hx(n,i)}}function qx(n,i,o){i=gr(o,i),i=rp(n.stateNode,i,2),n=Zi(n,i,2),n!==null&&(Ge(n,2),qr(n))}function wt(n,i,o){if(n.tag===3)qx(n,n,o);else for(;i!==null;){if(i.tag===3){qx(i,n,o);break}else if(i.tag===1){var u=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(ra===null||!ra.has(u))){n=gr(o,n),o=Gy(2),u=Zi(i,o,2),u!==null&&(Ky(o,u,i,n),Ge(u,2),qr(u));break}}i=i.return}}function Tp(n,i,o){var u=n.pingCache;if(u===null){u=n.pingCache=new qC;var b=new Set;u.set(i,b)}else b=u.get(i),b===void 0&&(b=new Set,u.set(i,b));b.has(o)||(vp=!0,b.add(o),n=YC.bind(null,n,i,o),i.then(n,n))}function YC(n,i,o){var u=n.pingCache;u!==null&&u.delete(i),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,Rt===n&&(ot&o)===o&&(Kt===4||Kt===3&&(ot&62914560)===ot&&300>fe()-Wc?(bt&2)===0&&zo(n,0):Ep|=o,Lo===ot&&(Lo=0)),qr(n)}function Gx(n,i){i===0&&(i=Ae()),n=Ra(n,i),n!==null&&(Ge(n,i),qr(n))}function XC(n){var i=n.memoizedState,o=0;i!==null&&(o=i.retryLane),Gx(n,o)}function ZC(n,i){var o=0;switch(n.tag){case 31:case 13:var u=n.stateNode,b=n.memoizedState;b!==null&&(o=b.retryLane);break;case 19:u=n.stateNode;break;case 22:u=n.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(i),Gx(n,o)}function WC(n,i){return Pn(n,i)}var au=null,Po=null,Ap=!1,ou=!1,Rp=!1,oa=0;function qr(n){n!==Po&&n.next===null&&(Po===null?au=Po=n:Po=Po.next=n),ou=!0,Ap||(Ap=!0,eT())}function ol(n,i){if(!Rp&&ou){Rp=!0;do for(var o=!1,u=au;u!==null;){if(n!==0){var b=u.pendingLanes;if(b===0)var y=0;else{var _=u.suspendedLanes,C=u.pingedLanes;y=(1<<31-ft(42|n)+1)-1,y&=b&~(_&~C),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(o=!0,Yx(u,y))}else y=ot,y=L(u,u===Rt?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||re(u,y)||(o=!0,Yx(u,y));u=u.next}while(o);Rp=!1}}function JC(){Kx()}function Kx(){ou=Ap=!1;var n=0;oa!==0&&uT()&&(n=oa);for(var i=fe(),o=null,u=au;u!==null;){var b=u.next,y=Qx(u,i);y===0?(u.next=null,o===null?au=b:o.next=b,b===null&&(Po=o)):(o=u,(n!==0||(y&3)!==0)&&(ou=!0)),u=b}pn!==0&&pn!==5||ol(n),oa!==0&&(oa=0)}function Qx(n,i){for(var o=n.suspendedLanes,u=n.pingedLanes,b=n.expirationTimes,y=n.pendingLanes&-62914561;0<y;){var _=31-ft(y),C=1<<_,z=b[_];z===-1?((C&o)===0||(C&u)!==0)&&(b[_]=me(C,i)):z<=i&&(n.expiredLanes|=C),y&=~C}if(i=Rt,o=ot,o=L(n,n===i?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u=n.callbackNode,o===0||n===i&&(Et===2||Et===9)||n.cancelPendingCommit!==null)return u!==null&&u!==null&&kr(u),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||re(n,o)){if(i=o&-o,i===n.callbackPriority)return i;switch(u!==null&&kr(u),xn(o)){case 2:case 8:o=pe;break;case 32:o=we;break;case 268435456:o=Te;break;default:o=we}return u=Vx.bind(null,n),o=Pn(o,u),n.callbackPriority=i,n.callbackNode=o,i}return u!==null&&u!==null&&kr(u),n.callbackPriority=2,n.callbackNode=null,2}function Vx(n,i){if(pn!==0&&pn!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(iu()&&n.callbackNode!==o)return null;var u=ot;return u=L(n,n===Rt?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),u===0?null:(Ax(n,u,i),Qx(n,fe()),n.callbackNode!=null&&n.callbackNode===o?Vx.bind(null,n):null)}function Yx(n,i){if(iu())return null;Ax(n,i,!0)}function eT(){fT(function(){(bt&6)!==0?Pn(K,JC):Kx()})}function Mp(){if(oa===0){var n=_o;n===0&&(n=oi,oi<<=1,(oi&261888)===0&&(oi=256)),oa=n}return oa}function Xx(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:$i(""+n)}function Zx(n,i){var o=i.ownerDocument.createElement("input");return o.name=i.name,o.value=i.value,n.id&&o.setAttribute("form",n.id),i.parentNode.insertBefore(o,i),n=new FormData(n),o.parentNode.removeChild(o),n}function tT(n,i,o,u,b){if(i==="submit"&&o&&o.stateNode===b){var y=Xx((b[Cn]||null).action),_=u.submitter;_&&(i=(i=_[Cn]||null)?Xx(i.formAction):_.getAttribute("formAction"),i!==null&&(y=i,_=null));var C=new yc("action","action",null,u,b);n.push({event:C,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(oa!==0){var z=_?Zx(b,_):new FormData(b);Zf(o,{pending:!0,data:z,method:b.method,action:y},null,z)}}else typeof y=="function"&&(C.preventDefault(),z=_?Zx(b,_):new FormData(b),Zf(o,{pending:!0,data:z,method:b.method,action:y},y,z))},currentTarget:b}]})}}for(var Op=0;Op<mf.length;Op++){var Dp=mf[Op],nT=Dp.toLowerCase(),rT=Dp[0].toUpperCase()+Dp.slice(1);Nr(nT,"on"+rT)}Nr(Tb,"onAnimationEnd"),Nr(Ab,"onAnimationIteration"),Nr(Rb,"onAnimationStart"),Nr("dblclick","onDoubleClick"),Nr("focusin","onFocus"),Nr("focusout","onBlur"),Nr(xC,"onTransitionRun"),Nr(vC,"onTransitionStart"),Nr(EC,"onTransitionCancel"),Nr(Mb,"onTransitionEnd"),he("onMouseEnter",["mouseout","mouseover"]),he("onMouseLeave",["mouseout","mouseover"]),he("onPointerEnter",["pointerout","pointerover"]),he("onPointerLeave",["pointerout","pointerover"]),li("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),li("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),li("onBeforeInput",["compositionend","keypress","textInput","paste"]),li("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),li("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),li("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),iT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(sl));function Wx(n,i){i=(i&4)!==0;for(var o=0;o<n.length;o++){var u=n[o],b=u.event;u=u.listeners;e:{var y=void 0;if(i)for(var _=u.length-1;0<=_;_--){var C=u[_],z=C.instance,X=C.currentTarget;if(C=C.listener,z!==y&&b.isPropagationStopped())break e;y=C,b.currentTarget=X;try{y(b)}catch(oe){Ec(oe)}b.currentTarget=null,y=z}else for(_=0;_<u.length;_++){if(C=u[_],z=C.instance,X=C.currentTarget,C=C.listener,z!==y&&b.isPropagationStopped())break e;y=C,b.currentTarget=X;try{y(b)}catch(oe){Ec(oe)}b.currentTarget=null,y=z}}}}function rt(n,i){var o=i[Ss];o===void 0&&(o=i[Ss]=new Set);var u=n+"__bubble";o.has(u)||(Jx(i,n,2,!1),o.add(u))}function jp(n,i,o){var u=0;i&&(u|=4),Jx(o,n,u,i)}var su="_reactListening"+Math.random().toString(36).slice(2);function Lp(n){if(!n[su]){n[su]=!0,uc.forEach(function(o){o!=="selectionchange"&&(iT.has(o)||jp(o,!1,n),jp(o,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[su]||(i[su]=!0,jp("selectionchange",!1,i))}}function Jx(n,i,o,u){switch(Tv(i)){case 2:var b=OT;break;case 8:b=DT;break;default:b=Xp}o=b.bind(null,i,o,n),b=void 0,!ef||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(b=!0),u?b!==void 0?n.addEventListener(i,o,{capture:!0,passive:b}):n.addEventListener(i,o,!0):b!==void 0?n.addEventListener(i,o,{passive:b}):n.addEventListener(i,o,!1)}function Ip(n,i,o,u,b){var y=u;if((i&1)===0&&(i&2)===0&&u!==null)e:for(;;){if(u===null)return;var _=u.tag;if(_===3||_===4){var C=u.stateNode.containerInfo;if(C===b)break;if(_===4)for(_=u.return;_!==null;){var z=_.tag;if((z===3||z===4)&&_.stateNode.containerInfo===b)return;_=_.return}for(;C!==null;){if(_=Dn(C),_===null)return;if(z=_.tag,z===5||z===6||z===26||z===27){u=y=_;continue e}C=C.parentNode}}u=u.return}mc(function(){var X=y,oe=Ye(o),le=[];e:{var W=Ob.get(n);if(W!==void 0){var ne=yc,Ne=n;switch(n){case"keypress":if(gc(o)===0)break e;case"keydown":case"keyup":ne=ZN;break;case"focusin":Ne="focus",ne=af;break;case"focusout":Ne="blur",ne=af;break;case"beforeblur":case"afterblur":ne=af;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=sb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=PN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=eC;break;case Tb:case Ab:case Rb:ne=HN;break;case Mb:ne=nC;break;case"scroll":case"scrollend":ne=zN;break;case"wheel":ne=iC;break;case"copy":case"cut":case"paste":ne=qN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=cb;break;case"toggle":case"beforetoggle":ne=oC}var Pe=(i&4)!==0,Nt=!Pe&&(n==="scroll"||n==="scrollend"),G=Pe?W!==null?W+"Capture":null:W;Pe=[];for(var H=X,Y;H!==null;){var se=H;if(Y=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||Y===null||G===null||(se=As(H,G),se!=null&&Pe.push(ll(H,se,Y))),Nt)break;H=H.return}0<Pe.length&&(W=new ne(W,Ne,null,o,oe),le.push({event:W,listeners:Pe}))}}if((i&7)===0){e:{if(W=n==="mouseover"||n==="pointerover",ne=n==="mouseout"||n==="pointerout",W&&o!==Me&&(Ne=o.relatedTarget||o.fromElement)&&(Dn(Ne)||Ne[Pi]))break e;if((ne||W)&&(W=oe.window===oe?oe:(W=oe.ownerDocument)?W.defaultView||W.parentWindow:window,ne?(Ne=o.relatedTarget||o.toElement,ne=X,Ne=Ne?Dn(Ne):null,Ne!==null&&(Nt=l(Ne),Pe=Ne.tag,Ne!==Nt||Pe!==5&&Pe!==27&&Pe!==6)&&(Ne=null)):(ne=null,Ne=X),ne!==Ne)){if(Pe=sb,se="onMouseLeave",G="onMouseEnter",H="mouse",(n==="pointerout"||n==="pointerover")&&(Pe=cb,se="onPointerLeave",G="onPointerEnter",H="pointer"),Nt=ne==null?W:Ui(ne),Y=Ne==null?W:Ui(Ne),W=new Pe(se,H+"leave",ne,o,oe),W.target=Nt,W.relatedTarget=Y,se=null,Dn(oe)===X&&(Pe=new Pe(G,H+"enter",Ne,o,oe),Pe.target=Y,Pe.relatedTarget=Nt,se=Pe),Nt=se,ne&&Ne)t:{for(Pe=aT,G=ne,H=Ne,Y=0,se=G;se;se=Pe(se))Y++;se=0;for(var ze=H;ze;ze=Pe(ze))se++;for(;0<Y-se;)G=Pe(G),Y--;for(;0<se-Y;)H=Pe(H),se--;for(;Y--;){if(G===H||H!==null&&G===H.alternate){Pe=G;break t}G=Pe(G),H=Pe(H)}Pe=null}else Pe=null;ne!==null&&ev(le,W,ne,Pe,!1),Ne!==null&&Nt!==null&&ev(le,Nt,Ne,Pe,!0)}}e:{if(W=X?Ui(X):window,ne=W.nodeName&&W.nodeName.toLowerCase(),ne==="select"||ne==="input"&&W.type==="file")var pt=bb;else if(hb(W))if(yb)pt=gC;else{pt=mC;var Oe=pC}else ne=W.nodeName,!ne||ne.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?X&&Hi(X.elementType)&&(pt=bb):pt=hC;if(pt&&(pt=pt(n,X))){gb(le,pt,o,oe);break e}Oe&&Oe(n,W,X),n==="focusout"&&X&&W.type==="number"&&X.memoizedProps.value!=null&&po(W,"number",W.value)}switch(Oe=X?Ui(X):window,n){case"focusin":(hb(Oe)||Oe.contentEditable==="true")&&(go=Oe,df=X,zs=null);break;case"focusout":zs=df=go=null;break;case"mousedown":ff=!0;break;case"contextmenu":case"mouseup":case"dragend":ff=!1,Nb(le,o,oe);break;case"selectionchange":if(yC)break;case"keydown":case"keyup":Nb(le,o,oe)}var We;if(sf)e:{switch(n){case"compositionstart":var st="onCompositionStart";break e;case"compositionend":st="onCompositionEnd";break e;case"compositionupdate":st="onCompositionUpdate";break e}st=void 0}else ho?pb(n,o)&&(st="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(st="onCompositionStart");st&&(ub&&o.locale!=="ko"&&(ho||st!=="onCompositionStart"?st==="onCompositionEnd"&&ho&&(We=ab()):(qi=oe,tf="value"in qi?qi.value:qi.textContent,ho=!0)),Oe=lu(X,st),0<Oe.length&&(st=new lb(st,n,null,o,oe),le.push({event:st,listeners:Oe}),We?st.data=We:(We=mb(o),We!==null&&(st.data=We)))),(We=lC?cC(n,o):uC(n,o))&&(st=lu(X,"onBeforeInput"),0<st.length&&(Oe=new lb("onBeforeInput","beforeinput",null,o,oe),le.push({event:Oe,listeners:st}),Oe.data=We)),tT(le,n,X,o,oe)}Wx(le,i)})}function ll(n,i,o){return{instance:n,listener:i,currentTarget:o}}function lu(n,i){for(var o=i+"Capture",u=[];n!==null;){var b=n,y=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||y===null||(b=As(n,o),b!=null&&u.unshift(ll(n,b,y)),b=As(n,i),b!=null&&u.push(ll(n,b,y))),n.tag===3)return u;n=n.return}return[]}function aT(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function ev(n,i,o,u,b){for(var y=i._reactName,_=[];o!==null&&o!==u;){var C=o,z=C.alternate,X=C.stateNode;if(C=C.tag,z!==null&&z===u)break;C!==5&&C!==26&&C!==27||X===null||(z=X,b?(X=As(o,y),X!=null&&_.unshift(ll(o,X,z))):b||(X=As(o,y),X!=null&&_.push(ll(o,X,z)))),o=o.return}_.length!==0&&n.push({event:i,listeners:_})}var oT=/\r\n?/g,sT=/\u0000|\uFFFD/g;function tv(n){return(typeof n=="string"?n:""+n).replace(oT,`
|
|
9
|
-
`).replace(sT,"")}function nv(n,i){return i=tv(i),tv(n)===i}function kt(n,i,o,u,b,y){switch(o){case"children":typeof u=="string"?i==="body"||i==="textarea"&&u===""||Fe(n,u):(typeof u=="number"||typeof u=="bigint")&&i!=="body"&&Fe(n,""+u);break;case"className":Wn(n,"class",u);break;case"tabIndex":Wn(n,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Wn(n,o,u);break;case"style":vt(n,u,y);break;case"data":if(i!=="object"){Wn(n,"data",u);break}case"src":case"href":if(u===""&&(i!=="a"||o!=="href")){n.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(o);break}u=$i(""+u),n.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){n.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof y=="function"&&(o==="formAction"?(i!=="input"&&kt(n,i,"name",b.name,b,null),kt(n,i,"formEncType",b.formEncType,b,null),kt(n,i,"formMethod",b.formMethod,b,null),kt(n,i,"formTarget",b.formTarget,b,null)):(kt(n,i,"encType",b.encType,b,null),kt(n,i,"method",b.method,b,null),kt(n,i,"target",b.target,b,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){n.removeAttribute(o);break}u=$i(""+u),n.setAttribute(o,u);break;case"onClick":u!=null&&(n.onclick=ye);break;case"onScroll":u!=null&&rt("scroll",n);break;case"onScrollEnd":u!=null&&rt("scrollend",n);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(o=u.__html,o!=null){if(b.children!=null)throw Error(a(60));n.innerHTML=o}}break;case"multiple":n.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":n.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){n.removeAttribute("xlink:href");break}o=$i(""+u),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,""+u):n.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":u===!0?n.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?n.setAttribute(o,u):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?n.setAttribute(o,u):n.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?n.removeAttribute(o):n.setAttribute(o,u);break;case"popover":rt("beforetoggle",n),rt("toggle",n),Tn(n,"popover",u);break;case"xlinkActuate":Un(n,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Un(n,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Un(n,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Un(n,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Un(n,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Un(n,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Un(n,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Un(n,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Un(n,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Tn(n,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=ci.get(o)||o,Tn(n,o,u))}}function zp(n,i,o,u,b,y){switch(o){case"style":vt(n,u,y);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(o=u.__html,o!=null){if(b.children!=null)throw Error(a(60));n.innerHTML=o}}break;case"children":typeof u=="string"?Fe(n,u):(typeof u=="number"||typeof u=="bigint")&&Fe(n,""+u);break;case"onScroll":u!=null&&rt("scroll",n);break;case"onScrollEnd":u!=null&&rt("scrollend",n);break;case"onClick":u!=null&&(n.onclick=ye);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ka.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(b=o.endsWith("Capture"),i=o.slice(2,b?o.length-7:void 0),y=n[Cn]||null,y=y!=null?y[o]:null,typeof y=="function"&&n.removeEventListener(i,y,b),typeof u=="function")){typeof y!="function"&&y!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(i,u,b);break e}o in n?n[o]=u:u===!0?n.setAttribute(o,""):Tn(n,o,u)}}}function _n(n,i,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":rt("error",n),rt("load",n);var u=!1,b=!1,y;for(y in o)if(o.hasOwnProperty(y)){var _=o[y];if(_!=null)switch(y){case"src":u=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:kt(n,i,y,_,o,null)}}b&&kt(n,i,"srcSet",o.srcSet,o,null),u&&kt(n,i,"src",o.src,o,null);return;case"input":rt("invalid",n);var C=y=_=b=null,z=null,X=null;for(u in o)if(o.hasOwnProperty(u)){var oe=o[u];if(oe!=null)switch(u){case"name":b=oe;break;case"type":_=oe;break;case"checked":z=oe;break;case"defaultChecked":X=oe;break;case"value":y=oe;break;case"defaultValue":C=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(a(137,i));break;default:kt(n,i,u,oe,o,null)}}Na(n,y,C,z,X,_,b,!1);return;case"select":rt("invalid",n),u=_=y=null;for(b in o)if(o.hasOwnProperty(b)&&(C=o[b],C!=null))switch(b){case"value":y=C;break;case"defaultValue":_=C;break;case"multiple":u=C;default:kt(n,i,b,C,o,null)}i=y,o=_,n.multiple=!!u,i!=null?vn(n,!!u,i,!1):o!=null&&vn(n,!!u,o,!0);return;case"textarea":rt("invalid",n),y=b=u=null;for(_ in o)if(o.hasOwnProperty(_)&&(C=o[_],C!=null))switch(_){case"value":u=C;break;case"defaultValue":b=C;break;case"children":y=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(a(91));break;default:kt(n,i,_,C,o,null)}mo(n,u,b,y);return;case"option":for(z in o)o.hasOwnProperty(z)&&(u=o[z],u!=null)&&(z==="selected"?n.selected=u&&typeof u!="function"&&typeof u!="symbol":kt(n,i,z,u,o,null));return;case"dialog":rt("beforetoggle",n),rt("toggle",n),rt("cancel",n),rt("close",n);break;case"iframe":case"object":rt("load",n);break;case"video":case"audio":for(u=0;u<sl.length;u++)rt(sl[u],n);break;case"image":rt("error",n),rt("load",n);break;case"details":rt("toggle",n);break;case"embed":case"source":case"link":rt("error",n),rt("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in o)if(o.hasOwnProperty(X)&&(u=o[X],u!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:kt(n,i,X,u,o,null)}return;default:if(Hi(i)){for(oe in o)o.hasOwnProperty(oe)&&(u=o[oe],u!==void 0&&zp(n,i,oe,u,o,void 0));return}}for(C in o)o.hasOwnProperty(C)&&(u=o[C],u!=null&&kt(n,i,C,u,o,null))}function lT(n,i,o,u){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,y=null,_=null,C=null,z=null,X=null,oe=null;for(ne in o){var le=o[ne];if(o.hasOwnProperty(ne)&&le!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":z=le;default:u.hasOwnProperty(ne)||kt(n,i,ne,null,u,le)}}for(var W in u){var ne=u[W];if(le=o[W],u.hasOwnProperty(W)&&(ne!=null||le!=null))switch(W){case"type":y=ne;break;case"name":b=ne;break;case"checked":X=ne;break;case"defaultChecked":oe=ne;break;case"value":_=ne;break;case"defaultValue":C=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(a(137,i));break;default:ne!==le&&kt(n,i,W,ne,u,le)}}Ns(n,_,C,z,X,oe,y,b);return;case"select":ne=_=C=W=null;for(y in o)if(z=o[y],o.hasOwnProperty(y)&&z!=null)switch(y){case"value":break;case"multiple":ne=z;default:u.hasOwnProperty(y)||kt(n,i,y,null,u,z)}for(b in u)if(y=u[b],z=o[b],u.hasOwnProperty(b)&&(y!=null||z!=null))switch(b){case"value":W=y;break;case"defaultValue":C=y;break;case"multiple":_=y;default:y!==z&&kt(n,i,b,y,u,z)}i=C,o=_,u=ne,W!=null?vn(n,!!o,W,!1):!!u!=!!o&&(i!=null?vn(n,!!o,i,!0):vn(n,!!o,o?[]:"",!1));return;case"textarea":ne=W=null;for(C in o)if(b=o[C],o.hasOwnProperty(C)&&b!=null&&!u.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:kt(n,i,C,null,u,b)}for(_ in u)if(b=u[_],y=o[_],u.hasOwnProperty(_)&&(b!=null||y!=null))switch(_){case"value":W=b;break;case"defaultValue":ne=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(a(91));break;default:b!==y&&kt(n,i,_,b,u,y)}fc(n,W,ne);return;case"option":for(var Ne in o)W=o[Ne],o.hasOwnProperty(Ne)&&W!=null&&!u.hasOwnProperty(Ne)&&(Ne==="selected"?n.selected=!1:kt(n,i,Ne,null,u,W));for(z in u)W=u[z],ne=o[z],u.hasOwnProperty(z)&&W!==ne&&(W!=null||ne!=null)&&(z==="selected"?n.selected=W&&typeof W!="function"&&typeof W!="symbol":kt(n,i,z,W,u,ne));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Pe in o)W=o[Pe],o.hasOwnProperty(Pe)&&W!=null&&!u.hasOwnProperty(Pe)&&kt(n,i,Pe,null,u,W);for(X in u)if(W=u[X],ne=o[X],u.hasOwnProperty(X)&&W!==ne&&(W!=null||ne!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,i));break;default:kt(n,i,X,W,u,ne)}return;default:if(Hi(i)){for(var Nt in o)W=o[Nt],o.hasOwnProperty(Nt)&&W!==void 0&&!u.hasOwnProperty(Nt)&&zp(n,i,Nt,void 0,u,W);for(oe in u)W=u[oe],ne=o[oe],!u.hasOwnProperty(oe)||W===ne||W===void 0&&ne===void 0||zp(n,i,oe,W,u,ne);return}}for(var G in o)W=o[G],o.hasOwnProperty(G)&&W!=null&&!u.hasOwnProperty(G)&&kt(n,i,G,null,u,W);for(le in u)W=u[le],ne=o[le],!u.hasOwnProperty(le)||W===ne||W==null&&ne==null||kt(n,i,le,W,u,ne)}function rv(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function cT(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,o=performance.getEntriesByType("resource"),u=0;u<o.length;u++){var b=o[u],y=b.transferSize,_=b.initiatorType,C=b.duration;if(y&&C&&rv(_)){for(_=0,C=b.responseEnd,u+=1;u<o.length;u++){var z=o[u],X=z.startTime;if(X>C)break;var oe=z.transferSize,le=z.initiatorType;oe&&rv(le)&&(z=z.responseEnd,_+=oe*(z<C?1:(C-X)/(z-X)))}if(--u,i+=8*(y+_)/(b.duration/1e3),n++,10<n)break}}if(0<n)return i/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Bp=null,Pp=null;function cu(n){return n.nodeType===9?n:n.ownerDocument}function iv(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function av(n,i){if(n===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&i==="foreignObject"?0:n}function Up(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Fp=null;function uT(){var n=window.event;return n&&n.type==="popstate"?n===Fp?!1:(Fp=n,!0):(Fp=null,!1)}var ov=typeof setTimeout=="function"?setTimeout:void 0,dT=typeof clearTimeout=="function"?clearTimeout:void 0,sv=typeof Promise=="function"?Promise:void 0,fT=typeof queueMicrotask=="function"?queueMicrotask:typeof sv<"u"?function(n){return sv.resolve(null).then(n).catch(pT)}:ov;function pT(n){setTimeout(function(){throw n})}function sa(n){return n==="head"}function lv(n,i){var o=i,u=0;do{var b=o.nextSibling;if(n.removeChild(o),b&&b.nodeType===8)if(o=b.data,o==="/$"||o==="/&"){if(u===0){n.removeChild(b),$o(i);return}u--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")u++;else if(o==="html")cl(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,cl(o);for(var y=o.firstChild;y;){var _=y.nextSibling,C=y.nodeName;y[_a]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&y.rel.toLowerCase()==="stylesheet"||o.removeChild(y),y=_}}else o==="body"&&cl(n.ownerDocument.body);o=b}while(o);$o(i)}function cv(n,i){var o=n;n=0;do{var u=o.nextSibling;if(o.nodeType===1?i?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(i?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),u&&u.nodeType===8)if(o=u.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=u}while(o)}function Hp(n){var i=n.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var o=i;switch(i=i.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Hp(o),_s(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function mT(n,i,o,u){for(;n.nodeType===1;){var b=o;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!u&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(u){if(!n[_a])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(y=n.getAttribute("rel"),y==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(y!==b.rel||n.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||n.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||n.getAttribute("title")!==(b.title==null?null:b.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(y=n.getAttribute("src"),(y!==(b.src==null?null:b.src)||n.getAttribute("type")!==(b.type==null?null:b.type)||n.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&y&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var y=b.name==null?null:""+b.name;if(b.type==="hidden"&&n.getAttribute("name")===y)return n}else return n;if(n=Er(n.nextSibling),n===null)break}return null}function hT(n,i,o){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=Er(n.nextSibling),n===null))return null;return n}function uv(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Er(n.nextSibling),n===null))return null;return n}function $p(n){return n.data==="$?"||n.data==="$~"}function qp(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function gT(n,i){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||o.readyState!=="loading")i();else{var u=function(){i(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),n._reactRetry=u}}function Er(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return n}var Gp=null;function dv(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(i===0)return Er(n.nextSibling);i--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||i++}n=n.nextSibling}return null}function fv(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(i===0)return n;i--}else o!=="/$"&&o!=="/&"||i++}n=n.previousSibling}return null}function pv(n,i,o){switch(i=cu(o),n){case"html":if(n=i.documentElement,!n)throw Error(a(452));return n;case"head":if(n=i.head,!n)throw Error(a(453));return n;case"body":if(n=i.body,!n)throw Error(a(454));return n;default:throw Error(a(451))}}function cl(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);_s(n)}var wr=new Map,mv=new Set;function uu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var ki=V.d;V.d={f:bT,r:yT,D:xT,C:vT,L:ET,m:wT,X:_T,S:ST,M:kT};function bT(){var n=ki.f(),i=tu();return n||i}function yT(n){var i=si(n);i!==null&&i.tag===5&&i.type==="form"?My(i):ki.r(n)}var Uo=typeof document>"u"?null:document;function hv(n,i,o){var u=Uo;if(u&&typeof i=="string"&&i){var b=Fn(i);b='link[rel="'+n+'"][href="'+b+'"]',typeof o=="string"&&(b+='[crossorigin="'+o+'"]'),mv.has(b)||(mv.add(b),n={rel:n,crossOrigin:o,href:i},u.querySelector(b)===null&&(i=u.createElement("link"),_n(i,"link",n),en(i),u.head.appendChild(i)))}}function xT(n){ki.D(n),hv("dns-prefetch",n,null)}function vT(n,i){ki.C(n,i),hv("preconnect",n,i)}function ET(n,i,o){ki.L(n,i,o);var u=Uo;if(u&&n&&i){var b='link[rel="preload"][as="'+Fn(i)+'"]';i==="image"&&o&&o.imageSrcSet?(b+='[imagesrcset="'+Fn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(b+='[imagesizes="'+Fn(o.imageSizes)+'"]')):b+='[href="'+Fn(n)+'"]';var y=b;switch(i){case"style":y=Fo(n);break;case"script":y=Ho(n)}wr.has(y)||(n=h({rel:"preload",href:i==="image"&&o&&o.imageSrcSet?void 0:n,as:i},o),wr.set(y,n),u.querySelector(b)!==null||i==="style"&&u.querySelector(ul(y))||i==="script"&&u.querySelector(dl(y))||(i=u.createElement("link"),_n(i,"link",n),en(i),u.head.appendChild(i)))}}function wT(n,i){ki.m(n,i);var o=Uo;if(o&&n){var u=i&&typeof i.as=="string"?i.as:"script",b='link[rel="modulepreload"][as="'+Fn(u)+'"][href="'+Fn(n)+'"]',y=b;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Ho(n)}if(!wr.has(y)&&(n=h({rel:"modulepreload",href:n},i),wr.set(y,n),o.querySelector(b)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(dl(y)))return}u=o.createElement("link"),_n(u,"link",n),en(u),o.head.appendChild(u)}}}function ST(n,i,o){ki.S(n,i,o);var u=Uo;if(u&&n){var b=Fi(u).hoistableStyles,y=Fo(n);i=i||"default";var _=b.get(y);if(!_){var C={loading:0,preload:null};if(_=u.querySelector(ul(y)))C.loading=5;else{n=h({rel:"stylesheet",href:n,"data-precedence":i},o),(o=wr.get(y))&&Kp(n,o);var z=_=u.createElement("link");en(z),_n(z,"link",n),z._p=new Promise(function(X,oe){z.onload=X,z.onerror=oe}),z.addEventListener("load",function(){C.loading|=1}),z.addEventListener("error",function(){C.loading|=2}),C.loading|=4,du(_,i,u)}_={type:"stylesheet",instance:_,count:1,state:C},b.set(y,_)}}}function _T(n,i){ki.X(n,i);var o=Uo;if(o&&n){var u=Fi(o).hoistableScripts,b=Ho(n),y=u.get(b);y||(y=o.querySelector(dl(b)),y||(n=h({src:n,async:!0},i),(i=wr.get(b))&&Qp(n,i),y=o.createElement("script"),en(y),_n(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(b,y))}}function kT(n,i){ki.M(n,i);var o=Uo;if(o&&n){var u=Fi(o).hoistableScripts,b=Ho(n),y=u.get(b);y||(y=o.querySelector(dl(b)),y||(n=h({src:n,async:!0,type:"module"},i),(i=wr.get(b))&&Qp(n,i),y=o.createElement("script"),en(y),_n(y,"link",n),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(b,y))}}function gv(n,i,o,u){var b=(b=de.current)?uu(b):null;if(!b)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(i=Fo(o.href),o=Fi(b).hoistableStyles,u=o.get(i),u||(u={type:"style",instance:null,count:0,state:null},o.set(i,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=Fo(o.href);var y=Fi(b).hoistableStyles,_=y.get(n);if(_||(b=b.ownerDocument||b,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(n,_),(y=b.querySelector(ul(n)))&&!y._p&&(_.instance=y,_.state.loading=5),wr.has(n)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},wr.set(n,o),y||NT(b,n,o,_.state))),i&&u===null)throw Error(a(528,""));return _}if(i&&u!==null)throw Error(a(529,""));return null;case"script":return i=o.async,o=o.src,typeof o=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Ho(o),o=Fi(b).hoistableScripts,u=o.get(i),u||(u={type:"script",instance:null,count:0,state:null},o.set(i,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Fo(n){return'href="'+Fn(n)+'"'}function ul(n){return'link[rel="stylesheet"]['+n+"]"}function bv(n){return h({},n,{"data-precedence":n.precedence,precedence:null})}function NT(n,i,o,u){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?u.loading=1:(i=n.createElement("link"),u.preload=i,i.addEventListener("load",function(){return u.loading|=1}),i.addEventListener("error",function(){return u.loading|=2}),_n(i,"link",o),en(i),n.head.appendChild(i))}function Ho(n){return'[src="'+Fn(n)+'"]'}function dl(n){return"script[async]"+n}function yv(n,i,o){if(i.count++,i.instance===null)switch(i.type){case"style":var u=n.querySelector('style[data-href~="'+Fn(o.href)+'"]');if(u)return i.instance=u,en(u),u;var b=h({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(n.ownerDocument||n).createElement("style"),en(u),_n(u,"style",b),du(u,o.precedence,n),i.instance=u;case"stylesheet":b=Fo(o.href);var y=n.querySelector(ul(b));if(y)return i.state.loading|=4,i.instance=y,en(y),y;u=bv(o),(b=wr.get(b))&&Kp(u,b),y=(n.ownerDocument||n).createElement("link"),en(y);var _=y;return _._p=new Promise(function(C,z){_.onload=C,_.onerror=z}),_n(y,"link",u),i.state.loading|=4,du(y,o.precedence,n),i.instance=y;case"script":return y=Ho(o.src),(b=n.querySelector(dl(y)))?(i.instance=b,en(b),b):(u=o,(b=wr.get(y))&&(u=h({},o),Qp(u,b)),n=n.ownerDocument||n,b=n.createElement("script"),en(b),_n(b,"link",u),n.head.appendChild(b),i.instance=b);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(u=i.instance,i.state.loading|=4,du(u,o.precedence,n));return i.instance}function du(n,i,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=u.length?u[u.length-1]:null,y=b,_=0;_<u.length;_++){var C=u[_];if(C.dataset.precedence===i)y=C;else if(y!==b)break}y?y.parentNode.insertBefore(n,y.nextSibling):(i=o.nodeType===9?o.head:o,i.insertBefore(n,i.firstChild))}function Kp(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function Qp(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var fu=null;function xv(n,i,o){if(fu===null){var u=new Map,b=fu=new Map;b.set(o,u)}else b=fu,u=b.get(o),u||(u=new Map,b.set(o,u));if(u.has(n))return u;for(u.set(n,null),o=o.getElementsByTagName(n),b=0;b<o.length;b++){var y=o[b];if(!(y[_a]||y[Yt]||n==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var _=y.getAttribute(i)||"";_=n+_;var C=u.get(_);C?C.push(y):u.set(_,[y])}}return u}function vv(n,i,o){n=n.ownerDocument||n,n.head.insertBefore(o,i==="title"?n.querySelector("head > title"):null)}function CT(n,i,o){if(o===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(n=i.disabled,typeof i.precedence=="string"&&n==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Ev(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function TT(n,i,o,u){if(o.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var b=Fo(u.href),y=i.querySelector(ul(b));if(y){i=y._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=pu.bind(n),i.then(n,n)),o.state.loading|=4,o.instance=y,en(y);return}y=i.ownerDocument||i,u=bv(u),(b=wr.get(b))&&Kp(u,b),y=y.createElement("link"),en(y);var _=y;_._p=new Promise(function(C,z){_.onload=C,_.onerror=z}),_n(y,"link",u),o.instance=y}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(o,i),(i=o.state.preload)&&(o.state.loading&3)===0&&(n.count++,o=pu.bind(n),i.addEventListener("load",o),i.addEventListener("error",o))}}var Vp=0;function AT(n,i){return n.stylesheets&&n.count===0&&hu(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var u=setTimeout(function(){if(n.stylesheets&&hu(n,n.stylesheets),n.unsuspend){var y=n.unsuspend;n.unsuspend=null,y()}},6e4+i);0<n.imgBytes&&Vp===0&&(Vp=62500*cT());var b=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&hu(n,n.stylesheets),n.unsuspend)){var y=n.unsuspend;n.unsuspend=null,y()}},(n.imgBytes>Vp?50:800)+i);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(u),clearTimeout(b)}}:null}function pu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var mu=null;function hu(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,mu=new Map,i.forEach(RT,n),mu=null,pu.call(n))}function RT(n,i){if(!(i.state.loading&4)){var o=mu.get(n);if(o)var u=o.get(null);else{o=new Map,mu.set(n,o);for(var b=n.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<b.length;y++){var _=b[y];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(o.set(_.dataset.precedence,_),u=_)}u&&o.set(null,u)}b=i.instance,_=b.getAttribute("data-precedence"),y=o.get(_)||u,y===u&&o.set(null,b),o.set(_,b),this.count++,u=pu.bind(this),b.addEventListener("load",u),b.addEventListener("error",u),y?y.parentNode.insertBefore(b,y.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(b,n.firstChild)),i.state.loading|=4}}var fl={$$typeof:R,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function MT(n,i,o,u,b,y,_,C,z){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=yt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yt(0),this.hiddenUpdates=yt(null),this.identifierPrefix=u,this.onUncaughtError=b,this.onCaughtError=y,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function wv(n,i,o,u,b,y,_,C,z,X,oe,le){return n=new MT(n,i,o,_,z,X,oe,le,C),i=1,y===!0&&(i|=24),y=tr(3,null,null,i),n.current=y,y.stateNode=n,i=Cf(),i.refCount++,n.pooledCache=i,i.refCount++,y.memoizedState={element:u,isDehydrated:o,cache:i},Mf(y),n}function Sv(n){return n?(n=xo,n):xo}function _v(n,i,o,u,b,y){b=Sv(b),u.context===null?u.context=b:u.pendingContext=b,u=Xi(i),u.payload={element:o},y=y===void 0?null:y,y!==null&&(u.callback=y),o=Zi(n,u,i),o!==null&&(Qn(o,n,i),qs(o,n,i))}function kv(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<i?o:i}}function Yp(n,i){kv(n,i),(n=n.alternate)&&kv(n,i)}function Nv(n){if(n.tag===13||n.tag===31){var i=Ra(n,67108864);i!==null&&Qn(i,n,67108864),Yp(n,67108864)}}function Cv(n){if(n.tag===13||n.tag===31){var i=or();i=At(i);var o=Ra(n,i);o!==null&&Qn(o,n,i),Yp(n,i)}}var gu=!0;function OT(n,i,o,u){var b=j.T;j.T=null;var y=V.p;try{V.p=2,Xp(n,i,o,u)}finally{V.p=y,j.T=b}}function DT(n,i,o,u){var b=j.T;j.T=null;var y=V.p;try{V.p=8,Xp(n,i,o,u)}finally{V.p=y,j.T=b}}function Xp(n,i,o,u){if(gu){var b=Zp(u);if(b===null)Ip(n,i,u,bu,o),Av(n,u);else if(LT(b,n,i,o,u))u.stopPropagation();else if(Av(n,u),i&4&&-1<jT.indexOf(n)){for(;b!==null;){var y=si(b);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var _=yn(y.pendingLanes);if(_!==0){var C=y;for(C.pendingLanes|=2,C.entangledLanes|=2;_;){var z=1<<31-ft(_);C.entanglements[1]|=z,_&=~z}qr(y),(bt&6)===0&&(Jc=fe()+500,ol(0))}}break;case 31:case 13:C=Ra(y,2),C!==null&&Qn(C,y,2),tu(),Yp(y,2)}if(y=Zp(u),y===null&&Ip(n,i,u,bu,o),y===b)break;b=y}b!==null&&u.stopPropagation()}else Ip(n,i,u,null,o)}}function Zp(n){return n=Ye(n),Wp(n)}var bu=null;function Wp(n){if(bu=null,n=Dn(n),n!==null){var i=l(n);if(i===null)n=null;else{var o=i.tag;if(o===13){if(n=c(i),n!==null)return n;n=null}else if(o===31){if(n=f(i),n!==null)return n;n=null}else if(o===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}return bu=n,null}function Tv(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Qe()){case K:return 2;case pe:return 8;case we:case $e:return 32;case Te:return 268435456;default:return 32}default:return 32}}var Jp=!1,la=null,ca=null,ua=null,pl=new Map,ml=new Map,da=[],jT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Av(n,i){switch(n){case"focusin":case"focusout":la=null;break;case"dragenter":case"dragleave":ca=null;break;case"mouseover":case"mouseout":ua=null;break;case"pointerover":case"pointerout":pl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":ml.delete(i.pointerId)}}function hl(n,i,o,u,b,y){return n===null||n.nativeEvent!==y?(n={blockedOn:i,domEventName:o,eventSystemFlags:u,nativeEvent:y,targetContainers:[b]},i!==null&&(i=si(i),i!==null&&Nv(i)),n):(n.eventSystemFlags|=u,i=n.targetContainers,b!==null&&i.indexOf(b)===-1&&i.push(b),n)}function LT(n,i,o,u,b){switch(i){case"focusin":return la=hl(la,n,i,o,u,b),!0;case"dragenter":return ca=hl(ca,n,i,o,u,b),!0;case"mouseover":return ua=hl(ua,n,i,o,u,b),!0;case"pointerover":var y=b.pointerId;return pl.set(y,hl(pl.get(y)||null,n,i,o,u,b)),!0;case"gotpointercapture":return y=b.pointerId,ml.set(y,hl(ml.get(y)||null,n,i,o,u,b)),!0}return!1}function Rv(n){var i=Dn(n.target);if(i!==null){var o=l(i);if(o!==null){if(i=o.tag,i===13){if(i=c(o),i!==null){n.blockedOn=i,lo(n.priority,function(){Cv(o)});return}}else if(i===31){if(i=f(o),i!==null){n.blockedOn=i,lo(n.priority,function(){Cv(o)});return}}else if(i===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}function yu(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var o=Zp(n.nativeEvent);if(o===null){o=n.nativeEvent;var u=new o.constructor(o.type,o);Me=u,o.target.dispatchEvent(u),Me=null}else return i=si(o),i!==null&&Nv(i),n.blockedOn=o,!1;i.shift()}return!0}function Mv(n,i,o){yu(n)&&o.delete(i)}function IT(){Jp=!1,la!==null&&yu(la)&&(la=null),ca!==null&&yu(ca)&&(ca=null),ua!==null&&yu(ua)&&(ua=null),pl.forEach(Mv),ml.forEach(Mv)}function xu(n,i){n.blockedOn===i&&(n.blockedOn=null,Jp||(Jp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,IT)))}var vu=null;function Ov(n){vu!==n&&(vu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){vu===n&&(vu=null);for(var i=0;i<n.length;i+=3){var o=n[i],u=n[i+1],b=n[i+2];if(typeof u!="function"){if(Wp(u||o)===null)continue;break}var y=si(o);y!==null&&(n.splice(i,3),i-=3,Zf(y,{pending:!0,data:b,method:o.method,action:u},u,b))}}))}function $o(n){function i(z){return xu(z,n)}la!==null&&xu(la,n),ca!==null&&xu(ca,n),ua!==null&&xu(ua,n),pl.forEach(i),ml.forEach(i);for(var o=0;o<da.length;o++){var u=da[o];u.blockedOn===n&&(u.blockedOn=null)}for(;0<da.length&&(o=da[0],o.blockedOn===null);)Rv(o),o.blockedOn===null&&da.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var b=o[u],y=o[u+1],_=b[Cn]||null;if(typeof y=="function")_||Ov(o);else if(_){var C=null;if(y&&y.hasAttribute("formAction")){if(b=y,_=y[Cn]||null)C=_.formAction;else if(Wp(b)!==null)continue}else C=_.action;typeof C=="function"?o[u+1]=C:(o.splice(u,3),u-=3),Ov(o)}}}function Dv(){function n(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(_){return b=_})},focusReset:"manual",scroll:"manual"})}function i(){b!==null&&(b(),b=null),u||setTimeout(o,20)}function o(){if(!u&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,b=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(o,100),function(){u=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),b!==null&&(b(),b=null)}}}function em(n){this._internalRoot=n}Eu.prototype.render=em.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(a(409));var o=i.current,u=or();_v(o,u,n,i,null,null)},Eu.prototype.unmount=em.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;_v(n.current,2,null,n,null,null),tu(),i[Pi]=null}};function Eu(n){this._internalRoot=n}Eu.prototype.unstable_scheduleHydration=function(n){if(n){var i=Sa();n={blockedOn:null,target:n,priority:i};for(var o=0;o<da.length&&i!==0&&i<da[o].priority;o++);da.splice(o,0,n),o===0&&Rv(n)}};var jv=t.version;if(jv!=="19.2.7")throw Error(a(527,jv,"19.2.7"));V.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(a(188)):(n=Object.keys(n).join(","),Error(a(268,n)));return n=p(i),n=n!==null?g(n):null,n=n===null?null:n.stateNode,n};var zT={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wu.isDisabled&&wu.supportsFiber)try{qt=wu.inject(zT),Bt=wu}catch{}}return bl.createRoot=function(n,i){if(!s(n))throw Error(a(299));var o=!1,u="",b=Fy,y=Hy,_=$y;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(b=i.onUncaughtError),i.onCaughtError!==void 0&&(y=i.onCaughtError),i.onRecoverableError!==void 0&&(_=i.onRecoverableError)),i=wv(n,1,!1,null,null,o,u,null,b,y,_,Dv),n[Pi]=i.current,Lp(n),new em(i)},bl.hydrateRoot=function(n,i,o){if(!s(n))throw Error(a(299));var u=!1,b="",y=Fy,_=Hy,C=$y,z=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(b=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(_=o.onCaughtError),o.onRecoverableError!==void 0&&(C=o.onRecoverableError),o.formState!==void 0&&(z=o.formState)),i=wv(n,1,!0,i,o??null,u,b,z,y,_,C,Dv),i.context=Sv(null),o=i.current,u=or(),u=At(u),b=Xi(u),b.callback=null,Zi(o,b,u),o=u,i.current.lanes=o,Ge(i,o),qr(i),n[Pi]=i.current,Lp(n),new Eu(i)},bl.version="19.2.7",bl}var qv;function QT(){if(qv)return rm.exports;qv=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),rm.exports=KT(),rm.exports}var VT=QT(),us=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},YT=class extends us{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Oh=new YT,XT={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ZT=class{#e=XT;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Qa=new ZT;function WT(e){setTimeout(e,0)}var JT=typeof window>"u"||"Deno"in globalThis;function In(){}function eA(e,t){return typeof e=="function"?e(t):e}function Gm(e){return typeof e=="number"&&e>=0&&e!==1/0}function mE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ba(e,t){return typeof e=="function"?e(t):e}function lr(e,t){return typeof e=="function"?e(t):e}function Gv(e,t){const{type:r="all",exact:a,fetchStatus:s,predicate:l,queryKey:c,stale:f}=e;if(c){if(a){if(t.queryHash!==Dh(c,t.options))return!1}else if(!Ol(t.queryKey,c))return!1}if(r!=="all"){const m=t.isActive();if(r==="active"&&!m||r==="inactive"&&m)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||s&&s!==t.state.fetchStatus||l&&!l(t))}function Kv(e,t){const{exact:r,status:a,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(r){if(Ya(t.options.mutationKey)!==Ya(l))return!1}else if(!Ol(t.options.mutationKey,l))return!1}return!(a&&t.state.status!==a||s&&!s(t))}function Dh(e,t){return(t?.queryKeyHashFn||Ya)(e)}function Ya(e){return JSON.stringify(e,(t,r)=>Km(r)?Object.keys(r).sort().reduce((a,s)=>(a[s]=r[s],a),{}):r)}function Ol(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Ol(e[r],t[r])):!1}var tA=Object.prototype.hasOwnProperty;function hE(e,t,r=0){if(e===t)return e;if(r>500)return t;const a=Qv(e)&&Qv(t);if(!a&&!(Km(e)&&Km(t)))return t;const l=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),f=c.length,m=a?new Array(f):{};let p=0;for(let g=0;g<f;g++){const h=a?g:c[g],x=e[h],v=t[h];if(x===v){m[h]=x,(a?g<l:tA.call(e,h))&&p++;continue}if(x===null||v===null||typeof x!="object"||typeof v!="object"){m[h]=v;continue}const E=hE(x,v,r+1);m[h]=E,E===x&&p++}return l===f&&p===l?e:m}function td(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Qv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Km(e){if(!Vv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Vv(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Vv(e){return Object.prototype.toString.call(e)==="[object Object]"}function nA(e){return new Promise(t=>{Qa.setTimeout(t,e)})}function Qm(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?hE(e,t):t}function rA(e,t,r=0){const a=[...e,t];return r&&a.length>r?a.slice(1):a}function iA(e,t,r=0){const a=[t,...e];return r&&a.length>r?a.slice(0,-1):a}var jh=Symbol();function gE(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===jh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Lh(e,t){return typeof e=="function"?e(...t):!!e}function aA(e,t,r){let a=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),a||(a=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),e}var Dl=(()=>{let e=()=>JT;return{isServer(){return e()},setIsServer(t){e=t}}})();function Vm(){let e,t;const r=new Promise((s,l)=>{e=s,t=l});r.status="pending",r.catch(()=>{});function a(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{a({status:"fulfilled",value:s}),e(s)},r.reject=s=>{a({status:"rejected",reason:s}),t(s)},r}var oA=WT;function sA(){let e=[],t=0,r=f=>{f()},a=f=>{f()},s=oA;const l=f=>{t?e.push(f):s(()=>{r(f)})},c=()=>{const f=e;e=[],f.length&&s(()=>{a(()=>{f.forEach(m=>{r(m)})})})};return{batch:f=>{let m;t++;try{m=f()}finally{t--,t||c()}return m},batchCalls:f=>(...m)=>{l(()=>{f(...m)})},schedule:l,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{s=f}}}var hn=sA(),lA=class extends us{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},nd=new lA;function cA(e){return Math.min(1e3*2**e,3e4)}function bE(e){return(e??"online")==="online"?nd.isOnline():!0}var Ym=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function yE(e){let t=!1,r=0,a;const s=Vm(),l=()=>s.status!=="pending",c=S=>{if(!l()){const N=new Ym(S);x(N),e.onCancel?.(N)}},f=()=>{t=!0},m=()=>{t=!1},p=()=>Oh.isFocused()&&(e.networkMode==="always"||nd.isOnline())&&e.canRun(),g=()=>bE(e.networkMode)&&e.canRun(),h=S=>{l()||(a?.(),s.resolve(S))},x=S=>{l()||(a?.(),s.reject(S))},v=()=>new Promise(S=>{a=N=>{(l()||p())&&S(N)},e.onPause?.()}).then(()=>{a=void 0,l()||e.onContinue?.()}),E=()=>{if(l())return;let S;const N=r===0?e.initialPromise:void 0;try{S=N??e.fn()}catch(k){S=Promise.reject(k)}Promise.resolve(S).then(h).catch(k=>{if(l())return;const M=e.retry??(Dl.isServer()?0:3),R=e.retryDelay??cA,O=typeof R=="function"?R(r,k):R,P=M===!0||typeof M=="number"&&r<M||typeof M=="function"&&M(r,k);if(t||!P){x(k);return}r++,e.onFail?.(r,k),nA(O).then(()=>p()?void 0:v()).then(()=>{t?x(k):E()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(a?.(),s),cancelRetry:f,continueRetry:m,canStart:g,start:()=>(g()?E():v().then(E),s)}}var xE=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Gm(this.gcTime)&&(this.#e=Qa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Dl.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Qa.clearTimeout(this.#e),this.#e=void 0)}};function uA(e){return{onFetch:(t,r)=>{const a=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let f={pages:[],pageParams:[]},m=0;const p=async()=>{let g=!1;const h=E=>{aA(E,()=>t.signal,()=>g=!0)},x=gE(t.options,t.fetchOptions),v=async(E,S,N)=>{if(g)return Promise.reject(t.signal.reason);if(S==null&&E.pages.length)return Promise.resolve(E);const M=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:S,direction:N?"backward":"forward",meta:t.options.meta};return h(D),D})(),R=await x(M),{maxPages:O}=t.options,P=N?iA:rA;return{pages:P(E.pages,R,O),pageParams:P(E.pageParams,S,O)}};if(s&&l.length){const E=s==="backward",S=E?dA:Yv,N={pages:l,pageParams:c},k=S(a,N);f=await v(N,k,E)}else{const E=e??l.length;do{const S=m===0?c[0]??a.initialPageParam:Yv(a,f);if(m>0&&S==null)break;f=await v(f,S),m++}while(m<E)}return f};t.options.persister?t.fetchFn=()=>t.options.persister?.(p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=p}}}function Yv(e,{pages:t,pageParams:r}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,r[a],r):void 0}function dA(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var fA=class extends xE{#e;#t;#n;#r;#a;#i;#s;#o;constructor(e){super(),this.#o=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#r=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Zv(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Zv(this.options);t.data!==void 0&&(this.setState(Xv(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const r=Qm(this.state.data,e,this.options);return this.#l({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(In).catch(In):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>lr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===jh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ba(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!mE(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#u()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){const m=this.observers.find(p=>p.options.queryFn);m&&this.setOptions(m.options)}const r=new AbortController,a=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(this.#o=!0,r.signal)})},s=()=>{const m=gE(this.options,t),g=(()=>{const h={client:this.#a,queryKey:this.queryKey,meta:this.meta};return a(h),h})();return this.#o=!1,this.options.persister?this.options.persister(m,g,this):m(g)},c=(()=>{const m={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:s};return a(m),m})();(this.#e==="infinite"?uA(this.options.pages):this.options.behavior)?.onFetch(c,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#l({type:"fetch",meta:c.fetchOptions?.meta}),this.#i=yE({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:m=>{m instanceof Ym&&m.revert&&this.setState({...this.#n,fetchStatus:"idle"}),r.abort()},onFail:(m,p)=>{this.#l({type:"failed",failureCount:m,error:p})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const m=await this.#i.start();if(m===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(m),this.#r.config.onSuccess?.(m,this),this.#r.config.onSettled?.(m,this.state.error,this),m}catch(m){if(m instanceof Ym){if(m.silent)return this.#i.promise;if(m.revert){if(this.state.data===void 0)throw m;return this.state.data}}throw this.#l({type:"error",error:m}),this.#r.config.onError?.(m,this),this.#r.config.onSettled?.(this.state.data,m,this),m}finally{this.scheduleGc()}}#l(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...vE(r.data,this.options),fetchMeta:e.meta??null};case"success":const a={...r,...Xv(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?a:void 0,a;case"error":const s=e.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),hn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function vE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bE(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Xv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Zv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,a=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var pA=class extends us{constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.#s=Vm(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#a;#i;#s;#o;#u;#l;#m;#d;#f;#c;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Wv(this.#t,this.options)?this.#p():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Xm(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Xm(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#E(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof lr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),t._defaulted&&!td(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&Jv(this.#t,r,this.options,t)&&this.#p(),this.updateResult(),a&&(this.#t!==r||lr(this.options.enabled,this.#t)!==lr(t.enabled,this.#t)||ba(this.options.staleTime,this.#t)!==ba(t.staleTime,this.#t))&&this.#g();const s=this.#b();a&&(this.#t!==r||lr(this.options.enabled,this.#t)!==lr(t.enabled,this.#t)||s!==this.#c)&&this.#y(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);return hA(this,r)&&(this.#r=r,this.#i=this.options,this.#a=this.#t.state),r}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(r,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(e){this.#h.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#p({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#p(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(In)),t}#g(){this.#v();const e=ba(this.options.staleTime,this.#t);if(Dl.isServer()||this.#r.isStale||!Gm(e))return;const r=mE(this.#r.dataUpdatedAt,e)+1;this.#d=Qa.setTimeout(()=>{this.#r.isStale||this.updateResult()},r)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#E(),this.#c=e,!(Dl.isServer()||lr(this.options.enabled,this.#t)===!1||!Gm(this.#c)||this.#c===0)&&(this.#f=Qa.setInterval(()=>{(this.options.refetchIntervalInBackground||Oh.isFocused())&&this.#p()},this.#c))}#x(){this.#g(),this.#y(this.#b())}#v(){this.#d!==void 0&&(Qa.clearTimeout(this.#d),this.#d=void 0)}#E(){this.#f!==void 0&&(Qa.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){const r=this.#t,a=this.options,s=this.#r,l=this.#a,c=this.#i,m=e!==r?e.state:this.#n,{state:p}=e;let g={...p},h=!1,x;if(t._optimisticResults){const B=this.hasListeners(),J=!B&&Wv(e,t),F=B&&Jv(e,r,t,a);(J||F)&&(g={...g,...vE(p.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:E,status:S}=g;x=g.data;let N=!1;if(t.placeholderData!==void 0&&x===void 0&&S==="pending"){let B;s?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(B=s.data,N=!0):B=typeof t.placeholderData=="function"?t.placeholderData(this.#m?.state.data,this.#m):t.placeholderData,B!==void 0&&(S="success",x=Qm(s?.data,B,t),h=!0)}if(t.select&&x!==void 0&&!N)if(s&&x===l?.data&&t.select===this.#u)x=this.#l;else try{this.#u=t.select,x=t.select(x),x=Qm(s?.data,x,t),this.#l=x,this.#o=null}catch(B){this.#o=B}this.#o&&(v=this.#o,x=this.#l,E=Date.now(),S="error");const k=g.fetchStatus==="fetching",M=S==="pending",R=S==="error",O=M&&k,P=x!==void 0,U={status:S,fetchStatus:g.fetchStatus,isPending:M,isSuccess:S==="success",isError:R,isInitialLoading:O,isLoading:O,data:x,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:E,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>m.dataUpdateCount||g.errorUpdateCount>m.errorUpdateCount,isFetching:k,isRefetching:k&&!M,isLoadingError:R&&!P,isPaused:g.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:R&&P,isStale:Ih(e,t),refetch:this.refetch,promise:this.#s,isEnabled:lr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const B=U.data!==void 0,J=U.status==="error"&&!B,F=ce=>{J?ce.reject(U.error):B&&ce.resolve(U.data)},ae=()=>{const ce=this.#s=U.promise=Vm();F(ce)},ee=this.#s;switch(ee.status){case"pending":e.queryHash===r.queryHash&&F(ee);break;case"fulfilled":(J||U.data!==ee.value)&&ae();break;case"rejected":(!J||U.error!==ee.reason)&&ae();break}}return U}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#i=this.options,this.#a.data!==void 0&&(this.#m=this.#t),td(t,e))return;this.#r=t;const r=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!this.#h.size)return!0;const l=new Set(s??this.#h);return this.options.throwOnError&&l.add("error"),Object.keys(this.#r).some(c=>{const f=c;return this.#r[f]!==e[f]&&l.has(f)})};this.#S({listeners:r()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#S(e){hn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function mA(e,t){return lr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&lr(t.retryOnMount,e)===!1)}function Wv(e,t){return mA(e,t)||e.state.data!==void 0&&Xm(e,t,t.refetchOnMount)}function Xm(e,t,r){if(lr(t.enabled,e)!==!1&&ba(t.staleTime,e)!=="static"){const a=typeof r=="function"?r(e):r;return a==="always"||a!==!1&&Ih(e,t)}return!1}function Jv(e,t,r,a){return(e!==t||lr(a.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ih(e,r)}function Ih(e,t){return lr(t.enabled,e)!==!1&&e.isStaleByTime(ba(t.staleTime,e))}function hA(e,t){return!td(e.getCurrentResult(),t)}var gA=class extends xE{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||EE(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#a({type:"continue"})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=yE({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(l,c)=>{this.#a({type:"failed",failureCount:l,error:c})},onPause:()=>{this.#a({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",s=!this.#r.canStart();try{if(a)t();else{this.#a({type:"pending",variables:e,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,r);const c=await this.options.onMutate?.(e,r);c!==this.state.context&&this.#a({type:"pending",context:c,variables:e,isPaused:s})}const l=await this.#r.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,r),await this.options.onSuccess?.(l,e,this.state.context,r),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(l,null,e,this.state.context,r),this.#a({type:"success",data:l}),l}catch(l){try{await this.#n.config.onError?.(l,e,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onError?.(l,e,this.state.context,r)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,r)}catch(c){Promise.reject(c)}throw this.#a({type:"error",error:l}),l}finally{this.#n.runNext(this)}}#a(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),hn.batch(()=>{this.#t.forEach(r=>{r.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function EE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var bA=class extends us{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,r){const a=new gA({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:r});return this.add(a),a}add(e){this.#e.add(e);const t=Su(e);if(typeof t=="string"){const r=this.#t.get(t);r?r.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Su(e);if(typeof t=="string"){const r=this.#t.get(t);if(r)if(r.length>1){const a=r.indexOf(e);a!==-1&&r.splice(a,1)}else r[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Su(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(s=>s.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=Su(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){hn.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Kv(t,r))}findAll(e={}){return this.getAll().filter(t=>Kv(e,t))}notify(e){hn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return hn.batch(()=>Promise.all(e.map(t=>t.continue().catch(In))))}};function Su(e){return e.options.scope?.id}var yA=class extends us{#e;#t=void 0;#n;#r;constructor(t,r){super(),this.#e=t,this.setOptions(r),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const r=this.options;this.options=this.#e.defaultMutationOptions(t),td(this.options,r)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),r?.mutationKey&&this.options.mutationKey&&Ya(r.mutationKey)!==Ya(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#i(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#i()}mutate(t,r){return this.#r=r,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#a(){const t=this.#n?.state??EE();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#i(t){hn.batch(()=>{if(this.#r&&this.hasListeners()){const r=this.#t.variables,a=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,r,a,s)}catch(l){Promise.reject(l)}try{this.#r.onSettled?.(t.data,null,r,a,s)}catch(l){Promise.reject(l)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,r,a,s)}catch(l){Promise.reject(l)}try{this.#r.onSettled?.(void 0,t.error,r,a,s)}catch(l){Promise.reject(l)}}}this.listeners.forEach(r=>{r(this.#t)})})}},xA=class extends us{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){const a=t.queryKey,s=t.queryHash??Dh(a,t);let l=this.get(s);return l||(l=new fA({client:e,queryKey:a,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(a)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){hn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>Gv(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>Gv(e,r)):t}notify(e){hn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){hn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){hn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},vA=class{#e;#t;#n;#r;#a;#i;#s;#o;constructor(e={}){this.#e=e.queryCache||new xA,this.#t=e.mutationCache||new bA,this.#n=e.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=Oh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=nd.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=this.#e.build(this,t),a=r.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ba(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{const a=r.data;return[t,a]})}setQueryData(e,t,r){const a=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(a.queryHash)?.state.data,c=eA(t,l);if(c!==void 0)return this.#e.build(this,a).setData(c,{...r,manual:!0})}setQueriesData(e,t,r){return hn.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,r)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;hn.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=this.#e;return hn.batch(()=>(r.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},a=hn.batch(()=>this.#e.findAll(e).map(s=>s.cancel(r)));return Promise.all(a).then(In).catch(In)}invalidateQueries(e,t={}){return hn.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},a=hn.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let l=s.fetch(void 0,r);return r.throwOnError||(l=l.catch(In)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(a).then(In)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=this.#e.build(this,t);return r.isStaleByTime(ba(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(In).catch(In)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(In).catch(In)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return nd.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Ya(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],r={};return t.forEach(a=>{Ol(e,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(e,t){this.#a.set(Ya(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()],r={};return t.forEach(a=>{Ol(e,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Dh(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===jh&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},wE=w.createContext(void 0),kn=e=>{const t=w.useContext(wE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},EA=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(wE.Provider,{value:e,children:t})),SE=w.createContext(!1),wA=()=>w.useContext(SE);SE.Provider;function SA(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var _A=w.createContext(SA()),kA=()=>w.useContext(_A),NA=(e,t,r)=>{const a=r?.state.error&&typeof e.throwOnError=="function"?Lh(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},CA=e=>{w.useEffect(()=>{e.clearReset()},[e])},TA=({result:e,errorResetBoundary:t,throwOnError:r,query:a,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(s&&e.data===void 0||Lh(r,[e.error,a])),AA=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...s)=>r(a(...s)):r(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},RA=(e,t)=>e.isLoading&&e.isFetching&&!t,MA=(e,t)=>e?.suspense&&t.isPending,e0=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function OA(e,t,r){const a=wA(),s=kA(),l=kn(),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const f=l.getQueryCache().get(c.queryHash),m=e.subscribed!==!1;c._optimisticResults=a?"isRestoring":m?"optimistic":void 0,AA(c),NA(c,s,f),CA(s);const p=!l.getQueryCache().get(c.queryHash),[g]=w.useState(()=>new t(l,c)),h=g.getOptimisticResult(c),x=!a&&m;if(w.useSyncExternalStore(w.useCallback(v=>{const E=x?g.subscribe(hn.batchCalls(v)):In;return g.updateResult(),E},[g,x]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),w.useEffect(()=>{g.setOptions(c)},[c,g]),MA(c,h))throw e0(c,g,s);if(TA({result:h,errorResetBoundary:s,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw h.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(c,h),c.experimental_prefetchInRender&&!Dl.isServer()&&RA(h,a)&&(p?e0(c,g,s):f?.promise)?.catch(In).finally(()=>{g.updateResult()}),c.notifyOnChangeProps?h:g.trackResult(h)}function Nn(e,t){return OA(e,pA)}function Xe(e,t){const r=kn(),[a]=w.useState(()=>new yA(r,e));w.useEffect(()=>{a.setOptions(e)},[a,e]);const s=w.useSyncExternalStore(w.useCallback(c=>a.subscribe(hn.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),l=w.useCallback((c,f)=>{a.mutate(c,f).catch(In)},[a]);if(s.error&&Lh(a.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}var t0="popstate";function n0(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function DA(e={}){function t(a,s){let l=s.state?.masked,{pathname:c,search:f,hash:m}=l||a.location;return Zm("",{pathname:c,search:f,hash:m},s.state&&s.state.usr||null,s.state&&s.state.key||"default",l?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,s){return typeof s=="string"?s:jl(s)}return LA(t,r,null,e)}function Ut(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Or(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function jA(){return Math.random().toString(36).substring(2,10)}function r0(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Zm(e,t,r=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ds(t):t,state:r,key:t&&t.key||a||jA(),mask:s}}function jl({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function ds(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function LA(e,t,r,a={}){let{window:s=document.defaultView,v5Compat:l=!1}=a,c=s.history,f="POP",m=null,p=g();p==null&&(p=0,c.replaceState({...c.state,idx:p},""));function g(){return(c.state||{idx:null}).idx}function h(){f="POP";let N=g(),k=N==null?null:N-p;p=N,m&&m({action:f,location:S.location,delta:k})}function x(N,k){f="PUSH";let M=n0(N)?N:Zm(S.location,N,k);p=g()+1;let R=r0(M,p),O=S.createHref(M.mask||M);try{c.pushState(R,"",O)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;s.location.assign(O)}l&&m&&m({action:f,location:S.location,delta:1})}function v(N,k){f="REPLACE";let M=n0(N)?N:Zm(S.location,N,k);p=g();let R=r0(M,p),O=S.createHref(M.mask||M);c.replaceState(R,"",O),l&&m&&m({action:f,location:S.location,delta:0})}function E(N){return IA(s,N)}let S={get action(){return f},get location(){return e(s,c)},listen(N){if(m)throw new Error("A history only accepts one active listener");return s.addEventListener(t0,h),m=N,()=>{s.removeEventListener(t0,h),m=null}},createHref(N){return t(s,N)},createURL:E,encodeLocation(N){let k=E(N);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:x,replace:v,go(N){return c.go(N)}};return S}function IA(e,t,r=!1){let a="http://localhost";e&&(a=e.location.origin!=="null"?e.location.origin:e.location.href),Ut(a,"No window.location.(origin|href) available to create URL");let s=typeof t=="string"?t:jl(t);return s=s.replace(/ $/,"%20"),!r&&s.startsWith("//")&&(s=a+s),new URL(s,a)}function _E(e,t,r="/"){return zA(e,t,r,!1)}function zA(e,t,r,a,s){let l=typeof t=="string"?ds(t):t,c=Ai(l.pathname||"/",r);if(c==null)return null;let f=BA(e),m=null,p=XA(c);for(let g=0;m==null&&g<f.length;++g)m=VA(f[g],p,a);return m}function BA(e){let t=kE(e);return PA(t),t}function kE(e,t=[],r=[],a="",s=!1){let l=(c,f,m=s,p)=>{let g={relativePath:p===void 0?c.path||"":p,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(a)&&m)return;Ut(g.relativePath.startsWith(a),`Absolute route path "${g.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(a.length)}let h=Ar([a,g.relativePath]),x=r.concat(g);c.children&&c.children.length>0&&(Ut(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),kE(c.children,t,x,h,m)),!(c.path==null&&!c.index)&&t.push({path:h,score:KA(h,c.index),routesMeta:x})};return e.forEach((c,f)=>{if(c.path===""||!c.path?.includes("?"))l(c,f);else for(let m of NE(c.path))l(c,f,!0,m)}),t}function NE(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,s=r.endsWith("?"),l=r.replace(/\?$/,"");if(a.length===0)return s?[l,""]:[l];let c=NE(a.join("/")),f=[];return f.push(...c.map(m=>m===""?l:[l,m].join("/"))),s&&f.push(...c),f.map(m=>e.startsWith("/")&&m===""?"/":m)}function PA(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:QA(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var UA=/^:[\w-]+$/,FA=3,HA=2,$A=1,qA=10,GA=-2,i0=e=>e==="*";function KA(e,t){let r=e.split("/"),a=r.length;return r.some(i0)&&(a+=GA),t&&(a+=HA),r.filter(s=>!i0(s)).reduce((s,l)=>s+(UA.test(l)?FA:l===""?$A:qA),a)}function QA(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function VA(e,t,r=!1){let{routesMeta:a}=e,s={},l="/",c=[];for(let f=0;f<a.length;++f){let m=a[f],p=f===a.length-1,g=l==="/"?t:t.slice(l.length)||"/",h=rd({path:m.relativePath,caseSensitive:m.caseSensitive,end:p},g),x=m.route;if(!h&&p&&r&&!a[a.length-1].route.index&&(h=rd({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},g)),!h)return null;Object.assign(s,h.params),c.push({params:s,pathname:Ar([l,h.pathname]),pathnameBase:eR(Ar([l,h.pathnameBase])),route:x}),h.pathnameBase!=="/"&&(l=Ar([l,h.pathnameBase]))}return c}function rd(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=YA(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let l=s[0],c=l.replace(/(.)\/+$/,"$1"),f=s.slice(1);return{params:a.reduce((p,{paramName:g,isOptional:h},x)=>{if(g==="*"){let E=f[x]||"";c=l.slice(0,l.length-E.length).replace(/(.)\/+$/,"$1")}const v=f[x];return h&&!v?p[g]=void 0:p[g]=(v||"").replace(/%2F/g,"/"),p},{}),pathname:l,pathnameBase:c,pattern:e}}function YA(e,t=!1,r=!0){Or(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,m,p,g)=>{if(a.push({paramName:f,isOptional:m!=null}),m){let h=g.charAt(p+c.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function XA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Or(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ai(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}var ZA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function WA(e,t="/"){let{pathname:r,search:a="",hash:s=""}=typeof e=="string"?ds(e):e,l;return r?(r=CE(r),r.startsWith("/")?l=a0(r.substring(1),"/"):l=a0(r,t)):l=t,{pathname:l,search:tR(a),hash:nR(s)}}function a0(e,t){let r=id(t).split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function sm(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function JA(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function zh(e){let t=JA(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function vd(e,t,r,a=!1){let s;typeof e=="string"?s=ds(e):(s={...e},Ut(!s.pathname||!s.pathname.includes("?"),sm("?","pathname","search",s)),Ut(!s.pathname||!s.pathname.includes("#"),sm("#","pathname","hash",s)),Ut(!s.search||!s.search.includes("#"),sm("#","search","hash",s)));let l=e===""||s.pathname==="",c=l?"/":s.pathname,f;if(c==null)f=r;else{let h=t.length-1;if(!a&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),h-=1;s.pathname=x.join("/")}f=h>=0?t[h]:"/"}let m=WA(s,f),p=c&&c!=="/"&&c.endsWith("/"),g=(l||c===".")&&r.endsWith("/");return!m.pathname.endsWith("/")&&(p||g)&&(m.pathname+="/"),m}var CE=e=>e.replace(/\/\/+/g,"/"),Ar=e=>CE(e.join("/")),id=e=>e.replace(/\/+$/,""),eR=e=>id(e).replace(/^\/*/,"/"),tR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,nR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,rR=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function iR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function aR(e){let t=e.map(r=>r.route.path).filter(Boolean);return Ar(t)||"/"}var TE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function AE(e,t){let r=e;if(typeof r!="string"||!ZA.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,s=!1;if(TE)try{let l=new URL(window.location.href),c=r.startsWith("//")?new URL(l.protocol+r):new URL(r),f=Ai(c.pathname,t);c.origin===l.origin&&f!=null?r=f+c.search+c.hash:s=!0}catch{Or(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var RE=["POST","PUT","PATCH","DELETE"];new Set(RE);var oR=["GET",...RE];new Set(oR);var fs=w.createContext(null);fs.displayName="DataRouter";var Ed=w.createContext(null);Ed.displayName="DataRouterState";var ME=w.createContext(!1);function sR(){return w.useContext(ME)}var OE=w.createContext({isTransitioning:!1});OE.displayName="ViewTransition";var lR=w.createContext(new Map);lR.displayName="Fetchers";var cR=w.createContext(null);cR.displayName="Await";var fr=w.createContext(null);fr.displayName="Navigation";var Kl=w.createContext(null);Kl.displayName="Location";var ti=w.createContext({outlet:null,matches:[],isDataRoute:!1});ti.displayName="Route";var Bh=w.createContext(null);Bh.displayName="RouteError";var DE="REACT_ROUTER_ERROR",uR="REDIRECT",dR="ROUTE_ERROR_RESPONSE";function fR(e){if(e.startsWith(`${DE}:${uR}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function pR(e){if(e.startsWith(`${DE}:${dR}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new rR(t.status,t.statusText,t.data)}catch{}}function mR(e,{relative:t}={}){Ut(ps(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=w.useContext(fr),{hash:s,pathname:l,search:c}=Ql(e,{relative:t}),f=l;return r!=="/"&&(f=l==="/"?r:Ar([r,l])),a.createHref({pathname:f,search:c,hash:s})}function ps(){return w.useContext(Kl)!=null}function Lr(){return Ut(ps(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Kl).location}var jE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function LE(e){w.useContext(fr).static||w.useLayoutEffect(e)}function wd(){let{isDataRoute:e}=w.useContext(ti);return e?CR():hR()}function hR(){Ut(ps(),"useNavigate() may be used only in the context of a <Router> component.");let e=w.useContext(fs),{basename:t,navigator:r}=w.useContext(fr),{matches:a}=w.useContext(ti),{pathname:s}=Lr(),l=JSON.stringify(zh(a)),c=w.useRef(!1);return LE(()=>{c.current=!0}),w.useCallback((m,p={})=>{if(Or(c.current,jE),!c.current)return;if(typeof m=="number"){r.go(m);return}let g=vd(m,JSON.parse(l),s,p.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Ar([t,g.pathname])),(p.replace?r.replace:r.push)(g,p.state,p)},[t,r,l,s,e])}w.createContext(null);function Ql(e,{relative:t}={}){let{matches:r}=w.useContext(ti),{pathname:a}=Lr(),s=JSON.stringify(zh(r));return w.useMemo(()=>vd(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function gR(e,t){return IE(e,t)}function IE(e,t,r){Ut(ps(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=w.useContext(fr),{matches:s}=w.useContext(ti),l=s[s.length-1],c=l?l.params:{},f=l?l.pathname:"/",m=l?l.pathnameBase:"/",p=l&&l.route;{let N=p&&p.path||"";BE(f,!p||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${N}">) 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.
|
|
10
|
-
|
|
11
|
-
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let g=Lr(),h;if(t){let N=typeof t=="string"?ds(t):t;Ut(m==="/"||N.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` 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 "${N.pathname}" was given in the \`location\` prop.`),h=N}else h=g;let x=h.pathname||"/",v=x;if(m!=="/"){let N=m.replace(/^\//,"").split("/");v="/"+x.replace(/^\//,"").split("/").slice(N.length).join("/")}let E=r&&r.state.matches.length?r.state.matches.map(N=>Object.assign(N,{route:r.manifest[N.route.id]||N.route})):_E(e,{pathname:v});Or(p||E!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Or(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let S=ER(E&&E.map(N=>Object.assign({},N,{params:Object.assign({},c,N.params),pathname:Ar([m,a.encodeLocation?a.encodeLocation(N.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?m:Ar([m,a.encodeLocation?a.encodeLocation(N.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),s,r);return t&&S?w.createElement(Kl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...h},navigationType:"POP"}},S):S}function bR(){let e=NR(),t=iR(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},l={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:l},"ErrorBoundary")," or"," ",w.createElement("code",{style:l},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),r?w.createElement("pre",{style:s},r):null,c)}var yR=w.createElement(bR,null),zE=class extends w.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=pR(e.digest);r&&(e=r)}let t=e!==void 0?w.createElement(ti.Provider,{value:this.props.routeContext},w.createElement(Bh.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?w.createElement(xR,{error:e},t):t}};zE.contextType=ME;var lm=new WeakMap;function xR({children:e,error:t}){let{basename:r}=w.useContext(fr);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=fR(t.digest);if(a){let s=lm.get(t);if(s)throw s;let l=AE(a.location,r);if(TE&&!lm.get(t))if(l.isExternal||a.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:a.replace}));throw lm.set(t,c),c}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return e}function vR({routeContext:e,match:t,children:r}){let a=w.useContext(fs);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),w.createElement(ti.Provider,{value:e},r)}function ER(e,t=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let s=e,l=a?.errors;if(l!=null){let g=s.findIndex(h=>h.route.id&&l?.[h.route.id]!==void 0);Ut(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,g+1))}let c=!1,f=-1;if(r&&a){c=a.renderFallback;for(let g=0;g<s.length;g++){let h=s[g];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(f=g),h.route.id){let{loaderData:x,errors:v}=a,E=h.route.loader&&!x.hasOwnProperty(h.route.id)&&(!v||v[h.route.id]===void 0);if(h.route.lazy||E){r.isStatic&&(c=!0),f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}}let m=r?.onError,p=a&&m?(g,h)=>{m(g,{location:a.location,params:a.matches?.[0]?.params??{},pattern:aR(a.matches),errorInfo:h})}:void 0;return s.reduceRight((g,h,x)=>{let v,E=!1,S=null,N=null;a&&(v=l&&h.route.id?l[h.route.id]:void 0,S=h.route.errorElement||yR,c&&(f<0&&x===0?(BE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,N=null):f===x&&(E=!0,N=h.route.hydrateFallbackElement||null)));let k=t.concat(s.slice(0,x+1)),M=()=>{let R;return v?R=S:E?R=N:h.route.Component?R=w.createElement(h.route.Component,null):h.route.element?R=h.route.element:R=g,w.createElement(vR,{match:h,routeContext:{outlet:g,matches:k,isDataRoute:a!=null},children:R})};return a&&(h.route.ErrorBoundary||h.route.errorElement||x===0)?w.createElement(zE,{location:a.location,revalidation:a.revalidation,component:S,error:v,children:M(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:p}):M()},null)}function Ph(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function wR(e){let t=w.useContext(fs);return Ut(t,Ph(e)),t}function SR(e){let t=w.useContext(Ed);return Ut(t,Ph(e)),t}function _R(e){let t=w.useContext(ti);return Ut(t,Ph(e)),t}function Uh(e){let t=_R(e),r=t.matches[t.matches.length-1];return Ut(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function kR(){return Uh("useRouteId")}function NR(){let e=w.useContext(Bh),t=SR("useRouteError"),r=Uh("useRouteError");return e!==void 0?e:t.errors?.[r]}function CR(){let{router:e}=wR("useNavigate"),t=Uh("useNavigate"),r=w.useRef(!1);return LE(()=>{r.current=!0}),w.useCallback(async(s,l={})=>{Or(r.current,jE),r.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...l}))},[e,t])}var o0={};function BE(e,t,r){!t&&!o0[e]&&(o0[e]=!0,Or(!1,r))}w.memo(TR);function TR({routes:e,manifest:t,future:r,state:a,isStatic:s,onError:l}){return IE(e,void 0,{manifest:t,state:a,isStatic:s,onError:l})}function AR({to:e,replace:t,state:r,relative:a}){Ut(ps(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=w.useContext(fr);Or(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=w.useContext(ti),{pathname:c}=Lr(),f=wd(),m=vd(e,zh(l),c,a==="path"),p=JSON.stringify(m);return w.useEffect(()=>{f(JSON.parse(p),{replace:t,state:r,relative:a})},[f,p,a,t,r]),null}function Ka(e){Ut(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function RR({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:s,static:l=!1,useTransitions:c}){Ut(!ps(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),m=w.useMemo(()=>({basename:f,navigator:s,static:l,useTransitions:c,future:{}}),[f,s,l,c]);typeof r=="string"&&(r=ds(r));let{pathname:p="/",search:g="",hash:h="",state:x=null,key:v="default",mask:E}=r,S=w.useMemo(()=>{let N=Ai(p,f);return N==null?null:{location:{pathname:N,search:g,hash:h,state:x,key:v,mask:E},navigationType:a}},[f,p,g,h,x,v,a,E]);return Or(S!=null,`<Router basename="${f}"> is not able to match the URL "${p}${g}${h}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:w.createElement(fr.Provider,{value:m},w.createElement(Kl.Provider,{children:t,value:S}))}function MR({children:e,location:t}){return gR(Wm(e),t)}function Wm(e,t=[]){let r=[];return w.Children.forEach(e,(a,s)=>{if(!w.isValidElement(a))return;let l=[...t,s];if(a.type===w.Fragment){r.push.apply(r,Wm(a.props.children,l));return}Ut(a.type===Ka,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ut(!a.props.index||!a.props.children,"An index route cannot have child routes.");let c={id:a.props.id||l.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(c.children=Wm(a.props.children,l)),r.push(c)}),r}var Vu="get",Yu="application/x-www-form-urlencoded";function Sd(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function OR(e){return Sd(e)&&e.tagName.toLowerCase()==="button"}function DR(e){return Sd(e)&&e.tagName.toLowerCase()==="form"}function jR(e){return Sd(e)&&e.tagName.toLowerCase()==="input"}function LR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function IR(e,t){return e.button===0&&(!t||t==="_self")&&!LR(e)}var _u=null;function zR(){if(_u===null)try{new FormData(document.createElement("form"),0),_u=!1}catch{_u=!0}return _u}var BR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function cm(e){return e!=null&&!BR.has(e)?(Or(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Yu}"`),null):e}function PR(e,t){let r,a,s,l,c;if(DR(e)){let f=e.getAttribute("action");a=f?Ai(f,t):null,r=e.getAttribute("method")||Vu,s=cm(e.getAttribute("enctype"))||Yu,l=new FormData(e)}else if(OR(e)||jR(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=e.getAttribute("formaction")||f.getAttribute("action");if(a=m?Ai(m,t):null,r=e.getAttribute("formmethod")||f.getAttribute("method")||Vu,s=cm(e.getAttribute("formenctype"))||cm(f.getAttribute("enctype"))||Yu,l=new FormData(f,e),!zR()){let{name:p,type:g,value:h}=e;if(g==="image"){let x=p?`${p}.`:"";l.append(`${x}x`,"0"),l.append(`${x}y`,"0")}else p&&l.append(p,h)}}else{if(Sd(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Vu,a=null,s=Yu,c=e}return l&&s==="text/plain"&&(c=l,l=void 0),{action:a,method:r.toLowerCase(),encType:s,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Fh(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function PE(e,t,r,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&Ai(s.pathname,t)==="/"?s.pathname=`${id(t)}/_root.${a}`:s.pathname=`${id(s.pathname)}.${a}`,s}async function UR(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function FR(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function HR(e,t,r){let a=await Promise.all(e.map(async s=>{let l=t.routes[s.route.id];if(l){let c=await UR(l,r);return c.links?c.links():[]}return[]}));return KR(a.flat(1).filter(FR).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function s0(e,t,r,a,s,l){let c=(m,p)=>r[p]?m.route.id!==r[p].route.id:!0,f=(m,p)=>r[p].pathname!==m.pathname||r[p].route.path?.endsWith("*")&&r[p].params["*"]!==m.params["*"];return l==="assets"?t.filter((m,p)=>c(m,p)||f(m,p)):l==="data"?t.filter((m,p)=>{let g=a.routes[m.route.id];if(!g||!g.hasLoader)return!1;if(c(m,p)||f(m,p))return!0;if(m.route.shouldRevalidate){let h=m.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function $R(e,t,{includeHydrateFallback:r}={}){return qR(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let l=[s.module];return s.clientActionModule&&(l=l.concat(s.clientActionModule)),s.clientLoaderModule&&(l=l.concat(s.clientLoaderModule)),r&&s.hydrateFallbackModule&&(l=l.concat(s.hydrateFallbackModule)),s.imports&&(l=l.concat(s.imports)),l}).flat(1))}function qR(e){return[...new Set(e)]}function GR(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function KR(e,t){let r=new Set;return new Set(t),e.reduce((a,s)=>{let l=JSON.stringify(GR(s));return r.has(l)||(r.add(l),a.push({key:l,link:s})),a},[])}function Hh(){let e=w.useContext(fs);return Fh(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function QR(){let e=w.useContext(Ed);return Fh(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var $h=w.createContext(void 0);$h.displayName="FrameworkContext";function qh(){let e=w.useContext($h);return Fh(e,"You must render this element inside a <HydratedRouter> element"),e}function VR(e,t){let r=w.useContext($h),[a,s]=w.useState(!1),[l,c]=w.useState(!1),{onFocus:f,onBlur:m,onMouseEnter:p,onMouseLeave:g,onTouchStart:h}=t,x=w.useRef(null);w.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let S=k=>{k.forEach(M=>{c(M.isIntersecting)})},N=new IntersectionObserver(S,{threshold:.5});return x.current&&N.observe(x.current),()=>{N.disconnect()}}},[e]),w.useEffect(()=>{if(a){let S=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(S)}}},[a]);let v=()=>{s(!0)},E=()=>{s(!1),c(!1)};return r?e!=="intent"?[l,x,{}]:[l,x,{onFocus:yl(f,v),onBlur:yl(m,E),onMouseEnter:yl(p,v),onMouseLeave:yl(g,E),onTouchStart:yl(h,v)}]:[!1,x,{}]}function yl(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function YR({page:e,...t}){let r=sR(),{router:a}=Hh(),s=w.useMemo(()=>_E(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?r?w.createElement(ZR,{page:e,matches:s,...t}):w.createElement(WR,{page:e,matches:s,...t}):null}function XR(e){let{manifest:t,routeModules:r}=qh(),[a,s]=w.useState([]);return w.useEffect(()=>{let l=!1;return HR(e,t,r).then(c=>{l||s(c)}),()=>{l=!0}},[e,t,r]),a}function ZR({page:e,matches:t,...r}){let a=Lr(),{future:s}=qh(),{basename:l}=Hh(),c=w.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let f=PE(e,l,s.v8_trailingSlashAwareDataRequests,"rsc"),m=!1,p=[];for(let g of t)typeof g.route.shouldRevalidate=="function"?m=!0:p.push(g.route.id);return m&&p.length>0&&f.searchParams.set("_routes",p.join(",")),[f.pathname+f.search]},[l,s.v8_trailingSlashAwareDataRequests,e,a,t]);return w.createElement(w.Fragment,null,c.map(f=>w.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...r})))}function WR({page:e,matches:t,...r}){let a=Lr(),{future:s,manifest:l,routeModules:c}=qh(),{basename:f}=Hh(),{loaderData:m,matches:p}=QR(),g=w.useMemo(()=>s0(e,t,p,l,a,"data"),[e,t,p,l,a]),h=w.useMemo(()=>s0(e,t,p,l,a,"assets"),[e,t,p,l,a]),x=w.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let S=new Set,N=!1;if(t.forEach(M=>{let R=l.routes[M.route.id];!R||!R.hasLoader||(!g.some(O=>O.route.id===M.route.id)&&M.route.id in m&&c[M.route.id]?.shouldRevalidate||R.hasClientLoader?N=!0:S.add(M.route.id))}),S.size===0)return[];let k=PE(e,f,s.v8_trailingSlashAwareDataRequests,"data");return N&&S.size>0&&k.searchParams.set("_routes",t.filter(M=>S.has(M.route.id)).map(M=>M.route.id).join(",")),[k.pathname+k.search]},[f,s.v8_trailingSlashAwareDataRequests,m,a,l,g,t,e,c]),v=w.useMemo(()=>$R(h,l),[h,l]),E=XR(h);return w.createElement(w.Fragment,null,x.map(S=>w.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...r})),v.map(S=>w.createElement("link",{key:S,rel:"modulepreload",href:S,...r})),E.map(({key:S,link:N})=>w.createElement("link",{key:S,nonce:r.nonce,...N,crossOrigin:N.crossOrigin??r.crossOrigin})))}function JR(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var e2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{e2&&(window.__reactRouterVersion="7.17.0")}catch{}function t2({basename:e,children:t,useTransitions:r,window:a}){let s=w.useRef();s.current==null&&(s.current=DA({window:a,v5Compat:!0}));let l=s.current,[c,f]=w.useState({action:l.action,location:l.location}),m=w.useCallback(p=>{r===!1?f(p):w.startTransition(()=>f(p))},[r]);return w.useLayoutEffect(()=>l.listen(m),[l,m]),w.createElement(RR,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:l,useTransitions:r})}var UE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Gh=w.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:s,reloadDocument:l,replace:c,mask:f,state:m,target:p,to:g,preventScrollReset:h,viewTransition:x,defaultShouldRevalidate:v,...E},S){let{basename:N,navigator:k,useTransitions:M}=w.useContext(fr),R=typeof g=="string"&&UE.test(g),O=AE(g,N);g=O.to;let P=mR(g,{relative:s}),D=Lr(),U=null;if(f){let Q=vd(f,[],D.mask?D.mask.pathname:"/",!0);N!=="/"&&(Q.pathname=Q.pathname==="/"?N:Ar([N,Q.pathname])),U=k.createHref(Q)}let[B,J,F]=VR(a,E),ae=i2(g,{replace:c,mask:f,state:m,target:p,preventScrollReset:h,relative:s,viewTransition:x,defaultShouldRevalidate:v,useTransitions:M});function ee(Q){t&&t(Q),Q.defaultPrevented||ae(Q)}let ce=!(O.isExternal||l),te=w.createElement("a",{...E,...F,href:(ce?U:void 0)||O.absoluteURL||P,onClick:ce?ee:t,ref:JR(S,J),target:p,"data-discover":!R&&r==="render"?"true":void 0});return B&&!R?w.createElement(w.Fragment,null,te,w.createElement(YR,{page:P})):te});Gh.displayName="Link";var FE=w.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:s=!1,style:l,to:c,viewTransition:f,children:m,...p},g){let h=Ql(c,{relative:p.relative}),x=Lr(),v=w.useContext(Ed),{navigator:E,basename:S}=w.useContext(fr),N=v!=null&&c2(h)&&f===!0,k=E.encodeLocation?E.encodeLocation(h).pathname:h.pathname,M=x.pathname,R=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(M=M.toLowerCase(),R=R?R.toLowerCase():null,k=k.toLowerCase()),R&&S&&(R=Ai(R,S)||R);const O=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let P=M===k||!s&&M.startsWith(k)&&M.charAt(O)==="/",D=R!=null&&(R===k||!s&&R.startsWith(k)&&R.charAt(k.length)==="/"),U={isActive:P,isPending:D,isTransitioning:N},B=P?t:void 0,J;typeof a=="function"?J=a(U):J=[a,P?"active":null,D?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let F=typeof l=="function"?l(U):l;return w.createElement(Gh,{...p,"aria-current":B,className:J,ref:g,style:F,to:c,viewTransition:f},typeof m=="function"?m(U):m)});FE.displayName="NavLink";var n2=w.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:s,state:l,method:c=Vu,action:f,onSubmit:m,relative:p,preventScrollReset:g,viewTransition:h,defaultShouldRevalidate:x,...v},E)=>{let{useTransitions:S}=w.useContext(fr),N=s2(),k=l2(f,{relative:p}),M=c.toLowerCase()==="get"?"get":"post",R=typeof f=="string"&&UE.test(f),O=P=>{if(m&&m(P),P.defaultPrevented)return;P.preventDefault();let D=P.nativeEvent.submitter,U=D?.getAttribute("formmethod")||c,B=()=>N(D||P.currentTarget,{fetcherKey:t,method:U,navigate:r,replace:s,state:l,relative:p,preventScrollReset:g,viewTransition:h,defaultShouldRevalidate:x});S&&r!==!1?w.startTransition(()=>B()):B()};return w.createElement("form",{ref:E,method:M,action:k,onSubmit:a?m:O,...v,"data-discover":!R&&e==="render"?"true":void 0})});n2.displayName="Form";function r2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function HE(e){let t=w.useContext(fs);return Ut(t,r2(e)),t}function i2(e,{target:t,replace:r,mask:a,state:s,preventScrollReset:l,relative:c,viewTransition:f,defaultShouldRevalidate:m,useTransitions:p}={}){let g=wd(),h=Lr(),x=Ql(e,{relative:c});return w.useCallback(v=>{if(IR(v,t)){v.preventDefault();let E=r!==void 0?r:jl(h)===jl(x),S=()=>g(e,{replace:E,mask:a,state:s,preventScrollReset:l,relative:c,viewTransition:f,defaultShouldRevalidate:m});p?w.startTransition(()=>S()):S()}},[h,g,x,r,a,s,t,e,l,c,f,m,p])}var a2=0,o2=()=>`__${String(++a2)}__`;function s2(){let{router:e}=HE("useSubmit"),{basename:t}=w.useContext(fr),r=kR(),a=e.fetch,s=e.navigate;return w.useCallback(async(l,c={})=>{let{action:f,method:m,encType:p,formData:g,body:h}=PR(l,t);if(c.navigate===!1){let x=c.fetcherKey||o2();await a(x,r,c.action||f,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:h,formMethod:c.method||m,formEncType:c.encType||p,flushSync:c.flushSync})}else await s(c.action||f,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:h,formMethod:c.method||m,formEncType:c.encType||p,replace:c.replace,state:c.state,fromRouteId:r,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,t,r])}function l2(e,{relative:t}={}){let{basename:r}=w.useContext(fr),a=w.useContext(ti);Ut(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),l={...Ql(e||".",{relative:t})},c=Lr();if(e==null){l.search=c.search;let f=new URLSearchParams(l.search),m=f.getAll("index");if(m.some(g=>g==="")){f.delete("index"),m.filter(h=>h).forEach(h=>f.append("index",h));let g=f.toString();l.search=g?`?${g}`:""}}return(!e||e===".")&&s.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(l.pathname=l.pathname==="/"?r:Ar([r,l.pathname])),jl(l)}function c2(e,{relative:t}={}){let r=w.useContext(OE);Ut(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=HE("useViewTransitionState"),s=Ql(e,{relative:t});if(!r.isTransitioning)return!1;let l=Ai(r.currentLocation.pathname,a)||r.currentLocation.pathname,c=Ai(r.nextLocation.pathname,a)||r.nextLocation.pathname;return rd(s.pathname,c)!=null||rd(s.pathname,l)!=null}var _d=pE();const u2=Gl(_d);function He(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e?.(s),r===!1||!s.defaultPrevented)return t?.(s)}}function l0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Kh(...e){return t=>{let r=!1;const a=e.map(s=>{const l=l0(s,t);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let s=0;s<a.length;s++){const l=a[s];typeof l=="function"?l():l0(e[s],null)}}}}function Ft(...e){return w.useCallback(Kh(...e),e)}function d2(e,t){const r=w.createContext(t);r.displayName=e+"Context";const a=l=>{const{children:c,...f}=l,m=w.useMemo(()=>f,Object.values(f));return d.jsx(r.Provider,{value:m,children:c})};a.displayName=e+"Provider";function s(l){const c=w.useContext(r);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[a,s]}function ni(e,t=[]){let r=[];function a(l,c){const f=w.createContext(c);f.displayName=l+"Context";const m=r.length;r=[...r,c];const p=h=>{const{scope:x,children:v,...E}=h,S=x?.[e]?.[m]||f,N=w.useMemo(()=>E,Object.values(E));return d.jsx(S.Provider,{value:N,children:v})};p.displayName=l+"Provider";function g(h,x){const v=x?.[e]?.[m]||f,E=w.useContext(v);if(E)return E;if(c!==void 0)return c;throw new Error(`\`${h}\` must be used within \`${l}\``)}return[p,g]}const s=()=>{const l=r.map(c=>w.createContext(c));return function(f){const m=f?.[e]||l;return w.useMemo(()=>({[`__scope${e}`]:{...f,[e]:m}}),[f,m])}};return s.scopeName=e,[a,f2(s,...t)]}function f2(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const a=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(l){const c=a.reduce((f,{useScope:m,scopeName:p})=>{const h=m(l)[`__scope${p}`];return{...f,...h}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return r.scopeName=t.scopeName,r}function is(e){const t=w.forwardRef((r,a)=>{let{children:s,...l}=r,c=null,f=!1;const m=[];c0(s)&&typeof ku=="function"&&(s=ku(s._payload)),w.Children.forEach(s,x=>{if(b2(x)){f=!0;const v=x;let E="child"in v.props?v.props.child:v.props.children;c0(E)&&typeof ku=="function"&&(E=ku(E._payload)),c=m2(v,E),m.push(c?.props?.children)}else m.push(x)}),c?c=w.cloneElement(c,void 0,m):!f&&w.Children.count(s)===1&&w.isValidElement(s)&&(c=s);const p=c?g2(c):void 0,g=Ft(a,p);if(!c){if(s||s===0)throw new Error(f?E2(e):v2(e));return s}const h=h2(l,c.props??{});return c.type!==w.Fragment&&(h.ref=a?g:p),w.cloneElement(c,h)});return t.displayName=`${e}.Slot`,t}var p2=is("Slot"),$E=Symbol.for("radix.slottable");function qE(e){const t=r=>"child"in r?r.children(r.child):r.children;return t.displayName=`${e}.Slottable`,t.__radixId=$E,t}var m2=(e,t)=>{if("child"in e.props){const r=e.props.child;return w.isValidElement(r)?w.cloneElement(r,void 0,e.props.children(r.props.children)):null}return w.isValidElement(t)?t:null};function h2(e,t){const r={...t};for(const a in t){const s=e[a],l=t[a];/^on[A-Z]/.test(a)?s&&l?r[a]=(...f)=>{const m=l(...f);return s(...f),m}:s&&(r[a]=s):a==="style"?r[a]={...s,...l}:a==="className"&&(r[a]=[s,l].filter(Boolean).join(" "))}return{...e,...r}}function g2(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function b2(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$E}var y2=Symbol.for("react.lazy");function c0(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===y2&&"_payload"in e&&x2(e._payload)}function x2(e){return typeof e=="object"&&e!==null&&"then"in e}var v2=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,E2=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,ku=Mh[" use ".trim().toString()],w2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Tt=w2.reduce((e,t)=>{const r=is(`Primitive.${t}`),a=w.forwardRef((s,l)=>{const{asChild:c,...f}=s,m=c?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(m,{...f,ref:l})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function GE(e,t){e&&_d.flushSync(()=>e.dispatchEvent(t))}function Ri(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>((...r)=>t.current?.(...r)),[])}function S2(e,t=globalThis?.document){const r=Ri(e);w.useEffect(()=>{const a=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[r,t])}var _2="DismissableLayer",Jm="dismissableLayer.update",k2="dismissableLayer.pointerDownOutside",N2="dismissableLayer.focusOutside",u0,KE=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kd=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:c,onDismiss:f,...m}=e,p=w.useContext(KE),[g,h]=w.useState(null),x=g?.ownerDocument??globalThis?.document,[,v]=w.useState({}),E=Ft(t,U=>h(U)),S=Array.from(p.layers),[N]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),k=S.indexOf(N),M=g?S.indexOf(g):-1,R=p.layersWithOutsidePointerEventsDisabled.size>0,O=M>=k,P=A2(U=>{const B=U.target,J=[...p.branches].some(F=>F.contains(B));!O||J||(s?.(U),c?.(U),U.defaultPrevented||f?.())},x),D=R2(U=>{const B=U.target;[...p.branches].some(F=>F.contains(B))||(l?.(U),c?.(U),U.defaultPrevented||f?.())},x);return S2(U=>{M===p.layers.size-1&&(a?.(U),!U.defaultPrevented&&f&&(U.preventDefault(),f()))},x),w.useEffect(()=>{if(g)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(u0=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),d0(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(g),p.layersWithOutsidePointerEventsDisabled.size===0&&(x.body.style.pointerEvents=u0))}},[g,x,r,p]),w.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),d0())},[g,p]),w.useEffect(()=>{const U=()=>v({});return document.addEventListener(Jm,U),()=>document.removeEventListener(Jm,U)},[]),d.jsx(Tt.div,{...m,ref:E,style:{pointerEvents:R?O?"auto":"none":void 0,...e.style},onFocusCapture:He(e.onFocusCapture,D.onFocusCapture),onBlurCapture:He(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:He(e.onPointerDownCapture,P.onPointerDownCapture)})});kd.displayName=_2;var C2="DismissableLayerBranch",T2=w.forwardRef((e,t)=>{const r=w.useContext(KE),a=w.useRef(null),s=Ft(t,a);return w.useEffect(()=>{const l=a.current;if(l)return r.branches.add(l),()=>{r.branches.delete(l)}},[r.branches]),d.jsx(Tt.div,{...e,ref:s})});T2.displayName=C2;function A2(e,t=globalThis?.document){const r=Ri(e),a=w.useRef(!1),s=w.useRef(()=>{});return w.useEffect(()=>{const l=f=>{if(f.target&&!a.current){let m=function(){QE(k2,r,p,{discrete:!0})};const p={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=m,t.addEventListener("click",s.current,{once:!0})):m()}else t.removeEventListener("click",s.current);a.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",l),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>a.current=!0}}function R2(e,t=globalThis?.document){const r=Ri(e),a=w.useRef(!1);return w.useEffect(()=>{const s=l=>{l.target&&!a.current&&QE(N2,r,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function d0(){const e=new CustomEvent(Jm);document.dispatchEvent(e)}function QE(e,t,r,{discrete:a}){const s=r.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),a?GE(s,l):s.dispatchEvent(l)}var Zr=globalThis?.document?w.useLayoutEffect:()=>{},M2=Mh[" useId ".trim().toString()]||(()=>{}),O2=0;function ya(e){const[t,r]=w.useState(M2());return Zr(()=>{r(a=>a??String(O2++))},[e]),t?`radix-${t}`:""}const D2=["top","right","bottom","left"],xa=Math.min,cr=Math.max,ad=Math.round,Nu=Math.floor,Wr=e=>({x:e,y:e}),j2={left:"right",right:"left",bottom:"top",top:"bottom"};function eh(e,t,r){return cr(e,xa(t,r))}function Mi(e,t){return typeof e=="function"?e(t):e}function Oi(e){return e.split("-")[0]}function ms(e){return e.split("-")[1]}function Qh(e){return e==="x"?"y":"x"}function Vh(e){return e==="y"?"height":"width"}function Xr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Yh(e){return Qh(Xr(e))}function L2(e,t,r){r===void 0&&(r=!1);const a=ms(e),s=Yh(e),l=Vh(s);let c=s==="x"?a===(r?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(c=od(c)),[c,od(c)]}function I2(e){const t=od(e);return[th(e),t,th(t)]}function th(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const f0=["left","right"],p0=["right","left"],z2=["top","bottom"],B2=["bottom","top"];function P2(e,t,r){switch(e){case"top":case"bottom":return r?t?p0:f0:t?f0:p0;case"left":case"right":return t?z2:B2;default:return[]}}function U2(e,t,r,a){const s=ms(e);let l=P2(Oi(e),r==="start",a);return s&&(l=l.map(c=>c+"-"+s),t&&(l=l.concat(l.map(th)))),l}function od(e){const t=Oi(e);return j2[t]+e.slice(t.length)}function F2(e){return{top:0,right:0,bottom:0,left:0,...e}}function VE(e){return typeof e!="number"?F2(e):{top:e,right:e,bottom:e,left:e}}function sd(e){const{x:t,y:r,width:a,height:s}=e;return{width:a,height:s,top:r,left:t,right:t+a,bottom:r+s,x:t,y:r}}function m0(e,t,r){let{reference:a,floating:s}=e;const l=Xr(t),c=Yh(t),f=Vh(c),m=Oi(t),p=l==="y",g=a.x+a.width/2-s.width/2,h=a.y+a.height/2-s.height/2,x=a[f]/2-s[f]/2;let v;switch(m){case"top":v={x:g,y:a.y-s.height};break;case"bottom":v={x:g,y:a.y+a.height};break;case"right":v={x:a.x+a.width,y:h};break;case"left":v={x:a.x-s.width,y:h};break;default:v={x:a.x,y:a.y}}switch(ms(t)){case"start":v[c]-=x*(r&&p?-1:1);break;case"end":v[c]+=x*(r&&p?-1:1);break}return v}async function H2(e,t){var r;t===void 0&&(t={});const{x:a,y:s,platform:l,rects:c,elements:f,strategy:m}=e,{boundary:p="clippingAncestors",rootBoundary:g="viewport",elementContext:h="floating",altBoundary:x=!1,padding:v=0}=Mi(t,e),E=VE(v),N=f[x?h==="floating"?"reference":"floating":h],k=sd(await l.getClippingRect({element:(r=await(l.isElement==null?void 0:l.isElement(N)))==null||r?N:N.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(f.floating)),boundary:p,rootBoundary:g,strategy:m})),M=h==="floating"?{x:a,y:s,width:c.floating.width,height:c.floating.height}:c.reference,R=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f.floating)),O=await(l.isElement==null?void 0:l.isElement(R))?await(l.getScale==null?void 0:l.getScale(R))||{x:1,y:1}:{x:1,y:1},P=sd(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:M,offsetParent:R,strategy:m}):M);return{top:(k.top-P.top+E.top)/O.y,bottom:(P.bottom-k.bottom+E.bottom)/O.y,left:(k.left-P.left+E.left)/O.x,right:(P.right-k.right+E.right)/O.x}}const $2=50,q2=async(e,t,r)=>{const{placement:a="bottom",strategy:s="absolute",middleware:l=[],platform:c}=r,f=c.detectOverflow?c:{...c,detectOverflow:H2},m=await(c.isRTL==null?void 0:c.isRTL(t));let p=await c.getElementRects({reference:e,floating:t,strategy:s}),{x:g,y:h}=m0(p,a,m),x=a,v=0;const E={};for(let S=0;S<l.length;S++){const N=l[S];if(!N)continue;const{name:k,fn:M}=N,{x:R,y:O,data:P,reset:D}=await M({x:g,y:h,initialPlacement:a,placement:x,strategy:s,middlewareData:E,rects:p,platform:f,elements:{reference:e,floating:t}});g=R??g,h=O??h,E[k]={...E[k],...P},D&&v<$2&&(v++,typeof D=="object"&&(D.placement&&(x=D.placement),D.rects&&(p=D.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:g,y:h}=m0(p,x,m)),S=-1)}return{x:g,y:h,placement:x,strategy:s,middlewareData:E}},G2=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:a,placement:s,rects:l,platform:c,elements:f,middlewareData:m}=t,{element:p,padding:g=0}=Mi(e,t)||{};if(p==null)return{};const h=VE(g),x={x:r,y:a},v=Yh(s),E=Vh(v),S=await c.getDimensions(p),N=v==="y",k=N?"top":"left",M=N?"bottom":"right",R=N?"clientHeight":"clientWidth",O=l.reference[E]+l.reference[v]-x[v]-l.floating[E],P=x[v]-l.reference[v],D=await(c.getOffsetParent==null?void 0:c.getOffsetParent(p));let U=D?D[R]:0;(!U||!await(c.isElement==null?void 0:c.isElement(D)))&&(U=f.floating[R]||l.floating[E]);const B=O/2-P/2,J=U/2-S[E]/2-1,F=xa(h[k],J),ae=xa(h[M],J),ee=F,ce=U-S[E]-ae,te=U/2-S[E]/2+B,Q=eh(ee,te,ce),j=!m.arrow&&ms(s)!=null&&te!==Q&&l.reference[E]/2-(te<ee?F:ae)-S[E]/2<0,V=j?te<ee?te-ee:te-ce:0;return{[v]:x[v]+V,data:{[v]:Q,centerOffset:te-Q-V,...j&&{alignmentOffset:V}},reset:j}}}),K2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,a;const{placement:s,middlewareData:l,rects:c,initialPlacement:f,platform:m,elements:p}=t,{mainAxis:g=!0,crossAxis:h=!0,fallbackPlacements:x,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:S=!0,...N}=Mi(e,t);if((r=l.arrow)!=null&&r.alignmentOffset)return{};const k=Oi(s),M=Xr(f),R=Oi(f)===f,O=await(m.isRTL==null?void 0:m.isRTL(p.floating)),P=x||(R||!S?[od(f)]:I2(f)),D=E!=="none";!x&&D&&P.push(...U2(f,S,E,O));const U=[f,...P],B=await m.detectOverflow(t,N),J=[];let F=((a=l.flip)==null?void 0:a.overflows)||[];if(g&&J.push(B[k]),h){const te=L2(s,c,O);J.push(B[te[0]],B[te[1]])}if(F=[...F,{placement:s,overflows:J}],!J.every(te=>te<=0)){var ae,ee;const te=(((ae=l.flip)==null?void 0:ae.index)||0)+1,Q=U[te];if(Q&&(!(h==="alignment"?M!==Xr(Q):!1)||F.every(Z=>Xr(Z.placement)===M?Z.overflows[0]>0:!0)))return{data:{index:te,overflows:F},reset:{placement:Q}};let j=(ee=F.filter(V=>V.overflows[0]<=0).sort((V,Z)=>V.overflows[1]-Z.overflows[1])[0])==null?void 0:ee.placement;if(!j)switch(v){case"bestFit":{var ce;const V=(ce=F.filter(Z=>{if(D){const ie=Xr(Z.placement);return ie===M||ie==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(ie=>ie>0).reduce((ie,T)=>ie+T,0)]).sort((Z,ie)=>Z[1]-ie[1])[0])==null?void 0:ce[0];V&&(j=V);break}case"initialPlacement":j=f;break}if(s!==j)return{reset:{placement:j}}}return{}}}};function h0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function g0(e){return D2.some(t=>e[t]>=0)}const Q2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:a}=t,{strategy:s="referenceHidden",...l}=Mi(e,t);switch(s){case"referenceHidden":{const c=await a.detectOverflow(t,{...l,elementContext:"reference"}),f=h0(c,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:g0(f)}}}case"escaped":{const c=await a.detectOverflow(t,{...l,altBoundary:!0}),f=h0(c,r.floating);return{data:{escapedOffsets:f,escaped:g0(f)}}}default:return{}}}}},YE=new Set(["left","top"]);async function V2(e,t){const{placement:r,platform:a,elements:s}=e,l=await(a.isRTL==null?void 0:a.isRTL(s.floating)),c=Oi(r),f=ms(r),m=Xr(r)==="y",p=YE.has(c)?-1:1,g=l&&m?-1:1,h=Mi(t,e);let{mainAxis:x,crossAxis:v,alignmentAxis:E}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return f&&typeof E=="number"&&(v=f==="end"?E*-1:E),m?{x:v*g,y:x*p}:{x:x*p,y:v*g}}const Y2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,a;const{x:s,y:l,placement:c,middlewareData:f}=t,m=await V2(t,e);return c===((r=f.offset)==null?void 0:r.placement)&&(a=f.arrow)!=null&&a.alignmentOffset?{}:{x:s+m.x,y:l+m.y,data:{...m,placement:c}}}}},X2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:a,placement:s,platform:l}=t,{mainAxis:c=!0,crossAxis:f=!1,limiter:m={fn:k=>{let{x:M,y:R}=k;return{x:M,y:R}}},...p}=Mi(e,t),g={x:r,y:a},h=await l.detectOverflow(t,p),x=Xr(Oi(s)),v=Qh(x);let E=g[v],S=g[x];if(c){const k=v==="y"?"top":"left",M=v==="y"?"bottom":"right",R=E+h[k],O=E-h[M];E=eh(R,E,O)}if(f){const k=x==="y"?"top":"left",M=x==="y"?"bottom":"right",R=S+h[k],O=S-h[M];S=eh(R,S,O)}const N=m.fn({...t,[v]:E,[x]:S});return{...N,data:{x:N.x-r,y:N.y-a,enabled:{[v]:c,[x]:f}}}}}},Z2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:a,placement:s,rects:l,middlewareData:c}=t,{offset:f=0,mainAxis:m=!0,crossAxis:p=!0}=Mi(e,t),g={x:r,y:a},h=Xr(s),x=Qh(h);let v=g[x],E=g[h];const S=Mi(f,t),N=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(m){const R=x==="y"?"height":"width",O=l.reference[x]-l.floating[R]+N.mainAxis,P=l.reference[x]+l.reference[R]-N.mainAxis;v<O?v=O:v>P&&(v=P)}if(p){var k,M;const R=x==="y"?"width":"height",O=YE.has(Oi(s)),P=l.reference[h]-l.floating[R]+(O&&((k=c.offset)==null?void 0:k[h])||0)+(O?0:N.crossAxis),D=l.reference[h]+l.reference[R]+(O?0:((M=c.offset)==null?void 0:M[h])||0)-(O?N.crossAxis:0);E<P?E=P:E>D&&(E=D)}return{[x]:v,[h]:E}}}},W2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,a;const{placement:s,rects:l,platform:c,elements:f}=t,{apply:m=()=>{},...p}=Mi(e,t),g=await c.detectOverflow(t,p),h=Oi(s),x=ms(s),v=Xr(s)==="y",{width:E,height:S}=l.floating;let N,k;h==="top"||h==="bottom"?(N=h,k=x===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(k=h,N=x==="end"?"top":"bottom");const M=S-g.top-g.bottom,R=E-g.left-g.right,O=xa(S-g[N],M),P=xa(E-g[k],R),D=!t.middlewareData.shift;let U=O,B=P;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(B=R),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(U=M),D&&!x){const F=cr(g.left,0),ae=cr(g.right,0),ee=cr(g.top,0),ce=cr(g.bottom,0);v?B=E-2*(F!==0||ae!==0?F+ae:cr(g.left,g.right)):U=S-2*(ee!==0||ce!==0?ee+ce:cr(g.top,g.bottom))}await m({...t,availableWidth:B,availableHeight:U});const J=await c.getDimensions(f.floating);return E!==J.width||S!==J.height?{reset:{rects:!0}}:{}}}};function Nd(){return typeof window<"u"}function hs(e){return XE(e)?(e.nodeName||"").toLowerCase():"#document"}function ur(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ri(e){var t;return(t=(XE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function XE(e){return Nd()?e instanceof Node||e instanceof ur(e).Node:!1}function Dr(e){return Nd()?e instanceof Element||e instanceof ur(e).Element:!1}function Li(e){return Nd()?e instanceof HTMLElement||e instanceof ur(e).HTMLElement:!1}function b0(e){return!Nd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ur(e).ShadowRoot}function Vl(e){const{overflow:t,overflowX:r,overflowY:a,display:s}=jr(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+r)&&s!=="inline"&&s!=="contents"}function J2(e){return/^(table|td|th)$/.test(hs(e))}function Cd(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const eM=/transform|translate|scale|rotate|perspective|filter/,tM=/paint|layout|strict|content/,$a=e=>!!e&&e!=="none";let um;function Xh(e){const t=Dr(e)?jr(e):e;return $a(t.transform)||$a(t.translate)||$a(t.scale)||$a(t.rotate)||$a(t.perspective)||!Zh()&&($a(t.backdropFilter)||$a(t.filter))||eM.test(t.willChange||"")||tM.test(t.contain||"")}function nM(e){let t=va(e);for(;Li(t)&&!as(t);){if(Xh(t))return t;if(Cd(t))return null;t=va(t)}return null}function Zh(){return um==null&&(um=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),um}function as(e){return/^(html|body|#document)$/.test(hs(e))}function jr(e){return ur(e).getComputedStyle(e)}function Td(e){return Dr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function va(e){if(hs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||b0(e)&&e.host||ri(e);return b0(t)?t.host:t}function ZE(e){const t=va(e);return as(t)?e.ownerDocument?e.ownerDocument.body:e.body:Li(t)&&Vl(t)?t:ZE(t)}function Ll(e,t,r){var a;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=ZE(e),l=s===((a=e.ownerDocument)==null?void 0:a.body),c=ur(s);if(l){const f=nh(c);return t.concat(c,c.visualViewport||[],Vl(s)?s:[],f&&r?Ll(f):[])}else return t.concat(s,Ll(s,[],r))}function nh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function WE(e){const t=jr(e);let r=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const s=Li(e),l=s?e.offsetWidth:r,c=s?e.offsetHeight:a,f=ad(r)!==l||ad(a)!==c;return f&&(r=l,a=c),{width:r,height:a,$:f}}function Wh(e){return Dr(e)?e:e.contextElement}function ts(e){const t=Wh(e);if(!Li(t))return Wr(1);const r=t.getBoundingClientRect(),{width:a,height:s,$:l}=WE(t);let c=(l?ad(r.width):r.width)/a,f=(l?ad(r.height):r.height)/s;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const rM=Wr(0);function JE(e){const t=ur(e);return!Zh()||!t.visualViewport?rM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function iM(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ur(e)?!1:t}function Xa(e,t,r,a){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),l=Wh(e);let c=Wr(1);t&&(a?Dr(a)&&(c=ts(a)):c=ts(e));const f=iM(l,r,a)?JE(l):Wr(0);let m=(s.left+f.x)/c.x,p=(s.top+f.y)/c.y,g=s.width/c.x,h=s.height/c.y;if(l){const x=ur(l),v=a&&Dr(a)?ur(a):a;let E=x,S=nh(E);for(;S&&a&&v!==E;){const N=ts(S),k=S.getBoundingClientRect(),M=jr(S),R=k.left+(S.clientLeft+parseFloat(M.paddingLeft))*N.x,O=k.top+(S.clientTop+parseFloat(M.paddingTop))*N.y;m*=N.x,p*=N.y,g*=N.x,h*=N.y,m+=R,p+=O,E=ur(S),S=nh(E)}}return sd({width:g,height:h,x:m,y:p})}function Ad(e,t){const r=Td(e).scrollLeft;return t?t.left+r:Xa(ri(e)).left+r}function ew(e,t){const r=e.getBoundingClientRect(),a=r.left+t.scrollLeft-Ad(e,r),s=r.top+t.scrollTop;return{x:a,y:s}}function aM(e){let{elements:t,rect:r,offsetParent:a,strategy:s}=e;const l=s==="fixed",c=ri(a),f=t?Cd(t.floating):!1;if(a===c||f&&l)return r;let m={scrollLeft:0,scrollTop:0},p=Wr(1);const g=Wr(0),h=Li(a);if((h||!h&&!l)&&((hs(a)!=="body"||Vl(c))&&(m=Td(a)),h)){const v=Xa(a);p=ts(a),g.x=v.x+a.clientLeft,g.y=v.y+a.clientTop}const x=c&&!h&&!l?ew(c,m):Wr(0);return{width:r.width*p.x,height:r.height*p.y,x:r.x*p.x-m.scrollLeft*p.x+g.x+x.x,y:r.y*p.y-m.scrollTop*p.y+g.y+x.y}}function oM(e){return Array.from(e.getClientRects())}function sM(e){const t=ri(e),r=Td(e),a=e.ownerDocument.body,s=cr(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=cr(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let c=-r.scrollLeft+Ad(e);const f=-r.scrollTop;return jr(a).direction==="rtl"&&(c+=cr(t.clientWidth,a.clientWidth)-s),{width:s,height:l,x:c,y:f}}const y0=25;function lM(e,t){const r=ur(e),a=ri(e),s=r.visualViewport;let l=a.clientWidth,c=a.clientHeight,f=0,m=0;if(s){l=s.width,c=s.height;const g=Zh();(!g||g&&t==="fixed")&&(f=s.offsetLeft,m=s.offsetTop)}const p=Ad(a);if(p<=0){const g=a.ownerDocument,h=g.body,x=getComputedStyle(h),v=g.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,E=Math.abs(a.clientWidth-h.clientWidth-v);E<=y0&&(l-=E)}else p<=y0&&(l+=p);return{width:l,height:c,x:f,y:m}}function cM(e,t){const r=Xa(e,!0,t==="fixed"),a=r.top+e.clientTop,s=r.left+e.clientLeft,l=Li(e)?ts(e):Wr(1),c=e.clientWidth*l.x,f=e.clientHeight*l.y,m=s*l.x,p=a*l.y;return{width:c,height:f,x:m,y:p}}function x0(e,t,r){let a;if(t==="viewport")a=lM(e,r);else if(t==="document")a=sM(ri(e));else if(Dr(t))a=cM(t,r);else{const s=JE(e);a={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return sd(a)}function tw(e,t){const r=va(e);return r===t||!Dr(r)||as(r)?!1:jr(r).position==="fixed"||tw(r,t)}function uM(e,t){const r=t.get(e);if(r)return r;let a=Ll(e,[],!1).filter(f=>Dr(f)&&hs(f)!=="body"),s=null;const l=jr(e).position==="fixed";let c=l?va(e):e;for(;Dr(c)&&!as(c);){const f=jr(c),m=Xh(c);!m&&f.position==="fixed"&&(s=null),(l?!m&&!s:!m&&f.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Vl(c)&&!m&&tw(e,c))?a=a.filter(g=>g!==c):s=f,c=va(c)}return t.set(e,a),a}function dM(e){let{element:t,boundary:r,rootBoundary:a,strategy:s}=e;const c=[...r==="clippingAncestors"?Cd(t)?[]:uM(t,this._c):[].concat(r),a],f=x0(t,c[0],s);let m=f.top,p=f.right,g=f.bottom,h=f.left;for(let x=1;x<c.length;x++){const v=x0(t,c[x],s);m=cr(v.top,m),p=xa(v.right,p),g=xa(v.bottom,g),h=cr(v.left,h)}return{width:p-h,height:g-m,x:h,y:m}}function fM(e){const{width:t,height:r}=WE(e);return{width:t,height:r}}function pM(e,t,r){const a=Li(t),s=ri(t),l=r==="fixed",c=Xa(e,!0,l,t);let f={scrollLeft:0,scrollTop:0};const m=Wr(0);function p(){m.x=Ad(s)}if(a||!a&&!l)if((hs(t)!=="body"||Vl(s))&&(f=Td(t)),a){const v=Xa(t,!0,l,t);m.x=v.x+t.clientLeft,m.y=v.y+t.clientTop}else s&&p();l&&!a&&s&&p();const g=s&&!a&&!l?ew(s,f):Wr(0),h=c.left+f.scrollLeft-m.x-g.x,x=c.top+f.scrollTop-m.y-g.y;return{x:h,y:x,width:c.width,height:c.height}}function dm(e){return jr(e).position==="static"}function v0(e,t){if(!Li(e)||jr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ri(e)===r&&(r=r.ownerDocument.body),r}function nw(e,t){const r=ur(e);if(Cd(e))return r;if(!Li(e)){let s=va(e);for(;s&&!as(s);){if(Dr(s)&&!dm(s))return s;s=va(s)}return r}let a=v0(e,t);for(;a&&J2(a)&&dm(a);)a=v0(a,t);return a&&as(a)&&dm(a)&&!Xh(a)?r:a||nM(e)||r}const mM=async function(e){const t=this.getOffsetParent||nw,r=this.getDimensions,a=await r(e.floating);return{reference:pM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function hM(e){return jr(e).direction==="rtl"}const gM={convertOffsetParentRelativeRectToViewportRelativeRect:aM,getDocumentElement:ri,getClippingRect:dM,getOffsetParent:nw,getElementRects:mM,getClientRects:oM,getDimensions:fM,getScale:ts,isElement:Dr,isRTL:hM};function rw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bM(e,t){let r=null,a;const s=ri(e);function l(){var f;clearTimeout(a),(f=r)==null||f.disconnect(),r=null}function c(f,m){f===void 0&&(f=!1),m===void 0&&(m=1),l();const p=e.getBoundingClientRect(),{left:g,top:h,width:x,height:v}=p;if(f||t(),!x||!v)return;const E=Nu(h),S=Nu(s.clientWidth-(g+x)),N=Nu(s.clientHeight-(h+v)),k=Nu(g),R={rootMargin:-E+"px "+-S+"px "+-N+"px "+-k+"px",threshold:cr(0,xa(1,m))||1};let O=!0;function P(D){const U=D[0].intersectionRatio;if(U!==m){if(!O)return c();U?c(!1,U):a=setTimeout(()=>{c(!1,1e-7)},1e3)}U===1&&!rw(p,e.getBoundingClientRect())&&c(),O=!1}try{r=new IntersectionObserver(P,{...R,root:s.ownerDocument})}catch{r=new IntersectionObserver(P,R)}r.observe(e)}return c(!0),l}function yM(e,t,r,a){a===void 0&&(a={});const{ancestorScroll:s=!0,ancestorResize:l=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:m=!1}=a,p=Wh(e),g=s||l?[...p?Ll(p):[],...t?Ll(t):[]]:[];g.forEach(k=>{s&&k.addEventListener("scroll",r,{passive:!0}),l&&k.addEventListener("resize",r)});const h=p&&f?bM(p,r):null;let x=-1,v=null;c&&(v=new ResizeObserver(k=>{let[M]=k;M&&M.target===p&&v&&t&&(v.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var R;(R=v)==null||R.observe(t)})),r()}),p&&!m&&v.observe(p),t&&v.observe(t));let E,S=m?Xa(e):null;m&&N();function N(){const k=Xa(e);S&&!rw(S,k)&&r(),S=k,E=requestAnimationFrame(N)}return r(),()=>{var k;g.forEach(M=>{s&&M.removeEventListener("scroll",r),l&&M.removeEventListener("resize",r)}),h?.(),(k=v)==null||k.disconnect(),v=null,m&&cancelAnimationFrame(E)}}const xM=Y2,vM=X2,EM=K2,wM=W2,SM=Q2,E0=G2,_M=Z2,kM=(e,t,r)=>{const a=new Map,s={platform:gM,...r},l={...s.platform,_c:a};return q2(e,t,{...s,platform:l})};var NM=typeof document<"u",CM=function(){},Xu=NM?w.useLayoutEffect:CM;function ld(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,a,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(a=r;a--!==0;)if(!ld(e[a],t[a]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(a=r;a--!==0;)if(!{}.hasOwnProperty.call(t,s[a]))return!1;for(a=r;a--!==0;){const l=s[a];if(!(l==="_owner"&&e.$$typeof)&&!ld(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function iw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function w0(e,t){const r=iw(e);return Math.round(t*r)/r}function fm(e){const t=w.useRef(e);return Xu(()=>{t.current=e}),t}function TM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:a=[],platform:s,elements:{reference:l,floating:c}={},transform:f=!0,whileElementsMounted:m,open:p}=e,[g,h]=w.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[x,v]=w.useState(a);ld(x,a)||v(a);const[E,S]=w.useState(null),[N,k]=w.useState(null),M=w.useCallback(Z=>{Z!==D.current&&(D.current=Z,S(Z))},[]),R=w.useCallback(Z=>{Z!==U.current&&(U.current=Z,k(Z))},[]),O=l||E,P=c||N,D=w.useRef(null),U=w.useRef(null),B=w.useRef(g),J=m!=null,F=fm(m),ae=fm(s),ee=fm(p),ce=w.useCallback(()=>{if(!D.current||!U.current)return;const Z={placement:t,strategy:r,middleware:x};ae.current&&(Z.platform=ae.current),kM(D.current,U.current,Z).then(ie=>{const T={...ie,isPositioned:ee.current!==!1};te.current&&!ld(B.current,T)&&(B.current=T,_d.flushSync(()=>{h(T)}))})},[x,t,r,ae,ee]);Xu(()=>{p===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,h(Z=>({...Z,isPositioned:!1})))},[p]);const te=w.useRef(!1);Xu(()=>(te.current=!0,()=>{te.current=!1}),[]),Xu(()=>{if(O&&(D.current=O),P&&(U.current=P),O&&P){if(F.current)return F.current(O,P,ce);ce()}},[O,P,ce,F,J]);const Q=w.useMemo(()=>({reference:D,floating:U,setReference:M,setFloating:R}),[M,R]),j=w.useMemo(()=>({reference:O,floating:P}),[O,P]),V=w.useMemo(()=>{const Z={position:r,left:0,top:0};if(!j.floating)return Z;const ie=w0(j.floating,g.x),T=w0(j.floating,g.y);return f?{...Z,transform:"translate("+ie+"px, "+T+"px)",...iw(j.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ie,top:T}},[r,f,j.floating,g.x,g.y]);return w.useMemo(()=>({...g,update:ce,refs:Q,elements:j,floatingStyles:V}),[g,ce,Q,j,V])}const AM=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:a,padding:s}=typeof e=="function"?e(r):e;return a&&t(a)?a.current!=null?E0({element:a.current,padding:s}).fn(r):{}:a?E0({element:a,padding:s}).fn(r):{}}}},RM=(e,t)=>{const r=xM(e);return{name:r.name,fn:r.fn,options:[e,t]}},MM=(e,t)=>{const r=vM(e);return{name:r.name,fn:r.fn,options:[e,t]}},OM=(e,t)=>({fn:_M(e).fn,options:[e,t]}),DM=(e,t)=>{const r=EM(e);return{name:r.name,fn:r.fn,options:[e,t]}},jM=(e,t)=>{const r=wM(e);return{name:r.name,fn:r.fn,options:[e,t]}},LM=(e,t)=>{const r=SM(e);return{name:r.name,fn:r.fn,options:[e,t]}},IM=(e,t)=>{const r=AM(e);return{name:r.name,fn:r.fn,options:[e,t]}};var zM="Arrow",aw=w.forwardRef((e,t)=>{const{children:r,width:a=10,height:s=5,...l}=e;return d.jsx(Tt.svg,{...l,ref:t,width:a,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});aw.displayName=zM;var BM=aw;function ow(e){const[t,r]=w.useState(void 0);return Zr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let c,f;if("borderBoxSize"in l){const m=l.borderBoxSize,p=Array.isArray(m)?m[0]:m;c=p.inlineSize,f=p.blockSize}else c=e.offsetWidth,f=e.offsetHeight;r({width:c,height:f})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else r(void 0)},[e]),t}var Jh="Popper",[sw,Rd]=ni(Jh),[PM,lw]=sw(Jh),cw=e=>{const{__scopePopper:t,children:r}=e,[a,s]=w.useState(null),[l,c]=w.useState(void 0);return d.jsx(PM,{scope:t,anchor:a,onAnchorChange:s,placementState:l,setPlacementState:c,children:r})};cw.displayName=Jh;var uw="PopperAnchor",dw=w.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:a,...s}=e,l=lw(uw,r),c=w.useRef(null),f=l.onAnchorChange,m=w.useCallback(E=>{c.current=E,E&&f(E)},[f]),p=Ft(t,m),g=w.useRef(null);w.useEffect(()=>{if(!a)return;const E=g.current;g.current=a.current,E!==g.current&&f(g.current)});const h=l.placementState&&tg(l.placementState),x=h?.[0],v=h?.[1];return a?null:d.jsx(Tt.div,{"data-radix-popper-side":x,"data-radix-popper-align":v,...s,ref:p})});dw.displayName=uw;var eg="PopperContent",[UM,FM]=sw(eg),fw=w.forwardRef((e,t)=>{const{__scopePopper:r,side:a="bottom",sideOffset:s=0,align:l="center",alignOffset:c=0,arrowPadding:f=0,avoidCollisions:m=!0,collisionBoundary:p,collisionPadding:g=0,sticky:h="partial",hideWhenDetached:x=!1,updatePositionStrategy:v="optimized",onPlaced:E,...S}=e,N=lw(eg,r),[k,M]=w.useState(null),R=Ft(t,Ee=>M(Ee)),[O,P]=w.useState(null),D=ow(O),U=D?.width??0,B=D?.height??0,J=a+(l!=="center"?"-"+l:""),F=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},ae=p?Array.isArray(p)?p:[p]:void 0,ee=ae!==void 0&&ae.length>0,ce={padding:F,boundary:ae?.filter($M),altBoundary:ee},{refs:te,floatingStyles:Q,placement:j,isPositioned:V,middlewareData:Z}=TM({strategy:"fixed",placement:J,whileElementsMounted:(...Ee)=>yM(...Ee,{animationFrame:v==="always"}),elements:{reference:N.anchor},middleware:[RM({mainAxis:s+B,alignmentAxis:c}),m&&MM({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?OM():void 0,...ce}),m&&DM({...ce}),jM({...ce,apply:({elements:Ee,rects:Ce,availableWidth:dt,availableHeight:St})=>{const{width:Lt,height:ln}=Ce.reference,gt=Ee.floating.style;gt.setProperty("--radix-popper-available-width",`${dt}px`),gt.setProperty("--radix-popper-available-height",`${St}px`),gt.setProperty("--radix-popper-anchor-width",`${Lt}px`),gt.setProperty("--radix-popper-anchor-height",`${ln}px`)}}),O&&IM({element:O,padding:f}),qM({arrowWidth:U,arrowHeight:B}),x&&LM({strategy:"referenceHidden",...ce})]}),ie=N.setPlacementState;Zr(()=>(ie(j),()=>{ie(void 0)}),[j,ie]);const[T,I]=tg(j),q=Ri(E);Zr(()=>{V&&q?.()},[V,q]);const A=Z.arrow?.x,$=Z.arrow?.y,ue=Z.arrow?.centerOffset!==0,[de,Se]=w.useState();return Zr(()=>{k&&Se(window.getComputedStyle(k).zIndex)},[k]),d.jsx("div",{ref:te.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:V?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[Z.transformOrigin?.x,Z.transformOrigin?.y].join(" "),...Z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(UM,{scope:r,placedSide:T,placedAlign:I,onArrowChange:P,arrowX:A,arrowY:$,shouldHideArrow:ue,children:d.jsx(Tt.div,{"data-side":T,"data-align":I,...S,ref:R,style:{...S.style,animation:V?void 0:"none"}})})})});fw.displayName=eg;var pw="PopperArrow",HM={top:"bottom",right:"left",bottom:"top",left:"right"},mw=w.forwardRef(function(t,r){const{__scopePopper:a,...s}=t,l=FM(pw,a),c=HM[l.placedSide];return d.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:d.jsx(BM,{...s,ref:r,style:{...s.style,display:"block"}})})});mw.displayName=pw;function $M(e){return e!==null}var qM=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:a,middlewareData:s}=t,c=s.arrow?.centerOffset!==0,f=c?0:e.arrowWidth,m=c?0:e.arrowHeight,[p,g]=tg(r),h={start:"0%",center:"50%",end:"100%"}[g],x=(s.arrow?.x??0)+f/2,v=(s.arrow?.y??0)+m/2;let E="",S="";return p==="bottom"?(E=c?h:`${x}px`,S=`${-m}px`):p==="top"?(E=c?h:`${x}px`,S=`${a.floating.height+m}px`):p==="right"?(E=`${-m}px`,S=c?h:`${v}px`):p==="left"&&(E=`${a.floating.width+m}px`,S=c?h:`${v}px`),{data:{x:E,y:S}}}});function tg(e){const[t,r="center"]=e.split("-");return[t,r]}var hw=cw,gw=dw,bw=fw,yw=mw,GM="Portal",Md=w.forwardRef((e,t)=>{const{container:r,...a}=e,[s,l]=w.useState(!1);Zr(()=>l(!0),[]);const c=r||s&&globalThis?.document?.body;return c?_d.createPortal(d.jsx(Tt.div,{...a,ref:t}),c):null});Md.displayName=GM;function KM(e,t){return w.useReducer((r,a)=>t[r][a]??r,e)}var Ir=e=>{const{present:t,children:r}=e,a=QM(t),s=typeof r=="function"?r({present:a.isPresent}):w.Children.only(r),l=VM(a.ref,YM(s));return typeof r=="function"||a.isPresent?w.cloneElement(s,{ref:l}):null};Ir.displayName="Presence";function QM(e){const[t,r]=w.useState(),a=w.useRef(null),s=w.useRef(e),l=w.useRef("none"),c=e?"mounted":"unmounted",[f,m]=KM(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const p=Cu(a.current);l.current=f==="mounted"?p:"none"},[f]),Zr(()=>{const p=a.current,g=s.current;if(g!==e){const x=l.current,v=Cu(p);e?m("MOUNT"):v==="none"||p?.display==="none"?m("UNMOUNT"):m(g&&x!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,m]),Zr(()=>{if(t){let p;const g=t.ownerDocument.defaultView??window,h=v=>{const S=Cu(a.current).includes(CSS.escape(v.animationName));if(v.target===t&&S&&(m("ANIMATION_END"),!s.current)){const N=t.style.animationFillMode;t.style.animationFillMode="forwards",p=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=N)})}},x=v=>{v.target===t&&(l.current=Cu(a.current))};return t.addEventListener("animationstart",x),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{g.clearTimeout(p),t.removeEventListener("animationstart",x),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else m("ANIMATION_END")},[t,m]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:w.useCallback(p=>{a.current=p?getComputedStyle(p):null,r(p)},[])}}function S0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function VM(...e){const t=w.useRef(e);return t.current=e,w.useCallback(r=>{const a=t.current;let s=!1;const l=a.map(c=>{const f=S0(c,r);return!s&&typeof f=="function"&&(s=!0),f});if(s)return()=>{for(let c=0;c<l.length;c++){const f=l[c];typeof f=="function"?f():S0(a[c],null)}}},[])}function Cu(e){return e?.animationName||"none"}function YM(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var XM=Mh[" useInsertionEffect ".trim().toString()]||Zr;function gs({prop:e,defaultProp:t,onChange:r=()=>{},caller:a}){const[s,l,c]=ZM({defaultProp:t,onChange:r}),f=e!==void 0,m=f?e:s;{const g=w.useRef(e!==void 0);w.useEffect(()=>{const h=g.current;h!==f&&console.warn(`${a} is changing from ${h?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=f},[f,a])}const p=w.useCallback(g=>{if(f){const h=WM(g)?g(e):g;h!==e&&c.current?.(h)}else l(g)},[f,e,l,c]);return[m,p]}function ZM({defaultProp:e,onChange:t}){const[r,a]=w.useState(e),s=w.useRef(r),l=w.useRef(t);return XM(()=>{l.current=t},[t]),w.useEffect(()=>{s.current!==r&&(l.current?.(r),s.current=r)},[r,s]),[r,a,l]}function WM(e){return typeof e=="function"}var JM=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),eO="VisuallyHidden",xw=w.forwardRef((e,t)=>d.jsx(Tt.span,{...e,ref:t,style:{...JM,...e.style}}));xw.displayName=eO;var tO=xw,[Od]=ni("Tooltip",[Rd]),Dd=Rd(),vw="TooltipProvider",nO=700,rh="tooltip.open",[rO,ng]=Od(vw),Ew=e=>{const{__scopeTooltip:t,delayDuration:r=nO,skipDelayDuration:a=300,disableHoverableContent:s=!1,children:l}=e,c=w.useRef(!0),f=w.useRef(!1),m=w.useRef(0);return w.useEffect(()=>{const p=m.current;return()=>window.clearTimeout(p)},[]),d.jsx(rO,{scope:t,isOpenDelayedRef:c,delayDuration:r,onOpen:w.useCallback(()=>{a<=0||(window.clearTimeout(m.current),c.current=!1)},[a]),onClose:w.useCallback(()=>{a<=0||(window.clearTimeout(m.current),m.current=window.setTimeout(()=>c.current=!0,a))},[a]),isPointerInTransitRef:f,onPointerInTransitChange:w.useCallback(p=>{f.current=p},[]),disableHoverableContent:s,children:l})};Ew.displayName=vw;var Il="Tooltip",[iO,Yl]=Od(Il),ww=e=>{const{__scopeTooltip:t,children:r,open:a,defaultOpen:s,onOpenChange:l,disableHoverableContent:c,delayDuration:f}=e,m=ng(Il,e.__scopeTooltip),p=Dd(t),[g,h]=w.useState(null),x=ya(),v=w.useRef(0),E=c??m.disableHoverableContent,S=f??m.delayDuration,N=w.useRef(!1),[k,M]=gs({prop:a,defaultProp:s??!1,onChange:U=>{U?(m.onOpen(),document.dispatchEvent(new CustomEvent(rh))):m.onClose(),l?.(U)},caller:Il}),R=w.useMemo(()=>k?N.current?"delayed-open":"instant-open":"closed",[k]),O=w.useCallback(()=>{window.clearTimeout(v.current),v.current=0,N.current=!1,M(!0)},[M]),P=w.useCallback(()=>{window.clearTimeout(v.current),v.current=0,M(!1)},[M]),D=w.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{N.current=!0,M(!0),v.current=0},S)},[S,M]);return w.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),d.jsx(hw,{...p,children:d.jsx(iO,{scope:t,contentId:x,open:k,stateAttribute:R,trigger:g,onTriggerChange:h,onTriggerEnter:w.useCallback(()=>{m.isOpenDelayedRef.current?D():O()},[m.isOpenDelayedRef,D,O]),onTriggerLeave:w.useCallback(()=>{E?P():(window.clearTimeout(v.current),v.current=0)},[P,E]),onOpen:O,onClose:P,disableHoverableContent:E,children:r})})};ww.displayName=Il;var ih="TooltipTrigger",Sw=w.forwardRef((e,t)=>{const{__scopeTooltip:r,...a}=e,s=Yl(ih,r),l=ng(ih,r),c=Dd(r),f=w.useRef(null),m=Ft(t,f,s.onTriggerChange),p=w.useRef(!1),g=w.useRef(!1),h=w.useCallback(()=>p.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),d.jsx(gw,{asChild:!0,...c,children:d.jsx(Tt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...a,ref:m,onPointerMove:He(e.onPointerMove,x=>{x.pointerType!=="touch"&&!g.current&&!l.isPointerInTransitRef.current&&(s.onTriggerEnter(),g.current=!0)}),onPointerLeave:He(e.onPointerLeave,()=>{s.onTriggerLeave(),g.current=!1}),onPointerDown:He(e.onPointerDown,()=>{s.open&&s.onClose(),p.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:He(e.onFocus,()=>{p.current||s.onOpen()}),onBlur:He(e.onBlur,s.onClose),onClick:He(e.onClick,s.onClose)})})});Sw.displayName=ih;var rg="TooltipPortal",[aO,oO]=Od(rg,{forceMount:void 0}),_w=e=>{const{__scopeTooltip:t,forceMount:r,children:a,container:s}=e,l=Yl(rg,t);return d.jsx(aO,{scope:t,forceMount:r,children:d.jsx(Ir,{present:r||l.open,children:d.jsx(Md,{asChild:!0,container:s,children:a})})})};_w.displayName=rg;var os="TooltipContent",kw=w.forwardRef((e,t)=>{const r=oO(os,e.__scopeTooltip),{forceMount:a=r.forceMount,side:s="top",...l}=e,c=Yl(os,e.__scopeTooltip);return d.jsx(Ir,{present:a||c.open,children:c.disableHoverableContent?d.jsx(Nw,{side:s,...l,ref:t}):d.jsx(sO,{side:s,...l,ref:t})})}),sO=w.forwardRef((e,t)=>{const r=Yl(os,e.__scopeTooltip),a=ng(os,e.__scopeTooltip),s=w.useRef(null),l=Ft(t,s),[c,f]=w.useState(null),{trigger:m,onClose:p}=r,g=s.current,{onPointerInTransitChange:h}=a,x=w.useCallback(()=>{f(null),h(!1)},[h]),v=w.useCallback((E,S)=>{const N=E.currentTarget,k={x:E.clientX,y:E.clientY},M=fO(k,N.getBoundingClientRect()),R=pO(k,M),O=mO(S.getBoundingClientRect()),P=gO([...R,...O]);f(P),h(!0)},[h]);return w.useEffect(()=>()=>x(),[x]),w.useEffect(()=>{if(m&&g){const E=N=>v(N,g),S=N=>v(N,m);return m.addEventListener("pointerleave",E),g.addEventListener("pointerleave",S),()=>{m.removeEventListener("pointerleave",E),g.removeEventListener("pointerleave",S)}}},[m,g,v,x]),w.useEffect(()=>{if(c){const E=S=>{const N=S.target,k={x:S.clientX,y:S.clientY},M=m?.contains(N)||g?.contains(N),R=!hO(k,c);M?x():R&&(x(),p())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[m,g,c,p,x]),d.jsx(Nw,{...e,ref:l})}),[lO,cO]=Od(Il,{isInside:!1}),uO=qE("TooltipContent"),Nw=w.forwardRef((e,t)=>{const{__scopeTooltip:r,children:a,"aria-label":s,onEscapeKeyDown:l,onPointerDownOutside:c,...f}=e,m=Yl(os,r),p=Dd(r),{onClose:g}=m;return w.useEffect(()=>(document.addEventListener(rh,g),()=>document.removeEventListener(rh,g)),[g]),w.useEffect(()=>{if(m.trigger){const h=x=>{x.target instanceof Node&&x.target.contains(m.trigger)&&g()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[m.trigger,g]),d.jsx(kd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:h=>h.preventDefault(),onDismiss:g,children:d.jsxs(bw,{"data-state":m.stateAttribute,...p,...f,ref:t,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(uO,{children:a}),d.jsx(lO,{scope:r,isInside:!0,children:d.jsx(tO,{id:m.contentId,role:"tooltip",children:s||a})})]})})});kw.displayName=os;var Cw="TooltipArrow",dO=w.forwardRef((e,t)=>{const{__scopeTooltip:r,...a}=e,s=Dd(r);return cO(Cw,r).isInside?null:d.jsx(yw,{...s,...a,ref:t})});dO.displayName=Cw;function fO(e,t){const r=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(r,a,s,l)){case l:return"left";case s:return"right";case r:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function pO(e,t,r=5){const a=[];switch(t){case"top":a.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":a.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":a.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":a.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return a}function mO(e){const{top:t,right:r,bottom:a,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:a},{x:s,y:a}]}function hO(e,t){const{x:r,y:a}=e;let s=!1;for(let l=0,c=t.length-1;l<t.length;c=l++){const f=t[l],m=t[c],p=f.x,g=f.y,h=m.x,x=m.y;g>a!=x>a&&r<(h-p)*(a-g)/(x-g)+p&&(s=!s)}return s}function gO(e){const t=e.slice();return t.sort((r,a)=>r.x<a.x?-1:r.x>a.x?1:r.y<a.y?-1:r.y>a.y?1:0),bO(t)}function bO(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const s=e[a];for(;t.length>=2;){const l=t[t.length-1],c=t[t.length-2];if((l.x-c.x)*(s.y-c.y)>=(l.y-c.y)*(s.x-c.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let a=e.length-1;a>=0;a--){const s=e[a];for(;r.length>=2;){const l=r[r.length-1],c=r[r.length-2];if((l.x-c.x)*(s.y-c.y)>=(l.y-c.y)*(s.x-c.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var yO=Ew,xO=ww,vO=Sw,EO=_w,wO=kw;function Tw(e){var t,r,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Tw(e[t]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function Aw(){for(var e,t,r=0,a="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Tw(e))&&(a&&(a+=" "),a+=t);return a}const SO=(e,t)=>{const r=new Array(e.length+t.length);for(let a=0;a<e.length;a++)r[a]=e[a];for(let a=0;a<t.length;a++)r[e.length+a]=t[a];return r},_O=(e,t)=>({classGroupId:e,validator:t}),Rw=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),cd="-",_0=[],kO="arbitrary..",NO=e=>{const t=TO(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return CO(c);const f=c.split(cd),m=f[0]===""&&f.length>1?1:0;return Mw(f,m,t)},getConflictingClassGroupIds:(c,f)=>{if(f){const m=a[c],p=r[c];return m?p?SO(p,m):m:p||_0}return r[c]||_0}}},Mw=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const s=e[t],l=r.nextPart.get(s);if(l){const p=Mw(e,t+1,l);if(p)return p}const c=r.validators;if(c===null)return;const f=t===0?e.join(cd):e.slice(t).join(cd),m=c.length;for(let p=0;p<m;p++){const g=c[p];if(g.validator(f))return g.classGroupId}},CO=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),a=t.slice(0,r);return a?kO+a:void 0})(),TO=e=>{const{theme:t,classGroups:r}=e;return AO(r,t)},AO=(e,t)=>{const r=Rw();for(const a in e){const s=e[a];ig(s,r,a,t)}return r},ig=(e,t,r,a)=>{const s=e.length;for(let l=0;l<s;l++){const c=e[l];RO(c,t,r,a)}},RO=(e,t,r,a)=>{if(typeof e=="string"){MO(e,t,r);return}if(typeof e=="function"){OO(e,t,r,a);return}DO(e,t,r,a)},MO=(e,t,r)=>{const a=e===""?t:Ow(t,e);a.classGroupId=r},OO=(e,t,r,a)=>{if(jO(e)){ig(e(a),t,r,a);return}t.validators===null&&(t.validators=[]),t.validators.push(_O(r,e))},DO=(e,t,r,a)=>{const s=Object.entries(e),l=s.length;for(let c=0;c<l;c++){const[f,m]=s[c];ig(m,Ow(t,f),r,a)}},Ow=(e,t)=>{let r=e;const a=t.split(cd),s=a.length;for(let l=0;l<s;l++){const c=a[l];let f=r.nextPart.get(c);f||(f=Rw(),r.nextPart.set(c,f)),r=f}return r},jO=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,LO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),a=Object.create(null);const s=(l,c)=>{r[l]=c,t++,t>e&&(t=0,a=r,r=Object.create(null))};return{get(l){let c=r[l];if(c!==void 0)return c;if((c=a[l])!==void 0)return s(l,c),c},set(l,c){l in r?r[l]=c:s(l,c)}}},ah="!",k0=":",IO=[],N0=(e,t,r,a,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:a,isExternal:s}),zO=e=>{const{prefix:t,experimentalParseClassName:r}=e;let a=s=>{const l=[];let c=0,f=0,m=0,p;const g=s.length;for(let S=0;S<g;S++){const N=s[S];if(c===0&&f===0){if(N===k0){l.push(s.slice(m,S)),m=S+1;continue}if(N==="/"){p=S;continue}}N==="["?c++:N==="]"?c--:N==="("?f++:N===")"&&f--}const h=l.length===0?s:s.slice(m);let x=h,v=!1;h.endsWith(ah)?(x=h.slice(0,-1),v=!0):h.startsWith(ah)&&(x=h.slice(1),v=!0);const E=p&&p>m?p-m:void 0;return N0(l,v,x,E)};if(t){const s=t+k0,l=a;a=c=>c.startsWith(s)?l(c.slice(s.length)):N0(IO,!1,c,void 0,!0)}if(r){const s=a;a=l=>r({className:l,parseClassName:s})}return a},BO=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,a)=>{t.set(r,1e6+a)}),r=>{const a=[];let s=[];for(let l=0;l<r.length;l++){const c=r[l],f=c[0]==="[",m=t.has(c);f||m?(s.length>0&&(s.sort(),a.push(...s),s=[]),a.push(c)):s.push(c)}return s.length>0&&(s.sort(),a.push(...s)),a}},PO=e=>({cache:LO(e.cacheSize),parseClassName:zO(e),sortModifiers:BO(e),postfixLookupClassGroupIds:UO(e),...NO(e)}),UO=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let a=0;a<r.length;a++)t[r[a]]=!0;return t},FO=/\s+/,HO=(e,t)=>{const{parseClassName:r,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:l,postfixLookupClassGroupIds:c}=t,f=[],m=e.trim().split(FO);let p="";for(let g=m.length-1;g>=0;g-=1){const h=m[g],{isExternal:x,modifiers:v,hasImportantModifier:E,baseClassName:S,maybePostfixModifierPosition:N}=r(h);if(x){p=h+(p.length>0?" "+p:p);continue}let k=!!N,M;if(k){const U=S.substring(0,N);M=a(U);const B=M&&c[M]?a(S):void 0;B&&B!==M&&(M=B,k=!1)}else M=a(S);if(!M){if(!k){p=h+(p.length>0?" "+p:p);continue}if(M=a(S),!M){p=h+(p.length>0?" "+p:p);continue}k=!1}const R=v.length===0?"":v.length===1?v[0]:l(v).join(":"),O=E?R+ah:R,P=O+M;if(f.indexOf(P)>-1)continue;f.push(P);const D=s(M,k);for(let U=0;U<D.length;++U){const B=D[U];f.push(O+B)}p=h+(p.length>0?" "+p:p)}return p},$O=(...e)=>{let t=0,r,a,s="";for(;t<e.length;)(r=e[t++])&&(a=Dw(r))&&(s&&(s+=" "),s+=a);return s},Dw=e=>{if(typeof e=="string")return e;let t,r="";for(let a=0;a<e.length;a++)e[a]&&(t=Dw(e[a]))&&(r&&(r+=" "),r+=t);return r},qO=(e,...t)=>{let r,a,s,l;const c=m=>{const p=t.reduce((g,h)=>h(g),e());return r=PO(p),a=r.cache.get,s=r.cache.set,l=f,f(m)},f=m=>{const p=a(m);if(p)return p;const g=HO(m,r);return s(m,g),g};return l=c,(...m)=>l($O(...m))},GO=[],mn=e=>{const t=r=>r[e]||GO;return t.isThemeGetter=!0,t},jw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Lw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,KO=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,QO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,VO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,YO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,XO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pa=e=>KO.test(e),et=e=>!!e&&!Number.isNaN(Number(e)),Gr=e=>!!e&&Number.isInteger(Number(e)),pm=e=>e.endsWith("%")&&et(e.slice(0,-1)),Ni=e=>QO.test(e),Iw=()=>!0,WO=e=>VO.test(e)&&!YO.test(e),ag=()=>!1,JO=e=>XO.test(e),eD=e=>ZO.test(e),tD=e=>!_e(e)&&!ke(e),nD=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),rD=e=>Ea(e,Pw,ag),_e=e=>jw.test(e),qa=e=>Ea(e,Uw,WO),C0=e=>Ea(e,dD,et),iD=e=>Ea(e,Hw,Iw),aD=e=>Ea(e,Fw,ag),T0=e=>Ea(e,zw,ag),oD=e=>Ea(e,Bw,eD),Tu=e=>Ea(e,$w,JO),ke=e=>Lw.test(e),xl=e=>no(e,Uw),sD=e=>no(e,Fw),A0=e=>no(e,zw),lD=e=>no(e,Pw),cD=e=>no(e,Bw),Au=e=>no(e,$w,!0),uD=e=>no(e,Hw,!0),Ea=(e,t,r)=>{const a=jw.exec(e);return a?a[1]?t(a[1]):r(a[2]):!1},no=(e,t,r=!1)=>{const a=Lw.exec(e);return a?a[1]?t(a[1]):r:!1},zw=e=>e==="position"||e==="percentage",Bw=e=>e==="image"||e==="url",Pw=e=>e==="length"||e==="size"||e==="bg-size",Uw=e=>e==="length",dD=e=>e==="number",Fw=e=>e==="family-name",Hw=e=>e==="number"||e==="weight",$w=e=>e==="shadow",fD=()=>{const e=mn("color"),t=mn("font"),r=mn("text"),a=mn("font-weight"),s=mn("tracking"),l=mn("leading"),c=mn("breakpoint"),f=mn("container"),m=mn("spacing"),p=mn("radius"),g=mn("shadow"),h=mn("inset-shadow"),x=mn("text-shadow"),v=mn("drop-shadow"),E=mn("blur"),S=mn("perspective"),N=mn("aspect"),k=mn("ease"),M=mn("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...O(),ke,_e],D=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],B=()=>[ke,_e,m],J=()=>[pa,"full","auto",...B()],F=()=>[Gr,"none","subgrid",ke,_e],ae=()=>["auto",{span:["full",Gr,ke,_e]},Gr,ke,_e],ee=()=>[Gr,"auto",ke,_e],ce=()=>["auto","min","max","fr",ke,_e],te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...B()],V=()=>[pa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],Z=()=>[pa,"screen","full","dvw","lvw","svw","min","max","fit",...B()],ie=()=>[pa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...B()],T=()=>[e,ke,_e],I=()=>[...O(),A0,T0,{position:[ke,_e]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",lD,rD,{size:[ke,_e]}],$=()=>[pm,xl,qa],ue=()=>["","none","full",p,ke,_e],de=()=>["",et,xl,qa],Se=()=>["solid","dashed","dotted","double"],Ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ce=()=>[et,pm,A0,T0],dt=()=>["","none",E,ke,_e],St=()=>["none",et,ke,_e],Lt=()=>["none",et,ke,_e],ln=()=>[et,ke,_e],gt=()=>[pa,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ni],breakpoint:[Ni],color:[Iw],container:[Ni],"drop-shadow":[Ni],ease:["in","out","in-out"],font:[tD],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ni],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ni],shadow:[Ni],spacing:["px",et],text:[Ni],"text-shadow":[Ni],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",pa,_e,ke,N]}],container:["container"],"container-type":[{"@container":["","normal","size",ke,_e]}],"container-named":[nD],columns:[{columns:[et,_e,ke,f]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:P()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:J()}],"inset-x":[{"inset-x":J()}],"inset-y":[{"inset-y":J()}],start:[{"inset-s":J(),start:J()}],end:[{"inset-e":J(),end:J()}],"inset-bs":[{"inset-bs":J()}],"inset-be":[{"inset-be":J()}],top:[{top:J()}],right:[{right:J()}],bottom:[{bottom:J()}],left:[{left:J()}],visibility:["visible","invisible","collapse"],z:[{z:[Gr,"auto",ke,_e]}],basis:[{basis:[pa,"full","auto",f,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[et,pa,"auto","initial","none",_e]}],grow:[{grow:["",et,ke,_e]}],shrink:[{shrink:["",et,ke,_e]}],order:[{order:[Gr,"first","last","none",ke,_e]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:ae()}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:ae()}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ce()}],"auto-rows":[{"auto-rows":ce()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pbs:[{pbs:B()}],pbe:[{pbe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...ie()]}],"min-block-size":[{"min-block":["auto",...ie()]}],"max-block-size":[{"max-block":["none",...ie()]}],w:[{w:[f,"screen",...V()]}],"min-w":[{"min-w":[f,"screen","none",...V()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",r,xl,qa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,uD,iD]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pm,_e]}],"font-family":[{font:[sD,aD,t]}],"font-features":[{"font-features":[_e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,ke,_e]}],"line-clamp":[{"line-clamp":[et,"none",ke,C0]}],leading:[{leading:[l,...B()]}],"list-image":[{"list-image":["none",ke,_e]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ke,_e]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:[et,"from-font","auto",ke,qa]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[et,"auto",ke,_e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"tab-size":[{tab:[Gr,ke,_e]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke,_e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke,_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Gr,ke,_e],radial:["",ke,_e],conic:[Gr,ke,_e]},cD,oD]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Se(),"hidden","none"]}],"divide-style":[{divide:[...Se(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...Se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[et,ke,_e]}],"outline-w":[{outline:["",et,xl,qa]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",g,Au,Tu]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",h,Au,Tu]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[et,qa]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",x,Au,Tu]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[et,ke,_e]}],"mix-blend":[{"mix-blend":[...Ee(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ee()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[et]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ce()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":Ce()}],"mask-image-t-to-pos":[{"mask-t-to":Ce()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":Ce()}],"mask-image-r-to-pos":[{"mask-r-to":Ce()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":Ce()}],"mask-image-b-to-pos":[{"mask-b-to":Ce()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":Ce()}],"mask-image-l-to-pos":[{"mask-l-to":Ce()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":Ce()}],"mask-image-x-to-pos":[{"mask-x-to":Ce()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":Ce()}],"mask-image-y-to-pos":[{"mask-y-to":Ce()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[ke,_e]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ce()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[et]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ce()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ke,_e]}],filter:[{filter:["","none",ke,_e]}],blur:[{blur:dt()}],brightness:[{brightness:[et,ke,_e]}],contrast:[{contrast:[et,ke,_e]}],"drop-shadow":[{"drop-shadow":["","none",v,Au,Tu]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",et,ke,_e]}],"hue-rotate":[{"hue-rotate":[et,ke,_e]}],invert:[{invert:["",et,ke,_e]}],saturate:[{saturate:[et,ke,_e]}],sepia:[{sepia:["",et,ke,_e]}],"backdrop-filter":[{"backdrop-filter":["","none",ke,_e]}],"backdrop-blur":[{"backdrop-blur":dt()}],"backdrop-brightness":[{"backdrop-brightness":[et,ke,_e]}],"backdrop-contrast":[{"backdrop-contrast":[et,ke,_e]}],"backdrop-grayscale":[{"backdrop-grayscale":["",et,ke,_e]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[et,ke,_e]}],"backdrop-invert":[{"backdrop-invert":["",et,ke,_e]}],"backdrop-opacity":[{"backdrop-opacity":[et,ke,_e]}],"backdrop-saturate":[{"backdrop-saturate":[et,ke,_e]}],"backdrop-sepia":[{"backdrop-sepia":["",et,ke,_e]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ke,_e]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[et,"initial",ke,_e]}],ease:[{ease:["linear","initial",k,ke,_e]}],delay:[{delay:[et,ke,_e]}],animate:[{animate:["none",M,ke,_e]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,ke,_e]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:St()}],"rotate-x":[{"rotate-x":St()}],"rotate-y":[{"rotate-y":St()}],"rotate-z":[{"rotate-z":St()}],scale:[{scale:Lt()}],"scale-x":[{"scale-x":Lt()}],"scale-y":[{"scale-y":Lt()}],"scale-z":[{"scale-z":Lt()}],"scale-3d":["scale-3d"],skew:[{skew:ln()}],"skew-x":[{"skew-x":ln()}],"skew-y":[{"skew-y":ln()}],transform:[{transform:[ke,_e,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:gt()}],"translate-x":[{"translate-x":gt()}],"translate-y":[{"translate-y":gt()}],"translate-z":[{"translate-z":gt()}],"translate-none":["translate-none"],zoom:[{zoom:[Gr,ke,_e]}],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ke,_e]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":T()}],"scrollbar-track-color":[{"scrollbar-track":T()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mbs":[{"scroll-mbs":B()}],"scroll-mbe":[{"scroll-mbe":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pbs":[{"scroll-pbs":B()}],"scroll-pbe":[{"scroll-pbe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke,_e]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[et,xl,qa,C0]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},pD=qO(fD);function ht(...e){return pD(Aw(e))}function qw(e,t=48){if(e.length<=t)return e;const r=Math.floor((t-1)/2);return`${e.slice(0,r)}…${e.slice(e.length-r)}`}const mD=yO,oh=xO,sh=vO,ud=w.forwardRef(({className:e,sideOffset:t=6,...r},a)=>d.jsx(EO,{children:d.jsx(wO,{ref:a,sideOffset:t,className:ht("z-50 max-w-xs rounded-md border border-border bg-panel px-2.5 py-1.5","text-[12px] text-ink shadow-[var(--shadow-1)]",e),...r})}));ud.displayName="TooltipContent";function hD({label:e,children:t,side:r="right"}){return d.jsxs(oh,{children:[d.jsx(sh,{asChild:!0,children:t}),d.jsx(ud,{side:r,children:e})]})}const Gw=(...e)=>e.filter((t,r,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===r).join(" ").trim();const gD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const bD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,a)=>a?a.toUpperCase():r.toLowerCase());const R0=e=>{const t=bD(e);return t.charAt(0).toUpperCase()+t.slice(1)};var mm={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const yD=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},xD=w.createContext({}),vD=()=>w.useContext(xD),ED=w.forwardRef(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:a,className:s="",children:l,iconNode:c,...f},m)=>{const{size:p=24,strokeWidth:g=2,absoluteStrokeWidth:h=!1,color:x="currentColor",className:v=""}=vD()??{},E=a??h?Number(r??g)*24/Number(t??p):r??g;return w.createElement("svg",{ref:m,...mm,width:t??p??mm.width,height:t??p??mm.height,stroke:e??x,strokeWidth:E,className:Gw("lucide",v,s),...!l&&!yD(f)&&{"aria-hidden":"true"},...f},[...c.map(([S,N])=>w.createElement(S,N)),...Array.isArray(l)?l:[l]])});const Le=(e,t)=>{const r=w.forwardRef(({className:a,...s},l)=>w.createElement(ED,{ref:l,iconNode:t,className:Gw(`lucide-${gD(R0(e))}`,`lucide-${e}`,a),...s}));return r.displayName=R0(e),r};const wD=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],SD=Le("arrow-down",wD);const _D=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],kD=Le("arrow-up",_D);const ND=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],Kw=Le("boxes",ND);const CD=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],TD=Le("brain",CD);const AD=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Jr=Le("check",AD);const RD=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ss=Le("chevron-down",RD);const MD=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],OD=Le("chevron-left",MD);const DD=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],og=Le("chevron-right",DD);const jD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],LD=Le("circle-check",jD);const ID=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],zD=Le("circle-question-mark",ID);const BD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],sg=Le("circle-slash",BD);const PD=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]],lh=Le("clipboard-copy",PD);const UD=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],FD=Le("code-xml",UD);const HD=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],jd=Le("copy",HD);const $D=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],lg=Le("cpu",$D);const qD=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],bs=Le("download",qD);const GD=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Qw=Le("ellipsis",GD);const KD=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],zl=Le("external-link",KD);const QD=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],VD=Le("file-text",QD);const YD=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],XD=Le("file",YD);const ZD=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],WD=Le("folder-open",ZD);const JD=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],ej=Le("folder-plus",JD);const tj=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],nj=Le("folder",tj);const rj=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],M0=Le("gauge",rj);const ij=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],aj=Le("globe",ij);const oj=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],sj=Le("heart",oj);const lj=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],cj=Le("key-round",lj);const uj=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],dj=Le("key",uj);const fj=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],pj=Le("layers",fj);const mj=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Vw=Le("link-2",mj);const hj=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Rr=Le("loader-circle",hj);const gj=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],cg=Le("lock",gj);const bj=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]],O0=Le("message-square-plus",bj);const yj=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],xj=Le("message-square",yj);const vj=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Ej=Le("monitor",vj);const wj=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Sj=Le("moon",wj);const _j=[["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"M20.27 18.27 22 20",key:"er2am"}],["path",{d:"M21 10.498V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l.98-.559",key:"tok1h1"}],["path",{d:"M3.29 7 12 12l8.71-5",key:"19ckod"}],["path",{d:"m7.5 4.27 8.997 5.148",key:"9yrvtv"}],["circle",{cx:"18.5",cy:"16.5",r:"2.5",key:"ke13xx"}]],kj=Le("package-search",_j);const Nj=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Cj=Le("paperclip",Nj);const Tj=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],ug=Le("pencil",Tj);const Aj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Yw=Le("plus",Aj);const Rj=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Xl=Le("refresh-cw",Rj);const Mj=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Oj=Le("rotate-ccw",Mj);const Dj=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Xw=Le("rotate-cw",Dj);const jj=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Zw=Le("save",jj);const Lj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ch=Le("search",Lj);const Ij=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],zj=Le("send-horizontal",Ij);const Bj=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Ww=Le("settings-2",Bj);const Pj=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Jw=Le("shield-alert",Pj);const Uj=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],eS=Le("sliders-horizontal",Uj);const Fj=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Bl=Le("sparkles",Fj);const Hj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],$j=Le("square",Hj);const qj=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Gj=Le("star",qj);const Kj=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Qj=Le("sun",Kj);const Vj=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Yj=Le("terminal",Vj);const Xj=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Za=Le("trash-2",Xj);const Zj=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Wj=Le("triangle-alert",Zj);const Jj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ei=Le("x",Jj);const eL=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Ld=Le("zap",eL),D0={stopped:"Stopped",starting:"Starting",running:"Running",stopping:"Stopping",error:"Error"},j0={stopped:"var(--muted)",starting:"var(--warn)",running:"var(--ok)",stopping:"var(--warn)",error:"var(--err)"};function uh({state:e,className:t,dotOnly:r=!1}){const a=e==="starting";return r?d.jsx("span",{className:ht("inline-flex h-2 w-2 rounded-full",a&&"tllm-pulse",t),style:{background:j0[e]},"aria-label":D0[e]}):d.jsxs("span",{className:ht("inline-flex items-center gap-1.5 rounded-full border border-border bg-panel-2 px-2 py-0.5 text-[12px] leading-none text-muted",t),children:[d.jsx("span",{className:ht("h-2 w-2 rounded-full",a&&"tllm-pulse"),style:{background:j0[e]}}),D0[e]]})}function tL({className:e}){return d.jsx("svg",{viewBox:"0 0 24 24",className:e,fill:"currentColor","aria-hidden":!0,children:d.jsx("path",{d:"M13.4 2.2 6.4 12.9 10.8 12.9 9.8 21.8 17.4 10.6 12.9 10.6Z"})})}const dh="tllm.authToken";class qe extends Error{code;status;constructor(t,r,a){super(r),this.name="ApiError",this.code=t,this.status=a}}function Id(){const e=localStorage.getItem(dh);return e?{"X-TurboLLM-Auth":e}:{}}function nL(e){const t=e.trim();t?localStorage.setItem(dh,t):localStorage.removeItem(dh)}async function Ue(e,t){const r={Accept:"application/json",...Id(),...t?.headers??{}};let a=t?.body;t&&"json"in t&&t.json!==void 0&&(r["Content-Type"]="application/json",a=JSON.stringify(t.json));const s=await fetch(e,{...t,headers:r,body:a});if(s.status===204)return;const l=await s.text(),c=l?rL(l):void 0;if(!s.ok){const f=c;throw new qe(f?.error?.code??"http_error",f?.error?.message??`Request failed with status ${s.status}.`,s.status)}return c}function rL(e){try{return JSON.parse(e)}catch{return}}function iL(){return Ue("/api/v1/status")}function aL(){return Ue("/api/v1/engines")}function oL(e){return Ue("/api/v1/engines",{method:"POST",json:e})}function sL(){return Ue("/api/v1/engines/backends")}function lL(e){return Ue("/api/v1/engines/backends/install",{method:"POST",json:{backend:e}})}function cL(){return Ue("/api/v1/engines/mlx",{method:"POST",json:{}})}function uL(){return Ue("/api/v1/engines/catalog")}function dL(){return Ue("/api/v1/engines/vllm",{method:"POST",json:{}})}function fL(){return Ue("/api/v1/engines/turboquant",{method:"POST",json:{}})}function pL(){return Ue("/api/v1/engines/backends/cancel",{method:"POST",json:{}})}function mL(e){return Ue(`/api/v1/engines/backends/${encodeURIComponent(e)}`,{method:"DELETE",json:{}})}function hL(e,t){return Ue(`/api/v1/engines/${encodeURIComponent(e)}`,{method:"PUT",json:{name:t}})}function gL(e){return Ue(`/api/v1/engines/${encodeURIComponent(e)}`,{method:"DELETE"})}function bL(e){return Ue(`/api/v1/engines/${encodeURIComponent(e)}/activate`,{method:"POST"})}function yL(e){return Ue(`/api/v1/engines/${encodeURIComponent(e)}/reprobe`,{method:"POST"})}function xL(){return Ue("/api/v1/engine/start",{method:"POST",json:{}})}function tS(){return Ue("/api/v1/engine/stop",{method:"POST",json:{}})}function vL(){return Ue("/api/v1/engine/restart",{method:"POST",json:{}})}function EL(e=200){return Ue(`/api/v1/engine/logs?tail=${e}`)}const wL="/api/v1/engine/logs/stream";function SL(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return Ue(`/api/v1/fs/browse${t}`)}function _L(){return Ue("/api/v1/models")}function kL(){return Ue("/api/v1/models/rescan",{method:"POST",json:{}})}function NL(){return Ue("/api/v1/modeldirs")}function CL(e){return Ue("/api/v1/modeldirs",{method:"POST",json:{dir:e}})}function TL(e){return Ue("/api/v1/modeldirs",{method:"DELETE",json:{dir:e}})}function AL(e){return Ue("/api/v1/modeldirs/primary",{method:"POST",json:{dir:e}})}function RL(e){return Ue(`/api/v1/models/${encodeURIComponent(e)}`,{method:"DELETE"})}function ML(e){return Ue(`/api/v1/models/${encodeURIComponent(e)}`)}function OL(e,t){return Ue(`/api/v1/models/${encodeURIComponent(e)}/profile`,{method:"PUT",json:t})}function DL(e){return Ue(`/api/v1/models/${encodeURIComponent(e)}/profile/reset`,{method:"POST",json:{}})}function jL(e,t){return Ue("/api/v1/engine/start",{method:"POST",json:{modelKey:e,profileOverrides:t}})}function LL(e,t){return Ue("/api/v1/bench",{method:"POST",json:{modelKey:e,base:t}})}function IL(){return Ue("/api/v1/bench/cancel",{method:"POST",json:{}})}function zL(e){return Ue("/api/v1/comfyui/install",{method:"POST",json:{path:e}})}function BL(){return Ue("/api/v1/comfyui/uninstall",{method:"POST",json:{}})}function PL(){return Ue("/api/v1/settings")}function UL(e){return Ue("/api/v1/settings",{method:"PATCH",json:e})}function FL(){return Ue("/api/v1/daemon/restart",{method:"POST",json:{}})}function HL(){return Ue("/api/v1/settings/network")}function $L(){return Ue("/api/v1/keys")}function qL(e){return Ue("/api/v1/keys",{method:"POST",json:{name:e}})}function GL(e){return Ue(`/api/v1/keys/${encodeURIComponent(e)}`,{method:"DELETE"})}function KL(e){return Ue(`/api/v1/connect/${encodeURIComponent(e)}`)}function QL(){return Ue("/api/v1/sysinfo")}function VL(e){return Ue(`/api/v1/hf/search?q=${encodeURIComponent(e)}`)}function YL(e){return Ue(`/api/v1/hf/models/${e}`)}function XL(e){return Ue("/api/v1/hf/token/test",{method:"POST",json:{token:e}})}function ZL(){return Ue("/api/v1/downloads")}function WL(e){return Ue("/api/v1/downloads",{method:"POST",json:e})}function JL(e){return Ue(`/api/v1/downloads/${encodeURIComponent(e)}/cancel`,{method:"POST",json:{}})}function eI(e){return Ue(`/api/v1/downloads/${encodeURIComponent(e)}`,{method:"DELETE"})}const Ot={status:["status"],engines:["engines"],engineBackends:["engine-backends"],engineCatalog:["engine-catalog"],models:["models"],modelDirs:["modeldirs"],downloads:["downloads"]};function zr(){return Nn({queryKey:Ot.status,queryFn:iL,refetchInterval:e=>e.state.data?.bench.running||(e.state.data?.engineStats?.activeRequests??0)>0?1e3:2e3,refetchIntervalInBackground:!1,placeholderData:e=>e,retry:!1})}function tI(){const{data:e}=zr();return e?.bench??null}function nI(){const e=kn(),t=()=>{e.invalidateQueries({queryKey:Ot.status}),e.invalidateQueries({queryKey:Ot.models})};return{start:Xe({mutationFn:r=>LL(r.key,r.base),onSuccess:(r,a)=>{t(),e.invalidateQueries({queryKey:["model",a.key]})}}),cancel:Xe({mutationFn:()=>IL(),onSuccess:t})}}function nS(){return Nn({queryKey:Ot.engines,queryFn:aL,retry:!1})}function dg(e){return Nn({queryKey:Ot.engineBackends,queryFn:sL,refetchInterval:e?2e3:!1,retry:!1})}function rI(e){return Nn({queryKey:Ot.engineCatalog,queryFn:uL,refetchInterval:e?2e3:!1,retry:!1})}function Zl(){const e=kn(),t=()=>{e.invalidateQueries({queryKey:Ot.engineBackends}),e.invalidateQueries({queryKey:Ot.engineCatalog}),e.invalidateQueries({queryKey:Ot.engines}),e.invalidateQueries({queryKey:Ot.status})};return{backend:Xe({mutationFn:r=>lL(r),onSuccess:t}),mlx:Xe({mutationFn:()=>cL(),onSuccess:t}),vllm:Xe({mutationFn:()=>dL(),onSuccess:t}),turboquant:Xe({mutationFn:()=>fL(),onSuccess:t}),cancel:Xe({mutationFn:()=>pL(),onSuccess:t}),remove:Xe({mutationFn:r=>mL(r),onSuccess:t})}}function zd(){const e=kn(),t=()=>{e.invalidateQueries({queryKey:Ot.engines}),e.invalidateQueries({queryKey:Ot.status}),e.invalidateQueries({queryKey:Ot.engineBackends})};return{add:Xe({mutationFn:oL,onSuccess:t}),rename:Xe({mutationFn:r=>hL(r.id,r.name),onSuccess:t}),remove:Xe({mutationFn:r=>gL(r),onSuccess:t}),activate:Xe({mutationFn:r=>bL(r),onSuccess:t}),reprobe:Xe({mutationFn:r=>yL(r),onSuccess:t}),start:Xe({mutationFn:xL,onSuccess:t}),stop:Xe({mutationFn:tS,onSuccess:t}),restart:Xe({mutationFn:vL,onSuccess:t})}}function iI(e,t){return Nn({queryKey:["fs-browse",e],queryFn:()=>SL(e??void 0),enabled:t,retry:!1,placeholderData:r=>r})}function fg(){const e=kn();return Nn({queryKey:Ot.models,queryFn:_L,refetchInterval:t=>t.state.data?.scanning?1200:t.state.data?.models.some(a=>a.loaded)?4e3:e.getQueryData(Ot.status)?.engine.state==="starting"?1e3:!1,refetchIntervalInBackground:!1,placeholderData:t=>t,retry:!1})}function aI(){return Nn({queryKey:Ot.modelDirs,queryFn:NL,retry:!1})}function oI(){const e=kn(),t=()=>{e.invalidateQueries({queryKey:Ot.models}),e.invalidateQueries({queryKey:Ot.modelDirs})};return{rescan:Xe({mutationFn:kL,onSuccess:t}),addDir:Xe({mutationFn:r=>CL(r),onSuccess:t}),removeDir:Xe({mutationFn:r=>TL(r),onSuccess:t}),setPrimaryDir:Xe({mutationFn:r=>AL(r),onSuccess:t})}}function sI(e=!0){return Nn({queryKey:["network"],queryFn:HL,enabled:e,retry:!1})}function rS(){const e=kn(),t=Nn({queryKey:["settings"],queryFn:PL,retry:!1}),r=Xe({mutationFn:a=>UL(a),onSuccess:a=>{e.setQueryData(["settings"],a)}});return{query:t,save:r}}function lI(){const e=kn(),t=()=>{e.invalidateQueries({queryKey:["settings"]}),e.invalidateQueries({queryKey:Ot.status})},r=Xe({mutationFn:s=>zL(s),onSuccess:t}),a=Xe({mutationFn:()=>BL(),onSuccess:t});return{install:r,uninstall:a}}function cI(){return Xe({mutationFn:()=>FL()})}function uI(e){return Nn({queryKey:["model",e],queryFn:()=>ML(e),enabled:!!e,retry:!1})}function Wl(){const e=kn(),t=()=>{e.invalidateQueries({queryKey:Ot.models}),e.invalidateQueries({queryKey:Ot.status})};return{save:Xe({mutationFn:r=>OL(r.key,r.profile),onSuccess:(r,a)=>{t(),e.invalidateQueries({queryKey:["model",a.key]})}}),reset:Xe({mutationFn:r=>DL(r),onSuccess:(r,a)=>{t(),e.invalidateQueries({queryKey:["model",a]})}}),load:Xe({mutationFn:r=>jL(r.key,r.overrides),onSuccess:(r,a)=>{t(),e.invalidateQueries({queryKey:["model",a.key]})}}),eject:Xe({mutationFn:()=>tS(),onSuccess:t})}}function dI(){const e=kn(),t=Nn({queryKey:["apiKeys"],queryFn:$L,retry:!1}),r=()=>{e.invalidateQueries({queryKey:["apiKeys"]})};return{query:t,create:Xe({mutationFn:a=>qL(a),onSuccess:r}),revoke:Xe({mutationFn:a=>GL(a),onSuccess:r})}}function fI(e){return Nn({queryKey:["hf-search",e],queryFn:()=>VL(e),enabled:e.trim().length>0,retry:!1,placeholderData:t=>t})}function pI(e){return Nn({queryKey:["hf-repo",e],queryFn:()=>YL(e),enabled:!!e,retry:!1,refetchInterval:t=>t.state.data?.verifying?1500:!1})}function mI(){return Xe({mutationFn:e=>XL(e)})}function hI(){return Nn({queryKey:Ot.downloads,queryFn:ZL,refetchInterval:e=>e.state.data?.downloads.some(t=>t.status==="downloading"||t.status==="queued")?1500:!1,refetchIntervalInBackground:!1,placeholderData:e=>e,retry:!1})}function pg(){const e=kn(),t=()=>{e.invalidateQueries({queryKey:Ot.downloads}),e.invalidateQueries({queryKey:Ot.models}),e.invalidateQueries({queryKey:Ot.status})};return{enqueue:Xe({mutationFn:r=>WL(r),onSuccess:t}),cancel:Xe({mutationFn:r=>JL(r),onSuccess:t}),remove:Xe({mutationFn:r=>eI(r),onSuccess:t})}}function Bd(){return Nn({queryKey:["sysinfo"],queryFn:QL,staleTime:1/0,retry:!1})}const L0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,I0=Aw,iS=(e,t)=>r=>{var a;if(t?.variants==null)return I0(e,r?.class,r?.className);const{variants:s,defaultVariants:l}=t,c=Object.keys(s).map(p=>{const g=r?.[p],h=l?.[p];if(g===null)return null;const x=L0(g)||L0(h);return s[p][x]}),f=r&&Object.entries(r).reduce((p,g)=>{let[h,x]=g;return x===void 0||(p[h]=x),p},{}),m=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((p,g)=>{let{class:h,className:x,...v}=g;return Object.entries(v).every(E=>{let[S,N]=E;return Array.isArray(N)?N.includes({...l,...f}[S]):{...l,...f}[S]===N})?[...p,h,x]:p},[]);return I0(e,c,m,r?.class,r?.className)},mg=iS("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors disabled:pointer-events-none disabled:opacity-40 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-accent text-on-accent hover:bg-accent-hover",outline:"border border-border bg-transparent text-ink hover:bg-panel-2",ghost:"bg-transparent text-ink hover:bg-panel-2",destructive:"border border-[color:var(--err)] bg-transparent text-[color:var(--err)] hover:bg-[color:color-mix(in_srgb,var(--err)_12%,transparent)]"},size:{default:"h-9 px-4 py-2",sm:"h-8 px-3 text-[13px]",lg:"h-10 px-5",icon:"h-9 w-9",iconSm:"h-8 w-8"}},defaultVariants:{variant:"default",size:"default"}}),je=w.forwardRef(({className:e,variant:t,size:r,asChild:a=!1,...s},l)=>{const c=a?p2:"button";return d.jsx(c,{ref:l,className:ht(mg({variant:t,size:r}),e),...s})});je.displayName="Button";const gI=new Set(["cuda","rocm","sycl","vulkan","metal","cpu"]);function bI(e){return e==="vllm"?"vLLM engine":e==="mlx"?"MLX engine":e==="turboquant"?"TurboQuant engine":gI.has(e)?`llama.cpp engine (${e})`:e?`${e} engine`:"engine"}function yI({status:e}){const[t,r]=w.useState(!1),{cancel:a}=Zl(),s=e?.engineProvision;if(!s)return null;if(s.phase==="error")return t?null:d.jsxs("div",{className:"flex items-center gap-3 border-b px-4 py-2 text-[13px]",style:{borderColor:"var(--border)",background:"var(--panel)",color:"var(--err)"},children:[d.jsx("span",{className:"flex-1",children:s.error??"Could not set up the default engine."}),d.jsx("button",{type:"button",onClick:()=>r(!0),className:"grid h-6 w-6 place-items-center rounded text-muted hover:text-ink","aria-label":"Dismiss",children:d.jsx(ei,{size:14})})]});if(!s.active)return null;const l=s.pct>=0?Math.round(s.pct*100):null,c=s.parts&&s.parts>1?` · part ${s.part}/${s.parts}`:"",f=bI(s.backend),m=(s.phase==="extracting"?`Installing ${f}…`:`Downloading ${f}…`)+c;return d.jsxs("div",{className:"border-b px-4 py-2",style:{borderColor:"var(--border)",background:"var(--panel)"},children:[d.jsxs("div",{className:"flex items-center gap-2 text-[13px] text-ink",children:[d.jsx(bs,{size:14,className:"text-accent"}),d.jsx("span",{className:"flex-1",children:m}),l!=null&&d.jsxs("span",{className:"tabular-nums text-muted",children:[l,"%"]}),d.jsxs(je,{size:"sm",variant:"ghost",className:"h-6 px-2 text-[12px]",onClick:()=>a.mutate(),disabled:a.isPending,children:[d.jsx(ei,{size:13})," Cancel"]})]}),d.jsx("div",{className:"mt-1.5 h-1 w-full overflow-hidden rounded-full",style:{background:"var(--border)"},children:d.jsx("div",{className:"h-full rounded-full transition-all",style:{width:l!=null?`${l}%`:"100%",background:"var(--accent)",opacity:l==null?.5:1}})})]})}const Zu=[{to:"/chat",label:"Chat",icon:xj},{to:"/models",label:"Models",icon:Kw},{to:"/engines",label:"Engines",icon:lg},{to:"/developer",label:"Developer",icon:FD},{to:"/settings",label:"Settings",icon:Ww}];function xI({status:e,online:t,version:r,children:a}){return d.jsxs("div",{className:"flex h-full",children:[d.jsx(vI,{status:e,online:t,version:r,className:"hidden md:flex"}),d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[d.jsx(yI,{status:e}),d.jsx("main",{className:"min-h-0 flex-1 overflow-auto",children:a}),d.jsx(EI,{})]})]})}function vI({status:e,online:t,version:r,className:a}){const{pathname:s}=Lr(),l=wd(),c=e?.engine.state??"stopped",f=e?.downloads.active??0;return w.useEffect(()=>{function m(p){if(!p.ctrlKey&&!p.metaKey)return;const g=parseInt(p.key,10)-1;if(g<0||g>=Zu.length)return;const h=document.activeElement?.tagName??"",x=document.activeElement?.isContentEditable;h==="INPUT"||h==="TEXTAREA"||x||(p.preventDefault(),l(Zu[g].to))}return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[l]),d.jsxs("nav",{className:ht("flex w-16 shrink-0 flex-col items-center bg-panel-2 py-3","xl:w-48 xl:items-start xl:px-3",a),children:[d.jsxs("div",{className:"mb-4 flex w-full items-center justify-center gap-2 xl:justify-start xl:pl-1",children:[d.jsx("div",{className:"grid h-7 w-7 shrink-0 place-items-center rounded-[var(--radius-sm)] text-on-accent",style:{background:"var(--accent)"},"aria-hidden":!0,children:d.jsx(tL,{className:"h-4 w-4"})}),d.jsxs("span",{className:"hidden text-[15px] font-semibold tracking-tight xl:inline","aria-hidden":!0,children:[d.jsx("span",{className:"text-ink",children:"Turbo"}),d.jsx("span",{className:"text-accent",children:"LLM"})]})]}),d.jsx("ul",{className:"flex flex-1 flex-col items-center gap-1 xl:w-full xl:items-stretch",children:Zu.map(({to:m,label:p,icon:g})=>{const h=s===m||s.startsWith(`${m}/`),x=m==="/models"&&f>0?f:0;return d.jsx("li",{children:d.jsxs(oh,{children:[d.jsx(sh,{asChild:!0,children:d.jsxs(Gh,{to:m,"aria-label":x?`${p} (${x} downloading)`:p,"aria-current":h?"page":void 0,className:ht("relative flex h-10 w-10 items-center justify-center rounded-[var(--radius-md)] transition-colors","xl:w-full xl:justify-start xl:gap-3 xl:px-3",h?"bg-accent/12 text-accent":"text-muted hover:bg-panel hover:text-ink"),children:[d.jsxs("span",{className:"relative shrink-0",children:[d.jsx(g,{size:20}),x>0&&d.jsx("span",{className:"tllm-pulse absolute -right-1.5 -top-1.5 grid h-4 min-w-4 place-items-center rounded-full px-1 text-[10px] font-semibold leading-none text-on-accent xl:hidden",style:{background:"var(--ok)"},children:x})]}),d.jsx("span",{className:"hidden xl:inline text-sm font-medium",children:p}),x>0&&d.jsx("span",{className:"tllm-pulse ml-auto hidden h-4 min-w-4 place-items-center rounded-full px-1 text-[10px] font-semibold leading-none text-on-accent xl:grid",style:{background:"var(--ok)"},children:x})]})}),d.jsx(ud,{side:"right",className:"xl:hidden",children:x?`${p} · ${x} downloading`:p})]})},m)})}),d.jsxs("div",{className:"mt-2 flex w-full flex-col items-center gap-1.5 xl:items-start xl:pl-3",children:[d.jsxs(oh,{children:[d.jsx(sh,{asChild:!0,children:d.jsxs("button",{type:"button",onClick:()=>l("/engines"),"aria-label":`Engine: ${c} — open Engines`,className:"flex items-center justify-center rounded-full transition-colors xl:justify-start",children:[d.jsx(uh,{state:c,dotOnly:!0,className:"xl:hidden"}),d.jsx(uh,{state:c,className:"hidden xl:inline-flex"})]})}),d.jsx(ud,{side:"right",className:"xl:hidden",children:(t?"Daemon connected":"Daemon offline")+` · ${r}`})]}),d.jsx("span",{className:"hidden text-[11px] text-faint xl:inline",children:r})]})]})}function EI(){return d.jsx("nav",{className:"flex shrink-0 border-t border-border bg-panel-2 md:hidden",children:Zu.map(({to:e,label:t,icon:r})=>d.jsxs(FE,{to:e,className:({isActive:a})=>ht("flex flex-1 flex-col items-center justify-center gap-1 py-2 text-[10px] transition-colors",a?"text-accent":"text-muted"),children:[d.jsx(r,{size:20}),d.jsx("span",{children:t})]},e))})}function wI(){return d.jsxs("div",{className:"fixed inset-0 z-[100] flex flex-col items-center justify-center gap-4",style:{background:"color-mix(in srgb, var(--bg) 92%, transparent)"},role:"alertdialog","aria-label":"Lost connection to daemon",children:[d.jsx(Rr,{size:24,className:"tllm-pulse text-muted"}),d.jsx("p",{className:"text-[14px] text-ink",children:"Lost connection to TurboLLM daemon — retrying…"})]})}const Di=w.forwardRef(({className:e,...t},r)=>d.jsx("input",{ref:r,className:ht("flex h-9 w-full rounded-md border border-border bg-bg px-3 py-2 text-sm text-ink","placeholder:text-faint focus-visible:border-border-strong focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50",e),...t}));Di.displayName="Input";function SI({onConnect:e}){const[t,r]=w.useState(""),[a,s]=w.useState(!1),l=()=>{const c=t.trim();c&&(s(!0),e(c))};return d.jsx("div",{className:"fixed inset-0 z-[100] flex flex-col items-center justify-center px-6",style:{background:"color-mix(in srgb, var(--bg) 94%, transparent)"},role:"alertdialog","aria-label":"API key required",children:d.jsxs("div",{className:"w-full max-w-sm rounded-lg border border-border bg-panel p-5",children:[d.jsxs("div",{className:"mb-2 flex items-center gap-2 text-ink",children:[d.jsx(cj,{size:16}),d.jsx("span",{className:"text-[15px] font-semibold",children:"API key required"})]}),d.jsxs("p",{className:"mb-3 text-[13px] text-muted",children:["This TurboLLM is exposed on the network, so it needs an API key. Create one under"," ",d.jsx("span",{className:"text-ink",children:"Developer"})," on the host machine, then paste it here."]}),d.jsx(Di,{type:"password",value:t,onChange:c=>r(c.target.value),onKeyDown:c=>{c.key==="Enter"&&l()},placeholder:"Paste API key",autoFocus:!0}),a&&d.jsx("p",{className:"mt-2 text-[12px]",style:{color:"var(--warn)"},children:"Still here? That key was rejected — double-check it and try again."}),d.jsx(je,{className:"mt-3 w-full",onClick:l,disabled:!t.trim(),children:"Connect"})]})})}async function ii(e,t){const r={Accept:"application/json",...Id(),...t?.headers??{}};let a=t?.body;t&&"json"in t&&t.json!==void 0&&(r["Content-Type"]="application/json",a=JSON.stringify(t.json));const s=await fetch(e,{...t,headers:r,body:a});if(s.status===204)return;const l=await s.text(),c=l?(()=>{try{return JSON.parse(l)}catch{return}})():void 0;if(!s.ok){const f=c;throw new qe(f?.error?.code??"http_error",f?.error?.message??`Request failed with status ${s.status}.`,s.status)}return c}function _I(e){return ii(`/api/v1/conversations${e?`?q=${encodeURIComponent(e)}`:""}`)}function kI(e){return ii("/api/v1/conversations",{method:"POST",json:e??{}})}function NI(){return ii("/api/v1/conversations/expert",{method:"POST",json:{}})}function CI(e){return ii(`/api/v1/conversations/${encodeURIComponent(e)}`)}function TI(e,t){return ii(`/api/v1/conversations/${encodeURIComponent(e)}`,{method:"PATCH",json:t})}function AI(e){return ii(`/api/v1/conversations/${encodeURIComponent(e)}`,{method:"DELETE"})}function RI(e){return ii("/api/v1/chat/stop",{method:"POST",json:{conversationId:e}})}function MI(e,t,r){return ii(`/api/v1/conversations/${encodeURIComponent(e)}/messages/${encodeURIComponent(t)}`,{method:"PUT",json:{content:r}})}function OI(e,t){return ii(`/api/v1/conversations/${encodeURIComponent(e)}/messages/${encodeURIComponent(t)}`,{method:"DELETE"})}function DI(e){return ii(`/api/v1/conversations/${encodeURIComponent(e)}/regenerate`,{method:"POST",json:{}})}async function*jI(e,t,r,a,s,l,c){const f=await fetch(`/api/v1/conversations/${encodeURIComponent(e)}/messages`,{method:"POST",headers:{"Content-Type":"application/json",...Id()},body:JSON.stringify({content:t,images:a?.length?a:void 0,docContext:s||void 0,textAttachments:l?.length?l:void 0,disableThinking:c||void 0}),signal:r});if(!f.ok||!f.body){const h=await f.text().catch(()=>""),x=(()=>{try{return JSON.parse(h)}catch{return}})();throw new qe(x?.error?.code??"http_error",x?.error?.message??`Request failed with status ${f.status}.`,f.status)}const m=f.body.getReader(),p=new TextDecoder;let g="";try{for(;;){const{done:h,value:x}=await m.read();if(h)break;g+=p.decode(x,{stream:!0});const v=g.split(`
|
|
12
|
-
`);g=v.pop()??"";let E="";for(const S of v)if(S.startsWith("event: "))E=S.slice(7).trim();else if(S.startsWith("data: ")){const N=S.slice(6).trim();try{const k=JSON.parse(N);E&&(yield{event:E,data:k})}catch{}E=""}}}finally{m.releaseLock()}}async function*z0(e,t,r){const a=await fetch(`/api/v1/conversations/${encodeURIComponent(e)}/continue`,{method:"POST",headers:{"Content-Type":"application/json",...Id()},body:JSON.stringify({disableThinking:r||void 0}),signal:t});if(!a.ok||!a.body){const f=await a.text().catch(()=>""),m=(()=>{try{return JSON.parse(f)}catch{return}})();throw new qe(m?.error?.code??"http_error",m?.error?.message??`Request failed with status ${a.status}.`,a.status)}const s=a.body.getReader(),l=new TextDecoder;let c="";try{for(;;){const{done:f,value:m}=await s.read();if(f)break;c+=l.decode(m,{stream:!0});const p=c.split(`
|
|
13
|
-
`);c=p.pop()??"";let g="";for(const h of p)if(h.startsWith("event: "))g=h.slice(7).trim();else if(h.startsWith("data: ")){const x=h.slice(6).trim();try{const v=JSON.parse(x);g&&(yield{event:g,data:v})}catch{}g=""}}}finally{s.releaseLock()}}const hg={list:e=>["conversations",e??""],detail:e=>["conversation",e]};function LI(e){return Nn({queryKey:hg.list(e),queryFn:()=>_I(e),staleTime:0,retry:!1})}function II(e){return Nn({queryKey:hg.detail(e),queryFn:()=>CI(e),enabled:!!e,retry:!1})}function Jl(){const e=kn(),t=()=>{e.invalidateQueries({queryKey:["conversations"]})},r=a=>{e.invalidateQueries({queryKey:hg.detail(a)})};return{create:Xe({mutationFn:a=>kI(a),onSuccess:t}),createExpert:Xe({mutationFn:()=>NI(),onSuccess:t}),update:Xe({mutationFn:a=>TI(a.id,a),onSuccess:(a,s)=>{t(),r(s.id)}}),remove:Xe({mutationFn:a=>AI(a),onSuccess:t}),stop:Xe({mutationFn:a=>RI(a)}),editMsg:Xe({mutationFn:a=>MI(a.convId,a.msgId,a.content),onSuccess:(a,s)=>r(s.convId)}),deleteMsg:Xe({mutationFn:a=>OI(a.convId,a.msgId),onSuccess:(a,s)=>r(s.convId)}),regenerate:Xe({mutationFn:a=>DI(a),onSuccess:(a,s)=>r(s)})}}function zI(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const BI=e=>{switch(e){case"success":return FI;case"info":return $I;case"warning":return HI;case"error":return qI;default:return null}},PI=Array(12).fill(0),UI=({visible:e,className:t})=>be.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},be.createElement("div",{className:"sonner-spinner"},PI.map((r,a)=>be.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),FI=be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},be.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),HI=be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},be.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),$I=be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},be.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),qI=be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},be.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),GI=be.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},be.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),be.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),KI=()=>{const[e,t]=be.useState(document.hidden);return be.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let fh=1;class QI{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:a,...s}=t,l=typeof t?.id=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:fh++,c=this.toasts.find(m=>m.id===l),f=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),c?this.toasts=this.toasts.map(m=>m.id===l?(this.publish({...m,...t,id:l,title:a}),{...m,...t,id:l,dismissible:f,title:a}):m):this.addToast({title:a,...s,dismissible:f,id:l}),l},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(a=>a({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let a;r.loading!==void 0&&(a=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const s=Promise.resolve(t instanceof Function?t():t);let l=a!==void 0,c;const f=s.then(async p=>{if(c=["resolve",p],be.isValidElement(p))l=!1,this.create({id:a,type:"default",message:p});else if(YI(p)&&!p.ok){l=!1;const h=typeof r.error=="function"?await r.error(`HTTP error! status: ${p.status}`):r.error,x=typeof r.description=="function"?await r.description(`HTTP error! status: ${p.status}`):r.description,E=typeof h=="object"&&!be.isValidElement(h)?h:{message:h};this.create({id:a,type:"error",description:x,...E})}else if(p instanceof Error){l=!1;const h=typeof r.error=="function"?await r.error(p):r.error,x=typeof r.description=="function"?await r.description(p):r.description,E=typeof h=="object"&&!be.isValidElement(h)?h:{message:h};this.create({id:a,type:"error",description:x,...E})}else if(r.success!==void 0){l=!1;const h=typeof r.success=="function"?await r.success(p):r.success,x=typeof r.description=="function"?await r.description(p):r.description,E=typeof h=="object"&&!be.isValidElement(h)?h:{message:h};this.create({id:a,type:"success",description:x,...E})}}).catch(async p=>{if(c=["reject",p],r.error!==void 0){l=!1;const g=typeof r.error=="function"?await r.error(p):r.error,h=typeof r.description=="function"?await r.description(p):r.description,v=typeof g=="object"&&!be.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:h,...v})}}).finally(()=>{l&&(this.dismiss(a),a=void 0),r.finally==null||r.finally.call(r)}),m=()=>new Promise((p,g)=>f.then(()=>c[0]==="reject"?g(c[1]):p(c[1])).catch(g));return typeof a!="string"&&typeof a!="number"?{unwrap:m}:Object.assign(a,{unwrap:m})},this.custom=(t,r)=>{const a=r?.id||fh++;return this.create({jsx:t(a),id:a,...r}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Yn=new QI,VI=(e,t)=>{const r=t?.id||fh++;return Yn.addToast({title:e,...t,id:r}),r},YI=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",XI=VI,ZI=()=>Yn.toasts,WI=()=>Yn.getActiveToasts(),De=Object.assign(XI,{success:Yn.success,info:Yn.info,warning:Yn.warning,error:Yn.error,custom:Yn.custom,message:Yn.message,promise:Yn.promise,dismiss:Yn.dismiss,loading:Yn.loading},{getHistory:ZI,getToasts:WI});zI("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Ru(e){return e.label!==void 0}const JI=3,ez="24px",tz="16px",B0=4e3,nz=356,rz=14,iz=45,az=200;function Kr(...e){return e.filter(Boolean).join(" ")}function oz(e){const[t,r]=e.split("-"),a=[];return t&&a.push(t),r&&a.push(r),a}const sz=e=>{var t,r,a,s,l,c,f,m,p;const{invert:g,toast:h,unstyled:x,interacting:v,setHeights:E,visibleToasts:S,heights:N,index:k,toasts:M,expanded:R,removeToast:O,defaultRichColors:P,closeButton:D,style:U,cancelButtonStyle:B,actionButtonStyle:J,className:F="",descriptionClassName:ae="",duration:ee,position:ce,gap:te,expandByDefault:Q,classNames:j,icons:V,closeButtonAriaLabel:Z="Close toast"}=e,[ie,T]=be.useState(null),[I,q]=be.useState(null),[A,$]=be.useState(!1),[ue,de]=be.useState(!1),[Se,Ee]=be.useState(!1),[Ce,dt]=be.useState(!1),[St,Lt]=be.useState(!1),[ln,gt]=be.useState(0),[On,Je]=be.useState(0),cn=be.useRef(h.duration||ee||B0),bn=be.useRef(null),$t=be.useRef(null),Pn=k===0,kr=k+1<=S,Qt=h.type,un=h.dismissible!==!1,fe=h.className||"",Qe=h.descriptionClassName||"",K=be.useMemo(()=>N.findIndex(L=>L.toastId===h.id)||0,[N,h.id]),pe=be.useMemo(()=>{var L;return(L=h.closeButton)!=null?L:D},[h.closeButton,D]),we=be.useMemo(()=>h.duration||ee||B0,[h.duration,ee]),$e=be.useRef(0),Te=be.useRef(0),Vt=be.useRef(0),Jt=be.useRef(null),[qt,Bt]=ce.split("-"),dn=be.useMemo(()=>N.reduce((L,re,me)=>me>=K?L:L+re.height,0),[N,K]),ft=KI(),pr=h.invert||g,fn=Qt==="loading";Te.current=be.useMemo(()=>K*te+dn,[K,dn]),be.useEffect(()=>{cn.current=we},[we]),be.useEffect(()=>{$(!0)},[]),be.useEffect(()=>{const L=$t.current;if(L){const re=L.getBoundingClientRect().height;return Je(re),E(me=>[{toastId:h.id,height:re,position:h.position},...me]),()=>E(me=>me.filter(Ae=>Ae.toastId!==h.id))}},[E,h.id]),be.useLayoutEffect(()=>{if(!A)return;const L=$t.current,re=L.style.height;L.style.height="auto";const me=L.getBoundingClientRect().height;L.style.height=re,Je(me),E(Ae=>Ae.find(Ge=>Ge.toastId===h.id)?Ae.map(Ge=>Ge.toastId===h.id?{...Ge,height:me}:Ge):[{toastId:h.id,height:me,position:h.position},...Ae])},[A,h.title,h.description,E,h.id,h.jsx,h.action,h.cancel]);const Zn=be.useCallback(()=>{de(!0),gt(Te.current),E(L=>L.filter(re=>re.toastId!==h.id)),setTimeout(()=>{O(h)},az)},[h,O,E,Te]);be.useEffect(()=>{if(h.promise&&Qt==="loading"||h.duration===1/0||h.type==="loading")return;let L;return R||v||ft?(()=>{if(Vt.current<$e.current){const Ae=new Date().getTime()-$e.current;cn.current=cn.current-Ae}Vt.current=new Date().getTime()})():cn.current!==1/0&&($e.current=new Date().getTime(),L=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),Zn()},cn.current)),()=>clearTimeout(L)},[R,v,h,Qt,ft,Zn]),be.useEffect(()=>{h.delete&&(Zn(),h.onDismiss==null||h.onDismiss.call(h,h))},[Zn,h.delete]);function oi(){var L;if(V?.loading){var re;return be.createElement("div",{className:Kr(j?.loader,h==null||(re=h.classNames)==null?void 0:re.loader,"sonner-loader"),"data-visible":Qt==="loading"},V.loading)}return be.createElement(UI,{className:Kr(j?.loader,h==null||(L=h.classNames)==null?void 0:L.loader),visible:Qt==="loading"})}const Bi=h.icon||V?.[Qt]||BI(Qt);var Pr,yn;return be.createElement("li",{tabIndex:0,ref:$t,className:Kr(F,fe,j?.toast,h==null||(t=h.classNames)==null?void 0:t.toast,j?.default,j?.[Qt],h==null||(r=h.classNames)==null?void 0:r[Qt]),"data-sonner-toast":"","data-rich-colors":(Pr=h.richColors)!=null?Pr:P,"data-styled":!(h.jsx||h.unstyled||x),"data-mounted":A,"data-promise":!!h.promise,"data-swiped":St,"data-removed":ue,"data-visible":kr,"data-y-position":qt,"data-x-position":Bt,"data-index":k,"data-front":Pn,"data-swiping":Se,"data-dismissible":un,"data-type":Qt,"data-invert":pr,"data-swipe-out":Ce,"data-swipe-direction":I,"data-expanded":!!(R||Q&&A),"data-testid":h.testId,style:{"--index":k,"--toasts-before":k,"--z-index":M.length-k,"--offset":`${ue?ln:Te.current}px`,"--initial-height":Q?"auto":`${On}px`,...U,...h.style},onDragEnd:()=>{Ee(!1),T(null),Jt.current=null},onPointerDown:L=>{L.button!==2&&(fn||!un||(bn.current=new Date,gt(Te.current),L.target.setPointerCapture(L.pointerId),L.target.tagName!=="BUTTON"&&(Ee(!0),Jt.current={x:L.clientX,y:L.clientY})))},onPointerUp:()=>{var L,re,me;if(Ce||!un)return;Jt.current=null;const Ae=Number(((L=$t.current)==null?void 0:L.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),yt=Number(((re=$t.current)==null?void 0:re.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ge=new Date().getTime()-((me=bn.current)==null?void 0:me.getTime()),xe=ie==="x"?Ae:yt,ve=Math.abs(xe)/Ge;if(Math.abs(xe)>=iz||ve>.11){gt(Te.current),h.onDismiss==null||h.onDismiss.call(h,h),q(ie==="x"?Ae>0?"right":"left":yt>0?"down":"up"),Zn(),dt(!0);return}else{var Re,ut;(Re=$t.current)==null||Re.style.setProperty("--swipe-amount-x","0px"),(ut=$t.current)==null||ut.style.setProperty("--swipe-amount-y","0px")}Lt(!1),Ee(!1),T(null)},onPointerMove:L=>{var re,me,Ae;if(!Jt.current||!un||((re=window.getSelection())==null?void 0:re.toString().length)>0)return;const Ge=L.clientY-Jt.current.y,xe=L.clientX-Jt.current.x;var ve;const Re=(ve=e.swipeDirections)!=null?ve:oz(ce);!ie&&(Math.abs(xe)>1||Math.abs(Ge)>1)&&T(Math.abs(xe)>Math.abs(Ge)?"x":"y");let ut={x:0,y:0};const At=xn=>1/(1.5+Math.abs(xn)/20);if(ie==="y"){if(Re.includes("top")||Re.includes("bottom"))if(Re.includes("top")&&Ge<0||Re.includes("bottom")&&Ge>0)ut.y=Ge;else{const xn=Ge*At(Ge);ut.y=Math.abs(xn)<Math.abs(Ge)?xn:Ge}}else if(ie==="x"&&(Re.includes("left")||Re.includes("right")))if(Re.includes("left")&&xe<0||Re.includes("right")&&xe>0)ut.x=xe;else{const xn=xe*At(xe);ut.x=Math.abs(xn)<Math.abs(xe)?xn:xe}(Math.abs(ut.x)>0||Math.abs(ut.y)>0)&&Lt(!0),(me=$t.current)==null||me.style.setProperty("--swipe-amount-x",`${ut.x}px`),(Ae=$t.current)==null||Ae.style.setProperty("--swipe-amount-y",`${ut.y}px`)}},pe&&!h.jsx&&Qt!=="loading"?be.createElement("button",{"aria-label":Z,"data-disabled":fn,"data-close-button":!0,onClick:fn||!un?()=>{}:()=>{Zn(),h.onDismiss==null||h.onDismiss.call(h,h)},className:Kr(j?.closeButton,h==null||(a=h.classNames)==null?void 0:a.closeButton)},(yn=V?.close)!=null?yn:GI):null,(Qt||h.icon||h.promise)&&h.icon!==null&&(V?.[Qt]!==null||h.icon)?be.createElement("div",{"data-icon":"",className:Kr(j?.icon,h==null||(s=h.classNames)==null?void 0:s.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||oi():null,h.type!=="loading"?Bi:null):null,be.createElement("div",{"data-content":"",className:Kr(j?.content,h==null||(l=h.classNames)==null?void 0:l.content)},be.createElement("div",{"data-title":"",className:Kr(j?.title,h==null||(c=h.classNames)==null?void 0:c.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?be.createElement("div",{"data-description":"",className:Kr(ae,Qe,j?.description,h==null||(f=h.classNames)==null?void 0:f.description)},typeof h.description=="function"?h.description():h.description):null),be.isValidElement(h.cancel)?h.cancel:h.cancel&&Ru(h.cancel)?be.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||B,onClick:L=>{Ru(h.cancel)&&un&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,L),Zn())},className:Kr(j?.cancelButton,h==null||(m=h.classNames)==null?void 0:m.cancelButton)},h.cancel.label):null,be.isValidElement(h.action)?h.action:h.action&&Ru(h.action)?be.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||J,onClick:L=>{Ru(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,L),!L.defaultPrevented&&Zn())},className:Kr(j?.actionButton,h==null||(p=h.classNames)==null?void 0:p.actionButton)},h.action.label):null)};function P0(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function lz(e,t){const r={};return[e,t].forEach((a,s)=>{const l=s===1,c=l?"--mobile-offset":"--offset",f=l?tz:ez;function m(p){["top","right","bottom","left"].forEach(g=>{r[`${c}-${g}`]=typeof p=="number"?`${p}px`:p})}typeof a=="number"||typeof a=="string"?m(a):typeof a=="object"?["top","right","bottom","left"].forEach(p=>{a[p]===void 0?r[`${c}-${p}`]=f:r[`${c}-${p}`]=typeof a[p]=="number"?`${a[p]}px`:a[p]}):m(f)}),r}const cz=be.forwardRef(function(t,r){const{id:a,invert:s,position:l="bottom-right",hotkey:c=["altKey","KeyT"],expand:f,closeButton:m,className:p,offset:g,mobileOffset:h,theme:x="light",richColors:v,duration:E,style:S,visibleToasts:N=JI,toastOptions:k,dir:M=P0(),gap:R=rz,icons:O,containerAriaLabel:P="Notifications"}=t,[D,U]=be.useState([]),B=be.useMemo(()=>a?D.filter(A=>A.toasterId===a):D.filter(A=>!A.toasterId),[D,a]),J=be.useMemo(()=>Array.from(new Set([l].concat(B.filter(A=>A.position).map(A=>A.position)))),[B,l]),[F,ae]=be.useState([]),[ee,ce]=be.useState(!1),[te,Q]=be.useState(!1),[j,V]=be.useState(x!=="system"?x:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Z=be.useRef(null),ie=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=be.useRef(null),I=be.useRef(!1),q=be.useCallback(A=>{U($=>{var ue;return(ue=$.find(de=>de.id===A.id))!=null&&ue.delete||Yn.dismiss(A.id),$.filter(({id:de})=>de!==A.id)})},[]);return be.useEffect(()=>Yn.subscribe(A=>{if(A.dismiss){requestAnimationFrame(()=>{U($=>$.map(ue=>ue.id===A.id?{...ue,delete:!0}:ue))});return}setTimeout(()=>{u2.flushSync(()=>{U($=>{const ue=$.findIndex(de=>de.id===A.id);return ue!==-1?[...$.slice(0,ue),{...$[ue],...A},...$.slice(ue+1)]:[A,...$]})})})}),[D]),be.useEffect(()=>{if(x!=="system"){V(x);return}if(x==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;const A=window.matchMedia("(prefers-color-scheme: dark)");try{A.addEventListener("change",({matches:$})=>{V($?"dark":"light")})}catch{A.addListener(({matches:ue})=>{try{V(ue?"dark":"light")}catch(de){console.error(de)}})}},[x]),be.useEffect(()=>{D.length<=1&&ce(!1)},[D]),be.useEffect(()=>{const A=$=>{var ue;if(c.every(Ee=>$[Ee]||$.code===Ee)){var Se;ce(!0),(Se=Z.current)==null||Se.focus()}$.code==="Escape"&&(document.activeElement===Z.current||(ue=Z.current)!=null&&ue.contains(document.activeElement))&&ce(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[c]),be.useEffect(()=>{if(Z.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,I.current=!1)}},[Z.current]),be.createElement("section",{ref:r,"aria-label":`${P} ${ie}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},J.map((A,$)=>{var ue;const[de,Se]=A.split("-");return B.length?be.createElement("ol",{key:A,dir:M==="auto"?P0():M,tabIndex:-1,ref:Z,className:p,"data-sonner-toaster":!0,"data-sonner-theme":j,"data-y-position":de,"data-x-position":Se,style:{"--front-toast-height":`${((ue=F[0])==null?void 0:ue.height)||0}px`,"--width":`${nz}px`,"--gap":`${R}px`,...S,...lz(g,h)},onBlur:Ee=>{I.current&&!Ee.currentTarget.contains(Ee.relatedTarget)&&(I.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:Ee=>{Ee.target instanceof HTMLElement&&Ee.target.dataset.dismissible==="false"||I.current||(I.current=!0,T.current=Ee.relatedTarget)},onMouseEnter:()=>ce(!0),onMouseMove:()=>ce(!0),onMouseLeave:()=>{te||ce(!1)},onDragEnd:()=>ce(!1),onPointerDown:Ee=>{Ee.target instanceof HTMLElement&&Ee.target.dataset.dismissible==="false"||Q(!0)},onPointerUp:()=>Q(!1)},B.filter(Ee=>!Ee.position&&$===0||Ee.position===A).map((Ee,Ce)=>{var dt,St;return be.createElement(sz,{key:Ee.id,icons:O,index:Ce,toast:Ee,defaultRichColors:v,duration:(dt=k?.duration)!=null?dt:E,className:k?.className,descriptionClassName:k?.descriptionClassName,invert:s,visibleToasts:N,closeButton:(St=k?.closeButton)!=null?St:m,interacting:te,position:A,style:k?.style,unstyled:k?.unstyled,classNames:k?.classNames,cancelButtonStyle:k?.cancelButtonStyle,actionButtonStyle:k?.actionButtonStyle,closeButtonAriaLabel:k?.closeButtonAriaLabel,removeToast:q,toasts:B.filter(Lt=>Lt.position==Ee.position),heights:F.filter(Lt=>Lt.position==Ee.position),setHeights:ae,expandByDefault:f,gap:R,expanded:ee,swipeDirections:t.swipeDirections})})):null}))}),U0=e=>{let t;const r=new Set,a=(p,g)=>{const h=typeof p=="function"?p(t):p;if(!Object.is(h,t)){const x=t;t=g??(typeof h!="object"||h===null)?h:Object.assign({},t,h),r.forEach(v=>v(t,x))}},s=()=>t,f={setState:a,getState:s,getInitialState:()=>m,subscribe:p=>(r.add(p),()=>r.delete(p))},m=t=e(a,s,f);return f},uz=(e=>e?U0(e):U0),dz=e=>e;function fz(e,t=dz){const r=be.useSyncExternalStore(e.subscribe,be.useCallback(()=>t(e.getState()),[e,t]),be.useCallback(()=>t(e.getInitialState()),[e,t]));return be.useDebugValue(r),r}const F0=e=>{const t=uz(e),r=a=>fz(t,a);return Object.assign(r,t),r},pz=(e=>e?F0(e):F0),aS="tllm.theme";function mz(){const e=localStorage.getItem(aS);return e==="light"||e==="dark"||e==="system"?e:"system"}function oS(e){return e==="dark"?!0:e==="light"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches}function gg(e){document.documentElement.classList.toggle("dark",oS(e))}const ji=pz(e=>({theme:mz(),setTheme:t=>{localStorage.setItem(aS,t),gg(t),e({theme:t})},logPanelOpen:!1,setLogPanelOpen:t=>e({logPanelOpen:t}),pendingConversationId:null,setPendingConversationId:t=>e({pendingConversationId:t})}));function hz(){const e=ji(r=>r.theme),t=oS(e)?"dark":"light";return d.jsx(cz,{theme:t,position:"bottom-right",closeButton:!0})}function gz(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const bz=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yz=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xz={};function H0(e,t){return(xz.jsx?yz:bz).test(e)}const vz=/[ \t\n\f\r]/g;function Ez(e){return typeof e=="object"?e.type==="text"?$0(e.value):!1:$0(e)}function $0(e){return e.replace(vz,"")===""}class ec{constructor(t,r,a){this.normal=r,this.property=t,a&&(this.space=a)}}ec.prototype.normal={};ec.prototype.property={};ec.prototype.space=void 0;function sS(e,t){const r={},a={};for(const s of e)Object.assign(r,s.property),Object.assign(a,s.normal);return new ec(r,a,t)}function ph(e){return e.toLowerCase()}class Xn{constructor(t,r){this.attribute=r,this.property=t}}Xn.prototype.attribute="";Xn.prototype.booleanish=!1;Xn.prototype.boolean=!1;Xn.prototype.commaOrSpaceSeparated=!1;Xn.prototype.commaSeparated=!1;Xn.prototype.defined=!1;Xn.prototype.mustUseProperty=!1;Xn.prototype.number=!1;Xn.prototype.overloadedBoolean=!1;Xn.prototype.property="";Xn.prototype.spaceSeparated=!1;Xn.prototype.space=void 0;let wz=0;const Ke=ro(),sn=ro(),mh=ro(),ge=ro(),Mt=ro(),Va=ro(),sr=ro();function ro(){return 2**++wz}const hh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ke,booleanish:sn,commaOrSpaceSeparated:sr,commaSeparated:Va,number:ge,overloadedBoolean:mh,spaceSeparated:Mt},Symbol.toStringTag,{value:"Module"})),hm=Object.keys(hh);class bg extends Xn{constructor(t,r,a,s){let l=-1;if(super(t,r),q0(this,"space",s),typeof a=="number")for(;++l<hm.length;){const c=hm[l];q0(this,hm[l],(a&hh[c])===hh[c])}}}bg.prototype.defined=!0;function q0(e,t,r){r&&(e[t]=r)}function ys(e){const t={},r={};for(const[a,s]of Object.entries(e.properties)){const l=new bg(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(l.mustUseProperty=!0),t[a]=l,r[ph(a)]=a,r[ph(l.attribute)]=a}return new ec(t,r,e.space)}const lS=ys({properties:{ariaActiveDescendant:null,ariaAtomic:sn,ariaAutoComplete:null,ariaBusy:sn,ariaChecked:sn,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:Mt,ariaCurrent:null,ariaDescribedBy:Mt,ariaDetails:null,ariaDisabled:sn,ariaDropEffect:Mt,ariaErrorMessage:null,ariaExpanded:sn,ariaFlowTo:Mt,ariaGrabbed:sn,ariaHasPopup:null,ariaHidden:sn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Mt,ariaLevel:ge,ariaLive:null,ariaModal:sn,ariaMultiLine:sn,ariaMultiSelectable:sn,ariaOrientation:null,ariaOwns:Mt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:sn,ariaReadOnly:sn,ariaRelevant:null,ariaRequired:sn,ariaRoleDescription:Mt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:sn,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function cS(e,t){return t in e?e[t]:t}function uS(e,t){return cS(e,t.toLowerCase())}const Sz=ys({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Va,acceptCharset:Mt,accessKey:Mt,action:null,allow:null,allowFullScreen:Ke,allowPaymentRequest:Ke,allowUserMedia:Ke,alpha:Ke,alt:null,as:null,async:Ke,autoCapitalize:null,autoComplete:Mt,autoFocus:Ke,autoPlay:Ke,blocking:Mt,capture:null,charSet:null,checked:Ke,cite:null,className:Mt,closedBy:null,colorSpace:null,cols:ge,colSpan:ge,command:null,commandFor:null,content:null,contentEditable:sn,controls:Ke,controlsList:Mt,coords:ge|Va,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ke,defer:Ke,dir:null,dirName:null,disabled:Ke,download:mh,draggable:sn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ke,formTarget:null,headers:Mt,height:ge,hidden:mh,high:ge,href:null,hrefLang:null,htmlFor:Mt,httpEquiv:Mt,id:null,imageSizes:null,imageSrcSet:null,inert:Ke,inputMode:null,integrity:null,is:null,isMap:Ke,itemId:null,itemProp:Mt,itemRef:Mt,itemScope:Ke,itemType:Mt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ke,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Ke,muted:Ke,name:null,nonce:null,noModule:Ke,noValidate:Ke,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ke,optimum:ge,pattern:null,ping:Mt,placeholder:null,playsInline:Ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ke,referrerPolicy:null,rel:Mt,required:Ke,reversed:Ke,rows:ge,rowSpan:ge,sandbox:Mt,scope:null,scoped:Ke,seamless:Ke,selected:Ke,shadowRootClonable:Ke,shadowRootCustomElementRegistry:Ke,shadowRootDelegatesFocus:Ke,shadowRootMode:null,shadowRootSerializable:Ke,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:sn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:Ke,useMap:null,value:sn,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Mt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ke,declare:Ke,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Ke,noHref:Ke,noShade:Ke,noWrap:Ke,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:sn,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ke,disablePictureInPicture:Ke,disableRemotePlayback:Ke,exportParts:Va,part:Mt,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:uS}),_z=ys({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:sr,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:Mt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:Ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Va,g2:Va,glyphName:Va,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:sr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ge,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Mt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:sr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:sr,rev:sr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:sr,requiredFeatures:sr,requiredFonts:sr,requiredFormats:sr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:sr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:sr,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:sr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:cS}),dS=ys({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),fS=ys({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:uS}),pS=ys({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),kz={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Nz=/[A-Z]/g,G0=/-[a-z]/g,Cz=/^data[-\w.:]+$/i;function Tz(e,t){const r=ph(t);let a=t,s=Xn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&Cz.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(G0,Rz);a="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!G0.test(l)){let c=l.replace(Nz,Az);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=bg}return new s(a,t)}function Az(e){return"-"+e.toLowerCase()}function Rz(e){return e.charAt(1).toUpperCase()}const Mz=sS([lS,Sz,dS,fS,pS],"html"),yg=sS([lS,_z,dS,fS,pS],"svg");function Oz(e){return e.join(" ").trim()}var qo={},gm,K0;function Dz(){if(K0)return gm;K0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,m=`
|
|
14
|
-
`,p="/",g="*",h="",x="comment",v="declaration";function E(N,k){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];k=k||{};var M=1,R=1;function O(te){var Q=te.match(t);Q&&(M+=Q.length);var j=te.lastIndexOf(m);R=~j?te.length-j:R+te.length}function P(){var te={line:M,column:R};return function(Q){return Q.position=new D(te),J(),Q}}function D(te){this.start=te,this.end={line:M,column:R},this.source=k.source}D.prototype.content=N;function U(te){var Q=new Error(k.source+":"+M+":"+R+": "+te);if(Q.reason=te,Q.filename=k.source,Q.line=M,Q.column=R,Q.source=N,!k.silent)throw Q}function B(te){var Q=te.exec(N);if(Q){var j=Q[0];return O(j),N=N.slice(j.length),Q}}function J(){B(r)}function F(te){var Q;for(te=te||[];Q=ae();)Q!==!1&&te.push(Q);return te}function ae(){var te=P();if(!(p!=N.charAt(0)||g!=N.charAt(1))){for(var Q=2;h!=N.charAt(Q)&&(g!=N.charAt(Q)||p!=N.charAt(Q+1));)++Q;if(Q+=2,h===N.charAt(Q-1))return U("End of comment missing");var j=N.slice(2,Q-2);return R+=2,O(j),N=N.slice(Q),R+=2,te({type:x,comment:j})}}function ee(){var te=P(),Q=B(a);if(Q){if(ae(),!B(s))return U("property missing ':'");var j=B(l),V=te({type:v,property:S(Q[0].replace(e,h)),value:j?S(j[0].replace(e,h)):h});return B(c),V}}function ce(){var te=[];F(te);for(var Q;Q=ee();)Q!==!1&&(te.push(Q),F(te));return te}return J(),ce()}function S(N){return N?N.replace(f,h):h}return gm=E,gm}var Q0;function jz(){if(Q0)return qo;Q0=1;var e=qo&&qo.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(qo,"__esModule",{value:!0}),qo.default=r;const t=e(Dz());function r(a,s){let l=null;if(!a||typeof a!="string")return l;const c=(0,t.default)(a),f=typeof s=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:p,value:g}=m;f?s(p,g,m):g&&(l=l||{},l[p]=g)}),l}return qo}var vl={},V0;function Lz(){if(V0)return vl;V0=1,Object.defineProperty(vl,"__esModule",{value:!0}),vl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(p){return!p||r.test(p)||e.test(p)},c=function(p,g){return g.toUpperCase()},f=function(p,g){return"".concat(g,"-")},m=function(p,g){return g===void 0&&(g={}),l(p)?p:(p=p.toLowerCase(),g.reactCompat?p=p.replace(s,f):p=p.replace(a,f),p.replace(t,c))};return vl.camelCase=m,vl}var El,Y0;function Iz(){if(Y0)return El;Y0=1;var e=El&&El.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(jz()),r=Lz();function a(s,l){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(f,m){f&&m&&(c[(0,r.camelCase)(f,l)]=m)}),c}return a.default=a,El=a,El}var zz=Iz();const Bz=Gl(zz),mS=hS("end"),xg=hS("start");function hS(e){return t;function t(r){const a=r&&r.position&&r.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function Pz(e){const t=xg(e),r=mS(e);if(t&&r)return{start:t,end:r}}function Tl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?X0(e.position):"start"in e||"end"in e?X0(e):"line"in e||"column"in e?gh(e):""}function gh(e){return Z0(e&&e.line)+":"+Z0(e&&e.column)}function X0(e){return gh(e&&e.start)+"-"+gh(e&&e.end)}function Z0(e){return e&&typeof e=="number"?e:1}class Mn extends Error{constructor(t,r,a){super(),typeof r=="string"&&(a=r,r=void 0);let s="",l={},c=!1;if(r&&("line"in r&&"column"in r?l={place:r}:"start"in r&&"end"in r?l={place:r}:"type"in r?l={ancestors:[r],place:r.position}:l={...r}),typeof t=="string"?s=t:!l.cause&&t&&(c=!0,s=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof a=="string"){const m=a.indexOf(":");m===-1?l.ruleId=a:(l.source=a.slice(0,m),l.ruleId=a.slice(m+1))}if(!l.place&&l.ancestors&&l.ancestors){const m=l.ancestors[l.ancestors.length-1];m&&(l.place=m.position)}const f=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=Tl(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=c&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Mn.prototype.file="";Mn.prototype.name="";Mn.prototype.reason="";Mn.prototype.message="";Mn.prototype.stack="";Mn.prototype.column=void 0;Mn.prototype.line=void 0;Mn.prototype.ancestors=void 0;Mn.prototype.cause=void 0;Mn.prototype.fatal=void 0;Mn.prototype.place=void 0;Mn.prototype.ruleId=void 0;Mn.prototype.source=void 0;const vg={}.hasOwnProperty,Uz=new Map,Fz=/[A-Z]/g,Hz=new Set(["table","tbody","thead","tfoot","tr"]),$z=new Set(["td","th"]),gS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function qz(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=Wz(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=Zz(r,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?yg:Mz,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=bS(s,e,void 0);return l&&typeof l!="string"?l:s.create(e,s.Fragment,{children:l||void 0},void 0)}function bS(e,t,r){if(t.type==="element")return Gz(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Kz(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Vz(e,t,r);if(t.type==="mdxjsEsm")return Qz(e,t);if(t.type==="root")return Yz(e,t,r);if(t.type==="text")return Xz(e,t)}function Gz(e,t,r){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=yg,e.schema=s),e.ancestors.push(t);const l=xS(e,t.tagName,!1),c=Jz(e,t);let f=wg(e,t);return Hz.has(t.tagName)&&(f=f.filter(function(m){return typeof m=="string"?!Ez(m):!0})),yS(e,c,l,t),Eg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,l,c,r)}function Kz(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}Pl(e,t.position)}function Qz(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Pl(e,t.position)}function Vz(e,t,r){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=yg,e.schema=s),e.ancestors.push(t);const l=t.name===null?e.Fragment:xS(e,t.name,!0),c=e3(e,t),f=wg(e,t);return yS(e,c,l,t),Eg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,l,c,r)}function Yz(e,t,r){const a={};return Eg(a,wg(e,t)),e.create(t,e.Fragment,a,r)}function Xz(e,t){return t.value}function yS(e,t,r,a){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=a)}function Eg(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function Zz(e,t,r){return a;function a(s,l,c,f){const p=Array.isArray(c.children)?r:t;return f?p(l,c,f):p(l,c)}}function Wz(e,t){return r;function r(a,s,l,c){const f=Array.isArray(l.children),m=xg(a);return t(s,l,c,f,{columnNumber:m?m.column-1:void 0,fileName:e,lineNumber:m?m.line:void 0},void 0)}}function Jz(e,t){const r={};let a,s;for(s in t.properties)if(s!=="children"&&vg.call(t.properties,s)){const l=t3(e,s,t.properties[s]);if(l){const[c,f]=l;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&$z.has(t.tagName)?a=f:r[c]=f}}if(a){const l=r.style||(r.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return r}function e3(e,t){const r={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const l=a.data.estree.body[0];l.type;const c=l.expression;c.type;const f=c.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else Pl(e,t.position);else{const s=a.name;let l;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,l=e.evaluater.evaluateExpression(f.expression)}else Pl(e,t.position);else l=a.value===null?!0:a.value;r[s]=l}return r}function wg(e,t){const r=[];let a=-1;const s=e.passKeys?new Map:Uz;for(;++a<t.children.length;){const l=t.children[a];let c;if(e.passKeys){const m=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(m){const p=s.get(m)||0;c=m+"-"+p,s.set(m,p+1)}}const f=bS(e,l,c);f!==void 0&&r.push(f)}return r}function t3(e,t,r){const a=Tz(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=a.commaSeparated?gz(r):Oz(r)),a.property==="style"){let s=typeof r=="object"?r:n3(e,String(r));return e.stylePropertyNameCase==="css"&&(s=r3(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?kz[a.property]||a.property:a.attribute,r]}}function n3(e,t){try{return Bz(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const a=r,s=new Mn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=gS+"#cannot-parse-style-attribute",s}}function xS(e,t,r){let a;if(!r)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let l=-1,c;for(;++l<s.length;){const f=H0(s[l])?{type:"Identifier",name:s[l]}:{type:"Literal",value:s[l]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(l&&f.type==="Literal"),optional:!1}:f}a=c}else a=H0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return vg.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);Pl(e)}function Pl(e,t){const r=new Mn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=gS+"#cannot-handle-mdx-estrees-without-createevaluater",r}function r3(e){const t={};let r;for(r in e)vg.call(e,r)&&(t[i3(r)]=e[r]);return t}function i3(e){let t=e.replace(Fz,a3);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function a3(e){return"-"+e.toLowerCase()}const bm={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},o3={};function Sg(e,t){const r=o3,a=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,s=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return vS(e,a,s)}function vS(e,t,r){if(s3(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return W0(e.children,t,r)}return Array.isArray(e)?W0(e,t,r):""}function W0(e,t,r){const a=[];let s=-1;for(;++s<e.length;)a[s]=vS(e[s],t,r);return a.join("")}function s3(e){return!!(e&&typeof e=="object")}const J0=document.createElement("i");function _g(e){const t="&"+e+";";J0.innerHTML=t;const r=J0.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function dr(e,t,r,a){const s=e.length;let l=0,c;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,r=r>0?r:0,a.length<1e4)c=Array.from(a),c.unshift(t,r),e.splice(...c);else for(r&&e.splice(t,r);l<a.length;)c=a.slice(l,l+1e4),c.unshift(t,0),e.splice(...c),l+=1e4,t+=1e4}function Sr(e,t){return e.length>0?(dr(e,e.length,0,t),e):t}const e1={}.hasOwnProperty;function ES(e){const t={};let r=-1;for(;++r<e.length;)l3(t,e[r]);return t}function l3(e,t){let r;for(r in t){const s=(e1.call(e,r)?e[r]:void 0)||(e[r]={}),l=t[r];let c;if(l)for(c in l){e1.call(s,c)||(s[c]=[]);const f=l[c];c3(s[c],Array.isArray(f)?f:f?[f]:[])}}}function c3(e,t){let r=-1;const a=[];for(;++r<t.length;)(t[r].add==="after"?e:a).push(t[r]);dr(e,0,0,a)}function wS(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Mr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const zn=wa(/[A-Za-z]/),Rn=wa(/[\dA-Za-z]/),u3=wa(/[#-'*+\--9=?A-Z^-~]/);function dd(e){return e!==null&&(e<32||e===127)}const bh=wa(/\d/),d3=wa(/[\dA-Fa-f]/),f3=wa(/[!-/:-@[-`{-~]/);function Be(e){return e!==null&&e<-2}function Dt(e){return e!==null&&(e<0||e===32)}function it(e){return e===-2||e===-1||e===32}const Pd=wa(new RegExp("\\p{P}|\\p{S}","u")),Wa=wa(/\s/);function wa(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function xs(e){const t=[];let r=-1,a=0,s=0;for(;++r<e.length;){const l=e.charCodeAt(r);let c="";if(l===37&&Rn(e.charCodeAt(r+1))&&Rn(e.charCodeAt(r+2)))s=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(c=String.fromCharCode(l));else if(l>55295&&l<57344){const f=e.charCodeAt(r+1);l<56320&&f>56319&&f<57344?(c=String.fromCharCode(l,f),s=1):c="�"}else c=String.fromCharCode(l);c&&(t.push(e.slice(a,r),encodeURIComponent(c)),a=r+s+1,c=""),s&&(r+=s,s=0)}return t.join("")+e.slice(a)}function ct(e,t,r,a){const s=a?a-1:Number.POSITIVE_INFINITY;let l=0;return c;function c(m){return it(m)?(e.enter(r),f(m)):t(m)}function f(m){return it(m)&&l++<s?(e.consume(m),f):(e.exit(r),t(m))}}const p3={tokenize:m3};function m3(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let r;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ct(e,t,"linePrefix")}function s(f){return e.enter("paragraph"),l(f)}function l(f){const m=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=m),r=m,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Be(f)?(e.consume(f),e.exit("chunkText"),l):(e.consume(f),c)}}const h3={tokenize:g3},t1={tokenize:b3};function g3(e){const t=this,r=[];let a=0,s,l,c;return f;function f(R){if(a<r.length){const O=r[a];return t.containerState=O[1],e.attempt(O[0].continuation,m,p)(R)}return p(R)}function m(R){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&M();const O=t.events.length;let P=O,D;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){D=t.events[P][1].end;break}k(a);let U=O;for(;U<t.events.length;)t.events[U][1].end={...D},U++;return dr(t.events,P+1,0,t.events.slice(O)),t.events.length=U,p(R)}return f(R)}function p(R){if(a===r.length){if(!s)return x(R);if(s.currentConstruct&&s.currentConstruct.concrete)return E(R);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(t1,g,h)(R)}function g(R){return s&&M(),k(a),x(R)}function h(R){return t.parser.lazy[t.now().line]=a!==r.length,c=t.now().offset,E(R)}function x(R){return t.containerState={},e.attempt(t1,v,E)(R)}function v(R){return a++,r.push([t.currentConstruct,t.containerState]),x(R)}function E(R){if(R===null){s&&M(),k(0),e.consume(R);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:l}),S(R)}function S(R){if(R===null){N(e.exit("chunkFlow"),!0),k(0),e.consume(R);return}return Be(R)?(e.consume(R),N(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(R),S)}function N(R,O){const P=t.sliceStream(R);if(O&&P.push(null),R.previous=l,l&&(l.next=R),l=R,s.defineSkip(R.start),s.write(P),t.parser.lazy[R.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<c&&(!s.events[D][1].end||s.events[D][1].end.offset>c))return;const U=t.events.length;let B=U,J,F;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){if(J){F=t.events[B][1].end;break}J=!0}for(k(a),D=U;D<t.events.length;)t.events[D][1].end={...F},D++;dr(t.events,B+1,0,t.events.slice(U)),t.events.length=D}}function k(R){let O=r.length;for(;O-- >R;){const P=r[O];t.containerState=P[1],P[0].exit.call(t,e)}r.length=R}function M(){s.write([null]),l=void 0,s=void 0,t.containerState._closeFlow=void 0}}function b3(e,t,r){return ct(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ls(e){if(e===null||Dt(e)||Wa(e))return 1;if(Pd(e))return 2}function Ud(e,t,r){const a=[];let s=-1;for(;++s<e.length;){const l=e[s].resolveAll;l&&!a.includes(l)&&(t=l(t,r),a.push(l))}return t}const yh={name:"attention",resolveAll:y3,tokenize:x3};function y3(e,t){let r=-1,a,s,l,c,f,m,p,g;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(a=r;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[a][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;m=e[a][1].end.offset-e[a][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const h={...e[a][1].end},x={...e[r][1].start};n1(h,-m),n1(x,m),c={type:m>1?"strongSequence":"emphasisSequence",start:h,end:{...e[a][1].end}},f={type:m>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:x},l={type:m>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[r][1].start}},s={type:m>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[r][1].start={...f.end},p=[],e[a][1].end.offset-e[a][1].start.offset&&(p=Sr(p,[["enter",e[a][1],t],["exit",e[a][1],t]])),p=Sr(p,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",l,t]]),p=Sr(p,Ud(t.parser.constructs.insideSpan.null,e.slice(a+1,r),t)),p=Sr(p,[["exit",l,t],["enter",f,t],["exit",f,t],["exit",s,t]]),e[r][1].end.offset-e[r][1].start.offset?(g=2,p=Sr(p,[["enter",e[r][1],t],["exit",e[r][1],t]])):g=0,dr(e,a-1,r-a+3,p),r=a+p.length-g-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function x3(e,t){const r=this.parser.constructs.attentionMarkers.null,a=this.previous,s=ls(a);let l;return c;function c(m){return l=m,e.enter("attentionSequence"),f(m)}function f(m){if(m===l)return e.consume(m),f;const p=e.exit("attentionSequence"),g=ls(m),h=!g||g===2&&s||r.includes(m),x=!s||s===2&&g||r.includes(a);return p._open=!!(l===42?h:h&&(s||!x)),p._close=!!(l===42?x:x&&(g||!h)),t(m)}}function n1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const v3={name:"autolink",tokenize:E3};function E3(e,t,r){let a=0;return s;function s(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(v){return zn(v)?(e.consume(v),c):v===64?r(v):p(v)}function c(v){return v===43||v===45||v===46||Rn(v)?(a=1,f(v)):p(v)}function f(v){return v===58?(e.consume(v),a=0,m):(v===43||v===45||v===46||Rn(v))&&a++<32?(e.consume(v),f):(a=0,p(v))}function m(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||dd(v)?r(v):(e.consume(v),m)}function p(v){return v===64?(e.consume(v),g):u3(v)?(e.consume(v),p):r(v)}function g(v){return Rn(v)?h(v):r(v)}function h(v){return v===46?(e.consume(v),a=0,g):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):x(v)}function x(v){if((v===45||Rn(v))&&a++<63){const E=v===45?x:h;return e.consume(v),E}return r(v)}}const tc={partial:!0,tokenize:w3};function w3(e,t,r){return a;function a(l){return it(l)?ct(e,s,"linePrefix")(l):s(l)}function s(l){return l===null||Be(l)?t(l):r(l)}}const SS={continuation:{tokenize:_3},exit:k3,name:"blockQuote",tokenize:S3};function S3(e,t,r){const a=this;return s;function s(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),l}return r(c)}function l(c){return it(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function _3(e,t,r){const a=this;return s;function s(c){return it(c)?ct(e,l,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):l(c)}function l(c){return e.attempt(SS,t,r)(c)}}function k3(e){e.exit("blockQuote")}const _S={name:"characterEscape",tokenize:N3};function N3(e,t,r){return a;function a(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),s}function s(l){return f3(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(l)}}const kS={name:"characterReference",tokenize:C3};function C3(e,t,r){const a=this;let s=0,l,c;return f;function f(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),m}function m(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),l=31,c=Rn,g(h))}function p(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,c=d3,g):(e.enter("characterReferenceValue"),l=7,c=bh,g(h))}function g(h){if(h===59&&s){const x=e.exit("characterReferenceValue");return c===Rn&&!_g(a.sliceSerialize(x))?r(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(h)&&s++<l?(e.consume(h),g):r(h)}}const r1={partial:!0,tokenize:A3},i1={concrete:!0,name:"codeFenced",tokenize:T3};function T3(e,t,r){const a=this,s={partial:!0,tokenize:P};let l=0,c=0,f;return m;function m(D){return p(D)}function p(D){const U=a.events[a.events.length-1];return l=U&&U[1].type==="linePrefix"?U[2].sliceSerialize(U[1],!0).length:0,f=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(D)}function g(D){return D===f?(c++,e.consume(D),g):c<3?r(D):(e.exit("codeFencedFenceSequence"),it(D)?ct(e,h,"whitespace")(D):h(D))}function h(D){return D===null||Be(D)?(e.exit("codeFencedFence"),a.interrupt?t(D):e.check(r1,S,O)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(D))}function x(D){return D===null||Be(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(D)):it(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ct(e,v,"whitespace")(D)):D===96&&D===f?r(D):(e.consume(D),x)}function v(D){return D===null||Be(D)?h(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(D))}function E(D){return D===null||Be(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(D)):D===96&&D===f?r(D):(e.consume(D),E)}function S(D){return e.attempt(s,O,N)(D)}function N(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),k}function k(D){return l>0&&it(D)?ct(e,M,"linePrefix",l+1)(D):M(D)}function M(D){return D===null||Be(D)?e.check(r1,S,O)(D):(e.enter("codeFlowValue"),R(D))}function R(D){return D===null||Be(D)?(e.exit("codeFlowValue"),M(D)):(e.consume(D),R)}function O(D){return e.exit("codeFenced"),t(D)}function P(D,U,B){let J=0;return F;function F(Q){return D.enter("lineEnding"),D.consume(Q),D.exit("lineEnding"),ae}function ae(Q){return D.enter("codeFencedFence"),it(Q)?ct(D,ee,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):ee(Q)}function ee(Q){return Q===f?(D.enter("codeFencedFenceSequence"),ce(Q)):B(Q)}function ce(Q){return Q===f?(J++,D.consume(Q),ce):J>=c?(D.exit("codeFencedFenceSequence"),it(Q)?ct(D,te,"whitespace")(Q):te(Q)):B(Q)}function te(Q){return Q===null||Be(Q)?(D.exit("codeFencedFence"),U(Q)):B(Q)}}}function A3(e,t,r){const a=this;return s;function s(c){return c===null?r(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l)}function l(c){return a.parser.lazy[a.now().line]?r(c):t(c)}}const ym={name:"codeIndented",tokenize:M3},R3={partial:!0,tokenize:O3};function M3(e,t,r){const a=this;return s;function s(p){return e.enter("codeIndented"),ct(e,l,"linePrefix",5)(p)}function l(p){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(p):r(p)}function c(p){return p===null?m(p):Be(p)?e.attempt(R3,c,m)(p):(e.enter("codeFlowValue"),f(p))}function f(p){return p===null||Be(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),f)}function m(p){return e.exit("codeIndented"),t(p)}}function O3(e,t,r){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?r(c):Be(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):ct(e,l,"linePrefix",5)(c)}function l(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):Be(c)?s(c):r(c)}}const D3={name:"codeText",previous:L3,resolve:j3,tokenize:I3};function j3(e){let t=e.length-4,r=3,a,s;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=r;++a<t;)if(e[a][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(a=r-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function L3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function I3(e,t,r){let a=0,s,l;return c;function c(h){return e.enter("codeText"),e.enter("codeTextSequence"),f(h)}function f(h){return h===96?(e.consume(h),a++,f):(e.exit("codeTextSequence"),m(h))}function m(h){return h===null?r(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),m):h===96?(l=e.enter("codeTextSequence"),s=0,g(h)):Be(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),m):(e.enter("codeTextData"),p(h))}function p(h){return h===null||h===32||h===96||Be(h)?(e.exit("codeTextData"),m(h)):(e.consume(h),p)}function g(h){return h===96?(e.consume(h),s++,g):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(l.type="codeTextData",p(h))}}class z3{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const a=r??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,r,a){const s=r||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&wl(this.left,a),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),wl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),wl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);wl(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);wl(this.left,r.reverse())}}}function wl(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function NS(e){const t={};let r=-1,a,s,l,c,f,m,p;const g=new z3(e);for(;++r<g.length;){for(;r in t;)r=t[r];if(a=g.get(r),r&&a[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(m=a[1]._tokenizer.events,l=0,l<m.length&&m[l][1].type==="lineEndingBlank"&&(l+=2),l<m.length&&m[l][1].type==="content"))for(;++l<m.length&&m[l][1].type!=="content";)m[l][1].type==="chunkText"&&(m[l][1]._isInFirstContentOfListItem=!0,l++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,B3(g,r)),r=t[r],p=!0);else if(a[1]._container){for(l=r,s=void 0;l--;)if(c=g.get(l),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(g.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=l);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...g.get(s)[1].start},f=g.slice(s,r),f.unshift(a),g.splice(s,r-s+1,f))}}return dr(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!p}function B3(e,t){const r=e.get(t)[1],a=e.get(t)[2];let s=t-1;const l=[];let c=r._tokenizer;c||(c=a.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,m=[],p={};let g,h,x=-1,v=r,E=0,S=0;const N=[S];for(;v;){for(;e.get(++s)[1]!==v;);l.push(s),v._tokenizer||(g=a.sliceStream(v),v.next||g.push(null),h&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),h=v,v=v.next}for(v=r;++x<f.length;)f[x][0]==="exit"&&f[x-1][0]==="enter"&&f[x][1].type===f[x-1][1].type&&f[x][1].start.line!==f[x][1].end.line&&(S=x+1,N.push(S),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):N.pop(),x=N.length;x--;){const k=f.slice(N[x],N[x+1]),M=l.pop();m.push([M,M+k.length-1]),e.splice(M,2,k)}for(m.reverse(),x=-1;++x<m.length;)p[E+m[x][0]]=E+m[x][1],E+=m[x][1]-m[x][0]-1;return p}const P3={resolve:F3,tokenize:H3},U3={partial:!0,tokenize:$3};function F3(e){return NS(e),e}function H3(e,t){let r;return a;function a(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?l(f):Be(f)?e.check(U3,c,l)(f):(e.consume(f),s)}function l(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,s}}function $3(e,t,r){const a=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),ct(e,l,"linePrefix")}function l(c){if(c===null||Be(c))return r(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,r,t)(c)}}function CS(e,t,r,a,s,l,c,f,m){const p=m||Number.POSITIVE_INFINITY;let g=0;return h;function h(k){return k===60?(e.enter(a),e.enter(s),e.enter(l),e.consume(k),e.exit(l),x):k===null||k===32||k===41||dd(k)?r(k):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),S(k))}function x(k){return k===62?(e.enter(l),e.consume(k),e.exit(l),e.exit(s),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(k))}function v(k){return k===62?(e.exit("chunkString"),e.exit(f),x(k)):k===null||k===60||Be(k)?r(k):(e.consume(k),k===92?E:v)}function E(k){return k===60||k===62||k===92?(e.consume(k),v):v(k)}function S(k){return!g&&(k===null||k===41||Dt(k))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(k)):g<p&&k===40?(e.consume(k),g++,S):k===41?(e.consume(k),g--,S):k===null||k===32||k===40||dd(k)?r(k):(e.consume(k),k===92?N:S)}function N(k){return k===40||k===41||k===92?(e.consume(k),S):S(k)}}function TS(e,t,r,a,s,l){const c=this;let f=0,m;return p;function p(v){return e.enter(a),e.enter(s),e.consume(v),e.exit(s),e.enter(l),g}function g(v){return f>999||v===null||v===91||v===93&&!m||v===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?r(v):v===93?(e.exit(l),e.enter(s),e.consume(v),e.exit(s),e.exit(a),t):Be(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===null||v===91||v===93||Be(v)||f++>999?(e.exit("chunkString"),g(v)):(e.consume(v),m||(m=!it(v)),v===92?x:h)}function x(v){return v===91||v===92||v===93?(e.consume(v),f++,h):h(v)}}function AS(e,t,r,a,s,l){let c;return f;function f(x){return x===34||x===39||x===40?(e.enter(a),e.enter(s),e.consume(x),e.exit(s),c=x===40?41:x,m):r(x)}function m(x){return x===c?(e.enter(s),e.consume(x),e.exit(s),e.exit(a),t):(e.enter(l),p(x))}function p(x){return x===c?(e.exit(l),m(c)):x===null?r(x):Be(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),ct(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===c||x===null||Be(x)?(e.exit("chunkString"),p(x)):(e.consume(x),x===92?h:g)}function h(x){return x===c||x===92?(e.consume(x),g):g(x)}}function Al(e,t){let r;return a;function a(s){return Be(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),r=!0,a):it(s)?ct(e,a,r?"linePrefix":"lineSuffix")(s):t(s)}}const q3={name:"definition",tokenize:K3},G3={partial:!0,tokenize:Q3};function K3(e,t,r){const a=this;let s;return l;function l(v){return e.enter("definition"),c(v)}function c(v){return TS.call(a,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return s=Mr(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),m):r(v)}function m(v){return Dt(v)?Al(e,p)(v):p(v)}function p(v){return CS(e,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return e.attempt(G3,h,h)(v)}function h(v){return it(v)?ct(e,x,"whitespace")(v):x(v)}function x(v){return v===null||Be(v)?(e.exit("definition"),a.parser.defined.push(s),t(v)):r(v)}}function Q3(e,t,r){return a;function a(f){return Dt(f)?Al(e,s)(f):r(f)}function s(f){return AS(e,l,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function l(f){return it(f)?ct(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Be(f)?t(f):r(f)}}const V3={name:"hardBreakEscape",tokenize:Y3};function Y3(e,t,r){return a;function a(l){return e.enter("hardBreakEscape"),e.consume(l),s}function s(l){return Be(l)?(e.exit("hardBreakEscape"),t(l)):r(l)}}const X3={name:"headingAtx",resolve:Z3,tokenize:W3};function Z3(e,t){let r=e.length-2,a=3,s,l;return e[a][1].type==="whitespace"&&(a+=2),r-2>a&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(a===r-1||r-4>a&&e[r-2][1].type==="whitespace")&&(r-=a+1===r?2:4),r>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[r][1].end},l={type:"chunkText",start:e[a][1].start,end:e[r][1].end,contentType:"text"},dr(e,a,r-a+1,[["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]])),e}function W3(e,t,r){let a=0;return s;function s(g){return e.enter("atxHeading"),l(g)}function l(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(e.consume(g),c):g===null||Dt(g)?(e.exit("atxHeadingSequence"),f(g)):r(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),m(g)):g===null||Be(g)?(e.exit("atxHeading"),t(g)):it(g)?ct(e,f,"whitespace")(g):(e.enter("atxHeadingText"),p(g))}function m(g){return g===35?(e.consume(g),m):(e.exit("atxHeadingSequence"),f(g))}function p(g){return g===null||g===35||Dt(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),p)}}const J3=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],a1=["pre","script","style","textarea"],e4={concrete:!0,name:"htmlFlow",resolveTo:r4,tokenize:i4},t4={partial:!0,tokenize:o4},n4={partial:!0,tokenize:a4};function r4(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function i4(e,t,r){const a=this;let s,l,c,f,m;return p;function p(A){return g(A)}function g(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),h}function h(A){return A===33?(e.consume(A),x):A===47?(e.consume(A),l=!0,S):A===63?(e.consume(A),s=3,a.interrupt?t:T):zn(A)?(e.consume(A),c=String.fromCharCode(A),N):r(A)}function x(A){return A===45?(e.consume(A),s=2,v):A===91?(e.consume(A),s=5,f=0,E):zn(A)?(e.consume(A),s=4,a.interrupt?t:T):r(A)}function v(A){return A===45?(e.consume(A),a.interrupt?t:T):r(A)}function E(A){const $="CDATA[";return A===$.charCodeAt(f++)?(e.consume(A),f===$.length?a.interrupt?t:ee:E):r(A)}function S(A){return zn(A)?(e.consume(A),c=String.fromCharCode(A),N):r(A)}function N(A){if(A===null||A===47||A===62||Dt(A)){const $=A===47,ue=c.toLowerCase();return!$&&!l&&a1.includes(ue)?(s=1,a.interrupt?t(A):ee(A)):J3.includes(c.toLowerCase())?(s=6,$?(e.consume(A),k):a.interrupt?t(A):ee(A)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?r(A):l?M(A):R(A))}return A===45||Rn(A)?(e.consume(A),c+=String.fromCharCode(A),N):r(A)}function k(A){return A===62?(e.consume(A),a.interrupt?t:ee):r(A)}function M(A){return it(A)?(e.consume(A),M):F(A)}function R(A){return A===47?(e.consume(A),F):A===58||A===95||zn(A)?(e.consume(A),O):it(A)?(e.consume(A),R):F(A)}function O(A){return A===45||A===46||A===58||A===95||Rn(A)?(e.consume(A),O):P(A)}function P(A){return A===61?(e.consume(A),D):it(A)?(e.consume(A),P):R(A)}function D(A){return A===null||A===60||A===61||A===62||A===96?r(A):A===34||A===39?(e.consume(A),m=A,U):it(A)?(e.consume(A),D):B(A)}function U(A){return A===m?(e.consume(A),m=null,J):A===null||Be(A)?r(A):(e.consume(A),U)}function B(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Dt(A)?P(A):(e.consume(A),B)}function J(A){return A===47||A===62||it(A)?R(A):r(A)}function F(A){return A===62?(e.consume(A),ae):r(A)}function ae(A){return A===null||Be(A)?ee(A):it(A)?(e.consume(A),ae):r(A)}function ee(A){return A===45&&s===2?(e.consume(A),j):A===60&&s===1?(e.consume(A),V):A===62&&s===4?(e.consume(A),I):A===63&&s===3?(e.consume(A),T):A===93&&s===5?(e.consume(A),ie):Be(A)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(t4,q,ce)(A)):A===null||Be(A)?(e.exit("htmlFlowData"),ce(A)):(e.consume(A),ee)}function ce(A){return e.check(n4,te,q)(A)}function te(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),Q}function Q(A){return A===null||Be(A)?ce(A):(e.enter("htmlFlowData"),ee(A))}function j(A){return A===45?(e.consume(A),T):ee(A)}function V(A){return A===47?(e.consume(A),c="",Z):ee(A)}function Z(A){if(A===62){const $=c.toLowerCase();return a1.includes($)?(e.consume(A),I):ee(A)}return zn(A)&&c.length<8?(e.consume(A),c+=String.fromCharCode(A),Z):ee(A)}function ie(A){return A===93?(e.consume(A),T):ee(A)}function T(A){return A===62?(e.consume(A),I):A===45&&s===2?(e.consume(A),T):ee(A)}function I(A){return A===null||Be(A)?(e.exit("htmlFlowData"),q(A)):(e.consume(A),I)}function q(A){return e.exit("htmlFlow"),t(A)}}function a4(e,t,r){const a=this;return s;function s(c){return Be(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):r(c)}function l(c){return a.parser.lazy[a.now().line]?r(c):t(c)}}function o4(e,t,r){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(tc,t,r)}}const s4={name:"htmlText",tokenize:l4};function l4(e,t,r){const a=this;let s,l,c;return f;function f(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),m}function m(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),P):T===63?(e.consume(T),R):zn(T)?(e.consume(T),B):r(T)}function p(T){return T===45?(e.consume(T),g):T===91?(e.consume(T),l=0,E):zn(T)?(e.consume(T),M):r(T)}function g(T){return T===45?(e.consume(T),v):r(T)}function h(T){return T===null?r(T):T===45?(e.consume(T),x):Be(T)?(c=h,V(T)):(e.consume(T),h)}function x(T){return T===45?(e.consume(T),v):h(T)}function v(T){return T===62?j(T):T===45?x(T):h(T)}function E(T){const I="CDATA[";return T===I.charCodeAt(l++)?(e.consume(T),l===I.length?S:E):r(T)}function S(T){return T===null?r(T):T===93?(e.consume(T),N):Be(T)?(c=S,V(T)):(e.consume(T),S)}function N(T){return T===93?(e.consume(T),k):S(T)}function k(T){return T===62?j(T):T===93?(e.consume(T),k):S(T)}function M(T){return T===null||T===62?j(T):Be(T)?(c=M,V(T)):(e.consume(T),M)}function R(T){return T===null?r(T):T===63?(e.consume(T),O):Be(T)?(c=R,V(T)):(e.consume(T),R)}function O(T){return T===62?j(T):R(T)}function P(T){return zn(T)?(e.consume(T),D):r(T)}function D(T){return T===45||Rn(T)?(e.consume(T),D):U(T)}function U(T){return Be(T)?(c=U,V(T)):it(T)?(e.consume(T),U):j(T)}function B(T){return T===45||Rn(T)?(e.consume(T),B):T===47||T===62||Dt(T)?J(T):r(T)}function J(T){return T===47?(e.consume(T),j):T===58||T===95||zn(T)?(e.consume(T),F):Be(T)?(c=J,V(T)):it(T)?(e.consume(T),J):j(T)}function F(T){return T===45||T===46||T===58||T===95||Rn(T)?(e.consume(T),F):ae(T)}function ae(T){return T===61?(e.consume(T),ee):Be(T)?(c=ae,V(T)):it(T)?(e.consume(T),ae):J(T)}function ee(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),s=T,ce):Be(T)?(c=ee,V(T)):it(T)?(e.consume(T),ee):(e.consume(T),te)}function ce(T){return T===s?(e.consume(T),s=void 0,Q):T===null?r(T):Be(T)?(c=ce,V(T)):(e.consume(T),ce)}function te(T){return T===null||T===34||T===39||T===60||T===61||T===96?r(T):T===47||T===62||Dt(T)?J(T):(e.consume(T),te)}function Q(T){return T===47||T===62||Dt(T)?J(T):r(T)}function j(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):r(T)}function V(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Z}function Z(T){return it(T)?ct(e,ie,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):ie(T)}function ie(T){return e.enter("htmlTextData"),c(T)}}const kg={name:"labelEnd",resolveAll:f4,resolveTo:p4,tokenize:m4},c4={tokenize:h4},u4={tokenize:g4},d4={tokenize:b4};function f4(e){let t=-1;const r=[];for(;++t<e.length;){const a=e[t][1];if(r.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",t+=s}}return e.length!==r.length&&dr(e,0,e.length,r),e}function p4(e,t){let r=e.length,a=0,s,l,c,f;for(;r--;)if(s=e[r][1],l){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[r][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[r][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(l=r,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(c=r);const m={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[l][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[l+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",m,t],["enter",p,t]],f=Sr(f,e.slice(l+1,l+a+3)),f=Sr(f,[["enter",g,t]]),f=Sr(f,Ud(t.parser.constructs.insideSpan.null,e.slice(l+a+4,c-3),t)),f=Sr(f,[["exit",g,t],e[c-2],e[c-1],["exit",p,t]]),f=Sr(f,e.slice(c+1)),f=Sr(f,[["exit",m,t]]),dr(e,l,e.length,f),e}function m4(e,t,r){const a=this;let s=a.events.length,l,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){l=a.events[s][1];break}return f;function f(x){return l?l._inactive?h(x):(c=a.parser.defined.includes(Mr(a.sliceSerialize({start:l.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),m):r(x)}function m(x){return x===40?e.attempt(c4,g,c?g:h)(x):x===91?e.attempt(u4,g,c?p:h)(x):c?g(x):h(x)}function p(x){return e.attempt(d4,g,h)(x)}function g(x){return t(x)}function h(x){return l._balanced=!0,r(x)}}function h4(e,t,r){return a;function a(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),s}function s(h){return Dt(h)?Al(e,l)(h):l(h)}function l(h){return h===41?g(h):CS(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function c(h){return Dt(h)?Al(e,m)(h):g(h)}function f(h){return r(h)}function m(h){return h===34||h===39||h===40?AS(e,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):g(h)}function p(h){return Dt(h)?Al(e,g)(h):g(h)}function g(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):r(h)}}function g4(e,t,r){const a=this;return s;function s(f){return TS.call(a,e,l,c,"reference","referenceMarker","referenceString")(f)}function l(f){return a.parser.defined.includes(Mr(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):r(f)}function c(f){return r(f)}}function b4(e,t,r){return a;function a(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),s}function s(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):r(l)}}const y4={name:"labelStartImage",resolveAll:kg.resolveAll,tokenize:x4};function x4(e,t,r){const a=this;return s;function s(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),l}function l(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):r(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(f):t(f)}}const v4={name:"labelStartLink",resolveAll:kg.resolveAll,tokenize:E4};function E4(e,t,r){const a=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),l}function l(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(c):t(c)}}const xm={name:"lineEnding",tokenize:w4};function w4(e,t){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ct(e,t,"linePrefix")}}const Wu={name:"thematicBreak",tokenize:S4};function S4(e,t,r){let a=0,s;return l;function l(p){return e.enter("thematicBreak"),c(p)}function c(p){return s=p,f(p)}function f(p){return p===s?(e.enter("thematicBreakSequence"),m(p)):a>=3&&(p===null||Be(p))?(e.exit("thematicBreak"),t(p)):r(p)}function m(p){return p===s?(e.consume(p),a++,m):(e.exit("thematicBreakSequence"),it(p)?ct(e,f,"whitespace")(p):f(p))}}const Vn={continuation:{tokenize:C4},exit:A4,name:"list",tokenize:N4},_4={partial:!0,tokenize:R4},k4={partial:!0,tokenize:T4};function N4(e,t,r){const a=this,s=a.events[a.events.length-1];let l=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return f;function f(v){const E=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:bh(v)){if(a.containerState.type||(a.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Wu,r,p)(v):p(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),m(v)}return r(v)}function m(v){return bh(v)&&++c<10?(e.consume(v),m):(!a.interrupt||c<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),p(v)):r(v)}function p(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(tc,a.interrupt?r:g,e.attempt(_4,x,h))}function g(v){return a.containerState.initialBlankLine=!0,l++,x(v)}function h(v){return it(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),x):r(v)}function x(v){return a.containerState.size=l+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function C4(e,t,r){const a=this;return a.containerState._closeFlow=void 0,e.check(tc,s,l);function s(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,ct(e,t,"listItemIndent",a.containerState.size+1)(f)}function l(f){return a.containerState.furtherBlankLines||!it(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(k4,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,ct(e,e.attempt(Vn,t,r),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function T4(e,t,r){const a=this;return ct(e,s,"listItemIndent",a.containerState.size+1);function s(l){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(l):r(l)}}function A4(e){e.exit(this.containerState.type)}function R4(e,t,r){const a=this;return ct(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(l){const c=a.events[a.events.length-1];return!it(l)&&c&&c[1].type==="listItemPrefixWhitespace"?t(l):r(l)}}const o1={name:"setextUnderline",resolveTo:M4,tokenize:O4};function M4(e,t){let r=e.length,a,s,l;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){a=r;break}e[r][1].type==="paragraph"&&(s=r)}else e[r][1].type==="content"&&e.splice(r,1),!l&&e[r][1].type==="definition"&&(l=r);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",l?(e.splice(s,0,["enter",c,t]),e.splice(l+1,0,["exit",e[a][1],t]),e[a][1].end={...e[l][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function O4(e,t,r){const a=this;let s;return l;function l(p){let g=a.events.length,h;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){h=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||h)?(e.enter("setextHeadingLine"),s=p,c(p)):r(p)}function c(p){return e.enter("setextHeadingLineSequence"),f(p)}function f(p){return p===s?(e.consume(p),f):(e.exit("setextHeadingLineSequence"),it(p)?ct(e,m,"lineSuffix")(p):m(p))}function m(p){return p===null||Be(p)?(e.exit("setextHeadingLine"),t(p)):r(p)}}const D4={tokenize:j4};function j4(e){const t=this,r=e.attempt(tc,a,e.attempt(this.parser.constructs.flowInitial,s,ct(e,e.attempt(this.parser.constructs.flow,s,e.attempt(P3,s)),"linePrefix")));return r;function a(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function s(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const L4={resolveAll:MS()},I4=RS("string"),z4=RS("text");function RS(e){return{resolveAll:MS(e==="text"?B4:void 0),tokenize:t};function t(r){const a=this,s=this.parser.constructs[e],l=r.attempt(s,c,f);return c;function c(g){return p(g)?l(g):f(g)}function f(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),m}function m(g){return p(g)?(r.exit("data"),l(g)):(r.consume(g),m)}function p(g){if(g===null)return!0;const h=s[g];let x=-1;if(h)for(;++x<h.length;){const v=h[x];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function MS(e){return t;function t(r,a){let s=-1,l;for(;++s<=r.length;)l===void 0?r[s]&&r[s][1].type==="data"&&(l=s,s++):(!r[s]||r[s][1].type!=="data")&&(s!==l+2&&(r[l][1].end=r[s-1][1].end,r.splice(l+2,s-l-2),s=l+2),l=void 0);return e?e(r,a):r}}function B4(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const a=e[r-1][1],s=t.sliceStream(a);let l=s.length,c=-1,f=0,m;for(;l--;){const p=s[l];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(p===-2)m=!0,f++;else if(p!==-1){l++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(f=0),f){const p={type:r===e.length||m||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?c:a.start._bufferIndex+c,_index:a.start._index+l,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...p.start},a.start.offset===a.end.offset?Object.assign(a,p):(e.splice(r,0,["enter",p,t],["exit",p,t]),r+=2)}r++}return e}const P4={42:Vn,43:Vn,45:Vn,48:Vn,49:Vn,50:Vn,51:Vn,52:Vn,53:Vn,54:Vn,55:Vn,56:Vn,57:Vn,62:SS},U4={91:q3},F4={[-2]:ym,[-1]:ym,32:ym},H4={35:X3,42:Wu,45:[o1,Wu],60:e4,61:o1,95:Wu,96:i1,126:i1},$4={38:kS,92:_S},q4={[-5]:xm,[-4]:xm,[-3]:xm,33:y4,38:kS,42:yh,60:[v3,s4],91:v4,92:[V3,_S],93:kg,95:yh,96:D3},G4={null:[yh,L4]},K4={null:[42,95]},Q4={null:[]},V4=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:K4,contentInitial:U4,disable:Q4,document:P4,flow:H4,flowInitial:F4,insideSpan:G4,string:$4,text:q4},Symbol.toStringTag,{value:"Module"}));function Y4(e,t,r){let a={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const s={},l=[];let c=[],f=[];const m={attempt:U(P),check:U(D),consume:M,enter:R,exit:O,interrupt:U(D,{interrupt:!0})},p={code:null,containerState:{},defineSkip:S,events:[],now:E,parser:e,previous:null,sliceSerialize:x,sliceStream:v,write:h};let g=t.tokenize.call(p,m);return t.resolveAll&&l.push(t),p;function h(ae){return c=Sr(c,ae),N(),c[c.length-1]!==null?[]:(B(t,0),p.events=Ud(l,p.events,p),p.events)}function x(ae,ee){return Z4(v(ae),ee)}function v(ae){return X4(c,ae)}function E(){const{_bufferIndex:ae,_index:ee,line:ce,column:te,offset:Q}=a;return{_bufferIndex:ae,_index:ee,line:ce,column:te,offset:Q}}function S(ae){s[ae.line]=ae.column,F()}function N(){let ae;for(;a._index<c.length;){const ee=c[a._index];if(typeof ee=="string")for(ae=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===ae&&a._bufferIndex<ee.length;)k(ee.charCodeAt(a._bufferIndex));else k(ee)}}function k(ae){g=g(ae)}function M(ae){Be(ae)?(a.line++,a.column=1,a.offset+=ae===-3?2:1,F()):ae!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),p.previous=ae}function R(ae,ee){const ce=ee||{};return ce.type=ae,ce.start=E(),p.events.push(["enter",ce,p]),f.push(ce),ce}function O(ae){const ee=f.pop();return ee.end=E(),p.events.push(["exit",ee,p]),ee}function P(ae,ee){B(ae,ee.from)}function D(ae,ee){ee.restore()}function U(ae,ee){return ce;function ce(te,Q,j){let V,Z,ie,T;return Array.isArray(te)?q(te):"tokenize"in te?q([te]):I(te);function I(de){return Se;function Se(Ee){const Ce=Ee!==null&&de[Ee],dt=Ee!==null&&de.null,St=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(dt)?dt:dt?[dt]:[]];return q(St)(Ee)}}function q(de){return V=de,Z=0,de.length===0?j:A(de[Z])}function A(de){return Se;function Se(Ee){return T=J(),ie=de,de.partial||(p.currentConstruct=de),de.name&&p.parser.constructs.disable.null.includes(de.name)?ue():de.tokenize.call(ee?Object.assign(Object.create(p),ee):p,m,$,ue)(Ee)}}function $(de){return ae(ie,T),Q}function ue(de){return T.restore(),++Z<V.length?A(V[Z]):j}}}function B(ae,ee){ae.resolveAll&&!l.includes(ae)&&l.push(ae),ae.resolve&&dr(p.events,ee,p.events.length-ee,ae.resolve(p.events.slice(ee),p)),ae.resolveTo&&(p.events=ae.resolveTo(p.events,p))}function J(){const ae=E(),ee=p.previous,ce=p.currentConstruct,te=p.events.length,Q=Array.from(f);return{from:te,restore:j};function j(){a=ae,p.previous=ee,p.currentConstruct=ce,p.events.length=te,f=Q,F()}}function F(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function X4(e,t){const r=t.start._index,a=t.start._bufferIndex,s=t.end._index,l=t.end._bufferIndex;let c;if(r===s)c=[e[r].slice(a,l)];else{if(c=e.slice(r,s),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}l>0&&c.push(e[s].slice(0,l))}return c}function Z4(e,t){let r=-1;const a=[];let s;for(;++r<e.length;){const l=e[r];let c;if(typeof l=="string")c=l;else switch(l){case-5:{c="\r";break}case-4:{c=`
|
|
15
|
-
`;break}case-3:{c=`\r
|
|
16
|
-
`;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&s)continue;c=" ";break}default:c=String.fromCharCode(l)}s=l===-2,a.push(c)}return a.join("")}function W4(e){const a={constructs:ES([V4,...(e||{}).extensions||[]]),content:s(p3),defined:[],document:s(h3),flow:s(D4),lazy:{},string:s(I4),text:s(z4)};return a;function s(l){return c;function c(f){return Y4(a,l,f)}}}function J4(e){for(;!NS(e););return e}const s1=/[\0\t\n\r]/g;function e5(){let e=1,t="",r=!0,a;return s;function s(l,c,f){const m=[];let p,g,h,x,v;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(c||void 0).decode(l)),h=0,t="",r&&(l.charCodeAt(0)===65279&&h++,r=void 0);h<l.length;){if(s1.lastIndex=h,p=s1.exec(l),x=p&&p.index!==void 0?p.index:l.length,v=l.charCodeAt(x),!p){t=l.slice(h);break}if(v===10&&h===x&&a)m.push(-3),a=void 0;else switch(a&&(m.push(-5),a=void 0),h<x&&(m.push(l.slice(h,x)),e+=x-h),v){case 0:{m.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,m.push(-2);e++<g;)m.push(-1);break}case 10:{m.push(-4),e=1;break}default:a=!0,e=1}h=x+1}return f&&(a&&m.push(-5),t&&m.push(t),m.push(null)),m}}const t5=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function n5(e){return e.replace(t5,r5)}function r5(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const s=r.charCodeAt(1),l=s===120||s===88;return wS(r.slice(l?2:1),l?16:10)}return _g(r)||e}const OS={}.hasOwnProperty;function i5(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),a5(r)(J4(W4(r).document().write(e5()(e,t,!0))))}function a5(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l($t),autolinkProtocol:J,autolinkEmail:J,atxHeading:l(On),blockQuote:l(dt),characterEscape:J,characterReference:J,codeFenced:l(St),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:l(St,c),codeText:l(Lt,c),codeTextData:J,data:J,codeFlowValue:J,definition:l(ln),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:l(gt),hardBreakEscape:l(Je),hardBreakTrailing:l(Je),htmlFlow:l(cn,c),htmlFlowData:J,htmlText:l(cn,c),htmlTextData:J,image:l(bn),label:c,link:l($t),listItem:l(kr),listItemValue:x,listOrdered:l(Pn,h),listUnordered:l(Pn),paragraph:l(Qt),reference:A,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:l(On),strong:l(un),thematicBreak:l(Qe)},exit:{atxHeading:m(),atxHeadingSequence:P,autolink:m(),autolinkEmail:Ce,autolinkProtocol:Ee,blockQuote:m(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:de,characterReference:Se,codeFenced:m(N),codeFencedFence:S,codeFencedFenceInfo:v,codeFencedFenceMeta:E,codeFlowValue:F,codeIndented:m(k),codeText:m(Q),codeTextData:F,data:F,definition:m(),definitionDestinationString:O,definitionLabelString:M,definitionTitleString:R,emphasis:m(),hardBreakEscape:m(ee),hardBreakTrailing:m(ee),htmlFlow:m(ce),htmlFlowData:F,htmlText:m(te),htmlTextData:F,image:m(V),label:ie,labelText:Z,lineEnding:ae,link:m(j),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:$,resourceDestinationString:T,resourceTitleString:I,resource:q,setextHeading:m(B),setextHeadingLineSequence:U,setextHeadingText:D,strong:m(),thematicBreak:m()}};DS(t,(e||{}).mdastExtensions||[]);const r={};return a;function a(K){let pe={type:"root",children:[]};const we={stack:[pe],tokenStack:[],config:t,enter:f,exit:p,buffer:c,resume:g,data:r},$e=[];let Te=-1;for(;++Te<K.length;)if(K[Te][1].type==="listOrdered"||K[Te][1].type==="listUnordered")if(K[Te][0]==="enter")$e.push(Te);else{const Vt=$e.pop();Te=s(K,Vt,Te)}for(Te=-1;++Te<K.length;){const Vt=t[K[Te][0]];OS.call(Vt,K[Te][1].type)&&Vt[K[Te][1].type].call(Object.assign({sliceSerialize:K[Te][2].sliceSerialize},we),K[Te][1])}if(we.tokenStack.length>0){const Vt=we.tokenStack[we.tokenStack.length-1];(Vt[1]||l1).call(we,void 0,Vt[0])}for(pe.position={start:ma(K.length>0?K[0][1].start:{line:1,column:1,offset:0}),end:ma(K.length>0?K[K.length-2][1].end:{line:1,column:1,offset:0})},Te=-1;++Te<t.transforms.length;)pe=t.transforms[Te](pe)||pe;return pe}function s(K,pe,we){let $e=pe-1,Te=-1,Vt=!1,Jt,qt,Bt,dn;for(;++$e<=we;){const ft=K[$e];switch(ft[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ft[0]==="enter"?Te++:Te--,dn=void 0;break}case"lineEndingBlank":{ft[0]==="enter"&&(Jt&&!dn&&!Te&&!Bt&&(Bt=$e),dn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:dn=void 0}if(!Te&&ft[0]==="enter"&&ft[1].type==="listItemPrefix"||Te===-1&&ft[0]==="exit"&&(ft[1].type==="listUnordered"||ft[1].type==="listOrdered")){if(Jt){let pr=$e;for(qt=void 0;pr--;){const fn=K[pr];if(fn[1].type==="lineEnding"||fn[1].type==="lineEndingBlank"){if(fn[0]==="exit")continue;qt&&(K[qt][1].type="lineEndingBlank",Vt=!0),fn[1].type="lineEnding",qt=pr}else if(!(fn[1].type==="linePrefix"||fn[1].type==="blockQuotePrefix"||fn[1].type==="blockQuotePrefixWhitespace"||fn[1].type==="blockQuoteMarker"||fn[1].type==="listItemIndent"))break}Bt&&(!qt||Bt<qt)&&(Jt._spread=!0),Jt.end=Object.assign({},qt?K[qt][1].start:ft[1].end),K.splice(qt||$e,0,["exit",Jt,ft[2]]),$e++,we++}if(ft[1].type==="listItemPrefix"){const pr={type:"listItem",_spread:!1,start:Object.assign({},ft[1].start),end:void 0};Jt=pr,K.splice($e,0,["enter",pr,ft[2]]),$e++,we++,Bt=void 0,dn=!0}}}return K[pe][1]._spread=Vt,we}function l(K,pe){return we;function we($e){f.call(this,K($e),$e),pe&&pe.call(this,$e)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(K,pe,we){this.stack[this.stack.length-1].children.push(K),this.stack.push(K),this.tokenStack.push([pe,we||void 0]),K.position={start:ma(pe.start),end:void 0}}function m(K){return pe;function pe(we){K&&K.call(this,we),p.call(this,we)}}function p(K,pe){const we=this.stack.pop(),$e=this.tokenStack.pop();if($e)$e[0].type!==K.type&&(pe?pe.call(this,K,$e[0]):($e[1]||l1).call(this,K,$e[0]));else throw new Error("Cannot close `"+K.type+"` ("+Tl({start:K.start,end:K.end})+"): it’s not open");we.position.end=ma(K.end)}function g(){return Sg(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function x(K){if(this.data.expectingFirstListItemValue){const pe=this.stack[this.stack.length-2];pe.start=Number.parseInt(this.sliceSerialize(K),10),this.data.expectingFirstListItemValue=void 0}}function v(){const K=this.resume(),pe=this.stack[this.stack.length-1];pe.lang=K}function E(){const K=this.resume(),pe=this.stack[this.stack.length-1];pe.meta=K}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const K=this.resume(),pe=this.stack[this.stack.length-1];pe.value=K.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const K=this.resume(),pe=this.stack[this.stack.length-1];pe.value=K.replace(/(\r?\n|\r)$/g,"")}function M(K){const pe=this.resume(),we=this.stack[this.stack.length-1];we.label=pe,we.identifier=Mr(this.sliceSerialize(K)).toLowerCase()}function R(){const K=this.resume(),pe=this.stack[this.stack.length-1];pe.title=K}function O(){const K=this.resume(),pe=this.stack[this.stack.length-1];pe.url=K}function P(K){const pe=this.stack[this.stack.length-1];if(!pe.depth){const we=this.sliceSerialize(K).length;pe.depth=we}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function U(K){const pe=this.stack[this.stack.length-1];pe.depth=this.sliceSerialize(K).codePointAt(0)===61?1:2}function B(){this.data.setextHeadingSlurpLineEnding=void 0}function J(K){const we=this.stack[this.stack.length-1].children;let $e=we[we.length-1];(!$e||$e.type!=="text")&&($e=fe(),$e.position={start:ma(K.start),end:void 0},we.push($e)),this.stack.push($e)}function F(K){const pe=this.stack.pop();pe.value+=this.sliceSerialize(K),pe.position.end=ma(K.end)}function ae(K){const pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=pe.children[pe.children.length-1];we.position.end=ma(K.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(pe.type)&&(J.call(this,K),F.call(this,K))}function ee(){this.data.atHardBreak=!0}function ce(){const K=this.resume(),pe=this.stack[this.stack.length-1];pe.value=K}function te(){const K=this.resume(),pe=this.stack[this.stack.length-1];pe.value=K}function Q(){const K=this.resume(),pe=this.stack[this.stack.length-1];pe.value=K}function j(){const K=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=pe,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function V(){const K=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=pe,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function Z(K){const pe=this.sliceSerialize(K),we=this.stack[this.stack.length-2];we.label=n5(pe),we.identifier=Mr(pe).toLowerCase()}function ie(){const K=this.stack[this.stack.length-1],pe=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const $e=K.children;we.children=$e}else we.alt=pe}function T(){const K=this.resume(),pe=this.stack[this.stack.length-1];pe.url=K}function I(){const K=this.resume(),pe=this.stack[this.stack.length-1];pe.title=K}function q(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function $(K){const pe=this.resume(),we=this.stack[this.stack.length-1];we.label=pe,we.identifier=Mr(this.sliceSerialize(K)).toLowerCase(),this.data.referenceType="full"}function ue(K){this.data.characterReferenceType=K.type}function de(K){const pe=this.sliceSerialize(K),we=this.data.characterReferenceType;let $e;we?($e=wS(pe,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$e=_g(pe);const Te=this.stack[this.stack.length-1];Te.value+=$e}function Se(K){const pe=this.stack.pop();pe.position.end=ma(K.end)}function Ee(K){F.call(this,K);const pe=this.stack[this.stack.length-1];pe.url=this.sliceSerialize(K)}function Ce(K){F.call(this,K);const pe=this.stack[this.stack.length-1];pe.url="mailto:"+this.sliceSerialize(K)}function dt(){return{type:"blockquote",children:[]}}function St(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function ln(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function gt(){return{type:"emphasis",children:[]}}function On(){return{type:"heading",depth:0,children:[]}}function Je(){return{type:"break"}}function cn(){return{type:"html",value:""}}function bn(){return{type:"image",title:null,url:"",alt:null}}function $t(){return{type:"link",title:null,url:"",children:[]}}function Pn(K){return{type:"list",ordered:K.type==="listOrdered",start:null,spread:K._spread,children:[]}}function kr(K){return{type:"listItem",spread:K._spread,checked:null,children:[]}}function Qt(){return{type:"paragraph",children:[]}}function un(){return{type:"strong",children:[]}}function fe(){return{type:"text",value:""}}function Qe(){return{type:"thematicBreak"}}}function ma(e){return{line:e.line,column:e.column,offset:e.offset}}function DS(e,t){let r=-1;for(;++r<t.length;){const a=t[r];Array.isArray(a)?DS(e,a):o5(e,a)}}function o5(e,t){let r;for(r in t)if(OS.call(t,r))switch(r){case"canContainEols":{const a=t[r];a&&e[r].push(...a);break}case"transforms":{const a=t[r];a&&e[r].push(...a);break}case"enter":case"exit":{const a=t[r];a&&Object.assign(e[r],a);break}}}function l1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Tl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Tl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Tl({start:t.start,end:t.end})+") is still open")}function s5(e){const t=this;t.parser=r;function r(a){return i5(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function l5(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function c5(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
17
|
-
`}]}function u5(e,t){const r=t.value?t.value+`
|
|
18
|
-
`:"",a={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let l={type:"element",tagName:"code",properties:a,children:[{type:"text",value:r}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function d5(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function f5(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function p5(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=xs(a.toLowerCase()),l=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=l+1,f+=1,e.footnoteCounts.set(a,f);const m={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+s,id:r+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,m);const p={type:"element",tagName:"sup",properties:{},children:[m]};return e.patch(t,p),e.applyData(t,p)}function m5(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function h5(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function jS(e,t){const r=t.referenceType;let a="]";if(r==="collapsed"?a+="[]":r==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const s=e.all(t),l=s[0];l&&l.type==="text"?l.value="["+l.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=a:s.push({type:"text",value:a}),s}function g5(e,t){const r=String(t.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return jS(e,t);const s={src:xs(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const l={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,l),e.applyData(t,l)}function b5(e,t){const r={src:xs(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const a={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,a),e.applyData(t,a)}function y5(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const a={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,a),e.applyData(t,a)}function x5(e,t){const r=String(t.identifier).toUpperCase(),a=e.definitionById.get(r);if(!a)return jS(e,t);const s={href:xs(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const l={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function v5(e,t){const r={href:xs(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const a={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function E5(e,t,r){const a=e.all(t),s=r?w5(r):LS(t),l={},c=[];if(typeof t.checked=="boolean"){const g=a[0];let h;g&&g.type==="element"&&g.tagName==="p"?h=g:(h={type:"element",tagName:"p",properties:{},children:[]},a.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const g=a[f];(s||f!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
|
|
19
|
-
`}),g.type==="element"&&g.tagName==="p"&&!s?c.push(...g.children):c.push(g)}const m=a[a.length-1];m&&(s||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
|
|
20
|
-
`});const p={type:"element",tagName:"li",properties:l,children:c};return e.patch(t,p),e.applyData(t,p)}function w5(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let a=-1;for(;!t&&++a<r.length;)t=LS(r[a])}return t}function LS(e){const t=e.spread;return t??e.children.length>1}function S5(e,t){const r={},a=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++s<a.length;){const c=a[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(a,!0)};return e.patch(t,l),e.applyData(t,l)}function _5(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function k5(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function N5(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function C5(e,t){const r=e.all(t),a=r.shift(),s=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),s.push(c)}if(r.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},f=xg(t.children[1]),m=mS(t.children[t.children.length-1]);f&&m&&(c.position={start:f,end:m}),s.push(c)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)}function T5(e,t,r){const a=r?r.children:void 0,l=(a?a.indexOf(t):1)===0?"th":"td",c=r&&r.type==="table"?r.align:void 0,f=c?c.length:t.children.length;let m=-1;const p=[];for(;++m<f;){const h=t.children[m],x={},v=c?c[m]:void 0;v&&(x.align=v);let E={type:"element",tagName:l,properties:x,children:[]};h&&(E.children=e.all(h),e.patch(h,E),E=e.applyData(h,E)),p.push(E)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,g),e.applyData(t,g)}function A5(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const c1=9,u1=32;function R5(e){const t=String(e),r=/\r?\n|\r/g;let a=r.exec(t),s=0;const l=[];for(;a;)l.push(d1(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=r.exec(t);return l.push(d1(t.slice(s),s>0,!1)),l.join("")}function d1(e,t,r){let a=0,s=e.length;if(t){let l=e.codePointAt(a);for(;l===c1||l===u1;)a++,l=e.codePointAt(a)}if(r){let l=e.codePointAt(s-1);for(;l===c1||l===u1;)s--,l=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function M5(e,t){const r={type:"text",value:R5(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function O5(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const D5={blockquote:l5,break:c5,code:u5,delete:d5,emphasis:f5,footnoteReference:p5,heading:m5,html:h5,imageReference:g5,image:b5,inlineCode:y5,linkReference:x5,link:v5,listItem:E5,list:S5,paragraph:_5,root:k5,strong:N5,table:C5,tableCell:A5,tableRow:T5,text:M5,thematicBreak:O5,toml:Mu,yaml:Mu,definition:Mu,footnoteDefinition:Mu};function Mu(){}const IS=-1,Fd=0,Rl=1,fd=2,Ng=3,Cg=4,Tg=5,Ag=6,zS=7,BS=8,j5=typeof self=="object"?self:globalThis,f1=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new j5[e](t)},L5=(e,t)=>{const r=(s,l)=>(e.set(l,s),s),a=s=>{if(e.has(s))return e.get(s);const[l,c]=t[s];switch(l){case Fd:case IS:return r(c,s);case Rl:{const f=r([],s);for(const m of c)f.push(a(m));return f}case fd:{const f=r({},s);for(const[m,p]of c)f[a(m)]=a(p);return f}case Ng:return r(new Date(c),s);case Cg:{const{source:f,flags:m}=c;return r(new RegExp(f,m),s)}case Tg:{const f=r(new Map,s);for(const[m,p]of c)f.set(a(m),a(p));return f}case Ag:{const f=r(new Set,s);for(const m of c)f.add(a(m));return f}case zS:{const{name:f,message:m}=c;return r(f1(f,m),s)}case BS:return r(BigInt(c),s);case"BigInt":return r(Object(BigInt(c)),s);case"ArrayBuffer":return r(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return r(new DataView(f),c)}}return r(f1(l,c),s)};return a},p1=e=>L5(new Map,e)(0),Go="",{toString:I5}={},{keys:z5}=Object,Sl=e=>{const t=typeof e;if(t!=="object"||!e)return[Fd,t];const r=I5.call(e).slice(8,-1);switch(r){case"Array":return[Rl,Go];case"Object":return[fd,Go];case"Date":return[Ng,Go];case"RegExp":return[Cg,Go];case"Map":return[Tg,Go];case"Set":return[Ag,Go];case"DataView":return[Rl,r]}return r.includes("Array")?[Rl,r]:r.includes("Error")?[zS,r]:[fd,r]},Ou=([e,t])=>e===Fd&&(t==="function"||t==="symbol"),B5=(e,t,r,a)=>{const s=(c,f)=>{const m=a.push(c)-1;return r.set(f,m),m},l=c=>{if(r.has(c))return r.get(c);let[f,m]=Sl(c);switch(f){case Fd:{let g=c;switch(m){case"bigint":f=BS,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+m);g=null;break;case"undefined":return s([IS],c)}return s([f,g],c)}case Rl:{if(m){let x=c;return m==="DataView"?x=new Uint8Array(c.buffer):m==="ArrayBuffer"&&(x=new Uint8Array(c)),s([m,[...x]],c)}const g=[],h=s([f,g],c);for(const x of c)g.push(l(x));return h}case fd:{if(m)switch(m){case"BigInt":return s([m,c.toString()],c);case"Boolean":case"Number":case"String":return s([m,c.valueOf()],c)}if(t&&"toJSON"in c)return l(c.toJSON());const g=[],h=s([f,g],c);for(const x of z5(c))(e||!Ou(Sl(c[x])))&&g.push([l(x),l(c[x])]);return h}case Ng:return s([f,c.toISOString()],c);case Cg:{const{source:g,flags:h}=c;return s([f,{source:g,flags:h}],c)}case Tg:{const g=[],h=s([f,g],c);for(const[x,v]of c)(e||!(Ou(Sl(x))||Ou(Sl(v))))&&g.push([l(x),l(v)]);return h}case Ag:{const g=[],h=s([f,g],c);for(const x of c)(e||!Ou(Sl(x)))&&g.push(l(x));return h}}const{message:p}=c;return s([f,{name:m,message:p}],c)};return l},m1=(e,{json:t,lossy:r}={})=>{const a=[];return B5(!(t||r),!!t,new Map,a)(e),a},pd=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?p1(m1(e,t)):structuredClone(e):(e,t)=>p1(m1(e,t));function P5(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function U5(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function F5(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||P5,a=e.options.footnoteBackLabel||U5,s=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let m=-1;for(;++m<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[m]);if(!p)continue;const g=e.all(p),h=String(p.identifier).toUpperCase(),x=xs(h.toLowerCase());let v=0;const E=[],S=e.footnoteCounts.get(h);for(;S!==void 0&&++v<=S;){E.length>0&&E.push({type:"text",value:" "});let M=typeof r=="string"?r:r(m,v);typeof M=="string"&&(M={type:"text",value:M}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(m,v),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const N=g[g.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const M=N.children[N.children.length-1];M&&M.type==="text"?M.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...E)}else g.push(...E);const k={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(g,!0)};e.patch(p,k),f.push(k)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...pd(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
21
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
22
|
-
`}]}}const nc=(function(e){if(e==null)return G5;if(typeof e=="function")return Hd(e);if(typeof e=="object")return Array.isArray(e)?H5(e):$5(e);if(typeof e=="string")return q5(e);throw new Error("Expected function, string, or object as test")});function H5(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=nc(e[r]);return Hd(a);function a(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function $5(e){const t=e;return Hd(r);function r(a){const s=a;let l;for(l in e)if(s[l]!==t[l])return!1;return!0}}function q5(e){return Hd(t);function t(r){return r&&r.type===e}}function Hd(e){return t;function t(r,a,s){return!!(K5(r)&&e.call(this,r,typeof a=="number"?a:void 0,s||void 0))}}function G5(){return!0}function K5(e){return e!==null&&typeof e=="object"&&"type"in e}const PS=[],Q5=!0,xh=!1,V5="skip";function US(e,t,r,a){let s;typeof t=="function"&&typeof r!="function"?(a=r,r=t):s=t;const l=nc(s),c=a?-1:1;f(e,void 0,[])();function f(m,p,g){const h=m&&typeof m=="object"?m:{};if(typeof h.type=="string"){const v=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(m.type+(v?"<"+v+">":""))+")"})}return x;function x(){let v=PS,E,S,N;if((!t||l(m,p,g[g.length-1]||void 0))&&(v=Y5(r(m,g)),v[0]===xh))return v;if("children"in m&&m.children){const k=m;if(k.children&&v[0]!==V5)for(S=(a?k.children.length:-1)+c,N=g.concat(k);S>-1&&S<k.children.length;){const M=k.children[S];if(E=f(M,S,N)(),E[0]===xh)return E;S=typeof E[1]=="number"?E[1]:S+c}}return v}}}function Y5(e){return Array.isArray(e)?e:typeof e=="number"?[Q5,e]:e==null?PS:[e]}function $d(e,t,r,a){let s,l,c;typeof t=="function"&&typeof r!="function"?(l=void 0,c=t,s=r):(l=t,c=r,s=a),US(e,l,f,s);function f(m,p){const g=p[p.length-1],h=g?g.children.indexOf(m):void 0;return c(m,h,g)}}const vh={}.hasOwnProperty,X5={};function Z5(e,t){const r=t||X5,a=new Map,s=new Map,l=new Map,c={...D5,...r.handlers},f={all:p,applyData:J5,definitionById:a,footnoteById:s,footnoteCounts:l,footnoteOrder:[],handlers:c,one:m,options:r,patch:W5,wrap:tB};return $d(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const h=g.type==="definition"?a:s,x=String(g.identifier).toUpperCase();h.has(x)||h.set(x,g)}}),f;function m(g,h){const x=g.type,v=f.handlers[x];if(vh.call(f.handlers,x)&&v)return v(f,g,h);if(f.options.passThrough&&f.options.passThrough.includes(x)){if("children"in g){const{children:S,...N}=g,k=pd(N);return k.children=f.all(g),k}return pd(g)}return(f.options.unknownHandler||eB)(f,g,h)}function p(g){const h=[];if("children"in g){const x=g.children;let v=-1;for(;++v<x.length;){const E=f.one(x[v],g);if(E){if(v&&x[v-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=h1(E.value)),!Array.isArray(E)&&E.type==="element")){const S=E.children[0];S&&S.type==="text"&&(S.value=h1(S.value))}Array.isArray(E)?h.push(...E):h.push(E)}}}return h}}function W5(e,t){e.position&&(t.position=Pz(e))}function J5(e,t){let r=t;if(e&&e.data){const a=e.data.hName,s=e.data.hChildren,l=e.data.hProperties;if(typeof a=="string")if(r.type==="element")r.tagName=a;else{const c="children"in r?r.children:[r];r={type:"element",tagName:a,properties:{},children:c}}r.type==="element"&&l&&Object.assign(r.properties,pd(l)),"children"in r&&r.children&&s!==null&&s!==void 0&&(r.children=s)}return r}function eB(e,t){const r=t.data||{},a="value"in t&&!(vh.call(r,"hProperties")||vh.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function tB(e,t){const r=[];let a=-1;for(t&&r.push({type:"text",value:`
|
|
23
|
-
`});++a<e.length;)a&&r.push({type:"text",value:`
|
|
24
|
-
`}),r.push(e[a]);return t&&e.length>0&&r.push({type:"text",value:`
|
|
25
|
-
`}),r}function h1(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function g1(e,t){const r=Z5(e,t),a=r.one(e,void 0),s=F5(r),l=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&l.children.push({type:"text",value:`
|
|
26
|
-
`},s),l}function nB(e,t){return e&&"run"in e?async function(r,a){const s=g1(r,{file:a,...t});await e.run(s,a)}:function(r,a){return g1(r,{file:a,...e||t})}}function b1(e){if(e)throw e}var vm,y1;function rB(){if(y1)return vm;y1=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},l=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var g=e.call(p,"constructor"),h=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!g&&!h)return!1;var x;for(x in p);return typeof x>"u"||e.call(p,x)},c=function(p,g){r&&g.name==="__proto__"?r(p,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):p[g.name]=g.newValue},f=function(p,g){if(g==="__proto__")if(e.call(p,g)){if(a)return a(p,g).value}else return;return p[g]};return vm=function m(){var p,g,h,x,v,E,S=arguments[0],N=1,k=arguments.length,M=!1;for(typeof S=="boolean"&&(M=S,S=arguments[1]||{},N=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});N<k;++N)if(p=arguments[N],p!=null)for(g in p)h=f(S,g),x=f(p,g),S!==x&&(M&&x&&(l(x)||(v=s(x)))?(v?(v=!1,E=h&&s(h)?h:[]):E=h&&l(h)?h:{},c(S,{name:g,newValue:m(M,E,x)})):typeof x<"u"&&c(S,{name:g,newValue:x}));return S},vm}var iB=rB();const Em=Gl(iB);function Eh(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function aB(){const e=[],t={run:r,use:a};return t;function r(...s){let l=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...s);function f(m,...p){const g=e[++l];let h=-1;if(m){c(m);return}for(;++h<s.length;)(p[h]===null||p[h]===void 0)&&(p[h]=s[h]);s=p,g?oB(g,f)(...p):c(null,...p)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function oB(e,t){let r;return a;function a(...c){const f=e.length>c.length;let m;f&&c.push(s);try{m=e.apply(this,c)}catch(p){const g=p;if(f&&r)throw g;return s(g)}f||(m&&m.then&&typeof m.then=="function"?m.then(l,s):m instanceof Error?s(m):l(m))}function s(c,...f){r||(r=!0,t(c,...f))}function l(c){s(null,c)}}const Vr={basename:sB,dirname:lB,extname:cB,join:uB,sep:"/"};function sB(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');rc(e);let r=0,a=-1,s=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(l){r=s+1;break}}else a<0&&(l=!0,a=s+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let c=-1,f=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(l){r=s+1;break}}else c<0&&(l=!0,c=s+1),f>-1&&(e.codePointAt(s)===t.codePointAt(f--)?f<0&&(a=s):(f=-1,a=c));return r===a?a=c:a<0&&(a=e.length),e.slice(r,a)}function lB(e){if(rc(e),e.length===0)return".";let t=-1,r=e.length,a;for(;--r;)if(e.codePointAt(r)===47){if(a){t=r;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function cB(e){rc(e);let t=e.length,r=-1,a=0,s=-1,l=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}r<0&&(c=!0,r=t+1),f===46?s<0?s=t:l!==1&&(l=1):s>-1&&(l=-1)}return s<0||r<0||l===0||l===1&&s===r-1&&s===a+1?"":e.slice(s,r)}function uB(...e){let t=-1,r;for(;++t<e.length;)rc(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":dB(r)}function dB(e){rc(e);const t=e.codePointAt(0)===47;let r=fB(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function fB(e,t){let r="",a=0,s=-1,l=0,c=-1,f,m;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(s===c-1||l===1))if(s!==c-1&&l===2){if(r.length<2||a!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(m=r.lastIndexOf("/"),m!==r.length-1){m<0?(r="",a=0):(r=r.slice(0,m),a=r.length-1-r.lastIndexOf("/")),s=c,l=0;continue}}else if(r.length>0){r="",a=0,s=c,l=0;continue}}t&&(r=r.length>0?r+"/..":"..",a=2)}else r.length>0?r+="/"+e.slice(s+1,c):r=e.slice(s+1,c),a=c-s-1;s=c,l=0}else f===46&&l>-1?l++:l=-1}return r}function rc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const pB={cwd:mB};function mB(){return"/"}function wh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function hB(e){if(typeof e=="string")e=new URL(e);else if(!wh(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return gB(e)}function gB(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const a=t.codePointAt(r+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const wm=["history","path","basename","stem","extname","dirname"];class FS{constructor(t){let r;t?wh(t)?r={path:t}:typeof t=="string"||bB(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":pB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<wm.length;){const l=wm[a];l in r&&r[l]!==void 0&&r[l]!==null&&(this[l]=l==="history"?[...r[l]]:r[l])}let s;for(s in r)wm.includes(s)||(this[s]=r[s])}get basename(){return typeof this.path=="string"?Vr.basename(this.path):void 0}set basename(t){_m(t,"basename"),Sm(t,"basename"),this.path=Vr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Vr.dirname(this.path):void 0}set dirname(t){x1(this.basename,"dirname"),this.path=Vr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Vr.extname(this.path):void 0}set extname(t){if(Sm(t,"extname"),x1(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Vr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){wh(t)&&(t=hB(t)),_m(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Vr.basename(this.path,this.extname):void 0}set stem(t){_m(t,"stem"),Sm(t,"stem"),this.path=Vr.join(this.dirname||"",t+(this.extname||""))}fail(t,r,a){const s=this.message(t,r,a);throw s.fatal=!0,s}info(t,r,a){const s=this.message(t,r,a);return s.fatal=void 0,s}message(t,r,a){const s=new Mn(t,r,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Sm(e,t){if(e&&e.includes(Vr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Vr.sep+"`")}function _m(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function x1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function bB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const yB=(function(e){const a=this.constructor.prototype,s=a[e],l=function(){return s.apply(l,arguments)};return Object.setPrototypeOf(l,a),l}),xB={}.hasOwnProperty;class Rg extends yB{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=aB()}copy(){const t=new Rg;let r=-1;for(;++r<this.attachers.length;){const a=this.attachers[r];t.use(...a)}return t.data(Em(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Cm("data",this.frozen),this.namespace[t]=r,this):xB.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Cm("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=r.call(t,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Du(t),a=this.parser||this.Parser;return km("parse",a),a(String(r),r)}process(t,r){const a=this;return this.freeze(),km("process",this.parser||this.Parser),Nm("process",this.compiler||this.Compiler),r?s(void 0,r):new Promise(s);function s(l,c){const f=Du(t),m=a.parse(f);a.run(m,f,function(g,h,x){if(g||!h||!x)return p(g);const v=h,E=a.stringify(v,x);wB(E)?x.value=E:x.result=E,p(g,x)});function p(g,h){g||!h?c(g):l?l(h):r(void 0,h)}}}processSync(t){let r=!1,a;return this.freeze(),km("processSync",this.parser||this.Parser),Nm("processSync",this.compiler||this.Compiler),this.process(t,s),E1("processSync","process",r),a;function s(l,c){r=!0,b1(l),a=c}}run(t,r,a){v1(t),this.freeze();const s=this.transformers;return!a&&typeof r=="function"&&(a=r,r=void 0),a?l(void 0,a):new Promise(l);function l(c,f){const m=Du(r);s.run(t,m,p);function p(g,h,x){const v=h||t;g?f(g):c?c(v):a(void 0,v,x)}}}runSync(t,r){let a=!1,s;return this.run(t,r,l),E1("runSync","run",a),s;function l(c,f){b1(c),s=f,a=!0}}stringify(t,r){this.freeze();const a=Du(r),s=this.compiler||this.Compiler;return Nm("stringify",s),v1(t),s(t,a)}use(t,...r){const a=this.attachers,s=this.namespace;if(Cm("use",this.frozen),t!=null)if(typeof t=="function")m(t,r);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(p){if(typeof p=="function")m(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[g,...h]=p;m(g,h)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(p.plugins),p.settings&&(s.settings=Em(!0,s.settings,p.settings))}function f(p){let g=-1;if(p!=null)if(Array.isArray(p))for(;++g<p.length;){const h=p[g];l(h)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function m(p,g){let h=-1,x=-1;for(;++h<a.length;)if(a[h][0]===p){x=h;break}if(x===-1)a.push([p,...g]);else if(g.length>0){let[v,...E]=g;const S=a[x][1];Eh(S)&&Eh(v)&&(v=Em(!0,S,v)),a[x]=[p,v,...E]}}}}const vB=new Rg().freeze();function km(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Nm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Cm(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function v1(e){if(!Eh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function E1(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Du(e){return EB(e)?e:new FS(e)}function EB(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function wB(e){return typeof e=="string"||SB(e)}function SB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _B="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",w1=[],S1={allowDangerousHtml:!0},kB=/^(https?|ircs?|mailto|xmpp)$/i,NB=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function CB(e){const t=TB(e),r=AB(e);return RB(t.runSync(t.parse(r),r),e)}function TB(e){const t=e.rehypePlugins||w1,r=e.remarkPlugins||w1,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...S1}:S1;return vB().use(s5).use(r).use(nB,a).use(t)}function AB(e){const t=e.children||"",r=new FS;return typeof t=="string"&&(r.value=t),r}function RB(e,t){const r=t.allowedElements,a=t.allowElement,s=t.components,l=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,m=t.urlTransform||MB;for(const g of NB)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+_B+g.id,void 0);return $d(e,p),qz(e,{Fragment:d.Fragment,components:s,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function p(g,h,x){if(g.type==="raw"&&x&&typeof h=="number")return c?x.children.splice(h,1):x.children[h]={type:"text",value:g.value},h;if(g.type==="element"){let v;for(v in bm)if(Object.hasOwn(bm,v)&&Object.hasOwn(g.properties,v)){const E=g.properties[v],S=bm[v];(S===null||S.includes(g.tagName))&&(g.properties[v]=m(String(E||""),v,g))}}if(g.type==="element"){let v=r?!r.includes(g.tagName):l?l.includes(g.tagName):!1;if(!v&&a&&typeof h=="number"&&(v=!a(g,h,x)),v&&x&&typeof h=="number")return f&&g.children?x.children.splice(h,1,...g.children):x.children.splice(h,1),h}}}function MB(e){const t=e.indexOf(":"),r=e.indexOf("?"),a=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||r!==-1&&t>r||a!==-1&&t>a||kB.test(e.slice(0,t))?e:""}function _1(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,s=r.indexOf(t);for(;s!==-1;)a++,s=r.indexOf(t,s+t.length);return a}function OB(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function DB(e,t,r){const s=nc((r||{}).ignore||[]),l=jB(t);let c=-1;for(;++c<l.length;)US(e,"text",f);function f(p,g){let h=-1,x;for(;++h<g.length;){const v=g[h],E=x?x.children:void 0;if(s(v,E?E.indexOf(v):void 0,x))return;x=v}if(x)return m(p,g)}function m(p,g){const h=g[g.length-1],x=l[c][0],v=l[c][1];let E=0;const N=h.children.indexOf(p);let k=!1,M=[];x.lastIndex=0;let R=x.exec(p.value);for(;R;){const O=R.index,P={index:R.index,input:R.input,stack:[...g,p]};let D=v(...R,P);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?x.lastIndex=O+1:(E!==O&&M.push({type:"text",value:p.value.slice(E,O)}),Array.isArray(D)?M.push(...D):D&&M.push(D),E=O+R[0].length,k=!0),!x.global)break;R=x.exec(p.value)}return k?(E<p.value.length&&M.push({type:"text",value:p.value.slice(E)}),h.children.splice(N,1,...M)):M=[p],N+M.length}}function jB(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<r.length;){const s=r[a];t.push([LB(s[0]),IB(s[1])])}return t}function LB(e){return typeof e=="string"?new RegExp(OB(e),"g"):e}function IB(e){return typeof e=="function"?e:function(){return e}}const Tm="phrasing",Am=["autolink","link","image","label"];function zB(){return{transforms:[qB],enter:{literalAutolink:PB,literalAutolinkEmail:Rm,literalAutolinkHttp:Rm,literalAutolinkWww:Rm},exit:{literalAutolink:$B,literalAutolinkEmail:HB,literalAutolinkHttp:UB,literalAutolinkWww:FB}}}function BB(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Tm,notInConstruct:Am},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Tm,notInConstruct:Am},{character:":",before:"[ps]",after:"\\/",inConstruct:Tm,notInConstruct:Am}]}}function PB(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Rm(e){this.config.enter.autolinkProtocol.call(this,e)}function UB(e){this.config.exit.autolinkProtocol.call(this,e)}function FB(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function HB(e){this.config.exit.autolinkEmail.call(this,e)}function $B(e){this.exit(e)}function qB(e){DB(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,GB],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),KB]],{ignore:["link","linkReference"]})}function GB(e,t,r,a,s){let l="";if(!HS(s)||(/^w/i.test(t)&&(r=t+r,t="",l="http://"),!QB(r)))return!1;const c=VB(r+a);if(!c[0])return!1;const f={type:"link",title:null,url:l+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function KB(e,t,r,a){return!HS(a,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function QB(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function VB(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],a=r.indexOf(")");const s=_1(e,"(");let l=_1(e,")");for(;a!==-1&&s>l;)e+=r.slice(0,a+1),r=r.slice(a+1),a=r.indexOf(")"),l++;return[e,r]}function HS(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Wa(r)||Pd(r))&&(!t||r!==47)}$S.peek=rP;function YB(){this.buffer()}function XB(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ZB(){this.buffer()}function WB(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function JB(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Mr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function eP(e){this.exit(e)}function tP(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Mr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function nP(e){this.exit(e)}function rP(){return"["}function $S(e,t,r,a){const s=r.createTracker(a);let l=s.move("[^");const c=r.enter("footnoteReference"),f=r.enter("reference");return l+=s.move(r.safe(r.associationId(e),{after:"]",before:l})),f(),c(),l+=s.move("]"),l}function iP(){return{enter:{gfmFootnoteCallString:YB,gfmFootnoteCall:XB,gfmFootnoteDefinitionLabelString:ZB,gfmFootnoteDefinition:WB},exit:{gfmFootnoteCallString:JB,gfmFootnoteCall:eP,gfmFootnoteDefinitionLabelString:tP,gfmFootnoteDefinition:nP}}}function aP(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:$S},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(a,s,l,c){const f=l.createTracker(c);let m=f.move("[^");const p=l.enter("footnoteDefinition"),g=l.enter("label");return m+=f.move(l.safe(l.associationId(a),{before:m,after:"]"})),g(),m+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),m+=f.move((t?`
|
|
27
|
-
`:" ")+l.indentLines(l.containerFlow(a,f.current()),t?qS:oP))),p(),m}}function oP(e,t,r){return t===0?e:qS(e,t,r)}function qS(e,t,r){return(r?"":" ")+e}const sP=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];GS.peek=fP;function lP(){return{canContainEols:["delete"],enter:{strikethrough:uP},exit:{strikethrough:dP}}}function cP(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:sP}],handlers:{delete:GS}}}function uP(e){this.enter({type:"delete",children:[]},e)}function dP(e){this.exit(e)}function GS(e,t,r,a){const s=r.createTracker(a),l=r.enter("strikethrough");let c=s.move("~~");return c+=r.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),l(),c}function fP(){return"~"}function pP(e){return e.length}function mP(e,t){const r=t||{},a=(r.align||[]).concat(),s=r.stringLength||pP,l=[],c=[],f=[],m=[];let p=0,g=-1;for(;++g<e.length;){const S=[],N=[];let k=-1;for(e[g].length>p&&(p=e[g].length);++k<e[g].length;){const M=hP(e[g][k]);if(r.alignDelimiters!==!1){const R=s(M);N[k]=R,(m[k]===void 0||R>m[k])&&(m[k]=R)}S.push(M)}c[g]=S,f[g]=N}let h=-1;if(typeof a=="object"&&"length"in a)for(;++h<p;)l[h]=k1(a[h]);else{const S=k1(a);for(;++h<p;)l[h]=S}h=-1;const x=[],v=[];for(;++h<p;){const S=l[h];let N="",k="";S===99?(N=":",k=":"):S===108?N=":":S===114&&(k=":");let M=r.alignDelimiters===!1?1:Math.max(1,m[h]-N.length-k.length);const R=N+"-".repeat(M)+k;r.alignDelimiters!==!1&&(M=N.length+M+k.length,M>m[h]&&(m[h]=M),v[h]=M),x[h]=R}c.splice(1,0,x),f.splice(1,0,v),g=-1;const E=[];for(;++g<c.length;){const S=c[g],N=f[g];h=-1;const k=[];for(;++h<p;){const M=S[h]||"";let R="",O="";if(r.alignDelimiters!==!1){const P=m[h]-(N[h]||0),D=l[h];D===114?R=" ".repeat(P):D===99?P%2?(R=" ".repeat(P/2+.5),O=" ".repeat(P/2-.5)):(R=" ".repeat(P/2),O=R):O=" ".repeat(P)}r.delimiterStart!==!1&&!h&&k.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&M==="")&&(r.delimiterStart!==!1||h)&&k.push(" "),r.alignDelimiters!==!1&&k.push(R),k.push(M),r.alignDelimiters!==!1&&k.push(O),r.padding!==!1&&k.push(" "),(r.delimiterEnd!==!1||h!==p-1)&&k.push("|")}E.push(r.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return E.join(`
|
|
28
|
-
`)}function hP(e){return e==null?"":String(e)}function k1(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function gP(e,t,r,a){const s=r.enter("blockquote"),l=r.createTracker(a);l.move("> "),l.shift(2);const c=r.indentLines(r.containerFlow(e,l.current()),bP);return s(),c}function bP(e,t,r){return">"+(r?"":" ")+e}function yP(e,t){return N1(e,t.inConstruct,!0)&&!N1(e,t.notInConstruct,!1)}function N1(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function C1(e,t,r,a){let s=-1;for(;++s<r.unsafe.length;)if(r.unsafe[s].character===`
|
|
29
|
-
`&&yP(r.stack,r.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
|
|
30
|
-
`}function xP(e,t){const r=String(e);let a=r.indexOf(t),s=a,l=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++l>c&&(c=l):l=1,s=a+t.length,a=r.indexOf(t,s);return c}function vP(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function EP(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function wP(e,t,r,a){const s=EP(r),l=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(vP(e,r)){const h=r.enter("codeIndented"),x=r.indentLines(l,SP);return h(),x}const f=r.createTracker(a),m=s.repeat(Math.max(xP(l,s)+1,3)),p=r.enter("codeFenced");let g=f.move(m);if(e.lang){const h=r.enter(`codeFencedLang${c}`);g+=f.move(r.safe(e.lang,{before:g,after:" ",encode:["`"],...f.current()})),h()}if(e.lang&&e.meta){const h=r.enter(`codeFencedMeta${c}`);g+=f.move(" "),g+=f.move(r.safe(e.meta,{before:g,after:`
|
|
31
|
-
`,encode:["`"],...f.current()})),h()}return g+=f.move(`
|
|
32
|
-
`),l&&(g+=f.move(l+`
|
|
33
|
-
`)),g+=f.move(m),p(),g}function SP(e,t,r){return(r?"":" ")+e}function Mg(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function _P(e,t,r,a){const s=Mg(r),l=s==='"'?"Quote":"Apostrophe",c=r.enter("definition");let f=r.enter("label");const m=r.createTracker(a);let p=m.move("[");return p+=m.move(r.safe(r.associationId(e),{before:p,after:"]",...m.current()})),p+=m.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),p+=m.move("<"),p+=m.move(r.safe(e.url,{before:p,after:">",...m.current()})),p+=m.move(">")):(f=r.enter("destinationRaw"),p+=m.move(r.safe(e.url,{before:p,after:e.title?" ":`
|
|
34
|
-
`,...m.current()}))),f(),e.title&&(f=r.enter(`title${l}`),p+=m.move(" "+s),p+=m.move(r.safe(e.title,{before:p,after:s,...m.current()})),p+=m.move(s),f()),c(),p}function kP(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ul(e){return"&#x"+e.toString(16).toUpperCase()+";"}function md(e,t,r){const a=ls(e),s=ls(t);return a===void 0?s===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}KS.peek=NP;function KS(e,t,r,a){const s=kP(r),l=r.enter("emphasis"),c=r.createTracker(a),f=c.move(s);let m=c.move(r.containerPhrasing(e,{after:s,before:f,...c.current()}));const p=m.charCodeAt(0),g=md(a.before.charCodeAt(a.before.length-1),p,s);g.inside&&(m=Ul(p)+m.slice(1));const h=m.charCodeAt(m.length-1),x=md(a.after.charCodeAt(0),h,s);x.inside&&(m=m.slice(0,-1)+Ul(h));const v=c.move(s);return l(),r.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},f+m+v}function NP(e,t,r){return r.options.emphasis||"*"}function CP(e,t){let r=!1;return $d(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return r=!0,xh}),!!((!e.depth||e.depth<3)&&Sg(e)&&(t.options.setext||r))}function TP(e,t,r,a){const s=Math.max(Math.min(6,e.depth||1),1),l=r.createTracker(a);if(CP(e,r)){const g=r.enter("headingSetext"),h=r.enter("phrasing"),x=r.containerPhrasing(e,{...l.current(),before:`
|
|
35
|
-
`,after:`
|
|
36
|
-
`});return h(),g(),x+`
|
|
37
|
-
`+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
38
|
-
`))+1))}const c="#".repeat(s),f=r.enter("headingAtx"),m=r.enter("phrasing");l.move(c+" ");let p=r.containerPhrasing(e,{before:"# ",after:`
|
|
39
|
-
`,...l.current()});return/^[\t ]/.test(p)&&(p=Ul(p.charCodeAt(0))+p.slice(1)),p=p?c+" "+p:c,r.options.closeAtx&&(p+=" "+c),m(),f(),p}QS.peek=AP;function QS(e){return e.value||""}function AP(){return"<"}VS.peek=RP;function VS(e,t,r,a){const s=Mg(r),l=s==='"'?"Quote":"Apostrophe",c=r.enter("image");let f=r.enter("label");const m=r.createTracker(a);let p=m.move("![");return p+=m.move(r.safe(e.alt,{before:p,after:"]",...m.current()})),p+=m.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),p+=m.move("<"),p+=m.move(r.safe(e.url,{before:p,after:">",...m.current()})),p+=m.move(">")):(f=r.enter("destinationRaw"),p+=m.move(r.safe(e.url,{before:p,after:e.title?" ":")",...m.current()}))),f(),e.title&&(f=r.enter(`title${l}`),p+=m.move(" "+s),p+=m.move(r.safe(e.title,{before:p,after:s,...m.current()})),p+=m.move(s),f()),p+=m.move(")"),c(),p}function RP(){return"!"}YS.peek=MP;function YS(e,t,r,a){const s=e.referenceType,l=r.enter("imageReference");let c=r.enter("label");const f=r.createTracker(a);let m=f.move("![");const p=r.safe(e.alt,{before:m,after:"]",...f.current()});m+=f.move(p+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const h=r.safe(r.associationId(e),{before:m,after:"]",...f.current()});return c(),r.stack=g,l(),s==="full"||!p||p!==h?m+=f.move(h+"]"):s==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function MP(){return"!"}XS.peek=OP;function XS(e,t,r){let a=e.value||"",s="`",l=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++l<r.unsafe.length;){const c=r.unsafe[l],f=r.compilePattern(c);let m;if(c.atBreak)for(;m=f.exec(a);){let p=m.index;a.charCodeAt(p)===10&&a.charCodeAt(p-1)===13&&p--,a=a.slice(0,p)+" "+a.slice(m.index+1)}}return s+a+s}function OP(){return"`"}function ZS(e,t){const r=Sg(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}WS.peek=DP;function WS(e,t,r,a){const s=Mg(r),l=s==='"'?"Quote":"Apostrophe",c=r.createTracker(a);let f,m;if(ZS(e,r)){const g=r.stack;r.stack=[],f=r.enter("autolink");let h=c.move("<");return h+=c.move(r.containerPhrasing(e,{before:h,after:">",...c.current()})),h+=c.move(">"),f(),r.stack=g,h}f=r.enter("link"),m=r.enter("label");let p=c.move("[");return p+=c.move(r.containerPhrasing(e,{before:p,after:"](",...c.current()})),p+=c.move("]("),m(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(m=r.enter("destinationLiteral"),p+=c.move("<"),p+=c.move(r.safe(e.url,{before:p,after:">",...c.current()})),p+=c.move(">")):(m=r.enter("destinationRaw"),p+=c.move(r.safe(e.url,{before:p,after:e.title?" ":")",...c.current()}))),m(),e.title&&(m=r.enter(`title${l}`),p+=c.move(" "+s),p+=c.move(r.safe(e.title,{before:p,after:s,...c.current()})),p+=c.move(s),m()),p+=c.move(")"),f(),p}function DP(e,t,r){return ZS(e,r)?"<":"["}JS.peek=jP;function JS(e,t,r,a){const s=e.referenceType,l=r.enter("linkReference");let c=r.enter("label");const f=r.createTracker(a);let m=f.move("[");const p=r.containerPhrasing(e,{before:m,after:"]",...f.current()});m+=f.move(p+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const h=r.safe(r.associationId(e),{before:m,after:"]",...f.current()});return c(),r.stack=g,l(),s==="full"||!p||p!==h?m+=f.move(h+"]"):s==="shortcut"?m=m.slice(0,-1):m+=f.move("]"),m}function jP(){return"["}function Og(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function LP(e){const t=Og(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function IP(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function e_(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function zP(e,t,r,a){const s=r.enter("list"),l=r.bulletCurrent;let c=e.ordered?IP(r):Og(r);const f=e.ordered?c==="."?")":".":LP(r);let m=t&&r.bulletLastUsed?c===r.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&g&&(!g.children||!g.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(m=!0),e_(r)===c&&g){let h=-1;for(;++h<e.children.length;){const x=e.children[h];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(c=f),r.bulletCurrent=c;const p=r.containerFlow(e,a);return r.bulletLastUsed=c,r.bulletCurrent=l,s(),p}function BP(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function PP(e,t,r,a){const s=BP(r);let l=r.bulletCurrent||Og(r);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let c=l.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=r.createTracker(a);f.move(l+" ".repeat(c-l.length)),f.shift(c);const m=r.enter("listItem"),p=r.indentLines(r.containerFlow(e,f.current()),g);return m(),p;function g(h,x,v){return x?(v?"":" ".repeat(c))+h:(v?l:l+" ".repeat(c-l.length))+h}}function UP(e,t,r,a){const s=r.enter("paragraph"),l=r.enter("phrasing"),c=r.containerPhrasing(e,a);return l(),s(),c}const FP=nc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function HP(e,t,r,a){return(e.children.some(function(c){return FP(c)})?r.containerPhrasing:r.containerFlow).call(r,e,a)}function $P(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}t_.peek=qP;function t_(e,t,r,a){const s=$P(r),l=r.enter("strong"),c=r.createTracker(a),f=c.move(s+s);let m=c.move(r.containerPhrasing(e,{after:s,before:f,...c.current()}));const p=m.charCodeAt(0),g=md(a.before.charCodeAt(a.before.length-1),p,s);g.inside&&(m=Ul(p)+m.slice(1));const h=m.charCodeAt(m.length-1),x=md(a.after.charCodeAt(0),h,s);x.inside&&(m=m.slice(0,-1)+Ul(h));const v=c.move(s+s);return l(),r.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},f+m+v}function qP(e,t,r){return r.options.strong||"*"}function GP(e,t,r,a){return r.safe(e.value,a)}function KP(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function QP(e,t,r){const a=(e_(r)+(r.options.ruleSpaces?" ":"")).repeat(KP(r));return r.options.ruleSpaces?a.slice(0,-1):a}const n_={blockquote:gP,break:C1,code:wP,definition:_P,emphasis:KS,hardBreak:C1,heading:TP,html:QS,image:VS,imageReference:YS,inlineCode:XS,link:WS,linkReference:JS,list:zP,listItem:PP,paragraph:UP,root:HP,strong:t_,text:GP,thematicBreak:QP};function VP(){return{enter:{table:YP,tableData:T1,tableHeader:T1,tableRow:ZP},exit:{codeText:WP,table:XP,tableData:Mm,tableHeader:Mm,tableRow:Mm}}}function YP(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function XP(e){this.exit(e),this.data.inTable=void 0}function ZP(e){this.enter({type:"tableRow",children:[]},e)}function Mm(e){this.exit(e)}function T1(e){this.enter({type:"tableCell",children:[]},e)}function WP(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,JP));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function JP(e,t){return t==="|"?t:e}function eU(e){const t=e||{},r=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,l=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
40
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:m,tableRow:f}};function c(v,E,S,N){return p(g(v,S,N),v.align)}function f(v,E,S,N){const k=h(v,S,N),M=p([k]);return M.slice(0,M.indexOf(`
|
|
41
|
-
`))}function m(v,E,S,N){const k=S.enter("tableCell"),M=S.enter("phrasing"),R=S.containerPhrasing(v,{...N,before:l,after:l});return M(),k(),R}function p(v,E){return mP(v,{align:E,alignDelimiters:a,padding:r,stringLength:s})}function g(v,E,S){const N=v.children;let k=-1;const M=[],R=E.enter("table");for(;++k<N.length;)M[k]=h(N[k],E,S);return R(),M}function h(v,E,S){const N=v.children;let k=-1;const M=[],R=E.enter("tableRow");for(;++k<N.length;)M[k]=m(N[k],v,E,S);return R(),M}function x(v,E,S){let N=n_.inlineCode(v,E,S);return S.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function tU(){return{exit:{taskListCheckValueChecked:A1,taskListCheckValueUnchecked:A1,paragraph:rU}}}function nU(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:iU}}}function A1(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function rU(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const a=r.children[0];if(a&&a.type==="text"){const s=t.children;let l=-1,c;for(;++l<s.length;){const f=s[l];if(f.type==="paragraph"){c=f;break}}c===r&&(a.value=a.value.slice(1),a.value.length===0?r.children.shift():r.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,r.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function iU(e,t,r,a){const s=e.children[0],l=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=r.createTracker(a);l&&f.move(c);let m=n_.listItem(e,t,r,{...a,...f.current()});return l&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),m;function p(g){return g+c}}function aU(){return[zB(),iP(),lP(),VP(),tU()]}function oU(e){return{extensions:[BB(),aP(e),cP(),eU(e),nU()]}}const sU={tokenize:pU,partial:!0},r_={tokenize:mU,partial:!0},i_={tokenize:hU,partial:!0},a_={tokenize:gU,partial:!0},lU={tokenize:bU,partial:!0},o_={name:"wwwAutolink",tokenize:dU,previous:l_},s_={name:"protocolAutolink",tokenize:fU,previous:c_},Ii={name:"emailAutolink",tokenize:uU,previous:u_},ai={};function cU(){return{text:ai}}let Ga=48;for(;Ga<123;)ai[Ga]=Ii,Ga++,Ga===58?Ga=65:Ga===91&&(Ga=97);ai[43]=Ii;ai[45]=Ii;ai[46]=Ii;ai[95]=Ii;ai[72]=[Ii,s_];ai[104]=[Ii,s_];ai[87]=[Ii,o_];ai[119]=[Ii,o_];function uU(e,t,r){const a=this;let s,l;return c;function c(h){return!Sh(h)||!u_.call(a,a.previous)||Dg(a.events)?r(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(h))}function f(h){return Sh(h)?(e.consume(h),f):h===64?(e.consume(h),m):r(h)}function m(h){return h===46?e.check(lU,g,p)(h):h===45||h===95||Rn(h)?(l=!0,e.consume(h),m):g(h)}function p(h){return e.consume(h),s=!0,m}function g(h){return l&&s&&zn(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):r(h)}}function dU(e,t,r){const a=this;return s;function s(c){return c!==87&&c!==119||!l_.call(a,a.previous)||Dg(a.events)?r(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(sU,e.attempt(r_,e.attempt(i_,l),r),r)(c))}function l(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function fU(e,t,r){const a=this;let s="",l=!1;return c;function c(h){return(h===72||h===104)&&c_.call(a,a.previous)&&!Dg(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(h),e.consume(h),f):r(h)}function f(h){if(zn(h)&&s.length<5)return s+=String.fromCodePoint(h),e.consume(h),f;if(h===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(h),m}return r(h)}function m(h){return h===47?(e.consume(h),l?p:(l=!0,m)):r(h)}function p(h){return h===null||dd(h)||Dt(h)||Wa(h)||Pd(h)?r(h):e.attempt(r_,e.attempt(i_,g),r)(h)}function g(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function pU(e,t,r){let a=0;return s;function s(c){return(c===87||c===119)&&a<3?(a++,e.consume(c),s):c===46&&a===3?(e.consume(c),l):r(c)}function l(c){return c===null?r(c):t(c)}}function mU(e,t,r){let a,s,l;return c;function c(p){return p===46||p===95?e.check(a_,m,f)(p):p===null||Dt(p)||Wa(p)||p!==45&&Pd(p)?m(p):(l=!0,e.consume(p),c)}function f(p){return p===95?a=!0:(s=a,a=void 0),e.consume(p),c}function m(p){return s||a||!l?r(p):t(p)}}function hU(e,t){let r=0,a=0;return s;function s(c){return c===40?(r++,e.consume(c),s):c===41&&a<r?l(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(a_,t,l)(c):c===null||Dt(c)||Wa(c)?t(c):(e.consume(c),s)}function l(c){return c===41&&a++,e.consume(c),s}}function gU(e,t,r){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),a):f===38?(e.consume(f),l):f===93?(e.consume(f),s):f===60||f===null||Dt(f)||Wa(f)?t(f):r(f)}function s(f){return f===null||f===40||f===91||Dt(f)||Wa(f)?t(f):a(f)}function l(f){return zn(f)?c(f):r(f)}function c(f){return f===59?(e.consume(f),a):zn(f)?(e.consume(f),c):r(f)}}function bU(e,t,r){return a;function a(l){return e.consume(l),s}function s(l){return Rn(l)?r(l):t(l)}}function l_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Dt(e)}function c_(e){return!zn(e)}function u_(e){return!(e===47||Sh(e))}function Sh(e){return e===43||e===45||e===46||e===95||Rn(e)}function Dg(e){let t=e.length,r=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){r=!0;break}if(a._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const yU={tokenize:NU,partial:!0};function xU(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:SU,continuation:{tokenize:_U},exit:kU}},text:{91:{name:"gfmFootnoteCall",tokenize:wU},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vU,resolveTo:EU}}}}function vU(e,t,r){const a=this;let s=a.events.length;const l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const m=a.events[s][1];if(m.type==="labelImage"){c=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return f;function f(m){if(!c||!c._balanced)return r(m);const p=Mr(a.sliceSerialize({start:c.end,end:a.now()}));return p.codePointAt(0)!==94||!l.includes(p.slice(1))?r(m):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),t(m))}}function EU(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},f=[e[r+1],e[r+2],["enter",a,t],e[r+3],e[r+4],["enter",s,t],["exit",s,t],["enter",l,t],["enter",c,t],["exit",c,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(r,e.length-r+1,...f),e}function wU(e,t,r){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let l=0,c;return f;function f(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),m}function m(h){return h!==94?r(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(h){if(l>999||h===93&&!c||h===null||h===91||Dt(h))return r(h);if(h===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(Mr(a.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(h)}return Dt(h)||(c=!0),l++,e.consume(h),h===92?g:p}function g(h){return h===91||h===92||h===93?(e.consume(h),l++,p):p(h)}}function SU(e,t,r){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let l,c=0,f;return m;function m(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):r(E)}function g(E){if(c>999||E===93&&!f||E===null||E===91||Dt(E))return r(E);if(E===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return l=Mr(a.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return Dt(E)||(f=!0),c++,e.consume(E),E===92?h:g}function h(E){return E===91||E===92||E===93?(e.consume(E),c++,g):g(E)}function x(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),s.includes(l)||s.push(l),ct(e,v,"gfmFootnoteDefinitionWhitespace")):r(E)}function v(E){return t(E)}}function _U(e,t,r){return e.check(tc,t,e.attempt(yU,t,r))}function kU(e){e.exit("gfmFootnoteDefinition")}function NU(e,t,r){const a=this;return ct(e,s,"gfmFootnoteDefinitionIndent",5);function s(l){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(l):r(l)}}function CU(e){let r=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:l,resolveAll:s};return r==null&&(r=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(c,f){let m=-1;for(;++m<c.length;)if(c[m][0]==="enter"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._close){let p=m;for(;p--;)if(c[p][0]==="exit"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._open&&c[m][1].end.offset-c[m][1].start.offset===c[p][1].end.offset-c[p][1].start.offset){c[m][1].type="strikethroughSequence",c[p][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},c[p][1].start),end:Object.assign({},c[m][1].end)},h={type:"strikethroughText",start:Object.assign({},c[p][1].end),end:Object.assign({},c[m][1].start)},x=[["enter",g,f],["enter",c[p][1],f],["exit",c[p][1],f],["enter",h,f]],v=f.parser.constructs.insideSpan.null;v&&dr(x,x.length,0,Ud(v,c.slice(p+1,m),f)),dr(x,x.length,0,[["exit",h,f],["enter",c[m][1],f],["exit",c[m][1],f],["exit",g,f]]),dr(c,p-1,m-p+3,x),m=p+x.length-2;break}}for(m=-1;++m<c.length;)c[m][1].type==="strikethroughSequenceTemporary"&&(c[m][1].type="data");return c}function l(c,f,m){const p=this.previous,g=this.events;let h=0;return x;function x(E){return p===126&&g[g.length-1][1].type!=="characterEscape"?m(E):(c.enter("strikethroughSequenceTemporary"),v(E))}function v(E){const S=ls(p);if(E===126)return h>1?m(E):(c.consume(E),h++,v);if(h<2&&!r)return m(E);const N=c.exit("strikethroughSequenceTemporary"),k=ls(E);return N._open=!k||k===2&&!!S,N._close=!S||S===2&&!!k,f(E)}}}class TU{constructor(){this.map=[]}add(t,r,a){AU(this,t,r,a)}consume(t){if(this.map.sort(function(l,c){return l[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const a=[];for(;r>0;)r-=1,a.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];a.push(t.slice()),t.length=0;let s=a.pop();for(;s;){for(const l of s)t.push(l);s=a.pop()}this.map.length=0}}function AU(e,t,r,a){let s=0;if(!(r===0&&a.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=r,e.map[s][2].push(...a);return}s+=1}e.map.push([t,r,a])}}function RU(e,t){let r=!1;const a=[];for(;t<e.length;){const s=e[t];if(r){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=a.length-1;a[l]=a[l]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return a}function MU(){return{flow:{null:{name:"table",tokenize:OU,resolveAll:DU}}}}function OU(e,t,r){const a=this;let s=0,l=0,c;return f;function f(F){let ae=a.events.length-1;for(;ae>-1;){const te=a.events[ae][1].type;if(te==="lineEnding"||te==="linePrefix")ae--;else break}const ee=ae>-1?a.events[ae][1].type:null,ce=ee==="tableHead"||ee==="tableRow"?D:m;return ce===D&&a.parser.lazy[a.now().line]?r(F):ce(F)}function m(F){return e.enter("tableHead"),e.enter("tableRow"),p(F)}function p(F){return F===124||(c=!0,l+=1),g(F)}function g(F){return F===null?r(F):Be(F)?l>1?(l=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),v):r(F):it(F)?ct(e,g,"whitespace")(F):(l+=1,c&&(c=!1,s+=1),F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),c=!0,g):(e.enter("data"),h(F)))}function h(F){return F===null||F===124||Dt(F)?(e.exit("data"),g(F)):(e.consume(F),F===92?x:h)}function x(F){return F===92||F===124?(e.consume(F),h):h(F)}function v(F){return a.interrupt=!1,a.parser.lazy[a.now().line]?r(F):(e.enter("tableDelimiterRow"),c=!1,it(F)?ct(e,E,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):E(F))}function E(F){return F===45||F===58?N(F):F===124?(c=!0,e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),S):P(F)}function S(F){return it(F)?ct(e,N,"whitespace")(F):N(F)}function N(F){return F===58?(l+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),k):F===45?(l+=1,k(F)):F===null||Be(F)?O(F):P(F)}function k(F){return F===45?(e.enter("tableDelimiterFiller"),M(F)):P(F)}function M(F){return F===45?(e.consume(F),M):F===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(F))}function R(F){return it(F)?ct(e,O,"whitespace")(F):O(F)}function O(F){return F===124?E(F):F===null||Be(F)?!c||s!==l?P(F):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(F)):P(F)}function P(F){return r(F)}function D(F){return e.enter("tableRow"),U(F)}function U(F){return F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),U):F===null||Be(F)?(e.exit("tableRow"),t(F)):it(F)?ct(e,U,"whitespace")(F):(e.enter("data"),B(F))}function B(F){return F===null||F===124||Dt(F)?(e.exit("data"),U(F)):(e.consume(F),F===92?J:B)}function J(F){return F===92||F===124?(e.consume(F),B):B(F)}}function DU(e,t){let r=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],f=!1,m=0,p,g,h;const x=new TU;for(;++r<e.length;){const v=e[r],E=v[1];v[0]==="enter"?E.type==="tableHead"?(f=!1,m!==0&&(R1(x,t,m,p,g),g=void 0,m=0),p={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},x.add(r,0,[["enter",p,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(a=!0,h=void 0,l=[0,0,0,0],c=[0,r+1,0,0],f&&(f=!1,g={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},x.add(r,0,[["enter",g,t]])),s=E.type==="tableDelimiterRow"?2:g?3:1):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(l[1]!==0&&(c[0]=c[1],h=ju(x,t,l,s,void 0,h),l=[0,0,0,0]),c[2]=r)):E.type==="tableCellDivider"&&(a?a=!1:(l[1]!==0&&(c[0]=c[1],h=ju(x,t,l,s,void 0,h)),l=c,c=[l[1],r,0,0])):E.type==="tableHead"?(f=!0,m=r):E.type==="tableRow"||E.type==="tableDelimiterRow"?(m=r,l[1]!==0?(c[0]=c[1],h=ju(x,t,l,s,r,h)):c[1]!==0&&(h=ju(x,t,c,s,r,h)),s=0):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=r)}for(m!==0&&R1(x,t,m,p,g),x.consume(t.events),r=-1;++r<t.events.length;){const v=t.events[r];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=RU(t.events,r))}return e}function ju(e,t,r,a,s,l){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(l.end=Object.assign({},Zo(t.events,r[0])),e.add(r[0],0,[["exit",l,t]]));const m=Zo(t.events,r[1]);if(l={type:c,start:Object.assign({},m),end:Object.assign({},m)},e.add(r[1],0,[["enter",l,t]]),r[2]!==0){const p=Zo(t.events,r[2]),g=Zo(t.events,r[3]),h={type:f,start:Object.assign({},p),end:Object.assign({},g)};if(e.add(r[2],0,[["enter",h,t]]),a!==2){const x=t.events[r[2]],v=t.events[r[3]];if(x[1].end=Object.assign({},v[1].end),x[1].type="chunkText",x[1].contentType="text",r[3]>r[2]+1){const E=r[2]+1,S=r[3]-r[2]-1;e.add(E,S,[])}}e.add(r[3]+1,0,[["exit",h,t]])}return s!==void 0&&(l.end=Object.assign({},Zo(t.events,s)),e.add(s,0,[["exit",l,t]]),l=void 0),l}function R1(e,t,r,a,s){const l=[],c=Zo(t.events,r);s&&(s.end=Object.assign({},c),l.push(["exit",s,t])),a.end=Object.assign({},c),l.push(["exit",a,t]),e.add(r+1,0,l)}function Zo(e,t){const r=e[t],a=r[0]==="enter"?"start":"end";return r[1][a]}const jU={name:"tasklistCheck",tokenize:IU};function LU(){return{text:{91:jU}}}function IU(e,t,r){const a=this;return s;function s(m){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?r(m):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),l)}function l(m){return Dt(m)?(e.enter("taskListCheckValueUnchecked"),e.consume(m),e.exit("taskListCheckValueUnchecked"),c):m===88||m===120?(e.enter("taskListCheckValueChecked"),e.consume(m),e.exit("taskListCheckValueChecked"),c):r(m)}function c(m){return m===93?(e.enter("taskListCheckMarker"),e.consume(m),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):r(m)}function f(m){return Be(m)?t(m):it(m)?e.check({tokenize:zU},t,r)(m):r(m)}}function zU(e,t,r){return ct(e,a,"whitespace");function a(s){return s===null?r(s):t(s)}}function BU(e){return ES([cU(),xU(),CU(e),MU(),LU()])}const PU={};function UU(e){const t=this,r=e||PU,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),l=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(BU(r)),l.push(aU()),c.push(oU(r))}const M1=(function(e,t,r){const a=nc(r);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(a(e.children[t],t,e))return e.children[t]}),io=(function(e){if(e==null)return $U;if(typeof e=="string")return HU(e);if(typeof e=="object")return FU(e);if(typeof e=="function")return jg(e);throw new Error("Expected function, string, or array as `test`")});function FU(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=io(e[r]);return jg(a);function a(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function HU(e){return jg(t);function t(r){return r.tagName===e}}function jg(e){return t;function t(r,a,s){return!!(qU(r)&&e.call(this,r,typeof a=="number"?a:void 0,s||void 0))}}function $U(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function qU(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const O1=/\n/g,D1=/[\t ]+/g,_h=io("br"),j1=io(WU),GU=io("p"),L1=io("tr"),KU=io(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",ZU,JU]),d_=io(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function QU(e,t){const r=t||{},a="children"in e?e.children:[],s=d_(e),l=m_(e,{whitespace:r.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...p_(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<a.length;)c.push(...f_(a[f],e,{whitespace:l,breakBefore:f?void 0:s,breakAfter:f<a.length-1?_h(a[f+1]):s}));const m=[];let p;for(f=-1;++f<c.length;){const g=c[f];typeof g=="number"?p!==void 0&&g>p&&(p=g):g&&(p!==void 0&&p>-1&&m.push(`
|
|
42
|
-
`.repeat(p)||" "),p=-1,m.push(g))}return m.join("")}function f_(e,t,r){return e.type==="element"?VU(e,t,r):e.type==="text"?r.whitespace==="normal"?p_(e,r):YU(e):[]}function VU(e,t,r){const a=m_(e,r),s=e.children||[];let l=-1,c=[];if(KU(e))return c;let f,m;for(_h(e)||L1(e)&&M1(t,e,L1)?m=`
|
|
43
|
-
`:GU(e)?(f=2,m=2):d_(e)&&(f=1,m=1);++l<s.length;)c=c.concat(f_(s[l],e,{whitespace:a,breakBefore:l?void 0:f,breakAfter:l<s.length-1?_h(s[l+1]):m}));return j1(e)&&M1(t,e,j1)&&c.push(" "),f&&c.unshift(f),m&&c.push(m),c}function p_(e,t){const r=String(e.value),a=[],s=[];let l=0;for(;l<=r.length;){O1.lastIndex=l;const m=O1.exec(r),p=m&&"index"in m?m.index:r.length;a.push(XU(r.slice(l,p).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),l===0?t.breakBefore:!0,p===r.length?t.breakAfter:!0)),l=p+1}let c=-1,f;for(;++c<a.length;)a[c].charCodeAt(a[c].length-1)===8203||c<a.length-1&&a[c+1].charCodeAt(0)===8203?(s.push(a[c]),f=void 0):a[c]?(typeof f=="number"&&s.push(f),s.push(a[c]),f=0):(c===0||c===a.length-1)&&s.push(0);return s}function YU(e){return[String(e.value)]}function XU(e,t,r){const a=[];let s=0,l;for(;s<e.length;){D1.lastIndex=s;const c=D1.exec(e);l=c?c.index:e.length,!s&&!l&&c&&!t&&a.push(""),s!==l&&a.push(e.slice(s,l)),s=c?l+c[0].length:l}return s!==l&&!r&&a.push(""),a.join(" ")}function m_(e,t){if(e.type==="element"){const r=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function ZU(e){return!!(e.properties||{}).hidden}function WU(e){return e.tagName==="td"||e.tagName==="th"}function JU(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function e6(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},p={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(p,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",E=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],N=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],k=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],O={type:S,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:N},P={className:"function.dispatch",relevance:0,keywords:{_hint:k},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},D=[P,h,f,r,e.C_BLOCK_COMMENT_MODE,g,p],U={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:O,contains:D.concat([{begin:/\(/,end:/\)/,keywords:O,contains:D.concat(["self"]),relevance:0}]),relevance:0},B={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:O,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:O,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[p,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,p,g,f,{begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,p,g,f]}]},f,r,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:O,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(U,B,P,D,[h,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:O,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:O},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function t6(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},r=e6(e),a=r.keywords;return a.type=[...a.type,...t.type],a.literal=[...a.literal,...t.literal],a.built_in=[...a.built_in,...t.built_in],a._hints=t._hints,r.name="Arduino",r.aliases=["ino"],r.supersetOf="cpp",r}function n6(e){const t=e.regex,r={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},l=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r,s]};s.contains.push(f);const m={match:/\\"/},p={className:"string",begin:/'/,end:/'/},g={match:/\\'/},h={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,r]},x=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=e.SHEBANG({binary:`(${x.join("|")})`,relevance:10}),E={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},S=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],N=["true","false"],k={match:/(\/[a-z._-]+)+/},M=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],R=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],O=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],P=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:S,literal:N,built_in:[...M,...R,"set","shopt",...O,...P]},contains:[v,e.SHEBANG(),E,h,l,c,k,f,m,p,g,r]}}function r6(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},p={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(p,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",N={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},k=[h,f,r,e.C_BLOCK_COMMENT_MODE,g,p],M={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:N,contains:k.concat([{begin:/\(/,end:/\)/,keywords:N,contains:k.concat(["self"]),relevance:0}]),relevance:0},R={begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:N,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:N,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:N,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,p,g,f,{begin:/\(/,end:/\)/,keywords:N,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,p,g,f]}]},f,r,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C",aliases:["h"],keywords:N,disableAutodetect:!0,illegal:"</",contains:[].concat(M,R,k,[h,{begin:e.IDENT_RE+"::",keywords:N},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:h,strings:p,keywords:N}}}function i6(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},p={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},g={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},h={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(p,{className:"string"}),{className:"string",begin:/<.*?>/},r,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",E=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],N=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],k=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],O={type:S,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:N},P={className:"function.dispatch",relevance:0,keywords:{_hint:k},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},D=[P,h,f,r,e.C_BLOCK_COMMENT_MODE,g,p],U={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:O,contains:D.concat([{begin:/\(/,end:/\)/,keywords:O,contains:D.concat(["self"]),relevance:0}]),relevance:0},B={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:O,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:O,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[p,g]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,p,g,f,{begin:/\(/,end:/\)/,keywords:O,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,p,g,f]}]},f,r,e.C_BLOCK_COMMENT_MODE,h]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:O,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(U,B,P,D,[h,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:O,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:O},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function a6(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],r=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],s=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],l=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],c={keyword:s.concat(l),built_in:t,literal:a},f=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),m={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},p={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},g={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},h=e.inherit(g,{illegal:/\n/}),x={className:"subst",begin:/\{/,end:/\}/,keywords:c},v=e.inherit(x,{illegal:/\n/}),E={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},S={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]},N=e.inherit(S,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});x.contains=[S,E,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,e.C_BLOCK_COMMENT_MODE],v.contains=[N,E,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const k={variants:[p,S,E,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},M={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},R=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",O={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:c,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},k,m,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,M,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,M,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+R+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:c,contains:[{beginKeywords:r.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,M],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[k,m,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},O]}}const o6=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),s6=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],l6=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],c6=[...s6,...l6],u6=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),d6=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),f6=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),p6=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function m6(e){const t=e.regex,r=o6(e),a={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",l=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",f=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[r.BLOCK_COMMENT,a,r.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+d6.join("|")+")"},{begin:":(:)?("+f6.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+p6.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,...f,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...f,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:l},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:u6.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+c6.join("|")+")\\b"}]}}function h6(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function g6(e){const l={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:l,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:l,illegal:/["']/}]}]}}function b6(e){const t=e.regex,r=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(r,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function y6(e){const t=e.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},l={className:"literal",begin:/\bon|off|true|false|yes|no\b/},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},f={begin:/\[/,end:/\]/,contains:[a,l,s,c,r,"self"],relevance:0},m=/[A-Za-z0-9_-]+/,p=/"(\\"|[^"])*"/,g=/'[^']*'/,h=t.either(m,p,g),x=t.concat(h,"(\\s*\\.\\s*",h,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{begin:x,className:"attr",starts:{end:/$/,contains:[a,f,l,s,c,r]}}]}}var Wo="[0-9](_*[0-9])*",Lu=`\\.(${Wo})`,Iu="[0-9a-fA-F](_*[0-9a-fA-F])*",I1={className:"number",variants:[{begin:`(\\b(${Wo})((${Lu})|\\.)?|(${Lu}))[eE][+-]?(${Wo})[fFdD]?\\b`},{begin:`\\b(${Wo})((${Lu})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Lu})[fFdD]?\\b`},{begin:`\\b(${Wo})[fFdD]\\b`},{begin:`\\b0[xX]((${Iu})\\.?|(${Iu})?\\.(${Iu}))[pP][+-]?(${Wo})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Iu})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function h_(e,t,r){return r===-1?"":e.replace(t,a=>h_(e,t,r-1))}function x6(e){const t=e.regex,r="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=r+h_("(?:<"+r+"~~~(?:\\s*,\\s*"+r+"~~~)*>)?",/~~~/g,2),m={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},p={className:"meta",begin:"@"+r,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},g={className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:m,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,r),/\s+/,r,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,r],className:{1:"keyword",3:"title.class"},contains:[g,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+a+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:m,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[p,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,I1,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},I1,p]}}const z1="[A-Za-z$_][0-9A-Za-z$_]*",v6=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],E6=["true","false","null","undefined","NaN","Infinity"],g_=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],b_=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],y_=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],w6=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],S6=[].concat(y_,g_,b_);function _6(e){const t=e.regex,r=(Z,{after:ie})=>{const T="</"+Z[0].slice(1);return Z.input.indexOf(T,ie)!==-1},a=z1,s={begin:"<>",end:"</>"},l=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,ie)=>{const T=Z[0].length+Z.index,I=Z.input[T];if(I==="<"||I===","){ie.ignoreMatch();return}I===">"&&(r(Z,{after:T})||ie.ignoreMatch());let q;const A=Z.input.substring(T);if(q=A.match(/^\s*=/)){ie.ignoreMatch();return}if((q=A.match(/^\s+extends\s+/))&&q.index===0){ie.ignoreMatch();return}}},f={$pattern:z1,keyword:v6,literal:E6,built_in:S6,"variable.language":w6},m="[0-9](_?[0-9])*",p=`\\.(${m})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${g})((${p})|\\.)?|(${p}))[eE][+-]?(${m})\\b`},{begin:`\\b(${g})\\b((${p})\\b|\\.)?|(${p})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},N={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},M={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},R=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,S,N,{match:/\$\d+/},h];x.contains=R.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(R)});const O=[].concat(M,x.contains),P=O.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(O)}]),D={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:P},U={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},B={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...g_,...b_]}},J={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},F={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[D],illegal:/%/},ae={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ee(Z){return t.concat("(?!",Z.join("|"),")")}const ce={match:t.concat(/\b/,ee([...y_,"super","import"].map(Z=>`${Z}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},te={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Q={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},D]},j="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",V={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[D]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:P,CLASS_REFERENCE:B},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),J,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,S,N,M,{match:/\$\d+/},h,B,{scope:"attr",match:a+t.lookahead(":"),relevance:0},V,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[M,e.REGEXP_MODE,{className:"function",begin:j,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:P}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:l},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},F,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[D,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},te,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[D]},ce,ae,U,Q,{match:/\$[(.]/}]}}function k6(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],s={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:a},contains:[t,r,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var Jo="[0-9](_*[0-9])*",zu=`\\.(${Jo})`,Bu="[0-9a-fA-F](_*[0-9a-fA-F])*",N6={className:"number",variants:[{begin:`(\\b(${Jo})((${zu})|\\.)?|(${zu}))[eE][+-]?(${Jo})[fFdD]?\\b`},{begin:`\\b(${Jo})((${zu})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${zu})[fFdD]?\\b`},{begin:`\\b(${Jo})[fFdD]\\b`},{begin:`\\b0[xX]((${Bu})\\.?|(${Bu})?\\.(${Bu}))[pP][+-]?(${Jo})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Bu})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function C6(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},r={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},l={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},c={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[l,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,l,s]}]};s.contains.push(c);const f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},m={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},p=N6,g=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),h={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},x=h;return x.variants[1].contains=[h],h.variants[1].contains=[x],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,g,r,a,f,m,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[h,e.C_LINE_COMMENT_MODE,g],relevance:0},e.C_LINE_COMMENT_MODE,g,f,m,c,e.C_NUMBER_MODE]},g]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},f,m]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
44
|
-
`},p]}}const T6=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),A6=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],R6=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],M6=[...A6,...R6],O6=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),x_=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),v_=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),D6=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),j6=x_.concat(v_).sort().reverse();function L6(e){const t=T6(e),r=j6,a="and or not only",s="[\\w-]+",l="("+s+"|@\\{"+s+"\\})",c=[],f=[],m=function(R){return{className:"string",begin:"~?"+R+".*?"+R}},p=function(R,O,P){return{className:R,begin:O,relevance:P}},g={$pattern:/[a-z-]+/,keyword:a,attribute:O6.join(" ")},h={begin:"\\(",end:"\\)",contains:f,keywords:g,relevance:0};f.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m("'"),m('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,h,p("variable","@@?"+s,10),p("variable","@\\{"+s+"\\}"),p("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const x=f.concat({begin:/\{/,end:/\}/,contains:c}),v={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(f)},E={begin:l+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+D6.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:f}}]},S={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:g,returnEnd:!0,contains:f,relevance:0}},N={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:x}},k={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:l,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,v,p("keyword","all\\b"),p("variable","@\\{"+s+"\\}"),{begin:"\\b("+M6.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,p("selector-tag",l,0),p("selector-id","#"+l),p("selector-class","\\."+l,0),p("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+x_.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+v_.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:x},{begin:"!important"},t.FUNCTION_DISPATCH]},M={begin:s+`:(:)?(${r.join("|")})`,returnBegin:!0,contains:[k]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,S,N,M,E,k,v,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function I6(e){const t="\\[=*\\[",r="\\]=*\\]",a={begin:t,end:r,contains:["self"]},s=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,r,{contains:[a],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:s.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:s}].concat(s)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:r,contains:[a],relevance:5}])}}function z6(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},r={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},a={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,r]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},l={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},c={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,r,a,s,l,c]}}function B6(e){const t=e.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},a={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},l={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},f=/[A-Za-z][A-Za-z0-9+.-]*/,m={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,f,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},p={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},g={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},h=e.inherit(p,{contains:[]}),x=e.inherit(g,{contains:[]});p.contains.push(x),g.contains.push(h);let v=[r,m];return[p,g,h,x].forEach(k=>{k.contains=k.contains.concat(v)}),v=v.concat(p,g),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:v},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:v}]}]},r,l,p,g,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},s,a,m,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function P6(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r=/[a-zA-Z@][a-zA-Z0-9_]*/,f={"variable.language":["this","super"],$pattern:r,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},m={$pattern:r,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:f,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+m.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:m,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function U6(e){const t=e.regex,r=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],a=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:r.join(" ")},l={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},c={begin:/->\{/,end:/\}/},f={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},m={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[f]},p={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},g=[e.BACKSLASH_ESCAPE,l,m],h=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],x=(S,N,k="\\1")=>{const M=k==="\\1"?k:t.concat(k,N);return t.concat(t.concat("(?:",S,")"),N,/(?:\\.|[^\\\/])*?/,M,/(?:\\.|[^\\\/])*?/,k,a)},v=(S,N,k)=>t.concat(t.concat("(?:",S,")"),N,/(?:\\.|[^\\\/])*?/,k,a),E=[m,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),c,{className:"string",contains:g,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},p,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:x("s|tr|y",t.either(...h,{capture:!0}))},{begin:x("s|tr|y","\\(","\\)")},{begin:x("s|tr|y","\\[","\\]")},{begin:x("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",t.either(...h,{capture:!0}),/\1/)},{begin:v("m|qr",/\(/,/\)/)},{begin:v("m|qr",/\[/,/\]/)},{begin:v("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f,p]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return l.contains=E,c.contains=E,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:E}}function F6(e){const t=e.regex,r=/(?![A-Za-z0-9])(?![$])/,a=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),l=t.concat(/[A-Z]+/,r),c={scope:"variable",match:"\\$+"+a},f={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},m={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},p=e.inherit(e.APOS_STRING_MODE,{illegal:null}),g=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(m)}),h={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(m),"on:begin":(te,Q)=>{Q.data._beginMatch=te[1]||te[2]},"on:end":(te,Q)=>{Q.data._beginMatch!==te[1]&&Q.ignoreMatch()}},x=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
|
|
45
|
-
]`,E={scope:"string",variants:[g,p,h,x]},S={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},N=["false","null","true"],k=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],M=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],O={keyword:k,literal:(te=>{const Q=[];return te.forEach(j=>{Q.push(j),j.toLowerCase()===j?Q.push(j.toUpperCase()):Q.push(j.toLowerCase())}),Q})(N),built_in:M},P=te=>te.map(Q=>Q.replace(/\|\d+$/,"")),D={variants:[{match:[/new/,t.concat(v,"+"),t.concat("(?!",P(M).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},U=t.concat(a,"\\b(?!\\()"),B={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),U],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),U],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},J={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},F={relevance:0,begin:/\(/,end:/\)/,keywords:O,contains:[J,c,B,e.C_BLOCK_COMMENT_MODE,E,S,D]},ae={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",P(k).join("\\b|"),"|",P(M).join("\\b|"),"\\b)"),a,t.concat(v,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[F]};F.contains.push(ae);const ee=[J,B,e.C_BLOCK_COMMENT_MODE,E,S,D],ce={begin:t.concat(/#\[\s*\\?/,t.either(s,l)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:N,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:N,keyword:["new","array"]},contains:["self",...ee]},...ee,{scope:"meta",variants:[{match:s},{match:l}]}]};return{case_insensitive:!1,keywords:O,contains:[ce,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},c,ae,B,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},D,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:O,contains:["self",ce,c,B,e.C_BLOCK_COMMENT_MODE,E,S]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},E,S]}}function H6(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function $6(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function q6(e){const t=e.regex,r=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],f={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},m={className:"meta",begin:/^(>>>|\.\.\.) /},p={className:"subst",begin:/\{/,end:/\}/,keywords:f,illegal:/#/},g={begin:/\{\{/,relevance:0},h={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,m],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,m],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,m,g,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,m,g,p]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,g,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,g,p]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},x="[0-9](_?[0-9])*",v=`(\\b(${x}))?\\.(${x})|\\b(${x})\\.`,E=`\\b|${a.join("|")}`,S={className:"number",relevance:0,variants:[{begin:`(\\b(${x})|(${v}))[eE][+-]?(${x})[jJ]?(?=${E})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${E})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${E})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${E})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${E})`},{begin:`\\b(${x})[jJ](?=${E})`}]},N={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},k={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",m,S,h,e.HASH_COMMENT_MODE]}]};return p.contains=[h,S,m],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[m,S,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},h,N,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[k]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[S,k,h]}]}}function G6(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function K6(e){const t=e.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),s=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,l=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:r,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:r},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[s,a]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[l,a]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:s},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:l},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function Q6(e){const t=e.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(a,/(::\w+)*/),c={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},f={className:"doctag",begin:"@[A-Za-z]+"},m={begin:"#<",end:">"},p=[e.COMMENT("#","$",{contains:[f]}),e.COMMENT("^=begin","^=end",{contains:[f],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],g={className:"subst",begin:/#\{/,end:/\}/,keywords:c},h={className:"string",contains:[e.BACKSLASH_ESCAPE,g],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,g]})]}]},x="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",E={className:"number",relevance:0,variants:[{begin:`\\b(${x})(\\.(${v}))?([eE][+-]?(${v})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},S={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},D=[h,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:c},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[S]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[h,{begin:r}],relevance:0},E,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:c},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,g],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(m,p),relevance:0}].concat(m,p);g.contains=D,S.contains=D;const F=[{begin:/^\s*=>/,starts:{end:"$",contains:D}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:D}}];return p.unshift(m),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(F).concat(p).concat(D)}}function V6(e){const t=e.regex,r=/(r#)?/,a=t.concat(r,e.UNDERSCORE_IDENT_RE),s=t.concat(r,e.IDENT_RE),l={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},c="([ui](8|16|32|64|128|size)|f(32|64))?",f=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],m=["true","false","Some","None","Ok","Err"],p=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],g=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:g,keyword:f,literal:m,built_in:p},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+c},{begin:"\\b0o([0-7_]+)"+c},{begin:"\\b0x([A-Fa-f0-9_]+)"+c},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+c}],relevance:0},{begin:[/fn/,/\s+/,a],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:p,type:g}},{className:"punctuation",begin:"->"},l]}}const Y6=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),X6=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Z6=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],W6=[...X6,...Z6],J6=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),eF=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),tF=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),nF=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function rF(e){const t=Y6(e),r=tF,a=eF,s="@[a-z-]+",l="and or not only",f={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+W6.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+a.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+r.join("|")+")"},f,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+nF.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,f,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:l,attribute:J6.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},f,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function iF(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function aF(e){const t=e.regex,r=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},l=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],m=["add","asc","collation","desc","final","first","last","view"],p=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],g=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],h=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],x=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],v=g,E=[...p,...m].filter(P=>!g.includes(P)),S={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},N={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},k={match:t.concat(/\b/,t.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function M(P){return t.concat(/\b/,t.either(...P.map(D=>D.replace(/\s+/,"\\s+"))),/\b/)}const R={scope:"keyword",match:M(x),relevance:0};function O(P,{exceptions:D,when:U}={}){const B=U;return D=D||[],P.map(J=>J.match(/\|\d+$/)||D.includes(J)?J:B(J)?`${J}|0`:J)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:O(E,{when:P=>P.length<3}),literal:l,type:f,built_in:h},contains:[{scope:"type",match:M(c)},R,k,S,a,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,r,N]}}function E_(e){return e?typeof e=="string"?e:e.source:null}function _l(e){return Ct("(?=",e,")")}function Ct(...e){return e.map(r=>E_(r)).join("")}function oF(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Ln(...e){return"("+(oF(e).capture?"":"?:")+e.map(a=>E_(a)).join("|")+")"}const Lg=e=>Ct(/\b/,e,/\w$/.test(e)?/\b/:/\B/),sF=["Protocol","Type"].map(Lg),B1=["init","self"].map(Lg),lF=["Any","Self"],Om=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],P1=["false","nil","true"],cF=["assignment","associativity","higherThan","left","lowerThan","none","right"],uF=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],U1=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],w_=Ln(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),S_=Ln(w_,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Dm=Ct(w_,S_,"*"),__=Ln(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),hd=Ln(__,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Qr=Ct(__,hd,"*"),Pu=Ct(/[A-Z]/,hd,"*"),dF=["attached","autoclosure",Ct(/convention\(/,Ln("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",Ct(/objc\(/,Qr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],fF=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function pF(e){const t={match:/\s+/,relevance:0},r=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,r],s={match:[/\./,Ln(...sF,...B1)],className:{2:"keyword"}},l={match:Ct(/\./,Ln(...Om)),relevance:0},c=Om.filter(Je=>typeof Je=="string").concat(["_|0"]),f=Om.filter(Je=>typeof Je!="string").concat(lF).map(Lg),m={variants:[{className:"keyword",match:Ln(...f,...B1)}]},p={$pattern:Ln(/\b\w+/,/#\w+/),keyword:c.concat(uF),literal:P1},g=[s,l,m],h={match:Ct(/\./,Ln(...U1)),relevance:0},x={className:"built_in",match:Ct(/\b/,Ln(...U1),/(?=\()/)},v=[h,x],E={match:/->/,relevance:0},S={className:"operator",relevance:0,variants:[{match:Dm},{match:`\\.(\\.|${S_})+`}]},N=[E,S],k="([0-9]_*)+",M="([0-9a-fA-F]_*)+",R={className:"number",relevance:0,variants:[{match:`\\b(${k})(\\.(${k}))?([eE][+-]?(${k}))?\\b`},{match:`\\b0x(${M})(\\.(${M}))?([pP][+-]?(${k}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},O=(Je="")=>({className:"subst",variants:[{match:Ct(/\\/,Je,/[0\\tnr"']/)},{match:Ct(/\\/,Je,/u\{[0-9a-fA-F]{1,8}\}/)}]}),P=(Je="")=>({className:"subst",match:Ct(/\\/,Je,/[\t ]*(?:[\r\n]|\r\n)/)}),D=(Je="")=>({className:"subst",label:"interpol",begin:Ct(/\\/,Je,/\(/),end:/\)/}),U=(Je="")=>({begin:Ct(Je,/"""/),end:Ct(/"""/,Je),contains:[O(Je),P(Je),D(Je)]}),B=(Je="")=>({begin:Ct(Je,/"/),end:Ct(/"/,Je),contains:[O(Je),D(Je)]}),J={className:"string",variants:[U(),U("#"),U("##"),U("###"),B(),B("#"),B("##"),B("###")]},F=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],ae={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:F},ee=Je=>{const cn=Ct(Je,/\//),bn=Ct(/\//,Je);return{begin:cn,end:bn,contains:[...F,{scope:"comment",begin:`#(?!.*${bn})`,end:/$/}]}},ce={scope:"regexp",variants:[ee("###"),ee("##"),ee("#"),ae]},te={match:Ct(/`/,Qr,/`/)},Q={className:"variable",match:/\$\d+/},j={className:"variable",match:`\\$${hd}+`},V=[te,Q,j],Z={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:fF,contains:[...N,R,J]}]}},ie={scope:"keyword",match:Ct(/@/,Ln(...dF),_l(Ln(/\(/,/\s+/)))},T={scope:"meta",match:Ct(/@/,Qr)},I=[Z,ie,T],q={match:_l(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:Ct(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,hd,"+")},{className:"type",match:Pu,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:Ct(/\s+&\s+/,_l(Pu)),relevance:0}]},A={begin:/</,end:/>/,keywords:p,contains:[...a,...g,...I,E,q]};q.contains.push(A);const $={match:Ct(Qr,/\s*:/),keywords:"_|0",relevance:0},ue={begin:/\(/,end:/\)/,relevance:0,keywords:p,contains:["self",$,...a,ce,...g,...v,...N,R,J,...V,...I,q]},de={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,q]},Se={begin:Ln(_l(Ct(Qr,/\s*:/)),_l(Ct(Qr,/\s+/,Qr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Qr}]},Ee={begin:/\(/,end:/\)/,keywords:p,contains:[Se,...a,...g,...N,R,J,...I,q,ue],endsParent:!0,illegal:/["']/},Ce={match:[/(func|macro)/,/\s+/,Ln(te.match,Qr,Dm)],className:{1:"keyword",3:"title.function"},contains:[de,Ee,t],illegal:[/\[/,/%/]},dt={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[de,Ee,t],illegal:/\[|%/},St={match:[/operator/,/\s+/,Dm],className:{1:"keyword",3:"title"}},Lt={begin:[/precedencegroup/,/\s+/,Pu],className:{1:"keyword",3:"title"},contains:[q],keywords:[...cF,...P1],end:/}/},ln={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},gt={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},On={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Qr,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:p,contains:[de,...g,{begin:/:/,end:/\{/,keywords:p,contains:[{scope:"title.class.inherited",match:Pu},...g],relevance:0}]};for(const Je of J.variants){const cn=Je.contains.find($t=>$t.label==="interpol");cn.keywords=p;const bn=[...g,...v,...N,R,J,...V];cn.contains=[...bn,{begin:/\(/,end:/\)/,contains:["self",...bn]}]}return{name:"Swift",keywords:p,contains:[...a,Ce,dt,ln,gt,On,St,Lt,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},ce,...g,...v,...N,R,J,...V,...I,q,ue]}}const gd="[A-Za-z$_][0-9A-Za-z$_]*",k_=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],N_=["true","false","null","undefined","NaN","Infinity"],C_=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],T_=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],A_=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],R_=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],M_=[].concat(A_,C_,T_);function mF(e){const t=e.regex,r=(Z,{after:ie})=>{const T="</"+Z[0].slice(1);return Z.input.indexOf(T,ie)!==-1},a=gd,s={begin:"<>",end:"</>"},l=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Z,ie)=>{const T=Z[0].length+Z.index,I=Z.input[T];if(I==="<"||I===","){ie.ignoreMatch();return}I===">"&&(r(Z,{after:T})||ie.ignoreMatch());let q;const A=Z.input.substring(T);if(q=A.match(/^\s*=/)){ie.ignoreMatch();return}if((q=A.match(/^\s+extends\s+/))&&q.index===0){ie.ignoreMatch();return}}},f={$pattern:gd,keyword:k_,literal:N_,built_in:M_,"variable.language":R_},m="[0-9](_?[0-9])*",p=`\\.(${m})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${g})((${p})|\\.)?|(${p}))[eE][+-]?(${m})\\b`},{begin:`\\b(${g})\\b((${p})\\b|\\.)?|(${p})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},N={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},M={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},R=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,S,N,{match:/\$\d+/},h];x.contains=R.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(R)});const O=[].concat(M,x.contains),P=O.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(O)}]),D={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:P},U={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},B={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...C_,...T_]}},J={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},F={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[D],illegal:/%/},ae={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ee(Z){return t.concat("(?!",Z.join("|"),")")}const ce={match:t.concat(/\b/,ee([...A_,"super","import"].map(Z=>`${Z}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},te={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Q={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},D]},j="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",V={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(j)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[D]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:P,CLASS_REFERENCE:B},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),J,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,S,N,M,{match:/\$\d+/},h,B,{scope:"attr",match:a+t.lookahead(":"),relevance:0},V,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[M,e.REGEXP_MODE,{className:"function",begin:j,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:P}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:l},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},F,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[D,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},te,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[D]},ce,ae,U,Q,{match:/\$[(.]/}]}}function hF(e){const t=e.regex,r=mF(e),a=gd,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],l={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[r.exports.CLASS_REFERENCE]},f={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},m=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],p={$pattern:gd,keyword:k_.concat(m),literal:N_,built_in:M_.concat(s),"variable.language":R_},g={className:"meta",begin:"@"+a},h=(S,N,k)=>{const M=S.contains.findIndex(R=>R.label===N);if(M===-1)throw new Error("can not find mode to replace");S.contains.splice(M,1,k)};Object.assign(r.keywords,p),r.exports.PARAMS_CONTAINS.push(g);const x=r.contains.find(S=>S.scope==="attr"),v=Object.assign({},x,{match:t.concat(a,t.lookahead(/\s*\?:/))});r.exports.PARAMS_CONTAINS.push([r.exports.CLASS_REFERENCE,x,v]),r.contains=r.contains.concat([g,l,c,v]),h(r,"shebang",e.SHEBANG()),h(r,"use_strict",f);const E=r.contains.find(S=>S.label==="func.def");return E.relevance=0,Object.assign(r,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),r}function gF(e){const t=e.regex,r={className:"string",begin:/"(""|[^/n])"C\b/},a={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,l=/\d{4}-\d{1,2}-\d{1,2}/,c=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,f=/\d{1,2}(:\d{1,2}){1,2}/,m={className:"literal",variants:[{begin:t.concat(/# */,t.either(l,s),/ *#/)},{begin:t.concat(/# */,f,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(l,s),/ +/,t.either(c,f),/ *#/)}]},p={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},g={className:"label",begin:/^\w+:/},h=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),x=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[r,a,m,p,g,h,x,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[x]}]}}function bF(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const r=e.COMMENT(/;;/,/$/),a=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},l={className:"variable",begin:/\$[\w_]+/},c={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},f={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},m={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},p={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:a},contains:[r,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},l,c,s,e.QUOTE_STRING_MODE,m,p,f]}}function yF(e){const t=e.regex,r=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},l={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(l,{begin:/\(/,end:/\)/}),f=e.inherit(e.APOS_STRING_MODE,{className:"string"}),m=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),p={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:a,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[l,m,f,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[l,c,m,f]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[m]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[p],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[p],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(r,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:p}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function xF(e){const t="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},l={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},f=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),x={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},E={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},S={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},N=[a,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},x,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},E,S,l,c],k=[...N];return k.pop(),k.push(f),v.contains=k,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:N}}const vF={arduino:t6,bash:n6,c:r6,cpp:i6,csharp:a6,css:m6,diff:h6,go:g6,graphql:b6,ini:y6,java:x6,javascript:_6,json:k6,kotlin:C6,less:L6,lua:I6,makefile:z6,markdown:B6,objectivec:P6,perl:U6,php:F6,"php-template":H6,plaintext:$6,python:q6,"python-repl":G6,r:K6,ruby:Q6,rust:V6,scss:rF,shell:iF,sql:aF,swift:pF,typescript:hF,vbnet:gF,wasm:bF,xml:yF,yaml:xF};var jm,F1;function EF(){if(F1)return jm;F1=1;function e(L){return L instanceof Map?L.clear=L.delete=L.set=function(){throw new Error("map is read-only")}:L instanceof Set&&(L.add=L.clear=L.delete=function(){throw new Error("set is read-only")}),Object.freeze(L),Object.getOwnPropertyNames(L).forEach(re=>{const me=L[re],Ae=typeof me;(Ae==="object"||Ae==="function")&&!Object.isFrozen(me)&&e(me)}),L}class t{constructor(re){re.data===void 0&&(re.data={}),this.data=re.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(L){return L.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(L,...re){const me=Object.create(null);for(const Ae in L)me[Ae]=L[Ae];return re.forEach(function(Ae){for(const yt in Ae)me[yt]=Ae[yt]}),me}const s="</span>",l=L=>!!L.scope,c=(L,{prefix:re})=>{if(L.startsWith("language:"))return L.replace("language:","language-");if(L.includes(".")){const me=L.split(".");return[`${re}${me.shift()}`,...me.map((Ae,yt)=>`${Ae}${"_".repeat(yt+1)}`)].join(" ")}return`${re}${L}`};class f{constructor(re,me){this.buffer="",this.classPrefix=me.classPrefix,re.walk(this)}addText(re){this.buffer+=r(re)}openNode(re){if(!l(re))return;const me=c(re.scope,{prefix:this.classPrefix});this.span(me)}closeNode(re){l(re)&&(this.buffer+=s)}value(){return this.buffer}span(re){this.buffer+=`<span class="${re}">`}}const m=(L={})=>{const re={children:[]};return Object.assign(re,L),re};class p{constructor(){this.rootNode=m(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(re){this.top.children.push(re)}openNode(re){const me=m({scope:re});this.add(me),this.stack.push(me)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(re){return this.constructor._walk(re,this.rootNode)}static _walk(re,me){return typeof me=="string"?re.addText(me):me.children&&(re.openNode(me),me.children.forEach(Ae=>this._walk(re,Ae)),re.closeNode(me)),re}static _collapse(re){typeof re!="string"&&re.children&&(re.children.every(me=>typeof me=="string")?re.children=[re.children.join("")]:re.children.forEach(me=>{p._collapse(me)}))}}class g extends p{constructor(re){super(),this.options=re}addText(re){re!==""&&this.add(re)}startScope(re){this.openNode(re)}endScope(){this.closeNode()}__addSublanguage(re,me){const Ae=re.root;me&&(Ae.scope=`language:${me}`),this.add(Ae)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function h(L){return L?typeof L=="string"?L:L.source:null}function x(L){return S("(?=",L,")")}function v(L){return S("(?:",L,")*")}function E(L){return S("(?:",L,")?")}function S(...L){return L.map(me=>h(me)).join("")}function N(L){const re=L[L.length-1];return typeof re=="object"&&re.constructor===Object?(L.splice(L.length-1,1),re):{}}function k(...L){return"("+(N(L).capture?"":"?:")+L.map(Ae=>h(Ae)).join("|")+")"}function M(L){return new RegExp(L.toString()+"|").exec("").length-1}function R(L,re){const me=L&&L.exec(re);return me&&me.index===0}const O=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function P(L,{joinWith:re}){let me=0;return L.map(Ae=>{me+=1;const yt=me;let Ge=h(Ae),xe="";for(;Ge.length>0;){const ve=O.exec(Ge);if(!ve){xe+=Ge;break}xe+=Ge.substring(0,ve.index),Ge=Ge.substring(ve.index+ve[0].length),ve[0][0]==="\\"&&ve[1]?xe+="\\"+String(Number(ve[1])+yt):(xe+=ve[0],ve[0]==="("&&me++)}return xe}).map(Ae=>`(${Ae})`).join(re)}const D=/\b\B/,U="[a-zA-Z]\\w*",B="[a-zA-Z_]\\w*",J="\\b\\d+(\\.\\d+)?",F="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",ae="\\b(0b[01]+)",ee="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ce=(L={})=>{const re=/^#![ ]*\//;return L.binary&&(L.begin=S(re,/.*\b/,L.binary,/\b.*/)),a({scope:"meta",begin:re,end:/$/,relevance:0,"on:begin":(me,Ae)=>{me.index!==0&&Ae.ignoreMatch()}},L)},te={begin:"\\\\[\\s\\S]",relevance:0},Q={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[te]},j={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[te]},V={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Z=function(L,re,me={}){const Ae=a({scope:"comment",begin:L,end:re,contains:[]},me);Ae.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const yt=k("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ae.contains.push({begin:S(/[ ]+/,"(",yt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ae},ie=Z("//","$"),T=Z("/\\*","\\*/"),I=Z("#","$"),q={scope:"number",begin:J,relevance:0},A={scope:"number",begin:F,relevance:0},$={scope:"number",begin:ae,relevance:0},ue={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[te,{begin:/\[/,end:/\]/,relevance:0,contains:[te]}]},de={scope:"title",begin:U,relevance:0},Se={scope:"title",begin:B,relevance:0},Ee={begin:"\\.\\s*"+B,relevance:0};var dt=Object.freeze({__proto__:null,APOS_STRING_MODE:Q,BACKSLASH_ESCAPE:te,BINARY_NUMBER_MODE:$,BINARY_NUMBER_RE:ae,COMMENT:Z,C_BLOCK_COMMENT_MODE:T,C_LINE_COMMENT_MODE:ie,C_NUMBER_MODE:A,C_NUMBER_RE:F,END_SAME_AS_BEGIN:function(L){return Object.assign(L,{"on:begin":(re,me)=>{me.data._beginMatch=re[1]},"on:end":(re,me)=>{me.data._beginMatch!==re[1]&&me.ignoreMatch()}})},HASH_COMMENT_MODE:I,IDENT_RE:U,MATCH_NOTHING_RE:D,METHOD_GUARD:Ee,NUMBER_MODE:q,NUMBER_RE:J,PHRASAL_WORDS_MODE:V,QUOTE_STRING_MODE:j,REGEXP_MODE:ue,RE_STARTERS_RE:ee,SHEBANG:ce,TITLE_MODE:de,UNDERSCORE_IDENT_RE:B,UNDERSCORE_TITLE_MODE:Se});function St(L,re){L.input[L.index-1]==="."&&re.ignoreMatch()}function Lt(L,re){L.className!==void 0&&(L.scope=L.className,delete L.className)}function ln(L,re){re&&L.beginKeywords&&(L.begin="\\b("+L.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",L.__beforeBegin=St,L.keywords=L.keywords||L.beginKeywords,delete L.beginKeywords,L.relevance===void 0&&(L.relevance=0))}function gt(L,re){Array.isArray(L.illegal)&&(L.illegal=k(...L.illegal))}function On(L,re){if(L.match){if(L.begin||L.end)throw new Error("begin & end are not supported with match");L.begin=L.match,delete L.match}}function Je(L,re){L.relevance===void 0&&(L.relevance=1)}const cn=(L,re)=>{if(!L.beforeMatch)return;if(L.starts)throw new Error("beforeMatch cannot be used with starts");const me=Object.assign({},L);Object.keys(L).forEach(Ae=>{delete L[Ae]}),L.keywords=me.keywords,L.begin=S(me.beforeMatch,x(me.begin)),L.starts={relevance:0,contains:[Object.assign(me,{endsParent:!0})]},L.relevance=0,delete me.beforeMatch},bn=["of","and","for","in","not","or","if","then","parent","list","value"],$t="keyword";function Pn(L,re,me=$t){const Ae=Object.create(null);return typeof L=="string"?yt(me,L.split(" ")):Array.isArray(L)?yt(me,L):Object.keys(L).forEach(function(Ge){Object.assign(Ae,Pn(L[Ge],re,Ge))}),Ae;function yt(Ge,xe){re&&(xe=xe.map(ve=>ve.toLowerCase())),xe.forEach(function(ve){const Re=ve.split("|");Ae[Re[0]]=[Ge,kr(Re[0],Re[1])]})}}function kr(L,re){return re?Number(re):Qt(L)?0:1}function Qt(L){return bn.includes(L.toLowerCase())}const un={},fe=L=>{console.error(L)},Qe=(L,...re)=>{console.log(`WARN: ${L}`,...re)},K=(L,re)=>{un[`${L}/${re}`]||(console.log(`Deprecated as of ${L}. ${re}`),un[`${L}/${re}`]=!0)},pe=new Error;function we(L,re,{key:me}){let Ae=0;const yt=L[me],Ge={},xe={};for(let ve=1;ve<=re.length;ve++)xe[ve+Ae]=yt[ve],Ge[ve+Ae]=!0,Ae+=M(re[ve-1]);L[me]=xe,L[me]._emit=Ge,L[me]._multi=!0}function $e(L){if(Array.isArray(L.begin)){if(L.skip||L.excludeBegin||L.returnBegin)throw fe("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),pe;if(typeof L.beginScope!="object"||L.beginScope===null)throw fe("beginScope must be object"),pe;we(L,L.begin,{key:"beginScope"}),L.begin=P(L.begin,{joinWith:""})}}function Te(L){if(Array.isArray(L.end)){if(L.skip||L.excludeEnd||L.returnEnd)throw fe("skip, excludeEnd, returnEnd not compatible with endScope: {}"),pe;if(typeof L.endScope!="object"||L.endScope===null)throw fe("endScope must be object"),pe;we(L,L.end,{key:"endScope"}),L.end=P(L.end,{joinWith:""})}}function Vt(L){L.scope&&typeof L.scope=="object"&&L.scope!==null&&(L.beginScope=L.scope,delete L.scope)}function Jt(L){Vt(L),typeof L.beginScope=="string"&&(L.beginScope={_wrap:L.beginScope}),typeof L.endScope=="string"&&(L.endScope={_wrap:L.endScope}),$e(L),Te(L)}function qt(L){function re(xe,ve){return new RegExp(h(xe),"m"+(L.case_insensitive?"i":"")+(L.unicodeRegex?"u":"")+(ve?"g":""))}class me{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ve,Re){Re.position=this.position++,this.matchIndexes[this.matchAt]=Re,this.regexes.push([Re,ve]),this.matchAt+=M(ve)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ve=this.regexes.map(Re=>Re[1]);this.matcherRe=re(P(ve,{joinWith:"|"}),!0),this.lastIndex=0}exec(ve){this.matcherRe.lastIndex=this.lastIndex;const Re=this.matcherRe.exec(ve);if(!Re)return null;const ut=Re.findIndex((xn,Sa)=>Sa>0&&xn!==void 0),At=this.matchIndexes[ut];return Re.splice(0,ut),Object.assign(Re,At)}}class Ae{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ve){if(this.multiRegexes[ve])return this.multiRegexes[ve];const Re=new me;return this.rules.slice(ve).forEach(([ut,At])=>Re.addRule(ut,At)),Re.compile(),this.multiRegexes[ve]=Re,Re}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ve,Re){this.rules.push([ve,Re]),Re.type==="begin"&&this.count++}exec(ve){const Re=this.getMatcher(this.regexIndex);Re.lastIndex=this.lastIndex;let ut=Re.exec(ve);if(this.resumingScanAtSamePosition()&&!(ut&&ut.index===this.lastIndex)){const At=this.getMatcher(0);At.lastIndex=this.lastIndex+1,ut=At.exec(ve)}return ut&&(this.regexIndex+=ut.position+1,this.regexIndex===this.count&&this.considerAll()),ut}}function yt(xe){const ve=new Ae;return xe.contains.forEach(Re=>ve.addRule(Re.begin,{rule:Re,type:"begin"})),xe.terminatorEnd&&ve.addRule(xe.terminatorEnd,{type:"end"}),xe.illegal&&ve.addRule(xe.illegal,{type:"illegal"}),ve}function Ge(xe,ve){const Re=xe;if(xe.isCompiled)return Re;[Lt,On,Jt,cn].forEach(At=>At(xe,ve)),L.compilerExtensions.forEach(At=>At(xe,ve)),xe.__beforeBegin=null,[ln,gt,Je].forEach(At=>At(xe,ve)),xe.isCompiled=!0;let ut=null;return typeof xe.keywords=="object"&&xe.keywords.$pattern&&(xe.keywords=Object.assign({},xe.keywords),ut=xe.keywords.$pattern,delete xe.keywords.$pattern),ut=ut||/\w+/,xe.keywords&&(xe.keywords=Pn(xe.keywords,L.case_insensitive)),Re.keywordPatternRe=re(ut,!0),ve&&(xe.begin||(xe.begin=/\B|\b/),Re.beginRe=re(Re.begin),!xe.end&&!xe.endsWithParent&&(xe.end=/\B|\b/),xe.end&&(Re.endRe=re(Re.end)),Re.terminatorEnd=h(Re.end)||"",xe.endsWithParent&&ve.terminatorEnd&&(Re.terminatorEnd+=(xe.end?"|":"")+ve.terminatorEnd)),xe.illegal&&(Re.illegalRe=re(xe.illegal)),xe.contains||(xe.contains=[]),xe.contains=[].concat(...xe.contains.map(function(At){return dn(At==="self"?xe:At)})),xe.contains.forEach(function(At){Ge(At,Re)}),xe.starts&&Ge(xe.starts,ve),Re.matcher=yt(Re),Re}if(L.compilerExtensions||(L.compilerExtensions=[]),L.contains&&L.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return L.classNameAliases=a(L.classNameAliases||{}),Ge(L)}function Bt(L){return L?L.endsWithParent||Bt(L.starts):!1}function dn(L){return L.variants&&!L.cachedVariants&&(L.cachedVariants=L.variants.map(function(re){return a(L,{variants:null},re)})),L.cachedVariants?L.cachedVariants:Bt(L)?a(L,{starts:L.starts?a(L.starts):null}):Object.isFrozen(L)?a(L):L}var ft="11.11.1";class pr extends Error{constructor(re,me){super(re),this.name="HTMLInjectionError",this.html=me}}const fn=r,Zn=a,oi=Symbol("nomatch"),Bi=7,Pr=function(L){const re=Object.create(null),me=Object.create(null),Ae=[];let yt=!0;const Ge="Could not find the language '{}', did you forget to load/include a language module?",xe={disableAutodetect:!0,name:"Plain text",contains:[]};let ve={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:g};function Re(he){return ve.noHighlightRe.test(he)}function ut(he){let Ie=he.className+" ";Ie+=he.parentNode?he.parentNode.className:"";const tt=ve.languageDetectRe.exec(Ie);if(tt){const xt=Dn(tt[1]);return xt||(Qe(Ge.replace("{}",tt[1])),Qe("Falling back to no-highlight mode for this block.",he)),xt?tt[1]:"no-highlight"}return Ie.split(/\s+/).find(xt=>Re(xt)||Dn(xt))}function At(he,Ie,tt){let xt="",Xt="";typeof Ie=="object"?(xt=he,tt=Ie.ignoreIllegals,Xt=Ie.language):(K("10.7.0","highlight(lang, code, ...args) has been deprecated."),K("10.7.0",`Please use highlight(code, options) instead.
|
|
46
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),Xt=he,xt=Ie),tt===void 0&&(tt=!0);const Tn={code:xt,language:Xt};ka("before:highlight",Tn);const Wn=Tn.result?Tn.result:xn(Tn.language,Tn.code,tt);return Wn.code=Tn.code,ka("after:highlight",Wn),Wn}function xn(he,Ie,tt,xt){const Xt=Object.create(null);function Tn(ye,Me){return ye.keywords[Me]}function Wn(){if(!Fe.keywords){tn.addText(vt);return}let ye=0;Fe.keywordPatternRe.lastIndex=0;let Me=Fe.keywordPatternRe.exec(vt),Ye="";for(;Me;){Ye+=vt.substring(ye,Me.index);const at=vn.case_insensitive?Me[0].toLowerCase():Me[0],Ht=Tn(Fe,at);if(Ht){const[mr,Ts]=Ht;if(tn.addText(Ye),Ye="",Xt[at]=(Xt[at]||0)+1,Xt[at]<=Bi&&(Hi+=Ts),mr.startsWith("_"))Ye+=Me[0];else{const mc=vn.classNameAliases[mr]||mr;Jn(Me[0],mc)}}else Ye+=Me[0];ye=Fe.keywordPatternRe.lastIndex,Me=Fe.keywordPatternRe.exec(vt)}Ye+=vt.substring(ye),tn.addText(Ye)}function Un(){if(vt==="")return;let ye=null;if(typeof Fe.subLanguage=="string"){if(!re[Fe.subLanguage]){tn.addText(vt);return}ye=xn(Fe.subLanguage,vt,!0,pc[Fe.subLanguage]),pc[Fe.subLanguage]=ye._top}else ye=lo(vt,Fe.subLanguage.length?Fe.subLanguage:null);Fe.relevance>0&&(Hi+=ye.relevance),tn.__addSublanguage(ye._emitter,ye.language)}function jt(){Fe.subLanguage!=null?Un():Wn(),vt=""}function Jn(ye,Me){ye!==""&&(tn.startScope(Me),tn.addText(ye),tn.endScope())}function dc(ye,Me){let Ye=1;const at=Me.length-1;for(;Ye<=at;){if(!ye._emit[Ye]){Ye++;continue}const Ht=vn.classNameAliases[ye[Ye]]||ye[Ye],mr=Me[Ye];Ht?Jn(mr,Ht):(vt=mr,Wn(),vt=""),Ye++}}function uo(ye,Me){return ye.scope&&typeof ye.scope=="string"&&tn.openNode(vn.classNameAliases[ye.scope]||ye.scope),ye.beginScope&&(ye.beginScope._wrap?(Jn(vt,vn.classNameAliases[ye.beginScope._wrap]||ye.beginScope._wrap),vt=""):ye.beginScope._multi&&(dc(ye.beginScope,Me),vt="")),Fe=Object.create(ye,{parent:{value:Fe}}),Fe}function ks(ye,Me,Ye){let at=R(ye.endRe,Ye);if(at){if(ye["on:end"]){const Ht=new t(ye);ye["on:end"](Me,Ht),Ht.isMatchIgnored&&(at=!1)}if(at){for(;ye.endsParent&&ye.parent;)ye=ye.parent;return ye}}if(ye.endsWithParent)return ks(ye.parent,Me,Ye)}function fo(ye){return Fe.matcher.regexIndex===0?(vt+=ye[0],1):($i=!0,0)}function Jd(ye){const Me=ye[0],Ye=ye.rule,at=new t(Ye),Ht=[Ye.__beforeBegin,Ye["on:begin"]];for(const mr of Ht)if(mr&&(mr(ye,at),at.isMatchIgnored))return fo(Me);return Ye.skip?vt+=Me:(Ye.excludeBegin&&(vt+=Me),jt(),!Ye.returnBegin&&!Ye.excludeBegin&&(vt=Me)),uo(Ye,ye),Ye.returnBegin?0:Me.length}function Fn(ye){const Me=ye[0],Ye=Ie.substring(ye.index),at=ks(Fe,ye,Ye);if(!at)return oi;const Ht=Fe;Fe.endScope&&Fe.endScope._wrap?(jt(),Jn(Me,Fe.endScope._wrap)):Fe.endScope&&Fe.endScope._multi?(jt(),dc(Fe.endScope,ye)):Ht.skip?vt+=Me:(Ht.returnEnd||Ht.excludeEnd||(vt+=Me),jt(),Ht.excludeEnd&&(vt=Me));do Fe.scope&&tn.closeNode(),!Fe.skip&&!Fe.subLanguage&&(Hi+=Fe.relevance),Fe=Fe.parent;while(Fe!==at.parent);return at.starts&&uo(at.starts,ye),Ht.returnEnd?0:Me.length}function Ns(){const ye=[];for(let Me=Fe;Me!==vn;Me=Me.parent)Me.scope&&ye.unshift(Me.scope);ye.forEach(Me=>tn.openNode(Me))}let Na={};function po(ye,Me){const Ye=Me&&Me[0];if(vt+=ye,Ye==null)return jt(),0;if(Na.type==="begin"&&Me.type==="end"&&Na.index===Me.index&&Ye===""){if(vt+=Ie.slice(Me.index,Me.index+1),!yt){const at=new Error(`0 width match regex (${he})`);throw at.languageName=he,at.badRule=Na.rule,at}return 1}if(Na=Me,Me.type==="begin")return Jd(Me);if(Me.type==="illegal"&&!tt){const at=new Error('Illegal lexeme "'+Ye+'" for mode "'+(Fe.scope||"<unnamed>")+'"');throw at.mode=Fe,at}else if(Me.type==="end"){const at=Fn(Me);if(at!==oi)return at}if(Me.type==="illegal"&&Ye==="")return vt+=`
|
|
47
|
-
`,1;if(Cs>1e5&&Cs>Me.index*3)throw new Error("potential infinite loop, way more iterations than matches");return vt+=Ye,Ye.length}const vn=Dn(he);if(!vn)throw fe(Ge.replace("{}",he)),new Error('Unknown language: "'+he+'"');const fc=qt(vn);let mo="",Fe=xt||fc;const pc={},tn=new ve.__emitter(ve);Ns();let vt="",Hi=0,ci=0,Cs=0,$i=!1;try{if(vn.__emitTokens)vn.__emitTokens(Ie,tn);else{for(Fe.matcher.considerAll();;){Cs++,$i?$i=!1:Fe.matcher.considerAll(),Fe.matcher.lastIndex=ci;const ye=Fe.matcher.exec(Ie);if(!ye)break;const Me=Ie.substring(ci,ye.index),Ye=po(Me,ye);ci=ye.index+Ye}po(Ie.substring(ci))}return tn.finalize(),mo=tn.toHTML(),{language:he,value:mo,relevance:Hi,illegal:!1,_emitter:tn,_top:Fe}}catch(ye){if(ye.message&&ye.message.includes("Illegal"))return{language:he,value:fn(Ie),illegal:!0,relevance:0,_illegalBy:{message:ye.message,index:ci,context:Ie.slice(ci-100,ci+100),mode:ye.mode,resultSoFar:mo},_emitter:tn};if(yt)return{language:he,value:fn(Ie),illegal:!1,relevance:0,errorRaised:ye,_emitter:tn,_top:Fe};throw ye}}function Sa(he){const Ie={value:fn(he),illegal:!1,relevance:0,_top:xe,_emitter:new ve.__emitter(ve)};return Ie._emitter.addText(he),Ie}function lo(he,Ie){Ie=Ie||ve.languages||Object.keys(re);const tt=Sa(he),xt=Ie.filter(Dn).filter(Ui).map(jt=>xn(jt,he,!1));xt.unshift(tt);const Xt=xt.sort((jt,Jn)=>{if(jt.relevance!==Jn.relevance)return Jn.relevance-jt.relevance;if(jt.language&&Jn.language){if(Dn(jt.language).supersetOf===Jn.language)return 1;if(Dn(Jn.language).supersetOf===jt.language)return-1}return 0}),[Tn,Wn]=Xt,Un=Tn;return Un.secondBest=Wn,Un}function Ur(he,Ie,tt){const xt=Ie&&me[Ie]||tt;he.classList.add("hljs"),he.classList.add(`language-${xt}`)}function Yt(he){let Ie=null;const tt=ut(he);if(Re(tt))return;if(ka("before:highlightElement",{el:he,language:tt}),he.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",he);return}if(he.children.length>0&&(ve.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(he)),ve.throwUnescapedHTML))throw new pr("One of your code blocks includes unescaped HTML.",he.innerHTML);Ie=he;const xt=Ie.textContent,Xt=tt?At(xt,{language:tt,ignoreIllegals:!0}):lo(xt);he.innerHTML=Xt.value,he.dataset.highlighted="yes",Ur(he,tt,Xt.language),he.result={language:Xt.language,re:Xt.relevance,relevance:Xt.relevance},Xt.secondBest&&(he.secondBest={language:Xt.secondBest.language,relevance:Xt.secondBest.relevance}),ka("after:highlightElement",{el:he,result:Xt,text:xt})}function Cn(he){ve=Zn(ve,he)}const Pi=()=>{co(),K("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ss(){co(),K("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let lc=!1;function co(){function he(){co()}if(document.readyState==="loading"){lc||window.addEventListener("DOMContentLoaded",he,!1),lc=!0;return}document.querySelectorAll(ve.cssSelector).forEach(Yt)}function cc(he,Ie){let tt=null;try{tt=Ie(L)}catch(xt){if(fe("Language definition for '{}' could not be registered.".replace("{}",he)),yt)fe(xt);else throw xt;tt=xe}tt.name||(tt.name=he),re[he]=tt,tt.rawDefinition=Ie.bind(null,L),tt.aliases&&si(tt.aliases,{languageName:he})}function _a(he){delete re[he];for(const Ie of Object.keys(me))me[Ie]===he&&delete me[Ie]}function _s(){return Object.keys(re)}function Dn(he){return he=(he||"").toLowerCase(),re[he]||re[me[he]]}function si(he,{languageName:Ie}){typeof he=="string"&&(he=[he]),he.forEach(tt=>{me[tt.toLowerCase()]=Ie})}function Ui(he){const Ie=Dn(he);return Ie&&!Ie.disableAutodetect}function Fi(he){he["before:highlightBlock"]&&!he["before:highlightElement"]&&(he["before:highlightElement"]=Ie=>{he["before:highlightBlock"](Object.assign({block:Ie.el},Ie))}),he["after:highlightBlock"]&&!he["after:highlightElement"]&&(he["after:highlightElement"]=Ie=>{he["after:highlightBlock"](Object.assign({block:Ie.el},Ie))})}function en(he){Fi(he),Ae.push(he)}function uc(he){const Ie=Ae.indexOf(he);Ie!==-1&&Ae.splice(Ie,1)}function ka(he,Ie){const tt=he;Ae.forEach(function(xt){xt[tt]&&xt[tt](Ie)})}function li(he){return K("10.7.0","highlightBlock will be removed entirely in v12.0"),K("10.7.0","Please use highlightElement now."),Yt(he)}Object.assign(L,{highlight:At,highlightAuto:lo,highlightAll:co,highlightElement:Yt,highlightBlock:li,configure:Cn,initHighlighting:Pi,initHighlightingOnLoad:Ss,registerLanguage:cc,unregisterLanguage:_a,listLanguages:_s,getLanguage:Dn,registerAliases:si,autoDetection:Ui,inherit:Zn,addPlugin:en,removePlugin:uc}),L.debugMode=function(){yt=!1},L.safeMode=function(){yt=!0},L.versionString=ft,L.regex={concat:S,lookahead:x,either:k,optional:E,anyNumberOfTimes:v};for(const he in dt)typeof dt[he]=="object"&&e(dt[he]);return Object.assign(L,dt),L},yn=Pr({});return yn.newInstance=()=>Pr({}),jm=yn,yn.HighlightJS=yn,yn.default=yn,jm}var wF=EF();const SF=Gl(wF),H1={},_F="hljs-";function kF(e){const t=SF.newInstance();return e&&l(e),{highlight:r,highlightAuto:a,listLanguages:s,register:l,registerAlias:c,registered:f};function r(m,p,g){const h=g||H1,x=typeof h.prefix=="string"?h.prefix:_F;if(!t.getLanguage(m))throw new Error("Unknown language: `"+m+"` is not registered");t.configure({__emitter:NF,classPrefix:x});const v=t.highlight(p,{ignoreIllegals:!0,language:m});if(v.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:v.errorRaised});const E=v._emitter.root,S=E.data;return S.language=v.language,S.relevance=v.relevance,E}function a(m,p){const h=(p||H1).subset||s();let x=-1,v=0,E;for(;++x<h.length;){const S=h[x];if(!t.getLanguage(S))continue;const N=r(S,m,p);N.data&&N.data.relevance!==void 0&&N.data.relevance>v&&(v=N.data.relevance,E=N)}return E||{type:"root",children:[],data:{language:void 0,relevance:v}}}function s(){return t.listLanguages()}function l(m,p){if(typeof m=="string")t.registerLanguage(m,p);else{let g;for(g in m)Object.hasOwn(m,g)&&t.registerLanguage(g,m[g])}}function c(m,p){if(typeof m=="string")t.registerAliases(typeof p=="string"?p:[...p],{languageName:m});else{let g;for(g in m)if(Object.hasOwn(m,g)){const h=m[g];t.registerAliases(typeof h=="string"?h:[...h],{languageName:g})}}}function f(m){return!!t.getLanguage(m)}}class NF{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const r=this.stack[this.stack.length-1],a=r.children[r.children.length-1];a&&a.type==="text"?a.value+=t:r.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,r){const a=this.stack[this.stack.length-1],s=t.root.children;r?a.children.push({type:"element",tagName:"span",properties:{className:[r]},children:s}):a.children.push(...s)}openNode(t){const r=this,a=t.split(".").map(function(c,f){return f?c+"_".repeat(f):r.options.classPrefix+c}),s=this.stack[this.stack.length-1],l={type:"element",tagName:"span",properties:{className:a},children:[]};s.children.push(l),this.stack.push(l)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const CF={};function TF(e){const t=e||CF,r=t.aliases,a=t.detect||!1,s=t.languages||vF,l=t.plainText,c=t.prefix,f=t.subset;let m="hljs";const p=kF(s);if(r&&p.registerAlias(r),c){const g=c.indexOf("-");m=g===-1?c:c.slice(0,g)}return function(g,h){$d(g,"element",function(x,v,E){if(x.tagName!=="code"||!E||E.type!=="element"||E.tagName!=="pre")return;const S=AF(x);if(S===!1||!S&&!a||S&&l&&l.includes(S))return;Array.isArray(x.properties.className)||(x.properties.className=[]),x.properties.className.includes(m)||x.properties.className.unshift(m);const N=QU(x,{whitespace:"pre"});let k;try{k=S?p.highlight(S,N,{prefix:c}):p.highlightAuto(N,{prefix:c,subset:f})}catch(M){const R=M;if(S&&/Unknown language/.test(R.message)){h.message("Cannot highlight as `"+S+"`, it’s not registered",{ancestors:[E,x],cause:R,place:x.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw R}!S&&k.data&&k.data.language&&x.properties.className.push("language-"+k.data.language),k.children.length>0&&(x.children=k.children)})}}function AF(e){const t=e.properties.className;let r=-1;if(!Array.isArray(t))return;let a;for(;++r<t.length;){const s=String(t[r]);if(s==="no-highlight"||s==="nohighlight")return!1;!a&&s.slice(0,5)==="lang-"&&(a=s.slice(5)),!a&&s.slice(0,9)==="language-"&&(a=s.slice(9))}return a}function O_({reasoning:e,thinkMs:t,streaming:r,showThinking:a=!0}){const[s,l]=w.useState(!1),c=w.useRef(null);w.useEffect(()=>{s&&r&&c.current&&(c.current.scrollTop=c.current.scrollHeight)},[e,s,r]);const f=t?`Thought for ${(t/1e3).toFixed(1)}s`:r?"Thinking…":"Thinking";return a?d.jsxs("div",{className:"mb-3 rounded-lg border border-border bg-panel-2",children:[d.jsxs("button",{type:"button",onClick:()=>l(m=>!m),className:"flex w-full items-center gap-1.5 px-3 py-2 text-[12px] font-medium text-muted hover:text-ink",children:[d.jsx(ss,{size:13,className:s?"rotate-180 transition-transform":"transition-transform"}),f,r&&!s&&d.jsx("span",{className:"tllm-pulse ml-0.5",children:"·"})]}),s&&d.jsx("pre",{ref:c,className:"max-h-48 overflow-auto px-3 pb-3 font-mono text-[12px] leading-relaxed text-muted whitespace-pre-wrap",children:e})]}):d.jsx("div",{className:"mb-3 text-[12px] font-medium text-faint px-0 py-0.5",children:f})}function RF({stats:e}){const t=[];if(e.tps&&t.push(`${e.tps.toFixed(1)} tok/s`),e.promptTps&&t.push(`${e.promptTps.toFixed(0)} tok/s prefill`),e.ttftMs!=null&&e.ttftMs>0&&t.push(`${(e.ttftMs/1e3).toFixed(2)}s TTFT`),e.promptTokens!=null&&e.genTokens!=null&&t.push(`${e.promptTokens}+${e.genTokens} tokens`),e.cachedTokens!=null&&e.cachedTokens>0){const a=e.promptTokens?Math.round(e.cachedTokens/e.promptTokens*100):0;t.push(`${e.cachedTokens} cached${a?` (${a}%)`:""}`)}if(e.totalMs&&t.push(`${(e.totalMs/1e3).toFixed(1)}s total`),!t.length)return null;const r=[e.model?`Model: ${e.model}`:"",e.promptMs?`Prefill: ${e.promptMs.toFixed(0)}ms`:"",e.genMs?`Gen: ${e.genMs.toFixed(0)}ms`:"",e.ctxUsed!=null?`Context: ${e.ctxUsed} / ${e.ctxMax}`:"",e.aborted?"Aborted":""].filter(Boolean).join(`
|
|
48
|
-
`);return d.jsxs("div",{className:"mt-2 text-[11px] text-faint",title:r,children:[t.join(" · "),e.aborted&&d.jsx("span",{className:"ml-2",style:{color:"var(--warn)"},children:"· aborted"})]})}function D_({children:e}){return d.jsx(CB,{remarkPlugins:[UU],rehypePlugins:[TF],components:{a:({children:t,href:r})=>d.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"text-accent underline underline-offset-2",children:t}),code:({className:t,children:r,...a})=>{if(!t?.includes("language-"))return d.jsx("code",{className:"rounded bg-panel-2 px-1 py-0.5 font-mono text-[0.88em]",...a,children:r});const l=t?.replace("language-","")??"";return d.jsxs("div",{className:"relative my-2 overflow-hidden rounded-lg border border-border",children:[l&&d.jsxs("div",{className:"flex items-center justify-between border-b border-border bg-panel-2 px-3 py-1 font-mono text-[11px] text-muted",children:[d.jsx("span",{children:l}),d.jsx("button",{type:"button",className:"hover:text-ink",onClick:()=>{navigator.clipboard.writeText(String(r)).then(()=>De.success("Copied"))},children:d.jsx(lh,{size:12})})]}),d.jsx("code",{className:`${t} block overflow-auto p-3 text-[13px] leading-relaxed`,...a,children:r})]})},pre:({children:t})=>d.jsx(d.Fragment,{children:t}),table:({children:t})=>d.jsx("div",{className:"overflow-x-auto my-2",children:d.jsx("table",{className:"w-full border-collapse text-[13px]",children:t})}),th:({children:t})=>d.jsx("th",{className:"border border-border bg-panel-2 px-3 py-1.5 text-left font-semibold text-[13px]",children:t}),td:({children:t})=>d.jsx("td",{className:"border border-border px-3 py-1.5 text-[13px]",children:t})},children:e})}function MF({content:e,reasoning:t,progress:r,liveGenTps:a,genTokens:s}){const l=!!r&&r.phase==="prompt";return d.jsxs("div",{className:"flex gap-3",children:[d.jsx(j_,{}),d.jsxs("div",{className:"min-w-0 flex-1 pt-0.5",children:[t&&d.jsx(O_,{reasoning:t,streaming:!0}),d.jsx("div",{className:"prose-tllm text-[15px] leading-[1.7] text-ink",children:e?d.jsx(D_,{children:e}):d.jsx("span",{className:"text-muted",children:l?"Processing prompt…":t?"Generating…":"Thinking…"})}),l&&d.jsxs("div",{className:"mt-2 space-y-1",children:[d.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-faint",children:[d.jsx("span",{children:"Processing prompt"}),d.jsxs("span",{className:"font-medium",style:{color:"var(--ink)"},children:[r.pct,"%"]}),r.tps>0&&d.jsxs("span",{children:["· ",r.tps.toFixed(0)," tok/s prefill"]})]}),d.jsx("div",{className:"h-[3px] w-full overflow-hidden rounded-full",style:{background:"var(--border)"},children:d.jsx("div",{className:"h-full rounded-full transition-all duration-200",style:{width:`${r.pct}%`,background:"var(--accent)"}})})]}),!l&&(e||t)&&d.jsxs("div",{className:"mt-1 flex items-center gap-1.5 text-[11px] text-faint",children:[d.jsx("span",{className:"tllm-pulse",children:"·"}),s>0&&d.jsxs("span",{className:"font-medium",style:{color:"var(--ink)"},children:[s," tok"]}),a>0?d.jsxs("span",{children:["· ",a.toFixed(1)," tok/s"]}):s===0&&d.jsx("span",{children:"…"})]})]})]})}function OF({message:e,isLast:t,onCopy:r,onEdit:a,onDelete:s,onRegenerate:l,editingId:c,onEditSave:f,onEditCancel:m,showThinking:p=!0}){const[g,h]=w.useState(e.content),x=c===e.id;if(e.role==="user")return d.jsx("div",{className:"group flex justify-end gap-2",children:d.jsxs("div",{className:"flex flex-col items-end gap-1",children:[x?d.jsxs("div",{className:"w-full max-w-[75%]",children:[d.jsx("textarea",{autoFocus:!0,className:"w-full resize-none rounded-[var(--radius-lg)] border border-accent bg-panel px-4 py-2.5 text-[15px] leading-[1.6] text-ink outline-none",rows:3,value:g,onChange:E=>h(E.target.value),onKeyDown:E=>{(E.ctrlKey||E.metaKey)&&E.key==="Enter"&&(E.preventDefault(),f(g)),E.key==="Escape"&&m()}}),d.jsxs("div",{className:"mt-1.5 flex gap-1.5 justify-end",children:[d.jsx(je,{size:"sm",variant:"ghost",onClick:m,children:"Cancel"}),d.jsx(je,{size:"sm",onClick:()=>f(g),children:"Save & Resend"})]})]}):d.jsxs("div",{className:"flex max-w-[75%] flex-col items-end",children:[d.jsx("div",{className:"whitespace-pre-wrap rounded-[var(--radius-lg)] bg-accent px-4 py-2.5 text-[15px] leading-[1.6] text-on-accent",children:e.content}),e.attachments?.filter(E=>E.startsWith("data:image")).map((E,S)=>d.jsx("img",{src:E,className:"mt-2 max-h-48 max-w-xs rounded-lg object-contain",alt:"attached image"},S)),e.textAttachments?.length>0&&d.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1 justify-end",children:e.textAttachments.map((E,S)=>d.jsxs("span",{className:"flex items-center gap-1 rounded border border-border bg-panel-2 px-2 py-0.5 text-[12px] text-muted",children:[d.jsx(VD,{size:11,className:"shrink-0"}),E]},S))})]}),!x&&d.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100",children:[d.jsx(Ko,{icon:d.jsx(lh,{size:12}),label:"Copy",onClick:()=>r(e)}),d.jsx(Ko,{icon:d.jsx(ug,{size:12}),label:"Edit",onClick:()=>{h(e.content),a(e)}}),d.jsx(Ko,{icon:d.jsx(Za,{size:12}),label:"Delete",onClick:()=>s(e),destructive:!0})]})]})});const v=e.stats.aborted&&!e.content;return d.jsxs("div",{className:"group flex gap-3",children:[d.jsx(j_,{}),d.jsxs("div",{className:"min-w-0 flex-1 pt-0.5",children:[e.reasoning&&d.jsx(O_,{reasoning:e.reasoning,thinkMs:e.stats.thinkMs,showThinking:p}),v?d.jsxs("div",{className:"rounded-lg border px-4 py-3 text-[14px]",style:{borderColor:"var(--err)",color:"var(--err)",background:"color-mix(in srgb, var(--err) 8%, transparent)"},children:["Generation failed or was stopped.",t&&d.jsx("button",{type:"button",className:"ml-3 underline",onClick:l,children:"Regenerate"})]}):d.jsx("div",{className:"prose-tllm text-[15px] leading-[1.7] text-ink",children:d.jsx(D_,{children:e.content})}),d.jsx(RF,{stats:e.stats}),d.jsxs("div",{className:"mt-1 flex items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100",children:[d.jsx(Ko,{icon:d.jsx(lh,{size:12}),label:"Copy",onClick:()=>r(e)}),t&&d.jsx(Ko,{icon:d.jsx(Xl,{size:12}),label:"Regenerate",onClick:l}),d.jsx(Ko,{icon:d.jsx(Za,{size:12}),label:"Delete",onClick:()=>s(e),destructive:!0})]})]})]})}function j_(){return d.jsx("div",{className:"mt-1 grid h-5 w-5 shrink-0 place-items-center rounded bg-panel-2 text-[9px] font-bold text-muted",children:"T"})}function Ko({icon:e,label:t,onClick:r,destructive:a}){return d.jsx("button",{type:"button",title:t,onClick:r,className:"rounded p-1 transition-colors hover:bg-panel-2",style:{color:a?"var(--err)":"var(--faint)"},children:e})}function $1(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function DF({ctxUsed:e,ctxMax:t}){if(t<=0)return null;const r=t>0?e/t:0,a=Math.min(1,r),s=Math.round(a*100),l=r>.9?"var(--err)":r>.75?"var(--warn)":"var(--accent)",c=r>.9?{color:"var(--err)"}:r>.75?{color:"var(--warn)"}:{},f=r>.9?"Context nearly full — older messages may be truncated":`Context: ${e.toLocaleString()} / ${t.toLocaleString()} tokens`;return d.jsxs("div",{className:"flex items-center gap-1.5 ml-auto",title:f,children:[d.jsx("div",{className:"h-[3px] w-20 overflow-hidden rounded-full shrink-0",style:{background:"var(--border)"},children:d.jsx("div",{className:"h-full rounded-full transition-all duration-300",style:{width:`${(a*100).toFixed(1)}%`,background:l}})}),d.jsx("span",{className:"text-[11px] text-faint whitespace-nowrap tabular-nums shrink-0",style:c,children:`${$1(e)} / ${$1(t)} · ${s}%`})]})}function jF(e){const t=Date.now()-new Date(e).getTime();return t<6e4?"just now":t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:`${Math.floor(t/864e5)}d ago`}function LF({activeId:e,onSelect:t,onNew:r,collapsed:a,onToggle:s}){const[l,c]=w.useState(""),[f,m]=w.useState(""),p=w.useRef(null),g=Jl(),x=LI(f||void 0).data?.conversations??[];w.useEffect(()=>{const E=setTimeout(()=>m(l),200);return()=>clearTimeout(E)},[l]),w.useEffect(()=>{const E=S=>{(S.ctrlKey||S.metaKey)&&S.key==="k"&&(S.preventDefault(),p.current?.focus())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]);const v=(E,S)=>{E.stopPropagation(),g.remove.mutate(S.id,{onSuccess:()=>{De.success("Conversation deleted")},onError:()=>{De.error("Could not delete conversation.")}})};return a?d.jsxs("div",{className:"flex h-full flex-col items-center gap-1 border-r border-border bg-panel-2 py-3",children:[s&&d.jsx(je,{size:"icon",variant:"ghost",onClick:s,title:"Expand sidebar",className:"h-7 w-7",children:d.jsx(og,{size:15})}),d.jsx(je,{size:"icon",variant:"ghost",onClick:r,title:"New chat (Ctrl+N)",className:"h-7 w-7",children:d.jsx(O0,{size:15})})]}):d.jsxs("div",{className:"flex h-full flex-col border-r border-border bg-panel-2",children:[d.jsxs("div",{className:"flex items-center gap-2 px-3 py-3",children:[s&&d.jsx(je,{size:"icon",variant:"ghost",onClick:s,title:"Collapse sidebar",className:"h-7 w-7 shrink-0",children:d.jsx(OD,{size:15})}),d.jsxs("div",{className:"relative flex-1",children:[d.jsx(ch,{size:13,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-faint"}),d.jsx(Di,{ref:p,value:l,onChange:E=>c(E.target.value),placeholder:"Search…",className:"h-7 pl-7 text-[12px]"})]}),d.jsx(je,{size:"icon",variant:"ghost",onClick:r,title:"New chat (Ctrl+N)",className:"h-7 w-7 shrink-0",children:d.jsx(O0,{size:15})})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-1 pb-2",children:[x.length===0&&d.jsx("p",{className:"px-3 py-4 text-[12px] text-faint",children:l?"No results.":"No conversations yet."}),x.map(E=>d.jsx(IF,{conv:E,active:E.id===e,onSelect:t,onDelete:v},E.id))]})]})}function IF({conv:e,active:t,onSelect:r,onDelete:a}){const[s,l]=w.useState(!1),[c,f]=w.useState(e.title),m=Jl(),p=()=>{l(!1);const g=c.trim();if(!g||g===e.title){f(e.title);return}m.update.mutate({id:e.id,title:g},{onError:()=>{f(e.title),De.error("Could not rename conversation.")}})};return d.jsxs("div",{onClick:()=>!s&&r(e.id),className:"group relative flex cursor-pointer flex-col gap-0.5 rounded-md px-3 py-2 transition-colors",style:{background:t?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent"},children:[s?d.jsx("input",{autoFocus:!0,className:"w-full bg-transparent text-[13px] font-medium text-ink outline-none",value:c,onChange:g=>f(g.target.value),onBlur:p,onKeyDown:g=>{g.key==="Enter"&&p(),g.key==="Escape"&&(f(e.title),l(!1))},onClick:g=>g.stopPropagation()}):d.jsx("span",{className:"truncate text-[13px] font-medium text-ink",style:{color:t?"var(--accent)":void 0},onDoubleClick:g=>{g.stopPropagation(),l(!0)},children:e.title}),d.jsx("span",{className:"text-[11px] text-faint",children:jF(e.updatedAt)}),!s&&d.jsxs("div",{className:"absolute right-1.5 top-1/2 flex -translate-y-1/2 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100",children:[d.jsx("button",{type:"button",onClick:g=>{g.stopPropagation(),f(e.title),l(!0)},className:"rounded p-1 text-faint transition-colors hover:text-ink",title:"Rename conversation",children:d.jsx(ug,{size:13})}),d.jsx("button",{type:"button",onClick:g=>a(g,e),className:"rounded p-1 text-faint transition-colors hover:text-err",title:"Delete conversation",children:d.jsx(Za,{size:13})})]})]})}function L_(e){const t=e+"CollectionProvider",[r,a]=ni(t),[s,l]=r(t,{collectionRef:{current:null},itemMap:new Map}),c=S=>{const{scope:N,children:k}=S,M=w.useRef(null),R=w.useRef(new Map).current;return d.jsx(s,{scope:N,itemMap:R,collectionRef:M,children:k})};c.displayName=t;const f=e+"CollectionSlot",m=is(f),p=w.forwardRef((S,N)=>{const{scope:k,children:M}=S,R=l(f,k),O=Ft(N,R.collectionRef);return d.jsx(m,{ref:O,children:M})});p.displayName=f;const g=e+"CollectionItemSlot",h="data-radix-collection-item",x=is(g),v=w.forwardRef((S,N)=>{const{scope:k,children:M,...R}=S,O=w.useRef(null),P=Ft(N,O),D=l(g,k);return w.useEffect(()=>(D.itemMap.set(O,{ref:O,...R}),()=>{D.itemMap.delete(O)})),d.jsx(x,{[h]:"",ref:P,children:M})});v.displayName=g;function E(S){const N=l(e+"CollectionConsumer",S);return w.useCallback(()=>{const M=N.collectionRef.current;if(!M)return[];const R=Array.from(M.querySelectorAll(`[${h}]`));return Array.from(N.itemMap.values()).sort((D,U)=>R.indexOf(D.ref.current)-R.indexOf(U.ref.current))},[N.collectionRef,N.itemMap])}return[{Provider:c,Slot:p,ItemSlot:v},E,a]}var zF=w.createContext(void 0);function I_(e){const t=w.useContext(zF);return e||t||"ltr"}var Uu=0,Qo=null;function z_(){w.useEffect(()=>{Qo||(Qo={start:q1(),end:q1()});const{start:e,end:t}=Qo;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Uu++,()=>{Uu===1&&(Qo?.start.remove(),Qo?.end.remove(),Qo=null),Uu=Math.max(0,Uu-1)}},[])}function q1(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Lm="focusScope.autoFocusOnMount",Im="focusScope.autoFocusOnUnmount",G1={bubbles:!1,cancelable:!0},BF="FocusScope",Ig=w.forwardRef((e,t)=>{const{loop:r=!1,trapped:a=!1,onMountAutoFocus:s,onUnmountAutoFocus:l,...c}=e,[f,m]=w.useState(null),p=Ri(s),g=Ri(l),h=w.useRef(null),x=Ft(t,S=>m(S)),v=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(a){let S=function(R){if(v.paused||!f)return;const O=R.target;f.contains(O)?h.current=O:ga(h.current,{select:!0})},N=function(R){if(v.paused||!f)return;const O=R.relatedTarget;O!==null&&(f.contains(O)||ga(h.current,{select:!0}))},k=function(R){if(document.activeElement===document.body)for(const P of R)P.removedNodes.length>0&&ga(f)};document.addEventListener("focusin",S),document.addEventListener("focusout",N);const M=new MutationObserver(k);return f&&M.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",N),M.disconnect()}}},[a,f,v.paused]),w.useEffect(()=>{if(f){Q1.add(v);const S=document.activeElement;if(!f.contains(S)){const k=new CustomEvent(Lm,G1);f.addEventListener(Lm,p),f.dispatchEvent(k),k.defaultPrevented||(PF(qF(B_(f)),{select:!0}),document.activeElement===S&&ga(f))}return()=>{f.removeEventListener(Lm,p),setTimeout(()=>{const k=new CustomEvent(Im,G1);f.addEventListener(Im,g),f.dispatchEvent(k),k.defaultPrevented||ga(S??document.body,{select:!0}),f.removeEventListener(Im,g),Q1.remove(v)},0)}}},[f,p,g,v]);const E=w.useCallback(S=>{if(!r&&!a||v.paused)return;const N=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,k=document.activeElement;if(N&&k){const M=S.currentTarget,[R,O]=UF(M);R&&O?!S.shiftKey&&k===O?(S.preventDefault(),r&&ga(R,{select:!0})):S.shiftKey&&k===R&&(S.preventDefault(),r&&ga(O,{select:!0})):k===M&&S.preventDefault()}},[r,a,v.paused]);return d.jsx(Tt.div,{tabIndex:-1,...c,ref:x,onKeyDown:E})});Ig.displayName=BF;function PF(e,{select:t=!1}={}){const r=document.activeElement;for(const a of e)if(ga(a,{select:t}),document.activeElement!==r)return}function UF(e){const t=B_(e),r=K1(t,e),a=K1(t.reverse(),e);return[r,a]}function B_(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const s=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||s?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function K1(e,t){for(const r of e)if(!FF(r,{upTo:t}))return r}function FF(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function HF(e){return e instanceof HTMLInputElement&&"select"in e}function ga(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&HF(e)&&t&&e.select()}}var Q1=$F();function $F(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=V1(e,t),e.unshift(t)},remove(t){e=V1(e,t),e[0]?.resume()}}}function V1(e,t){const r=[...e],a=r.indexOf(t);return a!==-1&&r.splice(a,1),r}function qF(e){return e.filter(t=>t.tagName!=="A")}var zm="rovingFocusGroup.onEntryFocus",GF={bubbles:!1,cancelable:!0},ic="RovingFocusGroup",[kh,P_,KF]=L_(ic),[QF,U_]=ni(ic,[KF]),[VF,YF]=QF(ic),F_=w.forwardRef((e,t)=>d.jsx(kh.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(kh.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(XF,{...e,ref:t})})}));F_.displayName=ic;var XF=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:a,loop:s=!1,dir:l,currentTabStopId:c,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:m,onEntryFocus:p,preventScrollOnEntryFocus:g=!1,...h}=e,x=w.useRef(null),v=Ft(t,x),E=I_(l),[S,N]=gs({prop:c,defaultProp:f??null,onChange:m,caller:ic}),[k,M]=w.useState(!1),R=Ri(p),O=P_(r),P=w.useRef(!1),[D,U]=w.useState(0);return w.useEffect(()=>{const B=x.current;if(B)return B.addEventListener(zm,R),()=>B.removeEventListener(zm,R)},[R]),d.jsx(VF,{scope:r,orientation:a,dir:E,loop:s,currentTabStopId:S,onItemFocus:w.useCallback(B=>N(B),[N]),onItemShiftTab:w.useCallback(()=>M(!0),[]),onFocusableItemAdd:w.useCallback(()=>U(B=>B+1),[]),onFocusableItemRemove:w.useCallback(()=>U(B=>B-1),[]),children:d.jsx(Tt.div,{tabIndex:k||D===0?-1:0,"data-orientation":a,...h,ref:v,style:{outline:"none",...e.style},onMouseDown:He(e.onMouseDown,()=>{P.current=!0}),onFocus:He(e.onFocus,B=>{const J=!P.current;if(B.target===B.currentTarget&&J&&!k){const F=new CustomEvent(zm,GF);if(B.currentTarget.dispatchEvent(F),!F.defaultPrevented){const ae=O().filter(j=>j.focusable),ee=ae.find(j=>j.active),ce=ae.find(j=>j.id===S),Q=[ee,ce,...ae].filter(Boolean).map(j=>j.ref.current);q_(Q,g)}}P.current=!1}),onBlur:He(e.onBlur,()=>M(!1))})})}),H_="RovingFocusGroupItem",$_=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:a=!0,active:s=!1,tabStopId:l,children:c,...f}=e,m=ya(),p=l||m,g=YF(H_,r),h=g.currentTabStopId===p,x=P_(r),{onFocusableItemAdd:v,onFocusableItemRemove:E,currentTabStopId:S}=g;return w.useEffect(()=>{if(a)return v(),()=>E()},[a,v,E]),d.jsx(kh.ItemSlot,{scope:r,id:p,focusable:a,active:s,children:d.jsx(Tt.span,{tabIndex:h?0:-1,"data-orientation":g.orientation,...f,ref:t,onMouseDown:He(e.onMouseDown,N=>{a?g.onItemFocus(p):N.preventDefault()}),onFocus:He(e.onFocus,()=>g.onItemFocus(p)),onKeyDown:He(e.onKeyDown,N=>{if(N.key==="Tab"&&N.shiftKey){g.onItemShiftTab();return}if(N.target!==N.currentTarget)return;const k=JF(N,g.orientation,g.dir);if(k!==void 0){if(N.metaKey||N.ctrlKey||N.altKey||N.shiftKey)return;N.preventDefault();let R=x().filter(O=>O.focusable).map(O=>O.ref.current);if(k==="last")R.reverse();else if(k==="prev"||k==="next"){k==="prev"&&R.reverse();const O=R.indexOf(N.currentTarget);R=g.loop?e9(R,O+1):R.slice(O+1)}setTimeout(()=>q_(R))}}),children:typeof c=="function"?c({isCurrentTabStop:h,hasTabStop:S!=null}):c})})});$_.displayName=H_;var ZF={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function WF(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function JF(e,t,r){const a=WF(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return ZF[a]}function q_(e,t=!1){const r=document.activeElement;for(const a of e)if(a===r||(a.focus({preventScroll:t}),document.activeElement!==r))return}function e9(e,t){return e.map((r,a)=>e[(t+a)%e.length])}var t9=F_,n9=$_,r9=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Vo=new WeakMap,Fu=new WeakMap,Hu={},Bm=0,G_=function(e){return e&&(e.host||G_(e.parentNode))},i9=function(e,t){return t.map(function(r){if(e.contains(r))return r;var a=G_(r);return a&&e.contains(a)?a:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},a9=function(e,t,r,a){var s=i9(t,Array.isArray(e)?e:[e]);Hu[r]||(Hu[r]=new WeakMap);var l=Hu[r],c=[],f=new Set,m=new Set(s),p=function(h){!h||f.has(h)||(f.add(h),p(h.parentNode))};s.forEach(p);var g=function(h){!h||m.has(h)||Array.prototype.forEach.call(h.children,function(x){if(f.has(x))g(x);else try{var v=x.getAttribute(a),E=v!==null&&v!=="false",S=(Vo.get(x)||0)+1,N=(l.get(x)||0)+1;Vo.set(x,S),l.set(x,N),c.push(x),S===1&&E&&Fu.set(x,!0),N===1&&x.setAttribute(r,"true"),E||x.setAttribute(a,"true")}catch(k){console.error("aria-hidden: cannot operate on ",x,k)}})};return g(t),f.clear(),Bm++,function(){c.forEach(function(h){var x=Vo.get(h)-1,v=l.get(h)-1;Vo.set(h,x),l.set(h,v),x||(Fu.has(h)||h.removeAttribute(a),Fu.delete(h)),v||h.removeAttribute(r)}),Bm--,Bm||(Vo=new WeakMap,Vo=new WeakMap,Fu=new WeakMap,Hu={})}},K_=function(e,t,r){r===void 0&&(r="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),s=r9(e);return s?(a.push.apply(a,Array.from(s.querySelectorAll("[aria-live], script"))),a9(a,s,r,"aria-hidden")):function(){return null}},Yr=function(){return Yr=Object.assign||function(t){for(var r,a=1,s=arguments.length;a<s;a++){r=arguments[a];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},Yr.apply(this,arguments)};function Q_(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,a=Object.getOwnPropertySymbols(e);s<a.length;s++)t.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(r[a[s]]=e[a[s]]);return r}function o9(e,t,r){if(r||arguments.length===2)for(var a=0,s=t.length,l;a<s;a++)(l||!(a in t))&&(l||(l=Array.prototype.slice.call(t,0,a)),l[a]=t[a]);return e.concat(l||Array.prototype.slice.call(t))}var Ju="right-scroll-bar-position",ed="width-before-scroll-bar",s9="with-scroll-bars-hidden",l9="--removed-body-scroll-bar-size";function Pm(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function c9(e,t){var r=w.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(a){var s=r.value;s!==a&&(r.value=a,r.callback(a,s))}}}})[0];return r.callback=t,r.facade}var u9=typeof window<"u"?w.useLayoutEffect:w.useEffect,Y1=new WeakMap;function d9(e,t){var r=c9(null,function(a){return e.forEach(function(s){return Pm(s,a)})});return u9(function(){var a=Y1.get(r);if(a){var s=new Set(a),l=new Set(e),c=r.current;s.forEach(function(f){l.has(f)||Pm(f,null)}),l.forEach(function(f){s.has(f)||Pm(f,c)})}Y1.set(r,e)},[e]),r}function f9(e){return e}function p9(e,t){t===void 0&&(t=f9);var r=[],a=!1,s={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(l){var c=t(l,a);return r.push(c),function(){r=r.filter(function(f){return f!==c})}},assignSyncMedium:function(l){for(a=!0;r.length;){var c=r;r=[],c.forEach(l)}r={push:function(f){return l(f)},filter:function(){return r}}},assignMedium:function(l){a=!0;var c=[];if(r.length){var f=r;r=[],f.forEach(l),c=r}var m=function(){var g=c;c=[],g.forEach(l)},p=function(){return Promise.resolve().then(m)};p(),r={push:function(g){c.push(g),p()},filter:function(g){return c=c.filter(g),r}}}};return s}function m9(e){e===void 0&&(e={});var t=p9(null);return t.options=Yr({async:!0,ssr:!1},e),t}var V_=function(e){var t=e.sideCar,r=Q_(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return w.createElement(a,Yr({},r))};V_.isSideCarExport=!0;function h9(e,t){return e.useMedium(t),V_}var Y_=m9(),Um=function(){},qd=w.forwardRef(function(e,t){var r=w.useRef(null),a=w.useState({onScrollCapture:Um,onWheelCapture:Um,onTouchMoveCapture:Um}),s=a[0],l=a[1],c=e.forwardProps,f=e.children,m=e.className,p=e.removeScrollBar,g=e.enabled,h=e.shards,x=e.sideCar,v=e.noRelative,E=e.noIsolation,S=e.inert,N=e.allowPinchZoom,k=e.as,M=k===void 0?"div":k,R=e.gapMode,O=Q_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=x,D=d9([r,t]),U=Yr(Yr({},O),s);return w.createElement(w.Fragment,null,g&&w.createElement(P,{sideCar:Y_,removeScrollBar:p,shards:h,noRelative:v,noIsolation:E,inert:S,setCallbacks:l,allowPinchZoom:!!N,lockRef:r,gapMode:R}),c?w.cloneElement(w.Children.only(f),Yr(Yr({},U),{ref:D})):w.createElement(M,Yr({},U,{className:m,ref:D}),f))});qd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qd.classNames={fullWidth:ed,zeroRight:Ju};var g9=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function b9(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=g9();return t&&e.setAttribute("nonce",t),e}function y9(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function x9(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var v9=function(){var e=0,t=null;return{add:function(r){e==0&&(t=b9())&&(y9(t,r),x9(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},E9=function(){var e=v9();return function(t,r){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},X_=function(){var e=E9(),t=function(r){var a=r.styles,s=r.dynamic;return e(a,s),null};return t},w9={left:0,top:0,right:0,gap:0},Fm=function(e){return parseInt(e||"",10)||0},S9=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Fm(r),Fm(a),Fm(s)]},_9=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return w9;var t=S9(e),r=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-r+t[2]-t[0])}},k9=X_(),ns="data-scroll-locked",N9=function(e,t,r,a){var s=e.left,l=e.top,c=e.right,f=e.gap;return r===void 0&&(r="margin"),`
|
|
49
|
-
.`.concat(s9,` {
|
|
50
|
-
overflow: hidden `).concat(a,`;
|
|
51
|
-
padding-right: `).concat(f,"px ").concat(a,`;
|
|
52
|
-
}
|
|
53
|
-
body[`).concat(ns,`] {
|
|
54
|
-
overflow: hidden `).concat(a,`;
|
|
55
|
-
overscroll-behavior: contain;
|
|
56
|
-
`).concat([t&&"position: relative ".concat(a,";"),r==="margin"&&`
|
|
57
|
-
padding-left: `.concat(s,`px;
|
|
58
|
-
padding-top: `).concat(l,`px;
|
|
59
|
-
padding-right: `).concat(c,`px;
|
|
60
|
-
margin-left:0;
|
|
61
|
-
margin-top:0;
|
|
62
|
-
margin-right: `).concat(f,"px ").concat(a,`;
|
|
63
|
-
`),r==="padding"&&"padding-right: ".concat(f,"px ").concat(a,";")].filter(Boolean).join(""),`
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.`).concat(Ju,` {
|
|
67
|
-
right: `).concat(f,"px ").concat(a,`;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.`).concat(ed,` {
|
|
71
|
-
margin-right: `).concat(f,"px ").concat(a,`;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.`).concat(Ju," .").concat(Ju,` {
|
|
75
|
-
right: 0 `).concat(a,`;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.`).concat(ed," .").concat(ed,` {
|
|
79
|
-
margin-right: 0 `).concat(a,`;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
body[`).concat(ns,`] {
|
|
83
|
-
`).concat(l9,": ").concat(f,`px;
|
|
84
|
-
}
|
|
85
|
-
`)},X1=function(){var e=parseInt(document.body.getAttribute(ns)||"0",10);return isFinite(e)?e:0},C9=function(){w.useEffect(function(){return document.body.setAttribute(ns,(X1()+1).toString()),function(){var e=X1()-1;e<=0?document.body.removeAttribute(ns):document.body.setAttribute(ns,e.toString())}},[])},T9=function(e){var t=e.noRelative,r=e.noImportant,a=e.gapMode,s=a===void 0?"margin":a;C9();var l=w.useMemo(function(){return _9(s)},[s]);return w.createElement(k9,{styles:N9(l,!t,s,r?"":"!important")})},Nh=!1;if(typeof window<"u")try{var $u=Object.defineProperty({},"passive",{get:function(){return Nh=!0,!0}});window.addEventListener("test",$u,$u),window.removeEventListener("test",$u,$u)}catch{Nh=!1}var Yo=Nh?{passive:!1}:!1,A9=function(e){return e.tagName==="TEXTAREA"},Z_=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!A9(e)&&r[t]==="visible")},R9=function(e){return Z_(e,"overflowY")},M9=function(e){return Z_(e,"overflowX")},Z1=function(e,t){var r=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var s=W_(e,a);if(s){var l=J_(e,a),c=l[1],f=l[2];if(c>f)return!0}a=a.parentNode}while(a&&a!==r.body);return!1},O9=function(e){var t=e.scrollTop,r=e.scrollHeight,a=e.clientHeight;return[t,r,a]},D9=function(e){var t=e.scrollLeft,r=e.scrollWidth,a=e.clientWidth;return[t,r,a]},W_=function(e,t){return e==="v"?R9(t):M9(t)},J_=function(e,t){return e==="v"?O9(t):D9(t)},j9=function(e,t){return e==="h"&&t==="rtl"?-1:1},L9=function(e,t,r,a,s){var l=j9(e,window.getComputedStyle(t).direction),c=l*a,f=r.target,m=t.contains(f),p=!1,g=c>0,h=0,x=0;do{if(!f)break;var v=J_(e,f),E=v[0],S=v[1],N=v[2],k=S-N-l*E;(E||k)&&W_(e,f)&&(h+=k,x+=E);var M=f.parentNode;f=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!m&&f!==document.body||m&&(t.contains(f)||t===f));return(g&&Math.abs(h)<1||!g&&Math.abs(x)<1)&&(p=!0),p},qu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},W1=function(e){return[e.deltaX,e.deltaY]},J1=function(e){return e&&"current"in e?e.current:e},I9=function(e,t){return e[0]===t[0]&&e[1]===t[1]},z9=function(e){return`
|
|
86
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
87
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
88
|
-
`)},B9=0,Xo=[];function P9(e){var t=w.useRef([]),r=w.useRef([0,0]),a=w.useRef(),s=w.useState(B9++)[0],l=w.useState(X_)[0],c=w.useRef(e);w.useEffect(function(){c.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var S=o9([e.lockRef.current],(e.shards||[]).map(J1),!0).filter(Boolean);return S.forEach(function(N){return N.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),S.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var f=w.useCallback(function(S,N){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!c.current.allowPinchZoom;var k=qu(S),M=r.current,R="deltaX"in S?S.deltaX:M[0]-k[0],O="deltaY"in S?S.deltaY:M[1]-k[1],P,D=S.target,U=Math.abs(R)>Math.abs(O)?"h":"v";if("touches"in S&&U==="h"&&D.type==="range")return!1;var B=window.getSelection(),J=B&&B.anchorNode,F=J?J===D||J.contains(D):!1;if(F)return!1;var ae=Z1(U,D);if(!ae)return!0;if(ae?P=U:(P=U==="v"?"h":"v",ae=Z1(U,D)),!ae)return!1;if(!a.current&&"changedTouches"in S&&(R||O)&&(a.current=P),!P)return!0;var ee=a.current||P;return L9(ee,N,S,ee==="h"?R:O)},[]),m=w.useCallback(function(S){var N=S;if(!(!Xo.length||Xo[Xo.length-1]!==l)){var k="deltaY"in N?W1(N):qu(N),M=t.current.filter(function(P){return P.name===N.type&&(P.target===N.target||N.target===P.shadowParent)&&I9(P.delta,k)})[0];if(M&&M.should){N.cancelable&&N.preventDefault();return}if(!M){var R=(c.current.shards||[]).map(J1).filter(Boolean).filter(function(P){return P.contains(N.target)}),O=R.length>0?f(N,R[0]):!c.current.noIsolation;O&&N.cancelable&&N.preventDefault()}}},[]),p=w.useCallback(function(S,N,k,M){var R={name:S,delta:N,target:k,should:M,shadowParent:U9(k)};t.current.push(R),setTimeout(function(){t.current=t.current.filter(function(O){return O!==R})},1)},[]),g=w.useCallback(function(S){r.current=qu(S),a.current=void 0},[]),h=w.useCallback(function(S){p(S.type,W1(S),S.target,f(S,e.lockRef.current))},[]),x=w.useCallback(function(S){p(S.type,qu(S),S.target,f(S,e.lockRef.current))},[]);w.useEffect(function(){return Xo.push(l),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:x}),document.addEventListener("wheel",m,Yo),document.addEventListener("touchmove",m,Yo),document.addEventListener("touchstart",g,Yo),function(){Xo=Xo.filter(function(S){return S!==l}),document.removeEventListener("wheel",m,Yo),document.removeEventListener("touchmove",m,Yo),document.removeEventListener("touchstart",g,Yo)}},[]);var v=e.removeScrollBar,E=e.inert;return w.createElement(w.Fragment,null,E?w.createElement(l,{styles:z9(s)}):null,v?w.createElement(T9,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function U9(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const F9=h9(Y_,P9);var zg=w.forwardRef(function(e,t){return w.createElement(qd,Yr({},e,{ref:t,sideCar:F9}))});zg.classNames=qd.classNames;var Ch=["Enter"," "],H9=["ArrowDown","PageUp","Home"],ek=["ArrowUp","PageDown","End"],$9=[...H9,...ek],q9={ltr:[...Ch,"ArrowRight"],rtl:[...Ch,"ArrowLeft"]},G9={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ac="Menu",[Fl,K9,Q9]=L_(ac),[ao,tk]=ni(ac,[Q9,Rd,U_]),Gd=Rd(),nk=U_(),[V9,oo]=ao(ac),[Y9,oc]=ao(ac),rk=e=>{const{__scopeMenu:t,open:r=!1,children:a,dir:s,onOpenChange:l,modal:c=!0}=e,f=Gd(t),[m,p]=w.useState(null),g=w.useRef(!1),h=Ri(l),x=I_(s);return w.useEffect(()=>{const v=()=>{g.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},E=()=>g.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),d.jsx(hw,{...f,children:d.jsx(V9,{scope:t,open:r,onOpenChange:h,content:m,onContentChange:p,children:d.jsx(Y9,{scope:t,onClose:w.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:g,dir:x,modal:c,children:a})})})};rk.displayName=ac;var X9="MenuAnchor",Bg=w.forwardRef((e,t)=>{const{__scopeMenu:r,...a}=e,s=Gd(r);return d.jsx(gw,{...s,...a,ref:t})});Bg.displayName=X9;var Pg="MenuPortal",[Z9,ik]=ao(Pg,{forceMount:void 0}),ak=e=>{const{__scopeMenu:t,forceMount:r,children:a,container:s}=e,l=oo(Pg,t);return d.jsx(Z9,{scope:t,forceMount:r,children:d.jsx(Ir,{present:r||l.open,children:d.jsx(Md,{asChild:!0,container:s,children:a})})})};ak.displayName=Pg;var _r="MenuContent",[W9,Ug]=ao(_r),ok=w.forwardRef((e,t)=>{const r=ik(_r,e.__scopeMenu),{forceMount:a=r.forceMount,...s}=e,l=oo(_r,e.__scopeMenu),c=oc(_r,e.__scopeMenu);return d.jsx(Fl.Provider,{scope:e.__scopeMenu,children:d.jsx(Ir,{present:a||l.open,children:d.jsx(Fl.Slot,{scope:e.__scopeMenu,children:c.modal?d.jsx(J9,{...s,ref:t}):d.jsx(e8,{...s,ref:t})})})})}),J9=w.forwardRef((e,t)=>{const r=oo(_r,e.__scopeMenu),a=w.useRef(null),s=Ft(t,a);return w.useEffect(()=>{const l=a.current;if(l)return K_(l)},[]),d.jsx(Fg,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:He(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),e8=w.forwardRef((e,t)=>{const r=oo(_r,e.__scopeMenu);return d.jsx(Fg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),t8=is("MenuContent.ScrollLock"),Fg=w.forwardRef((e,t)=>{const{__scopeMenu:r,loop:a=!1,trapFocus:s,onOpenAutoFocus:l,onCloseAutoFocus:c,disableOutsidePointerEvents:f,onEntryFocus:m,onEscapeKeyDown:p,onPointerDownOutside:g,onFocusOutside:h,onInteractOutside:x,onDismiss:v,disableOutsideScroll:E,...S}=e,N=oo(_r,r),k=oc(_r,r),M=Gd(r),R=nk(r),O=K9(r),[P,D]=w.useState(null),U=w.useRef(null),B=Ft(t,U,N.onContentChange),J=w.useRef(0),F=w.useRef(""),ae=w.useRef(0),ee=w.useRef(null),ce=w.useRef("right"),te=w.useRef(0),Q=E?zg:w.Fragment,j=E?{as:t8,allowPinchZoom:!0}:void 0,V=ie=>{const T=F.current+ie,I=O().filter(Se=>!Se.disabled),q=document.activeElement,A=I.find(Se=>Se.ref.current===q)?.textValue,$=I.map(Se=>Se.textValue),ue=p8($,T,A),de=I.find(Se=>Se.textValue===ue)?.ref.current;(function Se(Ee){F.current=Ee,window.clearTimeout(J.current),Ee!==""&&(J.current=window.setTimeout(()=>Se(""),1e3))})(T),de&&setTimeout(()=>de.focus())};w.useEffect(()=>()=>window.clearTimeout(J.current),[]),z_();const Z=w.useCallback(ie=>ce.current===ee.current?.side&&h8(ie,ee.current?.area),[]);return d.jsx(W9,{scope:r,searchRef:F,onItemEnter:w.useCallback(ie=>{Z(ie)&&ie.preventDefault()},[Z]),onItemLeave:w.useCallback(ie=>{Z(ie)||(U.current?.focus(),D(null))},[Z]),onTriggerLeave:w.useCallback(ie=>{Z(ie)&&ie.preventDefault()},[Z]),pointerGraceTimerRef:ae,onPointerGraceIntentChange:w.useCallback(ie=>{ee.current=ie},[]),children:d.jsx(Q,{...j,children:d.jsx(Ig,{asChild:!0,trapped:s,onMountAutoFocus:He(l,ie=>{ie.preventDefault(),U.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:d.jsx(kd,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:p,onPointerDownOutside:g,onFocusOutside:h,onInteractOutside:x,onDismiss:v,children:d.jsx(t9,{asChild:!0,...R,dir:k.dir,orientation:"vertical",loop:a,currentTabStopId:P,onCurrentTabStopIdChange:D,onEntryFocus:He(m,ie=>{k.isUsingKeyboardRef.current||ie.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(bw,{role:"menu","aria-orientation":"vertical","data-state":wk(N.open),"data-radix-menu-content":"",dir:k.dir,...M,...S,ref:B,style:{outline:"none",...S.style},onKeyDown:He(S.onKeyDown,ie=>{const I=ie.target.closest("[data-radix-menu-content]")===ie.currentTarget,q=ie.ctrlKey||ie.altKey||ie.metaKey,A=ie.key.length===1;I&&(ie.key==="Tab"&&ie.preventDefault(),!q&&A&&V(ie.key));const $=U.current;if(ie.target!==$||!$9.includes(ie.key))return;ie.preventDefault();const de=O().filter(Se=>!Se.disabled).map(Se=>Se.ref.current);ek.includes(ie.key)&&de.reverse(),d8(de)}),onBlur:He(e.onBlur,ie=>{ie.currentTarget.contains(ie.target)||(window.clearTimeout(J.current),F.current="")}),onPointerMove:He(e.onPointerMove,Hl(ie=>{const T=ie.target,I=te.current!==ie.clientX;if(ie.currentTarget.contains(T)&&I){const q=ie.clientX>te.current?"right":"left";ce.current=q,te.current=ie.clientX}}))})})})})})})});ok.displayName=_r;var n8="MenuGroup",Hg=w.forwardRef((e,t)=>{const{__scopeMenu:r,...a}=e;return d.jsx(Tt.div,{role:"group",...a,ref:t})});Hg.displayName=n8;var r8="MenuLabel",sk=w.forwardRef((e,t)=>{const{__scopeMenu:r,...a}=e;return d.jsx(Tt.div,{...a,ref:t})});sk.displayName=r8;var bd="MenuItem",eE="menu.itemSelect",Kd=w.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:a,...s}=e,l=w.useRef(null),c=oc(bd,e.__scopeMenu),f=Ug(bd,e.__scopeMenu),m=Ft(t,l),p=w.useRef(!1),g=()=>{const h=l.current;if(!r&&h){const x=new CustomEvent(eE,{bubbles:!0,cancelable:!0});h.addEventListener(eE,v=>a?.(v),{once:!0}),GE(h,x),x.defaultPrevented?p.current=!1:c.onClose()}};return d.jsx(lk,{...s,ref:m,disabled:r,onClick:He(e.onClick,g),onPointerDown:h=>{e.onPointerDown?.(h),p.current=!0},onPointerUp:He(e.onPointerUp,h=>{p.current||h.currentTarget?.click()}),onKeyDown:He(e.onKeyDown,h=>{const x=f.searchRef.current!=="";r||x&&h.key===" "||Ch.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});Kd.displayName=bd;var lk=w.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:a=!1,textValue:s,...l}=e,c=Ug(bd,r),f=nk(r),m=w.useRef(null),p=Ft(t,m),[g,h]=w.useState(!1),[x,v]=w.useState("");return w.useEffect(()=>{const E=m.current;E&&v((E.textContent??"").trim())},[l.children]),d.jsx(Fl.ItemSlot,{scope:r,disabled:a,textValue:s??x,children:d.jsx(n9,{asChild:!0,...f,focusable:!a,children:d.jsx(Tt.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...l,ref:p,onPointerMove:He(e.onPointerMove,Hl(E=>{a?c.onItemLeave(E):(c.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:He(e.onPointerLeave,Hl(E=>c.onItemLeave(E))),onFocus:He(e.onFocus,()=>h(!0)),onBlur:He(e.onBlur,()=>h(!1))})})})}),i8="MenuCheckboxItem",ck=w.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:a,...s}=e;return d.jsx(mk,{scope:e.__scopeMenu,checked:r,children:d.jsx(Kd,{role:"menuitemcheckbox","aria-checked":yd(r)?"mixed":r,...s,ref:t,"data-state":qg(r),onSelect:He(s.onSelect,()=>a?.(yd(r)?!0:!r),{checkForDefaultPrevented:!1})})})});ck.displayName=i8;var uk="MenuRadioGroup",[a8,o8]=ao(uk,{value:void 0,onValueChange:()=>{}}),dk=w.forwardRef((e,t)=>{const{value:r,onValueChange:a,...s}=e,l=Ri(a);return d.jsx(a8,{scope:e.__scopeMenu,value:r,onValueChange:l,children:d.jsx(Hg,{...s,ref:t})})});dk.displayName=uk;var fk="MenuRadioItem",pk=w.forwardRef((e,t)=>{const{value:r,...a}=e,s=o8(fk,e.__scopeMenu),l=r===s.value;return d.jsx(mk,{scope:e.__scopeMenu,checked:l,children:d.jsx(Kd,{role:"menuitemradio","aria-checked":l,...a,ref:t,"data-state":qg(l),onSelect:He(a.onSelect,()=>s.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});pk.displayName=fk;var $g="MenuItemIndicator",[mk,s8]=ao($g,{checked:!1}),hk=w.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:a,...s}=e,l=s8($g,r);return d.jsx(Ir,{present:a||yd(l.checked)||l.checked===!0,children:d.jsx(Tt.span,{...s,ref:t,"data-state":qg(l.checked)})})});hk.displayName=$g;var l8="MenuSeparator",gk=w.forwardRef((e,t)=>{const{__scopeMenu:r,...a}=e;return d.jsx(Tt.div,{role:"separator","aria-orientation":"horizontal",...a,ref:t})});gk.displayName=l8;var c8="MenuArrow",bk=w.forwardRef((e,t)=>{const{__scopeMenu:r,...a}=e,s=Gd(r);return d.jsx(yw,{...s,...a,ref:t})});bk.displayName=c8;var u8="MenuSub",[A7,yk]=ao(u8),Cl="MenuSubTrigger",xk=w.forwardRef((e,t)=>{const r=oo(Cl,e.__scopeMenu),a=oc(Cl,e.__scopeMenu),s=yk(Cl,e.__scopeMenu),l=Ug(Cl,e.__scopeMenu),c=w.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:m}=l,p={__scopeMenu:e.__scopeMenu},g=w.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return w.useEffect(()=>g,[g]),w.useEffect(()=>{const h=f.current;return()=>{window.clearTimeout(h),m(null)}},[f,m]),d.jsx(Bg,{asChild:!0,...p,children:d.jsx(lk,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":r.open?s.contentId:void 0,"data-state":wk(r.open),...e,ref:Kh(t,s.onTriggerChange),onClick:h=>{e.onClick?.(h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:He(e.onPointerMove,Hl(h=>{l.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(l.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),g()},100))})),onPointerLeave:He(e.onPointerLeave,Hl(h=>{g();const x=r.content?.getBoundingClientRect();if(x){const v=r.content?.dataset.side,E=v==="right",S=E?-5:5,N=x[E?"left":"right"],k=x[E?"right":"left"];l.onPointerGraceIntentChange({area:[{x:h.clientX+S,y:h.clientY},{x:N,y:x.top},{x:k,y:x.top},{x:k,y:x.bottom},{x:N,y:x.bottom}],side:v}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(h),h.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:He(e.onKeyDown,h=>{const x=l.searchRef.current!=="";e.disabled||x&&h.key===" "||q9[a.dir].includes(h.key)&&(r.onOpenChange(!0),r.content?.focus(),h.preventDefault())})})})});xk.displayName=Cl;var vk="MenuSubContent",Ek=w.forwardRef((e,t)=>{const r=ik(_r,e.__scopeMenu),{forceMount:a=r.forceMount,align:s="start",...l}=e,c=oo(_r,e.__scopeMenu),f=oc(_r,e.__scopeMenu),m=yk(vk,e.__scopeMenu),p=w.useRef(null),g=Ft(t,p);return d.jsx(Fl.Provider,{scope:e.__scopeMenu,children:d.jsx(Ir,{present:a||c.open,children:d.jsx(Fl.Slot,{scope:e.__scopeMenu,children:d.jsx(Fg,{id:m.contentId,"aria-labelledby":m.triggerId,...l,ref:g,align:s,side:f.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{f.isUsingKeyboardRef.current&&p.current?.focus(),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:He(e.onFocusOutside,h=>{h.target!==m.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:He(e.onEscapeKeyDown,h=>{f.onClose(),h.preventDefault()}),onKeyDown:He(e.onKeyDown,h=>{const x=h.currentTarget.contains(h.target),v=G9[f.dir].includes(h.key);x&&v&&(c.onOpenChange(!1),m.trigger?.focus(),h.preventDefault())})})})})})});Ek.displayName=vk;function wk(e){return e?"open":"closed"}function yd(e){return e==="indeterminate"}function qg(e){return yd(e)?"indeterminate":e?"checked":"unchecked"}function d8(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function f8(e,t){return e.map((r,a)=>e[(t+a)%e.length])}function p8(e,t,r){const s=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,l=r?e.indexOf(r):-1;let c=f8(e,Math.max(l,0));s.length===1&&(c=c.filter(p=>p!==r));const m=c.find(p=>p.toLowerCase().startsWith(s.toLowerCase()));return m!==r?m:void 0}function m8(e,t){const{x:r,y:a}=e;let s=!1;for(let l=0,c=t.length-1;l<t.length;c=l++){const f=t[l],m=t[c],p=f.x,g=f.y,h=m.x,x=m.y;g>a!=x>a&&r<(h-p)*(a-g)/(x-g)+p&&(s=!s)}return s}function h8(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return m8(r,t)}function Hl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var g8=rk,b8=Bg,y8=ak,x8=ok,v8=Hg,E8=sk,w8=Kd,S8=ck,_8=dk,k8=pk,N8=hk,C8=gk,T8=bk,A8=xk,R8=Ek,Qd="DropdownMenu",[M8]=ni(Qd,[tk]),Bn=tk(),[O8,Sk]=M8(Qd),_k=e=>{const{__scopeDropdownMenu:t,children:r,dir:a,open:s,defaultOpen:l,onOpenChange:c,modal:f=!0}=e,m=Bn(t),p=w.useRef(null),[g,h]=gs({prop:s,defaultProp:l??!1,onChange:c,caller:Qd});return d.jsx(O8,{scope:t,triggerId:ya(),triggerRef:p,contentId:ya(),open:g,onOpenChange:h,onOpenToggle:w.useCallback(()=>h(x=>!x),[h]),modal:f,children:d.jsx(g8,{...m,open:g,onOpenChange:h,dir:a,modal:f,children:r})})};_k.displayName=Qd;var kk="DropdownMenuTrigger",Nk=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:a=!1,...s}=e,l=Sk(kk,r),c=Bn(r);return d.jsx(b8,{asChild:!0,...c,children:d.jsx(Tt.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...s,ref:Kh(t,l.triggerRef),onPointerDown:He(e.onPointerDown,f=>{!a&&f.button===0&&f.ctrlKey===!1&&(l.onOpenToggle(),l.open||f.preventDefault())}),onKeyDown:He(e.onKeyDown,f=>{a||(["Enter"," "].includes(f.key)&&l.onOpenToggle(),f.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})});Nk.displayName=kk;var D8="DropdownMenuPortal",Ck=e=>{const{__scopeDropdownMenu:t,...r}=e,a=Bn(t);return d.jsx(y8,{...a,...r})};Ck.displayName=D8;var Tk="DropdownMenuContent",Ak=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...a}=e,s=Sk(Tk,r),l=Bn(r),c=w.useRef(!1);return d.jsx(x8,{id:s.contentId,"aria-labelledby":s.triggerId,...l,...a,ref:t,onCloseAutoFocus:He(e.onCloseAutoFocus,f=>{c.current||s.triggerRef.current?.focus(),c.current=!1,f.preventDefault()}),onInteractOutside:He(e.onInteractOutside,f=>{const m=f.detail.originalEvent,p=m.button===0&&m.ctrlKey===!0,g=m.button===2||p;(!s.modal||g)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ak.displayName=Tk;var j8="DropdownMenuGroup",L8=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...a}=e,s=Bn(r);return d.jsx(v8,{...s,...a,ref:t})});L8.displayName=j8;var I8="DropdownMenuLabel",z8=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...a}=e,s=Bn(r);return d.jsx(E8,{...s,...a,ref:t})});z8.displayName=I8;var B8="DropdownMenuItem",Rk=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...a}=e,s=Bn(r);return d.jsx(w8,{...s,...a,ref:t})});Rk.displayName=B8;var P8="DropdownMenuCheckboxItem",U8=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...a}=e,s=Bn(r);return d.jsx(S8,{...s,...a,ref:t})});U8.displayName=P8;var F8="DropdownMenuRadioGroup",H8=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...a}=e,s=Bn(r);return d.jsx(_8,{...s,...a,ref:t})});H8.displayName=F8;var $8="DropdownMenuRadioItem",q8=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...a}=e,s=Bn(r);return d.jsx(k8,{...s,...a,ref:t})});q8.displayName=$8;var G8="DropdownMenuItemIndicator",K8=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...a}=e,s=Bn(r);return d.jsx(N8,{...s,...a,ref:t})});K8.displayName=G8;var Q8="DropdownMenuSeparator",Mk=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...a}=e,s=Bn(r);return d.jsx(C8,{...s,...a,ref:t})});Mk.displayName=Q8;var V8="DropdownMenuArrow",Y8=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...a}=e,s=Bn(r);return d.jsx(T8,{...s,...a,ref:t})});Y8.displayName=V8;var X8="DropdownMenuSubTrigger",Z8=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...a}=e,s=Bn(r);return d.jsx(A8,{...s,...a,ref:t})});Z8.displayName=X8;var W8="DropdownMenuSubContent",J8=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...a}=e,s=Bn(r);return d.jsx(R8,{...s,...a,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});J8.displayName=W8;var eH=_k,tH=Nk,nH=Ck,rH=Ak,iH=Rk,aH=Mk;const $l=eH,ql=tH,Ok=({className:e,...t})=>d.jsx(aH,{className:ht("my-1 h-px bg-border",e),...t}),cs=w.forwardRef(({className:e,sideOffset:t=6,...r},a)=>d.jsx(nH,{children:d.jsx(rH,{ref:a,sideOffset:t,className:ht("z-50 min-w-[12rem] rounded-md border border-border bg-panel p-1","shadow-[var(--shadow-2)]",e),...r})}));cs.displayName="DropdownMenuContent";const Ti=w.forwardRef(({className:e,destructive:t,...r},a)=>d.jsx(iH,{ref:a,className:ht("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none","focus:bg-panel-2 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t?"text-[color:var(--err)]":"text-ink",e),...r}));Ti.displayName="DropdownMenuItem";function oH({models:e,loadedKey:t,loadedName:r,pending:a,ejecting:s,onLoad:l,onEject:c,onSettings:f,align:m="start"}){const p=e.filter(h=>!h.incomplete&&!h.parseError),g=s?"Ejecting…":r||(t?"Loaded model":"Load a model");return d.jsxs($l,{children:[d.jsxs(ql,{className:"flex h-8 max-w-[260px] items-center gap-1.5 rounded-md border border-border bg-panel px-2.5 text-[13px] text-ink transition-colors hover:border-[color:var(--accent)] disabled:opacity-60",disabled:a,children:[a||s?d.jsx(Rr,{size:14,className:"animate-spin text-muted"}):d.jsx(lg,{size:14,className:t?"text-accent":"text-muted"}),d.jsx("span",{className:"truncate",children:g}),d.jsx(ss,{size:14,className:"shrink-0 text-muted"})]}),d.jsxs(cs,{align:m,className:"max-h-[60vh] w-[280px] overflow-y-auto",children:[d.jsx("div",{className:"px-2 py-1.5 text-[11px] font-medium uppercase tracking-wide text-faint",children:p.length?"Load a model":"No models found"}),p.map(h=>{const x=h.key===t;return d.jsxs("div",{role:"menuitem",tabIndex:-1,className:"flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-[13px] outline-none hover:bg-panel-2 focus:bg-panel-2",onClick:v=>{if(v.altKey&&f){f(h.key);return}x||l(h.key)},children:[d.jsx("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center",children:x&&d.jsx(Jr,{size:14,className:"text-accent"})}),d.jsx("span",{className:"min-w-0 flex-1 truncate",children:h.name}),d.jsx("span",{className:"shrink-0 text-[11px] uppercase text-faint",children:h.format==="mlx"?"MLX":h.quant})]},h.key)}),f&&d.jsx("div",{className:"px-2 py-1 text-[11px] text-faint",children:"Alt+click to configure"}),t&&d.jsxs(d.Fragment,{children:[d.jsx(Ok,{}),d.jsxs(Ti,{onSelect:c,style:{color:"var(--err)"},children:[d.jsx(sg,{size:14})," Eject model"]})]})]})]})}const sH=128;function lH(e){switch(e){case"f16":return 2;case"q8_0":case"q8_1":return 1;case"q5_0":case"q5_1":return .625;case"q4_0":case"q4_1":case"turbo4":return .5;case"turbo3":return .375;case"turbo2":return .25;default:return 2}}function cH(e,t,r){if(!r)return{estMb:0,totalVramMb:0,pct:0,verdict:"cpu"};const a=t.sizeBytes/1e6,s=t.blockCount||1,l=t.moe?1-.85*(e.nCpuMoe/s):Math.min(e.ngl,s)/s,c=a*Math.max(0,Math.min(1,l)),m=2*s*e.ctx*(t.headCountKv||8)*sH*lH(e.kvTypeK)/1e6*(e.kvUnified?1:Math.max(1,e.parallel)),p=e.useMmproj&&e.mmprojGpu&&t.mmprojPath?600:0,g=Math.round(c+m+800+p),h=g/r,x=h<=.8?"fits":h<=.95?"tight":"overflow";return{estMb:g,totalVramMb:r,pct:h,verdict:x}}var Vd="Dialog",[Dk,jk]=ni(Vd),[uH,Br]=Dk(Vd),Lk=e=>{const{__scopeDialog:t,children:r,open:a,defaultOpen:s,onOpenChange:l,modal:c=!0}=e,f=w.useRef(null),m=w.useRef(null),[p,g]=gs({prop:a,defaultProp:s??!1,onChange:l,caller:Vd});return d.jsx(uH,{scope:t,triggerRef:f,contentRef:m,contentId:ya(),titleId:ya(),descriptionId:ya(),open:p,onOpenChange:g,onOpenToggle:w.useCallback(()=>g(h=>!h),[g]),modal:c,children:r})};Lk.displayName=Vd;var Ik="DialogTrigger",zk=w.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,s=Br(Ik,r),l=Ft(t,s.triggerRef);return d.jsx(Tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":Qg(s.open),...a,ref:l,onClick:He(e.onClick,s.onOpenToggle)})});zk.displayName=Ik;var Gg="DialogPortal",[dH,Bk]=Dk(Gg,{forceMount:void 0}),Pk=e=>{const{__scopeDialog:t,forceMount:r,children:a,container:s}=e,l=Br(Gg,t);return d.jsx(dH,{scope:t,forceMount:r,children:w.Children.map(a,c=>d.jsx(Ir,{present:r||l.open,children:d.jsx(Md,{asChild:!0,container:s,children:c})}))})};Pk.displayName=Gg;var xd="DialogOverlay",Uk=w.forwardRef((e,t)=>{const r=Bk(xd,e.__scopeDialog),{forceMount:a=r.forceMount,...s}=e,l=Br(xd,e.__scopeDialog);return l.modal?d.jsx(Ir,{present:a||l.open,children:d.jsx(pH,{...s,ref:t})}):null});Uk.displayName=xd;var fH=is("DialogOverlay.RemoveScroll"),pH=w.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,s=Br(xd,r);return d.jsx(zg,{as:fH,allowPinchZoom:!0,shards:[s.contentRef],children:d.jsx(Tt.div,{"data-state":Qg(s.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),Ja="DialogContent",Fk=w.forwardRef((e,t)=>{const r=Bk(Ja,e.__scopeDialog),{forceMount:a=r.forceMount,...s}=e,l=Br(Ja,e.__scopeDialog);return d.jsx(Ir,{present:a||l.open,children:l.modal?d.jsx(mH,{...s,ref:t}):d.jsx(hH,{...s,ref:t})})});Fk.displayName=Ja;var mH=w.forwardRef((e,t)=>{const r=Br(Ja,e.__scopeDialog),a=w.useRef(null),s=Ft(t,r.contentRef,a);return w.useEffect(()=>{const l=a.current;if(l)return K_(l)},[]),d.jsx(Hk,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:He(e.onCloseAutoFocus,l=>{l.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:He(e.onPointerDownOutside,l=>{const c=l.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0;(c.button===2||f)&&l.preventDefault()}),onFocusOutside:He(e.onFocusOutside,l=>l.preventDefault())})}),hH=w.forwardRef((e,t)=>{const r=Br(Ja,e.__scopeDialog),a=w.useRef(!1),s=w.useRef(!1);return d.jsx(Hk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(a.current||r.triggerRef.current?.focus(),l.preventDefault()),a.current=!1,s.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(a.current=!0,l.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=l.target;r.triggerRef.current?.contains(c)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&s.current&&l.preventDefault()}})}),Hk=w.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:l,...c}=e,f=Br(Ja,r),m=w.useRef(null),p=Ft(t,m);return z_(),d.jsxs(d.Fragment,{children:[d.jsx(Ig,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:s,onUnmountAutoFocus:l,children:d.jsx(kd,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":Qg(f.open),...c,ref:p,onDismiss:()=>f.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(bH,{titleId:f.titleId}),d.jsx(xH,{contentRef:m,descriptionId:f.descriptionId})]})]})}),Kg="DialogTitle",$k=w.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,s=Br(Kg,r);return d.jsx(Tt.h2,{id:s.titleId,...a,ref:t})});$k.displayName=Kg;var qk="DialogDescription",Gk=w.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,s=Br(qk,r);return d.jsx(Tt.p,{id:s.descriptionId,...a,ref:t})});Gk.displayName=qk;var Kk="DialogClose",Qk=w.forwardRef((e,t)=>{const{__scopeDialog:r,...a}=e,s=Br(Kk,r);return d.jsx(Tt.button,{type:"button",...a,ref:t,onClick:He(e.onClick,()=>s.onOpenChange(!1))})});Qk.displayName=Kk;function Qg(e){return e?"open":"closed"}var Vk="DialogTitleWarning",[gH,Yk]=d2(Vk,{contentName:Ja,titleName:Kg,docsSlug:"dialog"}),bH=({titleId:e})=>{const t=Yk(Vk),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
89
|
-
|
|
90
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
91
|
-
|
|
92
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},yH="DialogDescriptionWarning",xH=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Yk(yH).contentName}}.`;return w.useEffect(()=>{const s=e.current?.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},Xk=Lk,Zk=zk,Wk=Pk,Jk=Uk,eN=Fk,tN=$k,nN=Gk,Yd=Qk;const vs=Xk,rN=Zk,vH=Yd;function EH({className:e,...t}){return d.jsx(Jk,{className:ht("fixed inset-0 z-50 bg-black/40",e),...t})}const so=w.forwardRef(({className:e,children:t,...r},a)=>d.jsxs(Wk,{children:[d.jsx(EH,{}),d.jsxs(eN,{ref:a,className:ht("fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2","rounded-[var(--radius-lg)] border border-border bg-panel p-5 shadow-[var(--shadow-2)]","focus:outline-none",e),...r,children:[t,d.jsx(Yd,{className:"absolute right-4 top-4 rounded-sm text-muted hover:text-ink","aria-label":"Close",children:d.jsx(ei,{size:16})})]})]}));so.displayName="DialogContent";function sc({className:e,...t}){return d.jsx("div",{className:ht("mb-4 flex flex-col gap-1",e),...t})}function Vg({className:e,...t}){return d.jsx("div",{className:ht("mt-5 flex justify-end gap-2",e),...t})}const Es=w.forwardRef(({className:e,...t},r)=>d.jsx(tN,{ref:r,className:ht("text-[16px] font-semibold tracking-[-0.01em] text-ink",e),...t}));Es.displayName="DialogTitle";const ws=w.forwardRef(({className:e,...t},r)=>d.jsx(nN,{ref:r,className:ht("text-[13px] text-muted",e),...t}));ws.displayName="DialogDescription";function iN({modelKey:e,onClose:t,onViewRepo:r}){const a=uI(e),s=nS(),l=Wl(),c=nI(),f=tI(),[m,p]=w.useState(null),[g,h]=w.useState(null),[x,v]=w.useState(!1),[E,S]=w.useState(!0),N=kn(),k=a.data,R=zr().data?.engine.state;w.useEffect(()=>{k&&h(structuredClone(k.profile))},[k]),w.useEffect(()=>{m&&(R==="stopped"||R==="error")&&(c.start.mutate({key:m,base:g??void 0}),p(null))},[m,R,c.start]);const O=s.data?.engines.find($=>$.id===s.data?.activeEngineId),P=O?.capabilities.kvTypes??["f16"],D=O?.capabilities.flags??[],U=$=>D.length===0||D.includes($),B=$=>D.length===0||D.includes(`spec-type:${$}`),J=(k?.arch??"").toLowerCase(),F=(k?.name??"").toLowerCase(),ae=/gemma4/.test(J)||/gemma[ _-]?4/.test(F),ee=(k?.nextnLayers??0)>0,ce=["off"];U("--spec-type")&&U("--mtp-head")&&ae&&ce.push("mtp"),U("--spec-type")&&U("--model-draft")&&ee&&(B("nextn")||B("draft-mtp"))&&ce.push("nextn"),U("--model-draft")&&ce.push("draft");const te=w.useMemo(()=>!k||!g?null:cH(g,k,k.gpu?.vramMb??0),[k,g]),Q=($,ue)=>h(de=>de&&{...de,[$]:ue}),j=($,ue)=>h(de=>de&&{...de,sampling:{...de.sampling,[$]:ue}}),V=l.load.error instanceof qe?l.load.error.message:null,Z=!!f&&f.modelKey===k?.key,ie=!!f?.running&&Z,T=!!f?.done&&Z&&!f.running,I=c.start.error instanceof qe?c.start.error.message:null,q=k?.format==="mlx",A=()=>{k&&(k.loaded?(p(k.key),l.eject.mutate()):c.start.mutate({key:k.key,base:g??void 0}))};return w.useEffect(()=>{T&&k?.key&&N.invalidateQueries({queryKey:["model",k.key]})},[T,k?.key]),d.jsx(vs,{open:!!e,onOpenChange:$=>!$&&t(),children:d.jsxs(so,{className:"max-h-[88vh] overflow-y-auto sm:max-w-[560px]",children:[d.jsxs(sc,{children:[d.jsx(Es,{className:"truncate",children:k?.name??"Model"}),d.jsx(ws,{children:k?`${k.arch} · ${k.quant} · ${RH(k.sizeBytes)}`:"Load settings"}),k?.sourceRepo&&r&&d.jsxs("button",{type:"button",onClick:()=>r(k.sourceRepo),className:"mt-1 inline-flex w-fit items-center gap-1 text-[12px] font-medium text-accent hover:underline",title:`View ${k.sourceRepo} on Hugging Face`,children:[d.jsx(zl,{size:12})," Model card & quants on Hugging Face"]})]}),!k||!g?d.jsx("div",{className:"py-10 text-center text-[13px] text-muted",children:"Loading…"}):d.jsxs("div",{className:"flex flex-col gap-4",children:[te&&d.jsx(wH,{estMb:te.estMb,totalMb:te.totalVramMb,verdict:te.verdict}),!q&&k.gpu&&d.jsx(SH,{running:ie,done:T,step:Z?f?.step:void 0,bestTps:Z?f?.bestTps:void 0,resultError:T?f?.error:void 0,benchTps:k.benchTps,tuned:g.tunedBy==="bench",loaded:k.loaded,startError:I,pending:c.start.isPending||m!==null,onStart:A,onCancel:()=>c.cancel.mutate()}),d.jsxs(kl,{children:[d.jsx(ha,{label:"Context length",hint:"Tokens of history the model can use.",value:g.ctx,min:512,max:Math.max(512,k.nativeCtx||8192),step:512,onChange:$=>Q("ctx",$),fmt:$=>$.toLocaleString()}),k.gpu&&d.jsx(ha,{label:"GPU layers",hint:"99 = all on GPU.",value:g.ngl,min:0,max:99,step:1,onChange:$=>Q("ngl",$),fmt:$=>$>=99?"All":String($)}),k.moe&&k.blockCount>0&&d.jsx(ha,{label:"MoE experts on CPU",hint:"Higher = less VRAM, slower. Lower = faster if it fits.",value:g.nCpuMoe,min:0,max:k.blockCount,step:1,onChange:$=>Q("nCpuMoe",$)})]}),d.jsxs(kl,{children:[d.jsx(Gu,{label:"Parallel slots",children:d.jsx(_H,{value:g.parallel,min:1,max:16,onChange:$=>Q("parallel",$)})}),d.jsx(Gu,{label:"KV cache type",hint:"turbo* are TurboQuant-fork exclusive.",children:d.jsx(kH,{value:g.kvTypeK,options:P,onChange:$=>h(ue=>ue&&{...ue,kvTypeK:$,kvTypeV:$})})}),d.jsx(Gu,{label:"Flash attention",children:d.jsx(NH,{value:g.flashAttn,options:["auto","on","off"],onChange:$=>Q("flashAttn",$)})}),d.jsx(Ku,{label:"Use Jinja chat template",value:g.useJinja,onChange:$=>Q("useJinja",$)}),g.useJinja&&d.jsx(Hm,{label:"Template file path (optional)",hint:"Leave empty to use model's built-in template.",value:g.chatTemplateFile,placeholder:"Path to .jinja template file",onChange:$=>Q("chatTemplateFile",$)})]}),d.jsx(tE,{children:"Sampling"}),d.jsxs(kl,{children:[d.jsx(ha,{label:"Temperature",value:g.sampling.temp,min:0,max:2,step:.05,onChange:$=>j("temp",$),fmt:$=>$.toFixed(2)}),d.jsx(ha,{label:"Top P",value:g.sampling.topP,min:0,max:1,step:.01,onChange:$=>j("topP",$),fmt:$=>$.toFixed(2)}),d.jsx(ha,{label:"Top K",value:g.sampling.topK,min:0,max:200,step:1,onChange:$=>j("topK",$)}),d.jsx(ha,{label:"Min P",value:g.sampling.minP,min:0,max:1,step:.01,onChange:$=>j("minP",$),fmt:$=>$.toFixed(2)})]}),ce.length>1&&d.jsxs(d.Fragment,{children:[d.jsx(tE,{children:"Speculative decoding"}),d.jsxs(kl,{children:[d.jsx(Gu,{label:"Mode",hint:"Predict extra tokens per step — faster generation.",children:d.jsx(TH,{value:g.speculative,options:ce,onChange:$=>Q("speculative",$)})}),g.speculative==="mtp"&&d.jsx(Hm,{label:"MTP head GGUF",hint:"Gemma-4 assistant model file.",value:g.mtpHeadPath,placeholder:"Path to gemma-4-mtp-assistant.gguf",onChange:$=>Q("mtpHeadPath",$)}),g.speculative==="nextn"&&d.jsx("p",{className:"text-[11px] text-faint",children:"Uses this model's built-in NextN head — no extra file needed."}),g.speculative==="draft"&&d.jsx(Hm,{label:"Draft model GGUF",hint:"A small same-family model.",value:g.draftModelPath,placeholder:"Path to small draft model",onChange:$=>Q("draftModelPath",$)})]})]}),d.jsxs("button",{type:"button",onClick:()=>v($=>!$),className:"flex items-center gap-1 text-[13px] font-medium text-muted hover:text-ink",children:[d.jsx(ss,{size:14,className:x?"rotate-180 transition-transform":"transition-transform"}),"Advanced"]}),x&&d.jsxs(kl,{children:[d.jsx(ha,{label:"CPU threads",hint:g.threads===0?`Auto — half your cores (${AH(k.cores)} of ${k.cores||"?"})`:`${g.threads} of ${k.cores||"?"} cores`,value:g.threads,min:0,max:Math.max(1,k.cores||64),step:1,onChange:$=>Q("threads",$),fmt:$=>$===0?"Auto":String($)}),d.jsx(Ku,{label:"Reuse cached prompt",hint:"Skips re-processing the unchanged start of a prompt on repeated or continued requests — faster first token. Recommended on.",value:g.cacheReuse>0,onChange:$=>Q("cacheReuse",$?256:0)}),k.vision&&d.jsx(Ku,{label:"Vision encoder on GPU",value:g.mmprojGpu,onChange:$=>Q("mmprojGpu",$)}),g.parallel>1&&d.jsx(Ku,{label:"Unified KV across slots",value:g.kvUnified,onChange:$=>Q("kvUnified",$)})]}),V&&d.jsx("p",{className:"text-[12px]",style:{color:"var(--err)"},children:V}),d.jsxs("label",{className:"flex cursor-pointer items-center gap-2 pt-1 text-[13px] text-ink",children:[d.jsx("input",{type:"checkbox",checked:E,onChange:$=>S($.target.checked),className:"h-4 w-4 accent-[var(--accent)]"}),"Remember these settings",d.jsx("span",{className:"text-[11px] text-faint",children:E?"· saved as this model's default":"· this load only"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(je,{className:"flex-1",onClick:()=>{const $=()=>l.load.mutate({key:k.key,overrides:g},{onError:ue=>De.error(ue instanceof qe?`Could not load model: ${ue.message}`:"Could not load model — check the engine logs on the Engines screen.")});E?l.save.mutate({key:k.key,profile:g},{onSuccess:$,onError:$}):$(),t()},disabled:l.load.isPending,children:[d.jsx(Ld,{size:14}),k.loaded?"Reload":"Load model"]}),d.jsxs(je,{variant:"outline",onClick:()=>l.save.mutate({key:k.key,profile:g}),disabled:l.save.isPending,title:"Save without reloading",children:[d.jsx(Zw,{size:14}),"Save"]}),d.jsx(je,{variant:"ghost",onClick:()=>l.reset.mutate(k.key),disabled:l.reset.isPending,title:"Reset to defaults",children:d.jsx(Oj,{size:14})})]})]})]})})}function wH({estMb:e,totalMb:t,verdict:r}){if(r==="cpu"||t===0)return d.jsx("div",{className:"rounded-md border border-border bg-panel-2 px-3 py-2 text-[12px] text-muted",children:"CPU-only — no GPU detected."});const a=r==="fits"?"var(--ok)":r==="tight"?"var(--warn)":"var(--err)",s=Math.min(100,Math.round(e/t*100)),l=r==="overflow"?"will spill to system RAM — expect severe slowdown":r==="tight"?"may slow under desktop load":"fits comfortably";return d.jsxs("div",{className:"rounded-md border border-border bg-panel-2 px-3 py-2.5",children:[d.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[12px]",children:[d.jsx("span",{className:"text-muted",children:"Estimated VRAM"}),d.jsxs("span",{style:{color:a},children:["~",(e/1e3).toFixed(1)," / ",(t/1e3).toFixed(1)," GB · ",l]})]}),d.jsx("div",{className:"h-2 overflow-hidden rounded-full",style:{background:"var(--border)"},children:d.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${s}%`,background:a}})})]})}function SH({running:e,done:t,step:r,bestTps:a,resultError:s,benchTps:l,tuned:c,loaded:f,startError:m,pending:p,onStart:g,onCancel:h}){return d.jsx("div",{className:"rounded-lg border border-border bg-panel p-3",children:e?d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex items-center gap-2 text-[13px] text-ink",children:[d.jsx(M0,{size:14,className:"animate-pulse",style:{color:"var(--accent)"}}),"Auto-tuning…"]}),d.jsxs(je,{variant:"outline",onClick:h,children:[d.jsx(ei,{size:14}),"Cancel"]})]}),d.jsx("p",{className:"font-mono text-[12px] text-muted",children:r??"Preparing…"}),a!==void 0&&d.jsxs("p",{className:"text-[12px] text-ink",children:["Best so far: ",d.jsxs("span",{className:"font-mono",style:{color:"var(--ok)"},children:[a.toFixed(1)," tok/s"]})]})]}):d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-1.5 text-[13px] font-medium text-ink",children:[d.jsx(M0,{size:14,style:{color:"var(--accent)"}}),"Auto-tune"]}),d.jsx("p",{className:"text-[11px] text-faint",children:l!==null?`Tuned: ${l.toFixed(1)} tok/s on your machine${c?" · settings applied below":""}`:"Measures real speed on your hardware and saves the fastest settings (~3 min)."})]}),d.jsxs(je,{variant:"outline",onClick:g,disabled:p,children:[d.jsx(Ld,{size:14}),f?"Stop & benchmark":"Auto-tune"]})]}),t&&a!==void 0&&!s&&d.jsxs("p",{className:"text-[12px] text-ink",children:["Done — ",d.jsxs("span",{className:"font-mono",style:{color:"var(--ok)"},children:[a.toFixed(1)," tok/s"]}),". Saved as this model's default."]}),t&&s&&d.jsx("p",{className:"text-[12px]",style:{color:"var(--warn)"},children:s}),m&&d.jsx("p",{className:"text-[12px]",style:{color:"var(--err)"},children:m})]})})}function kl({children:e}){return d.jsx("div",{className:"flex flex-col gap-3 rounded-lg border border-border bg-panel p-3",children:e})}function tE({children:e}){return d.jsx("div",{className:"text-[12px] font-semibold uppercase tracking-wide text-faint",children:e})}function ha({label:e,hint:t,value:r,min:a,max:s,step:l,onChange:c,fmt:f}){return d.jsxs("div",{children:[d.jsxs("div",{className:"mb-1 flex items-baseline justify-between",children:[d.jsx("span",{className:"text-[13px] text-ink",children:e}),d.jsx("span",{className:"font-mono text-[12px] text-muted",children:f?f(r):r})]}),d.jsx("input",{type:"range",min:a,max:s,step:l,value:r,onChange:m=>c(Number(m.target.value)),className:"w-full accent-[var(--accent)]"}),t&&d.jsx("p",{className:"mt-0.5 text-[11px] text-faint",children:t})]})}function Gu({label:e,hint:t,children:r}){return d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[13px] text-ink",children:e}),t&&d.jsx("div",{className:"text-[11px] text-faint",children:t})]}),r]})}function _H({value:e,min:t,max:r,onChange:a}){return d.jsx("input",{type:"number",min:t,max:r,value:e,onChange:s=>a(Math.max(t,Math.min(r,Number(s.target.value)||t))),className:"w-20 rounded-md border border-border bg-bg px-2 py-1 text-right text-[13px] text-ink outline-none"})}function kH({value:e,options:t,onChange:r}){return d.jsx("select",{value:e,onChange:a=>r(a.target.value),className:"rounded-md border border-border bg-bg px-2 py-1 text-[13px] text-ink outline-none",children:t.map(a=>d.jsx("option",{value:a,children:a},a))})}function NH({value:e,options:t,onChange:r}){return d.jsx("div",{className:"flex overflow-hidden rounded-md border border-border",children:t.map(a=>d.jsx("button",{type:"button",onClick:()=>r(a),className:"px-2.5 py-1 text-[12px] capitalize transition-colors",style:{background:e===a?"var(--accent)":"transparent",color:e===a?"var(--on-accent)":"var(--muted)"},children:a},a))})}const CH={off:"Off",mtp:"MTP",nextn:"NextN",draft:"Draft"};function TH({value:e,options:t,onChange:r}){return d.jsx("div",{className:"flex overflow-hidden rounded-md border border-border",children:t.map(a=>d.jsx("button",{type:"button",onClick:()=>r(a),className:"px-2.5 py-1 text-[12px] transition-colors",style:{background:e===a?"var(--accent)":"transparent",color:e===a?"var(--on-accent)":"var(--muted)"},children:CH[a]},a))})}function Hm({label:e,hint:t,value:r,placeholder:a,onChange:s}){return d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsxs("div",{className:"text-[12px] text-ink",children:[e,t&&d.jsx("span",{className:"ml-1 text-faint",children:t})]}),d.jsx("input",{type:"text",value:r,placeholder:a,onChange:l=>s(l.target.value),className:"w-full rounded-md border border-border bg-bg px-2 py-1 font-mono text-[12px] text-ink outline-none placeholder:text-faint"})]})}function Ku({label:e,hint:t,value:r,onChange:a}){return d.jsxs("label",{className:"flex cursor-pointer items-center justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("span",{className:"text-[13px] text-ink",children:e}),t&&d.jsx("p",{className:"text-[11px] text-faint",children:t})]}),d.jsx("input",{type:"checkbox",checked:r,onChange:s=>a(s.target.checked),className:"h-4 w-4 shrink-0 accent-[var(--accent)]"})]})}function AH(e){return Math.max(1,Math.floor((e||2)/2))}function RH(e){return e>=1e9?`${(e/1e9).toFixed(1)} GB`:`${Math.round(e/1e6)} MB`}const MH=[{key:"temperature",label:"Temperature",min:0,max:2,step:.01,def:.8},{key:"top_p",label:"Top P",min:0,max:1,step:.01,def:.95},{key:"top_k",label:"Top K",min:0,max:200,step:1,def:40},{key:"min_p",label:"Min P",min:0,max:1,step:.01,def:.05}];function OH({conv:e}){const t=Jl(),[r,a]=w.useState(!1),[s,l]=w.useState(""),[c,f]=w.useState({});w.useEffect(()=>{r&&e&&(l(e.systemPrompt??""),f(e.sampling??{}))},[r,e]);const m=Object.keys(c).length>0,p=e?.expertMode??!1,g=(v,E)=>f(S=>({...S,[v]:E})),h=()=>f({}),x=()=>{if(!e)return;const v=p?{id:e.id,sampling:c}:{id:e.id,systemPrompt:s,sampling:c};t.update.mutate(v,{onSuccess:()=>{De.success("Thread settings saved"),a(!1)},onError:E=>De.error(E instanceof qe?E.message:"Could not save settings.")})};return d.jsxs(vs,{open:r,onOpenChange:a,children:[d.jsx(rN,{asChild:!0,children:d.jsx(je,{size:"icon",variant:"ghost",className:"h-8 w-8",title:"Thread settings — system prompt & sampling overrides",disabled:!e,children:d.jsx(Ww,{size:15})})}),d.jsxs(so,{className:"max-w-md",children:[d.jsx("div",{className:"mb-4",children:d.jsx("span",{className:"text-[15px] font-semibold text-ink",children:"Thread settings"})}),d.jsxs("div",{className:"flex flex-col gap-5",children:[d.jsxs("div",{children:[d.jsx("label",{className:"mb-1.5 block text-[11px] font-medium uppercase tracking-wide text-faint",children:"System prompt"}),p?d.jsx("p",{className:"rounded-lg border border-border bg-panel-2 px-3 py-2 text-[13px] text-muted",children:"System prompt is managed by TurboLLM for the Expert assistant."}):d.jsx("textarea",{rows:4,value:s,onChange:v=>l(v.target.value),placeholder:"Leave blank to use the model's built-in default",className:"w-full resize-none rounded-lg border border-border bg-bg px-3 py-2 text-[14px] leading-[1.6] text-ink outline-none placeholder:text-faint focus:border-[color:var(--accent)]"})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"mb-2.5 flex items-center justify-between",children:[d.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wide text-faint",children:"Sampling overrides"}),m&&d.jsx("button",{type:"button",onClick:h,className:"text-[12px] text-muted underline-offset-2 hover:text-ink hover:underline",children:"Reset to model defaults"})]}),d.jsx("div",{className:"flex flex-col gap-3.5",children:MH.map(v=>{const E=v.key in c,S=E?c[v.key]??v.def:v.def;return d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"w-24 shrink-0 text-[13px]",style:{color:E?"var(--ink)":"var(--muted)"},children:v.label}),d.jsx("input",{type:"range",min:v.min,max:v.max,step:v.step,value:S,onChange:N=>g(v.key,parseFloat(N.target.value)),className:"flex-1",style:{accentColor:"var(--accent)"}}),d.jsx("span",{className:"w-10 shrink-0 text-right font-mono text-[13px] tabular-nums text-ink",children:v.step<1?S.toFixed(2):String(Math.round(S))})]},v.key)})}),!m&&d.jsx("p",{className:"mt-2.5 text-[12px] text-faint",children:"Using model defaults · move any slider to override for this thread"})]})]}),d.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[d.jsx(vH,{asChild:!0,children:d.jsx(je,{variant:"ghost",size:"sm",children:"Cancel"})}),d.jsx(je,{size:"sm",onClick:x,disabled:t.update.isPending,children:t.update.isPending?"Saving…":"Save"})]})]})]})}function DH(){const{data:e}=zr(),t=e?.model,r=e?.engine.state,[a,s]=w.useState(null),[l,c]=w.useState(null),[f,m]=w.useState(""),[p,g]=w.useState(null),[h,x]=w.useState(null),[v,E]=w.useState(!1),[S,N]=w.useState(!0),[k,M]=w.useState([]),R=fe=>{if(fe){const K=localStorage.getItem(`tllm.thinkingEnabled.${fe}`);if(K!==null)return K!=="false"}return localStorage.getItem("tllm.thinkingEnabled.default")!=="false"},[O,P]=w.useState(()=>R(null)),D=fe=>{a&&localStorage.setItem(`tllm.thinkingEnabled.${a}`,String(fe)),P(fe)},U=w.useRef(null),B=w.useRef([]),J=w.useRef(null),F=w.useRef(null),ae=w.useRef(null),ee=w.useRef(null),ce=w.useRef(!1),te=kn(),Q=Jl(),j=fg(),V=Wl(),ie=II(a).data,T=ie?.messages??[],I=ji(fe=>fe.pendingConversationId),q=ji(fe=>fe.setPendingConversationId);w.useEffect(()=>{I&&(dt(I),q(null))},[I]);const A=(j.data?.models??[]).filter(fe=>fe.compatibleWithActiveEngine),$=V.load.isPending||V.eject.isPending||r==="starting"||r==="stopping",ue=fe=>{V.load.mutate({key:fe},{onError:Qe=>De.error(Qe instanceof qe?Qe.message:"Could not load model.")})},de=()=>{l&&(U.current?.abort(),c(null)),V.eject.mutate(void 0,{onError:fe=>De.error(fe instanceof qe?fe.message:"Could not eject model.")})},Se=()=>{const fe=F.current;fe&&(fe.style.height="auto",fe.style.height=`${Math.min(fe.scrollHeight,160)}px`)},Ee=w.useCallback((fe=!1)=>{const Qe=J.current;Qe&&(fe||!ce.current)&&(Qe.scrollTo({top:Qe.scrollHeight,behavior:"smooth"}),E(!1))},[]);w.useEffect(()=>{const fe=J.current;if(!fe)return;const Qe=()=>{const K=fe.scrollHeight-fe.scrollTop-fe.clientHeight<80;ce.current=!K,E(!K&&!!l)};return fe.addEventListener("scroll",Qe),()=>fe.removeEventListener("scroll",Qe)},[l]),w.useEffect(()=>{l&&Ee()},[l,Ee]),w.useEffect(()=>{const fe=Qe=>{(Qe.ctrlKey||Qe.metaKey)&&Qe.key==="n"&&(Qe.preventDefault(),Ce()),Qe.key==="Escape"&&l&&St()};return window.addEventListener("keydown",fe),()=>window.removeEventListener("keydown",fe)}),w.useEffect(()=>{P(R(a))},[a]);const Ce=()=>{s(null),m(""),c(null),F.current?.focus()},dt=fe=>{l&&(U.current?.abort(),c(null)),s(fe),g(null),ce.current=!1,setTimeout(()=>Ee(!0),50)},St=async()=>{U.current?.abort(),a&&await Q.stop.mutateAsync(a).catch(()=>{})},Lt=async fe=>{const Qe=Array.from(fe.target.files??[]),K=await Promise.all(Qe.map(async pe=>{const we=await new Promise($e=>{const Te=new FileReader;Te.onload=()=>$e(Te.result),pe.type.startsWith("image/")?Te.readAsDataURL(pe):Te.readAsText(pe)});return{file:pe,dataUrl:we}}));M(pe=>[...pe,...K]),fe.target.value=""},ln=()=>{const fe=Date.now();return B.current.push(fe),B.current=B.current.filter(Qe=>Qe>fe-2e3),Math.round(B.current.length/2*10)/10},gt=async(fe,Qe)=>{try{for await(const K of Qe)if(K.event==="meta")B.current=[],c({assistantId:K.data.assistantMessageId,content:"",reasoning:"",progress:null,liveGenTps:0,genTokens:0}),te.invalidateQueries({queryKey:["conversation",fe]});else if(K.event==="progress")c(pe=>pe&&{...pe,progress:{phase:K.data.phase,pct:K.data.pct,tps:K.data.tps}});else if(K.event==="reasoning"){const pe=ln();c(we=>we&&{...we,reasoning:we.reasoning+K.data.delta,progress:null,liveGenTps:pe,genTokens:we.genTokens+1})}else if(K.event==="delta"){const pe=ln();c(we=>we&&{...we,content:we.content+K.data.delta,progress:null,liveGenTps:pe,genTokens:we.genTokens+1})}else K.event==="done"?(c(null),te.invalidateQueries({queryKey:["conversation",fe]}),te.invalidateQueries({queryKey:["conversations"]}),setTimeout(()=>Ee(!0),80)):K.event==="error"&&(c(null),te.invalidateQueries({queryKey:["conversation",fe]}),De.error(K.data.message));c(null),te.invalidateQueries({queryKey:["conversation",fe]})}catch(K){c(null),K?.name!=="AbortError"&&De.error(K instanceof qe?K.message:"Request failed."),te.invalidateQueries({queryKey:["conversation",fe]})}},On=async fe=>{const Qe=f.trim();if(!Qe&&k.length===0||l)return;if(r!=="running"||!t){De.error("Load a model first.");return}const K=k.filter(Te=>Te.dataUrl.startsWith("data:image/")),pe=k.filter(Te=>!Te.dataUrl.startsWith("data:image/")),we=K.map(Te=>Te.dataUrl),$e=pe.map(Te=>`[Attached: ${Te.file.name}]
|
|
93
|
-
${Te.dataUrl}`).join(`
|
|
94
|
-
|
|
95
|
-
`);m(""),M([]),setTimeout(Se,0),ce.current=!1;try{let Te=a;Te||(Te=(await Q.create.mutateAsync({modelKey:t.key})).id,s(Te));const Vt=new AbortController;U.current=Vt;const Jt=pe.map(qt=>qt.file.name);await gt(Te,jI(Te,Qe,Vt.signal,we,$e,Jt,!O))}catch(Te){c(null),Te?.name!=="AbortError"&&De.error(Te instanceof qe?Te.message:"Request failed."),a&&te.invalidateQueries({queryKey:["conversation",a]})}},Je=(fe,Qe)=>{a&&(g(null),Q.editMsg.mutate({convId:a,msgId:fe,content:Qe},{onSuccess:()=>{if(ce.current=!1,r==="running"&&t){const K=new AbortController;U.current=K,gt(a,z0(a,K.signal,!O))}},onError:()=>De.error("Could not edit message.")}))},cn=async()=>{if(!a||l)return;if(r!=="running"||!t){De.error("Load a model first.");return}await Q.regenerate.mutateAsync(a).catch(()=>{});const fe=new AbortController;U.current=fe,gt(a,z0(a,fe.signal,!O))},bn=fe=>{navigator.clipboard.writeText(fe.content).then(()=>De.success("Copied"))},$t=fe=>{a&&Q.deleteMsg.mutate({convId:a,msgId:fe.id},{onError:()=>De.error("Could not delete message.")})},Pn=T.findLast(fe=>fe.role==="assistant")?.stats,kr=Pn?.ctxUsed??0,Qt=t?.ctx||Pn?.ctxMax||0,un=r==="running"&&!!t;return d.jsxs("div",{className:"flex h-full overflow-hidden",children:[d.jsx("div",{className:S?"w-56 shrink-0":"w-10 shrink-0",style:{transition:"width 0.15s"},children:d.jsx(LF,{activeId:a,onSelect:dt,onNew:Ce,collapsed:!S,onToggle:()=>N(fe=>!fe)})}),d.jsxs("div",{className:"relative flex min-w-0 flex-1 flex-col",children:[d.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b border-border px-4",children:[d.jsx(oH,{models:A,loadedKey:t?.key??null,loadedName:t?.name??null,pending:$,ejecting:V.eject.isPending,onLoad:ue,onEject:de,onSettings:fe=>x(fe)}),t&&d.jsx(je,{size:"icon",variant:"ghost",className:"h-8 w-8",onClick:()=>x(t.key),title:"Model settings — change on the fly",children:d.jsx(eS,{size:15})}),d.jsx(OH,{conv:ie}),d.jsx(je,{size:"icon",variant:"ghost",className:"h-8 w-8",onClick:()=>D(!O),title:O?"Thinking on — model reasons before answering. Click to disable.":"Thinking off — model answers directly. Click to enable reasoning.",style:{color:O?"var(--accent)":"var(--faint)"},children:d.jsx(TD,{size:15})}),r==="starting"&&d.jsx("span",{className:"text-[12px] text-muted",children:"Loading model…"}),r==="stopping"&&d.jsx("span",{className:"text-[12px] text-muted",children:"Ejecting…"}),un&&d.jsx(DF,{ctxUsed:kr,ctxMax:Qt})]}),d.jsx("div",{ref:J,className:"min-h-0 flex-1 overflow-y-auto",children:d.jsxs("div",{className:"flex w-full flex-col gap-6 px-8 py-6",children:[T.length===0&&!l&&d.jsx("div",{className:"flex flex-col items-center gap-3 py-16",children:t?d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"text-[15px] font-medium text-ink",children:t.name}),d.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:["Explain something to me","Help me write","Review this code"].map(fe=>d.jsx("button",{type:"button",onClick:()=>{m(fe),setTimeout(()=>F.current?.focus(),0)},className:"rounded-full border border-border px-4 py-1.5 text-[13px] text-muted hover:border-accent hover:text-ink transition-colors",children:fe},fe))})]}):d.jsx("p",{className:"text-[14px] text-muted",children:"Select a model above to begin"})}),T.map((fe,Qe)=>d.jsx(OF,{message:fe,isLast:Qe===T.length-1&&!l,onCopy:bn,onEdit:K=>g(K.id),onDelete:$t,onRegenerate:cn,editingId:p,onEditSave:K=>Je(fe.id,K),onEditCancel:()=>g(null)},fe.id)),l&&d.jsx(MF,{content:l.content,reasoning:l.reasoning,progress:l.progress,liveGenTps:l.liveGenTps,genTokens:l.genTokens}),d.jsx("div",{ref:ae})]})}),v&&d.jsxs("button",{type:"button",onClick:()=>{ce.current=!1,Ee(!0)},className:"absolute bottom-28 left-1/2 -translate-x-1/2 flex items-center gap-1.5 rounded-full border border-border bg-panel px-3 py-1.5 text-[12px] text-muted shadow-[var(--shadow-1)] hover:text-ink",children:[d.jsx(SD,{size:13})," Jump to latest"]}),d.jsx("div",{className:"px-8 pb-5",children:d.jsxs("div",{className:"w-full",children:[d.jsxs("div",{className:"rounded-[var(--radius-lg)] border border-border bg-panel shadow-[var(--shadow-2)] focus-within:border-[color:var(--accent)]",children:[k.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1.5 px-2 pt-2",children:k.map((fe,Qe)=>d.jsxs("div",{className:"relative flex items-center gap-1 rounded border border-border bg-panel-2 px-2 py-1 text-[12px]",children:[fe.file.type.startsWith("image/")?d.jsx("img",{src:fe.dataUrl,className:"h-8 w-8 rounded object-cover",alt:""}):d.jsx("span",{className:"text-muted",children:fe.file.name}),d.jsx("button",{type:"button",onClick:()=>M(K=>K.filter((pe,we)=>we!==Qe)),className:"text-faint hover:text-err",children:d.jsx(ei,{size:11})})]},Qe))}),d.jsxs("div",{className:"flex items-end gap-2 p-2",children:[d.jsx("button",{type:"button",onClick:()=>ee.current?.click(),disabled:!un||!!l,className:"grid h-9 w-9 shrink-0 place-items-center rounded-md hover:bg-panel-2 disabled:opacity-40",title:"Attach image or document",children:d.jsx(Cj,{size:15,className:"text-muted"})}),d.jsx("input",{ref:ee,type:"file",multiple:!0,accept:"image/*,.pdf,.txt,.md,.csv",hidden:!0,onChange:Lt}),d.jsx("textarea",{ref:F,rows:1,className:"max-h-40 min-h-9 flex-1 resize-none bg-transparent px-2 py-1.5 text-[15px] text-ink outline-none placeholder:overflow-hidden placeholder:whitespace-nowrap placeholder:text-faint",placeholder:un?`Message ${t.name}…`:"Load a model above to start chatting",value:f,disabled:!un||!!l||!!p,onChange:fe=>{m(fe.target.value),Se()},onKeyDown:fe=>{if(fe.key==="Enter"&&!fe.shiftKey&&(fe.preventDefault(),On()),fe.key==="ArrowUp"&&!f&&!l){const Qe=T.findLast(K=>K.role==="user");Qe&&g(Qe.id)}}}),l?d.jsx(je,{size:"icon",variant:"outline",onClick:()=>{St()},title:"Stop generation (Esc)",children:d.jsx($j,{size:15})}):d.jsx(je,{size:"icon",onClick:()=>{On()},disabled:!un||!f.trim()&&k.length===0||!!p,"aria-label":"Send",children:d.jsx(zj,{size:15})})]})]}),d.jsx("p",{className:"mt-1.5 px-1 text-[11px] text-faint",children:t?`${t.name} · Enter to send · Shift+Enter for newline`:"Load a model above to start chatting"})]})})]}),d.jsx(iN,{modelKey:h,onClose:()=>x(null)})]})}function eo({message:e,onRetry:t,className:r}){return d.jsxs("div",{className:ht("flex items-start gap-3 rounded-md border p-3 text-[13px]",r),style:{borderColor:"var(--err)",background:"color-mix(in srgb, var(--err) 10%, transparent)",color:"var(--ink)"},role:"alert",children:[d.jsx(Wj,{size:16,style:{color:"var(--err)"},className:"mt-0.5 shrink-0"}),d.jsx("div",{className:"flex-1",children:e}),t&&d.jsx(je,{size:"sm",variant:"outline",onClick:t,children:"Retry"})]})}function aN({icon:e,message:t,action:r}){return d.jsxs("div",{className:"flex flex-col items-center gap-3 py-12 text-center",children:[d.jsx("div",{className:"text-muted",children:e}),d.jsx("p",{className:"max-w-sm text-[13px] text-muted",children:t}),r]})}function Xd({title:e,description:t,actions:r}){return d.jsxs("div",{className:"mb-6 flex items-start justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-[18px] font-semibold tracking-[-0.01em] text-ink",children:e}),t&&d.jsx("p",{className:"mt-1 text-[13px] text-muted",children:t})]}),r]})}const jH=iS("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[12px] font-medium leading-none",{variants:{variant:{default:"bg-panel-2 text-muted",accent:"bg-[color:color-mix(in_srgb,var(--accent)_14%,transparent)] text-accent",mono:"bg-panel-2 text-muted font-mono"}},defaultVariants:{variant:"default"}});function to({className:e,variant:t,...r}){return d.jsx("span",{className:ht(jH({variant:t}),e),...r})}function Ml({className:e,...t}){return d.jsx("div",{className:ht("tllm-pulse rounded-md bg-panel-2",e),...t})}var oN="AlertDialog",[LH]=ni(oN,[jk]),zi=jk(),sN=e=>{const{__scopeAlertDialog:t,...r}=e,a=zi(t);return d.jsx(Xk,{...a,...r,modal:!0})};sN.displayName=oN;var IH="AlertDialogTrigger",zH=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...a}=e,s=zi(r);return d.jsx(Zk,{...s,...a,ref:t})});zH.displayName=IH;var BH="AlertDialogPortal",lN=e=>{const{__scopeAlertDialog:t,...r}=e,a=zi(t);return d.jsx(Wk,{...a,...r})};lN.displayName=BH;var PH="AlertDialogOverlay",cN=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...a}=e,s=zi(r);return d.jsx(Jk,{...s,...a,ref:t})});cN.displayName=PH;var rs="AlertDialogContent",[UH,FH]=LH(rs),HH=qE("AlertDialogContent"),uN=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:a,...s}=e,l=zi(r),c=w.useRef(null),f=Ft(t,c),m=w.useRef(null);return d.jsx(gH,{contentName:rs,titleName:dN,docsSlug:"alert-dialog",children:d.jsx(UH,{scope:r,cancelRef:m,children:d.jsxs(eN,{role:"alertdialog",...l,...s,ref:f,onOpenAutoFocus:He(s.onOpenAutoFocus,p=>{p.preventDefault(),m.current?.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:[d.jsx(HH,{children:a}),d.jsx(qH,{contentRef:c})]})})})});uN.displayName=rs;var dN="AlertDialogTitle",fN=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...a}=e,s=zi(r);return d.jsx(tN,{...s,...a,ref:t})});fN.displayName=dN;var pN="AlertDialogDescription",mN=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...a}=e,s=zi(r);return d.jsx(nN,{...s,...a,ref:t})});mN.displayName=pN;var $H="AlertDialogAction",hN=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...a}=e,s=zi(r);return d.jsx(Yd,{...s,...a,ref:t})});hN.displayName=$H;var gN="AlertDialogCancel",bN=w.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...a}=e,{cancelRef:s}=FH(gN,r),l=zi(r),c=Ft(t,s);return d.jsx(Yd,{...l,...a,ref:c})});bN.displayName=gN;var qH=({contentRef:e})=>{const t=`\`${rs}\` requires a description for the component to be accessible for screen reader users.
|
|
96
|
-
|
|
97
|
-
You can add a description to the \`${rs}\` by passing a \`${pN}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
98
|
-
|
|
99
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${rs}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
100
|
-
|
|
101
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return w.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},GH=sN,KH=lN,QH=cN,VH=uN,YH=hN,XH=bN,ZH=fN,WH=mN;const yN=GH;function JH({className:e,...t}){return d.jsx(QH,{className:ht("fixed inset-0 z-50 bg-black/40",e),...t})}const Yg=w.forwardRef(({className:e,...t},r)=>d.jsxs(KH,{children:[d.jsx(JH,{}),d.jsx(VH,{ref:r,className:ht("fixed left-1/2 top-1/2 z-50 w-full max-w-md -translate-x-1/2 -translate-y-1/2","rounded-[var(--radius-lg)] border border-border bg-panel p-5 shadow-[var(--shadow-2)]","focus:outline-none",e),...t})]}));Yg.displayName="AlertDialogContent";function xN({className:e,...t}){return d.jsx("div",{className:ht("mb-4 flex flex-col gap-1",e),...t})}function vN({className:e,...t}){return d.jsx("div",{className:ht("mt-5 flex justify-end gap-2",e),...t})}const Xg=w.forwardRef(({className:e,...t},r)=>d.jsx(ZH,{ref:r,className:ht("text-[16px] font-semibold tracking-[-0.01em] text-ink",e),...t}));Xg.displayName="AlertDialogTitle";const Zg=w.forwardRef(({className:e,...t},r)=>d.jsx(WH,{ref:r,className:ht("text-[13px] text-muted",e),...t}));Zg.displayName="AlertDialogDescription";const Wg=w.forwardRef(({className:e,...t},r)=>d.jsx(YH,{ref:r,className:ht(mg({variant:"destructive"}),e),...t}));Wg.displayName="AlertDialogAction";const Jg=w.forwardRef(({className:e,...t},r)=>d.jsx(XH,{ref:r,className:ht(mg({variant:"outline"}),e),...t}));Jg.displayName="AlertDialogCancel";const e$=[{repo:"unsloth/Qwen3.6-35B-A3B-GGUF",name:"Qwen3.6 35B-A3B",blurb:"Sparse MoE flagship — 35B total, 3B active. Fast for its size.",quants:{8:"IQ2_XXS",12:"IQ3_XXS",16:"Q3_K_M",24:"Q4_K_M","32+":"Q5_K_M"}},{repo:"unsloth/Qwen3.6-27B-GGUF",name:"Qwen3.6 27B",blurb:"Dense 27B — strong general reasoning, broad quant range.",quants:{8:"IQ2_XS",12:"IQ3_M",16:"Q3_K_L",24:"Q5_K_M","32+":"Q6_K"}},{repo:"unsloth/Gemma-4-26B-A4B-GGUF",name:"Gemma-4 26B-A4B",blurb:"Google MoE with vision — 26B total, 4B active. Multimodal.",quants:{8:"IQ2_XXS",12:"IQ3_XXS",16:"Q3_K_M",24:"Q4_K_M","32+":"Q5_K_M"}},{repo:"unsloth/Gemma-4-E4B-GGUF",name:"Gemma-4 E4B",blurb:"Compact 4B — runs anywhere, vision-capable, great laptop pick.",quants:{8:"Q4_K_M",12:"Q5_K_M",16:"Q6_K",24:"Q8_0","32+":"Q8_0"}},{repo:"unsloth/Qwen3.5-9B-GGUF",name:"Qwen3.5 9B",blurb:"Dense 9B — efficient, fits midrange GPUs at good quant.",quants:{8:"Q3_K_M",12:"Q4_K_M",16:"Q5_K_M",24:"Q6_K","32+":"Q8_0"}},{repo:"unsloth/GLM-5-Air-GGUF",name:"GLM-5 Air",blurb:"Zhipu MoE — efficient long-context generalist.",quants:{8:"IQ2_XS",12:"IQ3_M",16:"Q3_K_M",24:"Q4_K_M","32+":"Q5_K_M"}},{repo:"unsloth/Llama-3.3-70B-Instruct-GGUF",name:"Llama 3.3 70B",blurb:"Meta 70B — gated; accept the license + add a token to download.",gated:!0,quants:{8:"IQ1_M",12:"IQ2_XXS",16:"IQ2_M",24:"IQ3_M","32+":"Q4_K_M"}},{repo:"unsloth/gpt-oss-20b-GGUF",name:"GPT-OSS 20B",blurb:"OpenAI open-weights 20B — strong tool-use and reasoning.",quants:{8:"IQ2_M",12:"Q3_K_M",16:"Q4_K_M",24:"Q5_K_M","32+":"Q6_K"}}];function t$(e){if(!e)return"16";const t=e/1024;return t<10?"8":t<14?"12":t<20?"16":t<28?"24":"32+"}function n$(){const e=hI(),t=pg(),r=e.data?.downloads??[];if(r.length===0)return null;const a=r.filter(f=>f.status==="downloading"||f.status==="queued"||f.status==="paused"),s=r.filter(f=>f.status==="error"),l=r.filter(f=>f.status==="done"||f.status==="cancelled"),c=[...a,...s,...l];return d.jsxs("div",{className:"mb-5 rounded-lg border border-border bg-panel-2 p-4",children:[d.jsxs("div",{className:"mb-3 flex items-center gap-2 text-[13px] font-medium text-ink",children:[d.jsx(bs,{size:14,className:"text-muted"}),"Downloads",a.length>0&&d.jsxs("span",{className:"text-[12px] font-normal text-muted",children:["· ",a.length," active"]})]}),d.jsx("div",{className:"flex flex-col gap-2",children:c.map(f=>d.jsx(r$,{d:f,onCancel:()=>t.cancel.mutate(f.id),onRemove:()=>t.remove.mutate(f.id),cancelling:t.cancel.isPending},f.id))})]})}function r$({d:e,onCancel:t,onRemove:r,cancelling:a}){const s=e.total>0?Math.min(100,Math.round(e.received/e.total*100)):0,l=e.status==="downloading"||e.status==="queued"||e.status==="paused",c=e.status==="done",f=e.status==="error",m=e.status==="cancelled",p=f?"var(--err)":c?"var(--ok)":"var(--accent)";return d.jsxs("div",{className:"rounded-md border border-border bg-panel px-3 py-2.5",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[c&&d.jsx(LD,{size:13,style:{color:"var(--ok)"},className:"shrink-0"}),d.jsx("span",{className:"truncate text-[13px] font-medium text-ink",children:e.name})]}),d.jsx("div",{className:"mt-0.5 truncate text-[11px] text-muted",children:d.jsx(i$,{d:e,pct:s})})]}),l&&d.jsxs(je,{size:"sm",variant:"outline",onClick:t,disabled:a,title:"Cancel download",children:[d.jsx(ei,{size:13}),"Cancel"]}),(c||f||m)&&d.jsx("button",{type:"button","aria-label":"Remove from list",onClick:r,className:"rounded p-1 text-muted transition-colors hover:text-ink",children:d.jsx(ei,{size:14})})]}),(l||f)&&d.jsx("div",{className:"mt-2 h-1.5 overflow-hidden rounded-full",style:{background:"var(--border)"},children:d.jsx("div",{className:"h-full rounded-full transition-all",style:{width:`${f?100:s}%`,background:p}})})]})}function i$({d:e,pct:t}){return e.status==="done"?d.jsx("span",{style:{color:"var(--ok)"},children:"✓ added to library"}):e.status==="error"?d.jsx("span",{style:{color:"var(--err)"},children:e.error??"Download failed"}):e.status==="cancelled"?d.jsx(d.Fragment,{children:"Cancelled"}):e.status==="paused"?d.jsxs(d.Fragment,{children:["Paused · ",Qu(e.received)," of ",e.total>0?Qu(e.total):"?"]}):e.status==="queued"?d.jsx(d.Fragment,{children:"Queued…"}):d.jsxs(d.Fragment,{children:[t,"% · ",Qu(e.received)," of ",e.total>0?Qu(e.total):"?",e.bytesPerSec>0?` · ${a$(e.bytesPerSec)}`:""]})}function Qu(e){return e>=1e9?`${(e/1e9).toFixed(2)} GB`:`${Math.round(e/1e6)} MB`}function a$(e){return e>=1e6?`${(e/1e6).toFixed(1)} MB/s`:`${Math.round(e/1e3)} KB/s`}function $m(e,t){if(!t)return"unknown";const s=(e/1e6*1.15+1e3)/t;return s<=.8?"fits":s<=.95?"tight":"overflow"}const o$={fits:"var(--ok)",tight:"var(--warn)",overflow:"var(--err)",cpu:"var(--muted)",unknown:"var(--faint)"},s$={fits:"Fits comfortably on your GPU.",tight:"Tight fit — may slow under desktop load.",overflow:"Larger than your VRAM — will spill to system RAM.",cpu:"CPU-only — no GPU detected.",unknown:"Fit unknown — GPU VRAM not detected."};function EN({repo:e,onClose:t,onSearch:r}){const a=pI(e),s=Bd(),l=pg(),c=Wl(),f=a.data,m=s.data?.gpus?.[0]?.vramMb,[p,g]=w.useState("");w.useEffect(()=>{if(!f)return;const O=f.files.filter(B=>!B.mmproj);if(O.length===0)return;const P=O.filter(B=>$m(B.sizeBytes,m)==="fits"),U=[...P.length>0?P:O].sort((B,J)=>{if(J.sizeBytes!==B.sizeBytes)return J.sizeBytes-B.sizeBytes;const F=/q\d_k/i.test(B.quant)?0:1,ae=/q\d_k/i.test(J.quant)?0:1;return F-ae})[0];g(U.name)},[f,m]);const h=w.useMemo(()=>f?f.files.filter(O=>!O.mmproj).sort((O,P)=>O.sizeBytes-P.sizeBytes):[],[f]),x=h.find(O=>O.name===p)??null,v=!!x?.downloaded,E=x?$m(x.sizeBytes,m):"unknown",S=f?.gated??!1,N=S,k=l.enqueue.error instanceof qe?l.enqueue.error.message:null,M=()=>{!f||!x||l.enqueue.mutate({repo:f.repo,rfilename:x.name,size:x.sizeBytes,sha256:x.sha256},{onSuccess:()=>{De.success(`Downloading ${x.name}`),t()}})},R=()=>{const O=x?.localKey;O&&c.load.mutate({key:O},{onSuccess:()=>{De.success(`Loading ${x?.quant??"model"}`),t()},onError:P=>De.error(P instanceof qe?P.message:"Could not load model.")})};return d.jsx(vs,{open:!!e,onOpenChange:O=>!O&&t(),children:d.jsxs(so,{className:"max-h-[88vh] overflow-y-auto sm:max-w-[560px]",children:[d.jsxs(sc,{children:[d.jsx(Es,{className:"truncate pr-6",children:d.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[S&&d.jsx(cg,{size:14,style:{color:"var(--warn)"}}),e]})}),d.jsx(ws,{children:f?`${f.downloads.toLocaleString()} downloads · ${f.likes.toLocaleString()} likes${f.license?` · ${f.license}`:""}`:"Loading repo…"})]}),a.isLoading?d.jsx("div",{className:"py-10 text-center text-[13px] text-muted",children:"Loading repo…"}):a.isError?d.jsx(l$,{error:a.error,onRetry:()=>a.refetch(),onSearch:r?()=>r(c$(e)):void 0}):!f||h.length===0?d.jsx("div",{className:"py-10 text-center text-[13px] text-muted",children:"No GGUF files found in this repo."}):d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex flex-col gap-1.5",children:[d.jsxs("label",{className:"flex items-center gap-1.5 text-[12px] font-medium text-ink",children:["Quant",f.verifying&&d.jsx("span",{className:"text-[11px] font-normal text-faint",children:"· checking your library…"})]}),d.jsx("select",{value:p,onChange:O=>g(O.target.value),className:"w-full rounded-md border border-border bg-bg px-2 py-2 text-[13px] text-ink outline-none",children:h.map(O=>{const P=$m(O.sizeBytes,m),D=!!O.downloaded,U=P==="fits"?"●":P==="tight"?"◐":P==="overflow"?"○":"·";return d.jsxs("option",{value:O.name,children:[O.quant," · ",u$(O.sizeBytes),O.parts>1?` · ${O.parts} parts`:""," · ",U,D?" · Downloaded":""]},O.name)})})]}),x&&d.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-border bg-panel-2 px-3 py-2.5 text-[12px]",children:[d.jsx("span",{className:"h-2.5 w-2.5 shrink-0 rounded-full",style:{background:o$[E]}}),d.jsxs("span",{className:"text-muted",children:[s$[E],m?` (${(x.sizeBytes/1e9).toFixed(1)} GB file · ${(m/1024).toFixed(0)} GB VRAM)`:""]})]}),N&&d.jsxs("div",{className:"rounded-md border px-3 py-2.5 text-[12px]",style:{borderColor:"var(--warn)",background:"color-mix(in srgb, var(--warn) 10%, transparent)"},children:[d.jsx("p",{className:"text-ink",children:"This is a gated model."}),d.jsxs("p",{className:"mt-1 text-muted",children:["Accept the license on"," ",d.jsxs("a",{href:`https://huggingface.co/${f.repo}`,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 underline",style:{color:"var(--accent)"},children:["huggingface.co ",d.jsx(zl,{size:11})]}),", then add a Hugging Face token in Settings → Models."]})]}),k&&d.jsx("p",{className:"text-[12px]",style:{color:"var(--err)"},children:k}),d.jsx("div",{className:"flex items-center gap-2",children:v&&x?.localKey?d.jsxs(je,{className:"flex-1",onClick:R,disabled:c.load.isPending,children:[d.jsx(Ld,{size:14}),"Load"]}):d.jsxs(je,{className:"flex-1",onClick:M,disabled:N||l.enqueue.isPending||!x,children:[d.jsx(bs,{size:14}),l.enqueue.isPending?"Adding…":v?"Re-download":"Download"]})}),f.card&&d.jsxs("details",{className:"rounded-md border border-border bg-panel-2 px-3 py-2",children:[d.jsx("summary",{className:"cursor-pointer text-[12px] font-medium text-muted",children:"Model card"}),d.jsx("p",{className:"mt-2 whitespace-pre-wrap text-[12px] leading-relaxed text-muted",children:f.card})]})]})]})})}function l$({error:e,onRetry:t,onSearch:r}){const a=e instanceof qe?e.code:"",s=a==="hf_not_found",l=a==="hf_unreachable";return d.jsxs("div",{className:"flex flex-col items-center gap-3 py-10 text-center",children:[d.jsx("p",{className:"max-w-sm text-[13px] text-muted",children:s?"We couldn't find this exact model on Hugging Face — the local folder name may not match its repo. Try searching for it instead.":l?"Hugging Face is unreachable — check your connection.":e instanceof qe?e.message:"Could not load this repo."}),d.jsxs("div",{className:"flex items-center gap-2",children:[s&&r&&d.jsx(je,{size:"sm",onClick:r,children:"Search Hugging Face"}),d.jsx(je,{size:"sm",variant:"outline",onClick:t,children:"Retry"})]})]})}function c$(e){return e?(e.split("/").pop()??e).replace(/[-_]?gguf$/i,"").replace(/[-_]+/g," ").trim():""}function u$(e){return e>=1e9?`${(e/1e9).toFixed(1)} GB`:`${Math.round(e/1e6)} MB`}function d$(e){let t;try{t=new URL(e)}catch{return!1}return t.protocol!=="http:"&&t.protocol!=="https:"?!1:t.pathname.toLowerCase().endsWith(".gguf")?!0:/huggingface\.co\/.*\/resolve\/.*\.gguf$/i.test(`${t.host}${t.pathname}`)}function f$(e){try{const r=new URL(e).pathname.split("/").filter(Boolean).pop()??"";return decodeURIComponent(r)}catch{return""}}function p$({open:e,onClose:t}){const r=pg(),[a,s]=w.useState(""),l=a.trim(),c=w.useMemo(()=>f$(l),[l]),f=l.length>0&&d$(l),m=l.length>0&&!f,p=r.enqueue.error instanceof qe?r.enqueue.error.message:null,g=()=>{s(""),r.enqueue.reset(),t()},h=()=>{f&&r.enqueue.mutate({url:l},{onSuccess:()=>g()})};return d.jsx(vs,{open:e,onOpenChange:x=>!x&&g(),children:d.jsxs(so,{className:"sm:max-w-[480px]",children:[d.jsxs(sc,{children:[d.jsx(Es,{children:"Import from URL"}),d.jsxs(ws,{children:["Paste a direct link to a ",d.jsx("span",{className:"font-mono",children:".gguf"})," file — any HTTPS host, not just Hugging Face."]})]}),d.jsxs("div",{className:"flex flex-col gap-3",children:[d.jsx(Di,{autoFocus:!0,value:a,onChange:x=>s(x.target.value),onKeyDown:x=>x.key==="Enter"&&h(),placeholder:"https://huggingface.co/owner/repo/resolve/main/model.Q4_K_M.gguf",className:"font-mono text-[12px]"}),c&&f&&d.jsxs("div",{className:"rounded-md border border-border bg-panel-2 px-3 py-2 text-[12px]",children:[d.jsx("span",{className:"text-muted",children:"Will save as "}),d.jsx("span",{className:"font-mono text-ink",children:c})]}),m&&d.jsxs("p",{className:"text-[12px]",style:{color:"var(--err)"},children:["Enter a valid http(s) link ending in ",d.jsx("span",{className:"font-mono",children:".gguf"})," (or an HF resolve URL)."]}),p&&d.jsx("p",{className:"text-[12px]",style:{color:"var(--err)"},children:p})]}),d.jsxs(Vg,{children:[d.jsx(je,{variant:"outline",onClick:g,children:"Cancel"}),d.jsxs(je,{onClick:h,disabled:!f||r.enqueue.isPending,children:[d.jsx(Vw,{size:14}),r.enqueue.isPending?"Adding…":"Import"]})]})]})})}function m$(e,t){const a=(e.split("/").pop()??e).toLowerCase().replace(/-gguf$/,"");return t.some(s=>`${s.name} ${s.path}`.toLowerCase().includes(a))}function h$({presetQuery:e=""}){const[t,r]=w.useState(""),[a,s]=w.useState(""),[l,c]=w.useState(null),[f,m]=w.useState(!1);w.useEffect(()=>{e&&r(e)},[e]),w.useEffect(()=>{const k=setTimeout(()=>s(t.trim()),400);return()=>clearTimeout(k)},[t]);const p=fI(a),g=fg(),h=Bd(),x=g.data?.models??[],v=t$(h.data?.gpus?.[0]?.vramMb),E=a.length>0,S=p.error instanceof qe&&p.error.code==="hf_unreachable",N=p.data?.results??[];return d.jsxs("div",{children:[d.jsx(n$,{}),d.jsxs("div",{className:"mb-5 flex items-center gap-2",children:[d.jsxs("div",{className:"relative flex-1",children:[d.jsx(ch,{size:15,className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-faint"}),d.jsx(Di,{value:t,onChange:k=>r(k.target.value),placeholder:"Search Hugging Face for GGUF models, e.g. qwen3.6 gguf",className:"pl-9"})]}),d.jsxs("button",{type:"button",onClick:()=>m(!0),className:"inline-flex shrink-0 items-center gap-1.5 rounded-md border border-border bg-transparent px-3 py-2 text-[13px] font-medium text-ink transition-colors hover:bg-panel-2",children:[d.jsx(Vw,{size:14}),"Import from URL"]})]}),!E&&d.jsx(g$,{repos:e$,tier:v,models:x,onOpen:k=>c(k)}),E&&d.jsx("div",{className:"flex flex-col gap-2",children:p.isLoading?[0,1,2,3].map(k=>d.jsx(Ml,{className:"h-[58px] w-full rounded-lg"},k)):S?d.jsx(eo,{message:"Hugging Face is unreachable — check your connection.",onRetry:()=>p.refetch()}):p.isError?d.jsx(eo,{message:p.error instanceof qe?p.error.message:"Search failed.",onRetry:()=>p.refetch()}):N.length===0?d.jsx(aN,{icon:d.jsx(ch,{size:24}),message:`No GGUF repos found for “${a}”.`}):N.map(k=>d.jsx(b$,{item:k,onOpen:()=>c(k.repo)},k.repo))}),d.jsx(EN,{repo:l,onClose:()=>c(null),onSearch:k=>{c(null),r(k)}}),d.jsx(p$,{open:f,onClose:()=>m(!1)})]})}function g$({repos:e,tier:t,models:r,onOpen:a}){return d.jsxs("div",{className:"mb-2",children:[d.jsxs("div",{className:"mb-3 flex items-center gap-1.5 text-[12px] font-semibold uppercase tracking-wide text-faint",children:[d.jsx(Bl,{size:13}),"Featured"]}),d.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:e.map(s=>{const l=m$(s.repo,r);return d.jsxs("button",{type:"button",onClick:()=>a(s.repo),className:"flex flex-col gap-1.5 rounded-lg border border-border bg-panel px-4 py-3 text-left transition-colors hover:border-border-strong hover:bg-panel-2",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[s.gated&&d.jsx(cg,{size:13,style:{color:"var(--warn)"},className:"shrink-0"}),d.jsx("span",{className:"truncate font-medium text-ink",children:s.name}),l&&d.jsx(wN,{})]}),d.jsx("p",{className:"line-clamp-2 text-[12px] text-muted",children:s.blurb}),d.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5 text-[11px] text-faint",children:[d.jsx("span",{children:"Suggested for your GPU:"}),d.jsx("span",{className:"rounded px-1.5 py-0.5 font-mono",style:{color:"var(--accent)",background:"color-mix(in srgb, var(--accent) 12%, transparent)"},children:s.quants[t]})]})]},s.repo)})})]})}function b$({item:e,onOpen:t}){return d.jsx("button",{type:"button",onClick:t,className:"group flex items-center gap-3 rounded-lg border border-border bg-panel px-4 py-3 text-left transition-colors hover:border-border-strong hover:bg-panel-2",children:d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[e.gated&&d.jsx(cg,{size:13,style:{color:"var(--warn)"},className:"shrink-0"}),d.jsx("span",{className:"truncate font-medium text-ink",children:e.repo}),e.localCount>0&&d.jsx(wN,{count:e.localCount})]}),d.jsxs("div",{className:"mt-0.5 flex items-center gap-3 text-[12px] text-muted",children:[d.jsxs("span",{children:[nE(e.downloads)," downloads"]}),d.jsxs("span",{className:"inline-flex items-center gap-1",children:[d.jsx(sj,{size:11})," ",nE(e.likes)]}),e.updatedAt&&d.jsxs("span",{children:["updated ",y$(e.updatedAt)]})]})]})})}function wN({count:e}){return d.jsx("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{color:"var(--ok)",background:"color-mix(in srgb, var(--ok) 14%, transparent)"},children:e!=null?`↓ ${e} in library`:"✓ in library"})}function nE(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function y$(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function x$(e){const t=new Map;for(const s of e){const l=s.name.toLowerCase();(t.get(l)??t.set(l,[]).get(l)).push(s)}const r=[],a=new Set;for(const s of e){const l=s.name.toLowerCase();a.has(l)||(a.add(l),r.push(l))}return r.map(s=>({name:t.get(s)[0].name,variants:t.get(s)}))}function v$(){const e=fg(),t=aI(),r=oI(),a=Wl(),s=w$(),{data:l}=zr(),c=l?.engine.state,f=a.load.isPending||c==="starting"||c==="stopping",m=a.load.isPending?a.load.variables?.key:c==="starting"?l?.model?.key:void 0,[p,g]=w.useState("library"),[h,x]=w.useState("all"),[v,E]=w.useState(!1),[S,N]=w.useState(null),[k,M]=w.useState(null),[R,O]=w.useState(null),[P,D]=w.useState(""),U=j=>{j.sourceRepo?O(j.sourceRepo):(D(j.name),g("discover"))},B=e.data?.scanning??!1,J=e.data?.models??[],F=t.data?.dirs??[],ae=t.data?.primaryDir??"",ee=J.filter(j=>!j.compatibleWithActiveEngine).length,ce=J.filter(j=>!v&&!j.compatibleWithActiveEngine?!1:h==="all"?!0:h==="vision"?j.vision:h==="moe"?j.moe:h==="nextn"?(j.nextnLayers??0)>0:!0),te=x$(ce),Q=()=>{const j=k;j&&s.mutate(j.key,{onSuccess:()=>{De.success(`Deleted ${j.name}`),M(null)},onError:V=>{De.error(V instanceof qe?V.message:"Could not delete model files."),M(null)}})};return d.jsxs("div",{className:"w-full px-6 py-6",children:[d.jsx(Xd,{title:"Models",description:p==="library"?"GGUF models discovered in your folders — reuse what you already have, no re-downloading.":"Find and download GGUF models from Hugging Face, or import any direct .gguf URL.",actions:p==="library"?d.jsxs(je,{variant:"outline",size:"sm",onClick:()=>r.rescan.mutate(),disabled:B,children:[d.jsx(Xl,{size:14,className:B?"tllm-pulse":""}),B?"Scanning…":"Rescan"]}):void 0}),d.jsx("div",{className:"mb-5 flex items-center gap-1 border-b border-border",children:["library","discover"].map(j=>d.jsx("button",{type:"button",onClick:()=>g(j),className:"-mb-px border-b-2 px-3 py-2 text-[13px] font-medium capitalize transition-colors",style:{borderColor:p===j?"var(--accent)":"transparent",color:p===j?"var(--ink)":"var(--muted)"},children:j==="library"?`Library${J.length?` (${J.length})`:""}`:"Discover"},j))}),p==="library"&&ee>0&&d.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3 rounded-[var(--radius)] border border-border bg-panel px-4 py-2.5 text-[12px]",children:[d.jsx("span",{className:"text-muted",children:v?`Showing all models. ${ee} can't load on the active engine.`:`${ee} ${ee===1?"model is":"models are"} hidden — the active engine can't load ${ee===1?"it":"them"}.`}),d.jsx("button",{type:"button",onClick:()=>E(j=>!j),className:"shrink-0 font-medium text-accent hover:underline",children:v?"Show compatible only":"Show all"})]}),p==="discover"?d.jsx(h$,{presetQuery:P}):d.jsx(E$,{modelsQ:e,mut:r,actions:a,loadBusy:f,loadingKey:m,dirs:F,primaryDir:ae,scanning:B,models:J,filter:h,setFilter:x,groups:te,setOpenKey:N,setConfirmDelete:M,onDiscover:U}),d.jsx(iN,{modelKey:S,onClose:()=>N(null),onViewRepo:j=>{N(null),O(j)}}),d.jsx(EN,{repo:R,onClose:()=>O(null),onSearch:j=>{O(null),D(j),g("discover")}}),d.jsx(_$,{model:k,onCancel:()=>M(null),onConfirm:Q,deleting:s.isPending})]})}function E$({modelsQ:e,mut:t,actions:r,loadBusy:a,loadingKey:s,dirs:l,primaryDir:c,scanning:f,models:m,filter:p,setFilter:g,groups:h,setOpenKey:x,setConfirmDelete:v,onDiscover:E}){return d.jsxs(d.Fragment,{children:[d.jsx(N$,{dirs:l,primaryDir:c,mut:t}),m.length>0&&d.jsx("div",{className:"mb-4 flex items-center gap-2",children:["all","vision","moe","nextn"].map(S=>d.jsx(C$,{active:p===S,onClick:()=>g(S),children:S==="all"?`All ${m.length}`:S==="vision"?"Vision":S==="moe"?"MoE":"NextN"},S))}),e.isLoading?d.jsx("div",{className:"flex flex-col gap-2",children:[0,1,2].map(S=>d.jsx(Ml,{className:"h-[58px] w-full rounded-lg"},S))}):e.isError?d.jsx(eo,{message:"Could not load models.",onRetry:()=>e.refetch()}):m.length===0?d.jsx(aN,{icon:d.jsx(Kw,{size:24}),message:l.length===0?"No model folders yet. Add a folder above to discover the GGUF models you already have.":f?"Scanning your folders…":"No GGUF models found in your folders."}):d.jsx("div",{className:"flex flex-col gap-2",children:h.map(S=>S.variants.length===1?d.jsx(SN,{m:S.variants[0],onLoad:()=>r.load.mutate({key:S.variants[0].key}),onEject:()=>r.eject.mutate(),onTune:()=>x(S.variants[0].key),onDelete:()=>v(S.variants[0]),onDiscover:()=>E(S.variants[0]),busy:a,loadingThis:s===S.variants[0].key,ejecting:r.eject.isPending},S.variants[0].key):d.jsx(S$,{group:S,onLoad:N=>r.load.mutate({key:N}),onEject:()=>r.eject.mutate(),onTune:N=>x(N),onDelete:N=>v(N),onDiscover:E,busy:a,loadingKey:s,ejecting:r.eject.isPending},S.name.toLowerCase()))})]})}function w$(){const e=kn();return Xe({mutationFn:t=>RL(t),onSuccess:()=>{e.invalidateQueries({queryKey:Ot.models}),e.invalidateQueries({queryKey:Ot.status})}})}function S$({group:e,onLoad:t,onEject:r,onTune:a,onDelete:s,onDiscover:l,busy:c,loadingKey:f,ejecting:m}){const[p,g]=w.useState(!1),h=e.variants.some(x=>x.loaded);return d.jsxs("div",{className:"rounded-lg border border-border bg-panel",children:[d.jsxs("button",{type:"button",onClick:()=>g(x=>!x),className:"flex w-full items-center gap-3 px-4 py-3 text-left",children:[d.jsx(og,{size:16,className:`shrink-0 text-muted transition-transform ${p?"rotate-90":""}`}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[d.jsx("span",{className:"truncate font-medium text-ink",children:e.name}),h&&d.jsx(Ci,{tone:"ok",children:"loaded"})]}),d.jsxs("div",{className:"mt-0.5 truncate text-[12px] text-muted",children:[e.variants.length," variants",e.variants[0].arch?` · ${e.variants[0].arch}`:""]})]}),d.jsxs(to,{variant:"mono",children:[e.variants.length," quants"]})]}),p&&d.jsx("div",{className:"flex flex-col gap-2 border-t border-border px-3 pb-3 pt-2",children:e.variants.map(x=>d.jsx(SN,{m:x,child:!0,onLoad:()=>t(x.key),onEject:r,onTune:()=>a(x.key),onDelete:()=>s(x),onDiscover:()=>l(x),busy:c,loadingThis:f===x.key,ejecting:m},x.key))})]})}function SN({m:e,child:t,onLoad:r,onEject:a,onTune:s,onDelete:l,onDiscover:c,busy:f,loadingThis:m,ejecting:p}){const g=!e.incomplete&&!e.parseError,h=(e.nextnLayers??0)>0;return d.jsxs("div",{className:t?"group flex flex-col gap-2 rounded-md border border-border bg-panel-2 px-3 py-2.5 sm:flex-row sm:items-center sm:gap-3":"group flex flex-col gap-2 rounded-lg border border-border bg-panel px-4 py-3 sm:flex-row sm:items-center sm:gap-3",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[d.jsx("span",{className:"min-w-0 break-words font-medium text-ink sm:truncate",children:t?e.quant:e.name}),e.loaded&&d.jsx(Ci,{tone:"ok",children:"loaded"}),e.vision&&d.jsx(Ci,{children:"vision"}),e.moe&&d.jsx(Ci,{children:"MoE"}),h&&d.jsx(Ci,{tone:"spec",children:"NextN"}),e.hasProfile&&d.jsx(Ci,{children:"tuned"}),e.incomplete&&d.jsx(Ci,{tone:"warn",children:"missing parts"}),e.parseError&&d.jsx(Ci,{tone:"err",children:"unreadable"})]}),d.jsxs("div",{className:"mt-0.5 truncate text-[12px] text-muted",children:[e.arch,e.dir?` · ${e.dir}`:""]})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 sm:flex-nowrap sm:gap-3",children:[!t&&d.jsx(to,{variant:"mono",children:e.quant}),d.jsx(Th,{children:A$(e.sizeBytes)}),d.jsx(Th,{children:e.nativeCtx?`${R$(e.nativeCtx)} ctx`:"—"}),d.jsx(T$,{m:e}),d.jsxs("div",{className:"ml-auto flex items-center gap-1 sm:ml-0",children:[d.jsxs(je,{size:"sm",onClick:r,disabled:!g||f,title:g?"":"Model is incomplete or unreadable",children:[m?d.jsx(Rr,{size:14,className:"animate-spin"}):d.jsx(Ld,{size:14}),m?"Loading…":e.loaded?"Reload":"Load"]}),e.loaded&&d.jsxs(je,{size:"sm",variant:"outline",onClick:a,disabled:p,title:"Eject model (stop the engine)",children:[d.jsx(sg,{size:14}),"Eject"]}),d.jsx(je,{size:"sm",variant:"ghost",onClick:s,disabled:!g,title:"Load settings",children:d.jsx(eS,{size:14})}),d.jsxs($l,{children:[d.jsx(ql,{"aria-label":"Model actions",className:"grid h-8 w-8 place-items-center rounded-md text-muted opacity-100 transition-opacity hover:bg-panel-2 hover:text-ink focus:opacity-100 data-[state=open]:opacity-100 sm:opacity-0 sm:group-hover:opacity-100",children:d.jsx(Qw,{size:16})}),d.jsxs(cs,{align:"end",children:[d.jsxs(Ti,{onSelect:c,children:[d.jsx(kj,{size:14})," Find other quants…"]}),d.jsxs(Ti,{destructive:!0,disabled:e.loaded,onSelect:l,title:e.loaded?"Eject the model before deleting":void 0,children:[d.jsx(Za,{size:14})," Delete file…"]})]})]})]})]})]})}function _$({model:e,onCancel:t,onConfirm:r,deleting:a}){const s=e!==null,l=e?k$(e):[],c=!!e?.loaded;return d.jsx(yN,{open:s,onOpenChange:f=>!f&&t(),children:d.jsxs(Yg,{children:[d.jsxs(xN,{children:[d.jsx(Xg,{children:c?"Model is loaded":"Delete model files?"}),d.jsx(Zg,{children:c?"This model is currently loaded in the running engine. Eject it first, then delete.":l.length>1?`This is a split model — all ${l.length} part files will be permanently deleted from disk. This cannot be undone.`:"This file will be permanently deleted from disk. This cannot be undone."})]}),!c&&l.length>0&&d.jsx("div",{className:"max-h-40 overflow-auto rounded-md border border-border bg-panel-2 p-2",children:l.map(f=>d.jsx("div",{className:"truncate font-mono text-[12px] text-muted",children:f},f))}),d.jsxs(vN,{children:[d.jsx(Jg,{children:"Cancel"}),!c&&d.jsx(Wg,{onClick:r,disabled:a,children:a?"Deleting…":"Delete"})]})]})})}function k$(e){const t=e.path.includes("\\")?"\\":"/",a=e.path.slice(e.path.lastIndexOf(t)+1).match(/^(.*)-(\d{5})-of-(\d{5})\.gguf$/i);if(!a)return[e.path];const s=e.path.slice(0,e.path.lastIndexOf(t)),l=a[1],c=Number(a[3]),f=[];for(let m=1;m<=c;m++){const p=String(m).padStart(5,"0"),g=String(c).padStart(5,"0");f.push(`${s}${t}${l}-${p}-of-${g}.gguf`)}return f}function N$({dirs:e,primaryDir:t,mut:r}){const[a,s]=w.useState(""),l=r.addDir.error instanceof qe?r.addDir.error.message:null,c=()=>{const f=a.trim();f&&r.addDir.mutate(f,{onSuccess:()=>s("")})};return d.jsxs("div",{className:"mb-5 rounded-lg border border-border bg-panel-2 p-4",children:[d.jsx("div",{className:"mb-2 text-[13px] font-medium text-ink",children:"Model folders"}),e.length>0&&d.jsx("div",{className:"mb-3 flex flex-col gap-1.5",children:e.map(f=>{const m=f===t;return d.jsxs("div",{className:"group/dir flex items-center gap-2 text-[13px]",children:[d.jsx("span",{className:"flex-1 truncate font-mono text-muted",children:f}),m?d.jsx(Ci,{tone:"ok",children:"Primary"}):d.jsxs("button",{type:"button",onClick:()=>r.setPrimaryDir.mutate(f),disabled:r.setPrimaryDir.isPending,title:"Downloads and imports will land in this folder",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-[11px] text-faint opacity-0 transition-opacity hover:text-ink focus:opacity-100 group-hover/dir:opacity-100",children:[d.jsx(Gj,{size:12}),"Set as primary"]}),d.jsx("button",{type:"button","aria-label":`Remove ${f}`,onClick:()=>r.removeDir.mutate(f),className:"rounded p-1 text-muted transition-colors hover:text-ink",children:d.jsx(ei,{size:14})})]},f)})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Di,{value:a,onChange:f=>s(f.target.value),onKeyDown:f=>f.key==="Enter"&&c(),placeholder:"Paste an absolute folder path, e.g. D:\\\\models",className:"flex-1 font-mono text-[13px]"}),d.jsxs(je,{size:"sm",onClick:c,disabled:r.addDir.isPending||!a.trim(),children:[d.jsx(ej,{size:14}),"Add folder"]})]}),l&&d.jsx("p",{className:"mt-2 text-[12px]",style:{color:"var(--err)"},children:l})]})}function C$({active:e,onClick:t,children:r}){return d.jsx("button",{type:"button",onClick:t,className:"rounded-full border px-3 py-1 text-[12px] font-medium transition-colors",style:{borderColor:e?"var(--accent)":"var(--border)",background:e?"color-mix(in srgb, var(--accent) 12%, transparent)":"transparent",color:e?"var(--accent)":"var(--muted)"},children:r})}function Ci({children:e,tone:t}){const r=t==="ok"?"var(--ok)":t==="warn"?"var(--warn)":t==="err"?"var(--err)":t==="spec"?"var(--accent)":"var(--muted)";return d.jsx("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide",style:{color:r,background:`color-mix(in srgb, ${r} 12%, transparent)`},children:e})}function Th({children:e}){return d.jsx("div",{className:"w-[72px] text-right text-[13px] text-muted",children:e})}function T$({m:e}){return e.liveTps!=null?d.jsx("div",{className:"w-[72px] text-right text-[13px]",title:"Live tokens/sec (loaded now)",children:d.jsxs("span",{className:"tllm-pulse inline-flex items-center gap-1 font-medium",style:{color:"var(--ok)"},children:[d.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{background:"var(--ok)"}}),Math.round(e.liveTps)," t/s"]})}):e.lastTps!=null?d.jsxs("div",{className:"w-[72px] text-right text-[13px] text-ink",title:"Last-session tokens/sec",children:[Math.round(e.lastTps)," t/s"]}):e.benchTps!=null?d.jsxs("div",{className:"w-[72px] text-right text-[13px] text-muted",title:"Benchmark tokens/sec",children:[Math.round(e.benchTps)," t/s"]}):d.jsx(Th,{children:"—"})}function A$(e){return e>=1e9?`${(e/1e9).toFixed(1)} GB`:`${Math.round(e/1e6)} MB`}function R$(e){return e>=1024?`${Math.round(e/1024)}K`:String(e)}function M$({open:e,onOpenChange:t,onSelect:r}){const[a,s]=w.useState(null),{data:l,isFetching:c,error:f,refetch:m}=iI(a,e);w.useEffect(()=>{e&&s(null)},[e]);const p=g=>{r(g),t(!1)};return d.jsx(vs,{open:e,onOpenChange:t,children:d.jsxs(so,{className:"max-w-lg",children:[d.jsxs(sc,{children:[d.jsx(Es,{children:"Browse for binary"}),d.jsxs(ws,{children:["Navigate to the compiled ",d.jsx("code",{className:"font-mono",children:"llama-server"})," executable and click it to select. Limited to your home directory."]})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(je,{variant:"outline",size:"iconSm",onClick:()=>l?.parent!=null&&s(l.parent),disabled:!l||l.parent==null||c,"aria-label":"Up one folder",children:d.jsx(kD,{size:16})}),d.jsx("div",{className:"min-w-0 flex-1 truncate rounded-md border border-border bg-panel-2 px-2.5 py-1.5 font-mono text-[12px] text-muted",title:l?.path??"",children:l?.path??"…"}),d.jsx(je,{variant:"outline",size:"iconSm",onClick:()=>{m()},disabled:c,"aria-label":"Refresh",children:d.jsx(Xw,{size:16,className:c?"animate-spin":void 0})})]}),f?d.jsx(eo,{message:f instanceof qe?f.message:"Could not read that folder.",onRetry:()=>{m()},className:"mt-3"}):d.jsxs("ul",{className:"mt-3 max-h-[320px] overflow-y-auto rounded-md border border-border",children:[l&&l.entries.length===0&&d.jsx("li",{className:"px-3 py-6 text-center text-[13px] text-muted",children:"This folder is empty."}),l?.entries.map(g=>d.jsx("li",{children:d.jsxs("button",{type:"button",onClick:()=>g.isDir?s(g.path):p(g.path),className:"flex w-full items-center gap-2.5 px-3 py-2 text-left text-[13px] text-ink hover:bg-panel-2",children:[g.isDir?d.jsx(nj,{size:16,className:"shrink-0 text-muted"}):d.jsx(XD,{size:16,className:"shrink-0 text-muted"}),d.jsx("span",{className:"min-w-0 flex-1 truncate font-mono",children:qw(g.name,48)}),!g.isDir&&d.jsx("span",{className:"shrink-0 text-[11px] text-muted",children:"Select"})]})},g.path))]}),d.jsx(Vg,{children:d.jsx(je,{variant:"outline",onClick:()=>t(!1),children:"Cancel"})})]})})}function O$(){const[e,t]=w.useState(!1),[r,a]=w.useState(""),[s,l]=w.useState(""),[c,f]=w.useState(null),[m,p]=w.useState(null),[g,h]=w.useState(!1),{add:x}=zd(),{data:v}=Bd(),E=v?.os.split("/")[0]==="win32",S=E?"C:\\path\\to\\llama-server.exe":"/path/to/llama-server",N=()=>{a(""),l(""),f(null),p(null)},k=()=>{f(null),p(null),x.mutate({name:r.trim(),binPath:s.trim()},{onSuccess:R=>{R.warning==="no_version"?De.warning("Engine added, but its version could not be detected."):De.success("Engine added"),t(!1),N()},onError:R=>{const O=R instanceof qe?R.code:"",P=R instanceof qe?R.message:"Could not add engine.";O==="name_already_taken"?f(P):p(P)}})},M=r.trim().length>0&&s.trim().length>0&&!x.isPending;return d.jsxs(vs,{open:e,onOpenChange:R=>{t(R),R||N()},children:[d.jsx(rN,{asChild:!0,children:d.jsxs(je,{children:[d.jsx(Yw,{size:16})," Add engine"]})}),d.jsxs(so,{children:[d.jsxs(sc,{children:[d.jsx(Es,{children:"Add engine"}),d.jsx(ws,{children:"Point TurboLLM at any llama-server compatible binary — mainline llama.cpp, or any community fork."})]}),d.jsxs("div",{className:"flex flex-col gap-3",children:[d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsx("span",{className:"text-[13px] font-medium text-ink",children:"Name"}),d.jsx(Di,{value:r,onChange:R=>a(R.target.value),placeholder:"TurboQuant llama.cpp",autoFocus:!0}),d.jsx("span",{className:"text-[12px] text-muted",children:"Any label you choose — shown in the engine list. Not a filename."}),c&&d.jsx(eo,{message:c})]}),d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsx("span",{className:"text-[13px] font-medium text-ink",children:"Binary path"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Di,{value:s,onChange:R=>l(R.target.value),placeholder:S,className:"font-mono text-[13px]"}),d.jsxs(je,{type:"button",variant:"outline",onClick:()=>h(!0),className:"shrink-0",children:[d.jsx(WD,{size:16})," Browse…"]})]}),d.jsxs("span",{className:"text-[12px] text-muted",children:["Absolute path to the compiled"," ",d.jsx("code",{className:"font-mono",children:E?"llama-server.exe":"llama-server"})," ","executable (from a llama.cpp build or release). Validated and probed when you add it."]})]}),m&&d.jsx(eo,{message:m})]}),d.jsx(M$,{open:g,onOpenChange:h,onSelect:R=>{l(R),p(null)}}),d.jsxs(Vg,{children:[d.jsx(je,{variant:"outline",onClick:()=>t(!1),disabled:x.isPending,children:"Cancel"}),d.jsx(je,{onClick:k,disabled:!M,children:x.isPending?"Probing…":"Add engine"})]})]})]})}function D$(e){const t=e.capabilities?.kvTypes??[],r=e.capabilities?.flags??[],a=[];return t.some(s=>s.startsWith("turbo"))&&a.push({key:"turbo",label:"turbo KV",accent:!0}),r.includes("--parallel")&&a.push({key:"parallel",label:"parallel"}),a.push({key:"kvcount",label:`${t.length} KV types`}),a}function j$({engine:e}){const{rename:t,reprobe:r,remove:a}=zd(),[s,l]=w.useState(!1),[c,f]=w.useState(e.name),[m,p]=w.useState(!1),g=D$(e),h=()=>{const E=c.trim();if(l(!1),!E||E===e.name){f(e.name);return}t.mutate({id:e.id,name:E},{onSuccess:()=>De.success("Engine renamed"),onError:S=>{f(e.name),De.error(S instanceof qe?S.message:"Could not rename engine.")}})},x=()=>r.mutate(e.id,{onSuccess:()=>De.success("Engine re-probed"),onError:E=>De.error(E instanceof qe?E.message:"Could not re-probe engine.")}),v=()=>a.mutate(e.id,{onSuccess:()=>{De.success("Engine removed"),p(!1)},onError:E=>{p(!1),De.error(E instanceof qe?E.message:"Could not remove engine.")}});return d.jsxs("div",{className:"rounded-[var(--radius)] border border-border bg-panel p-4",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[s?d.jsx(Di,{value:c,autoFocus:!0,onChange:E=>f(E.target.value),onBlur:h,onKeyDown:E=>{E.key==="Enter"&&h(),E.key==="Escape"&&(f(e.name),l(!1))},className:"h-7 max-w-xs"}):d.jsx("span",{className:"truncate text-sm font-semibold text-ink",children:e.name}),e.version&&d.jsx("span",{className:"shrink-0 text-[12px] text-muted",children:e.version})]}),d.jsx(hD,{label:e.binPath,side:"bottom",children:d.jsx("div",{className:"mt-1 inline-block max-w-full truncate font-mono text-[13px] text-muted",children:qw(e.binPath,56)})}),d.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:g.map(E=>d.jsx(to,{variant:E.accent?"accent":"default",children:E.label},E.key))})]}),d.jsx("div",{className:"flex shrink-0 items-center gap-1",children:d.jsxs($l,{children:[d.jsx(ql,{"aria-label":"Engine actions",className:"grid h-8 w-8 place-items-center rounded-md text-muted hover:bg-panel-2 hover:text-ink",children:d.jsx(Qw,{size:16})}),d.jsxs(cs,{align:"end",children:[d.jsxs(Ti,{onSelect:()=>{f(e.name),l(!0)},children:[d.jsx(ug,{size:14})," Rename"]}),d.jsxs(Ti,{onSelect:x,disabled:r.isPending,children:[d.jsx(Xl,{size:14})," Re-probe"]}),d.jsx(Ok,{}),d.jsxs(Ti,{destructive:!0,onSelect:()=>p(!0),children:[d.jsx(Za,{size:14})," Remove"]})]})]})})]}),d.jsx(yN,{open:m,onOpenChange:p,children:d.jsxs(Yg,{children:[d.jsxs(xN,{children:[d.jsx(Xg,{children:"Remove engine?"}),d.jsxs(Zg,{children:[e.name," will be removed from the registry. The binary on disk is not deleted."]})]}),d.jsxs(vN,{children:[d.jsx(Jg,{children:"Cancel"}),d.jsx(Wg,{onClick:v,disabled:a.isPending,children:"Remove"})]})]})})]})}const rE=e=>/[\\/]engines[\\/]llama\.cpp-/.test(e);function L$(e,t){const r=[],a=e.engines.find(c=>c.id===e.activeEngineId),s=!!a&&rE(a.binPath),l=t.backends.map(c=>({key:`official:${c.id}`,label:c.label,installed:c.installed,active:c.active,recommended:c.recommended,engineId:c.engineId,backendId:c.id}));r.push({key:"official",name:"Official llama.cpp",kind:"official",builds:l,active:s});for(const c of e.engines){if(c.kind==="mlx"||rE(c.binPath))continue;const f=c.id===e.activeEngineId;r.push({key:`custom:${c.id}`,name:c.name,kind:"custom",active:f,builds:[{key:`custom:${c.id}`,label:c.version||"custom build",installed:!0,active:f,recommended:!1,engineId:c.id,backendId:""}]})}return(t.mlx.supported||t.mlx.installed)&&r.push({key:"mlx",name:"MLX",kind:"mlx",active:t.mlx.active,builds:[{key:"mlx",label:"Apple Metal",installed:t.mlx.installed,active:t.mlx.active,recommended:!1,engineId:t.mlx.engineId,backendId:""}]}),r}function I$({list:e,backends:t,provisioning:r,selectedKey:a,onSelect:s}){const l=zd(),c=Zl(),f=w.useMemo(()=>e&&t?L$(e,t):[],[e,t]);if(!e||!t)return null;const m=f.find(E=>E.key===a)??f.find(E=>E.active)??f[0],p=r||l.activate.isPending||c.backend.isPending,g=(E,S)=>{E.active||(E.installed&&E.engineId?l.activate.mutate(E.engineId,{onError:N=>{S!==void 0&&s(S),De.error(N instanceof qe?N.message:"Could not switch engine.")}}):E.backendId?c.backend.mutate(E.backendId,{onError:N=>{S!==void 0&&s(S),De.error(N instanceof qe?N.message:"Could not download build.")}}):De.error("Install this build first (use the list below)."))},h=E=>{const S=a;if(s(E.key),!E.active)if(E.kind==="official"){const N=E.builds.find(k=>k.installed&&k.recommended)??E.builds.find(k=>k.installed);N&&g(N,S)}else g(E.builds[0],S)},x=(m?.builds.length??0)>1,v=m?.builds.find(E=>E.active);return d.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[d.jsx(iE,{label:"Engine",children:d.jsxs($l,{children:[d.jsxs(ql,{disabled:p,className:"flex h-9 min-w-[200px] items-center gap-2 rounded-lg border border-border bg-bg px-3 text-[13px] text-ink transition-colors hover:border-[color:var(--accent)] disabled:opacity-60",children:[d.jsx(lg,{size:15,className:m?.active?"text-accent":"text-muted"}),d.jsx("span",{className:"flex-1 truncate text-left",children:m?.name??"No engine"}),d.jsx(ss,{size:14,className:"shrink-0 text-muted"})]}),d.jsxs(cs,{align:"start",className:"w-[260px]",children:[d.jsx(aE,{children:"Engine — the runtime / fork"}),f.map(E=>d.jsxs(Ti,{onSelect:()=>h(E),className:"flex items-center gap-2",children:[d.jsx(oE,{on:E.active}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-ink",children:E.name}),E.active&&d.jsx("span",{className:"shrink-0 text-[11px] text-accent",children:"active"})]},E.key))]})]})}),x&&d.jsx(iE,{label:"Build",children:d.jsxs($l,{children:[d.jsxs(ql,{disabled:p,className:"flex h-9 min-w-[180px] items-center gap-2 rounded-lg border border-border bg-bg px-3 text-[13px] text-ink transition-colors hover:border-[color:var(--accent)] disabled:opacity-60",children:[d.jsx(pj,{size:15,className:"text-accent"}),d.jsx("span",{className:"flex-1 truncate text-left",children:v?.label??"Choose a build"}),d.jsx(ss,{size:14,className:"shrink-0 text-muted"})]}),d.jsxs(cs,{align:"start",className:"w-[260px]",children:[d.jsx(aE,{children:"Build — which GPU backend"}),m.builds.map(E=>d.jsxs(Ti,{onSelect:()=>g(E),className:"flex items-center gap-2",children:[d.jsx(oE,{on:E.active}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-ink",children:E.label}),E.recommended&&d.jsx(Bl,{size:11,className:"shrink-0 text-accent","aria-label":"recommended"}),d.jsx("span",{className:"shrink-0 text-[11px] text-muted",children:E.active?"active":E.installed?"installed":"download"})]},E.key))]})]})})]})}function iE({label:e,children:t}){return d.jsxs("label",{className:"flex flex-col gap-1",children:[d.jsx("span",{className:"text-[11px] font-medium uppercase tracking-wide text-faint",children:e}),t]})}function aE({children:e}){return d.jsx("div",{className:"px-2 py-1.5 text-[11px] font-medium uppercase tracking-wide text-faint",children:e})}function oE({on:e}){return d.jsx("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center",children:e&&d.jsx(Jr,{size:14,className:"text-accent"})})}function z$(){const[e,t]=w.useState(()=>localStorage.getItem("tllm.engineHelpClosed")!=="1"),r=()=>{t(a=>(localStorage.setItem("tllm.engineHelpClosed",a?"1":"0"),!a))};return d.jsxs("div",{className:"rounded-lg border border-border bg-panel-2",children:[d.jsxs("button",{type:"button",onClick:r,className:"flex w-full items-center gap-2 px-4 py-3 text-left",children:[d.jsx(zD,{size:15,className:"shrink-0 text-accent"}),d.jsx("span",{className:"flex-1 text-[13px] font-medium text-ink",children:"How engines & builds work"}),d.jsx(ss,{size:15,className:`shrink-0 text-muted transition-transform ${e?"rotate-180":""}`})]}),e&&d.jsxs("div",{className:"border-t border-border px-4 py-3 text-[13px] leading-relaxed text-muted",children:[d.jsxs("p",{className:"mb-3",children:["Selecting an engine is a ",d.jsx("span",{className:"font-medium text-ink",children:"two-step"})," choice: pick the ",d.jsx("span",{className:"font-medium text-ink",children:"Engine"}),", then its"," ",d.jsx("span",{className:"font-medium text-ink",children:"Build"}),"."]}),d.jsxs("div",{className:"mb-3 flex flex-col gap-2",children:[d.jsx(sE,{n:"1",title:"Engine — the runtime / fork",body:"The inference project itself. Official llama.cpp is built in; a fork you add (e.g. a TurboQuant build) is its own engine; MLX is another. Different engines can support different features and model formats."}),d.jsx(sE,{n:"2",title:"Build — which GPU backend",body:"A specific compiled version of that engine: CUDA, Vulkan, ROCm, Metal, CPU. Features like turbo KV cache are baked into the build at compile time — which is why one engine can have several builds, and you pick which one runs."})]}),d.jsxs("ul",{className:"ml-4 list-disc space-y-1",children:[d.jsxs("li",{children:[d.jsx("span",{className:"font-medium text-ink",children:"Official"})," is permanent — you download and remove its individual builds, but the engine itself stays."]}),d.jsxs("li",{children:["Engines you ",d.jsx("span",{className:"font-medium text-ink",children:"add yourself"})," (your own forks) can be deleted as a whole."]}),d.jsx("li",{children:"Only one build runs at a time. The Build dropdown is hidden when an engine has just one build."})]})]})]})}function sE({n:e,title:t,body:r}){return d.jsxs("div",{className:"flex gap-2.5",children:[d.jsx("span",{className:"mt-0.5 grid h-5 w-5 shrink-0 place-items-center rounded bg-accent text-[11px] font-bold text-on-accent",children:e}),d.jsxs("div",{children:[d.jsx("div",{className:"text-[13px] font-medium text-ink",children:t}),d.jsx("div",{className:"text-[12px] text-muted",children:r})]})]})}function B$({status:e,activeEngineName:t}){const r=e?.engine.state??"stopped",a=e?.engine.error,s=e?.model?.loadElapsedMs,l=r==="running"?e?.engineStats??null:null,c=r==="running"?e?.liveGeneration??null:null,f=Wl(),m=zd(),p=r==="running"||r==="starting",g=r==="running"||r==="error",h=()=>f.eject.mutate(void 0,{onError:E=>De.error(E instanceof qe?E.message:"Could not stop the engine.")}),x=()=>m.restart.mutate(void 0,{onError:E=>De.error(E instanceof qe?E.message:"Could not restart the engine.")}),v=async()=>{const E=(a?.logTail??[]).join(`
|
|
102
|
-
`);try{await navigator.clipboard.writeText(E),De.success("Log copied to clipboard")}catch{De.error("Could not copy log")}};return d.jsxs("div",{className:"rounded-[var(--radius)] border border-[color:var(--accent)] bg-panel p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[12px] text-muted",children:"Active engine"}),d.jsx("div",{className:"text-sm font-semibold text-ink",children:t??"None active"})]}),d.jsx(uh,{state:r}),r==="starting"&&s!=null&&d.jsxs("span",{className:"text-[13px] text-muted",children:["Loading model… (",Math.round(s/1e3),"s)"]}),r==="running"&&e?.model&&d.jsx("span",{className:"text-[13px] text-muted truncate",children:e.model.name}),r==="running"&&!c&&(l?.activeRequests??0)>0&&d.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[12px] font-medium",style:{background:"color-mix(in srgb, var(--accent) 12%, transparent)",color:"var(--accent)"},title:"The engine is actively generating",children:[d.jsx("span",{className:"tllm-pulse inline-block h-1.5 w-1.5 rounded-full",style:{background:"var(--accent)"}}),"Generating",(l?.activeRequests??0)>1?` (${l?.activeRequests})`:"","…"]}),g&&d.jsxs(je,{size:"sm",variant:"outline",className:"ml-auto",onClick:x,disabled:m.restart.isPending,title:"Restart the engine",children:[d.jsx(Xw,{size:14}),"Restart"]}),p&&d.jsxs(je,{size:"sm",variant:"outline",className:g?"":"ml-auto",onClick:h,disabled:f.eject.isPending,title:"Stop the engine and unload the model",children:[d.jsx(sg,{size:14}),"Stop & unload"]})]}),c&&d.jsx(P$,{live:c}),l&&d.jsx(U$,{stats:l}),r==="error"&&a&&d.jsxs("div",{className:"mt-3",children:[d.jsxs("div",{className:"mb-1.5 flex items-center justify-between",children:[d.jsxs("span",{className:"text-[13px] font-medium",style:{color:"var(--err)"},children:[a.message,a.exitCode!=null&&` (exit ${a.exitCode})`]}),d.jsxs(je,{size:"sm",variant:"ghost",onClick:()=>{v()},children:[d.jsx(jd,{size:14})," Copy"]})]}),d.jsx("pre",{className:"max-h-48 overflow-auto rounded-md px-3 py-2 font-mono text-[12px] leading-[1.5]",style:{background:"var(--log-bg)",color:"var(--log-err-ink)"},children:(a.logTail??[]).join(`
|
|
103
|
-
`)||"No log output captured."})]})]})}function P$({live:e}){return e.phase==="prompt"?d.jsxs("div",{className:"mt-3 flex items-center gap-2 text-[12px] text-muted",children:[d.jsx("span",{className:"shrink-0",children:"Processing prompt"}),d.jsx("div",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-panel-2",children:d.jsx("div",{className:"h-full rounded-full transition-[width] duration-300",style:{width:`${Math.max(0,Math.min(100,e.pct))}%`,background:"var(--accent)"}})}),d.jsxs("span",{className:"shrink-0 tabular-nums",children:[e.pct,"%"]})]}):d.jsxs("div",{className:"mt-3 flex items-center gap-2 text-[12px] text-muted",children:[d.jsx("span",{className:"tllm-pulse inline-block h-1.5 w-1.5 shrink-0 rounded-full",style:{background:"var(--accent)"}}),d.jsxs("span",{className:"tabular-nums",children:[e.outputTokens.toLocaleString()," tok generated"]})]})}function U$({stats:e}){const t=[];return t.push(`${e.requests} ${e.requests===1?"request":"requests"}`),(e.inputTokens>0||e.outputTokens>0)&&t.push(`${lE(e.inputTokens)} in / ${lE(e.outputTokens)} out`),e.avgPromptTps>0&&t.push(`${e.avgPromptTps.toFixed(0)} tok/s prefill`),e.avgGenTps>0&&t.push(`${e.avgGenTps.toFixed(1)} tok/s gen`),t.push(F$(e.sinceMs)),d.jsx("div",{className:"mt-3 border-t border-border pt-2 text-[11px] text-faint",title:"Session totals — reset when the engine stops or restarts",children:t.join(" · ")})}function lE(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function F$(e){const t=Math.floor(e/1e3);if(t<60)return`${t}s session`;const r=Math.floor(t/60);return r<60?`${r}m session`:`${Math.floor(r/60)}h ${r%60}m session`}function H$(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Zd="Switch",[$$]=ni(Zd),[q$,eb]=$$(Zd);function G$(e){const{__scopeSwitch:t,checked:r,children:a,defaultChecked:s,disabled:l,form:c,name:f,onCheckedChange:m,required:p,value:g="on",internal_do_not_use_render:h}=e,[x,v]=gs({prop:r,defaultProp:s??!1,onChange:m,caller:Zd}),[E,S]=w.useState(null),[N,k]=w.useState(null),M=w.useRef(!1),R=E?!!c||!!E.closest("form"):!0,O={checked:x,setChecked:v,disabled:l,control:E,setControl:S,name:f,form:c,value:g,hasConsumerStoppedPropagationRef:M,required:p,defaultChecked:s,isFormControl:R,bubbleInput:N,setBubbleInput:k};return d.jsx(q$,{scope:t,...O,children:K$(h)?h(O):a})}var _N="SwitchTrigger",kN=w.forwardRef(({__scopeSwitch:e,onClick:t,...r},a)=>{const{value:s,disabled:l,checked:c,required:f,setControl:m,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:h,bubbleInput:x}=eb(_N,e),v=Ft(a,m);return d.jsx(Tt.button,{type:"button",role:"switch","aria-checked":c,"aria-required":f,"data-state":MN(c),"data-disabled":l?"":void 0,disabled:l,value:s,...r,ref:v,onClick:He(t,E=>{p(S=>!S),x&&h&&(g.current=E.isPropagationStopped(),g.current||E.stopPropagation())})})});kN.displayName=_N;var NN=w.forwardRef((e,t)=>{const{__scopeSwitch:r,name:a,checked:s,defaultChecked:l,required:c,disabled:f,value:m,onCheckedChange:p,form:g,...h}=e;return d.jsx(G$,{__scopeSwitch:r,checked:s,defaultChecked:l,disabled:f,required:c,onCheckedChange:p,name:a,form:g,value:m,internal_do_not_use_render:({isFormControl:x})=>d.jsxs(d.Fragment,{children:[d.jsx(kN,{...h,ref:t,__scopeSwitch:r}),x&&d.jsx(RN,{__scopeSwitch:r})]})})});NN.displayName=Zd;var CN="SwitchThumb",TN=w.forwardRef((e,t)=>{const{__scopeSwitch:r,...a}=e,s=eb(CN,r);return d.jsx(Tt.span,{"data-state":MN(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:t})});TN.displayName=CN;var AN="SwitchBubbleInput",RN=w.forwardRef(({__scopeSwitch:e,...t},r)=>{const{control:a,hasConsumerStoppedPropagationRef:s,checked:l,defaultChecked:c,required:f,disabled:m,name:p,value:g,form:h,bubbleInput:x,setBubbleInput:v}=eb(AN,e),E=Ft(r,v),S=H$(l),N=ow(a);w.useEffect(()=>{const M=x;if(!M)return;const R=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(R,"checked").set,D=!s.current;if(S!==l&&P){const U=new Event("click",{bubbles:D});P.call(M,l),M.dispatchEvent(U)}},[x,S,l,s]);const k=w.useRef(l);return d.jsx(Tt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??k.current,required:f,disabled:m,name:p,value:g,form:h,...t,tabIndex:-1,ref:E,style:{...t.style,...N,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});RN.displayName=AN;function K$(e){return typeof e=="function"}function MN(e){return e?"checked":"unchecked"}const ON=w.forwardRef(({className:e,...t},r)=>d.jsx(NN,{ref:r,className:ht("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-colors","data-[state=unchecked]:bg-border-strong data-[state=checked]:bg-accent","disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:d.jsx(TN,{className:ht("pointer-events-none block h-4 w-4 rounded-full bg-panel shadow-[var(--shadow-1)] transition-transform","data-[state=unchecked]:translate-x-0.5 data-[state=checked]:translate-x-[18px]")})}));ON.displayName="Switch";var Wd="Collapsible",[Q$]=ni(Wd),[V$,tb]=Q$(Wd),DN=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:a,defaultOpen:s,disabled:l,onOpenChange:c,...f}=e,[m,p]=gs({prop:a,defaultProp:s??!1,onChange:c,caller:Wd});return d.jsx(V$,{scope:r,disabled:l,contentId:ya(),open:m,onOpenToggle:w.useCallback(()=>p(g=>!g),[p]),children:d.jsx(Tt.div,{"data-state":rb(m),"data-disabled":l?"":void 0,...f,ref:t})})});DN.displayName=Wd;var jN="CollapsibleTrigger",LN=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,...a}=e,s=tb(jN,r);return d.jsx(Tt.button,{type:"button","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open||!1,"data-state":rb(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...a,ref:t,onClick:He(e.onClick,s.onOpenToggle)})});LN.displayName=jN;var nb="CollapsibleContent",IN=w.forwardRef((e,t)=>{const{forceMount:r,...a}=e,s=tb(nb,e.__scopeCollapsible);return d.jsx(Ir,{present:r||s.open,children:({present:l})=>d.jsx(Y$,{...a,ref:t,present:l})})});IN.displayName=nb;var Y$=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:a,children:s,...l}=e,c=tb(nb,r),[f,m]=w.useState(a),p=w.useRef(null),g=Ft(t,p),h=w.useRef(0),x=h.current,v=w.useRef(0),E=v.current,S=c.open||f,N=w.useRef(S),k=w.useRef(void 0);return w.useEffect(()=>{const M=requestAnimationFrame(()=>N.current=!1);return()=>cancelAnimationFrame(M)},[]),Zr(()=>{const M=p.current;if(M){k.current=k.current||{transitionDuration:M.style.transitionDuration,animationName:M.style.animationName},M.style.transitionDuration="0s",M.style.animationName="none";const R=M.getBoundingClientRect();h.current=R.height,v.current=R.width,N.current||(M.style.transitionDuration=k.current.transitionDuration,M.style.animationName=k.current.animationName),m(a)}},[c.open,a]),d.jsx(Tt.div,{"data-state":rb(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!S,...l,ref:g,style:{"--radix-collapsible-content-height":x?`${x}px`:void 0,"--radix-collapsible-content-width":E?`${E}px`:void 0,...e.style},children:S&&s})});function rb(e){return e?"open":"closed"}var X$=DN,Z$=LN,W$=IN;const J$=X$,e7=Z$,t7=W$,cE=2e3;function n7({open:e,onOpenChange:t}){const[r,a]=w.useState([]),[s,l]=w.useState(!0),c=w.useRef(null);w.useEffect(()=>{if(!e)return;let m=!1;EL(200).then(g=>{m||a(g.lines??[])}).catch(()=>{});const p=new EventSource(wL);return p.addEventListener("line",g=>{try{const h=JSON.parse(g.data);typeof h.line=="string"&&a(x=>{const v=[...x,h.line];return v.length>cE?v.slice(v.length-cE):v})}catch{}}),p.onerror=()=>{},()=>{m=!0,p.close()}},[e]),w.useEffect(()=>{s&&c.current&&(c.current.scrollTop=c.current.scrollHeight)},[r,s]);const f=async()=>{try{await navigator.clipboard.writeText(r.join(`
|
|
104
|
-
`)),De.success("Log copied to clipboard")}catch{De.error("Could not copy log")}};return d.jsxs(J$,{open:e,onOpenChange:t,className:"rounded-[var(--radius)] border border-border bg-panel",children:[d.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[d.jsxs(e7,{className:"flex items-center gap-1.5 text-[13px] font-medium text-ink",children:[d.jsx(og,{size:14,className:ht("transition-transform",e&&"rotate-90")}),"Engine log"]}),e&&d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("label",{className:"flex items-center gap-1.5 text-[12px] text-muted",children:[d.jsx(ON,{checked:s,onCheckedChange:l}),"Auto-scroll"]}),d.jsxs(je,{size:"sm",variant:"ghost",onClick:()=>{f()},children:[d.jsx(jd,{size:14})," Copy all"]})]})]}),d.jsx(t7,{children:d.jsx("div",{ref:c,className:"max-h-80 overflow-auto rounded-b-[var(--radius)] px-3 py-2 font-mono text-[12px] leading-[1.5]",style:{background:"var(--log-bg)",color:"var(--log-ink)"},children:r.length===0?d.jsx("span",{style:{color:"var(--log-faint)"},children:"No log output yet."}):r.map((m,p)=>d.jsx("div",{className:"whitespace-pre-wrap break-all",children:m},p))})})]})}const r7={cuda:"~550 MB",rocm:"~320 MB",sycl:"~110 MB",vulkan:"~40 MB",metal:"~11 MB",cpu:"~16 MB"};function uE(){const{data:e}=zr(),t=!!e?.engineProvision?.active,{data:r,isLoading:a}=dg(t),s=Zl();if(a||!r)return null;const l=t||s.backend.isPending||s.remove.isPending,c=r.gpus[0]?.name,f=p=>s.backend.mutate(p,{onError:g=>De.error(g instanceof qe?g.message:"Could not download backend.")}),m=(p,g)=>s.remove.mutate(p,{onSuccess:()=>De.success(`${g} removed`),onError:h=>De.error(h instanceof qe?h.message:"Could not delete backend.")});return d.jsx(d.Fragment,{children:r.backends.map(p=>d.jsxs("div",{className:"flex items-center gap-3 rounded-[var(--radius)] border border-border bg-panel p-4",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[d.jsx("span",{className:"text-sm font-semibold text-ink",children:p.label}),d.jsx(to,{variant:"default",children:"official"}),p.recommended&&d.jsxs("span",{className:"flex items-center gap-0.5 text-[11px] text-accent",children:[d.jsx(Bl,{size:10})," recommended"]})]}),d.jsx("div",{className:"mt-0.5 text-[12px] text-muted",children:p.installed?`Installed · ${c??"GPU detected"}`:`Not installed · ${r7[p.id]??"download to use"}`})]}),d.jsx("div",{className:"flex shrink-0 items-center gap-2",children:p.installed?d.jsxs(d.Fragment,{children:[d.jsxs("span",{className:"flex items-center gap-1 text-[12px] font-medium text-accent",children:[d.jsx(Jr,{size:13})," Installed"]}),d.jsx("button",{type:"button",disabled:l,onClick:()=>m(p.id,p.label),title:`Delete ${p.label}`,className:"grid h-8 w-8 place-items-center rounded border border-border text-faint transition-colors hover:border-[color:var(--err)] hover:text-[color:var(--err)] disabled:opacity-50",children:d.jsx(Za,{size:14})})]}):d.jsxs(je,{size:"sm",variant:"outline",disabled:l,onClick:()=>f(p.id),children:[t?d.jsx(Rr,{size:13,className:"animate-spin"}):d.jsx(bs,{size:13}),"Download"]})})]},p.id))})}function i7(){const{data:e}=zr(),t=!!e?.engineProvision?.active,{data:r,isLoading:a}=rI(t),s=Zl();if(a||!r)return null;const l=r.engines.filter(p=>p.id!=="llama.cpp"&&p.supportedHere);if(l.length===0)return null;const c=t||s.vllm.isPending||s.mlx.isPending||s.turboquant.isPending,f=p=>p.installEndpoint==="/api/v1/engines/vllm"?s.vllm:p.installEndpoint==="/api/v1/engines/mlx"?s.mlx:p.installEndpoint==="/api/v1/engines/turboquant"?s.turboquant:null,m=p=>{const g=f(p);g&&g.mutate(void 0,{onError:h=>De.error(h instanceof qe?h.message:`Could not install ${p.name}.`)})};return d.jsxs("section",{className:"flex flex-col gap-2",children:[d.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-faint",children:"Discover engines"}),l.map(p=>{const g=f(p),h=p.supportedHere&&!p.comingSoon&&!p.installed&&!!g,x=!!g?.isPending;return d.jsxs("div",{className:"flex items-start gap-3 rounded-[var(--radius)] border border-border bg-panel p-4",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[d.jsx("span",{className:"text-sm font-semibold text-ink",children:p.name}),p.support==="experimental"&&!p.comingSoon&&d.jsx(to,{variant:"mono",children:"experimental"}),p.comingSoon&&d.jsx(to,{variant:"mono",children:"coming soon"}),!p.supportedHere&&!p.comingSoon&&d.jsx("span",{className:"text-[11px] text-faint",children:"not available on this OS"}),d.jsxs("a",{href:p.homepage,target:"_blank",rel:"noreferrer",className:"flex items-center gap-0.5 text-[11px] text-muted hover:text-ink",title:p.homepage,children:[d.jsx(zl,{size:10})," docs"]})]}),d.jsx("div",{className:"mt-0.5 text-[12px] text-muted",children:p.description}),p.note&&d.jsx("div",{className:"mt-1 text-[11px] text-faint",children:p.note})]}),d.jsx("div",{className:"flex shrink-0 items-center gap-2 pt-0.5",children:p.installed?d.jsxs("span",{className:"flex items-center gap-1 text-[12px] font-medium text-accent",children:[d.jsx(Jr,{size:13})," Installed"]}):d.jsxs(je,{size:"sm",variant:"outline",disabled:!h||c,onClick:()=>m(p),title:p.comingSoon?"Not yet available":p.supportedHere?`Install ${p.name}`:"Not supported on this operating system",children:[x?d.jsx(Rr,{size:13,className:"animate-spin"}):d.jsx(bs,{size:13}),p.comingSoon?"Coming soon":"Install"]})})]},p.id)})]})}function a7(){const{data:e}=zr(),t=!!e?.engineProvision?.active,{data:r}=dg(t),a=Zl();if(!r?.mlx.supported)return null;const s=r.mlx,l=t||a.mlx.isPending;return d.jsxs("div",{className:"flex items-center gap-3 rounded-[var(--radius)] border border-border bg-panel p-4",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm font-semibold text-ink",children:"MLX"}),d.jsx(to,{variant:"default",children:"Apple Silicon"})]}),d.jsx("div",{className:"mt-0.5 text-[12px] text-muted",children:s.installed?"Installed · Apple Metal":"Apple-native inference · installs mlx-lm via uv"})]}),s.installed?d.jsxs("span",{className:"flex items-center gap-1 text-[12px] font-medium text-accent",children:[d.jsx(Jr,{size:13})," Installed"]}):d.jsxs(je,{size:"sm",variant:"outline",disabled:l,onClick:()=>a.mlx.mutate(void 0,{onError:c=>De.error(c instanceof qe?c.message:"Could not install MLX.")}),children:[l&&a.mlx.isPending?d.jsx(Rr,{size:13,className:"animate-spin"}):d.jsx(bs,{size:13}),"Install"]})]})}const dE=e=>/[\\/]engines[\\/]llama\.cpp-/.test(e);function o7(){const e=nS(),{data:t}=zr(),r=!!t?.engineProvision?.active,a=dg(r),s=ji(S=>S.logPanelOpen),l=ji(S=>S.setLogPanelOpen),c=e.data,f=c?.activeEngineId??"",m=c?.engines.find(S=>S.id===f)??null,p=(c?.engines??[]).filter(S=>S.kind!=="mlx"&&!dE(S.binPath)),[g,h]=w.useState(null),x=m?m.kind==="mlx"?"mlx":dE(m.binPath)?"official":`custom:${m.id}`:"official",v=g??x,E=v.startsWith("custom:")?p.find(S=>`custom:${S.id}`===v)??null:null;return d.jsxs("div",{className:"w-full px-6 py-6",children:[d.jsx(Xd,{title:"Engines",description:"Pick an engine and its build above. The list below is for downloading and managing them.",actions:d.jsx(O$,{})}),d.jsxs("div",{className:"flex flex-col gap-4",children:[m&&d.jsx(B$,{status:t,activeEngineName:m.name}),d.jsx(z$,{}),d.jsxs("div",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsxs("div",{className:"mb-3",children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"Active engine"}),d.jsx("div",{className:"text-[12px] text-muted",children:"One build runs at a time — pick the engine, then its build."})]}),d.jsx(I$,{list:c,backends:a.data,provisioning:r,selectedKey:v,onSelect:h})]}),e.isLoading?d.jsxs("section",{className:"flex flex-col gap-2",children:[d.jsx(Ml,{className:"h-16 w-full"}),d.jsx(Ml,{className:"h-16 w-full"}),d.jsx(Ml,{className:"h-16 w-full"})]}):e.isError?d.jsx(eo,{message:e.error instanceof qe?e.error.message:"Could not load engines.",onRetry:()=>{e.refetch()}}):d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-faint",children:v==="official"?"Available llama.cpp builds":E?`${E.name} · build`:"Available builds"}),v==="official"?d.jsx(uE,{}):v==="mlx"?d.jsx(a7,{}):E?d.jsx(j$,{engine:E}):d.jsx(uE,{})]}),d.jsx(i7,{}),m&&d.jsx(n7,{open:s,onOpenChange:l})]})]})}const Ah=window.location.origin,s7=[{method:"POST",path:"/v1/chat/completions",desc:"OpenAI Chat Completions"},{method:"POST",path:"/v1/messages",desc:"Anthropic Messages"},{method:"GET",path:"/v1/models",desc:"OpenAI Models List"},{method:"GET",path:"/api/v1/status",desc:"Daemon Status"},{method:"GET",path:"/api/v1/engines",desc:"Engine Registry"},{method:"GET",path:"/api/v1/models",desc:"Model Library"},{method:"GET",path:"/api/v1/keys",desc:"API Keys"}],l7=[{id:"claude-code",name:"Claude Code",desc:"Anthropic-compatible endpoint — the hero demo"},{id:"opencode",name:"opencode",desc:"OpenAI-compatible, AI SDK provider config"},{id:"kilo",name:"Kilo Code",desc:"OpenAI-compatible, kilo.jsonc provider entry"},{id:"qwen",name:"Qwen Code",desc:"OpenAI-compatible (OPENAI_BASE_URL)"}];function c7(){return d.jsxs("div",{className:"w-full px-6 py-6",children:[d.jsx(Xd,{title:"Developer",description:"Server URLs, API endpoints, keys, and CLI setup."}),d.jsxs("div",{className:"flex flex-col gap-6",children:[d.jsx(u7,{}),d.jsx(d7,{}),d.jsx(f7,{}),d.jsx(p7,{})]})]})}function u7(){return d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[d.jsx(aj,{size:15,className:"text-accent"}),d.jsx("h2",{className:"text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Server"})]}),d.jsxs("div",{className:"flex items-center justify-between py-1",children:[d.jsx("span",{className:"text-[13px] text-muted",children:"Local URL"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("code",{className:"font-mono text-[13px] text-ink",children:Ah}),d.jsx(ib,{text:Ah})]})]})]})}function d7(){const{query:e,create:t,revoke:r}=dI(),[a,s]=w.useState(""),[l,c]=w.useState(null),f=e.data?.keys??[],m=()=>{const g=a.trim();g&&t.mutate(g,{onSuccess:h=>{s(""),c(h.key)},onError:h=>De.error(h instanceof qe?h.message:"Could not create key.")})},p=(g,h)=>{r.mutate(g,{onSuccess:()=>{l?.startsWith(h)&&c(null)},onError:x=>De.error(x instanceof qe?x.message:"Could not revoke key.")})};return d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[d.jsx(dj,{size:15,className:"text-accent"}),d.jsx("h2",{className:"text-[13px] font-semibold uppercase tracking-wide text-faint",children:"API Keys"})]}),l&&d.jsxs("div",{className:"mb-4 rounded-md border p-3",style:{borderColor:"var(--ok)",background:"color-mix(in srgb, var(--ok) 8%, transparent)"},children:[d.jsx("p",{className:"mb-1.5 text-[12px] font-medium",style:{color:"var(--ok)"},children:"Key created — copy it now, it won't be shown again."}),d.jsxs("div",{className:"flex items-center gap-2 rounded border border-border bg-bg px-2 py-1.5",children:[d.jsx("code",{className:"min-w-0 flex-1 break-all font-mono text-[12px] text-ink",children:l}),d.jsx(ib,{text:l})]})]}),f.length===0&&!l&&d.jsx("p",{className:"mb-3 text-[13px] text-faint",children:"No API keys yet."}),f.length>0&&d.jsx("div",{className:"mb-3 divide-y divide-border rounded-md border border-border",children:f.map(g=>d.jsxs("div",{className:"flex items-center justify-between px-3 py-2.5",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-[13px] font-medium text-ink",children:g.name}),d.jsxs("span",{className:"ml-2 font-mono text-[11px] text-faint",children:[g.prefix,"…"]})]}),d.jsx("button",{type:"button",onClick:()=>p(g.id,g.prefix),className:"rounded p-1 text-faint transition-colors hover:text-err",title:"Revoke key",children:d.jsx(Za,{size:14})})]},g.id))}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{value:a,onChange:g=>s(g.target.value),placeholder:"Key name (e.g. claude-code)",className:"flex-1 rounded-md border border-border bg-bg px-2.5 py-1.5 text-[13px] text-ink outline-none placeholder:text-faint focus:border-[color:var(--accent)]",onKeyDown:g=>g.key==="Enter"&&m()}),d.jsxs(je,{size:"sm",onClick:m,disabled:!a.trim()||t.isPending,children:[d.jsx(Yw,{size:13}),t.isPending?"Creating…":"Create"]})]})]})}function f7(){return d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsx("h2",{className:"mb-3 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Available APIs"}),d.jsx("div",{className:"divide-y divide-border rounded-md border border-border",children:s7.map(({method:e,path:t,desc:r})=>d.jsxs("div",{className:"flex items-center gap-3 px-3 py-2",children:[d.jsx("span",{className:"w-10 shrink-0 rounded px-1 py-0.5 text-center font-mono text-[10px] font-bold uppercase",style:{background:e==="GET"?"color-mix(in srgb, var(--ok) 15%, transparent)":"color-mix(in srgb, var(--accent) 15%, transparent)",color:e==="GET"?"var(--ok)":"var(--accent)"},children:e}),d.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[13px] text-ink",children:t}),d.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted sm:block",children:r}),d.jsx(ib,{text:`${Ah}${t}`})]},t))})]})}function p7(){return d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[d.jsx(Yj,{size:15,className:"text-accent"}),d.jsx("h2",{className:"text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Connect a CLI"})]}),d.jsx("div",{className:"flex flex-col gap-2.5",children:l7.map(e=>d.jsx(m7,{cli:e},e.id))})]})}function m7({cli:e}){const[t,r]=w.useState(null),[a,s]=w.useState(!1),[l,c]=w.useState(!1),f=()=>{if(l){c(!1);return}if(t){c(!0);return}s(!0),KL(e.id).then(m=>{r(m),c(!0)}).catch(()=>De.error("Could not fetch setup snippets.")).finally(()=>s(!1))};return d.jsxs("div",{className:"rounded-md border border-border bg-bg",children:[d.jsxs("div",{className:"flex items-center justify-between px-3 py-2.5",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-[13px] font-semibold text-ink",children:e.name}),d.jsx("span",{className:"ml-2 text-[11px] text-muted",children:e.desc})]}),d.jsx(je,{size:"sm",variant:l?"outline":"default",onClick:f,disabled:a,children:a?"Loading…":l?"Hide":"Get setup"})]}),l&&t&&d.jsx("div",{className:"flex flex-col gap-2.5 border-t border-border px-3 pb-3 pt-2.5",children:t.steps.map((m,p)=>d.jsx(h7,{step:m},p))})]})}function h7({step:e}){const[t,r]=w.useState(!1),a=()=>{navigator.clipboard.writeText(e.snippet).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return d.jsxs("div",{children:[d.jsx("div",{className:"mb-1 text-[11px] text-faint",children:e.label}),d.jsxs("div",{className:"relative rounded border border-border bg-panel-2",children:[d.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-all px-3 py-2 pr-10 font-mono text-[12px] leading-relaxed text-ink",children:e.snippet}),d.jsx("button",{type:"button",onClick:a,title:"Copy",className:"absolute right-2 top-2 rounded p-1 text-muted transition-colors hover:text-ink",children:t?d.jsx(Jr,{size:13,className:"text-green-500"}):d.jsx(jd,{size:13})})]})]})}function ib({text:e}){const[t,r]=w.useState(!1),a=()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return d.jsx("button",{type:"button",onClick:a,className:"shrink-0 rounded p-1 text-faint transition-colors hover:text-ink",title:"Copy",children:t?d.jsx(Jr,{size:13,style:{color:"var(--ok)"}}):d.jsx(jd,{size:13})})}const g7=!1,fE="tllm.thinkingEnabled.default";function es({value:e,min:t,max:r,step:a,onCommit:s,className:l,ariaLabel:c}){const[f,m]=w.useState(String(e));w.useEffect(()=>{m(String(e))},[e]);const p=g=>{let h=g;return t!=null&&(h=Math.max(t,h)),r!=null&&(h=Math.min(r,h)),h};return d.jsx("input",{type:"number",inputMode:"numeric","aria-label":c,min:t,max:r,step:a,value:f,onChange:g=>{const h=g.target.value;if(m(h),h.trim()==="")return;const x=Number(h);Number.isFinite(x)&&s(x)},onBlur:()=>{const g=Number(f),h=f.trim()===""||!Number.isFinite(g)?e:p(g);m(String(h)),s(h)},onKeyDown:g=>{g.key==="Enter"&&g.target.blur()},className:l})}const qm=(e,t,r)=>Math.max(t,Math.min(r,Math.round(e)));function b7(){const{theme:e,setTheme:t}=ji(),{query:r,save:a}=rS(),s=r.data,[l,c]=w.useState(60),[f,m]=w.useState(6996),[p,g]=w.useState(!0),[h,x]=w.useState(!0),[v,E]=w.useState(!1),[S,N]=w.useState(8192),[k,M]=w.useState(99),[R,O]=w.useState(0),[P,D]=w.useState(0),[U,B]=w.useState("off"),[J,F]=w.useState(!1),[ae,ee]=w.useState(!0),[ce,te]=w.useState(!1),[Q,j]=w.useState(()=>localStorage.getItem(fE)!=="false"),[V,Z]=w.useState(!1);w.useEffect(()=>{s&&(c(s.idleTtlMinutes),m(s.port??6996),g(s.autoGenerateTitles),x(s.openBrowserOnStart),E(s.autoLoadOnStart??!1),N(s.modelDefaults?.ctx??8192),M(s.modelDefaults?.ngl??99),O(s.modelDefaults?.imageMaxTokens??0),D(s.modelDefaults?.maxTokens??0),B(s.telemetryLevel??"off"),F(s.lanBind??!1),ee(s.requireApiKey??!0),te(s.comfyui?.enabled??!1))},[s]),w.useEffect(()=>{localStorage.setItem(fE,Q?"true":"false")},[Q]);const ie=()=>({idleTtlMinutes:qm(l,0,1440),port:qm(f,1024,65535),autoGenerateTitles:p,openBrowserOnStart:h,autoLoadOnStart:v,telemetryLevel:U,lanBind:J,requireApiKey:ae,modelDefaults:{ctx:Math.max(256,Math.round(S)),ngl:qm(k,0,99),imageMaxTokens:Math.max(0,Math.round(R)),maxTokens:Math.max(0,Math.round(P))},comfyui:{enabled:ce}}),T=()=>{a.mutate(ie(),{onSuccess:q=>{const A=q.rebind;A?.portChanged?(De.success(`Port changed to ${A.port} — reconnecting…`),setTimeout(()=>{const $=new URL(window.location.href);$.port=String(A.port),window.location.href=$.toString()},1300)):A?De.success(A.lanBind?"LAN access enabled — applied (no restart needed)":"LAN access disabled — applied"):De.success("Settings saved")},onError:q=>De.error(q instanceof qe?q.message:"Could not save settings.")})},I=()=>{a.mutate(ie(),{onSuccess:()=>Z(!0),onError:q=>De.error(q instanceof qe?q.message:"Could not save settings before restart.")})};return d.jsxs("div",{className:"w-full px-6 py-6",children:[d.jsx(Xd,{title:"Settings",description:"Configure TurboLLM behavior and appearance."}),V&&d.jsx(S7,{onDismiss:()=>Z(!1)}),d.jsxs("div",{className:"flex flex-col gap-6",children:[d.jsx(y7,{}),d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsx("h2",{className:"mb-3 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Appearance"}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"Theme"}),d.jsx("div",{className:"text-[12px] text-muted",children:"Choose light, dark, or follow your system setting"})]}),d.jsx("div",{className:"flex overflow-hidden rounded-lg border border-border",children:[{value:"light",label:"Light",Icon:Qj},{value:"system",label:"System",Icon:Ej},{value:"dark",label:"Dark",Icon:Sj}].map(({value:q,label:A,Icon:$})=>d.jsxs("button",{type:"button",onClick:()=>t(q),className:"flex items-center gap-1.5 px-3 py-2 text-[13px] transition-colors",style:{background:e===q?"var(--accent)":"transparent",color:e===q?"var(--on-accent)":"var(--muted)"},children:[d.jsx($,{size:14}),A]},q))})]}),d.jsxs("label",{className:"mt-2 flex cursor-pointer items-center justify-between border-t border-border py-2 pt-3",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"Enable thinking by default"}),d.jsx("div",{className:"text-[12px] text-muted",children:"Let reasoning models think before answering in new chats (you can toggle it per chat). Off = answer directly, faster."})]}),d.jsx("input",{type:"checkbox",checked:Q,onChange:q=>j(q.target.checked),className:"h-4 w-4 accent-[var(--accent)]"})]})]}),d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsx("h2",{className:"mb-3 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Engine"}),d.jsxs("div",{className:"flex items-center justify-between py-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"Idle timeout"}),d.jsx("div",{className:"text-[12px] text-muted",children:"Unload model after this many minutes of inactivity (0 = never)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(es,{value:l,min:0,max:1440,onCommit:c,ariaLabel:"Idle timeout in minutes",className:"w-20 rounded-md border border-border bg-bg px-2 py-1 text-right text-[13px] text-ink outline-none"}),d.jsx("span",{className:"text-[12px] text-muted",children:"min"})]})]})]}),d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsx("h2",{className:"mb-1 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Model Defaults"}),d.jsx("p",{className:"mb-3 text-[12px] text-muted",children:"Applied the first time a model is loaded. A model's own saved settings always override these."}),d.jsxs("div",{className:"flex items-center justify-between py-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"Context length"}),d.jsx("div",{className:"text-[12px] text-muted",children:"Default context window, capped at each model's native max"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(es,{value:S,min:256,step:512,onCommit:N,ariaLabel:"Default context length",className:"w-24 rounded-md border border-border bg-bg px-2 py-1 text-right text-[13px] text-ink outline-none"}),d.jsx("span",{className:"text-[12px] text-muted",children:"tok"})]})]}),d.jsxs("div",{className:"flex items-center justify-between py-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"GPU layers"}),d.jsx("div",{className:"text-[12px] text-muted",children:"Layers to offload to the GPU (99 = all); ignored on CPU-only machines"})]}),d.jsx("div",{className:"flex items-center gap-2",children:d.jsx(es,{value:k,min:0,max:99,onCommit:M,ariaLabel:"Default GPU layers",className:"w-20 rounded-md border border-border bg-bg px-2 py-1 text-right text-[13px] text-ink outline-none"})})]}),d.jsxs("div",{className:"flex items-center justify-between py-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"Image max tokens"}),d.jsx("div",{className:"text-[12px] text-muted",children:"Per-image token budget for vision models (0 = engine default)"})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(es,{value:R,min:0,step:256,onCommit:O,ariaLabel:"Image max tokens",className:"w-24 rounded-md border border-border bg-bg px-2 py-1 text-right text-[13px] text-ink outline-none"}),d.jsx("span",{className:"text-[12px] text-muted",children:"tok"})]})]}),d.jsxs("div",{className:"flex items-center justify-between py-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"Max response tokens"}),d.jsx("div",{className:"text-[12px] text-muted",children:"Hard cap on tokens generated per reply (0 = unlimited). Also caps Claude Code / API requests."})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(es,{value:P,min:0,step:256,onCommit:D,ariaLabel:"Max response tokens",className:"w-24 rounded-md border border-border bg-bg px-2 py-1 text-right text-[13px] text-ink outline-none"}),d.jsx("span",{className:"text-[12px] text-muted",children:"tok"})]})]})]}),d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsx("h2",{className:"mb-3 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Chat"}),d.jsxs("label",{className:"flex cursor-pointer items-center justify-between py-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"Auto-generate chat titles"}),d.jsx("div",{className:"text-[12px] text-muted",children:"Uses the model to create a title after the first exchange"})]}),d.jsx("input",{type:"checkbox",checked:p,onChange:q=>g(q.target.checked),className:"h-4 w-4 accent-[var(--accent)]"})]})]}),d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsx("h2",{className:"mb-3 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Startup"}),d.jsxs("label",{className:"flex cursor-pointer items-center justify-between py-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"Open browser on start"}),d.jsx("div",{className:"text-[12px] text-muted",children:"Automatically open the UI when the daemon starts"})]}),d.jsx("input",{type:"checkbox",checked:h,onChange:q=>x(q.target.checked),className:"h-4 w-4 accent-[var(--accent)]"})]}),d.jsxs("label",{className:"flex cursor-pointer items-center justify-between py-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"Auto-load last model"}),d.jsx("div",{className:"text-[12px] text-muted",children:"Reload the last-used model automatically when the daemon starts"})]}),d.jsx("input",{type:"checkbox",checked:v,onChange:q=>E(q.target.checked),className:"h-4 w-4 accent-[var(--accent)]"})]})]}),d.jsx(x7,{enabled:ce,setEnabled:te,gatePath:s?.comfyui?.gatePath??""}),d.jsx(v7,{lanBind:J,setLanBind:F,requireApiKey:ae,setRequireApiKey:ee,port:f,setPort:m}),d.jsx(E7,{tokenSet:s?.hfTokenSet??!1,onSaved:()=>{r.refetch()}}),g7,d.jsx(_7,{}),d.jsx("div",{className:"flex justify-end",children:d.jsxs(je,{onClick:T,disabled:a.isPending||r.isLoading,children:[d.jsx(Zw,{size:14}),a.isPending?"Saving…":"Save settings"]})}),d.jsx(w7,{onRestart:I}),d.jsx(k7,{})]})]})}function y7(){const e=wd(),{data:t}=zr(),r=Jl(),a=ji(c=>c.setPendingConversationId),s=t?.engine.state==="running"&&!!t?.model,l=()=>{s&&r.createExpert.mutate(void 0,{onSuccess:c=>{a(c.id),e("/chat")},onError:c=>De.error(c instanceof qe?c.message:"Could not launch the Expert assistant.")})};return d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsx("h2",{className:"mb-1 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"TurboLLM Expert"}),d.jsx("p",{className:"mb-3 text-[12px] text-muted",children:"Chat with a built-in assistant that knows TurboLLM — it can explain features, help configure engines, models, and settings, and troubleshoot. Runs on your loaded model."}),s?d.jsxs(je,{onClick:l,disabled:r.createExpert.isPending,children:[d.jsx(Bl,{size:14}),r.createExpert.isPending?"Launching…":"Launch Expert"]}):d.jsxs("div",{className:"flex items-start gap-2 rounded-md border p-2.5 text-[12px]",style:{borderColor:"color-mix(in srgb, var(--accent) 40%, var(--border))",background:"color-mix(in srgb, var(--accent) 6%, transparent)"},children:[d.jsx(Bl,{size:14,className:"mt-0.5 shrink-0",style:{color:"var(--accent)"}}),d.jsxs("div",{className:"text-muted",children:["Load a model first to chat with the Expert assistant. Pick one on the"," ",d.jsx("button",{type:"button",onClick:()=>e("/models"),className:"font-medium text-ink underline-offset-2 hover:underline",children:"Models"})," ","screen."]})]})]})}function x7({enabled:e,setEnabled:t,gatePath:r}){const{data:a}=zr(),{install:s,uninstall:l}=lI(),[c,f]=w.useState(""),m=a?.comfyui,p=!!r,g=r.replace(/[\\/]turbollm_gate[\\/]?$/,""),h=E=>{if(!E.trim()){De.error("Enter the path to your ComfyUI folder first.");return}s.mutate(E.trim(),{onSuccess:S=>{De.success(`Gate installed at ${S.path}. ${S.note??""}`.trim()),f("")},onError:S=>De.error(S instanceof qe?S.message:"Could not install the gate node.")})},x=()=>{l.mutate(void 0,{onSuccess:()=>De.success("ComfyUI gate removed."),onError:E=>De.error(E instanceof qe?E.message:"Could not remove the gate node.")})},v=m?.enabled?m.installed?m.held?{color:"var(--warn)",text:"ComfyUI is rendering — the model is unloaded and loads are paused."}:m.lastSignalAgoMs==null?{color:"var(--muted)",text:"Installed. Restart ComfyUI, then run a job to connect."}:{color:"var(--ok)",text:`ComfyUI idle — connected (last signal ${Math.round(m.lastSignalAgoMs/1e3)}s ago).`}:{color:"var(--muted)",text:"Install the gate node in ComfyUI to activate this."}:null;return d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsx("h2",{className:"mb-1 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"ComfyUI"}),d.jsx("p",{className:"mb-3 text-[12px] text-muted",children:"Share the GPU with ComfyUI. The instant ComfyUI starts a render, TurboLLM unloads its model and pauses new loads so they don't fight over VRAM — then reloads the model when ComfyUI's queue is empty. This needs a small one-time setup node installed in ComfyUI."}),d.jsxs("label",{className:"flex cursor-pointer items-center justify-between py-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"Pause for ComfyUI"}),d.jsx("div",{className:"text-[12px] text-muted",children:"Unload the model and block loads while ComfyUI renders (Save to apply)"})]}),d.jsx("input",{type:"checkbox",checked:e,onChange:E=>t(E.target.checked),className:"h-4 w-4 accent-[var(--accent)]"})]}),e&&d.jsxs("div",{className:"mt-2 flex flex-col gap-3 border-t border-border pt-3",children:[d.jsx("div",{className:"text-[13px] font-medium text-ink",children:"One-time setup"}),p?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"text-[12px] text-muted",children:[d.jsxs("span",{className:"inline-flex items-center gap-1.5 text-ink",children:[d.jsx(Jr,{size:13,style:{color:"var(--ok)"}})," Gate installed"]}),d.jsx("div",{className:"mt-1 break-all font-mono text-[11px] text-faint",children:r})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(je,{variant:"outline",size:"sm",onClick:()=>h(g),disabled:s.isPending,children:[s.isPending?d.jsx(Rr,{size:13,className:"animate-spin"}):d.jsx(Xl,{size:13}),"Reinstall / update"]}),d.jsxs(je,{variant:"outline",size:"sm",onClick:x,disabled:l.isPending,children:[l.isPending?d.jsx(Rr,{size:13,className:"animate-spin"}):d.jsx(ei,{size:13}),"Remove"]})]}),d.jsx("div",{className:"text-[12px] text-faint",children:"Restart ComfyUI after installing or updating for the gate to take effect."})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"text-[12px] text-muted",children:["Enter your ComfyUI folder (the one containing ",d.jsx("span",{className:"font-mono",children:"custom_nodes"}),"), or the",d.jsx("span",{className:"font-mono",children:" custom_nodes"})," folder itself. TurboLLM writes the gate node there, wired to this daemon."]}),d.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[d.jsx("input",{type:"text",value:c,onChange:E=>f(E.target.value),placeholder:"e.g. D:\\\\ComfyUI_windows_portable\\\\ComfyUI",spellCheck:!1,autoComplete:"off",onKeyDown:E=>{E.key==="Enter"&&h(c)},className:"flex-1 rounded-md border border-border bg-bg px-2 py-1.5 font-mono text-[12px] text-ink outline-none"}),d.jsx(je,{size:"sm",onClick:()=>h(c),disabled:s.isPending||!c.trim(),children:s.isPending?d.jsx(Rr,{size:13,className:"animate-spin"}):"Install gate"})]})]}),v&&d.jsxs("div",{className:"flex items-center gap-2 border-t border-border pt-3 text-[12px] text-muted",children:[d.jsx("span",{className:"inline-block h-2 w-2 shrink-0 rounded-full",style:{background:v.color}}),v.text]})]})]})}function v7({lanBind:e,setLanBind:t,requireApiKey:r,setRequireApiKey:a,port:s,setPort:l}){const{data:c}=sI(),f=c?.lanUrl??"",m=c?.hasApiKey??!1;return d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsx("h2",{className:"mb-3 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Network"}),d.jsxs("div",{className:"flex items-center justify-between py-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"Port"}),d.jsx("div",{className:"text-[12px] text-muted",children:"Port the daemon listens on (1024–65535)"})]}),d.jsx(es,{value:s,min:1024,max:65535,onCommit:l,ariaLabel:"Daemon port",className:"w-24 rounded-md border border-border bg-bg px-2 py-1 text-right text-[13px] text-ink outline-none"})]}),d.jsxs("label",{className:"flex cursor-pointer items-center justify-between py-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"Expose on local network (LAN)"}),d.jsx("div",{className:"text-[12px] text-muted",children:"Allow other devices on your network to reach the API"})]}),d.jsx("input",{type:"checkbox",checked:e,onChange:p=>t(p.target.checked),className:"h-4 w-4 accent-[var(--accent)]"})]}),e&&d.jsxs("div",{className:"mt-2 flex flex-col gap-3 border-t border-border pt-3",children:[f&&d.jsxs("div",{className:"text-[13px]",children:[d.jsx("span",{className:"text-muted",children:"LAN URL: "}),d.jsx("span",{className:"font-mono text-ink",children:f})]}),d.jsxs("label",{className:"flex cursor-pointer items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"Require an API key"}),d.jsx("div",{className:"text-[12px] text-muted",children:"When off, any device on your network can use this TurboLLM with no key"})]}),d.jsx("input",{type:"checkbox",checked:r,onChange:p=>a(p.target.checked),className:"h-4 w-4 accent-[var(--accent)]"})]}),d.jsxs("div",{className:"flex items-start gap-2 rounded-md border p-2.5 text-[12px]",style:{borderColor:"color-mix(in srgb, var(--warn) 40%, var(--border))",background:"color-mix(in srgb, var(--warn) 8%, transparent)"},children:[d.jsx(Jw,{size:14,className:"mt-0.5 shrink-0",style:{color:"var(--warn)"}}),d.jsx("div",{className:"text-muted",children:r?d.jsxs(d.Fragment,{children:["Other devices can reach the API, but a valid API key is required.",!m&&d.jsxs(d.Fragment,{children:[" ","No API key exists yet — create one on the"," ",d.jsx("span",{className:"font-medium text-ink",children:"Developer"})," screen."]})]}):d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"font-medium text-ink",children:"Open access:"})," any device on your network can use this TurboLLM with no key. Only enable this on a network you trust."]})})]})]}),d.jsxs("div",{className:"mt-2 border-t border-border pt-3 text-[12px] text-faint",children:["Click ",d.jsx("span",{className:"font-medium text-ink",children:"Save settings"})," to apply. The listener re-binds in place (no restart, model stays loaded); a port change reconnects this page automatically."]})]})}function E7({tokenSet:e,onSaved:t}){const{query:r,save:a}=rS(),s=mI(),[l,c]=w.useState(""),[f,m]=w.useState(null),p=x=>{c(x),m(null)},g=()=>{l.trim()&&s.mutate(l.trim(),{onSuccess:x=>m(x),onError:()=>m({ok:!1})})},h=()=>{a.mutate({hfToken:l.trim()},{onSuccess:()=>{De.success(l.trim()?"Hugging Face token saved":"Hugging Face token cleared"),c(""),m(null),t()},onError:x=>De.error(x instanceof qe?x.message:"Could not save the token.")})};return d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsx("h2",{className:"mb-1 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Models"}),d.jsxs("p",{className:"mb-3 text-[12px] text-muted",children:["A Hugging Face access token lets you download gated models (e.g. Llama). Accept the model's license on huggingface.co, then paste a read token here."," ",d.jsx("a",{href:"https://huggingface.co/settings/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-ink underline-offset-2 hover:underline",children:"Create a token"}),"."]}),d.jsx("div",{className:"flex items-center justify-between py-1",children:d.jsx("div",{className:"text-[13px] text-muted",children:e?d.jsxs("span",{className:"inline-flex items-center gap-1.5 text-ink",children:[d.jsx(Jr,{size:13,style:{color:"var(--ok)"}}),"A token is configured"]}):"No token configured"})}),d.jsxs("div",{className:"mt-1 flex flex-col gap-2 sm:flex-row sm:items-center",children:[d.jsx("input",{type:"password",value:l,onChange:x=>p(x.target.value),placeholder:e?"Enter a new token to replace the current one":"hf_…",autoComplete:"off",className:"flex-1 rounded-md border border-border bg-bg px-2 py-1.5 font-mono text-[13px] text-ink outline-none"}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(je,{variant:"outline",size:"sm",onClick:g,disabled:!l.trim()||s.isPending,children:s.isPending?d.jsx(Rr,{size:13,className:"animate-spin"}):"Test"}),d.jsx(je,{size:"sm",onClick:h,disabled:a.isPending||r.isFetching,children:l.trim()?"Save token":"Clear token"})]})]}),f&&d.jsx("div",{className:"mt-2 text-[12px]",children:f.ok?d.jsxs("span",{className:"inline-flex items-center gap-1.5",style:{color:"var(--ok)"},children:[d.jsx(Jr,{size:13}),"Valid",f.name?` — signed in as ${f.name}`:""]}):d.jsxs("span",{className:"inline-flex items-center gap-1.5",style:{color:"var(--err)"},children:[d.jsx(ei,{size:13}),"Invalid or unauthorized token"]})})]})}function w7({onRestart:e}){return d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsx("h2",{className:"mb-1 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Advanced"}),d.jsx("p",{className:"mb-3 text-[12px] text-muted",children:"Restart the daemon to apply a new port or LAN binding without killing the terminal. Any loaded model is unloaded by a restart and must be reloaded afterward."}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[14px] font-medium text-ink",children:"Restart daemon"}),d.jsx("div",{className:"text-[12px] text-muted",children:"Stops the engine, then re-launches the daemon process"})]}),d.jsxs(je,{variant:"outline",size:"sm",onClick:e,children:[d.jsx(Xl,{size:13}),"Restart daemon"]})]})]})}function S7({onDismiss:e}){const t=cI(),[r,a]=w.useState("restarting"),s=w.useRef(!1);return w.useEffect(()=>{if(s.current)return;s.current=!0;let l=!1,c,f;const m=async()=>{if(!l){try{if((await fetch("/api/v1/status",{headers:{Accept:"application/json"}})).ok){l||window.location.reload();return}}catch{}l||(c=setTimeout(m,700))}};return t.mutate(void 0,{onSuccess:()=>{c=setTimeout(m,700),f=setTimeout(()=>{l||a("failed")},2e4)},onError:p=>{l||(a("failed"),De.error(p instanceof qe?p.message:"Could not restart the daemon."))}}),()=>{l=!0,c&&clearTimeout(c),f&&clearTimeout(f)}},[]),d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-bg/90 backdrop-blur-sm",children:d.jsx("div",{className:"flex max-w-sm flex-col items-center gap-3 rounded-lg border border-border bg-panel p-6 text-center",children:r==="restarting"?d.jsxs(d.Fragment,{children:[d.jsx(Rr,{size:28,className:"animate-spin",style:{color:"var(--accent)"}}),d.jsx("div",{className:"text-[15px] font-medium text-ink",children:"Restarting daemon…"}),d.jsx("div",{className:"text-[12px] text-muted",children:"Applying your changes. The page will reload automatically when the daemon is back."})]}):d.jsxs(d.Fragment,{children:[d.jsx(Jw,{size:28,style:{color:"var(--warn)"}}),d.jsx("div",{className:"text-[15px] font-medium text-ink",children:"Daemon is taking a while"}),d.jsx("div",{className:"text-[12px] text-muted",children:"It may have moved to a new port. Try reloading, or check the terminal where you started TurboLLM."}),d.jsxs("div",{className:"mt-1 flex gap-2",children:[d.jsx(je,{variant:"outline",size:"sm",onClick:e,children:"Dismiss"}),d.jsx(je,{size:"sm",onClick:()=>window.location.reload(),children:"Reload now"})]})]})})})}function _7(){const{data:e,isLoading:t}=Bd();return d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsx("h2",{className:"mb-3 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Hardware"}),t||!e?d.jsx("p",{className:"text-[13px] text-faint",children:"Detecting hardware…"}):d.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-6 gap-y-1.5",children:[e.gpus.length>0?e.gpus.map((r,a)=>d.jsx(Nl,{label:e.gpus.length>1?`GPU ${a+1}`:"GPU",value:`${r.name}${r.vramMb>0?` · ${(r.vramMb/1e3).toFixed(1)} GB VRAM`:""}`},a)):d.jsx(Nl,{label:"GPU",value:"None detected (CPU-only)"}),d.jsx(Nl,{label:"CPU",value:`${e.cpu||"Unknown"} · ${e.cores} cores`}),d.jsx(Nl,{label:"RAM",value:`${(e.ramMB/1e3).toFixed(1)} GB`}),d.jsx(Nl,{label:"OS",value:e.os})]})]})}function Nl({label:e,value:t}){return d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"text-[13px] text-muted",children:e}),d.jsx("dd",{className:"text-[13px] text-ink",children:t})]})}function k7(){return d.jsxs("section",{className:"rounded-lg border border-border bg-panel p-4",children:[d.jsx("h2",{className:"mb-3 text-[13px] font-semibold uppercase tracking-wide text-faint",children:"Help"}),d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsxs("a",{href:"https://github.com/bramha-dev/turbollm/issues/new",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-[13px] text-muted hover:text-ink transition-colors",children:[d.jsx(zl,{size:13}),"Report a bug"]}),d.jsxs("a",{href:"https://github.com/bramha-dev/turbollm/discussions",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-[13px] text-muted hover:text-ink transition-colors",children:[d.jsx(zl,{size:13}),"Send feedback"]})]})]})}function N7(){const e=zr(),t=kn(),[r,a]=w.useState(0),s=w.useRef(0);w.useEffect(()=>{e.isSuccess?a(0):e.isError&&e.errorUpdatedAt!==s.current&&(s.current=e.errorUpdatedAt,a(p=>p+1))},[e.isSuccess,e.isError,e.dataUpdatedAt,e.errorUpdatedAt]);const l=e.isSuccess,c=e.isError&&e.error instanceof qe&&e.error.status===401,f=!c&&r>=3,m=e.data?.version?`v${e.data.version}`:"v0.0.0-dev";return d.jsxs(mD,{delayDuration:300,children:[d.jsx(xI,{status:e.data,online:l,version:m,children:d.jsxs(MR,{children:[d.jsx(Ka,{path:"/chat",element:d.jsx(DH,{})}),d.jsx(Ka,{path:"/models",element:d.jsx(v$,{})}),d.jsx(Ka,{path:"/engines",element:d.jsx(o7,{})}),d.jsx(Ka,{path:"/developer",element:d.jsx(c7,{})}),d.jsx(Ka,{path:"/settings",element:d.jsx(b7,{})}),d.jsx(Ka,{path:"*",element:d.jsx(AR,{to:"/chat",replace:!0})})]})}),c&&d.jsx(SI,{onConnect:p=>{nL(p),t.invalidateQueries()}}),f&&d.jsx(wI,{})]})}gg(ji.getState().theme);window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{ji.getState().theme==="system"&&gg("system")});const C7=new vA({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1}}});VT.createRoot(document.getElementById("root")).render(d.jsx(w.StrictMode,{children:d.jsxs(EA,{client:C7,children:[d.jsx(t2,{children:d.jsx(N7,{})}),d.jsx(hz,{})]})}));
|