dorkos 0.1.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.
@@ -0,0 +1,486 @@
1
+ var dP=Object.defineProperty;var W2=e=>{throw TypeError(e)};var hP=(e,t,n)=>t in e?dP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $e=(e,t,n)=>hP(e,typeof t!="symbol"?t+"":t,n),Pg=(e,t,n)=>t.has(e)||W2("Cannot "+n);var Q=(e,t,n)=>(Pg(e,t,"read from private field"),n?n.call(e):t.get(e)),Be=(e,t,n)=>t.has(e)?W2("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ke=(e,t,n,r)=>(Pg(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),nt=(e,t,n)=>(Pg(e,t,"access private method"),n);var lh=(e,t,n,r)=>({set _(s){ke(e,t,s,n)},get _(){return Q(e,t,r)}});function mP(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[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"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();const pP="modulepreload",gP=function(e){return"/"+e},Z2={},$y=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));s=l(n.map(f=>{if(f=gP(f),f in Z2)return;Z2[f]=!0;const m=f.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":pP,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((y,E)=>{g.addEventListener("load",y),g.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return s.then(l=>{for(const u of l||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};function Ao(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jg={exports:{}},gc={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var J2;function bP(){if(J2)return gc;J2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,o){var l=null;if(o!==void 0&&(l=""+o),s.key!==void 0&&(l=""+s.key),"key"in s){o={};for(var u in s)u!=="key"&&(o[u]=s[u])}else o=s;return s=o.ref,{$$typeof:e,type:r,key:l,ref:s!==void 0?s:null,props:o}}return gc.Fragment=t,gc.jsx=n,gc.jsxs=n,gc}var eC;function yP(){return eC||(eC=1,jg.exports=bP()),jg.exports}var b=yP(),Bg={exports:{}},Xe={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var tC;function xP(){if(tC)return Xe;tC=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function y(q){return q===null||typeof q!="object"?null:(q=g&&q[g]||q["@@iterator"],typeof q=="function"?q:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,A={};function w(q,ie,B){this.props=q,this.context=ie,this.refs=A,this.updater=B||E}w.prototype.isReactComponent={},w.prototype.setState=function(q,ie){if(typeof q!="object"&&typeof q!="function"&&q!=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,q,ie,"setState")},w.prototype.forceUpdate=function(q){this.updater.enqueueForceUpdate(this,q,"forceUpdate")};function _(){}_.prototype=w.prototype;function k(q,ie,B){this.props=q,this.context=ie,this.refs=A,this.updater=B||E}var R=k.prototype=new _;R.constructor=k,S(R,w.prototype),R.isPureReactComponent=!0;var M=Array.isArray;function O(){}var D={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function z(q,ie,B){var de=B.ref;return{$$typeof:e,type:q,key:ie,ref:de!==void 0?de:null,props:B}}function j(q,ie){return z(q.type,ie,q.props)}function K(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function Y(q){var ie={"=":"=0",":":"=2"};return"$"+q.replace(/[=:]/g,function(B){return ie[B]})}var J=/\/+/g;function te(q,ie){return typeof q=="object"&&q!==null&&q.key!=null?Y(""+q.key):ie.toString(36)}function W(q){switch(q.status){case"fulfilled":return q.value;case"rejected":throw q.reason;default:switch(typeof q.status=="string"?q.then(O,O):(q.status="pending",q.then(function(ie){q.status==="pending"&&(q.status="fulfilled",q.value=ie)},function(ie){q.status==="pending"&&(q.status="rejected",q.reason=ie)})),q.status){case"fulfilled":return q.value;case"rejected":throw q.reason}}throw q}function I(q,ie,B,de,xe){var Ee=typeof q;(Ee==="undefined"||Ee==="boolean")&&(q=null);var he=!1;if(q===null)he=!0;else switch(Ee){case"bigint":case"string":case"number":he=!0;break;case"object":switch(q.$$typeof){case e:case t:he=!0;break;case m:return he=q._init,I(he(q._payload),ie,B,de,xe)}}if(he)return xe=xe(q),he=de===""?"."+te(q,0):de,M(xe)?(B="",he!=null&&(B=he.replace(J,"$&/")+"/"),I(xe,ie,B,"",function(Pe){return Pe})):xe!=null&&(K(xe)&&(xe=j(xe,B+(xe.key==null||q&&q.key===xe.key?"":(""+xe.key).replace(J,"$&/")+"/")+he)),ie.push(xe)),1;he=0;var we=de===""?".":de+":";if(M(q))for(var Se=0;Se<q.length;Se++)de=q[Se],Ee=we+te(de,Se),he+=I(de,ie,B,Ee,xe);else if(Se=y(q),typeof Se=="function")for(q=Se.call(q),Se=0;!(de=q.next()).done;)de=de.value,Ee=we+te(de,Se++),he+=I(de,ie,B,Ee,xe);else if(Ee==="object"){if(typeof q.then=="function")return I(W(q),ie,B,de,xe);throw ie=String(q),Error("Objects are not valid as a React child (found: "+(ie==="[object Object]"?"object with keys {"+Object.keys(q).join(", ")+"}":ie)+"). If you meant to render a collection of children, use an array instead.")}return he}function H(q,ie,B){if(q==null)return q;var de=[],xe=0;return I(q,de,"","",function(Ee){return ie.call(B,Ee,xe++)}),de}function $(q){if(q._status===-1){var ie=q._result;ie=ie(),ie.then(function(B){(q._status===0||q._status===-1)&&(q._status=1,q._result=B)},function(B){(q._status===0||q._status===-1)&&(q._status=2,q._result=B)}),q._status===-1&&(q._status=0,q._result=ie)}if(q._status===1)return q._result.default;throw q._result}var ne=typeof reportError=="function"?reportError:function(q){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ie=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof q=="object"&&q!==null&&typeof q.message=="string"?String(q.message):String(q),error:q});if(!window.dispatchEvent(ie))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",q);return}console.error(q)},U={map:H,forEach:function(q,ie,B){H(q,function(){ie.apply(this,arguments)},B)},count:function(q){var ie=0;return H(q,function(){ie++}),ie},toArray:function(q){return H(q,function(ie){return ie})||[]},only:function(q){if(!K(q))throw Error("React.Children.only expected to receive a single React element child.");return q}};return Xe.Activity=p,Xe.Children=U,Xe.Component=w,Xe.Fragment=n,Xe.Profiler=s,Xe.PureComponent=k,Xe.StrictMode=r,Xe.Suspense=d,Xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Xe.__COMPILER_RUNTIME={__proto__:null,c:function(q){return D.H.useMemoCache(q)}},Xe.cache=function(q){return function(){return q.apply(null,arguments)}},Xe.cacheSignal=function(){return null},Xe.cloneElement=function(q,ie,B){if(q==null)throw Error("The argument must be a React element, but you passed "+q+".");var de=S({},q.props),xe=q.key;if(ie!=null)for(Ee in ie.key!==void 0&&(xe=""+ie.key),ie)!P.call(ie,Ee)||Ee==="key"||Ee==="__self"||Ee==="__source"||Ee==="ref"&&ie.ref===void 0||(de[Ee]=ie[Ee]);var Ee=arguments.length-2;if(Ee===1)de.children=B;else if(1<Ee){for(var he=Array(Ee),we=0;we<Ee;we++)he[we]=arguments[we+2];de.children=he}return z(q.type,xe,de)},Xe.createContext=function(q){return q={$$typeof:l,_currentValue:q,_currentValue2:q,_threadCount:0,Provider:null,Consumer:null},q.Provider=q,q.Consumer={$$typeof:o,_context:q},q},Xe.createElement=function(q,ie,B){var de,xe={},Ee=null;if(ie!=null)for(de in ie.key!==void 0&&(Ee=""+ie.key),ie)P.call(ie,de)&&de!=="key"&&de!=="__self"&&de!=="__source"&&(xe[de]=ie[de]);var he=arguments.length-2;if(he===1)xe.children=B;else if(1<he){for(var we=Array(he),Se=0;Se<he;Se++)we[Se]=arguments[Se+2];xe.children=we}if(q&&q.defaultProps)for(de in he=q.defaultProps,he)xe[de]===void 0&&(xe[de]=he[de]);return z(q,Ee,xe)},Xe.createRef=function(){return{current:null}},Xe.forwardRef=function(q){return{$$typeof:u,render:q}},Xe.isValidElement=K,Xe.lazy=function(q){return{$$typeof:m,_payload:{_status:-1,_result:q},_init:$}},Xe.memo=function(q,ie){return{$$typeof:f,type:q,compare:ie===void 0?null:ie}},Xe.startTransition=function(q){var ie=D.T,B={};D.T=B;try{var de=q(),xe=D.S;xe!==null&&xe(B,de),typeof de=="object"&&de!==null&&typeof de.then=="function"&&de.then(O,ne)}catch(Ee){ne(Ee)}finally{ie!==null&&B.types!==null&&(ie.types=B.types),D.T=ie}},Xe.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Xe.use=function(q){return D.H.use(q)},Xe.useActionState=function(q,ie,B){return D.H.useActionState(q,ie,B)},Xe.useCallback=function(q,ie){return D.H.useCallback(q,ie)},Xe.useContext=function(q){return D.H.useContext(q)},Xe.useDebugValue=function(){},Xe.useDeferredValue=function(q,ie){return D.H.useDeferredValue(q,ie)},Xe.useEffect=function(q,ie){return D.H.useEffect(q,ie)},Xe.useEffectEvent=function(q){return D.H.useEffectEvent(q)},Xe.useId=function(){return D.H.useId()},Xe.useImperativeHandle=function(q,ie,B){return D.H.useImperativeHandle(q,ie,B)},Xe.useInsertionEffect=function(q,ie){return D.H.useInsertionEffect(q,ie)},Xe.useLayoutEffect=function(q,ie){return D.H.useLayoutEffect(q,ie)},Xe.useMemo=function(q,ie){return D.H.useMemo(q,ie)},Xe.useOptimistic=function(q,ie){return D.H.useOptimistic(q,ie)},Xe.useReducer=function(q,ie,B){return D.H.useReducer(q,ie,B)},Xe.useRef=function(q){return D.H.useRef(q)},Xe.useState=function(q){return D.H.useState(q)},Xe.useSyncExternalStore=function(q,ie,B){return D.H.useSyncExternalStore(q,ie,B)},Xe.useTransition=function(){return D.H.useTransition()},Xe.version="19.2.4",Xe}var nC;function wf(){return nC||(nC=1,Bg.exports=xP()),Bg.exports}var v=wf();const Ce=Ao(v),Yy=mP({__proto__:null,default:Ce},[v]);var Ug={exports:{}},bc={},Fg={exports:{}},Hg={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var rC;function vP(){return rC||(rC=1,(function(e){function t(I,H){var $=I.length;I.push(H);e:for(;0<$;){var ne=$-1>>>1,U=I[ne];if(0<s(U,H))I[ne]=H,I[$]=U,$=ne;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var H=I[0],$=I.pop();if($!==H){I[0]=$;e:for(var ne=0,U=I.length,q=U>>>1;ne<q;){var ie=2*(ne+1)-1,B=I[ie],de=ie+1,xe=I[de];if(0>s(B,$))de<U&&0>s(xe,B)?(I[ne]=xe,I[de]=$,ne=de):(I[ne]=B,I[ie]=$,ne=ie);else if(de<U&&0>s(xe,$))I[ne]=xe,I[de]=$,ne=de;else break e}}return H}function s(I,H){var $=I.sortIndex-H.sortIndex;return $!==0?$:I.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],f=[],m=1,p=null,g=3,y=!1,E=!1,S=!1,A=!1,w=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function R(I){for(var H=n(f);H!==null;){if(H.callback===null)r(f);else if(H.startTime<=I)r(f),H.sortIndex=H.expirationTime,t(d,H);else break;H=n(f)}}function M(I){if(S=!1,R(I),!E)if(n(d)!==null)E=!0,O||(O=!0,Y());else{var H=n(f);H!==null&&W(M,H.startTime-I)}}var O=!1,D=-1,P=5,z=-1;function j(){return A?!0:!(e.unstable_now()-z<P)}function K(){if(A=!1,O){var I=e.unstable_now();z=I;var H=!0;try{e:{E=!1,S&&(S=!1,_(D),D=-1),y=!0;var $=g;try{t:{for(R(I),p=n(d);p!==null&&!(p.expirationTime>I&&j());){var ne=p.callback;if(typeof ne=="function"){p.callback=null,g=p.priorityLevel;var U=ne(p.expirationTime<=I);if(I=e.unstable_now(),typeof U=="function"){p.callback=U,R(I),H=!0;break t}p===n(d)&&r(d),R(I)}else r(d);p=n(d)}if(p!==null)H=!0;else{var q=n(f);q!==null&&W(M,q.startTime-I),H=!1}}break e}finally{p=null,g=$,y=!1}H=void 0}}finally{H?Y():O=!1}}}var Y;if(typeof k=="function")Y=function(){k(K)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,te=J.port2;J.port1.onmessage=K,Y=function(){te.postMessage(null)}}else Y=function(){w(K,0)};function W(I,H){D=w(function(){I(e.unstable_now())},H)}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(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(I){switch(g){case 1:case 2:case 3:var H=3;break;default:H=g}var $=g;g=H;try{return I()}finally{g=$}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(I,H){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var $=g;g=I;try{return H()}finally{g=$}},e.unstable_scheduleCallback=function(I,H,$){var ne=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?ne+$:ne):$=ne,I){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=$+U,I={id:m++,callback:H,priorityLevel:I,startTime:$,expirationTime:U,sortIndex:-1},$>ne?(I.sortIndex=$,t(f,I),n(d)===null&&I===n(f)&&(S?(_(D),D=-1):S=!0,W(M,$-ne))):(I.sortIndex=U,t(d,I),E||y||(E=!0,O||(O=!0,Y()))),I},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(I){var H=g;return function(){var $=g;g=H;try{return I.apply(this,arguments)}finally{g=$}}}})(Hg)),Hg}var iC;function EP(){return iC||(iC=1,Fg.exports=vP()),Fg.exports}var zg={exports:{}},Hn={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var sC;function TP(){if(sC)return Hn;sC=1;var e=wf();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:p==null?null:""+p,children:d,containerInfo:f,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Hn.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return o(d,f,null,m)},Hn.flushSync=function(d){var f=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=m,r.d.f()}},Hn.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},Hn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},Hn.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:y}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:g,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Hn.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=u(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},Hn.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Hn.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=u(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},Hn.requestFormReset=function(d){r.d.r(d)},Hn.unstable_batchedUpdates=function(d,f){return d(f)},Hn.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},Hn.useFormStatus=function(){return l.H.useHostTransitionStatus()},Hn.version="19.2.4",Hn}var aC;function W3(){if(aC)return zg.exports;aC=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(),zg.exports=TP(),zg.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var oC;function SP(){if(oC)return bc;oC=1;var e=EP(),t=wf(),n=W3();function r(i){var a="https://react.dev/errors/"+i;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)a+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+i+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var a=i,c=i;if(i.alternate)for(;a.return;)a=a.return;else{i=a;do a=i,(a.flags&4098)!==0&&(c=a.return),i=a.return;while(i)}return a.tag===3?c:null}function l(i){if(i.tag===13){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function u(i){if(i.tag===31){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function d(i){if(o(i)!==i)throw Error(r(188))}function f(i){var a=i.alternate;if(!a){if(a=o(i),a===null)throw Error(r(188));return a!==i?null:i}for(var c=i,h=a;;){var x=c.return;if(x===null)break;var T=x.alternate;if(T===null){if(h=x.return,h!==null){c=h;continue}break}if(x.child===T.child){for(T=x.child;T;){if(T===c)return d(x),i;if(T===h)return d(x),a;T=T.sibling}throw Error(r(188))}if(c.return!==h.return)c=x,h=T;else{for(var N=!1,L=x.child;L;){if(L===c){N=!0,c=x,h=T;break}if(L===h){N=!0,h=x,c=T;break}L=L.sibling}if(!N){for(L=T.child;L;){if(L===c){N=!0,c=T,h=x;break}if(L===h){N=!0,h=T,c=x;break}L=L.sibling}if(!N)throw Error(r(189))}}if(c.alternate!==h)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?i:a}function m(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i;for(i=i.child;i!==null;){if(a=m(i),a!==null)return a;i=i.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),k=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function Y(i){return i===null||typeof i!="object"?null:(i=K&&i[K]||i["@@iterator"],typeof i=="function"?i:null)}var J=Symbol.for("react.client.reference");function te(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===J?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case w:return"Profiler";case A:return"StrictMode";case M:return"Suspense";case O:return"SuspenseList";case z:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case E:return"Portal";case k:return i.displayName||"Context";case _:return(i._context.displayName||"Context")+".Consumer";case R:var a=i.render;return i=i.displayName,i||(i=a.displayName||a.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case D:return a=i.displayName||null,a!==null?a:te(i.type)||"Memo";case P:a=i._payload,i=i._init;try{return te(i(a))}catch{}}return null}var W=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},ne=[],U=-1;function q(i){return{current:i}}function ie(i){0>U||(i.current=ne[U],ne[U]=null,U--)}function B(i,a){U++,ne[U]=i.current,i.current=a}var de=q(null),xe=q(null),Ee=q(null),he=q(null);function we(i,a){switch(B(Ee,a),B(xe,i),B(de,null),a.nodeType){case 9:case 11:i=(i=a.documentElement)&&(i=i.namespaceURI)?v2(i):0;break;default:if(i=a.tagName,a=a.namespaceURI)a=v2(a),i=E2(a,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}ie(de),B(de,i)}function Se(){ie(de),ie(xe),ie(Ee)}function Pe(i){i.memoizedState!==null&&B(he,i);var a=de.current,c=E2(a,i.type);a!==c&&(B(xe,i),B(de,c))}function _e(i){xe.current===i&&(ie(de),ie(xe)),he.current===i&&(ie(he),dc._currentValue=$)}var Oe,wt;function Re(i){if(Oe===void 0)try{throw Error()}catch(c){var a=c.stack.trim().match(/\n( *(at )?)/);Oe=a&&a[1]||"",wt=-1<c.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Oe+i+wt}var nn=!1;function Lt(i,a){if(!i||nn)return"";nn=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(a){var pe=function(){throw Error()};if(Object.defineProperty(pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pe,[])}catch(le){var oe=le}Reflect.construct(i,[],pe)}else{try{pe.call()}catch(le){oe=le}i.call(pe.prototype)}}else{try{throw Error()}catch(le){oe=le}(pe=i())&&typeof pe.catch=="function"&&pe.catch(function(){})}}catch(le){if(le&&oe&&typeof le.stack=="string")return[le.stack,oe.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=h.DetermineComponentFrameRoot(),N=T[0],L=T[1];if(N&&L){var X=N.split(`
44
+ `),ae=L.split(`
45
+ `);for(x=h=0;h<X.length&&!X[h].includes("DetermineComponentFrameRoot");)h++;for(;x<ae.length&&!ae[x].includes("DetermineComponentFrameRoot");)x++;if(h===X.length||x===ae.length)for(h=X.length-1,x=ae.length-1;1<=h&&0<=x&&X[h]!==ae[x];)x--;for(;1<=h&&0<=x;h--,x--)if(X[h]!==ae[x]){if(h!==1||x!==1)do if(h--,x--,0>x||X[h]!==ae[x]){var fe=`
46
+ `+X[h].replace(" at new "," at ");return i.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",i.displayName)),fe}while(1<=h&&0<=x);break}}}finally{nn=!1,Error.prepareStackTrace=c}return(c=i?i.displayName||i.name:"")?Re(c):""}function rn(i,a){switch(i.tag){case 26:case 27:case 5:return Re(i.type);case 16:return Re("Lazy");case 13:return i.child!==a&&a!==null?Re("Suspense Fallback"):Re("Suspense");case 19:return Re("SuspenseList");case 0:case 15:return Lt(i.type,!1);case 11:return Lt(i.type.render,!1);case 1:return Lt(i.type,!0);case 31:return Re("Activity");default:return""}}function ei(i){try{var a="",c=null;do a+=rn(i,c),c=i,i=i.return;while(i);return a}catch(h){return`
47
+ Error generating stack: `+h.message+`
48
+ `+h.stack}}var Fn=Object.prototype.hasOwnProperty,Cn=e.unstable_scheduleCallback,Ti=e.unstable_cancelCallback,ti=e.unstable_shouldYield,ni=e.unstable_requestPaint,rt=e.unstable_now,xt=e.unstable_getCurrentPriorityLevel,ce=e.unstable_ImmediatePriority,Te=e.unstable_UserBlockingPriority,Ue=e.unstable_NormalPriority,Ze=e.unstable_LowPriority,ht=e.unstable_IdlePriority,Dn=e.log,Mn=e.unstable_setDisableYieldValue,un=null,qt=null;function wn(i){if(typeof Dn=="function"&&Mn(i),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(un,i)}catch{}}var St=Math.clz32?Math.clz32:Ae,ye=Math.log,He=Math.LN2;function Ae(i){return i>>>=0,i===0?32:31-(ye(i)/He|0)|0}var Ve=256,mt=262144,Qe=4194304;function st(i){var a=i&42;if(a!==0)return a;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function kt(i,a,c){var h=i.pendingLanes;if(h===0)return 0;var x=0,T=i.suspendedLanes,N=i.pingedLanes;i=i.warmLanes;var L=h&134217727;return L!==0?(h=L&~T,h!==0?x=st(h):(N&=L,N!==0?x=st(N):c||(c=L&~i,c!==0&&(x=st(c))))):(L=h&~T,L!==0?x=st(L):N!==0?x=st(N):c||(c=h&~i,c!==0&&(x=st(c)))),x===0?0:a!==0&&a!==x&&(a&T)===0&&(T=x&-x,c=a&-a,T>=c||T===32&&(c&4194048)!==0)?a:x}function Ft(i,a){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&a)===0}function Si(i,a){switch(i){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 ar(){var i=Qe;return Qe<<=1,(Qe&62914560)===0&&(Qe=4194304),i}function ri(i){for(var a=[],c=0;31>c;c++)a.push(i);return a}function or(i,a){i.pendingLanes|=a,a!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Mr(i,a,c,h,x,T){var N=i.pendingLanes;i.pendingLanes=c,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=c,i.entangledLanes&=c,i.errorRecoveryDisabledLanes&=c,i.shellSuspendCounter=0;var L=i.entanglements,X=i.expirationTimes,ae=i.hiddenUpdates;for(c=N&~c;0<c;){var fe=31-St(c),pe=1<<fe;L[fe]=0,X[fe]=-1;var oe=ae[fe];if(oe!==null)for(ae[fe]=null,fe=0;fe<oe.length;fe++){var le=oe[fe];le!==null&&(le.lane&=-536870913)}c&=~pe}h!==0&&Na(i,h,0),T!==0&&x===0&&i.tag!==0&&(i.suspendedLanes|=T&~(N&~a))}function Na(i,a,c){i.pendingLanes|=a,i.suspendedLanes&=~a;var h=31-St(a);i.entangledLanes|=a,i.entanglements[h]=i.entanglements[h]|1073741824|c&261930}function Au(i,a){var c=i.entangledLanes|=a;for(i=i.entanglements;c;){var h=31-St(c),x=1<<h;x&a|i[h]&a&&(i[h]|=a),c&=~x}}function iE(i,a){var c=a&-a;return c=(c&42)!==0?1:wp(c),(c&(i.suspendedLanes|a))!==0?0:c}function wp(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Ap(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function sE(){var i=H.p;return i!==0?i:(i=window.event,i===void 0?32:q2(i.type))}function aE(i,a){var c=H.p;try{return H.p=i,a()}finally{H.p=c}}var ws=Math.random().toString(36).slice(2),In="__reactFiber$"+ws,lr="__reactProps$"+ws,Po="__reactContainer$"+ws,_p="__reactEvents$"+ws,tI="__reactListeners$"+ws,nI="__reactHandles$"+ws,oE="__reactResources$"+ws,_u="__reactMarker$"+ws;function kp(i){delete i[In],delete i[lr],delete i[_p],delete i[tI],delete i[nI]}function jo(i){var a=i[In];if(a)return a;for(var c=i.parentNode;c;){if(a=c[Po]||c[In]){if(c=a.alternate,a.child!==null||c!==null&&c.child!==null)for(i=k2(i);i!==null;){if(c=i[In])return c;i=k2(i)}return a}i=c,c=i.parentNode}return null}function Bo(i){if(i=i[In]||i[Po]){var a=i.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return i}return null}function ku(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i.stateNode;throw Error(r(33))}function Uo(i){var a=i[oE];return a||(a=i[oE]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function An(i){i[_u]=!0}var lE=new Set,uE={};function Ra(i,a){Fo(i,a),Fo(i+"Capture",a)}function Fo(i,a){for(uE[i]=a,i=0;i<a.length;i++)lE.add(a[i])}var rI=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]*$"),cE={},fE={};function iI(i){return Fn.call(fE,i)?!0:Fn.call(cE,i)?!1:rI.test(i)?fE[i]=!0:(cE[i]=!0,!1)}function Qf(i,a,c){if(iI(a))if(c===null)i.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":i.removeAttribute(a);return;case"boolean":var h=a.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){i.removeAttribute(a);return}}i.setAttribute(a,""+c)}}function Wf(i,a,c){if(c===null)i.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(a);return}i.setAttribute(a,""+c)}}function Gi(i,a,c,h){if(h===null)i.removeAttribute(c);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(c);return}i.setAttributeNS(a,c,""+h)}}function Ir(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function dE(i){var a=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function sI(i,a,c){var h=Object.getOwnPropertyDescriptor(i.constructor.prototype,a);if(!i.hasOwnProperty(a)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var x=h.get,T=h.set;return Object.defineProperty(i,a,{configurable:!0,get:function(){return x.call(this)},set:function(N){c=""+N,T.call(this,N)}}),Object.defineProperty(i,a,{enumerable:h.enumerable}),{getValue:function(){return c},setValue:function(N){c=""+N},stopTracking:function(){i._valueTracker=null,delete i[a]}}}}function Np(i){if(!i._valueTracker){var a=dE(i)?"checked":"value";i._valueTracker=sI(i,a,""+i[a])}}function hE(i){if(!i)return!1;var a=i._valueTracker;if(!a)return!0;var c=a.getValue(),h="";return i&&(h=dE(i)?i.checked?"true":"false":i.value),i=h,i!==c?(a.setValue(i),!0):!1}function Zf(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var aI=/[\n"\\]/g;function Lr(i){return i.replace(aI,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Rp(i,a,c,h,x,T,N,L){i.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?i.type=N:i.removeAttribute("type"),a!=null?N==="number"?(a===0&&i.value===""||i.value!=a)&&(i.value=""+Ir(a)):i.value!==""+Ir(a)&&(i.value=""+Ir(a)):N!=="submit"&&N!=="reset"||i.removeAttribute("value"),a!=null?Op(i,N,Ir(a)):c!=null?Op(i,N,Ir(c)):h!=null&&i.removeAttribute("value"),x==null&&T!=null&&(i.defaultChecked=!!T),x!=null&&(i.checked=x&&typeof x!="function"&&typeof x!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?i.name=""+Ir(L):i.removeAttribute("name")}function mE(i,a,c,h,x,T,N,L){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(i.type=T),a!=null||c!=null){if(!(T!=="submit"&&T!=="reset"||a!=null)){Np(i);return}c=c!=null?""+Ir(c):"",a=a!=null?""+Ir(a):c,L||a===i.value||(i.value=a),i.defaultValue=a}h=h??x,h=typeof h!="function"&&typeof h!="symbol"&&!!h,i.checked=L?i.checked:!!h,i.defaultChecked=!!h,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(i.name=N),Np(i)}function Op(i,a,c){a==="number"&&Zf(i.ownerDocument)===i||i.defaultValue===""+c||(i.defaultValue=""+c)}function Ho(i,a,c,h){if(i=i.options,a){a={};for(var x=0;x<c.length;x++)a["$"+c[x]]=!0;for(c=0;c<i.length;c++)x=a.hasOwnProperty("$"+i[c].value),i[c].selected!==x&&(i[c].selected=x),x&&h&&(i[c].defaultSelected=!0)}else{for(c=""+Ir(c),a=null,x=0;x<i.length;x++){if(i[x].value===c){i[x].selected=!0,h&&(i[x].defaultSelected=!0);return}a!==null||i[x].disabled||(a=i[x])}a!==null&&(a.selected=!0)}}function pE(i,a,c){if(a!=null&&(a=""+Ir(a),a!==i.value&&(i.value=a),c==null)){i.defaultValue!==a&&(i.defaultValue=a);return}i.defaultValue=c!=null?""+Ir(c):""}function gE(i,a,c,h){if(a==null){if(h!=null){if(c!=null)throw Error(r(92));if(W(h)){if(1<h.length)throw Error(r(93));h=h[0]}c=h}c==null&&(c=""),a=c}c=Ir(a),i.defaultValue=c,h=i.textContent,h===c&&h!==""&&h!==null&&(i.value=h),Np(i)}function zo(i,a){if(a){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=a;return}}i.textContent=a}var oI=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 bE(i,a,c){var h=a.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?h?i.setProperty(a,""):a==="float"?i.cssFloat="":i[a]="":h?i.setProperty(a,c):typeof c!="number"||c===0||oI.has(a)?a==="float"?i.cssFloat=c:i[a]=(""+c).trim():i[a]=c+"px"}function yE(i,a,c){if(a!=null&&typeof a!="object")throw Error(r(62));if(i=i.style,c!=null){for(var h in c)!c.hasOwnProperty(h)||a!=null&&a.hasOwnProperty(h)||(h.indexOf("--")===0?i.setProperty(h,""):h==="float"?i.cssFloat="":i[h]="");for(var x in a)h=a[x],a.hasOwnProperty(x)&&c[x]!==h&&bE(i,x,h)}else for(var T in a)a.hasOwnProperty(T)&&bE(i,T,a[T])}function Dp(i){if(i.indexOf("-")===-1)return!1;switch(i){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 lI=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"]]),uI=/^[\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 Jf(i){return uI.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Xi(){}var Mp=null;function Ip(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Vo=null,qo=null;function xE(i){var a=Bo(i);if(a&&(i=a.stateNode)){var c=i[lr]||null;e:switch(i=a.stateNode,a.type){case"input":if(Rp(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),a=c.name,c.type==="radio"&&a!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+Lr(""+a)+'"][type="radio"]'),a=0;a<c.length;a++){var h=c[a];if(h!==i&&h.form===i.form){var x=h[lr]||null;if(!x)throw Error(r(90));Rp(h,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(a=0;a<c.length;a++)h=c[a],h.form===i.form&&hE(h)}break e;case"textarea":pE(i,c.value,c.defaultValue);break e;case"select":a=c.value,a!=null&&Ho(i,!!c.multiple,a,!1)}}}var Lp=!1;function vE(i,a,c){if(Lp)return i(a,c);Lp=!0;try{var h=i(a);return h}finally{if(Lp=!1,(Vo!==null||qo!==null)&&(Fd(),Vo&&(a=Vo,i=qo,qo=Vo=null,xE(a),i)))for(a=0;a<i.length;a++)xE(i[a])}}function Nu(i,a){var c=i.stateNode;if(c===null)return null;var h=c[lr]||null;if(h===null)return null;c=h[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(r(231,a,typeof c));return c}var Ki=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pp=!1;if(Ki)try{var Ru={};Object.defineProperty(Ru,"passive",{get:function(){Pp=!0}}),window.addEventListener("test",Ru,Ru),window.removeEventListener("test",Ru,Ru)}catch{Pp=!1}var As=null,jp=null,ed=null;function EE(){if(ed)return ed;var i,a=jp,c=a.length,h,x="value"in As?As.value:As.textContent,T=x.length;for(i=0;i<c&&a[i]===x[i];i++);var N=c-i;for(h=1;h<=N&&a[c-h]===x[T-h];h++);return ed=x.slice(i,1<h?1-h:void 0)}function td(i){var a=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&a===13&&(i=13)):i=a,i===10&&(i=13),32<=i||i===13?i:0}function nd(){return!0}function TE(){return!1}function ur(i){function a(c,h,x,T,N){this._reactName=c,this._targetInst=x,this.type=h,this.nativeEvent=T,this.target=N,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(c=i[L],this[L]=c?c(T):T[L]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?nd:TE,this.isPropagationStopped=TE,this}return p(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=nd)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=nd)},persist:function(){},isPersistent:nd}),a}var Oa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rd=ur(Oa),Ou=p({},Oa,{view:0,detail:0}),cI=ur(Ou),Bp,Up,Du,id=p({},Ou,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Du&&(Du&&i.type==="mousemove"?(Bp=i.screenX-Du.screenX,Up=i.screenY-Du.screenY):Up=Bp=0,Du=i),Bp)},movementY:function(i){return"movementY"in i?i.movementY:Up}}),SE=ur(id),fI=p({},id,{dataTransfer:0}),dI=ur(fI),hI=p({},Ou,{relatedTarget:0}),Fp=ur(hI),mI=p({},Oa,{animationName:0,elapsedTime:0,pseudoElement:0}),pI=ur(mI),gI=p({},Oa,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),bI=ur(gI),yI=p({},Oa,{data:0}),CE=ur(yI),xI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vI={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"},EI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function TI(i){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(i):(i=EI[i])?!!a[i]:!1}function Hp(){return TI}var SI=p({},Ou,{key:function(i){if(i.key){var a=xI[i.key]||i.key;if(a!=="Unidentified")return a}return i.type==="keypress"?(i=td(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?vI[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hp,charCode:function(i){return i.type==="keypress"?td(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?td(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),CI=ur(SI),wI=p({},id,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wE=ur(wI),AI=p({},Ou,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hp}),_I=ur(AI),kI=p({},Oa,{propertyName:0,elapsedTime:0,pseudoElement:0}),NI=ur(kI),RI=p({},id,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),OI=ur(RI),DI=p({},Oa,{newState:0,oldState:0}),MI=ur(DI),II=[9,13,27,32],zp=Ki&&"CompositionEvent"in window,Mu=null;Ki&&"documentMode"in document&&(Mu=document.documentMode);var LI=Ki&&"TextEvent"in window&&!Mu,AE=Ki&&(!zp||Mu&&8<Mu&&11>=Mu),_E=" ",kE=!1;function NE(i,a){switch(i){case"keyup":return II.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function RE(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var $o=!1;function PI(i,a){switch(i){case"compositionend":return RE(a);case"keypress":return a.which!==32?null:(kE=!0,_E);case"textInput":return i=a.data,i===_E&&kE?null:i;default:return null}}function jI(i,a){if($o)return i==="compositionend"||!zp&&NE(i,a)?(i=EE(),ed=jp=As=null,$o=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return AE&&a.locale!=="ko"?null:a.data;default:return null}}var BI={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 OE(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a==="input"?!!BI[i.type]:a==="textarea"}function DE(i,a,c,h){Vo?qo?qo.push(h):qo=[h]:Vo=h,a=Gd(a,"onChange"),0<a.length&&(c=new rd("onChange","change",null,c,h),i.push({event:c,listeners:a}))}var Iu=null,Lu=null;function UI(i){m2(i,0)}function sd(i){var a=ku(i);if(hE(a))return i}function ME(i,a){if(i==="change")return a}var IE=!1;if(Ki){var Vp;if(Ki){var qp="oninput"in document;if(!qp){var LE=document.createElement("div");LE.setAttribute("oninput","return;"),qp=typeof LE.oninput=="function"}Vp=qp}else Vp=!1;IE=Vp&&(!document.documentMode||9<document.documentMode)}function PE(){Iu&&(Iu.detachEvent("onpropertychange",jE),Lu=Iu=null)}function jE(i){if(i.propertyName==="value"&&sd(Lu)){var a=[];DE(a,Lu,i,Ip(i)),vE(UI,a)}}function FI(i,a,c){i==="focusin"?(PE(),Iu=a,Lu=c,Iu.attachEvent("onpropertychange",jE)):i==="focusout"&&PE()}function HI(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return sd(Lu)}function zI(i,a){if(i==="click")return sd(a)}function VI(i,a){if(i==="input"||i==="change")return sd(a)}function qI(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var Er=typeof Object.is=="function"?Object.is:qI;function Pu(i,a){if(Er(i,a))return!0;if(typeof i!="object"||i===null||typeof a!="object"||a===null)return!1;var c=Object.keys(i),h=Object.keys(a);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var x=c[h];if(!Fn.call(a,x)||!Er(i[x],a[x]))return!1}return!0}function BE(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function UE(i,a){var c=BE(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=a&&h>=a)return{node:c,offset:a-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=BE(c)}}function FE(i,a){return i&&a?i===a?!0:i&&i.nodeType===3?!1:a&&a.nodeType===3?FE(i,a.parentNode):"contains"in i?i.contains(a):i.compareDocumentPosition?!!(i.compareDocumentPosition(a)&16):!1:!1}function HE(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var a=Zf(i.document);a instanceof i.HTMLIFrameElement;){try{var c=typeof a.contentWindow.location.href=="string"}catch{c=!1}if(c)i=a.contentWindow;else break;a=Zf(i.document)}return a}function $p(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a&&(a==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||a==="textarea"||i.contentEditable==="true")}var $I=Ki&&"documentMode"in document&&11>=document.documentMode,Yo=null,Yp=null,ju=null,Gp=!1;function zE(i,a,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Gp||Yo==null||Yo!==Zf(h)||(h=Yo,"selectionStart"in h&&$p(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),ju&&Pu(ju,h)||(ju=h,h=Gd(Yp,"onSelect"),0<h.length&&(a=new rd("onSelect","select",null,a,c),i.push({event:a,listeners:h}),a.target=Yo)))}function Da(i,a){var c={};return c[i.toLowerCase()]=a.toLowerCase(),c["Webkit"+i]="webkit"+a,c["Moz"+i]="moz"+a,c}var Go={animationend:Da("Animation","AnimationEnd"),animationiteration:Da("Animation","AnimationIteration"),animationstart:Da("Animation","AnimationStart"),transitionrun:Da("Transition","TransitionRun"),transitionstart:Da("Transition","TransitionStart"),transitioncancel:Da("Transition","TransitionCancel"),transitionend:Da("Transition","TransitionEnd")},Xp={},VE={};Ki&&(VE=document.createElement("div").style,"AnimationEvent"in window||(delete Go.animationend.animation,delete Go.animationiteration.animation,delete Go.animationstart.animation),"TransitionEvent"in window||delete Go.transitionend.transition);function Ma(i){if(Xp[i])return Xp[i];if(!Go[i])return i;var a=Go[i],c;for(c in a)if(a.hasOwnProperty(c)&&c in VE)return Xp[i]=a[c];return i}var qE=Ma("animationend"),$E=Ma("animationiteration"),YE=Ma("animationstart"),YI=Ma("transitionrun"),GI=Ma("transitionstart"),XI=Ma("transitioncancel"),GE=Ma("transitionend"),XE=new Map,Kp="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(" ");Kp.push("scrollEnd");function ii(i,a){XE.set(i,a),Ra(a,[i])}var ad=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Pr=[],Xo=0,Qp=0;function od(){for(var i=Xo,a=Qp=Xo=0;a<i;){var c=Pr[a];Pr[a++]=null;var h=Pr[a];Pr[a++]=null;var x=Pr[a];Pr[a++]=null;var T=Pr[a];if(Pr[a++]=null,h!==null&&x!==null){var N=h.pending;N===null?x.next=x:(x.next=N.next,N.next=x),h.pending=x}T!==0&&KE(c,x,T)}}function ld(i,a,c,h){Pr[Xo++]=i,Pr[Xo++]=a,Pr[Xo++]=c,Pr[Xo++]=h,Qp|=h,i.lanes|=h,i=i.alternate,i!==null&&(i.lanes|=h)}function Wp(i,a,c,h){return ld(i,a,c,h),ud(i)}function Ia(i,a){return ld(i,null,null,a),ud(i)}function KE(i,a,c){i.lanes|=c;var h=i.alternate;h!==null&&(h.lanes|=c);for(var x=!1,T=i.return;T!==null;)T.childLanes|=c,h=T.alternate,h!==null&&(h.childLanes|=c),T.tag===22&&(i=T.stateNode,i===null||i._visibility&1||(x=!0)),i=T,T=T.return;return i.tag===3?(T=i.stateNode,x&&a!==null&&(x=31-St(c),i=T.hiddenUpdates,h=i[x],h===null?i[x]=[a]:h.push(a),a.lane=c|536870912),T):null}function ud(i){if(50<sc)throw sc=0,ag=null,Error(r(185));for(var a=i.return;a!==null;)i=a,a=i.return;return i.tag===3?i.stateNode:null}var Ko={};function KI(i,a,c,h){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tr(i,a,c,h){return new KI(i,a,c,h)}function Zp(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Qi(i,a){var c=i.alternate;return c===null?(c=Tr(i.tag,a,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=a,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&65011712,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,a=i.dependencies,c.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c.refCleanup=i.refCleanup,c}function QE(i,a){i.flags&=65011714;var c=i.alternate;return c===null?(i.childLanes=0,i.lanes=a,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=c.childLanes,i.lanes=c.lanes,i.child=c.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=c.memoizedProps,i.memoizedState=c.memoizedState,i.updateQueue=c.updateQueue,i.type=c.type,a=c.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),i}function cd(i,a,c,h,x,T){var N=0;if(h=i,typeof i=="function")Zp(i)&&(N=1);else if(typeof i=="string")N=eP(i,c,de.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case z:return i=Tr(31,c,a,x),i.elementType=z,i.lanes=T,i;case S:return La(c.children,x,T,a);case A:N=8,x|=24;break;case w:return i=Tr(12,c,a,x|2),i.elementType=w,i.lanes=T,i;case M:return i=Tr(13,c,a,x),i.elementType=M,i.lanes=T,i;case O:return i=Tr(19,c,a,x),i.elementType=O,i.lanes=T,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case k:N=10;break e;case _:N=9;break e;case R:N=11;break e;case D:N=14;break e;case P:N=16,h=null;break e}N=29,c=Error(r(130,i===null?"null":typeof i,"")),h=null}return a=Tr(N,c,a,x),a.elementType=i,a.type=h,a.lanes=T,a}function La(i,a,c,h){return i=Tr(7,i,h,a),i.lanes=c,i}function Jp(i,a,c){return i=Tr(6,i,null,a),i.lanes=c,i}function WE(i){var a=Tr(18,null,null,0);return a.stateNode=i,a}function e0(i,a,c){return a=Tr(4,i.children!==null?i.children:[],i.key,a),a.lanes=c,a.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},a}var ZE=new WeakMap;function jr(i,a){if(typeof i=="object"&&i!==null){var c=ZE.get(i);return c!==void 0?c:(a={value:i,source:a,stack:ei(a)},ZE.set(i,a),a)}return{value:i,source:a,stack:ei(a)}}var Qo=[],Wo=0,fd=null,Bu=0,Br=[],Ur=0,_s=null,Ci=1,wi="";function Wi(i,a){Qo[Wo++]=Bu,Qo[Wo++]=fd,fd=i,Bu=a}function JE(i,a,c){Br[Ur++]=Ci,Br[Ur++]=wi,Br[Ur++]=_s,_s=i;var h=Ci;i=wi;var x=32-St(h)-1;h&=~(1<<x),c+=1;var T=32-St(a)+x;if(30<T){var N=x-x%5;T=(h&(1<<N)-1).toString(32),h>>=N,x-=N,Ci=1<<32-St(a)+x|c<<x|h,wi=T+i}else Ci=1<<T|c<<x|h,wi=i}function t0(i){i.return!==null&&(Wi(i,1),JE(i,1,0))}function n0(i){for(;i===fd;)fd=Qo[--Wo],Qo[Wo]=null,Bu=Qo[--Wo],Qo[Wo]=null;for(;i===_s;)_s=Br[--Ur],Br[Ur]=null,wi=Br[--Ur],Br[Ur]=null,Ci=Br[--Ur],Br[Ur]=null}function eT(i,a){Br[Ur++]=Ci,Br[Ur++]=wi,Br[Ur++]=_s,Ci=a.id,wi=a.overflow,_s=i}var Ln=null,Ht=null,pt=!1,ks=null,Fr=!1,r0=Error(r(519));function Ns(i){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Uu(jr(a,i)),r0}function tT(i){var a=i.stateNode,c=i.type,h=i.memoizedProps;switch(a[In]=i,a[lr]=h,c){case"dialog":lt("cancel",a),lt("close",a);break;case"iframe":case"object":case"embed":lt("load",a);break;case"video":case"audio":for(c=0;c<oc.length;c++)lt(oc[c],a);break;case"source":lt("error",a);break;case"img":case"image":case"link":lt("error",a),lt("load",a);break;case"details":lt("toggle",a);break;case"input":lt("invalid",a),mE(a,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":lt("invalid",a);break;case"textarea":lt("invalid",a),gE(a,h.value,h.defaultValue,h.children)}c=h.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||a.textContent===""+c||h.suppressHydrationWarning===!0||y2(a.textContent,c)?(h.popover!=null&&(lt("beforetoggle",a),lt("toggle",a)),h.onScroll!=null&&lt("scroll",a),h.onScrollEnd!=null&&lt("scrollend",a),h.onClick!=null&&(a.onclick=Xi),a=!0):a=!1,a||Ns(i,!0)}function nT(i){for(Ln=i.return;Ln;)switch(Ln.tag){case 5:case 31:case 13:Fr=!1;return;case 27:case 3:Fr=!0;return;default:Ln=Ln.return}}function Zo(i){if(i!==Ln)return!1;if(!pt)return nT(i),pt=!0,!1;var a=i.tag,c;if((c=a!==3&&a!==27)&&((c=a===5)&&(c=i.type,c=!(c!=="form"&&c!=="button")||Eg(i.type,i.memoizedProps)),c=!c),c&&Ht&&Ns(i),nT(i),a===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Ht=_2(i)}else if(a===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Ht=_2(i)}else a===27?(a=Ht,Vs(i.type)?(i=Ag,Ag=null,Ht=i):Ht=a):Ht=Ln?zr(i.stateNode.nextSibling):null;return!0}function Pa(){Ht=Ln=null,pt=!1}function i0(){var i=ks;return i!==null&&(hr===null?hr=i:hr.push.apply(hr,i),ks=null),i}function Uu(i){ks===null?ks=[i]:ks.push(i)}var s0=q(null),ja=null,Zi=null;function Rs(i,a,c){B(s0,a._currentValue),a._currentValue=c}function Ji(i){i._currentValue=s0.current,ie(s0)}function a0(i,a,c){for(;i!==null;){var h=i.alternate;if((i.childLanes&a)!==a?(i.childLanes|=a,h!==null&&(h.childLanes|=a)):h!==null&&(h.childLanes&a)!==a&&(h.childLanes|=a),i===c)break;i=i.return}}function o0(i,a,c,h){var x=i.child;for(x!==null&&(x.return=i);x!==null;){var T=x.dependencies;if(T!==null){var N=x.child;T=T.firstContext;e:for(;T!==null;){var L=T;T=x;for(var X=0;X<a.length;X++)if(L.context===a[X]){T.lanes|=c,L=T.alternate,L!==null&&(L.lanes|=c),a0(T.return,c,i),h||(N=null);break e}T=L.next}}else if(x.tag===18){if(N=x.return,N===null)throw Error(r(341));N.lanes|=c,T=N.alternate,T!==null&&(T.lanes|=c),a0(N,c,i),N=null}else N=x.child;if(N!==null)N.return=x;else for(N=x;N!==null;){if(N===i){N=null;break}if(x=N.sibling,x!==null){x.return=N.return,N=x;break}N=N.return}x=N}}function Jo(i,a,c,h){i=null;for(var x=a,T=!1;x!==null;){if(!T){if((x.flags&524288)!==0)T=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var N=x.alternate;if(N===null)throw Error(r(387));if(N=N.memoizedProps,N!==null){var L=x.type;Er(x.pendingProps.value,N.value)||(i!==null?i.push(L):i=[L])}}else if(x===he.current){if(N=x.alternate,N===null)throw Error(r(387));N.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(i!==null?i.push(dc):i=[dc])}x=x.return}i!==null&&o0(a,i,c,h),a.flags|=262144}function dd(i){for(i=i.firstContext;i!==null;){if(!Er(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Ba(i){ja=i,Zi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Pn(i){return rT(ja,i)}function hd(i,a){return ja===null&&Ba(i),rT(i,a)}function rT(i,a){var c=a._currentValue;if(a={context:a,memoizedValue:c,next:null},Zi===null){if(i===null)throw Error(r(308));Zi=a,i.dependencies={lanes:0,firstContext:a},i.flags|=524288}else Zi=Zi.next=a;return c}var QI=typeof AbortController<"u"?AbortController:function(){var i=[],a=this.signal={aborted:!1,addEventListener:function(c,h){i.push(h)}};this.abort=function(){a.aborted=!0,i.forEach(function(c){return c()})}},WI=e.unstable_scheduleCallback,ZI=e.unstable_NormalPriority,cn={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function l0(){return{controller:new QI,data:new Map,refCount:0}}function Fu(i){i.refCount--,i.refCount===0&&WI(ZI,function(){i.controller.abort()})}var Hu=null,u0=0,el=0,tl=null;function JI(i,a){if(Hu===null){var c=Hu=[];u0=0,el=dg(),tl={status:"pending",value:void 0,then:function(h){c.push(h)}}}return u0++,a.then(iT,iT),a}function iT(){if(--u0===0&&Hu!==null){tl!==null&&(tl.status="fulfilled");var i=Hu;Hu=null,el=0,tl=null;for(var a=0;a<i.length;a++)(0,i[a])()}}function eL(i,a){var c=[],h={status:"pending",value:null,reason:null,then:function(x){c.push(x)}};return i.then(function(){h.status="fulfilled",h.value=a;for(var x=0;x<c.length;x++)(0,c[x])(a)},function(x){for(h.status="rejected",h.reason=x,x=0;x<c.length;x++)(0,c[x])(void 0)}),h}var sT=I.S;I.S=function(i,a){zS=rt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&JI(i,a),sT!==null&&sT(i,a)};var Ua=q(null);function c0(){var i=Ua.current;return i!==null?i:Pt.pooledCache}function md(i,a){a===null?B(Ua,Ua.current):B(Ua,a.pool)}function aT(){var i=c0();return i===null?null:{parent:cn._currentValue,pool:i}}var nl=Error(r(460)),f0=Error(r(474)),pd=Error(r(542)),gd={then:function(){}};function oT(i){return i=i.status,i==="fulfilled"||i==="rejected"}function lT(i,a,c){switch(c=i[c],c===void 0?i.push(a):c!==a&&(a.then(Xi,Xi),a=c),a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,cT(i),i;default:if(typeof a.status=="string")a.then(Xi,Xi);else{if(i=Pt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=a,i.status="pending",i.then(function(h){if(a.status==="pending"){var x=a;x.status="fulfilled",x.value=h}},function(h){if(a.status==="pending"){var x=a;x.status="rejected",x.reason=h}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,cT(i),i}throw Ha=a,nl}}function Fa(i){try{var a=i._init;return a(i._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(Ha=c,nl):c}}var Ha=null;function uT(){if(Ha===null)throw Error(r(459));var i=Ha;return Ha=null,i}function cT(i){if(i===nl||i===pd)throw Error(r(483))}var rl=null,zu=0;function bd(i){var a=zu;return zu+=1,rl===null&&(rl=[]),lT(rl,i,a)}function Vu(i,a){a=a.props.ref,i.ref=a!==void 0?a:null}function yd(i,a){throw a.$$typeof===g?Error(r(525)):(i=Object.prototype.toString.call(a),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":i)))}function fT(i){function a(ee,Z){if(i){var se=ee.deletions;se===null?(ee.deletions=[Z],ee.flags|=16):se.push(Z)}}function c(ee,Z){if(!i)return null;for(;Z!==null;)a(ee,Z),Z=Z.sibling;return null}function h(ee){for(var Z=new Map;ee!==null;)ee.key!==null?Z.set(ee.key,ee):Z.set(ee.index,ee),ee=ee.sibling;return Z}function x(ee,Z){return ee=Qi(ee,Z),ee.index=0,ee.sibling=null,ee}function T(ee,Z,se){return ee.index=se,i?(se=ee.alternate,se!==null?(se=se.index,se<Z?(ee.flags|=67108866,Z):se):(ee.flags|=67108866,Z)):(ee.flags|=1048576,Z)}function N(ee){return i&&ee.alternate===null&&(ee.flags|=67108866),ee}function L(ee,Z,se,me){return Z===null||Z.tag!==6?(Z=Jp(se,ee.mode,me),Z.return=ee,Z):(Z=x(Z,se),Z.return=ee,Z)}function X(ee,Z,se,me){var Fe=se.type;return Fe===S?fe(ee,Z,se.props.children,me,se.key):Z!==null&&(Z.elementType===Fe||typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===P&&Fa(Fe)===Z.type)?(Z=x(Z,se.props),Vu(Z,se),Z.return=ee,Z):(Z=cd(se.type,se.key,se.props,null,ee.mode,me),Vu(Z,se),Z.return=ee,Z)}function ae(ee,Z,se,me){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==se.containerInfo||Z.stateNode.implementation!==se.implementation?(Z=e0(se,ee.mode,me),Z.return=ee,Z):(Z=x(Z,se.children||[]),Z.return=ee,Z)}function fe(ee,Z,se,me,Fe){return Z===null||Z.tag!==7?(Z=La(se,ee.mode,me,Fe),Z.return=ee,Z):(Z=x(Z,se),Z.return=ee,Z)}function pe(ee,Z,se){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=Jp(""+Z,ee.mode,se),Z.return=ee,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case y:return se=cd(Z.type,Z.key,Z.props,null,ee.mode,se),Vu(se,Z),se.return=ee,se;case E:return Z=e0(Z,ee.mode,se),Z.return=ee,Z;case P:return Z=Fa(Z),pe(ee,Z,se)}if(W(Z)||Y(Z))return Z=La(Z,ee.mode,se,null),Z.return=ee,Z;if(typeof Z.then=="function")return pe(ee,bd(Z),se);if(Z.$$typeof===k)return pe(ee,hd(ee,Z),se);yd(ee,Z)}return null}function oe(ee,Z,se,me){var Fe=Z!==null?Z.key:null;if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return Fe!==null?null:L(ee,Z,""+se,me);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case y:return se.key===Fe?X(ee,Z,se,me):null;case E:return se.key===Fe?ae(ee,Z,se,me):null;case P:return se=Fa(se),oe(ee,Z,se,me)}if(W(se)||Y(se))return Fe!==null?null:fe(ee,Z,se,me,null);if(typeof se.then=="function")return oe(ee,Z,bd(se),me);if(se.$$typeof===k)return oe(ee,Z,hd(ee,se),me);yd(ee,se)}return null}function le(ee,Z,se,me,Fe){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return ee=ee.get(se)||null,L(Z,ee,""+me,Fe);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case y:return ee=ee.get(me.key===null?se:me.key)||null,X(Z,ee,me,Fe);case E:return ee=ee.get(me.key===null?se:me.key)||null,ae(Z,ee,me,Fe);case P:return me=Fa(me),le(ee,Z,se,me,Fe)}if(W(me)||Y(me))return ee=ee.get(se)||null,fe(Z,ee,me,Fe,null);if(typeof me.then=="function")return le(ee,Z,se,bd(me),Fe);if(me.$$typeof===k)return le(ee,Z,se,hd(Z,me),Fe);yd(Z,me)}return null}function De(ee,Z,se,me){for(var Fe=null,vt=null,je=Z,Je=Z=0,ft=null;je!==null&&Je<se.length;Je++){je.index>Je?(ft=je,je=null):ft=je.sibling;var Et=oe(ee,je,se[Je],me);if(Et===null){je===null&&(je=ft);break}i&&je&&Et.alternate===null&&a(ee,je),Z=T(Et,Z,Je),vt===null?Fe=Et:vt.sibling=Et,vt=Et,je=ft}if(Je===se.length)return c(ee,je),pt&&Wi(ee,Je),Fe;if(je===null){for(;Je<se.length;Je++)je=pe(ee,se[Je],me),je!==null&&(Z=T(je,Z,Je),vt===null?Fe=je:vt.sibling=je,vt=je);return pt&&Wi(ee,Je),Fe}for(je=h(je);Je<se.length;Je++)ft=le(je,ee,Je,se[Je],me),ft!==null&&(i&&ft.alternate!==null&&je.delete(ft.key===null?Je:ft.key),Z=T(ft,Z,Je),vt===null?Fe=ft:vt.sibling=ft,vt=ft);return i&&je.forEach(function(Xs){return a(ee,Xs)}),pt&&Wi(ee,Je),Fe}function qe(ee,Z,se,me){if(se==null)throw Error(r(151));for(var Fe=null,vt=null,je=Z,Je=Z=0,ft=null,Et=se.next();je!==null&&!Et.done;Je++,Et=se.next()){je.index>Je?(ft=je,je=null):ft=je.sibling;var Xs=oe(ee,je,Et.value,me);if(Xs===null){je===null&&(je=ft);break}i&&je&&Xs.alternate===null&&a(ee,je),Z=T(Xs,Z,Je),vt===null?Fe=Xs:vt.sibling=Xs,vt=Xs,je=ft}if(Et.done)return c(ee,je),pt&&Wi(ee,Je),Fe;if(je===null){for(;!Et.done;Je++,Et=se.next())Et=pe(ee,Et.value,me),Et!==null&&(Z=T(Et,Z,Je),vt===null?Fe=Et:vt.sibling=Et,vt=Et);return pt&&Wi(ee,Je),Fe}for(je=h(je);!Et.done;Je++,Et=se.next())Et=le(je,ee,Je,Et.value,me),Et!==null&&(i&&Et.alternate!==null&&je.delete(Et.key===null?Je:Et.key),Z=T(Et,Z,Je),vt===null?Fe=Et:vt.sibling=Et,vt=Et);return i&&je.forEach(function(fP){return a(ee,fP)}),pt&&Wi(ee,Je),Fe}function Mt(ee,Z,se,me){if(typeof se=="object"&&se!==null&&se.type===S&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case y:e:{for(var Fe=se.key;Z!==null;){if(Z.key===Fe){if(Fe=se.type,Fe===S){if(Z.tag===7){c(ee,Z.sibling),me=x(Z,se.props.children),me.return=ee,ee=me;break e}}else if(Z.elementType===Fe||typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===P&&Fa(Fe)===Z.type){c(ee,Z.sibling),me=x(Z,se.props),Vu(me,se),me.return=ee,ee=me;break e}c(ee,Z);break}else a(ee,Z);Z=Z.sibling}se.type===S?(me=La(se.props.children,ee.mode,me,se.key),me.return=ee,ee=me):(me=cd(se.type,se.key,se.props,null,ee.mode,me),Vu(me,se),me.return=ee,ee=me)}return N(ee);case E:e:{for(Fe=se.key;Z!==null;){if(Z.key===Fe)if(Z.tag===4&&Z.stateNode.containerInfo===se.containerInfo&&Z.stateNode.implementation===se.implementation){c(ee,Z.sibling),me=x(Z,se.children||[]),me.return=ee,ee=me;break e}else{c(ee,Z);break}else a(ee,Z);Z=Z.sibling}me=e0(se,ee.mode,me),me.return=ee,ee=me}return N(ee);case P:return se=Fa(se),Mt(ee,Z,se,me)}if(W(se))return De(ee,Z,se,me);if(Y(se)){if(Fe=Y(se),typeof Fe!="function")throw Error(r(150));return se=Fe.call(se),qe(ee,Z,se,me)}if(typeof se.then=="function")return Mt(ee,Z,bd(se),me);if(se.$$typeof===k)return Mt(ee,Z,hd(ee,se),me);yd(ee,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,Z!==null&&Z.tag===6?(c(ee,Z.sibling),me=x(Z,se),me.return=ee,ee=me):(c(ee,Z),me=Jp(se,ee.mode,me),me.return=ee,ee=me),N(ee)):c(ee,Z)}return function(ee,Z,se,me){try{zu=0;var Fe=Mt(ee,Z,se,me);return rl=null,Fe}catch(je){if(je===nl||je===pd)throw je;var vt=Tr(29,je,null,ee.mode);return vt.lanes=me,vt.return=ee,vt}finally{}}}var za=fT(!0),dT=fT(!1),Os=!1;function d0(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function h0(i,a){i=i.updateQueue,a.updateQueue===i&&(a.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Ds(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ms(i,a,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(Ct&2)!==0){var x=h.pending;return x===null?a.next=a:(a.next=x.next,x.next=a),h.pending=a,a=ud(i),KE(i,null,c),a}return ld(i,h,a,c),ud(i)}function qu(i,a,c){if(a=a.updateQueue,a!==null&&(a=a.shared,(c&4194048)!==0)){var h=a.lanes;h&=i.pendingLanes,c|=h,a.lanes=c,Au(i,c)}}function m0(i,a){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var x=null,T=null;if(c=c.firstBaseUpdate,c!==null){do{var N={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};T===null?x=T=N:T=T.next=N,c=c.next}while(c!==null);T===null?x=T=a:T=T.next=a}else x=T=a;c={baseState:h.baseState,firstBaseUpdate:x,lastBaseUpdate:T,shared:h.shared,callbacks:h.callbacks},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=a:i.next=a,c.lastBaseUpdate=a}var p0=!1;function $u(){if(p0){var i=tl;if(i!==null)throw i}}function Yu(i,a,c,h){p0=!1;var x=i.updateQueue;Os=!1;var T=x.firstBaseUpdate,N=x.lastBaseUpdate,L=x.shared.pending;if(L!==null){x.shared.pending=null;var X=L,ae=X.next;X.next=null,N===null?T=ae:N.next=ae,N=X;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,L=fe.lastBaseUpdate,L!==N&&(L===null?fe.firstBaseUpdate=ae:L.next=ae,fe.lastBaseUpdate=X))}if(T!==null){var pe=x.baseState;N=0,fe=ae=X=null,L=T;do{var oe=L.lane&-536870913,le=oe!==L.lane;if(le?(ct&oe)===oe:(h&oe)===oe){oe!==0&&oe===el&&(p0=!0),fe!==null&&(fe=fe.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var De=i,qe=L;oe=a;var Mt=c;switch(qe.tag){case 1:if(De=qe.payload,typeof De=="function"){pe=De.call(Mt,pe,oe);break e}pe=De;break e;case 3:De.flags=De.flags&-65537|128;case 0:if(De=qe.payload,oe=typeof De=="function"?De.call(Mt,pe,oe):De,oe==null)break e;pe=p({},pe,oe);break e;case 2:Os=!0}}oe=L.callback,oe!==null&&(i.flags|=64,le&&(i.flags|=8192),le=x.callbacks,le===null?x.callbacks=[oe]:le.push(oe))}else le={lane:oe,tag:L.tag,payload:L.payload,callback:L.callback,next:null},fe===null?(ae=fe=le,X=pe):fe=fe.next=le,N|=oe;if(L=L.next,L===null){if(L=x.shared.pending,L===null)break;le=L,L=le.next,le.next=null,x.lastBaseUpdate=le,x.shared.pending=null}}while(!0);fe===null&&(X=pe),x.baseState=X,x.firstBaseUpdate=ae,x.lastBaseUpdate=fe,T===null&&(x.shared.lanes=0),Bs|=N,i.lanes=N,i.memoizedState=pe}}function hT(i,a){if(typeof i!="function")throw Error(r(191,i));i.call(a)}function mT(i,a){var c=i.callbacks;if(c!==null)for(i.callbacks=null,i=0;i<c.length;i++)hT(c[i],a)}var il=q(null),xd=q(0);function pT(i,a){i=ls,B(xd,i),B(il,a),ls=i|a.baseLanes}function g0(){B(xd,ls),B(il,il.current)}function b0(){ls=xd.current,ie(il),ie(xd)}var Sr=q(null),Hr=null;function Is(i){var a=i.alternate;B(sn,sn.current&1),B(Sr,i),Hr===null&&(a===null||il.current!==null||a.memoizedState!==null)&&(Hr=i)}function y0(i){B(sn,sn.current),B(Sr,i),Hr===null&&(Hr=i)}function gT(i){i.tag===22?(B(sn,sn.current),B(Sr,i),Hr===null&&(Hr=i)):Ls()}function Ls(){B(sn,sn.current),B(Sr,Sr.current)}function Cr(i){ie(Sr),Hr===i&&(Hr=null),ie(sn)}var sn=q(0);function vd(i){for(var a=i;a!==null;){if(a.tag===13){var c=a.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||Cg(c)||wg(c)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var es=0,We=null,Ot=null,fn=null,Ed=!1,sl=!1,Va=!1,Td=0,Gu=0,al=null,tL=0;function Wt(){throw Error(r(321))}function x0(i,a){if(a===null)return!1;for(var c=0;c<a.length&&c<i.length;c++)if(!Er(i[c],a[c]))return!1;return!0}function v0(i,a,c,h,x,T){return es=T,We=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,I.H=i===null||i.memoizedState===null?JT:L0,Va=!1,T=c(h,x),Va=!1,sl&&(T=yT(a,c,h,x)),bT(i),T}function bT(i){I.H=Qu;var a=Ot!==null&&Ot.next!==null;if(es=0,fn=Ot=We=null,Ed=!1,Gu=0,al=null,a)throw Error(r(300));i===null||dn||(i=i.dependencies,i!==null&&dd(i)&&(dn=!0))}function yT(i,a,c,h){We=i;var x=0;do{if(sl&&(al=null),Gu=0,sl=!1,25<=x)throw Error(r(301));if(x+=1,fn=Ot=null,i.updateQueue!=null){var T=i.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}I.H=eS,T=a(c,h)}while(sl);return T}function nL(){var i=I.H,a=i.useState()[0];return a=typeof a.then=="function"?Xu(a):a,i=i.useState()[0],(Ot!==null?Ot.memoizedState:null)!==i&&(We.flags|=1024),a}function E0(){var i=Td!==0;return Td=0,i}function T0(i,a,c){a.updateQueue=i.updateQueue,a.flags&=-2053,i.lanes&=~c}function S0(i){if(Ed){for(i=i.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Ed=!1}es=0,fn=Ot=We=null,sl=!1,Gu=Td=0,al=null}function Qn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fn===null?We.memoizedState=fn=i:fn=fn.next=i,fn}function an(){if(Ot===null){var i=We.alternate;i=i!==null?i.memoizedState:null}else i=Ot.next;var a=fn===null?We.memoizedState:fn.next;if(a!==null)fn=a,Ot=i;else{if(i===null)throw We.alternate===null?Error(r(467)):Error(r(310));Ot=i,i={memoizedState:Ot.memoizedState,baseState:Ot.baseState,baseQueue:Ot.baseQueue,queue:Ot.queue,next:null},fn===null?We.memoizedState=fn=i:fn=fn.next=i}return fn}function Sd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xu(i){var a=Gu;return Gu+=1,al===null&&(al=[]),i=lT(al,i,a),a=We,(fn===null?a.memoizedState:fn.next)===null&&(a=a.alternate,I.H=a===null||a.memoizedState===null?JT:L0),i}function Cd(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Xu(i);if(i.$$typeof===k)return Pn(i)}throw Error(r(438,String(i)))}function C0(i){var a=null,c=We.updateQueue;if(c!==null&&(a=c.memoCache),a==null){var h=We.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(a={data:h.data.map(function(x){return x.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),c===null&&(c=Sd(),We.updateQueue=c),c.memoCache=a,c=a.data[a.index],c===void 0)for(c=a.data[a.index]=Array(i),h=0;h<i;h++)c[h]=j;return a.index++,c}function ts(i,a){return typeof a=="function"?a(i):a}function wd(i){var a=an();return w0(a,Ot,i)}function w0(i,a,c){var h=i.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=c;var x=i.baseQueue,T=h.pending;if(T!==null){if(x!==null){var N=x.next;x.next=T.next,T.next=N}a.baseQueue=x=T,h.pending=null}if(T=i.baseState,x===null)i.memoizedState=T;else{a=x.next;var L=N=null,X=null,ae=a,fe=!1;do{var pe=ae.lane&-536870913;if(pe!==ae.lane?(ct&pe)===pe:(es&pe)===pe){var oe=ae.revertLane;if(oe===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),pe===el&&(fe=!0);else if((es&oe)===oe){ae=ae.next,oe===el&&(fe=!0);continue}else pe={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},X===null?(L=X=pe,N=T):X=X.next=pe,We.lanes|=oe,Bs|=oe;pe=ae.action,Va&&c(T,pe),T=ae.hasEagerState?ae.eagerState:c(T,pe)}else oe={lane:pe,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},X===null?(L=X=oe,N=T):X=X.next=oe,We.lanes|=pe,Bs|=pe;ae=ae.next}while(ae!==null&&ae!==a);if(X===null?N=T:X.next=L,!Er(T,i.memoizedState)&&(dn=!0,fe&&(c=tl,c!==null)))throw c;i.memoizedState=T,i.baseState=N,i.baseQueue=X,h.lastRenderedState=T}return x===null&&(h.lanes=0),[i.memoizedState,h.dispatch]}function A0(i){var a=an(),c=a.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=i;var h=c.dispatch,x=c.pending,T=a.memoizedState;if(x!==null){c.pending=null;var N=x=x.next;do T=i(T,N.action),N=N.next;while(N!==x);Er(T,a.memoizedState)||(dn=!0),a.memoizedState=T,a.baseQueue===null&&(a.baseState=T),c.lastRenderedState=T}return[T,h]}function xT(i,a,c){var h=We,x=an(),T=pt;if(T){if(c===void 0)throw Error(r(407));c=c()}else c=a();var N=!Er((Ot||x).memoizedState,c);if(N&&(x.memoizedState=c,dn=!0),x=x.queue,N0(TT.bind(null,h,x,i),[i]),x.getSnapshot!==a||N||fn!==null&&fn.memoizedState.tag&1){if(h.flags|=2048,ol(9,{destroy:void 0},ET.bind(null,h,x,c,a),null),Pt===null)throw Error(r(349));T||(es&127)!==0||vT(h,a,c)}return c}function vT(i,a,c){i.flags|=16384,i={getSnapshot:a,value:c},a=We.updateQueue,a===null?(a=Sd(),We.updateQueue=a,a.stores=[i]):(c=a.stores,c===null?a.stores=[i]:c.push(i))}function ET(i,a,c,h){a.value=c,a.getSnapshot=h,ST(a)&&CT(i)}function TT(i,a,c){return c(function(){ST(a)&&CT(i)})}function ST(i){var a=i.getSnapshot;i=i.value;try{var c=a();return!Er(i,c)}catch{return!0}}function CT(i){var a=Ia(i,2);a!==null&&mr(a,i,2)}function _0(i){var a=Qn();if(typeof i=="function"){var c=i;if(i=c(),Va){wn(!0);try{c()}finally{wn(!1)}}}return a.memoizedState=a.baseState=i,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:i},a}function wT(i,a,c,h){return i.baseState=c,w0(i,Ot,typeof h=="function"?h:ts)}function rL(i,a,c,h,x){if(kd(i))throw Error(r(485));if(i=a.action,i!==null){var T={payload:x,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){T.listeners.push(N)}};I.T!==null?c(!0):T.isTransition=!1,h(T),c=a.pending,c===null?(T.next=a.pending=T,AT(a,T)):(T.next=c.next,a.pending=c.next=T)}}function AT(i,a){var c=a.action,h=a.payload,x=i.state;if(a.isTransition){var T=I.T,N={};I.T=N;try{var L=c(x,h),X=I.S;X!==null&&X(N,L),_T(i,a,L)}catch(ae){k0(i,a,ae)}finally{T!==null&&N.types!==null&&(T.types=N.types),I.T=T}}else try{T=c(x,h),_T(i,a,T)}catch(ae){k0(i,a,ae)}}function _T(i,a,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(h){kT(i,a,h)},function(h){return k0(i,a,h)}):kT(i,a,c)}function kT(i,a,c){a.status="fulfilled",a.value=c,NT(a),i.state=c,a=i.pending,a!==null&&(c=a.next,c===a?i.pending=null:(c=c.next,a.next=c,AT(i,c)))}function k0(i,a,c){var h=i.pending;if(i.pending=null,h!==null){h=h.next;do a.status="rejected",a.reason=c,NT(a),a=a.next;while(a!==h)}i.action=null}function NT(i){i=i.listeners;for(var a=0;a<i.length;a++)(0,i[a])()}function RT(i,a){return a}function OT(i,a){if(pt){var c=Pt.formState;if(c!==null){e:{var h=We;if(pt){if(Ht){t:{for(var x=Ht,T=Fr;x.nodeType!==8;){if(!T){x=null;break t}if(x=zr(x.nextSibling),x===null){x=null;break t}}T=x.data,x=T==="F!"||T==="F"?x:null}if(x){Ht=zr(x.nextSibling),h=x.data==="F!";break e}}Ns(h)}h=!1}h&&(a=c[0])}}return c=Qn(),c.memoizedState=c.baseState=a,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:RT,lastRenderedState:a},c.queue=h,c=QT.bind(null,We,h),h.dispatch=c,h=_0(!1),T=I0.bind(null,We,!1,h.queue),h=Qn(),x={state:a,dispatch:null,action:i,pending:null},h.queue=x,c=rL.bind(null,We,x,T,c),x.dispatch=c,h.memoizedState=i,[a,c,!1]}function DT(i){var a=an();return MT(a,Ot,i)}function MT(i,a,c){if(a=w0(i,a,RT)[0],i=wd(ts)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var h=Xu(a)}catch(N){throw N===nl?pd:N}else h=a;a=an();var x=a.queue,T=x.dispatch;return c!==a.memoizedState&&(We.flags|=2048,ol(9,{destroy:void 0},iL.bind(null,x,c),null)),[h,T,i]}function iL(i,a){i.action=a}function IT(i){var a=an(),c=Ot;if(c!==null)return MT(a,c,i);an(),a=a.memoizedState,c=an();var h=c.queue.dispatch;return c.memoizedState=i,[a,h,!1]}function ol(i,a,c,h){return i={tag:i,create:c,deps:h,inst:a,next:null},a=We.updateQueue,a===null&&(a=Sd(),We.updateQueue=a),c=a.lastEffect,c===null?a.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,a.lastEffect=i),i}function LT(){return an().memoizedState}function Ad(i,a,c,h){var x=Qn();We.flags|=i,x.memoizedState=ol(1|a,{destroy:void 0},c,h===void 0?null:h)}function _d(i,a,c,h){var x=an();h=h===void 0?null:h;var T=x.memoizedState.inst;Ot!==null&&h!==null&&x0(h,Ot.memoizedState.deps)?x.memoizedState=ol(a,T,c,h):(We.flags|=i,x.memoizedState=ol(1|a,T,c,h))}function PT(i,a){Ad(8390656,8,i,a)}function N0(i,a){_d(2048,8,i,a)}function sL(i){We.flags|=4;var a=We.updateQueue;if(a===null)a=Sd(),We.updateQueue=a,a.events=[i];else{var c=a.events;c===null?a.events=[i]:c.push(i)}}function jT(i){var a=an().memoizedState;return sL({ref:a,nextImpl:i}),function(){if((Ct&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function BT(i,a){return _d(4,2,i,a)}function UT(i,a){return _d(4,4,i,a)}function FT(i,a){if(typeof a=="function"){i=i();var c=a(i);return function(){typeof c=="function"?c():a(null)}}if(a!=null)return i=i(),a.current=i,function(){a.current=null}}function HT(i,a,c){c=c!=null?c.concat([i]):null,_d(4,4,FT.bind(null,a,i),c)}function R0(){}function zT(i,a){var c=an();a=a===void 0?null:a;var h=c.memoizedState;return a!==null&&x0(a,h[1])?h[0]:(c.memoizedState=[i,a],i)}function VT(i,a){var c=an();a=a===void 0?null:a;var h=c.memoizedState;if(a!==null&&x0(a,h[1]))return h[0];if(h=i(),Va){wn(!0);try{i()}finally{wn(!1)}}return c.memoizedState=[h,a],h}function O0(i,a,c){return c===void 0||(es&1073741824)!==0&&(ct&261930)===0?i.memoizedState=a:(i.memoizedState=c,i=qS(),We.lanes|=i,Bs|=i,c)}function qT(i,a,c,h){return Er(c,a)?c:il.current!==null?(i=O0(i,c,h),Er(i,a)||(dn=!0),i):(es&42)===0||(es&1073741824)!==0&&(ct&261930)===0?(dn=!0,i.memoizedState=c):(i=qS(),We.lanes|=i,Bs|=i,a)}function $T(i,a,c,h,x){var T=H.p;H.p=T!==0&&8>T?T:8;var N=I.T,L={};I.T=L,I0(i,!1,a,c);try{var X=x(),ae=I.S;if(ae!==null&&ae(L,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var fe=eL(X,h);Ku(i,a,fe,_r(i))}else Ku(i,a,h,_r(i))}catch(pe){Ku(i,a,{then:function(){},status:"rejected",reason:pe},_r())}finally{H.p=T,N!==null&&L.types!==null&&(N.types=L.types),I.T=N}}function aL(){}function D0(i,a,c,h){if(i.tag!==5)throw Error(r(476));var x=YT(i).queue;$T(i,x,a,$,c===null?aL:function(){return GT(i),c(h)})}function YT(i){var a=i.memoizedState;if(a!==null)return a;a={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:$},next:null};var c={};return a.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:c},next:null},i.memoizedState=a,i=i.alternate,i!==null&&(i.memoizedState=a),a}function GT(i){var a=YT(i);a.next===null&&(a=i.alternate.memoizedState),Ku(i,a.next.queue,{},_r())}function M0(){return Pn(dc)}function XT(){return an().memoizedState}function KT(){return an().memoizedState}function oL(i){for(var a=i.return;a!==null;){switch(a.tag){case 24:case 3:var c=_r();i=Ds(c);var h=Ms(a,i,c);h!==null&&(mr(h,a,c),qu(h,a,c)),a={cache:l0()},i.payload=a;return}a=a.return}}function lL(i,a,c){var h=_r();c={lane:h,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},kd(i)?WT(a,c):(c=Wp(i,a,c,h),c!==null&&(mr(c,i,h),ZT(c,a,h)))}function QT(i,a,c){var h=_r();Ku(i,a,c,h)}function Ku(i,a,c,h){var x={lane:h,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(kd(i))WT(a,x);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=a.lastRenderedReducer,T!==null))try{var N=a.lastRenderedState,L=T(N,c);if(x.hasEagerState=!0,x.eagerState=L,Er(L,N))return ld(i,a,x,0),Pt===null&&od(),!1}catch{}finally{}if(c=Wp(i,a,x,h),c!==null)return mr(c,i,h),ZT(c,a,h),!0}return!1}function I0(i,a,c,h){if(h={lane:2,revertLane:dg(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},kd(i)){if(a)throw Error(r(479))}else a=Wp(i,c,h,2),a!==null&&mr(a,i,2)}function kd(i){var a=i.alternate;return i===We||a!==null&&a===We}function WT(i,a){sl=Ed=!0;var c=i.pending;c===null?a.next=a:(a.next=c.next,c.next=a),i.pending=a}function ZT(i,a,c){if((c&4194048)!==0){var h=a.lanes;h&=i.pendingLanes,c|=h,a.lanes=c,Au(i,c)}}var Qu={readContext:Pn,use:Cd,useCallback:Wt,useContext:Wt,useEffect:Wt,useImperativeHandle:Wt,useLayoutEffect:Wt,useInsertionEffect:Wt,useMemo:Wt,useReducer:Wt,useRef:Wt,useState:Wt,useDebugValue:Wt,useDeferredValue:Wt,useTransition:Wt,useSyncExternalStore:Wt,useId:Wt,useHostTransitionStatus:Wt,useFormState:Wt,useActionState:Wt,useOptimistic:Wt,useMemoCache:Wt,useCacheRefresh:Wt};Qu.useEffectEvent=Wt;var JT={readContext:Pn,use:Cd,useCallback:function(i,a){return Qn().memoizedState=[i,a===void 0?null:a],i},useContext:Pn,useEffect:PT,useImperativeHandle:function(i,a,c){c=c!=null?c.concat([i]):null,Ad(4194308,4,FT.bind(null,a,i),c)},useLayoutEffect:function(i,a){return Ad(4194308,4,i,a)},useInsertionEffect:function(i,a){Ad(4,2,i,a)},useMemo:function(i,a){var c=Qn();a=a===void 0?null:a;var h=i();if(Va){wn(!0);try{i()}finally{wn(!1)}}return c.memoizedState=[h,a],h},useReducer:function(i,a,c){var h=Qn();if(c!==void 0){var x=c(a);if(Va){wn(!0);try{c(a)}finally{wn(!1)}}}else x=a;return h.memoizedState=h.baseState=x,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:x},h.queue=i,i=i.dispatch=lL.bind(null,We,i),[h.memoizedState,i]},useRef:function(i){var a=Qn();return i={current:i},a.memoizedState=i},useState:function(i){i=_0(i);var a=i.queue,c=QT.bind(null,We,a);return a.dispatch=c,[i.memoizedState,c]},useDebugValue:R0,useDeferredValue:function(i,a){var c=Qn();return O0(c,i,a)},useTransition:function(){var i=_0(!1);return i=$T.bind(null,We,i.queue,!0,!1),Qn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,a,c){var h=We,x=Qn();if(pt){if(c===void 0)throw Error(r(407));c=c()}else{if(c=a(),Pt===null)throw Error(r(349));(ct&127)!==0||vT(h,a,c)}x.memoizedState=c;var T={value:c,getSnapshot:a};return x.queue=T,PT(TT.bind(null,h,T,i),[i]),h.flags|=2048,ol(9,{destroy:void 0},ET.bind(null,h,T,c,a),null),c},useId:function(){var i=Qn(),a=Pt.identifierPrefix;if(pt){var c=wi,h=Ci;c=(h&~(1<<32-St(h)-1)).toString(32)+c,a="_"+a+"R_"+c,c=Td++,0<c&&(a+="H"+c.toString(32)),a+="_"}else c=tL++,a="_"+a+"r_"+c.toString(32)+"_";return i.memoizedState=a},useHostTransitionStatus:M0,useFormState:OT,useActionState:OT,useOptimistic:function(i){var a=Qn();a.memoizedState=a.baseState=i;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=c,a=I0.bind(null,We,!0,c),c.dispatch=a,[i,a]},useMemoCache:C0,useCacheRefresh:function(){return Qn().memoizedState=oL.bind(null,We)},useEffectEvent:function(i){var a=Qn(),c={impl:i};return a.memoizedState=c,function(){if((Ct&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}},L0={readContext:Pn,use:Cd,useCallback:zT,useContext:Pn,useEffect:N0,useImperativeHandle:HT,useInsertionEffect:BT,useLayoutEffect:UT,useMemo:VT,useReducer:wd,useRef:LT,useState:function(){return wd(ts)},useDebugValue:R0,useDeferredValue:function(i,a){var c=an();return qT(c,Ot.memoizedState,i,a)},useTransition:function(){var i=wd(ts)[0],a=an().memoizedState;return[typeof i=="boolean"?i:Xu(i),a]},useSyncExternalStore:xT,useId:XT,useHostTransitionStatus:M0,useFormState:DT,useActionState:DT,useOptimistic:function(i,a){var c=an();return wT(c,Ot,i,a)},useMemoCache:C0,useCacheRefresh:KT};L0.useEffectEvent=jT;var eS={readContext:Pn,use:Cd,useCallback:zT,useContext:Pn,useEffect:N0,useImperativeHandle:HT,useInsertionEffect:BT,useLayoutEffect:UT,useMemo:VT,useReducer:A0,useRef:LT,useState:function(){return A0(ts)},useDebugValue:R0,useDeferredValue:function(i,a){var c=an();return Ot===null?O0(c,i,a):qT(c,Ot.memoizedState,i,a)},useTransition:function(){var i=A0(ts)[0],a=an().memoizedState;return[typeof i=="boolean"?i:Xu(i),a]},useSyncExternalStore:xT,useId:XT,useHostTransitionStatus:M0,useFormState:IT,useActionState:IT,useOptimistic:function(i,a){var c=an();return Ot!==null?wT(c,Ot,i,a):(c.baseState=i,[i,c.queue.dispatch])},useMemoCache:C0,useCacheRefresh:KT};eS.useEffectEvent=jT;function P0(i,a,c,h){a=i.memoizedState,c=c(h,a),c=c==null?a:p({},a,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var j0={enqueueSetState:function(i,a,c){i=i._reactInternals;var h=_r(),x=Ds(h);x.payload=a,c!=null&&(x.callback=c),a=Ms(i,x,h),a!==null&&(mr(a,i,h),qu(a,i,h))},enqueueReplaceState:function(i,a,c){i=i._reactInternals;var h=_r(),x=Ds(h);x.tag=1,x.payload=a,c!=null&&(x.callback=c),a=Ms(i,x,h),a!==null&&(mr(a,i,h),qu(a,i,h))},enqueueForceUpdate:function(i,a){i=i._reactInternals;var c=_r(),h=Ds(c);h.tag=2,a!=null&&(h.callback=a),a=Ms(i,h,c),a!==null&&(mr(a,i,c),qu(a,i,c))}};function tS(i,a,c,h,x,T,N){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,N):a.prototype&&a.prototype.isPureReactComponent?!Pu(c,h)||!Pu(x,T):!0}function nS(i,a,c,h){i=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(c,h),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(c,h),a.state!==i&&j0.enqueueReplaceState(a,a.state,null)}function qa(i,a){var c=a;if("ref"in a){c={};for(var h in a)h!=="ref"&&(c[h]=a[h])}if(i=i.defaultProps){c===a&&(c=p({},c));for(var x in i)c[x]===void 0&&(c[x]=i[x])}return c}function rS(i){ad(i)}function iS(i){console.error(i)}function sS(i){ad(i)}function Nd(i,a){try{var c=i.onUncaughtError;c(a.value,{componentStack:a.stack})}catch(h){setTimeout(function(){throw h})}}function aS(i,a,c){try{var h=i.onCaughtError;h(c.value,{componentStack:c.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function B0(i,a,c){return c=Ds(c),c.tag=3,c.payload={element:null},c.callback=function(){Nd(i,a)},c}function oS(i){return i=Ds(i),i.tag=3,i}function lS(i,a,c,h){var x=c.type.getDerivedStateFromError;if(typeof x=="function"){var T=h.value;i.payload=function(){return x(T)},i.callback=function(){aS(a,c,h)}}var N=c.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(i.callback=function(){aS(a,c,h),typeof x!="function"&&(Us===null?Us=new Set([this]):Us.add(this));var L=h.stack;this.componentDidCatch(h.value,{componentStack:L!==null?L:""})})}function uL(i,a,c,h,x){if(c.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(a=c.alternate,a!==null&&Jo(a,c,x,!0),c=Sr.current,c!==null){switch(c.tag){case 31:case 13:return Hr===null?Hd():c.alternate===null&&Zt===0&&(Zt=3),c.flags&=-257,c.flags|=65536,c.lanes=x,h===gd?c.flags|=16384:(a=c.updateQueue,a===null?c.updateQueue=new Set([h]):a.add(h),ug(i,h,x)),!1;case 22:return c.flags|=65536,h===gd?c.flags|=16384:(a=c.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([h])},c.updateQueue=a):(c=a.retryQueue,c===null?a.retryQueue=new Set([h]):c.add(h)),ug(i,h,x)),!1}throw Error(r(435,c.tag))}return ug(i,h,x),Hd(),!1}if(pt)return a=Sr.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=x,h!==r0&&(i=Error(r(422),{cause:h}),Uu(jr(i,c)))):(h!==r0&&(a=Error(r(423),{cause:h}),Uu(jr(a,c))),i=i.current.alternate,i.flags|=65536,x&=-x,i.lanes|=x,h=jr(h,c),x=B0(i.stateNode,h,x),m0(i,x),Zt!==4&&(Zt=2)),!1;var T=Error(r(520),{cause:h});if(T=jr(T,c),ic===null?ic=[T]:ic.push(T),Zt!==4&&(Zt=2),a===null)return!0;h=jr(h,c),c=a;do{switch(c.tag){case 3:return c.flags|=65536,i=x&-x,c.lanes|=i,i=B0(c.stateNode,h,i),m0(c,i),!1;case 1:if(a=c.type,T=c.stateNode,(c.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Us===null||!Us.has(T))))return c.flags|=65536,x&=-x,c.lanes|=x,x=oS(x),lS(x,i,c,h),m0(c,x),!1}c=c.return}while(c!==null);return!1}var U0=Error(r(461)),dn=!1;function jn(i,a,c,h){a.child=i===null?dT(a,null,c,h):za(a,i.child,c,h)}function uS(i,a,c,h,x){c=c.render;var T=a.ref;if("ref"in h){var N={};for(var L in h)L!=="ref"&&(N[L]=h[L])}else N=h;return Ba(a),h=v0(i,a,c,N,T,x),L=E0(),i!==null&&!dn?(T0(i,a,x),ns(i,a,x)):(pt&&L&&t0(a),a.flags|=1,jn(i,a,h,x),a.child)}function cS(i,a,c,h,x){if(i===null){var T=c.type;return typeof T=="function"&&!Zp(T)&&T.defaultProps===void 0&&c.compare===null?(a.tag=15,a.type=T,fS(i,a,T,h,x)):(i=cd(c.type,null,h,a,a.mode,x),i.ref=a.ref,i.return=a,a.child=i)}if(T=i.child,!G0(i,x)){var N=T.memoizedProps;if(c=c.compare,c=c!==null?c:Pu,c(N,h)&&i.ref===a.ref)return ns(i,a,x)}return a.flags|=1,i=Qi(T,h),i.ref=a.ref,i.return=a,a.child=i}function fS(i,a,c,h,x){if(i!==null){var T=i.memoizedProps;if(Pu(T,h)&&i.ref===a.ref)if(dn=!1,a.pendingProps=h=T,G0(i,x))(i.flags&131072)!==0&&(dn=!0);else return a.lanes=i.lanes,ns(i,a,x)}return F0(i,a,c,h,x)}function dS(i,a,c,h){var x=h.children,T=i!==null?i.memoizedState:null;if(i===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((a.flags&128)!==0){if(T=T!==null?T.baseLanes|c:c,i!==null){for(h=a.child=i.child,x=0;h!==null;)x=x|h.lanes|h.childLanes,h=h.sibling;h=x&~T}else h=0,a.child=null;return hS(i,a,T,c,h)}if((c&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},i!==null&&md(a,T!==null?T.cachePool:null),T!==null?pT(a,T):g0(),gT(a);else return h=a.lanes=536870912,hS(i,a,T!==null?T.baseLanes|c:c,c,h)}else T!==null?(md(a,T.cachePool),pT(a,T),Ls(),a.memoizedState=null):(i!==null&&md(a,null),g0(),Ls());return jn(i,a,x,c),a.child}function Wu(i,a){return i!==null&&i.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function hS(i,a,c,h,x){var T=c0();return T=T===null?null:{parent:cn._currentValue,pool:T},a.memoizedState={baseLanes:c,cachePool:T},i!==null&&md(a,null),g0(),gT(a),i!==null&&Jo(i,a,h,!0),a.childLanes=x,null}function Rd(i,a){return a=Dd({mode:a.mode,children:a.children},i.mode),a.ref=i.ref,i.child=a,a.return=i,a}function mS(i,a,c){return za(a,i.child,null,c),i=Rd(a,a.pendingProps),i.flags|=2,Cr(a),a.memoizedState=null,i}function cL(i,a,c){var h=a.pendingProps,x=(a.flags&128)!==0;if(a.flags&=-129,i===null){if(pt){if(h.mode==="hidden")return i=Rd(a,h),a.lanes=536870912,Wu(null,i);if(y0(a),(i=Ht)?(i=A2(i,Fr),i=i!==null&&i.data==="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:_s!==null?{id:Ci,overflow:wi}:null,retryLane:536870912,hydrationErrors:null},c=WE(i),c.return=a,a.child=c,Ln=a,Ht=null)):i=null,i===null)throw Ns(a);return a.lanes=536870912,null}return Rd(a,h)}var T=i.memoizedState;if(T!==null){var N=T.dehydrated;if(y0(a),x)if(a.flags&256)a.flags&=-257,a=mS(i,a,c);else if(a.memoizedState!==null)a.child=i.child,a.flags|=128,a=null;else throw Error(r(558));else if(dn||Jo(i,a,c,!1),x=(c&i.childLanes)!==0,dn||x){if(h=Pt,h!==null&&(N=iE(h,c),N!==0&&N!==T.retryLane))throw T.retryLane=N,Ia(i,N),mr(h,i,N),U0;Hd(),a=mS(i,a,c)}else i=T.treeContext,Ht=zr(N.nextSibling),Ln=a,pt=!0,ks=null,Fr=!1,i!==null&&eT(a,i),a=Rd(a,h),a.flags|=4096;return a}return i=Qi(i.child,{mode:h.mode,children:h.children}),i.ref=a.ref,a.child=i,i.return=a,i}function Od(i,a){var c=a.ref;if(c===null)i!==null&&i.ref!==null&&(a.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(i===null||i.ref!==c)&&(a.flags|=4194816)}}function F0(i,a,c,h,x){return Ba(a),c=v0(i,a,c,h,void 0,x),h=E0(),i!==null&&!dn?(T0(i,a,x),ns(i,a,x)):(pt&&h&&t0(a),a.flags|=1,jn(i,a,c,x),a.child)}function pS(i,a,c,h,x,T){return Ba(a),a.updateQueue=null,c=yT(a,h,c,x),bT(i),h=E0(),i!==null&&!dn?(T0(i,a,T),ns(i,a,T)):(pt&&h&&t0(a),a.flags|=1,jn(i,a,c,T),a.child)}function gS(i,a,c,h,x){if(Ba(a),a.stateNode===null){var T=Ko,N=c.contextType;typeof N=="object"&&N!==null&&(T=Pn(N)),T=new c(h,T),a.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=j0,a.stateNode=T,T._reactInternals=a,T=a.stateNode,T.props=h,T.state=a.memoizedState,T.refs={},d0(a),N=c.contextType,T.context=typeof N=="object"&&N!==null?Pn(N):Ko,T.state=a.memoizedState,N=c.getDerivedStateFromProps,typeof N=="function"&&(P0(a,c,N,h),T.state=a.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(N=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),N!==T.state&&j0.enqueueReplaceState(T,T.state,null),Yu(a,h,T,x),$u(),T.state=a.memoizedState),typeof T.componentDidMount=="function"&&(a.flags|=4194308),h=!0}else if(i===null){T=a.stateNode;var L=a.memoizedProps,X=qa(c,L);T.props=X;var ae=T.context,fe=c.contextType;N=Ko,typeof fe=="object"&&fe!==null&&(N=Pn(fe));var pe=c.getDerivedStateFromProps;fe=typeof pe=="function"||typeof T.getSnapshotBeforeUpdate=="function",L=a.pendingProps!==L,fe||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(L||ae!==N)&&nS(a,T,h,N),Os=!1;var oe=a.memoizedState;T.state=oe,Yu(a,h,T,x),$u(),ae=a.memoizedState,L||oe!==ae||Os?(typeof pe=="function"&&(P0(a,c,pe,h),ae=a.memoizedState),(X=Os||tS(a,c,X,h,oe,ae,N))?(fe||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(a.flags|=4194308)):(typeof T.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=h,a.memoizedState=ae),T.props=h,T.state=ae,T.context=N,h=X):(typeof T.componentDidMount=="function"&&(a.flags|=4194308),h=!1)}else{T=a.stateNode,h0(i,a),N=a.memoizedProps,fe=qa(c,N),T.props=fe,pe=a.pendingProps,oe=T.context,ae=c.contextType,X=Ko,typeof ae=="object"&&ae!==null&&(X=Pn(ae)),L=c.getDerivedStateFromProps,(ae=typeof L=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(N!==pe||oe!==X)&&nS(a,T,h,X),Os=!1,oe=a.memoizedState,T.state=oe,Yu(a,h,T,x),$u();var le=a.memoizedState;N!==pe||oe!==le||Os||i!==null&&i.dependencies!==null&&dd(i.dependencies)?(typeof L=="function"&&(P0(a,c,L,h),le=a.memoizedState),(fe=Os||tS(a,c,fe,h,oe,le,X)||i!==null&&i.dependencies!==null&&dd(i.dependencies))?(ae||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(h,le,X),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(h,le,X)),typeof T.componentDidUpdate=="function"&&(a.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof T.componentDidUpdate!="function"||N===i.memoizedProps&&oe===i.memoizedState||(a.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===i.memoizedProps&&oe===i.memoizedState||(a.flags|=1024),a.memoizedProps=h,a.memoizedState=le),T.props=h,T.state=le,T.context=X,h=fe):(typeof T.componentDidUpdate!="function"||N===i.memoizedProps&&oe===i.memoizedState||(a.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===i.memoizedProps&&oe===i.memoizedState||(a.flags|=1024),h=!1)}return T=h,Od(i,a),h=(a.flags&128)!==0,T||h?(T=a.stateNode,c=h&&typeof c.getDerivedStateFromError!="function"?null:T.render(),a.flags|=1,i!==null&&h?(a.child=za(a,i.child,null,x),a.child=za(a,null,c,x)):jn(i,a,c,x),a.memoizedState=T.state,i=a.child):i=ns(i,a,x),i}function bS(i,a,c,h){return Pa(),a.flags|=256,jn(i,a,c,h),a.child}var H0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function z0(i){return{baseLanes:i,cachePool:aT()}}function V0(i,a,c){return i=i!==null?i.childLanes&~c:0,a&&(i|=Ar),i}function yS(i,a,c){var h=a.pendingProps,x=!1,T=(a.flags&128)!==0,N;if((N=T)||(N=i!==null&&i.memoizedState===null?!1:(sn.current&2)!==0),N&&(x=!0,a.flags&=-129),N=(a.flags&32)!==0,a.flags&=-33,i===null){if(pt){if(x?Is(a):Ls(),(i=Ht)?(i=A2(i,Fr),i=i!==null&&i.data!=="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:_s!==null?{id:Ci,overflow:wi}:null,retryLane:536870912,hydrationErrors:null},c=WE(i),c.return=a,a.child=c,Ln=a,Ht=null)):i=null,i===null)throw Ns(a);return wg(i)?a.lanes=32:a.lanes=536870912,null}var L=h.children;return h=h.fallback,x?(Ls(),x=a.mode,L=Dd({mode:"hidden",children:L},x),h=La(h,x,c,null),L.return=a,h.return=a,L.sibling=h,a.child=L,h=a.child,h.memoizedState=z0(c),h.childLanes=V0(i,N,c),a.memoizedState=H0,Wu(null,h)):(Is(a),q0(a,L))}var X=i.memoizedState;if(X!==null&&(L=X.dehydrated,L!==null)){if(T)a.flags&256?(Is(a),a.flags&=-257,a=$0(i,a,c)):a.memoizedState!==null?(Ls(),a.child=i.child,a.flags|=128,a=null):(Ls(),L=h.fallback,x=a.mode,h=Dd({mode:"visible",children:h.children},x),L=La(L,x,c,null),L.flags|=2,h.return=a,L.return=a,h.sibling=L,a.child=h,za(a,i.child,null,c),h=a.child,h.memoizedState=z0(c),h.childLanes=V0(i,N,c),a.memoizedState=H0,a=Wu(null,h));else if(Is(a),wg(L)){if(N=L.nextSibling&&L.nextSibling.dataset,N)var ae=N.dgst;N=ae,h=Error(r(419)),h.stack="",h.digest=N,Uu({value:h,source:null,stack:null}),a=$0(i,a,c)}else if(dn||Jo(i,a,c,!1),N=(c&i.childLanes)!==0,dn||N){if(N=Pt,N!==null&&(h=iE(N,c),h!==0&&h!==X.retryLane))throw X.retryLane=h,Ia(i,h),mr(N,i,h),U0;Cg(L)||Hd(),a=$0(i,a,c)}else Cg(L)?(a.flags|=192,a.child=i.child,a=null):(i=X.treeContext,Ht=zr(L.nextSibling),Ln=a,pt=!0,ks=null,Fr=!1,i!==null&&eT(a,i),a=q0(a,h.children),a.flags|=4096);return a}return x?(Ls(),L=h.fallback,x=a.mode,X=i.child,ae=X.sibling,h=Qi(X,{mode:"hidden",children:h.children}),h.subtreeFlags=X.subtreeFlags&65011712,ae!==null?L=Qi(ae,L):(L=La(L,x,c,null),L.flags|=2),L.return=a,h.return=a,h.sibling=L,a.child=h,Wu(null,h),h=a.child,L=i.child.memoizedState,L===null?L=z0(c):(x=L.cachePool,x!==null?(X=cn._currentValue,x=x.parent!==X?{parent:X,pool:X}:x):x=aT(),L={baseLanes:L.baseLanes|c,cachePool:x}),h.memoizedState=L,h.childLanes=V0(i,N,c),a.memoizedState=H0,Wu(i.child,h)):(Is(a),c=i.child,i=c.sibling,c=Qi(c,{mode:"visible",children:h.children}),c.return=a,c.sibling=null,i!==null&&(N=a.deletions,N===null?(a.deletions=[i],a.flags|=16):N.push(i)),a.child=c,a.memoizedState=null,c)}function q0(i,a){return a=Dd({mode:"visible",children:a},i.mode),a.return=i,i.child=a}function Dd(i,a){return i=Tr(22,i,null,a),i.lanes=0,i}function $0(i,a,c){return za(a,i.child,null,c),i=q0(a,a.pendingProps.children),i.flags|=2,a.memoizedState=null,i}function xS(i,a,c){i.lanes|=a;var h=i.alternate;h!==null&&(h.lanes|=a),a0(i.return,a,c)}function Y0(i,a,c,h,x,T){var N=i.memoizedState;N===null?i.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:x,treeForkCount:T}:(N.isBackwards=a,N.rendering=null,N.renderingStartTime=0,N.last=h,N.tail=c,N.tailMode=x,N.treeForkCount=T)}function vS(i,a,c){var h=a.pendingProps,x=h.revealOrder,T=h.tail;h=h.children;var N=sn.current,L=(N&2)!==0;if(L?(N=N&1|2,a.flags|=128):N&=1,B(sn,N),jn(i,a,h,c),h=pt?Bu:0,!L&&i!==null&&(i.flags&128)!==0)e:for(i=a.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&xS(i,c,a);else if(i.tag===19)xS(i,c,a);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break e;for(;i.sibling===null;){if(i.return===null||i.return===a)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(x){case"forwards":for(c=a.child,x=null;c!==null;)i=c.alternate,i!==null&&vd(i)===null&&(x=c),c=c.sibling;c=x,c===null?(x=a.child,a.child=null):(x=c.sibling,c.sibling=null),Y0(a,!1,x,c,T,h);break;case"backwards":case"unstable_legacy-backwards":for(c=null,x=a.child,a.child=null;x!==null;){if(i=x.alternate,i!==null&&vd(i)===null){a.child=x;break}i=x.sibling,x.sibling=c,c=x,x=i}Y0(a,!0,c,null,T,h);break;case"together":Y0(a,!1,null,null,void 0,h);break;default:a.memoizedState=null}return a.child}function ns(i,a,c){if(i!==null&&(a.dependencies=i.dependencies),Bs|=a.lanes,(c&a.childLanes)===0)if(i!==null){if(Jo(i,a,c,!1),(c&a.childLanes)===0)return null}else return null;if(i!==null&&a.child!==i.child)throw Error(r(153));if(a.child!==null){for(i=a.child,c=Qi(i,i.pendingProps),a.child=c,c.return=a;i.sibling!==null;)i=i.sibling,c=c.sibling=Qi(i,i.pendingProps),c.return=a;c.sibling=null}return a.child}function G0(i,a){return(i.lanes&a)!==0?!0:(i=i.dependencies,!!(i!==null&&dd(i)))}function fL(i,a,c){switch(a.tag){case 3:we(a,a.stateNode.containerInfo),Rs(a,cn,i.memoizedState.cache),Pa();break;case 27:case 5:Pe(a);break;case 4:we(a,a.stateNode.containerInfo);break;case 10:Rs(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,y0(a),null;break;case 13:var h=a.memoizedState;if(h!==null)return h.dehydrated!==null?(Is(a),a.flags|=128,null):(c&a.child.childLanes)!==0?yS(i,a,c):(Is(a),i=ns(i,a,c),i!==null?i.sibling:null);Is(a);break;case 19:var x=(i.flags&128)!==0;if(h=(c&a.childLanes)!==0,h||(Jo(i,a,c,!1),h=(c&a.childLanes)!==0),x){if(h)return vS(i,a,c);a.flags|=128}if(x=a.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),B(sn,sn.current),h)break;return null;case 22:return a.lanes=0,dS(i,a,c,a.pendingProps);case 24:Rs(a,cn,i.memoizedState.cache)}return ns(i,a,c)}function ES(i,a,c){if(i!==null)if(i.memoizedProps!==a.pendingProps)dn=!0;else{if(!G0(i,c)&&(a.flags&128)===0)return dn=!1,fL(i,a,c);dn=(i.flags&131072)!==0}else dn=!1,pt&&(a.flags&1048576)!==0&&JE(a,Bu,a.index);switch(a.lanes=0,a.tag){case 16:e:{var h=a.pendingProps;if(i=Fa(a.elementType),a.type=i,typeof i=="function")Zp(i)?(h=qa(i,h),a.tag=1,a=gS(null,a,i,h,c)):(a.tag=0,a=F0(null,a,i,h,c));else{if(i!=null){var x=i.$$typeof;if(x===R){a.tag=11,a=uS(null,a,i,h,c);break e}else if(x===D){a.tag=14,a=cS(null,a,i,h,c);break e}}throw a=te(i)||i,Error(r(306,a,""))}}return a;case 0:return F0(i,a,a.type,a.pendingProps,c);case 1:return h=a.type,x=qa(h,a.pendingProps),gS(i,a,h,x,c);case 3:e:{if(we(a,a.stateNode.containerInfo),i===null)throw Error(r(387));h=a.pendingProps;var T=a.memoizedState;x=T.element,h0(i,a),Yu(a,h,null,c);var N=a.memoizedState;if(h=N.cache,Rs(a,cn,h),h!==T.cache&&o0(a,[cn],c,!0),$u(),h=N.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:N.cache},a.updateQueue.baseState=T,a.memoizedState=T,a.flags&256){a=bS(i,a,h,c);break e}else if(h!==x){x=jr(Error(r(424)),a),Uu(x),a=bS(i,a,h,c);break e}else{switch(i=a.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(Ht=zr(i.firstChild),Ln=a,pt=!0,ks=null,Fr=!0,c=dT(a,null,h,c),a.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(Pa(),h===x){a=ns(i,a,c);break e}jn(i,a,h,c)}a=a.child}return a;case 26:return Od(i,a),i===null?(c=D2(a.type,null,a.pendingProps,null))?a.memoizedState=c:pt||(c=a.type,i=a.pendingProps,h=Xd(Ee.current).createElement(c),h[In]=a,h[lr]=i,Bn(h,c,i),An(h),a.stateNode=h):a.memoizedState=D2(a.type,i.memoizedProps,a.pendingProps,i.memoizedState),null;case 27:return Pe(a),i===null&&pt&&(h=a.stateNode=N2(a.type,a.pendingProps,Ee.current),Ln=a,Fr=!0,x=Ht,Vs(a.type)?(Ag=x,Ht=zr(h.firstChild)):Ht=x),jn(i,a,a.pendingProps.children,c),Od(i,a),i===null&&(a.flags|=4194304),a.child;case 5:return i===null&&pt&&((x=h=Ht)&&(h=HL(h,a.type,a.pendingProps,Fr),h!==null?(a.stateNode=h,Ln=a,Ht=zr(h.firstChild),Fr=!1,x=!0):x=!1),x||Ns(a)),Pe(a),x=a.type,T=a.pendingProps,N=i!==null?i.memoizedProps:null,h=T.children,Eg(x,T)?h=null:N!==null&&Eg(x,N)&&(a.flags|=32),a.memoizedState!==null&&(x=v0(i,a,nL,null,null,c),dc._currentValue=x),Od(i,a),jn(i,a,h,c),a.child;case 6:return i===null&&pt&&((i=c=Ht)&&(c=zL(c,a.pendingProps,Fr),c!==null?(a.stateNode=c,Ln=a,Ht=null,i=!0):i=!1),i||Ns(a)),null;case 13:return yS(i,a,c);case 4:return we(a,a.stateNode.containerInfo),h=a.pendingProps,i===null?a.child=za(a,null,h,c):jn(i,a,h,c),a.child;case 11:return uS(i,a,a.type,a.pendingProps,c);case 7:return jn(i,a,a.pendingProps,c),a.child;case 8:return jn(i,a,a.pendingProps.children,c),a.child;case 12:return jn(i,a,a.pendingProps.children,c),a.child;case 10:return h=a.pendingProps,Rs(a,a.type,h.value),jn(i,a,h.children,c),a.child;case 9:return x=a.type._context,h=a.pendingProps.children,Ba(a),x=Pn(x),h=h(x),a.flags|=1,jn(i,a,h,c),a.child;case 14:return cS(i,a,a.type,a.pendingProps,c);case 15:return fS(i,a,a.type,a.pendingProps,c);case 19:return vS(i,a,c);case 31:return cL(i,a,c);case 22:return dS(i,a,c,a.pendingProps);case 24:return Ba(a),h=Pn(cn),i===null?(x=c0(),x===null&&(x=Pt,T=l0(),x.pooledCache=T,T.refCount++,T!==null&&(x.pooledCacheLanes|=c),x=T),a.memoizedState={parent:h,cache:x},d0(a),Rs(a,cn,x)):((i.lanes&c)!==0&&(h0(i,a),Yu(a,null,null,c),$u()),x=i.memoizedState,T=a.memoizedState,x.parent!==h?(x={parent:h,cache:h},a.memoizedState=x,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=x),Rs(a,cn,h)):(h=T.cache,Rs(a,cn,h),h!==x.cache&&o0(a,[cn],c,!0))),jn(i,a,a.pendingProps.children,c),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function rs(i){i.flags|=4}function X0(i,a,c,h,x){if((a=(i.mode&32)!==0)&&(a=!1),a){if(i.flags|=16777216,(x&335544128)===x)if(i.stateNode.complete)i.flags|=8192;else if(XS())i.flags|=8192;else throw Ha=gd,f0}else i.flags&=-16777217}function TS(i,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!j2(a))if(XS())i.flags|=8192;else throw Ha=gd,f0}function Md(i,a){a!==null&&(i.flags|=4),i.flags&16384&&(a=i.tag!==22?ar():536870912,i.lanes|=a,fl|=a)}function Zu(i,a){if(!pt)switch(i.tailMode){case"hidden":a=i.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?a||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function zt(i){var a=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(a)for(var x=i.child;x!==null;)c|=x.lanes|x.childLanes,h|=x.subtreeFlags&65011712,h|=x.flags&65011712,x.return=i,x=x.sibling;else for(x=i.child;x!==null;)c|=x.lanes|x.childLanes,h|=x.subtreeFlags,h|=x.flags,x.return=i,x=x.sibling;return i.subtreeFlags|=h,i.childLanes=c,a}function dL(i,a,c){var h=a.pendingProps;switch(n0(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(a),null;case 1:return zt(a),null;case 3:return c=a.stateNode,h=null,i!==null&&(h=i.memoizedState.cache),a.memoizedState.cache!==h&&(a.flags|=2048),Ji(cn),Se(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(i===null||i.child===null)&&(Zo(a)?rs(a):i===null||i.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,i0())),zt(a),null;case 26:var x=a.type,T=a.memoizedState;return i===null?(rs(a),T!==null?(zt(a),TS(a,T)):(zt(a),X0(a,x,null,h,c))):T?T!==i.memoizedState?(rs(a),zt(a),TS(a,T)):(zt(a),a.flags&=-16777217):(i=i.memoizedProps,i!==h&&rs(a),zt(a),X0(a,x,i,h,c)),null;case 27:if(_e(a),c=Ee.current,x=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==h&&rs(a);else{if(!h){if(a.stateNode===null)throw Error(r(166));return zt(a),null}i=de.current,Zo(a)?tT(a):(i=N2(x,h,c),a.stateNode=i,rs(a))}return zt(a),null;case 5:if(_e(a),x=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==h&&rs(a);else{if(!h){if(a.stateNode===null)throw Error(r(166));return zt(a),null}if(T=de.current,Zo(a))tT(a);else{var N=Xd(Ee.current);switch(T){case 1:T=N.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:T=N.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":T=N.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":T=N.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":T=N.createElement("div"),T.innerHTML="<script><\/script>",T=T.removeChild(T.firstChild);break;case"select":T=typeof h.is=="string"?N.createElement("select",{is:h.is}):N.createElement("select"),h.multiple?T.multiple=!0:h.size&&(T.size=h.size);break;default:T=typeof h.is=="string"?N.createElement(x,{is:h.is}):N.createElement(x)}}T[In]=a,T[lr]=h;e:for(N=a.child;N!==null;){if(N.tag===5||N.tag===6)T.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===a)break e;for(;N.sibling===null;){if(N.return===null||N.return===a)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}a.stateNode=T;e:switch(Bn(T,x,h),x){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&rs(a)}}return zt(a),X0(a,a.type,i===null?null:i.memoizedProps,a.pendingProps,c),null;case 6:if(i&&a.stateNode!=null)i.memoizedProps!==h&&rs(a);else{if(typeof h!="string"&&a.stateNode===null)throw Error(r(166));if(i=Ee.current,Zo(a)){if(i=a.stateNode,c=a.memoizedProps,h=null,x=Ln,x!==null)switch(x.tag){case 27:case 5:h=x.memoizedProps}i[In]=a,i=!!(i.nodeValue===c||h!==null&&h.suppressHydrationWarning===!0||y2(i.nodeValue,c)),i||Ns(a,!0)}else i=Xd(i).createTextNode(h),i[In]=a,a.stateNode=i}return zt(a),null;case 31:if(c=a.memoizedState,i===null||i.memoizedState!==null){if(h=Zo(a),c!==null){if(i===null){if(!h)throw Error(r(318));if(i=a.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[In]=a}else Pa(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;zt(a),i=!1}else c=i0(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=c),i=!0;if(!i)return a.flags&256?(Cr(a),a):(Cr(a),null);if((a.flags&128)!==0)throw Error(r(558))}return zt(a),null;case 13:if(h=a.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(x=Zo(a),h!==null&&h.dehydrated!==null){if(i===null){if(!x)throw Error(r(318));if(x=a.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[In]=a}else Pa(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;zt(a),x=!1}else x=i0(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=x),x=!0;if(!x)return a.flags&256?(Cr(a),a):(Cr(a),null)}return Cr(a),(a.flags&128)!==0?(a.lanes=c,a):(c=h!==null,i=i!==null&&i.memoizedState!==null,c&&(h=a.child,x=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(x=h.alternate.memoizedState.cachePool.pool),T=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(T=h.memoizedState.cachePool.pool),T!==x&&(h.flags|=2048)),c!==i&&c&&(a.child.flags|=8192),Md(a,a.updateQueue),zt(a),null);case 4:return Se(),i===null&&gg(a.stateNode.containerInfo),zt(a),null;case 10:return Ji(a.type),zt(a),null;case 19:if(ie(sn),h=a.memoizedState,h===null)return zt(a),null;if(x=(a.flags&128)!==0,T=h.rendering,T===null)if(x)Zu(h,!1);else{if(Zt!==0||i!==null&&(i.flags&128)!==0)for(i=a.child;i!==null;){if(T=vd(i),T!==null){for(a.flags|=128,Zu(h,!1),i=T.updateQueue,a.updateQueue=i,Md(a,i),a.subtreeFlags=0,i=c,c=a.child;c!==null;)QE(c,i),c=c.sibling;return B(sn,sn.current&1|2),pt&&Wi(a,h.treeForkCount),a.child}i=i.sibling}h.tail!==null&&rt()>Bd&&(a.flags|=128,x=!0,Zu(h,!1),a.lanes=4194304)}else{if(!x)if(i=vd(T),i!==null){if(a.flags|=128,x=!0,i=i.updateQueue,a.updateQueue=i,Md(a,i),Zu(h,!0),h.tail===null&&h.tailMode==="hidden"&&!T.alternate&&!pt)return zt(a),null}else 2*rt()-h.renderingStartTime>Bd&&c!==536870912&&(a.flags|=128,x=!0,Zu(h,!1),a.lanes=4194304);h.isBackwards?(T.sibling=a.child,a.child=T):(i=h.last,i!==null?i.sibling=T:a.child=T,h.last=T)}return h.tail!==null?(i=h.tail,h.rendering=i,h.tail=i.sibling,h.renderingStartTime=rt(),i.sibling=null,c=sn.current,B(sn,x?c&1|2:c&1),pt&&Wi(a,h.treeForkCount),i):(zt(a),null);case 22:case 23:return Cr(a),b0(),h=a.memoizedState!==null,i!==null?i.memoizedState!==null!==h&&(a.flags|=8192):h&&(a.flags|=8192),h?(c&536870912)!==0&&(a.flags&128)===0&&(zt(a),a.subtreeFlags&6&&(a.flags|=8192)):zt(a),c=a.updateQueue,c!==null&&Md(a,c.retryQueue),c=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),h=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),h!==c&&(a.flags|=2048),i!==null&&ie(Ua),null;case 24:return c=null,i!==null&&(c=i.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),Ji(cn),zt(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function hL(i,a){switch(n0(a),a.tag){case 1:return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 3:return Ji(cn),Se(),i=a.flags,(i&65536)!==0&&(i&128)===0?(a.flags=i&-65537|128,a):null;case 26:case 27:case 5:return _e(a),null;case 31:if(a.memoizedState!==null){if(Cr(a),a.alternate===null)throw Error(r(340));Pa()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 13:if(Cr(a),i=a.memoizedState,i!==null&&i.dehydrated!==null){if(a.alternate===null)throw Error(r(340));Pa()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 19:return ie(sn),null;case 4:return Se(),null;case 10:return Ji(a.type),null;case 22:case 23:return Cr(a),b0(),i!==null&&ie(Ua),i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 24:return Ji(cn),null;case 25:return null;default:return null}}function SS(i,a){switch(n0(a),a.tag){case 3:Ji(cn),Se();break;case 26:case 27:case 5:_e(a);break;case 4:Se();break;case 31:a.memoizedState!==null&&Cr(a);break;case 13:Cr(a);break;case 19:ie(sn);break;case 10:Ji(a.type);break;case 22:case 23:Cr(a),b0(),i!==null&&ie(Ua);break;case 24:Ji(cn)}}function Ju(i,a){try{var c=a.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var x=h.next;c=x;do{if((c.tag&i)===i){h=void 0;var T=c.create,N=c.inst;h=T(),N.destroy=h}c=c.next}while(c!==x)}}catch(L){Rt(a,a.return,L)}}function Ps(i,a,c){try{var h=a.updateQueue,x=h!==null?h.lastEffect:null;if(x!==null){var T=x.next;h=T;do{if((h.tag&i)===i){var N=h.inst,L=N.destroy;if(L!==void 0){N.destroy=void 0,x=a;var X=c,ae=L;try{ae()}catch(fe){Rt(x,X,fe)}}}h=h.next}while(h!==T)}}catch(fe){Rt(a,a.return,fe)}}function CS(i){var a=i.updateQueue;if(a!==null){var c=i.stateNode;try{mT(a,c)}catch(h){Rt(i,i.return,h)}}}function wS(i,a,c){c.props=qa(i.type,i.memoizedProps),c.state=i.memoizedState;try{c.componentWillUnmount()}catch(h){Rt(i,a,h)}}function ec(i,a){try{var c=i.ref;if(c!==null){switch(i.tag){case 26:case 27:case 5:var h=i.stateNode;break;case 30:h=i.stateNode;break;default:h=i.stateNode}typeof c=="function"?i.refCleanup=c(h):c.current=h}}catch(x){Rt(i,a,x)}}function Ai(i,a){var c=i.ref,h=i.refCleanup;if(c!==null)if(typeof h=="function")try{h()}catch(x){Rt(i,a,x)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(x){Rt(i,a,x)}else c.current=null}function AS(i){var a=i.type,c=i.memoizedProps,h=i.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":c.autoFocus&&h.focus();break e;case"img":c.src?h.src=c.src:c.srcSet&&(h.srcset=c.srcSet)}}catch(x){Rt(i,i.return,x)}}function K0(i,a,c){try{var h=i.stateNode;LL(h,i.type,c,a),h[lr]=a}catch(x){Rt(i,i.return,x)}}function _S(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Vs(i.type)||i.tag===4}function Q0(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||_S(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Vs(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function W0(i,a,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,a?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(i,a):(a=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,a.appendChild(i),c=c._reactRootContainer,c!=null||a.onclick!==null||(a.onclick=Xi));else if(h!==4&&(h===27&&Vs(i.type)&&(c=i.stateNode,a=null),i=i.child,i!==null))for(W0(i,a,c),i=i.sibling;i!==null;)W0(i,a,c),i=i.sibling}function Id(i,a,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,a?c.insertBefore(i,a):c.appendChild(i);else if(h!==4&&(h===27&&Vs(i.type)&&(c=i.stateNode),i=i.child,i!==null))for(Id(i,a,c),i=i.sibling;i!==null;)Id(i,a,c),i=i.sibling}function kS(i){var a=i.stateNode,c=i.memoizedProps;try{for(var h=i.type,x=a.attributes;x.length;)a.removeAttributeNode(x[0]);Bn(a,h,c),a[In]=i,a[lr]=c}catch(T){Rt(i,i.return,T)}}var is=!1,hn=!1,Z0=!1,NS=typeof WeakSet=="function"?WeakSet:Set,_n=null;function mL(i,a){if(i=i.containerInfo,xg=th,i=HE(i),$p(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var x=h.anchorOffset,T=h.focusNode;h=h.focusOffset;try{c.nodeType,T.nodeType}catch{c=null;break e}var N=0,L=-1,X=-1,ae=0,fe=0,pe=i,oe=null;t:for(;;){for(var le;pe!==c||x!==0&&pe.nodeType!==3||(L=N+x),pe!==T||h!==0&&pe.nodeType!==3||(X=N+h),pe.nodeType===3&&(N+=pe.nodeValue.length),(le=pe.firstChild)!==null;)oe=pe,pe=le;for(;;){if(pe===i)break t;if(oe===c&&++ae===x&&(L=N),oe===T&&++fe===h&&(X=N),(le=pe.nextSibling)!==null)break;pe=oe,oe=pe.parentNode}pe=le}c=L===-1||X===-1?null:{start:L,end:X}}else c=null}c=c||{start:0,end:0}}else c=null;for(vg={focusedElem:i,selectionRange:c},th=!1,_n=a;_n!==null;)if(a=_n,i=a.child,(a.subtreeFlags&1028)!==0&&i!==null)i.return=a,_n=i;else for(;_n!==null;){switch(a=_n,T=a.alternate,i=a.flags,a.tag){case 0:if((i&4)!==0&&(i=a.updateQueue,i=i!==null?i.events:null,i!==null))for(c=0;c<i.length;c++)x=i[c],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&T!==null){i=void 0,c=a,x=T.memoizedProps,T=T.memoizedState,h=c.stateNode;try{var De=qa(c.type,x);i=h.getSnapshotBeforeUpdate(De,T),h.__reactInternalSnapshotBeforeUpdate=i}catch(qe){Rt(c,c.return,qe)}}break;case 3:if((i&1024)!==0){if(i=a.stateNode.containerInfo,c=i.nodeType,c===9)Sg(i);else if(c===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Sg(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=a.sibling,i!==null){i.return=a.return,_n=i;break}_n=a.return}}function RS(i,a,c){var h=c.flags;switch(c.tag){case 0:case 11:case 15:as(i,c),h&4&&Ju(5,c);break;case 1:if(as(i,c),h&4)if(i=c.stateNode,a===null)try{i.componentDidMount()}catch(N){Rt(c,c.return,N)}else{var x=qa(c.type,a.memoizedProps);a=a.memoizedState;try{i.componentDidUpdate(x,a,i.__reactInternalSnapshotBeforeUpdate)}catch(N){Rt(c,c.return,N)}}h&64&&CS(c),h&512&&ec(c,c.return);break;case 3:if(as(i,c),h&64&&(i=c.updateQueue,i!==null)){if(a=null,c.child!==null)switch(c.child.tag){case 27:case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}try{mT(i,a)}catch(N){Rt(c,c.return,N)}}break;case 27:a===null&&h&4&&kS(c);case 26:case 5:as(i,c),a===null&&h&4&&AS(c),h&512&&ec(c,c.return);break;case 12:as(i,c);break;case 31:as(i,c),h&4&&MS(i,c);break;case 13:as(i,c),h&4&&IS(i,c),h&64&&(i=c.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(c=SL.bind(null,c),VL(i,c))));break;case 22:if(h=c.memoizedState!==null||is,!h){a=a!==null&&a.memoizedState!==null||hn,x=is;var T=hn;is=h,(hn=a)&&!T?os(i,c,(c.subtreeFlags&8772)!==0):as(i,c),is=x,hn=T}break;case 30:break;default:as(i,c)}}function OS(i){var a=i.alternate;a!==null&&(i.alternate=null,OS(a)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(a=i.stateNode,a!==null&&kp(a)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var $t=null,cr=!1;function ss(i,a,c){for(c=c.child;c!==null;)DS(i,a,c),c=c.sibling}function DS(i,a,c){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(un,c)}catch{}switch(c.tag){case 26:hn||Ai(c,a),ss(i,a,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:hn||Ai(c,a);var h=$t,x=cr;Vs(c.type)&&($t=c.stateNode,cr=!1),ss(i,a,c),uc(c.stateNode),$t=h,cr=x;break;case 5:hn||Ai(c,a);case 6:if(h=$t,x=cr,$t=null,ss(i,a,c),$t=h,cr=x,$t!==null)if(cr)try{($t.nodeType===9?$t.body:$t.nodeName==="HTML"?$t.ownerDocument.body:$t).removeChild(c.stateNode)}catch(T){Rt(c,a,T)}else try{$t.removeChild(c.stateNode)}catch(T){Rt(c,a,T)}break;case 18:$t!==null&&(cr?(i=$t,C2(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,c.stateNode),xl(i)):C2($t,c.stateNode));break;case 4:h=$t,x=cr,$t=c.stateNode.containerInfo,cr=!0,ss(i,a,c),$t=h,cr=x;break;case 0:case 11:case 14:case 15:Ps(2,c,a),hn||Ps(4,c,a),ss(i,a,c);break;case 1:hn||(Ai(c,a),h=c.stateNode,typeof h.componentWillUnmount=="function"&&wS(c,a,h)),ss(i,a,c);break;case 21:ss(i,a,c);break;case 22:hn=(h=hn)||c.memoizedState!==null,ss(i,a,c),hn=h;break;default:ss(i,a,c)}}function MS(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{xl(i)}catch(c){Rt(a,a.return,c)}}}function IS(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{xl(i)}catch(c){Rt(a,a.return,c)}}function pL(i){switch(i.tag){case 31:case 13:case 19:var a=i.stateNode;return a===null&&(a=i.stateNode=new NS),a;case 22:return i=i.stateNode,a=i._retryCache,a===null&&(a=i._retryCache=new NS),a;default:throw Error(r(435,i.tag))}}function Ld(i,a){var c=pL(i);a.forEach(function(h){if(!c.has(h)){c.add(h);var x=CL.bind(null,i,h);h.then(x,x)}})}function fr(i,a){var c=a.deletions;if(c!==null)for(var h=0;h<c.length;h++){var x=c[h],T=i,N=a,L=N;e:for(;L!==null;){switch(L.tag){case 27:if(Vs(L.type)){$t=L.stateNode,cr=!1;break e}break;case 5:$t=L.stateNode,cr=!1;break e;case 3:case 4:$t=L.stateNode.containerInfo,cr=!0;break e}L=L.return}if($t===null)throw Error(r(160));DS(T,N,x),$t=null,cr=!1,T=x.alternate,T!==null&&(T.return=null),x.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)LS(a,i),a=a.sibling}var si=null;function LS(i,a){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:fr(a,i),dr(i),h&4&&(Ps(3,i,i.return),Ju(3,i),Ps(5,i,i.return));break;case 1:fr(a,i),dr(i),h&512&&(hn||c===null||Ai(c,c.return)),h&64&&is&&(i=i.updateQueue,i!==null&&(h=i.callbacks,h!==null&&(c=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=c===null?h:c.concat(h))));break;case 26:var x=si;if(fr(a,i),dr(i),h&512&&(hn||c===null||Ai(c,c.return)),h&4){var T=c!==null?c.memoizedState:null;if(h=i.memoizedState,c===null)if(h===null)if(i.stateNode===null){e:{h=i.type,c=i.memoizedProps,x=x.ownerDocument||x;t:switch(h){case"title":T=x.getElementsByTagName("title")[0],(!T||T[_u]||T[In]||T.namespaceURI==="http://www.w3.org/2000/svg"||T.hasAttribute("itemprop"))&&(T=x.createElement(h),x.head.insertBefore(T,x.querySelector("head > title"))),Bn(T,h,c),T[In]=i,An(T),h=T;break e;case"link":var N=L2("link","href",x).get(h+(c.href||""));if(N){for(var L=0;L<N.length;L++)if(T=N[L],T.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&T.getAttribute("rel")===(c.rel==null?null:c.rel)&&T.getAttribute("title")===(c.title==null?null:c.title)&&T.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){N.splice(L,1);break t}}T=x.createElement(h),Bn(T,h,c),x.head.appendChild(T);break;case"meta":if(N=L2("meta","content",x).get(h+(c.content||""))){for(L=0;L<N.length;L++)if(T=N[L],T.getAttribute("content")===(c.content==null?null:""+c.content)&&T.getAttribute("name")===(c.name==null?null:c.name)&&T.getAttribute("property")===(c.property==null?null:c.property)&&T.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&T.getAttribute("charset")===(c.charSet==null?null:c.charSet)){N.splice(L,1);break t}}T=x.createElement(h),Bn(T,h,c),x.head.appendChild(T);break;default:throw Error(r(468,h))}T[In]=i,An(T),h=T}i.stateNode=h}else P2(x,i.type,i.stateNode);else i.stateNode=I2(x,h,i.memoizedProps);else T!==h?(T===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):T.count--,h===null?P2(x,i.type,i.stateNode):I2(x,h,i.memoizedProps)):h===null&&i.stateNode!==null&&K0(i,i.memoizedProps,c.memoizedProps)}break;case 27:fr(a,i),dr(i),h&512&&(hn||c===null||Ai(c,c.return)),c!==null&&h&4&&K0(i,i.memoizedProps,c.memoizedProps);break;case 5:if(fr(a,i),dr(i),h&512&&(hn||c===null||Ai(c,c.return)),i.flags&32){x=i.stateNode;try{zo(x,"")}catch(De){Rt(i,i.return,De)}}h&4&&i.stateNode!=null&&(x=i.memoizedProps,K0(i,x,c!==null?c.memoizedProps:x)),h&1024&&(Z0=!0);break;case 6:if(fr(a,i),dr(i),h&4){if(i.stateNode===null)throw Error(r(162));h=i.memoizedProps,c=i.stateNode;try{c.nodeValue=h}catch(De){Rt(i,i.return,De)}}break;case 3:if(Wd=null,x=si,si=Kd(a.containerInfo),fr(a,i),si=x,dr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{xl(a.containerInfo)}catch(De){Rt(i,i.return,De)}Z0&&(Z0=!1,PS(i));break;case 4:h=si,si=Kd(i.stateNode.containerInfo),fr(a,i),dr(i),si=h;break;case 12:fr(a,i),dr(i);break;case 31:fr(a,i),dr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,Ld(i,h)));break;case 13:fr(a,i),dr(i),i.child.flags&8192&&i.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(jd=rt()),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,Ld(i,h)));break;case 22:x=i.memoizedState!==null;var X=c!==null&&c.memoizedState!==null,ae=is,fe=hn;if(is=ae||x,hn=fe||X,fr(a,i),hn=fe,is=ae,dr(i),h&8192)e:for(a=i.stateNode,a._visibility=x?a._visibility&-2:a._visibility|1,x&&(c===null||X||is||hn||$a(i)),c=null,a=i;;){if(a.tag===5||a.tag===26){if(c===null){X=c=a;try{if(T=X.stateNode,x)N=T.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{L=X.stateNode;var pe=X.memoizedProps.style,oe=pe!=null&&pe.hasOwnProperty("display")?pe.display:null;L.style.display=oe==null||typeof oe=="boolean"?"":(""+oe).trim()}}catch(De){Rt(X,X.return,De)}}}else if(a.tag===6){if(c===null){X=a;try{X.stateNode.nodeValue=x?"":X.memoizedProps}catch(De){Rt(X,X.return,De)}}}else if(a.tag===18){if(c===null){X=a;try{var le=X.stateNode;x?w2(le,!0):w2(X.stateNode,!1)}catch(De){Rt(X,X.return,De)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===i)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break e;for(;a.sibling===null;){if(a.return===null||a.return===i)break e;c===a&&(c=null),a=a.return}c===a&&(c=null),a.sibling.return=a.return,a=a.sibling}h&4&&(h=i.updateQueue,h!==null&&(c=h.retryQueue,c!==null&&(h.retryQueue=null,Ld(i,c))));break;case 19:fr(a,i),dr(i),h&4&&(h=i.updateQueue,h!==null&&(i.updateQueue=null,Ld(i,h)));break;case 30:break;case 21:break;default:fr(a,i),dr(i)}}function dr(i){var a=i.flags;if(a&2){try{for(var c,h=i.return;h!==null;){if(_S(h)){c=h;break}h=h.return}if(c==null)throw Error(r(160));switch(c.tag){case 27:var x=c.stateNode,T=Q0(i);Id(i,T,x);break;case 5:var N=c.stateNode;c.flags&32&&(zo(N,""),c.flags&=-33);var L=Q0(i);Id(i,L,N);break;case 3:case 4:var X=c.stateNode.containerInfo,ae=Q0(i);W0(i,ae,X);break;default:throw Error(r(161))}}catch(fe){Rt(i,i.return,fe)}i.flags&=-3}a&4096&&(i.flags&=-4097)}function PS(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var a=i;PS(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),i=i.sibling}}function as(i,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)RS(i,a.alternate,a),a=a.sibling}function $a(i){for(i=i.child;i!==null;){var a=i;switch(a.tag){case 0:case 11:case 14:case 15:Ps(4,a,a.return),$a(a);break;case 1:Ai(a,a.return);var c=a.stateNode;typeof c.componentWillUnmount=="function"&&wS(a,a.return,c),$a(a);break;case 27:uc(a.stateNode);case 26:case 5:Ai(a,a.return),$a(a);break;case 22:a.memoizedState===null&&$a(a);break;case 30:$a(a);break;default:$a(a)}i=i.sibling}}function os(i,a,c){for(c=c&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var h=a.alternate,x=i,T=a,N=T.flags;switch(T.tag){case 0:case 11:case 15:os(x,T,c),Ju(4,T);break;case 1:if(os(x,T,c),h=T,x=h.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(ae){Rt(h,h.return,ae)}if(h=T,x=h.updateQueue,x!==null){var L=h.stateNode;try{var X=x.shared.hiddenCallbacks;if(X!==null)for(x.shared.hiddenCallbacks=null,x=0;x<X.length;x++)hT(X[x],L)}catch(ae){Rt(h,h.return,ae)}}c&&N&64&&CS(T),ec(T,T.return);break;case 27:kS(T);case 26:case 5:os(x,T,c),c&&h===null&&N&4&&AS(T),ec(T,T.return);break;case 12:os(x,T,c);break;case 31:os(x,T,c),c&&N&4&&MS(x,T);break;case 13:os(x,T,c),c&&N&4&&IS(x,T);break;case 22:T.memoizedState===null&&os(x,T,c),ec(T,T.return);break;case 30:break;default:os(x,T,c)}a=a.sibling}}function J0(i,a){var c=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==c&&(i!=null&&i.refCount++,c!=null&&Fu(c))}function eg(i,a){i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&Fu(i))}function ai(i,a,c,h){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)jS(i,a,c,h),a=a.sibling}function jS(i,a,c,h){var x=a.flags;switch(a.tag){case 0:case 11:case 15:ai(i,a,c,h),x&2048&&Ju(9,a);break;case 1:ai(i,a,c,h);break;case 3:ai(i,a,c,h),x&2048&&(i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&Fu(i)));break;case 12:if(x&2048){ai(i,a,c,h),i=a.stateNode;try{var T=a.memoizedProps,N=T.id,L=T.onPostCommit;typeof L=="function"&&L(N,a.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(X){Rt(a,a.return,X)}}else ai(i,a,c,h);break;case 31:ai(i,a,c,h);break;case 13:ai(i,a,c,h);break;case 23:break;case 22:T=a.stateNode,N=a.alternate,a.memoizedState!==null?T._visibility&2?ai(i,a,c,h):tc(i,a):T._visibility&2?ai(i,a,c,h):(T._visibility|=2,ll(i,a,c,h,(a.subtreeFlags&10256)!==0||!1)),x&2048&&J0(N,a);break;case 24:ai(i,a,c,h),x&2048&&eg(a.alternate,a);break;default:ai(i,a,c,h)}}function ll(i,a,c,h,x){for(x=x&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var T=i,N=a,L=c,X=h,ae=N.flags;switch(N.tag){case 0:case 11:case 15:ll(T,N,L,X,x),Ju(8,N);break;case 23:break;case 22:var fe=N.stateNode;N.memoizedState!==null?fe._visibility&2?ll(T,N,L,X,x):tc(T,N):(fe._visibility|=2,ll(T,N,L,X,x)),x&&ae&2048&&J0(N.alternate,N);break;case 24:ll(T,N,L,X,x),x&&ae&2048&&eg(N.alternate,N);break;default:ll(T,N,L,X,x)}a=a.sibling}}function tc(i,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var c=i,h=a,x=h.flags;switch(h.tag){case 22:tc(c,h),x&2048&&J0(h.alternate,h);break;case 24:tc(c,h),x&2048&&eg(h.alternate,h);break;default:tc(c,h)}a=a.sibling}}var nc=8192;function ul(i,a,c){if(i.subtreeFlags&nc)for(i=i.child;i!==null;)BS(i,a,c),i=i.sibling}function BS(i,a,c){switch(i.tag){case 26:ul(i,a,c),i.flags&nc&&i.memoizedState!==null&&tP(c,si,i.memoizedState,i.memoizedProps);break;case 5:ul(i,a,c);break;case 3:case 4:var h=si;si=Kd(i.stateNode.containerInfo),ul(i,a,c),si=h;break;case 22:i.memoizedState===null&&(h=i.alternate,h!==null&&h.memoizedState!==null?(h=nc,nc=16777216,ul(i,a,c),nc=h):ul(i,a,c));break;default:ul(i,a,c)}}function US(i){var a=i.alternate;if(a!==null&&(i=a.child,i!==null)){a.child=null;do a=i.sibling,i.sibling=null,i=a;while(i!==null)}}function rc(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var h=a[c];_n=h,HS(h,i)}US(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)FS(i),i=i.sibling}function FS(i){switch(i.tag){case 0:case 11:case 15:rc(i),i.flags&2048&&Ps(9,i,i.return);break;case 3:rc(i);break;case 12:rc(i);break;case 22:var a=i.stateNode;i.memoizedState!==null&&a._visibility&2&&(i.return===null||i.return.tag!==13)?(a._visibility&=-3,Pd(i)):rc(i);break;default:rc(i)}}function Pd(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var h=a[c];_n=h,HS(h,i)}US(i)}for(i=i.child;i!==null;){switch(a=i,a.tag){case 0:case 11:case 15:Ps(8,a,a.return),Pd(a);break;case 22:c=a.stateNode,c._visibility&2&&(c._visibility&=-3,Pd(a));break;default:Pd(a)}i=i.sibling}}function HS(i,a){for(;_n!==null;){var c=_n;switch(c.tag){case 0:case 11:case 15:Ps(8,c,a);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var h=c.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Fu(c.memoizedState.cache)}if(h=c.child,h!==null)h.return=c,_n=h;else e:for(c=i;_n!==null;){h=_n;var x=h.sibling,T=h.return;if(OS(h),h===c){_n=null;break e}if(x!==null){x.return=T,_n=x;break e}_n=T}}}var gL={getCacheForType:function(i){var a=Pn(cn),c=a.data.get(i);return c===void 0&&(c=i(),a.data.set(i,c)),c},cacheSignal:function(){return Pn(cn).controller.signal}},bL=typeof WeakMap=="function"?WeakMap:Map,Ct=0,Pt=null,ot=null,ct=0,Nt=0,wr=null,js=!1,cl=!1,tg=!1,ls=0,Zt=0,Bs=0,Ya=0,ng=0,Ar=0,fl=0,ic=null,hr=null,rg=!1,jd=0,zS=0,Bd=1/0,Ud=null,Us=null,bn=0,Fs=null,dl=null,us=0,ig=0,sg=null,VS=null,sc=0,ag=null;function _r(){return(Ct&2)!==0&&ct!==0?ct&-ct:I.T!==null?dg():sE()}function qS(){if(Ar===0)if((ct&536870912)===0||pt){var i=mt;mt<<=1,(mt&3932160)===0&&(mt=262144),Ar=i}else Ar=536870912;return i=Sr.current,i!==null&&(i.flags|=32),Ar}function mr(i,a,c){(i===Pt&&(Nt===2||Nt===9)||i.cancelPendingCommit!==null)&&(hl(i,0),Hs(i,ct,Ar,!1)),or(i,c),((Ct&2)===0||i!==Pt)&&(i===Pt&&((Ct&2)===0&&(Ya|=c),Zt===4&&Hs(i,ct,Ar,!1)),_i(i))}function $S(i,a,c){if((Ct&6)!==0)throw Error(r(327));var h=!c&&(a&127)===0&&(a&i.expiredLanes)===0||Ft(i,a),x=h?vL(i,a):lg(i,a,!0),T=h;do{if(x===0){cl&&!h&&Hs(i,a,0,!1);break}else{if(c=i.current.alternate,T&&!yL(c)){x=lg(i,a,!1),T=!1;continue}if(x===2){if(T=a,i.errorRecoveryDisabledLanes&T)var N=0;else N=i.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){a=N;e:{var L=i;x=ic;var X=L.current.memoizedState.isDehydrated;if(X&&(hl(L,N).flags|=256),N=lg(L,N,!1),N!==2){if(tg&&!X){L.errorRecoveryDisabledLanes|=T,Ya|=T,x=4;break e}T=hr,hr=x,T!==null&&(hr===null?hr=T:hr.push.apply(hr,T))}x=N}if(T=!1,x!==2)continue}}if(x===1){hl(i,0),Hs(i,a,0,!0);break}e:{switch(h=i,T=x,T){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:Hs(h,a,Ar,!js);break e;case 2:hr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(x=jd+300-rt(),10<x)){if(Hs(h,a,Ar,!js),kt(h,0,!0)!==0)break e;us=a,h.timeoutHandle=T2(YS.bind(null,h,c,hr,Ud,rg,a,Ar,Ya,fl,js,T,"Throttled",-0,0),x);break e}YS(h,c,hr,Ud,rg,a,Ar,Ya,fl,js,T,null,-0,0)}}break}while(!0);_i(i)}function YS(i,a,c,h,x,T,N,L,X,ae,fe,pe,oe,le){if(i.timeoutHandle=-1,pe=a.subtreeFlags,pe&8192||(pe&16785408)===16785408){pe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xi},BS(a,T,pe);var De=(T&62914560)===T?jd-rt():(T&4194048)===T?zS-rt():0;if(De=nP(pe,De),De!==null){us=T,i.cancelPendingCommit=De(e2.bind(null,i,a,T,c,h,x,N,L,X,fe,pe,null,oe,le)),Hs(i,T,N,!ae);return}}e2(i,a,T,c,h,x,N,L,X)}function yL(i){for(var a=i;;){var c=a.tag;if((c===0||c===11||c===15)&&a.flags&16384&&(c=a.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var h=0;h<c.length;h++){var x=c[h],T=x.getSnapshot;x=x.value;try{if(!Er(T(),x))return!1}catch{return!1}}if(c=a.child,a.subtreeFlags&16384&&c!==null)c.return=a,a=c;else{if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Hs(i,a,c,h){a&=~ng,a&=~Ya,i.suspendedLanes|=a,i.pingedLanes&=~a,h&&(i.warmLanes|=a),h=i.expirationTimes;for(var x=a;0<x;){var T=31-St(x),N=1<<T;h[T]=-1,x&=~N}c!==0&&Na(i,c,a)}function Fd(){return(Ct&6)===0?(ac(0),!1):!0}function og(){if(ot!==null){if(Nt===0)var i=ot.return;else i=ot,Zi=ja=null,S0(i),rl=null,zu=0,i=ot;for(;i!==null;)SS(i.alternate,i),i=i.return;ot=null}}function hl(i,a){var c=i.timeoutHandle;c!==-1&&(i.timeoutHandle=-1,BL(c)),c=i.cancelPendingCommit,c!==null&&(i.cancelPendingCommit=null,c()),us=0,og(),Pt=i,ot=c=Qi(i.current,null),ct=a,Nt=0,wr=null,js=!1,cl=Ft(i,a),tg=!1,fl=Ar=ng=Ya=Bs=Zt=0,hr=ic=null,rg=!1,(a&8)!==0&&(a|=a&32);var h=i.entangledLanes;if(h!==0)for(i=i.entanglements,h&=a;0<h;){var x=31-St(h),T=1<<x;a|=i[x],h&=~T}return ls=a,od(),c}function GS(i,a){We=null,I.H=Qu,a===nl||a===pd?(a=uT(),Nt=3):a===f0?(a=uT(),Nt=4):Nt=a===U0?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,wr=a,ot===null&&(Zt=1,Nd(i,jr(a,i.current)))}function XS(){var i=Sr.current;return i===null?!0:(ct&4194048)===ct?Hr===null:(ct&62914560)===ct||(ct&536870912)!==0?i===Hr:!1}function KS(){var i=I.H;return I.H=Qu,i===null?Qu:i}function QS(){var i=I.A;return I.A=gL,i}function Hd(){Zt=4,js||(ct&4194048)!==ct&&Sr.current!==null||(cl=!0),(Bs&134217727)===0&&(Ya&134217727)===0||Pt===null||Hs(Pt,ct,Ar,!1)}function lg(i,a,c){var h=Ct;Ct|=2;var x=KS(),T=QS();(Pt!==i||ct!==a)&&(Ud=null,hl(i,a)),a=!1;var N=Zt;e:do try{if(Nt!==0&&ot!==null){var L=ot,X=wr;switch(Nt){case 8:og(),N=6;break e;case 3:case 2:case 9:case 6:Sr.current===null&&(a=!0);var ae=Nt;if(Nt=0,wr=null,ml(i,L,X,ae),c&&cl){N=0;break e}break;default:ae=Nt,Nt=0,wr=null,ml(i,L,X,ae)}}xL(),N=Zt;break}catch(fe){GS(i,fe)}while(!0);return a&&i.shellSuspendCounter++,Zi=ja=null,Ct=h,I.H=x,I.A=T,ot===null&&(Pt=null,ct=0,od()),N}function xL(){for(;ot!==null;)WS(ot)}function vL(i,a){var c=Ct;Ct|=2;var h=KS(),x=QS();Pt!==i||ct!==a?(Ud=null,Bd=rt()+500,hl(i,a)):cl=Ft(i,a);e:do try{if(Nt!==0&&ot!==null){a=ot;var T=wr;t:switch(Nt){case 1:Nt=0,wr=null,ml(i,a,T,1);break;case 2:case 9:if(oT(T)){Nt=0,wr=null,ZS(a);break}a=function(){Nt!==2&&Nt!==9||Pt!==i||(Nt=7),_i(i)},T.then(a,a);break e;case 3:Nt=7;break e;case 4:Nt=5;break e;case 7:oT(T)?(Nt=0,wr=null,ZS(a)):(Nt=0,wr=null,ml(i,a,T,7));break;case 5:var N=null;switch(ot.tag){case 26:N=ot.memoizedState;case 5:case 27:var L=ot;if(N?j2(N):L.stateNode.complete){Nt=0,wr=null;var X=L.sibling;if(X!==null)ot=X;else{var ae=L.return;ae!==null?(ot=ae,zd(ae)):ot=null}break t}}Nt=0,wr=null,ml(i,a,T,5);break;case 6:Nt=0,wr=null,ml(i,a,T,6);break;case 8:og(),Zt=6;break e;default:throw Error(r(462))}}EL();break}catch(fe){GS(i,fe)}while(!0);return Zi=ja=null,I.H=h,I.A=x,Ct=c,ot!==null?0:(Pt=null,ct=0,od(),Zt)}function EL(){for(;ot!==null&&!ti();)WS(ot)}function WS(i){var a=ES(i.alternate,i,ls);i.memoizedProps=i.pendingProps,a===null?zd(i):ot=a}function ZS(i){var a=i,c=a.alternate;switch(a.tag){case 15:case 0:a=pS(c,a,a.pendingProps,a.type,void 0,ct);break;case 11:a=pS(c,a,a.pendingProps,a.type.render,a.ref,ct);break;case 5:S0(a);default:SS(c,a),a=ot=QE(a,ls),a=ES(c,a,ls)}i.memoizedProps=i.pendingProps,a===null?zd(i):ot=a}function ml(i,a,c,h){Zi=ja=null,S0(a),rl=null,zu=0;var x=a.return;try{if(uL(i,x,a,c,ct)){Zt=1,Nd(i,jr(c,i.current)),ot=null;return}}catch(T){if(x!==null)throw ot=x,T;Zt=1,Nd(i,jr(c,i.current)),ot=null;return}a.flags&32768?(pt||h===1?i=!0:cl||(ct&536870912)!==0?i=!1:(js=i=!0,(h===2||h===9||h===3||h===6)&&(h=Sr.current,h!==null&&h.tag===13&&(h.flags|=16384))),JS(a,i)):zd(a)}function zd(i){var a=i;do{if((a.flags&32768)!==0){JS(a,js);return}i=a.return;var c=dL(a.alternate,a,ls);if(c!==null){ot=c;return}if(a=a.sibling,a!==null){ot=a;return}ot=a=i}while(a!==null);Zt===0&&(Zt=5)}function JS(i,a){do{var c=hL(i.alternate,i);if(c!==null){c.flags&=32767,ot=c;return}if(c=i.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!a&&(i=i.sibling,i!==null)){ot=i;return}ot=i=c}while(i!==null);Zt=6,ot=null}function e2(i,a,c,h,x,T,N,L,X){i.cancelPendingCommit=null;do Vd();while(bn!==0);if((Ct&6)!==0)throw Error(r(327));if(a!==null){if(a===i.current)throw Error(r(177));if(T=a.lanes|a.childLanes,T|=Qp,Mr(i,c,T,N,L,X),i===Pt&&(ot=Pt=null,ct=0),dl=a,Fs=i,us=c,ig=T,sg=x,VS=h,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,wL(Ue,function(){return s2(),null})):(i.callbackNode=null,i.callbackPriority=0),h=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||h){h=I.T,I.T=null,x=H.p,H.p=2,N=Ct,Ct|=4;try{mL(i,a,c)}finally{Ct=N,H.p=x,I.T=h}}bn=1,t2(),n2(),r2()}}function t2(){if(bn===1){bn=0;var i=Fs,a=dl,c=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||c){c=I.T,I.T=null;var h=H.p;H.p=2;var x=Ct;Ct|=4;try{LS(a,i);var T=vg,N=HE(i.containerInfo),L=T.focusedElem,X=T.selectionRange;if(N!==L&&L&&L.ownerDocument&&FE(L.ownerDocument.documentElement,L)){if(X!==null&&$p(L)){var ae=X.start,fe=X.end;if(fe===void 0&&(fe=ae),"selectionStart"in L)L.selectionStart=ae,L.selectionEnd=Math.min(fe,L.value.length);else{var pe=L.ownerDocument||document,oe=pe&&pe.defaultView||window;if(oe.getSelection){var le=oe.getSelection(),De=L.textContent.length,qe=Math.min(X.start,De),Mt=X.end===void 0?qe:Math.min(X.end,De);!le.extend&&qe>Mt&&(N=Mt,Mt=qe,qe=N);var ee=UE(L,qe),Z=UE(L,Mt);if(ee&&Z&&(le.rangeCount!==1||le.anchorNode!==ee.node||le.anchorOffset!==ee.offset||le.focusNode!==Z.node||le.focusOffset!==Z.offset)){var se=pe.createRange();se.setStart(ee.node,ee.offset),le.removeAllRanges(),qe>Mt?(le.addRange(se),le.extend(Z.node,Z.offset)):(se.setEnd(Z.node,Z.offset),le.addRange(se))}}}}for(pe=[],le=L;le=le.parentNode;)le.nodeType===1&&pe.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<pe.length;L++){var me=pe[L];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}th=!!xg,vg=xg=null}finally{Ct=x,H.p=h,I.T=c}}i.current=a,bn=2}}function n2(){if(bn===2){bn=0;var i=Fs,a=dl,c=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||c){c=I.T,I.T=null;var h=H.p;H.p=2;var x=Ct;Ct|=4;try{RS(i,a.alternate,a)}finally{Ct=x,H.p=h,I.T=c}}bn=3}}function r2(){if(bn===4||bn===3){bn=0,ni();var i=Fs,a=dl,c=us,h=VS;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?bn=5:(bn=0,dl=Fs=null,i2(i,i.pendingLanes));var x=i.pendingLanes;if(x===0&&(Us=null),Ap(c),a=a.stateNode,qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(un,a,void 0,(a.current.flags&128)===128)}catch{}if(h!==null){a=I.T,x=H.p,H.p=2,I.T=null;try{for(var T=i.onRecoverableError,N=0;N<h.length;N++){var L=h[N];T(L.value,{componentStack:L.stack})}}finally{I.T=a,H.p=x}}(us&3)!==0&&Vd(),_i(i),x=i.pendingLanes,(c&261930)!==0&&(x&42)!==0?i===ag?sc++:(sc=0,ag=i):sc=0,ac(0)}}function i2(i,a){(i.pooledCacheLanes&=a)===0&&(a=i.pooledCache,a!=null&&(i.pooledCache=null,Fu(a)))}function Vd(){return t2(),n2(),r2(),s2()}function s2(){if(bn!==5)return!1;var i=Fs,a=ig;ig=0;var c=Ap(us),h=I.T,x=H.p;try{H.p=32>c?32:c,I.T=null,c=sg,sg=null;var T=Fs,N=us;if(bn=0,dl=Fs=null,us=0,(Ct&6)!==0)throw Error(r(331));var L=Ct;if(Ct|=4,FS(T.current),jS(T,T.current,N,c),Ct=L,ac(0,!1),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(un,T)}catch{}return!0}finally{H.p=x,I.T=h,i2(i,a)}}function a2(i,a,c){a=jr(c,a),a=B0(i.stateNode,a,2),i=Ms(i,a,2),i!==null&&(or(i,2),_i(i))}function Rt(i,a,c){if(i.tag===3)a2(i,i,c);else for(;a!==null;){if(a.tag===3){a2(a,i,c);break}else if(a.tag===1){var h=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Us===null||!Us.has(h))){i=jr(c,i),c=oS(2),h=Ms(a,c,2),h!==null&&(lS(c,h,a,i),or(h,2),_i(h));break}}a=a.return}}function ug(i,a,c){var h=i.pingCache;if(h===null){h=i.pingCache=new bL;var x=new Set;h.set(a,x)}else x=h.get(a),x===void 0&&(x=new Set,h.set(a,x));x.has(c)||(tg=!0,x.add(c),i=TL.bind(null,i,a,c),a.then(i,i))}function TL(i,a,c){var h=i.pingCache;h!==null&&h.delete(a),i.pingedLanes|=i.suspendedLanes&c,i.warmLanes&=~c,Pt===i&&(ct&c)===c&&(Zt===4||Zt===3&&(ct&62914560)===ct&&300>rt()-jd?(Ct&2)===0&&hl(i,0):ng|=c,fl===ct&&(fl=0)),_i(i)}function o2(i,a){a===0&&(a=ar()),i=Ia(i,a),i!==null&&(or(i,a),_i(i))}function SL(i){var a=i.memoizedState,c=0;a!==null&&(c=a.retryLane),o2(i,c)}function CL(i,a){var c=0;switch(i.tag){case 31:case 13:var h=i.stateNode,x=i.memoizedState;x!==null&&(c=x.retryLane);break;case 19:h=i.stateNode;break;case 22:h=i.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(a),o2(i,c)}function wL(i,a){return Cn(i,a)}var qd=null,pl=null,cg=!1,$d=!1,fg=!1,zs=0;function _i(i){i!==pl&&i.next===null&&(pl===null?qd=pl=i:pl=pl.next=i),$d=!0,cg||(cg=!0,_L())}function ac(i,a){if(!fg&&$d){fg=!0;do for(var c=!1,h=qd;h!==null;){if(i!==0){var x=h.pendingLanes;if(x===0)var T=0;else{var N=h.suspendedLanes,L=h.pingedLanes;T=(1<<31-St(42|i)+1)-1,T&=x&~(N&~L),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(c=!0,f2(h,T))}else T=ct,T=kt(h,h===Pt?T:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(T&3)===0||Ft(h,T)||(c=!0,f2(h,T));h=h.next}while(c);fg=!1}}function AL(){l2()}function l2(){$d=cg=!1;var i=0;zs!==0&&jL()&&(i=zs);for(var a=rt(),c=null,h=qd;h!==null;){var x=h.next,T=u2(h,a);T===0?(h.next=null,c===null?qd=x:c.next=x,x===null&&(pl=c)):(c=h,(i!==0||(T&3)!==0)&&($d=!0)),h=x}bn!==0&&bn!==5||ac(i),zs!==0&&(zs=0)}function u2(i,a){for(var c=i.suspendedLanes,h=i.pingedLanes,x=i.expirationTimes,T=i.pendingLanes&-62914561;0<T;){var N=31-St(T),L=1<<N,X=x[N];X===-1?((L&c)===0||(L&h)!==0)&&(x[N]=Si(L,a)):X<=a&&(i.expiredLanes|=L),T&=~L}if(a=Pt,c=ct,c=kt(i,i===a?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h=i.callbackNode,c===0||i===a&&(Nt===2||Nt===9)||i.cancelPendingCommit!==null)return h!==null&&h!==null&&Ti(h),i.callbackNode=null,i.callbackPriority=0;if((c&3)===0||Ft(i,c)){if(a=c&-c,a===i.callbackPriority)return a;switch(h!==null&&Ti(h),Ap(c)){case 2:case 8:c=Te;break;case 32:c=Ue;break;case 268435456:c=ht;break;default:c=Ue}return h=c2.bind(null,i),c=Cn(c,h),i.callbackPriority=a,i.callbackNode=c,a}return h!==null&&h!==null&&Ti(h),i.callbackPriority=2,i.callbackNode=null,2}function c2(i,a){if(bn!==0&&bn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var c=i.callbackNode;if(Vd()&&i.callbackNode!==c)return null;var h=ct;return h=kt(i,i===Pt?h:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),h===0?null:($S(i,h,a),u2(i,rt()),i.callbackNode!=null&&i.callbackNode===c?c2.bind(null,i):null)}function f2(i,a){if(Vd())return null;$S(i,a,!0)}function _L(){UL(function(){(Ct&6)!==0?Cn(ce,AL):l2()})}function dg(){if(zs===0){var i=el;i===0&&(i=Ve,Ve<<=1,(Ve&261888)===0&&(Ve=256)),zs=i}return zs}function d2(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Jf(""+i)}function h2(i,a){var c=a.ownerDocument.createElement("input");return c.name=a.name,c.value=a.value,i.id&&c.setAttribute("form",i.id),a.parentNode.insertBefore(c,a),i=new FormData(i),c.parentNode.removeChild(c),i}function kL(i,a,c,h,x){if(a==="submit"&&c&&c.stateNode===x){var T=d2((x[lr]||null).action),N=h.submitter;N&&(a=(a=N[lr]||null)?d2(a.formAction):N.getAttribute("formAction"),a!==null&&(T=a,N=null));var L=new rd("action","action",null,h,x);i.push({event:L,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(zs!==0){var X=N?h2(x,N):new FormData(x);D0(c,{pending:!0,data:X,method:x.method,action:T},null,X)}}else typeof T=="function"&&(L.preventDefault(),X=N?h2(x,N):new FormData(x),D0(c,{pending:!0,data:X,method:x.method,action:T},T,X))},currentTarget:x}]})}}for(var hg=0;hg<Kp.length;hg++){var mg=Kp[hg],NL=mg.toLowerCase(),RL=mg[0].toUpperCase()+mg.slice(1);ii(NL,"on"+RL)}ii(qE,"onAnimationEnd"),ii($E,"onAnimationIteration"),ii(YE,"onAnimationStart"),ii("dblclick","onDoubleClick"),ii("focusin","onFocus"),ii("focusout","onBlur"),ii(YI,"onTransitionRun"),ii(GI,"onTransitionStart"),ii(XI,"onTransitionCancel"),ii(GE,"onTransitionEnd"),Fo("onMouseEnter",["mouseout","mouseover"]),Fo("onMouseLeave",["mouseout","mouseover"]),Fo("onPointerEnter",["pointerout","pointerover"]),Fo("onPointerLeave",["pointerout","pointerover"]),Ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ra("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var oc="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(" "),OL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(oc));function m2(i,a){a=(a&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],x=h.event;h=h.listeners;e:{var T=void 0;if(a)for(var N=h.length-1;0<=N;N--){var L=h[N],X=L.instance,ae=L.currentTarget;if(L=L.listener,X!==T&&x.isPropagationStopped())break e;T=L,x.currentTarget=ae;try{T(x)}catch(fe){ad(fe)}x.currentTarget=null,T=X}else for(N=0;N<h.length;N++){if(L=h[N],X=L.instance,ae=L.currentTarget,L=L.listener,X!==T&&x.isPropagationStopped())break e;T=L,x.currentTarget=ae;try{T(x)}catch(fe){ad(fe)}x.currentTarget=null,T=X}}}}function lt(i,a){var c=a[_p];c===void 0&&(c=a[_p]=new Set);var h=i+"__bubble";c.has(h)||(p2(a,i,2,!1),c.add(h))}function pg(i,a,c){var h=0;a&&(h|=4),p2(c,i,h,a)}var Yd="_reactListening"+Math.random().toString(36).slice(2);function gg(i){if(!i[Yd]){i[Yd]=!0,lE.forEach(function(c){c!=="selectionchange"&&(OL.has(c)||pg(c,!1,i),pg(c,!0,i))});var a=i.nodeType===9?i:i.ownerDocument;a===null||a[Yd]||(a[Yd]=!0,pg("selectionchange",!1,a))}}function p2(i,a,c,h){switch(q2(a)){case 2:var x=sP;break;case 8:x=aP;break;default:x=Og}c=x.bind(null,a,c,i),x=void 0,!Pp||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(x=!0),h?x!==void 0?i.addEventListener(a,c,{capture:!0,passive:x}):i.addEventListener(a,c,!0):x!==void 0?i.addEventListener(a,c,{passive:x}):i.addEventListener(a,c,!1)}function bg(i,a,c,h,x){var T=h;if((a&1)===0&&(a&2)===0&&h!==null)e:for(;;){if(h===null)return;var N=h.tag;if(N===3||N===4){var L=h.stateNode.containerInfo;if(L===x)break;if(N===4)for(N=h.return;N!==null;){var X=N.tag;if((X===3||X===4)&&N.stateNode.containerInfo===x)return;N=N.return}for(;L!==null;){if(N=jo(L),N===null)return;if(X=N.tag,X===5||X===6||X===26||X===27){h=T=N;continue e}L=L.parentNode}}h=h.return}vE(function(){var ae=T,fe=Ip(c),pe=[];e:{var oe=XE.get(i);if(oe!==void 0){var le=rd,De=i;switch(i){case"keypress":if(td(c)===0)break e;case"keydown":case"keyup":le=CI;break;case"focusin":De="focus",le=Fp;break;case"focusout":De="blur",le=Fp;break;case"beforeblur":case"afterblur":le=Fp;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":le=SE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=dI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=_I;break;case qE:case $E:case YE:le=pI;break;case GE:le=NI;break;case"scroll":case"scrollend":le=cI;break;case"wheel":le=OI;break;case"copy":case"cut":case"paste":le=bI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=wE;break;case"toggle":case"beforetoggle":le=MI}var qe=(a&4)!==0,Mt=!qe&&(i==="scroll"||i==="scrollend"),ee=qe?oe!==null?oe+"Capture":null:oe;qe=[];for(var Z=ae,se;Z!==null;){var me=Z;if(se=me.stateNode,me=me.tag,me!==5&&me!==26&&me!==27||se===null||ee===null||(me=Nu(Z,ee),me!=null&&qe.push(lc(Z,me,se))),Mt)break;Z=Z.return}0<qe.length&&(oe=new le(oe,De,null,c,fe),pe.push({event:oe,listeners:qe}))}}if((a&7)===0){e:{if(oe=i==="mouseover"||i==="pointerover",le=i==="mouseout"||i==="pointerout",oe&&c!==Mp&&(De=c.relatedTarget||c.fromElement)&&(jo(De)||De[Po]))break e;if((le||oe)&&(oe=fe.window===fe?fe:(oe=fe.ownerDocument)?oe.defaultView||oe.parentWindow:window,le?(De=c.relatedTarget||c.toElement,le=ae,De=De?jo(De):null,De!==null&&(Mt=o(De),qe=De.tag,De!==Mt||qe!==5&&qe!==27&&qe!==6)&&(De=null)):(le=null,De=ae),le!==De)){if(qe=SE,me="onMouseLeave",ee="onMouseEnter",Z="mouse",(i==="pointerout"||i==="pointerover")&&(qe=wE,me="onPointerLeave",ee="onPointerEnter",Z="pointer"),Mt=le==null?oe:ku(le),se=De==null?oe:ku(De),oe=new qe(me,Z+"leave",le,c,fe),oe.target=Mt,oe.relatedTarget=se,me=null,jo(fe)===ae&&(qe=new qe(ee,Z+"enter",De,c,fe),qe.target=se,qe.relatedTarget=Mt,me=qe),Mt=me,le&&De)t:{for(qe=DL,ee=le,Z=De,se=0,me=ee;me;me=qe(me))se++;me=0;for(var Fe=Z;Fe;Fe=qe(Fe))me++;for(;0<se-me;)ee=qe(ee),se--;for(;0<me-se;)Z=qe(Z),me--;for(;se--;){if(ee===Z||Z!==null&&ee===Z.alternate){qe=ee;break t}ee=qe(ee),Z=qe(Z)}qe=null}else qe=null;le!==null&&g2(pe,oe,le,qe,!1),De!==null&&Mt!==null&&g2(pe,Mt,De,qe,!0)}}e:{if(oe=ae?ku(ae):window,le=oe.nodeName&&oe.nodeName.toLowerCase(),le==="select"||le==="input"&&oe.type==="file")var vt=ME;else if(OE(oe))if(IE)vt=VI;else{vt=HI;var je=FI}else le=oe.nodeName,!le||le.toLowerCase()!=="input"||oe.type!=="checkbox"&&oe.type!=="radio"?ae&&Dp(ae.elementType)&&(vt=ME):vt=zI;if(vt&&(vt=vt(i,ae))){DE(pe,vt,c,fe);break e}je&&je(i,oe,ae),i==="focusout"&&ae&&oe.type==="number"&&ae.memoizedProps.value!=null&&Op(oe,"number",oe.value)}switch(je=ae?ku(ae):window,i){case"focusin":(OE(je)||je.contentEditable==="true")&&(Yo=je,Yp=ae,ju=null);break;case"focusout":ju=Yp=Yo=null;break;case"mousedown":Gp=!0;break;case"contextmenu":case"mouseup":case"dragend":Gp=!1,zE(pe,c,fe);break;case"selectionchange":if($I)break;case"keydown":case"keyup":zE(pe,c,fe)}var Je;if(zp)e:{switch(i){case"compositionstart":var ft="onCompositionStart";break e;case"compositionend":ft="onCompositionEnd";break e;case"compositionupdate":ft="onCompositionUpdate";break e}ft=void 0}else $o?NE(i,c)&&(ft="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(ft="onCompositionStart");ft&&(AE&&c.locale!=="ko"&&($o||ft!=="onCompositionStart"?ft==="onCompositionEnd"&&$o&&(Je=EE()):(As=fe,jp="value"in As?As.value:As.textContent,$o=!0)),je=Gd(ae,ft),0<je.length&&(ft=new CE(ft,i,null,c,fe),pe.push({event:ft,listeners:je}),Je?ft.data=Je:(Je=RE(c),Je!==null&&(ft.data=Je)))),(Je=LI?PI(i,c):jI(i,c))&&(ft=Gd(ae,"onBeforeInput"),0<ft.length&&(je=new CE("onBeforeInput","beforeinput",null,c,fe),pe.push({event:je,listeners:ft}),je.data=Je)),kL(pe,i,ae,c,fe)}m2(pe,a)})}function lc(i,a,c){return{instance:i,listener:a,currentTarget:c}}function Gd(i,a){for(var c=a+"Capture",h=[];i!==null;){var x=i,T=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||T===null||(x=Nu(i,c),x!=null&&h.unshift(lc(i,x,T)),x=Nu(i,a),x!=null&&h.push(lc(i,x,T))),i.tag===3)return h;i=i.return}return[]}function DL(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function g2(i,a,c,h,x){for(var T=a._reactName,N=[];c!==null&&c!==h;){var L=c,X=L.alternate,ae=L.stateNode;if(L=L.tag,X!==null&&X===h)break;L!==5&&L!==26&&L!==27||ae===null||(X=ae,x?(ae=Nu(c,T),ae!=null&&N.unshift(lc(c,ae,X))):x||(ae=Nu(c,T),ae!=null&&N.push(lc(c,ae,X)))),c=c.return}N.length!==0&&i.push({event:a,listeners:N})}var ML=/\r\n?/g,IL=/\u0000|\uFFFD/g;function b2(i){return(typeof i=="string"?i:""+i).replace(ML,`
49
+ `).replace(IL,"")}function y2(i,a){return a=b2(a),b2(i)===a}function Dt(i,a,c,h,x,T){switch(c){case"children":typeof h=="string"?a==="body"||a==="textarea"&&h===""||zo(i,h):(typeof h=="number"||typeof h=="bigint")&&a!=="body"&&zo(i,""+h);break;case"className":Wf(i,"class",h);break;case"tabIndex":Wf(i,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Wf(i,c,h);break;case"style":yE(i,h,T);break;case"data":if(a!=="object"){Wf(i,"data",h);break}case"src":case"href":if(h===""&&(a!=="a"||c!=="href")){i.removeAttribute(c);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(c);break}h=Jf(""+h),i.setAttribute(c,h);break;case"action":case"formAction":if(typeof h=="function"){i.setAttribute(c,"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 T=="function"&&(c==="formAction"?(a!=="input"&&Dt(i,a,"name",x.name,x,null),Dt(i,a,"formEncType",x.formEncType,x,null),Dt(i,a,"formMethod",x.formMethod,x,null),Dt(i,a,"formTarget",x.formTarget,x,null)):(Dt(i,a,"encType",x.encType,x,null),Dt(i,a,"method",x.method,x,null),Dt(i,a,"target",x.target,x,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){i.removeAttribute(c);break}h=Jf(""+h),i.setAttribute(c,h);break;case"onClick":h!=null&&(i.onclick=Xi);break;case"onScroll":h!=null&&lt("scroll",i);break;case"onScrollEnd":h!=null&&lt("scrollend",i);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(x.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"multiple":i.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":i.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){i.removeAttribute("xlink:href");break}c=Jf(""+h),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,""+h):i.removeAttribute(c);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":h&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,""):i.removeAttribute(c);break;case"capture":case"download":h===!0?i.setAttribute(c,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?i.setAttribute(c,h):i.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?i.setAttribute(c,h):i.removeAttribute(c);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?i.removeAttribute(c):i.setAttribute(c,h);break;case"popover":lt("beforetoggle",i),lt("toggle",i),Qf(i,"popover",h);break;case"xlinkActuate":Gi(i,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":Gi(i,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":Gi(i,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":Gi(i,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":Gi(i,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":Gi(i,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":Gi(i,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":Gi(i,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":Gi(i,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Qf(i,"is",h);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=lI.get(c)||c,Qf(i,c,h))}}function yg(i,a,c,h,x,T){switch(c){case"style":yE(i,h,T);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(x.children!=null)throw Error(r(60));i.innerHTML=c}}break;case"children":typeof h=="string"?zo(i,h):(typeof h=="number"||typeof h=="bigint")&&zo(i,""+h);break;case"onScroll":h!=null&&lt("scroll",i);break;case"onScrollEnd":h!=null&&lt("scrollend",i);break;case"onClick":h!=null&&(i.onclick=Xi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!uE.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(x=c.endsWith("Capture"),a=c.slice(2,x?c.length-7:void 0),T=i[lr]||null,T=T!=null?T[c]:null,typeof T=="function"&&i.removeEventListener(a,T,x),typeof h=="function")){typeof T!="function"&&T!==null&&(c in i?i[c]=null:i.hasAttribute(c)&&i.removeAttribute(c)),i.addEventListener(a,h,x);break e}c in i?i[c]=h:h===!0?i.setAttribute(c,""):Qf(i,c,h)}}}function Bn(i,a,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":lt("error",i),lt("load",i);var h=!1,x=!1,T;for(T in c)if(c.hasOwnProperty(T)){var N=c[T];if(N!=null)switch(T){case"src":h=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Dt(i,a,T,N,c,null)}}x&&Dt(i,a,"srcSet",c.srcSet,c,null),h&&Dt(i,a,"src",c.src,c,null);return;case"input":lt("invalid",i);var L=T=N=x=null,X=null,ae=null;for(h in c)if(c.hasOwnProperty(h)){var fe=c[h];if(fe!=null)switch(h){case"name":x=fe;break;case"type":N=fe;break;case"checked":X=fe;break;case"defaultChecked":ae=fe;break;case"value":T=fe;break;case"defaultValue":L=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(r(137,a));break;default:Dt(i,a,h,fe,c,null)}}mE(i,T,L,X,ae,N,x,!1);return;case"select":lt("invalid",i),h=N=T=null;for(x in c)if(c.hasOwnProperty(x)&&(L=c[x],L!=null))switch(x){case"value":T=L;break;case"defaultValue":N=L;break;case"multiple":h=L;default:Dt(i,a,x,L,c,null)}a=T,c=N,i.multiple=!!h,a!=null?Ho(i,!!h,a,!1):c!=null&&Ho(i,!!h,c,!0);return;case"textarea":lt("invalid",i),T=x=h=null;for(N in c)if(c.hasOwnProperty(N)&&(L=c[N],L!=null))switch(N){case"value":h=L;break;case"defaultValue":x=L;break;case"children":T=L;break;case"dangerouslySetInnerHTML":if(L!=null)throw Error(r(91));break;default:Dt(i,a,N,L,c,null)}gE(i,h,x,T);return;case"option":for(X in c)if(c.hasOwnProperty(X)&&(h=c[X],h!=null))switch(X){case"selected":i.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Dt(i,a,X,h,c,null)}return;case"dialog":lt("beforetoggle",i),lt("toggle",i),lt("cancel",i),lt("close",i);break;case"iframe":case"object":lt("load",i);break;case"video":case"audio":for(h=0;h<oc.length;h++)lt(oc[h],i);break;case"image":lt("error",i),lt("load",i);break;case"details":lt("toggle",i);break;case"embed":case"source":case"link":lt("error",i),lt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ae in c)if(c.hasOwnProperty(ae)&&(h=c[ae],h!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Dt(i,a,ae,h,c,null)}return;default:if(Dp(a)){for(fe in c)c.hasOwnProperty(fe)&&(h=c[fe],h!==void 0&&yg(i,a,fe,h,c,void 0));return}}for(L in c)c.hasOwnProperty(L)&&(h=c[L],h!=null&&Dt(i,a,L,h,c,null))}function LL(i,a,c,h){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,T=null,N=null,L=null,X=null,ae=null,fe=null;for(le in c){var pe=c[le];if(c.hasOwnProperty(le)&&pe!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":X=pe;default:h.hasOwnProperty(le)||Dt(i,a,le,null,h,pe)}}for(var oe in h){var le=h[oe];if(pe=c[oe],h.hasOwnProperty(oe)&&(le!=null||pe!=null))switch(oe){case"type":T=le;break;case"name":x=le;break;case"checked":ae=le;break;case"defaultChecked":fe=le;break;case"value":N=le;break;case"defaultValue":L=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(r(137,a));break;default:le!==pe&&Dt(i,a,oe,le,h,pe)}}Rp(i,N,L,X,ae,fe,T,x);return;case"select":le=N=L=oe=null;for(T in c)if(X=c[T],c.hasOwnProperty(T)&&X!=null)switch(T){case"value":break;case"multiple":le=X;default:h.hasOwnProperty(T)||Dt(i,a,T,null,h,X)}for(x in h)if(T=h[x],X=c[x],h.hasOwnProperty(x)&&(T!=null||X!=null))switch(x){case"value":oe=T;break;case"defaultValue":L=T;break;case"multiple":N=T;default:T!==X&&Dt(i,a,x,T,h,X)}a=L,c=N,h=le,oe!=null?Ho(i,!!c,oe,!1):!!h!=!!c&&(a!=null?Ho(i,!!c,a,!0):Ho(i,!!c,c?[]:"",!1));return;case"textarea":le=oe=null;for(L in c)if(x=c[L],c.hasOwnProperty(L)&&x!=null&&!h.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:Dt(i,a,L,null,h,x)}for(N in h)if(x=h[N],T=c[N],h.hasOwnProperty(N)&&(x!=null||T!=null))switch(N){case"value":oe=x;break;case"defaultValue":le=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==T&&Dt(i,a,N,x,h,T)}pE(i,oe,le);return;case"option":for(var De in c)if(oe=c[De],c.hasOwnProperty(De)&&oe!=null&&!h.hasOwnProperty(De))switch(De){case"selected":i.selected=!1;break;default:Dt(i,a,De,null,h,oe)}for(X in h)if(oe=h[X],le=c[X],h.hasOwnProperty(X)&&oe!==le&&(oe!=null||le!=null))switch(X){case"selected":i.selected=oe&&typeof oe!="function"&&typeof oe!="symbol";break;default:Dt(i,a,X,oe,h,le)}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 qe in c)oe=c[qe],c.hasOwnProperty(qe)&&oe!=null&&!h.hasOwnProperty(qe)&&Dt(i,a,qe,null,h,oe);for(ae in h)if(oe=h[ae],le=c[ae],h.hasOwnProperty(ae)&&oe!==le&&(oe!=null||le!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,a));break;default:Dt(i,a,ae,oe,h,le)}return;default:if(Dp(a)){for(var Mt in c)oe=c[Mt],c.hasOwnProperty(Mt)&&oe!==void 0&&!h.hasOwnProperty(Mt)&&yg(i,a,Mt,void 0,h,oe);for(fe in h)oe=h[fe],le=c[fe],!h.hasOwnProperty(fe)||oe===le||oe===void 0&&le===void 0||yg(i,a,fe,oe,h,le);return}}for(var ee in c)oe=c[ee],c.hasOwnProperty(ee)&&oe!=null&&!h.hasOwnProperty(ee)&&Dt(i,a,ee,null,h,oe);for(pe in h)oe=h[pe],le=c[pe],!h.hasOwnProperty(pe)||oe===le||oe==null&&le==null||Dt(i,a,pe,oe,h,le)}function x2(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function PL(){if(typeof performance.getEntriesByType=="function"){for(var i=0,a=0,c=performance.getEntriesByType("resource"),h=0;h<c.length;h++){var x=c[h],T=x.transferSize,N=x.initiatorType,L=x.duration;if(T&&L&&x2(N)){for(N=0,L=x.responseEnd,h+=1;h<c.length;h++){var X=c[h],ae=X.startTime;if(ae>L)break;var fe=X.transferSize,pe=X.initiatorType;fe&&x2(pe)&&(X=X.responseEnd,N+=fe*(X<L?1:(L-ae)/(X-ae)))}if(--h,a+=8*(T+N)/(x.duration/1e3),i++,10<i)break}}if(0<i)return a/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var xg=null,vg=null;function Xd(i){return i.nodeType===9?i:i.ownerDocument}function v2(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function E2(i,a){if(i===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&a==="foreignObject"?0:i}function Eg(i,a){return i==="textarea"||i==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Tg=null;function jL(){var i=window.event;return i&&i.type==="popstate"?i===Tg?!1:(Tg=i,!0):(Tg=null,!1)}var T2=typeof setTimeout=="function"?setTimeout:void 0,BL=typeof clearTimeout=="function"?clearTimeout:void 0,S2=typeof Promise=="function"?Promise:void 0,UL=typeof queueMicrotask=="function"?queueMicrotask:typeof S2<"u"?function(i){return S2.resolve(null).then(i).catch(FL)}:T2;function FL(i){setTimeout(function(){throw i})}function Vs(i){return i==="head"}function C2(i,a){var c=a,h=0;do{var x=c.nextSibling;if(i.removeChild(c),x&&x.nodeType===8)if(c=x.data,c==="/$"||c==="/&"){if(h===0){i.removeChild(x),xl(a);return}h--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")h++;else if(c==="html")uc(i.ownerDocument.documentElement);else if(c==="head"){c=i.ownerDocument.head,uc(c);for(var T=c.firstChild;T;){var N=T.nextSibling,L=T.nodeName;T[_u]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&T.rel.toLowerCase()==="stylesheet"||c.removeChild(T),T=N}}else c==="body"&&uc(i.ownerDocument.body);c=x}while(c);xl(a)}function w2(i,a){var c=i;i=0;do{var h=c.nextSibling;if(c.nodeType===1?a?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(a?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),h&&h.nodeType===8)if(c=h.data,c==="/$"){if(i===0)break;i--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||i++;c=h}while(c)}function Sg(i){var a=i.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var c=a;switch(a=a.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":Sg(c),kp(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}i.removeChild(c)}}function HL(i,a,c,h){for(;i.nodeType===1;){var x=c;if(i.nodeName.toLowerCase()!==a.toLowerCase()){if(!h&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(h){if(!i[_u])switch(a){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(T=i.getAttribute("rel"),T==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(T!==x.rel||i.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||i.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||i.getAttribute("title")!==(x.title==null?null:x.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(T=i.getAttribute("src"),(T!==(x.src==null?null:x.src)||i.getAttribute("type")!==(x.type==null?null:x.type)||i.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&T&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(a==="input"&&i.type==="hidden"){var T=x.name==null?null:""+x.name;if(x.type==="hidden"&&i.getAttribute("name")===T)return i}else return i;if(i=zr(i.nextSibling),i===null)break}return null}function zL(i,a,c){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!c||(i=zr(i.nextSibling),i===null))return null;return i}function A2(i,a){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!a||(i=zr(i.nextSibling),i===null))return null;return i}function Cg(i){return i.data==="$?"||i.data==="$~"}function wg(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function VL(i,a){var c=i.ownerDocument;if(i.data==="$~")i._reactRetry=a;else if(i.data!=="$?"||c.readyState!=="loading")a();else{var h=function(){a(),c.removeEventListener("DOMContentLoaded",h)};c.addEventListener("DOMContentLoaded",h),i._reactRetry=h}}function zr(i){for(;i!=null;i=i.nextSibling){var a=i.nodeType;if(a===1||a===3)break;if(a===8){if(a=i.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return i}var Ag=null;function _2(i){i=i.nextSibling;for(var a=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"||c==="/&"){if(a===0)return zr(i.nextSibling);a--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||a++}i=i.nextSibling}return null}function k2(i){i=i.previousSibling;for(var a=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(a===0)return i;a--}else c!=="/$"&&c!=="/&"||a++}i=i.previousSibling}return null}function N2(i,a,c){switch(a=Xd(c),i){case"html":if(i=a.documentElement,!i)throw Error(r(452));return i;case"head":if(i=a.head,!i)throw Error(r(453));return i;case"body":if(i=a.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function uc(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);kp(i)}var Vr=new Map,R2=new Set;function Kd(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var cs=H.d;H.d={f:qL,r:$L,D:YL,C:GL,L:XL,m:KL,X:WL,S:QL,M:ZL};function qL(){var i=cs.f(),a=Fd();return i||a}function $L(i){var a=Bo(i);a!==null&&a.tag===5&&a.type==="form"?GT(a):cs.r(i)}var gl=typeof document>"u"?null:document;function O2(i,a,c){var h=gl;if(h&&typeof a=="string"&&a){var x=Lr(a);x='link[rel="'+i+'"][href="'+x+'"]',typeof c=="string"&&(x+='[crossorigin="'+c+'"]'),R2.has(x)||(R2.add(x),i={rel:i,crossOrigin:c,href:a},h.querySelector(x)===null&&(a=h.createElement("link"),Bn(a,"link",i),An(a),h.head.appendChild(a)))}}function YL(i){cs.D(i),O2("dns-prefetch",i,null)}function GL(i,a){cs.C(i,a),O2("preconnect",i,a)}function XL(i,a,c){cs.L(i,a,c);var h=gl;if(h&&i&&a){var x='link[rel="preload"][as="'+Lr(a)+'"]';a==="image"&&c&&c.imageSrcSet?(x+='[imagesrcset="'+Lr(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(x+='[imagesizes="'+Lr(c.imageSizes)+'"]')):x+='[href="'+Lr(i)+'"]';var T=x;switch(a){case"style":T=bl(i);break;case"script":T=yl(i)}Vr.has(T)||(i=p({rel:"preload",href:a==="image"&&c&&c.imageSrcSet?void 0:i,as:a},c),Vr.set(T,i),h.querySelector(x)!==null||a==="style"&&h.querySelector(cc(T))||a==="script"&&h.querySelector(fc(T))||(a=h.createElement("link"),Bn(a,"link",i),An(a),h.head.appendChild(a)))}}function KL(i,a){cs.m(i,a);var c=gl;if(c&&i){var h=a&&typeof a.as=="string"?a.as:"script",x='link[rel="modulepreload"][as="'+Lr(h)+'"][href="'+Lr(i)+'"]',T=x;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=yl(i)}if(!Vr.has(T)&&(i=p({rel:"modulepreload",href:i},a),Vr.set(T,i),c.querySelector(x)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(fc(T)))return}h=c.createElement("link"),Bn(h,"link",i),An(h),c.head.appendChild(h)}}}function QL(i,a,c){cs.S(i,a,c);var h=gl;if(h&&i){var x=Uo(h).hoistableStyles,T=bl(i);a=a||"default";var N=x.get(T);if(!N){var L={loading:0,preload:null};if(N=h.querySelector(cc(T)))L.loading=5;else{i=p({rel:"stylesheet",href:i,"data-precedence":a},c),(c=Vr.get(T))&&_g(i,c);var X=N=h.createElement("link");An(X),Bn(X,"link",i),X._p=new Promise(function(ae,fe){X.onload=ae,X.onerror=fe}),X.addEventListener("load",function(){L.loading|=1}),X.addEventListener("error",function(){L.loading|=2}),L.loading|=4,Qd(N,a,h)}N={type:"stylesheet",instance:N,count:1,state:L},x.set(T,N)}}}function WL(i,a){cs.X(i,a);var c=gl;if(c&&i){var h=Uo(c).hoistableScripts,x=yl(i),T=h.get(x);T||(T=c.querySelector(fc(x)),T||(i=p({src:i,async:!0},a),(a=Vr.get(x))&&kg(i,a),T=c.createElement("script"),An(T),Bn(T,"link",i),c.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},h.set(x,T))}}function ZL(i,a){cs.M(i,a);var c=gl;if(c&&i){var h=Uo(c).hoistableScripts,x=yl(i),T=h.get(x);T||(T=c.querySelector(fc(x)),T||(i=p({src:i,async:!0,type:"module"},a),(a=Vr.get(x))&&kg(i,a),T=c.createElement("script"),An(T),Bn(T,"link",i),c.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},h.set(x,T))}}function D2(i,a,c,h){var x=(x=Ee.current)?Kd(x):null;if(!x)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(a=bl(c.href),c=Uo(x).hoistableStyles,h=c.get(a),h||(h={type:"style",instance:null,count:0,state:null},c.set(a,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){i=bl(c.href);var T=Uo(x).hoistableStyles,N=T.get(i);if(N||(x=x.ownerDocument||x,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(i,N),(T=x.querySelector(cc(i)))&&!T._p&&(N.instance=T,N.state.loading=5),Vr.has(i)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},Vr.set(i,c),T||JL(x,i,c,N.state))),a&&h===null)throw Error(r(528,""));return N}if(a&&h!==null)throw Error(r(529,""));return null;case"script":return a=c.async,c=c.src,typeof c=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=yl(c),c=Uo(x).hoistableScripts,h=c.get(a),h||(h={type:"script",instance:null,count:0,state:null},c.set(a,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function bl(i){return'href="'+Lr(i)+'"'}function cc(i){return'link[rel="stylesheet"]['+i+"]"}function M2(i){return p({},i,{"data-precedence":i.precedence,precedence:null})}function JL(i,a,c,h){i.querySelector('link[rel="preload"][as="style"]['+a+"]")?h.loading=1:(a=i.createElement("link"),h.preload=a,a.addEventListener("load",function(){return h.loading|=1}),a.addEventListener("error",function(){return h.loading|=2}),Bn(a,"link",c),An(a),i.head.appendChild(a))}function yl(i){return'[src="'+Lr(i)+'"]'}function fc(i){return"script[async]"+i}function I2(i,a,c){if(a.count++,a.instance===null)switch(a.type){case"style":var h=i.querySelector('style[data-href~="'+Lr(c.href)+'"]');if(h)return a.instance=h,An(h),h;var x=p({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return h=(i.ownerDocument||i).createElement("style"),An(h),Bn(h,"style",x),Qd(h,c.precedence,i),a.instance=h;case"stylesheet":x=bl(c.href);var T=i.querySelector(cc(x));if(T)return a.state.loading|=4,a.instance=T,An(T),T;h=M2(c),(x=Vr.get(x))&&_g(h,x),T=(i.ownerDocument||i).createElement("link"),An(T);var N=T;return N._p=new Promise(function(L,X){N.onload=L,N.onerror=X}),Bn(T,"link",h),a.state.loading|=4,Qd(T,c.precedence,i),a.instance=T;case"script":return T=yl(c.src),(x=i.querySelector(fc(T)))?(a.instance=x,An(x),x):(h=c,(x=Vr.get(T))&&(h=p({},c),kg(h,x)),i=i.ownerDocument||i,x=i.createElement("script"),An(x),Bn(x,"link",h),i.head.appendChild(x),a.instance=x);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(h=a.instance,a.state.loading|=4,Qd(h,c.precedence,i));return a.instance}function Qd(i,a,c){for(var h=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=h.length?h[h.length-1]:null,T=x,N=0;N<h.length;N++){var L=h[N];if(L.dataset.precedence===a)T=L;else if(T!==x)break}T?T.parentNode.insertBefore(i,T.nextSibling):(a=c.nodeType===9?c.head:c,a.insertBefore(i,a.firstChild))}function _g(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function kg(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.integrity==null&&(i.integrity=a.integrity)}var Wd=null;function L2(i,a,c){if(Wd===null){var h=new Map,x=Wd=new Map;x.set(c,h)}else x=Wd,h=x.get(c),h||(h=new Map,x.set(c,h));if(h.has(i))return h;for(h.set(i,null),c=c.getElementsByTagName(i),x=0;x<c.length;x++){var T=c[x];if(!(T[_u]||T[In]||i==="link"&&T.getAttribute("rel")==="stylesheet")&&T.namespaceURI!=="http://www.w3.org/2000/svg"){var N=T.getAttribute(a)||"";N=i+N;var L=h.get(N);L?L.push(T):h.set(N,[T])}}return h}function P2(i,a,c){i=i.ownerDocument||i,i.head.insertBefore(c,a==="title"?i.querySelector("head > title"):null)}function eP(i,a,c){if(c===1||a.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return i=a.disabled,typeof a.precedence=="string"&&i==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function j2(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function tP(i,a,c,h){if(c.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var x=bl(h.href),T=a.querySelector(cc(x));if(T){a=T._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(i.count++,i=Zd.bind(i),a.then(i,i)),c.state.loading|=4,c.instance=T,An(T);return}T=a.ownerDocument||a,h=M2(h),(x=Vr.get(x))&&_g(h,x),T=T.createElement("link"),An(T);var N=T;N._p=new Promise(function(L,X){N.onload=L,N.onerror=X}),Bn(T,"link",h),c.instance=T}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(c,a),(a=c.state.preload)&&(c.state.loading&3)===0&&(i.count++,c=Zd.bind(i),a.addEventListener("load",c),a.addEventListener("error",c))}}var Ng=0;function nP(i,a){return i.stylesheets&&i.count===0&&eh(i,i.stylesheets),0<i.count||0<i.imgCount?function(c){var h=setTimeout(function(){if(i.stylesheets&&eh(i,i.stylesheets),i.unsuspend){var T=i.unsuspend;i.unsuspend=null,T()}},6e4+a);0<i.imgBytes&&Ng===0&&(Ng=62500*PL());var x=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&eh(i,i.stylesheets),i.unsuspend)){var T=i.unsuspend;i.unsuspend=null,T()}},(i.imgBytes>Ng?50:800)+a);return i.unsuspend=c,function(){i.unsuspend=null,clearTimeout(h),clearTimeout(x)}}:null}function Zd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)eh(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Jd=null;function eh(i,a){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Jd=new Map,a.forEach(rP,i),Jd=null,Zd.call(i))}function rP(i,a){if(!(a.state.loading&4)){var c=Jd.get(i);if(c)var h=c.get(null);else{c=new Map,Jd.set(i,c);for(var x=i.querySelectorAll("link[data-precedence],style[data-precedence]"),T=0;T<x.length;T++){var N=x[T];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(c.set(N.dataset.precedence,N),h=N)}h&&c.set(null,h)}x=a.instance,N=x.getAttribute("data-precedence"),T=c.get(N)||h,T===h&&c.set(null,x),c.set(N,x),this.count++,h=Zd.bind(this),x.addEventListener("load",h),x.addEventListener("error",h),T?T.parentNode.insertBefore(x,T.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(x,i.firstChild)),a.state.loading|=4}}var dc={$$typeof:k,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function iP(i,a,c,h,x,T,N,L,X){this.tag=1,this.containerInfo=i,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=ri(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ri(0),this.hiddenUpdates=ri(null),this.identifierPrefix=h,this.onUncaughtError=x,this.onCaughtError=T,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function B2(i,a,c,h,x,T,N,L,X,ae,fe,pe){return i=new iP(i,a,c,N,X,ae,fe,pe,L),a=1,T===!0&&(a|=24),T=Tr(3,null,null,a),i.current=T,T.stateNode=i,a=l0(),a.refCount++,i.pooledCache=a,a.refCount++,T.memoizedState={element:h,isDehydrated:c,cache:a},d0(T),i}function U2(i){return i?(i=Ko,i):Ko}function F2(i,a,c,h,x,T){x=U2(x),h.context===null?h.context=x:h.pendingContext=x,h=Ds(a),h.payload={element:c},T=T===void 0?null:T,T!==null&&(h.callback=T),c=Ms(i,h,a),c!==null&&(mr(c,i,a),qu(c,i,a))}function H2(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<a?c:a}}function Rg(i,a){H2(i,a),(i=i.alternate)&&H2(i,a)}function z2(i){if(i.tag===13||i.tag===31){var a=Ia(i,67108864);a!==null&&mr(a,i,67108864),Rg(i,67108864)}}function V2(i){if(i.tag===13||i.tag===31){var a=_r();a=wp(a);var c=Ia(i,a);c!==null&&mr(c,i,a),Rg(i,a)}}var th=!0;function sP(i,a,c,h){var x=I.T;I.T=null;var T=H.p;try{H.p=2,Og(i,a,c,h)}finally{H.p=T,I.T=x}}function aP(i,a,c,h){var x=I.T;I.T=null;var T=H.p;try{H.p=8,Og(i,a,c,h)}finally{H.p=T,I.T=x}}function Og(i,a,c,h){if(th){var x=Dg(h);if(x===null)bg(i,a,h,nh,c),$2(i,h);else if(lP(x,i,a,c,h))h.stopPropagation();else if($2(i,h),a&4&&-1<oP.indexOf(i)){for(;x!==null;){var T=Bo(x);if(T!==null)switch(T.tag){case 3:if(T=T.stateNode,T.current.memoizedState.isDehydrated){var N=st(T.pendingLanes);if(N!==0){var L=T;for(L.pendingLanes|=2,L.entangledLanes|=2;N;){var X=1<<31-St(N);L.entanglements[1]|=X,N&=~X}_i(T),(Ct&6)===0&&(Bd=rt()+500,ac(0))}}break;case 31:case 13:L=Ia(T,2),L!==null&&mr(L,T,2),Fd(),Rg(T,2)}if(T=Dg(h),T===null&&bg(i,a,h,nh,c),T===x)break;x=T}x!==null&&h.stopPropagation()}else bg(i,a,h,null,c)}}function Dg(i){return i=Ip(i),Mg(i)}var nh=null;function Mg(i){if(nh=null,i=jo(i),i!==null){var a=o(i);if(a===null)i=null;else{var c=a.tag;if(c===13){if(i=l(a),i!==null)return i;i=null}else if(c===31){if(i=u(a),i!==null)return i;i=null}else if(c===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return nh=i,null}function q2(i){switch(i){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(xt()){case ce:return 2;case Te:return 8;case Ue:case Ze:return 32;case ht:return 268435456;default:return 32}default:return 32}}var Ig=!1,qs=null,$s=null,Ys=null,hc=new Map,mc=new Map,Gs=[],oP="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 $2(i,a){switch(i){case"focusin":case"focusout":qs=null;break;case"dragenter":case"dragleave":$s=null;break;case"mouseover":case"mouseout":Ys=null;break;case"pointerover":case"pointerout":hc.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":mc.delete(a.pointerId)}}function pc(i,a,c,h,x,T){return i===null||i.nativeEvent!==T?(i={blockedOn:a,domEventName:c,eventSystemFlags:h,nativeEvent:T,targetContainers:[x]},a!==null&&(a=Bo(a),a!==null&&z2(a)),i):(i.eventSystemFlags|=h,a=i.targetContainers,x!==null&&a.indexOf(x)===-1&&a.push(x),i)}function lP(i,a,c,h,x){switch(a){case"focusin":return qs=pc(qs,i,a,c,h,x),!0;case"dragenter":return $s=pc($s,i,a,c,h,x),!0;case"mouseover":return Ys=pc(Ys,i,a,c,h,x),!0;case"pointerover":var T=x.pointerId;return hc.set(T,pc(hc.get(T)||null,i,a,c,h,x)),!0;case"gotpointercapture":return T=x.pointerId,mc.set(T,pc(mc.get(T)||null,i,a,c,h,x)),!0}return!1}function Y2(i){var a=jo(i.target);if(a!==null){var c=o(a);if(c!==null){if(a=c.tag,a===13){if(a=l(c),a!==null){i.blockedOn=a,aE(i.priority,function(){V2(c)});return}}else if(a===31){if(a=u(c),a!==null){i.blockedOn=a,aE(i.priority,function(){V2(c)});return}}else if(a===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function rh(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;0<a.length;){var c=Dg(i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Mp=h,c.target.dispatchEvent(h),Mp=null}else return a=Bo(c),a!==null&&z2(a),i.blockedOn=c,!1;a.shift()}return!0}function G2(i,a,c){rh(i)&&c.delete(a)}function uP(){Ig=!1,qs!==null&&rh(qs)&&(qs=null),$s!==null&&rh($s)&&($s=null),Ys!==null&&rh(Ys)&&(Ys=null),hc.forEach(G2),mc.forEach(G2)}function ih(i,a){i.blockedOn===a&&(i.blockedOn=null,Ig||(Ig=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,uP)))}var sh=null;function X2(i){sh!==i&&(sh=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){sh===i&&(sh=null);for(var a=0;a<i.length;a+=3){var c=i[a],h=i[a+1],x=i[a+2];if(typeof h!="function"){if(Mg(h||c)===null)continue;break}var T=Bo(c);T!==null&&(i.splice(a,3),a-=3,D0(T,{pending:!0,data:x,method:c.method,action:h},h,x))}}))}function xl(i){function a(X){return ih(X,i)}qs!==null&&ih(qs,i),$s!==null&&ih($s,i),Ys!==null&&ih(Ys,i),hc.forEach(a),mc.forEach(a);for(var c=0;c<Gs.length;c++){var h=Gs[c];h.blockedOn===i&&(h.blockedOn=null)}for(;0<Gs.length&&(c=Gs[0],c.blockedOn===null);)Y2(c),c.blockedOn===null&&Gs.shift();if(c=(i.ownerDocument||i).$$reactFormReplay,c!=null)for(h=0;h<c.length;h+=3){var x=c[h],T=c[h+1],N=x[lr]||null;if(typeof T=="function")N||X2(c);else if(N){var L=null;if(T&&T.hasAttribute("formAction")){if(x=T,N=T[lr]||null)L=N.formAction;else if(Mg(x)!==null)continue}else L=N.action;typeof L=="function"?c[h+1]=L:(c.splice(h,3),h-=3),X2(c)}}}function K2(){function i(T){T.canIntercept&&T.info==="react-transition"&&T.intercept({handler:function(){return new Promise(function(N){return x=N})},focusReset:"manual",scroll:"manual"})}function a(){x!==null&&(x(),x=null),h||setTimeout(c,20)}function c(){if(!h&&!navigation.transition){var T=navigation.currentEntry;T&&T.url!=null&&navigation.navigate(T.url,{state:T.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,x=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(c,100),function(){h=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),x!==null&&(x(),x=null)}}}function Lg(i){this._internalRoot=i}ah.prototype.render=Lg.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(r(409));var c=a.current,h=_r();F2(c,h,i,a,null,null)},ah.prototype.unmount=Lg.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;F2(i.current,2,null,i,null,null),Fd(),a[Po]=null}};function ah(i){this._internalRoot=i}ah.prototype.unstable_scheduleHydration=function(i){if(i){var a=sE();i={blockedOn:null,target:i,priority:a};for(var c=0;c<Gs.length&&a!==0&&a<Gs[c].priority;c++);Gs.splice(c,0,i),c===0&&Y2(i)}};var Q2=t.version;if(Q2!=="19.2.4")throw Error(r(527,Q2,"19.2.4"));H.findDOMNode=function(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(a),i=i!==null?m(i):null,i=i===null?null:i.stateNode,i};var cP={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var oh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oh.isDisabled&&oh.supportsFiber)try{un=oh.inject(cP),qt=oh}catch{}}return bc.createRoot=function(i,a){if(!s(i))throw Error(r(299));var c=!1,h="",x=rS,T=iS,N=sS;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(h=a.identifierPrefix),a.onUncaughtError!==void 0&&(x=a.onUncaughtError),a.onCaughtError!==void 0&&(T=a.onCaughtError),a.onRecoverableError!==void 0&&(N=a.onRecoverableError)),a=B2(i,1,!1,null,null,c,h,null,x,T,N,K2),i[Po]=a.current,gg(i),new Lg(a)},bc.hydrateRoot=function(i,a,c){if(!s(i))throw Error(r(299));var h=!1,x="",T=rS,N=iS,L=sS,X=null;return c!=null&&(c.unstable_strictMode===!0&&(h=!0),c.identifierPrefix!==void 0&&(x=c.identifierPrefix),c.onUncaughtError!==void 0&&(T=c.onUncaughtError),c.onCaughtError!==void 0&&(N=c.onCaughtError),c.onRecoverableError!==void 0&&(L=c.onRecoverableError),c.formState!==void 0&&(X=c.formState)),a=B2(i,1,!0,a,c??null,h,x,X,T,N,L,K2),a.context=U2(null),c=a.current,h=_r(),h=wp(h),x=Ds(h),x.callback=null,Ms(c,x,h),c=h,a.current.lanes=c,or(a,c),_i(a),i[Po]=a.current,gg(i),new ah(a)},bc.version="19.2.4",bc}var lC;function CP(){if(lC)return Ug.exports;lC=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(),Ug.exports=SP(),Ug.exports}var wP=CP();const AP=Ao(wP);var cu=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(){}},_P={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},sa,qy,F3,kP=(F3=class{constructor(){Be(this,sa,_P);Be(this,qy,!1)}setTimeoutProvider(e){ke(this,sa,e)}setTimeout(e,t){return Q(this,sa).setTimeout(e,t)}clearTimeout(e){Q(this,sa).clearTimeout(e)}setInterval(e,t){return Q(this,sa).setInterval(e,t)}clearInterval(e){Q(this,sa).clearInterval(e)}},sa=new WeakMap,qy=new WeakMap,F3),eo=new kP;function NP(e){setTimeout(e,0)}var go=typeof window>"u"||"Deno"in globalThis;function Jn(){}function RP(e,t){return typeof e=="function"?e(t):e}function xb(e){return typeof e=="number"&&e>=0&&e!==1/0}function Z3(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ga(e,t){return typeof e=="function"?e(t):e}function $r(e,t){return typeof e=="function"?e(t):e}function uC(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:o,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==Gy(l,t.options))return!1}else if(!nf(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||s&&s!==t.state.fetchStatus||o&&!o(t))}function cC(e,t){const{exact:n,status:r,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(bo(t.options.mutationKey)!==bo(o))return!1}else if(!nf(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Gy(e,t){return((t==null?void 0:t.queryKeyHashFn)||bo)(e)}function bo(e){return JSON.stringify(e,(t,n)=>vb(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function nf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>nf(e[n],t[n])):!1}var OP=Object.prototype.hasOwnProperty;function J3(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=fC(e)&&fC(t);if(!r&&!(vb(e)&&vb(t)))return t;const o=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),u=l.length,d=r?new Array(u):{};let f=0;for(let m=0;m<u;m++){const p=r?m:l[m],g=e[p],y=t[p];if(g===y){d[p]=g,(r?m<o:OP.call(e,p))&&f++;continue}if(g===null||y===null||typeof g!="object"||typeof y!="object"){d[p]=y;continue}const E=J3(g,y,n+1);d[p]=E,E===g&&f++}return o===u&&f===o?e:d}function tm(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function fC(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function vb(e){if(!dC(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!dC(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function dC(e){return Object.prototype.toString.call(e)==="[object Object]"}function DP(e){return new Promise(t=>{eo.setTimeout(t,e)})}function Eb(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?J3(e,t):t}function MP(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function IP(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Xy=Symbol();function ek(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Xy?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ky(e,t){return typeof e=="function"?e(...t):!!e}function LP(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var io,aa,$l,H3,PP=(H3=class extends cu{constructor(){super();Be(this,io);Be(this,aa);Be(this,$l);ke(this,$l,t=>{if(!go&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Q(this,aa)||this.setEventListener(Q(this,$l))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,aa))==null||t.call(this),ke(this,aa,void 0))}setEventListener(t){var n;ke(this,$l,t),(n=Q(this,aa))==null||n.call(this),ke(this,aa,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){Q(this,io)!==t&&(ke(this,io,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof Q(this,io)=="boolean"?Q(this,io):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},io=new WeakMap,aa=new WeakMap,$l=new WeakMap,H3),Qy=new PP;function Tb(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var jP=NP;function BP(){let e=[],t=0,n=u=>{u()},r=u=>{u()},s=jP;const o=u=>{t?e.push(u):s(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&s(()=>{r(()=>{u.forEach(d=>{n(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||l()}return d},batchCalls:u=>(...d)=>{o(()=>{u(...d)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{s=u}}}var Tn=BP(),Yl,oa,Gl,z3,UP=(z3=class extends cu{constructor(){super();Be(this,Yl,!0);Be(this,oa);Be(this,Gl);ke(this,Gl,t=>{if(!go&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){Q(this,oa)||this.setEventListener(Q(this,Gl))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,oa))==null||t.call(this),ke(this,oa,void 0))}setEventListener(t){var n;ke(this,Gl,t),(n=Q(this,oa))==null||n.call(this),ke(this,oa,t(this.setOnline.bind(this)))}setOnline(t){Q(this,Yl)!==t&&(ke(this,Yl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return Q(this,Yl)}},Yl=new WeakMap,oa=new WeakMap,Gl=new WeakMap,z3),nm=new UP;function FP(e){return Math.min(1e3*2**e,3e4)}function tk(e){return(e??"online")==="online"?nm.isOnline():!0}var Sb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function nk(e){let t=!1,n=0,r;const s=Tb(),o=()=>s.status!=="pending",l=S=>{var A;if(!o()){const w=new Sb(S);g(w),(A=e.onCancel)==null||A.call(e,w)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Qy.isFocused()&&(e.networkMode==="always"||nm.isOnline())&&e.canRun(),m=()=>tk(e.networkMode)&&e.canRun(),p=S=>{o()||(r==null||r(),s.resolve(S))},g=S=>{o()||(r==null||r(),s.reject(S))},y=()=>new Promise(S=>{var A;r=w=>{(o()||f())&&S(w)},(A=e.onPause)==null||A.call(e)}).then(()=>{var S;r=void 0,o()||(S=e.onContinue)==null||S.call(e)}),E=()=>{if(o())return;let S;const A=n===0?e.initialPromise:void 0;try{S=A??e.fn()}catch(w){S=Promise.reject(w)}Promise.resolve(S).then(p).catch(w=>{var O;if(o())return;const _=e.retry??(go?0:3),k=e.retryDelay??FP,R=typeof k=="function"?k(n,w):k,M=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,w);if(t||!M){g(w);return}n++,(O=e.onFail)==null||O.call(e,n,w),DP(R).then(()=>f()?void 0:y()).then(()=>{t?g(w):E()})})};return{promise:s,status:()=>s.status,cancel:l,continue:()=>(r==null||r(),s),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?E():y().then(E),s)}}var so,V3,rk=(V3=class{constructor(){Be(this,so)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xb(this.gcTime)&&ke(this,so,eo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(go?1/0:300*1e3))}clearGcTimeout(){Q(this,so)&&(eo.clearTimeout(Q(this,so)),ke(this,so,void 0))}},so=new WeakMap,V3),ao,Xl,qr,oo,Rn,vf,lo,ci,ds,q3,HP=(q3=class extends rk{constructor(t){super();Be(this,ci);Be(this,ao);Be(this,Xl);Be(this,qr);Be(this,oo);Be(this,Rn);Be(this,vf);Be(this,lo);ke(this,lo,!1),ke(this,vf,t.defaultOptions),this.setOptions(t.options),this.observers=[],ke(this,oo,t.client),ke(this,qr,Q(this,oo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ke(this,ao,mC(this.options)),this.state=t.state??Q(this,ao),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Q(this,Rn))==null?void 0:t.promise}setOptions(t){if(this.options={...Q(this,vf),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=mC(this.options);n.data!==void 0&&(this.setState(hC(n.data,n.dataUpdatedAt)),ke(this,ao,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Q(this,qr).remove(this)}setData(t,n){const r=Eb(this.state.data,t,this.options);return nt(this,ci,ds).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){nt(this,ci,ds).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=Q(this,Rn))==null?void 0:r.promise;return(s=Q(this,Rn))==null||s.cancel(t),n?n.then(Jn).catch(Jn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Q(this,ao))}isActive(){return this.observers.some(t=>$r(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Xy||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ga(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Z3(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=Q(this,Rn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=Q(this,Rn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Q(this,qr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(Q(this,Rn)&&(Q(this,lo)?Q(this,Rn).cancel({revert:!0}):Q(this,Rn).cancelRetry()),this.scheduleGc()),Q(this,qr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||nt(this,ci,ds).call(this,{type:"invalidate"})}async fetch(t,n){var d,f,m,p,g,y,E,S,A,w,_,k;if(this.state.fetchStatus!=="idle"&&((d=Q(this,Rn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Q(this,Rn))return Q(this,Rn).continueRetry(),Q(this,Rn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const R=this.observers.find(M=>M.options.queryFn);R&&this.setOptions(R.options)}const r=new AbortController,s=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(ke(this,lo,!0),r.signal)})},o=()=>{const R=ek(this.options,n),O=(()=>{const D={client:Q(this,oo),queryKey:this.queryKey,meta:this.meta};return s(D),D})();return ke(this,lo,!1),this.options.persister?this.options.persister(R,O,this):R(O)},u=(()=>{const R={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:Q(this,oo),state:this.state,fetchFn:o};return s(R),R})();(f=this.options.behavior)==null||f.onFetch(u,this),ke(this,Xl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=u.fetchOptions)==null?void 0:m.meta))&&nt(this,ci,ds).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),ke(this,Rn,nk({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:R=>{R instanceof Sb&&R.revert&&this.setState({...Q(this,Xl),fetchStatus:"idle"}),r.abort()},onFail:(R,M)=>{nt(this,ci,ds).call(this,{type:"failed",failureCount:R,error:M})},onPause:()=>{nt(this,ci,ds).call(this,{type:"pause"})},onContinue:()=>{nt(this,ci,ds).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const R=await Q(this,Rn).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(y=(g=Q(this,qr).config).onSuccess)==null||y.call(g,R,this),(S=(E=Q(this,qr).config).onSettled)==null||S.call(E,R,this.state.error,this),R}catch(R){if(R instanceof Sb){if(R.silent)return Q(this,Rn).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw nt(this,ci,ds).call(this,{type:"error",error:R}),(w=(A=Q(this,qr).config).onError)==null||w.call(A,R,this),(k=(_=Q(this,qr).config).onSettled)==null||k.call(_,this.state.data,R,this),R}finally{this.scheduleGc()}}},ao=new WeakMap,Xl=new WeakMap,qr=new WeakMap,oo=new WeakMap,Rn=new WeakMap,vf=new WeakMap,lo=new WeakMap,ci=new WeakSet,ds=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ik(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...hC(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ke(this,Xl,t.manual?s:void 0),s;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Tn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),Q(this,qr).notify({query:this,type:"updated",action:t})})},q3);function ik(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tk(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function hC(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function mC(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var br,gt,Ef,Zn,uo,Kl,ms,la,Tf,Ql,Wl,co,fo,ua,Zl,At,Oc,Cb,wb,Ab,_b,kb,Nb,Rb,sk,$3,zP=($3=class extends cu{constructor(t,n){super();Be(this,At);Be(this,br);Be(this,gt);Be(this,Ef);Be(this,Zn);Be(this,uo);Be(this,Kl);Be(this,ms);Be(this,la);Be(this,Tf);Be(this,Ql);Be(this,Wl);Be(this,co);Be(this,fo);Be(this,ua);Be(this,Zl,new Set);this.options=n,ke(this,br,t),ke(this,la,null),ke(this,ms,Tb()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Q(this,gt).addObserver(this),pC(Q(this,gt),this.options)?nt(this,At,Oc).call(this):this.updateResult(),nt(this,At,_b).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ob(Q(this,gt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ob(Q(this,gt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,nt(this,At,kb).call(this),nt(this,At,Nb).call(this),Q(this,gt).removeObserver(this)}setOptions(t){const n=this.options,r=Q(this,gt);if(this.options=Q(this,br).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof $r(this.options.enabled,Q(this,gt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");nt(this,At,Rb).call(this),Q(this,gt).setOptions(this.options),n._defaulted&&!tm(this.options,n)&&Q(this,br).getQueryCache().notify({type:"observerOptionsUpdated",query:Q(this,gt),observer:this});const s=this.hasListeners();s&&gC(Q(this,gt),r,this.options,n)&&nt(this,At,Oc).call(this),this.updateResult(),s&&(Q(this,gt)!==r||$r(this.options.enabled,Q(this,gt))!==$r(n.enabled,Q(this,gt))||ga(this.options.staleTime,Q(this,gt))!==ga(n.staleTime,Q(this,gt)))&&nt(this,At,Cb).call(this);const o=nt(this,At,wb).call(this);s&&(Q(this,gt)!==r||$r(this.options.enabled,Q(this,gt))!==$r(n.enabled,Q(this,gt))||o!==Q(this,ua))&&nt(this,At,Ab).call(this,o)}getOptimisticResult(t){const n=Q(this,br).getQueryCache().build(Q(this,br),t),r=this.createResult(n,t);return qP(this,r)&&(ke(this,Zn,r),ke(this,Kl,this.options),ke(this,uo,Q(this,gt).state)),r}getCurrentResult(){return Q(this,Zn)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&Q(this,ms).status==="pending"&&Q(this,ms).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){Q(this,Zl).add(t)}getCurrentQuery(){return Q(this,gt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=Q(this,br).defaultQueryOptions(t),r=Q(this,br).getQueryCache().build(Q(this,br),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return nt(this,At,Oc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),Q(this,Zn)))}createResult(t,n){var z;const r=Q(this,gt),s=this.options,o=Q(this,Zn),l=Q(this,uo),u=Q(this,Kl),f=t!==r?t.state:Q(this,Ef),{state:m}=t;let p={...m},g=!1,y;if(n._optimisticResults){const j=this.hasListeners(),K=!j&&pC(t,n),Y=j&&gC(t,r,n,s);(K||Y)&&(p={...p,...ik(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:E,errorUpdatedAt:S,status:A}=p;y=p.data;let w=!1;if(n.placeholderData!==void 0&&y===void 0&&A==="pending"){let j;o!=null&&o.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(j=o.data,w=!0):j=typeof n.placeholderData=="function"?n.placeholderData((z=Q(this,Wl))==null?void 0:z.state.data,Q(this,Wl)):n.placeholderData,j!==void 0&&(A="success",y=Eb(o==null?void 0:o.data,j,n),g=!0)}if(n.select&&y!==void 0&&!w)if(o&&y===(l==null?void 0:l.data)&&n.select===Q(this,Tf))y=Q(this,Ql);else try{ke(this,Tf,n.select),y=n.select(y),y=Eb(o==null?void 0:o.data,y,n),ke(this,Ql,y),ke(this,la,null)}catch(j){ke(this,la,j)}Q(this,la)&&(E=Q(this,la),y=Q(this,Ql),S=Date.now(),A="error");const _=p.fetchStatus==="fetching",k=A==="pending",R=A==="error",M=k&&_,O=y!==void 0,P={status:A,fetchStatus:p.fetchStatus,isPending:k,isSuccess:A==="success",isError:R,isInitialLoading:M,isLoading:M,data:y,dataUpdatedAt:p.dataUpdatedAt,error:E,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>f.dataUpdateCount||p.errorUpdateCount>f.errorUpdateCount,isFetching:_,isRefetching:_&&!k,isLoadingError:R&&!O,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:R&&O,isStale:Wy(t,n),refetch:this.refetch,promise:Q(this,ms),isEnabled:$r(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const j=P.data!==void 0,K=P.status==="error"&&!j,Y=W=>{K?W.reject(P.error):j&&W.resolve(P.data)},J=()=>{const W=ke(this,ms,P.promise=Tb());Y(W)},te=Q(this,ms);switch(te.status){case"pending":t.queryHash===r.queryHash&&Y(te);break;case"fulfilled":(K||P.data!==te.value)&&J();break;case"rejected":(!K||P.error!==te.reason)&&J();break}}return P}updateResult(){const t=Q(this,Zn),n=this.createResult(Q(this,gt),this.options);if(ke(this,uo,Q(this,gt).state),ke(this,Kl,this.options),Q(this,uo).data!==void 0&&ke(this,Wl,Q(this,gt)),tm(n,t))return;ke(this,Zn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!Q(this,Zl).size)return!0;const l=new Set(o??Q(this,Zl));return this.options.throwOnError&&l.add("error"),Object.keys(Q(this,Zn)).some(u=>{const d=u;return Q(this,Zn)[d]!==t[d]&&l.has(d)})};nt(this,At,sk).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&nt(this,At,_b).call(this)}},br=new WeakMap,gt=new WeakMap,Ef=new WeakMap,Zn=new WeakMap,uo=new WeakMap,Kl=new WeakMap,ms=new WeakMap,la=new WeakMap,Tf=new WeakMap,Ql=new WeakMap,Wl=new WeakMap,co=new WeakMap,fo=new WeakMap,ua=new WeakMap,Zl=new WeakMap,At=new WeakSet,Oc=function(t){nt(this,At,Rb).call(this);let n=Q(this,gt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Jn)),n},Cb=function(){nt(this,At,kb).call(this);const t=ga(this.options.staleTime,Q(this,gt));if(go||Q(this,Zn).isStale||!xb(t))return;const r=Z3(Q(this,Zn).dataUpdatedAt,t)+1;ke(this,co,eo.setTimeout(()=>{Q(this,Zn).isStale||this.updateResult()},r))},wb=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Q(this,gt)):this.options.refetchInterval)??!1},Ab=function(t){nt(this,At,Nb).call(this),ke(this,ua,t),!(go||$r(this.options.enabled,Q(this,gt))===!1||!xb(Q(this,ua))||Q(this,ua)===0)&&ke(this,fo,eo.setInterval(()=>{(this.options.refetchIntervalInBackground||Qy.isFocused())&&nt(this,At,Oc).call(this)},Q(this,ua)))},_b=function(){nt(this,At,Cb).call(this),nt(this,At,Ab).call(this,nt(this,At,wb).call(this))},kb=function(){Q(this,co)&&(eo.clearTimeout(Q(this,co)),ke(this,co,void 0))},Nb=function(){Q(this,fo)&&(eo.clearInterval(Q(this,fo)),ke(this,fo,void 0))},Rb=function(){const t=Q(this,br).getQueryCache().build(Q(this,br),this.options);if(t===Q(this,gt))return;const n=Q(this,gt);ke(this,gt,t),ke(this,Ef,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},sk=function(t){Tn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(Q(this,Zn))}),Q(this,br).getQueryCache().notify({query:Q(this,gt),type:"observerResultsUpdated"})})},$3);function VP(e,t){return $r(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function pC(e,t){return VP(e,t)||e.state.data!==void 0&&Ob(e,t,t.refetchOnMount)}function Ob(e,t,n){if($r(t.enabled,e)!==!1&&ga(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Wy(e,t)}return!1}function gC(e,t,n,r){return(e!==t||$r(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Wy(e,n)}function Wy(e,t){return $r(t.enabled,e)!==!1&&e.isStaleByTime(ga(t.staleTime,e))}function qP(e,t){return!tm(e.getCurrentResult(),t)}function bC(e){return{onFetch:(t,n)=>{var m,p,g,y,E;const r=t.options,s=(g=(p=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:p.fetchMore)==null?void 0:g.direction,o=((y=t.state.data)==null?void 0:y.pages)||[],l=((E=t.state.data)==null?void 0:E.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let S=!1;const A=k=>{LP(k,()=>t.signal,()=>S=!0)},w=ek(t.options,t.fetchOptions),_=async(k,R,M)=>{if(S)return Promise.reject();if(R==null&&k.pages.length)return Promise.resolve(k);const D=(()=>{const K={client:t.client,queryKey:t.queryKey,pageParam:R,direction:M?"backward":"forward",meta:t.options.meta};return A(K),K})(),P=await w(D),{maxPages:z}=t.options,j=M?IP:MP;return{pages:j(k.pages,P,z),pageParams:j(k.pageParams,R,z)}};if(s&&o.length){const k=s==="backward",R=k?$P:yC,M={pages:o,pageParams:l},O=R(r,M);u=await _(M,O,k)}else{const k=e??o.length;do{const R=d===0?l[0]??r.initialPageParam:yC(r,u);if(d>0&&R==null)break;u=await _(u,R),d++}while(d<k)}return u};t.options.persister?t.fetchFn=()=>{var S,A;return(A=(S=t.options).persister)==null?void 0:A.call(S,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function yC(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function $P(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Sf,Ri,qn,ho,Oi,Ws,Y3,YP=(Y3=class extends rk{constructor(t){super();Be(this,Oi);Be(this,Sf);Be(this,Ri);Be(this,qn);Be(this,ho);ke(this,Sf,t.client),this.mutationId=t.mutationId,ke(this,qn,t.mutationCache),ke(this,Ri,[]),this.state=t.state||ak(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Q(this,Ri).includes(t)||(Q(this,Ri).push(t),this.clearGcTimeout(),Q(this,qn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ke(this,Ri,Q(this,Ri).filter(n=>n!==t)),this.scheduleGc(),Q(this,qn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Q(this,Ri).length||(this.state.status==="pending"?this.scheduleGc():Q(this,qn).remove(this))}continue(){var t;return((t=Q(this,ho))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,u,d,f,m,p,g,y,E,S,A,w,_,k,R,M,O,D;const n=()=>{nt(this,Oi,Ws).call(this,{type:"continue"})},r={client:Q(this,Sf),meta:this.options.meta,mutationKey:this.options.mutationKey};ke(this,ho,nk({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(P,z)=>{nt(this,Oi,Ws).call(this,{type:"failed",failureCount:P,error:z})},onPause:()=>{nt(this,Oi,Ws).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Q(this,qn).canRun(this)}));const s=this.state.status==="pending",o=!Q(this,ho).canStart();try{if(s)n();else{nt(this,Oi,Ws).call(this,{type:"pending",variables:t,isPaused:o}),Q(this,qn).config.onMutate&&await Q(this,qn).config.onMutate(t,this,r);const z=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t,r));z!==this.state.context&&nt(this,Oi,Ws).call(this,{type:"pending",context:z,variables:t,isPaused:o})}const P=await Q(this,ho).start();return await((f=(d=Q(this,qn).config).onSuccess)==null?void 0:f.call(d,P,t,this.state.context,this,r)),await((p=(m=this.options).onSuccess)==null?void 0:p.call(m,P,t,this.state.context,r)),await((y=(g=Q(this,qn).config).onSettled)==null?void 0:y.call(g,P,null,this.state.variables,this.state.context,this,r)),await((S=(E=this.options).onSettled)==null?void 0:S.call(E,P,null,t,this.state.context,r)),nt(this,Oi,Ws).call(this,{type:"success",data:P}),P}catch(P){try{await((w=(A=Q(this,qn).config).onError)==null?void 0:w.call(A,P,t,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((k=(_=this.options).onError)==null?void 0:k.call(_,P,t,this.state.context,r))}catch(z){Promise.reject(z)}try{await((M=(R=Q(this,qn).config).onSettled)==null?void 0:M.call(R,void 0,P,this.state.variables,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((D=(O=this.options).onSettled)==null?void 0:D.call(O,void 0,P,t,this.state.context,r))}catch(z){Promise.reject(z)}throw nt(this,Oi,Ws).call(this,{type:"error",error:P}),P}finally{Q(this,qn).runNext(this)}}},Sf=new WeakMap,Ri=new WeakMap,qn=new WeakMap,ho=new WeakMap,Oi=new WeakSet,Ws=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Tn.batch(()=>{Q(this,Ri).forEach(r=>{r.onMutationUpdate(t)}),Q(this,qn).notify({mutation:this,type:"updated",action:t})})},Y3);function ak(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ps,fi,Cf,G3,GP=(G3=class extends cu{constructor(t={}){super();Be(this,ps);Be(this,fi);Be(this,Cf);this.config=t,ke(this,ps,new Set),ke(this,fi,new Map),ke(this,Cf,0)}build(t,n,r){const s=new YP({client:t,mutationCache:this,mutationId:++lh(this,Cf)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){Q(this,ps).add(t);const n=uh(t);if(typeof n=="string"){const r=Q(this,fi).get(n);r?r.push(t):Q(this,fi).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(Q(this,ps).delete(t)){const n=uh(t);if(typeof n=="string"){const r=Q(this,fi).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&Q(this,fi).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=uh(t);if(typeof n=="string"){const r=Q(this,fi).get(n),s=r==null?void 0:r.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=uh(t);if(typeof n=="string"){const s=(r=Q(this,fi).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Tn.batch(()=>{Q(this,ps).forEach(t=>{this.notify({type:"removed",mutation:t})}),Q(this,ps).clear(),Q(this,fi).clear()})}getAll(){return Array.from(Q(this,ps))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>cC(n,r))}findAll(t={}){return this.getAll().filter(n=>cC(t,n))}notify(t){Tn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Tn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Jn))))}},ps=new WeakMap,fi=new WeakMap,Cf=new WeakMap,G3);function uh(e){var t;return(t=e.options.scope)==null?void 0:t.id}var gs,ca,yr,bs,xs,Uh,Db,X3,XP=(X3=class extends cu{constructor(n,r){super();Be(this,xs);Be(this,gs);Be(this,ca);Be(this,yr);Be(this,bs);ke(this,gs,n),this.setOptions(r),this.bindMethods(),nt(this,xs,Uh).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=Q(this,gs).defaultMutationOptions(n),tm(this.options,r)||Q(this,gs).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Q(this,yr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&bo(r.mutationKey)!==bo(this.options.mutationKey)?this.reset():((s=Q(this,yr))==null?void 0:s.state.status)==="pending"&&Q(this,yr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=Q(this,yr))==null||n.removeObserver(this)}onMutationUpdate(n){nt(this,xs,Uh).call(this),nt(this,xs,Db).call(this,n)}getCurrentResult(){return Q(this,ca)}reset(){var n;(n=Q(this,yr))==null||n.removeObserver(this),ke(this,yr,void 0),nt(this,xs,Uh).call(this),nt(this,xs,Db).call(this)}mutate(n,r){var s;return ke(this,bs,r),(s=Q(this,yr))==null||s.removeObserver(this),ke(this,yr,Q(this,gs).getMutationCache().build(Q(this,gs),this.options)),Q(this,yr).addObserver(this),Q(this,yr).execute(n)}},gs=new WeakMap,ca=new WeakMap,yr=new WeakMap,bs=new WeakMap,xs=new WeakSet,Uh=function(){var r;const n=((r=Q(this,yr))==null?void 0:r.state)??ak();ke(this,ca,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Db=function(n){Tn.batch(()=>{var r,s,o,l,u,d,f,m;if(Q(this,bs)&&this.hasListeners()){const p=Q(this,ca).variables,g=Q(this,ca).context,y={client:Q(this,gs),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(r=Q(this,bs)).onSuccess)==null||s.call(r,n.data,p,g,y)}catch(E){Promise.reject(E)}try{(l=(o=Q(this,bs)).onSettled)==null||l.call(o,n.data,null,p,g,y)}catch(E){Promise.reject(E)}}else if((n==null?void 0:n.type)==="error"){try{(d=(u=Q(this,bs)).onError)==null||d.call(u,n.error,p,g,y)}catch(E){Promise.reject(E)}try{(m=(f=Q(this,bs)).onSettled)==null||m.call(f,void 0,n.error,p,g,y)}catch(E){Promise.reject(E)}}}this.listeners.forEach(p=>{p(Q(this,ca))})})},X3),Di,K3,KP=(K3=class extends cu{constructor(t={}){super();Be(this,Di);this.config=t,ke(this,Di,new Map)}build(t,n,r){const s=n.queryKey,o=n.queryHash??Gy(s,n);let l=this.get(o);return l||(l=new HP({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(l)),l}add(t){Q(this,Di).has(t.queryHash)||(Q(this,Di).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=Q(this,Di).get(t.queryHash);n&&(t.destroy(),n===t&&Q(this,Di).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Tn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return Q(this,Di).get(t)}getAll(){return[...Q(this,Di).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>uC(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>uC(t,r)):n}notify(t){Tn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Tn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Tn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Di=new WeakMap,K3),Jt,fa,da,Jl,eu,ha,tu,nu,Q3,QP=(Q3=class{constructor(e={}){Be(this,Jt);Be(this,fa);Be(this,da);Be(this,Jl);Be(this,eu);Be(this,ha);Be(this,tu);Be(this,nu);ke(this,Jt,e.queryCache||new KP),ke(this,fa,e.mutationCache||new GP),ke(this,da,e.defaultOptions||{}),ke(this,Jl,new Map),ke(this,eu,new Map),ke(this,ha,0)}mount(){lh(this,ha)._++,Q(this,ha)===1&&(ke(this,tu,Qy.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,Jt).onFocus())})),ke(this,nu,nm.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,Jt).onOnline())})))}unmount(){var e,t;lh(this,ha)._--,Q(this,ha)===0&&((e=Q(this,tu))==null||e.call(this),ke(this,tu,void 0),(t=Q(this,nu))==null||t.call(this),ke(this,nu,void 0))}isFetching(e){return Q(this,Jt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Q(this,fa).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Q(this,Jt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=Q(this,Jt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ga(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return Q(this,Jt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=Q(this,Jt).get(r.queryHash),o=s==null?void 0:s.state.data,l=RP(t,o);if(l!==void 0)return Q(this,Jt).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Tn.batch(()=>Q(this,Jt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Q(this,Jt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=Q(this,Jt);Tn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=Q(this,Jt);return Tn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Tn.batch(()=>Q(this,Jt).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Jn).catch(Jn)}invalidateQueries(e,t={}){return Tn.batch(()=>(Q(this,Jt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Tn.batch(()=>Q(this,Jt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Jn)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Jn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=Q(this,Jt).build(this,t);return n.isStaleByTime(ga(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Jn).catch(Jn)}fetchInfiniteQuery(e){return e.behavior=bC(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Jn).catch(Jn)}ensureInfiniteQueryData(e){return e.behavior=bC(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return nm.isOnline()?Q(this,fa).resumePausedMutations():Promise.resolve()}getQueryCache(){return Q(this,Jt)}getMutationCache(){return Q(this,fa)}getDefaultOptions(){return Q(this,da)}setDefaultOptions(e){ke(this,da,e)}setQueryDefaults(e,t){Q(this,Jl).set(bo(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Q(this,Jl).values()],n={};return t.forEach(r=>{nf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){Q(this,eu).set(bo(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Q(this,eu).values()],n={};return t.forEach(r=>{nf(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Q(this,da).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Gy(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===Xy&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Q(this,da).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Q(this,Jt).clear(),Q(this,fa).clear()}},Jt=new WeakMap,fa=new WeakMap,da=new WeakMap,Jl=new WeakMap,eu=new WeakMap,ha=new WeakMap,tu=new WeakMap,nu=new WeakMap,Q3),ok=v.createContext(void 0),yi=e=>{const t=v.useContext(ok);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},WP=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(ok.Provider,{value:e,children:t})),lk=v.createContext(!1),ZP=()=>v.useContext(lk);lk.Provider;function JP(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var e8=v.createContext(JP()),t8=()=>v.useContext(e8),n8=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Ky(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},r8=e=>{v.useEffect(()=>{e.clearReset()},[e])},i8=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||Ky(n,[e.error,r])),s8=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},a8=(e,t)=>e.isLoading&&e.isFetching&&!t,o8=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,xC=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function l8(e,t,n){var g,y,E,S;const r=ZP(),s=t8(),o=yi(),l=o.defaultQueryOptions(e);(y=(g=o.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||y.call(g,l);const u=o.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",s8(l),n8(l,s,u),r8(s);const d=!o.getQueryCache().get(l.queryHash),[f]=v.useState(()=>new t(o,l)),m=f.getOptimisticResult(l),p=!r&&e.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(A=>{const w=p?f.subscribe(Tn.batchCalls(A)):Jn;return f.updateResult(),w},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),v.useEffect(()=>{f.setOptions(l)},[l,f]),o8(l,m))throw xC(l,f,s);if(i8({result:m,errorResetBoundary:s,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw m.error;if((S=(E=o.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||S.call(E,l,m),l.experimental_prefetchInRender&&!go&&a8(m,r)){const A=d?xC(l,f,s):u==null?void 0:u.promise;A==null||A.catch(Jn).finally(()=>{f.updateResult()})}return l.notifyOnChangeProps?m:f.trackResult(m)}function xr(e,t){return l8(e,zP)}function fu(e,t){const n=yi(),[r]=v.useState(()=>new XP(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const s=v.useSyncExternalStore(v.useCallback(l=>r.subscribe(Tn.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=v.useCallback((l,u)=>{r.mutate(l,u).catch(Jn)},[r]);if(s.error&&Ky(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}const Zy=f8();function Gt(e,...t){if(!Zy)return;const n=c8(e,...t);performance.mark(n);try{console.log(e,...t)}catch{console.log(n)}}function u8(e,...t){Zy&&console.warn(e,...t)}function c8(e,...t){return e.replace(/%[sfdO]/g,n=>{const r=t.shift();return n==="%O"&&r?JSON.stringify(r).replace(/"([^"]+)":/g,"$1:"):String(r)})}function f8(){try{const e="nuqs-localStorage-test";if(typeof localStorage>"u")return!1;localStorage.setItem(e,e);const t=localStorage.getItem(e)===e;return localStorage.removeItem(e),t&&(localStorage.getItem("debug")||"").includes("nuqs")}catch{return!1}}const d8={303:"Multiple adapter contexts detected. This might happen in monorepos.",404:"nuqs requires an adapter to work with your framework.",409:"Multiple versions of the library are loaded. This may lead to unexpected behavior. Currently using `%s`, but `%s` (via the %s adapter) was about to load on top.",414:"Max safe URL length exceeded. Some browsers may not be able to accept this URL. Consider limiting the amount of state stored in the URL.",422:"Invalid options combination: `limitUrlUpdates: debounce` should be used in SSR scenarios, with `shallow: false`",429:"URL update rate-limited by the browser. Consider increasing `throttleMs` for key(s) `%s`. %O",500:"Empty search params cache. Search params can't be accessed in Layouts.",501:"Search params cache already populated. Have you called `parse` twice?"};function Af(e){return`[nuqs] ${d8[e]}
50
+ See https://nuqs.dev/NUQS-${e}`}function h8(e){if(e.size===0)return"";const t=[];for(const[r,s]of e.entries()){const o=r.replace(/#/g,"%23").replace(/&/g,"%26").replace(/\+/g,"%2B").replace(/=/g,"%3D").replace(/\?/g,"%3F");t.push(`${o}=${m8(s)}`)}return"?"+t.join("&")}function m8(e){return e.replace(/%/g,"%25").replace(/\+/g,"%2B").replace(/ /g,"+").replace(/#/g,"%23").replace(/&/g,"%26").replace(/"/g,"%22").replace(/'/g,"%27").replace(/`/g,"%60").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/[\x00-\x1F]/g,t=>encodeURIComponent(t))}const yo=v.createContext({useAdapter(){throw new Error(Af(404))}});yo.displayName="NuqsAdapterContext";Zy&&typeof window<"u"&&(window.__NuqsAdapterContext&&window.__NuqsAdapterContext!==yo&&console.error(Af(303)),window.__NuqsAdapterContext=yo);function p8(e){return({children:t,defaultOptions:n,processUrlSearchParams:r,...s})=>v.createElement(yo.Provider,{...s,value:{useAdapter:e,defaultOptions:n,processUrlSearchParams:r}},t)}function g8(e){const t=v.useContext(yo);if(!("useAdapter"in t))throw new Error(Af(404));return t.useAdapter(e)}const b8=()=>v.useContext(yo).defaultOptions,y8=()=>v.useContext(yo).processUrlSearchParams;function x8(){var e;if(typeof window>"u"||!window.GestureEvent)return 50;try{const t=(e=navigator.userAgent)==null?void 0:e.match(/version\/([\d\.]+) safari/i);return parseFloat(t[1])>=17?120:320}catch{return 320}}function v8(e){return{method:"throttle",timeMs:e}}const Uc=v8(x8());function E8(e){return e===null||Array.isArray(e)&&e.length===0}function T8(e,t,n){if(typeof e=="string")n.set(t,e);else{n.delete(t);for(const r of e)n.append(t,r);n.has(t)||n.set(t,"")}return n}function Jy(){const e=new Map;return{on(t,n){const r=e.get(t)||[];return r.push(n),e.set(t,r),()=>this.off(t,n)},off(t,n){const r=e.get(t);r&&e.set(t,r.filter(s=>s!==n))},emit(t,n){var r;(r=e.get(t))==null||r.forEach(s=>s(n))}}}function Mb(e,t,n){function r(){e(),n.removeEventListener("abort",o)}const s=setTimeout(r,t);function o(){clearTimeout(s),n.removeEventListener("abort",o)}n.addEventListener("abort",o)}function Ib(){const e=Promise;if(Promise.hasOwnProperty("withResolvers"))return Promise.withResolvers();let t=()=>{},n=()=>{};return{promise:new e((r,s)=>{t=r,n=s}),resolve:t,reject:n}}function S8(e,t){let n=t;for(let r=e.length-1;r>=0;r--){const s=e[r];if(!s)continue;const o=n;n=()=>s(o)}n()}function Lb(){return new URLSearchParams(location.search)}var uk=class{constructor(){$e(this,"updateMap",new Map);$e(this,"options",{history:"replace",scroll:!1,shallow:!0});$e(this,"timeMs",Uc.timeMs);$e(this,"transitions",new Set);$e(this,"resolvers",null);$e(this,"controller",null);$e(this,"lastFlushedAt",0);$e(this,"resetQueueOnNextPush",!1)}push({key:e,query:t,options:n},r=Uc.timeMs){this.resetQueueOnNextPush&&(this.reset(),this.resetQueueOnNextPush=!1),Gt("[nuqs gtq] Enqueueing %s=%s %O",e,t,n),this.updateMap.set(e,t),n.history==="push"&&(this.options.history="push"),n.scroll&&(this.options.scroll=!0),n.shallow===!1&&(this.options.shallow=!1),n.startTransition&&this.transitions.add(n.startTransition),(!Number.isFinite(this.timeMs)||r>this.timeMs)&&(this.timeMs=r)}getQueuedQuery(e){return this.updateMap.get(e)}getPendingPromise({getSearchParamsSnapshot:e=Lb}){var t;return((t=this.resolvers)==null?void 0:t.promise)??Promise.resolve(e())}flush({getSearchParamsSnapshot:e=Lb,rateLimitFactor:t=1,...n},r){if(this.controller??(this.controller=new AbortController),!Number.isFinite(this.timeMs))return Gt("[nuqs gtq] Skipping flush due to throttleMs=Infinity"),Promise.resolve(e());if(this.resolvers)return this.resolvers.promise;this.resolvers=Ib();const s=()=>{this.lastFlushedAt=performance.now();const[l,u]=this.applyPendingUpdates({...n,autoResetQueueOnUpdate:n.autoResetQueueOnUpdate??!0,getSearchParamsSnapshot:e},r);u===null?(this.resolvers.resolve(l),this.resetQueueOnNextPush=!0):this.resolvers.reject(l),this.resolvers=null};return Mb(()=>{const l=performance.now()-this.lastFlushedAt,u=this.timeMs,d=t*Math.max(0,u-l);Gt("[nuqs gtq] Scheduling flush in %f ms. Throttled at %f ms (x%f)",d,u,t),d===0?s():Mb(s,d,this.controller.signal)},0,this.controller.signal),this.resolvers.promise}abort(){var e,t;return(e=this.controller)==null||e.abort(),this.controller=new AbortController,(t=this.resolvers)==null||t.resolve(new URLSearchParams),this.resolvers=null,this.reset()}reset(){const e=Array.from(this.updateMap.keys());return Gt("[nuqs gtq] Resetting queue %s",JSON.stringify(Object.fromEntries(this.updateMap))),this.updateMap.clear(),this.transitions.clear(),this.options={history:"replace",scroll:!1,shallow:!0},this.timeMs=Uc.timeMs,e}applyPendingUpdates(e,t){const{updateUrl:n,getSearchParamsSnapshot:r}=e;let s=r();if(Gt("[nuqs gtq] Applying %d pending update(s) on top of %s",this.updateMap.size,s.toString()),this.updateMap.size===0)return[s,null];const o=Array.from(this.updateMap.entries()),l={...this.options},u=Array.from(this.transitions);e.autoResetQueueOnUpdate&&this.reset(),Gt("[nuqs gtq] Flushing queue %O with options %O",o,l);for(const[d,f]of o)f===null?s.delete(d):s=T8(f,d,s);t&&(s=t(s));try{return S8(u,()=>{n(s,l)}),[s,null]}catch(d){return console.error(Af(429),o.map(([f])=>f).join(),d),[s,d]}}};const Fh=new uk;function C8(e,t,n){const r=v.useCallback(()=>{const o=Object.fromEntries(e.map(l=>[l,n(l)]));return[JSON.stringify(o),o]},[e.join(","),n]),s=v.useRef(null);return s.current===null&&(s.current=r()),v.useSyncExternalStore(v.useCallback(o=>{const l=e.map(u=>t(u,o));return()=>l.forEach(u=>u())},[e.join(","),t]),()=>{const[o,l]=r();return s.current[0]===o?s.current[1]:(s.current=[o,l],l)},()=>s.current[1])}var w8=class{constructor(e){$e(this,"callback");$e(this,"resolvers",Ib());$e(this,"controller",new AbortController);$e(this,"queuedValue");this.callback=e}abort(){this.controller.abort(),this.queuedValue=void 0}push(e,t){return this.queuedValue=e,this.controller.abort(),this.controller=new AbortController,Mb(()=>{const n=this.resolvers;try{Gt("[nuqs dq] Flushing debounce queue",e);const r=this.callback(e);Gt("[nuqs dq] Reset debounce queue %O",this.queuedValue),this.queuedValue=void 0,this.resolvers=Ib(),r.then(s=>n.resolve(s)).catch(s=>n.reject(s))}catch(r){this.queuedValue=void 0,n.reject(r)}},t,this.controller.signal),this.resolvers.promise}},A8=class{constructor(e=new uk){$e(this,"throttleQueue");$e(this,"queues",new Map);$e(this,"queuedQuerySync",Jy());this.throttleQueue=e}useQueuedQueries(e){return C8(e,(t,n)=>this.queuedQuerySync.on(t,n),t=>this.getQueuedQuery(t))}push(e,t,n,r){if(!Number.isFinite(t)){const l=n.getSearchParamsSnapshot??Lb;return Promise.resolve(l())}const s=e.key;if(!this.queues.has(s)){Gt("[nuqs dqc] Creating debounce queue for `%s`",s);const l=new w8(u=>(this.throttleQueue.push(u),this.throttleQueue.flush(n,r).finally(()=>{var d;((d=this.queues.get(u.key))==null?void 0:d.queuedValue)===void 0&&(Gt("[nuqs dqc] Cleaning up empty queue for `%s`",u.key),this.queues.delete(u.key)),this.queuedQuerySync.emit(u.key)})));this.queues.set(s,l)}Gt("[nuqs dqc] Enqueueing debounce update %O",e);const o=this.queues.get(s).push(e,t);return this.queuedQuerySync.emit(s),o}abort(e){var n;const t=this.queues.get(e);return t?(Gt("[nuqs dqc] Aborting debounce queue %s=%s",e,(n=t.queuedValue)==null?void 0:n.query),this.queues.delete(e),t.abort(),this.queuedQuerySync.emit(e),r=>(r.then(t.resolvers.resolve,t.resolvers.reject),r)):r=>r}abortAll(){var e;for(const[t,n]of this.queues.entries())Gt("[nuqs dqc] Aborting debounce queue %s=%s",t,(e=n.queuedValue)==null?void 0:e.query),n.abort(),n.resolvers.resolve(new URLSearchParams),this.queuedQuerySync.emit(t);this.queues.clear()}getQueuedQuery(e){var n,r;const t=(r=(n=this.queues.get(e))==null?void 0:n.queuedValue)==null?void 0:r.query;return t!==void 0?t:this.throttleQueue.getQueuedQuery(e)}};const Vg=new A8(Fh);function ck(e,t){return e===t?!0:e===null||t===null||typeof e=="string"||typeof t=="string"||e.length!==t.length?!1:e.every((n,r)=>n===t[r])}function vC(e,t,n){return r=>{if(!(t.length===0||t.some(o=>!ck(r.getAll(o),e.getAll(o)))))return Gt("[nuqs `%s`] no change, returning previous",t.join(","),r),r;const s=fk(e,t,n);return Gt("[nuqs `%s`] subbed search params change\n from %O\n to %O",t.join(","),r,s),s}}function fk(e,t,n){if(t.length===0)return e;const r=n?new URLSearchParams(e):e;for(const s of e.keys())t.includes(s)||r.delete(s);return r}const _8="__nuqs__",Pb=Jy();function k8(e){return function(n,r){const s=new URL(location.href);s.search=h8(n),Gt("[nuqs react] Updating url: %s",s),e&&r.shallow===!1?(r.history==="push"?location.assign:location.replace).call(location,s):(r.history==="push"?history.pushState:history.replaceState).call(history,history.state,_8,s),Pb.emit("update",n),r.scroll===!0&&window.scrollTo({top:0})}}const dk=v.createContext({fullPageNavigationOnShallowFalseUpdates:!1});function N8(e){const{fullPageNavigationOnShallowFalseUpdates:t}=v.useContext(dk),[n,r]=v.useState(()=>typeof location>"u"?new URLSearchParams:fk(new URLSearchParams(location.search),e,!1));return v.useEffect(()=>{const s=()=>{r(vC(new URLSearchParams(location.search),e,!1))},o=l=>{r(vC(l,e,!0))};return Pb.on("update",o),window.addEventListener("popstate",s),()=>{Pb.off("update",o),window.removeEventListener("popstate",s)}},[e.join("&")]),{searchParams:n,updateUrl:v.useMemo(()=>k8(t),[t])}}const R8=p8(N8);function O8({children:e,fullPageNavigationOnShallowFalseUpdates:t=!1,...n}){return v.createElement(dk.Provider,{value:{fullPageNavigationOnShallowFalseUpdates:t}},v.createElement(R8,{...n,children:e}))}const hk=v.createContext(null);function D8({transport:e,children:t}){return b.jsx(hk.Provider,{value:e,children:t})}function ln(){const e=v.useContext(hk);if(!e)throw new Error("useTransport must be used within a TransportProvider");return e}const EC=e=>{let t;const n=new Set,r=(f,m)=>{const p=typeof f=="function"?f(t):f;if(!Object.is(p,t)){const g=t;t=m??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(y=>y(t,g))}},s=()=>t,u={setState:r,getState:s,getInitialState:()=>d,subscribe:f=>(n.add(f),()=>n.delete(f))},d=t=e(r,s,u);return u},M8=(e=>e?EC(e):EC),I8=e=>e;function L8(e,t=I8){const n=Ce.useSyncExternalStore(e.subscribe,Ce.useCallback(()=>t(e.getState()),[e,t]),Ce.useCallback(()=>t(e.getInitialState()),[e,t]));return Ce.useDebugValue(n),n}const P8=e=>{const t=M8(e),n=r=>L8(t,r);return Object.assign(n,t),n},j8=(e=>P8),TC={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},SC=e=>!!e.dispatchFromDevtools&&typeof e.dispatch=="function",rf=new Map,ch=e=>{const t=rf.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},B8=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=rf.get(n.name);if(r)return{type:"tracked",store:e,...r};const s={connection:t.connect(n),stores:{}};return rf.set(n.name,s),{type:"tracked",store:e,...s}},U8=(e,t)=>{if(t===void 0)return;const n=rf.get(e);n&&(delete n.stores[t],Object.keys(n.stores).length===0&&rf.delete(e))},F8=e=>{var t,n;if(!e)return;const r=e.split(`
51
+ `),s=r.findIndex(l=>l.includes("api.setState"));if(s<0)return;const o=((t=r[s+1])==null?void 0:t.trim())||"";return(n=/.+ (.+) .+/.exec(o))==null?void 0:n[1]},H8=(e,t={})=>(n,r,s)=>{const{enabled:o,anonymousActionType:l,store:u,...d}=t;let f;try{f=(o??(TC?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!f)return e(n,r,s);const{connection:m,...p}=B8(u,f,d);let g=!0;s.setState=((S,A,w)=>{const _=n(S,A);if(!g)return _;const k=w===void 0?{type:l||F8(new Error().stack)||"anonymous"}:typeof w=="string"?{type:w}:w;return u===void 0?(m==null||m.send(k,r()),_):(m==null||m.send({...k,type:`${u}/${k.type}`},{...ch(d.name),[u]:s.getState()}),_)}),s.devtools={cleanup:()=>{m&&typeof m.unsubscribe=="function"&&m.unsubscribe(),U8(d.name,u)}};const y=(...S)=>{const A=g;g=!1,n(...S),g=A},E=e(s.setState,r,s);if(p.type==="untracked"?m==null||m.init(E):(p.stores[p.store]=s,m==null||m.init(Object.fromEntries(Object.entries(p.stores).map(([S,A])=>[S,S===p.store?E:A.getState()])))),SC(s)){let S=!1;const A=s.dispatch;s.dispatch=(...w)=>{(TC?"production":void 0)!=="production"&&w[0].type==="__setState"&&!S&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),S=!0),A(...w)}}return m.subscribe(S=>{var A;switch(S.type){case"ACTION":if(typeof S.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return qg(S.payload,w=>{if(w.type==="__setState"){if(u===void 0){y(w.state);return}Object.keys(w.state).length!==1&&console.error(`
52
+ [zustand devtools middleware] Unsupported __setState action format.
53
+ When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
54
+ and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
55
+ `);const _=w.state[u];if(_==null)return;JSON.stringify(s.getState())!==JSON.stringify(_)&&y(_);return}SC(s)&&s.dispatch(w)});case"DISPATCH":switch(S.payload.type){case"RESET":return y(E),u===void 0?m==null?void 0:m.init(s.getState()):m==null?void 0:m.init(ch(d.name));case"COMMIT":if(u===void 0){m==null||m.init(s.getState());return}return m==null?void 0:m.init(ch(d.name));case"ROLLBACK":return qg(S.state,w=>{if(u===void 0){y(w),m==null||m.init(s.getState());return}y(w[u]),m==null||m.init(ch(d.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return qg(S.state,w=>{if(u===void 0){y(w);return}JSON.stringify(s.getState())!==JSON.stringify(w[u])&&y(w[u])});case"IMPORT_STATE":{const{nextLiftedState:w}=S.payload,_=(A=w.computedStates.slice(-1)[0])==null?void 0:A.state;if(!_)return;y(u===void 0?_:_[u]),m==null||m.send(null,w);return}case"PAUSE_RECORDING":return g=!g}return}}),E},z8=H8,qg=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function mk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=mk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pk(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=mk(e))&&(r&&(r+=" "),r+=t);return r}const V8=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},q8=(e,t)=>({classGroupId:e,validator:t}),gk=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),rm="-",CC=[],$8="arbitrary..",Y8=e=>{const t=X8(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return G8(l);const u=l.split(rm),d=u[0]===""&&u.length>1?1:0;return bk(u,d,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const d=r[l],f=n[l];return d?f?V8(f,d):d:f||CC}return n[l]||CC}}},bk=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],o=n.nextPart.get(s);if(o){const f=bk(e,t+1,o);if(f)return f}const l=n.validators;if(l===null)return;const u=t===0?e.join(rm):e.slice(t).join(rm),d=l.length;for(let f=0;f<d;f++){const m=l[f];if(m.validator(u))return m.classGroupId}},G8=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?$8+r:void 0})(),X8=e=>{const{theme:t,classGroups:n}=e;return K8(n,t)},K8=(e,t)=>{const n=gk();for(const r in e){const s=e[r];ex(s,n,r,t)}return n},ex=(e,t,n,r)=>{const s=e.length;for(let o=0;o<s;o++){const l=e[o];Q8(l,t,n,r)}},Q8=(e,t,n,r)=>{if(typeof e=="string"){W8(e,t,n);return}if(typeof e=="function"){Z8(e,t,n,r);return}J8(e,t,n,r)},W8=(e,t,n)=>{const r=e===""?t:yk(t,e);r.classGroupId=n},Z8=(e,t,n,r)=>{if(e9(e)){ex(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(q8(n,e))},J8=(e,t,n,r)=>{const s=Object.entries(e),o=s.length;for(let l=0;l<o;l++){const[u,d]=s[l];ex(d,yk(t,u),n,r)}},yk=(e,t)=>{let n=e;const r=t.split(rm),s=r.length;for(let o=0;o<s;o++){const l=r[o];let u=n.nextPart.get(l);u||(u=gk(),n.nextPart.set(l,u)),n=u}return n},e9=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,t9=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const s=(o,l)=>{n[o]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let l=n[o];if(l!==void 0)return l;if((l=r[o])!==void 0)return s(o,l),l},set(o,l){o in n?n[o]=l:s(o,l)}}},jb="!",wC=":",n9=[],AC=(e,t,n,r,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),r9=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const o=[];let l=0,u=0,d=0,f;const m=s.length;for(let S=0;S<m;S++){const A=s[S];if(l===0&&u===0){if(A===wC){o.push(s.slice(d,S)),d=S+1;continue}if(A==="/"){f=S;continue}}A==="["?l++:A==="]"?l--:A==="("?u++:A===")"&&u--}const p=o.length===0?s:s.slice(d);let g=p,y=!1;p.endsWith(jb)?(g=p.slice(0,-1),y=!0):p.startsWith(jb)&&(g=p.slice(1),y=!0);const E=f&&f>d?f-d:void 0;return AC(o,y,g,E)};if(t){const s=t+wC,o=r;r=l=>l.startsWith(s)?o(l.slice(s.length)):AC(n9,!1,l,void 0,!0)}if(n){const s=r;r=o=>n({className:o,parseClassName:s})}return r},i9=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let s=[];for(let o=0;o<n.length;o++){const l=n[o],u=l[0]==="[",d=t.has(l);u||d?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(l)):s.push(l)}return s.length>0&&(s.sort(),r.push(...s)),r}},s9=e=>({cache:t9(e.cacheSize),parseClassName:r9(e),sortModifiers:i9(e),...Y8(e)}),a9=/\s+/,o9=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:o}=t,l=[],u=e.trim().split(a9);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:p,modifiers:g,hasImportantModifier:y,baseClassName:E,maybePostfixModifierPosition:S}=n(m);if(p){d=m+(d.length>0?" "+d:d);continue}let A=!!S,w=r(A?E.substring(0,S):E);if(!w){if(!A){d=m+(d.length>0?" "+d:d);continue}if(w=r(E),!w){d=m+(d.length>0?" "+d:d);continue}A=!1}const _=g.length===0?"":g.length===1?g[0]:o(g).join(":"),k=y?_+jb:_,R=k+w;if(l.indexOf(R)>-1)continue;l.push(R);const M=s(w,A);for(let O=0;O<M.length;++O){const D=M[O];l.push(k+D)}d=m+(d.length>0?" "+d:d)}return d},l9=(...e)=>{let t=0,n,r,s="";for(;t<e.length;)(n=e[t++])&&(r=xk(n))&&(s&&(s+=" "),s+=r);return s},xk=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=xk(e[r]))&&(n&&(n+=" "),n+=t);return n},u9=(e,...t)=>{let n,r,s,o;const l=d=>{const f=t.reduce((m,p)=>p(m),e());return n=s9(f),r=n.cache.get,s=n.cache.set,o=u,u(d)},u=d=>{const f=r(d);if(f)return f;const m=o9(d,n);return s(d,m),m};return o=l,(...d)=>o(l9(...d))},c9=[],yn=e=>{const t=n=>n[e]||c9;return t.isThemeGetter=!0,t},vk=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ek=/^\((?:(\w[\w-]*):)?(.+)\)$/i,f9=/^\d+\/\d+$/,d9=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,h9=/\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$/,m9=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,p9=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,g9=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vl=e=>f9.test(e),it=e=>!!e&&!Number.isNaN(Number(e)),Ks=e=>!!e&&Number.isInteger(Number(e)),$g=e=>e.endsWith("%")&&it(e.slice(0,-1)),fs=e=>d9.test(e),b9=()=>!0,y9=e=>h9.test(e)&&!m9.test(e),Tk=()=>!1,x9=e=>p9.test(e),v9=e=>g9.test(e),E9=e=>!Me(e)&&!Ie(e),T9=e=>du(e,wk,Tk),Me=e=>vk.test(e),Ga=e=>du(e,Ak,y9),Yg=e=>du(e,_9,it),_C=e=>du(e,Sk,Tk),S9=e=>du(e,Ck,v9),fh=e=>du(e,_k,x9),Ie=e=>Ek.test(e),yc=e=>hu(e,Ak),C9=e=>hu(e,k9),kC=e=>hu(e,Sk),w9=e=>hu(e,wk),A9=e=>hu(e,Ck),dh=e=>hu(e,_k,!0),du=(e,t,n)=>{const r=vk.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},hu=(e,t,n=!1)=>{const r=Ek.exec(e);return r?r[1]?t(r[1]):n:!1},Sk=e=>e==="position"||e==="percentage",Ck=e=>e==="image"||e==="url",wk=e=>e==="length"||e==="size"||e==="bg-size",Ak=e=>e==="length",_9=e=>e==="number",k9=e=>e==="family-name",_k=e=>e==="shadow",N9=()=>{const e=yn("color"),t=yn("font"),n=yn("text"),r=yn("font-weight"),s=yn("tracking"),o=yn("leading"),l=yn("breakpoint"),u=yn("container"),d=yn("spacing"),f=yn("radius"),m=yn("shadow"),p=yn("inset-shadow"),g=yn("text-shadow"),y=yn("drop-shadow"),E=yn("blur"),S=yn("perspective"),A=yn("aspect"),w=yn("ease"),_=yn("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...R(),Ie,Me],O=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],P=()=>[Ie,Me,d],z=()=>[vl,"full","auto",...P()],j=()=>[Ks,"none","subgrid",Ie,Me],K=()=>["auto",{span:["full",Ks,Ie,Me]},Ks,Ie,Me],Y=()=>[Ks,"auto",Ie,Me],J=()=>["auto","min","max","fr",Ie,Me],te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...P()],H=()=>[vl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],$=()=>[e,Ie,Me],ne=()=>[...R(),kC,_C,{position:[Ie,Me]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",w9,T9,{size:[Ie,Me]}],ie=()=>[$g,yc,Ga],B=()=>["","none","full",f,Ie,Me],de=()=>["",it,yc,Ga],xe=()=>["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"],he=()=>[it,$g,kC,_C],we=()=>["","none",E,Ie,Me],Se=()=>["none",it,Ie,Me],Pe=()=>["none",it,Ie,Me],_e=()=>[it,Ie,Me],Oe=()=>[vl,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[fs],breakpoint:[fs],color:[b9],container:[fs],"drop-shadow":[fs],ease:["in","out","in-out"],font:[E9],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[fs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[fs],shadow:[fs],spacing:["px",it],text:[fs],"text-shadow":[fs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",vl,Me,Ie,A]}],container:["container"],columns:[{columns:[it,Me,Ie,u]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{start:z()}],end:[{end:z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[Ks,"auto",Ie,Me]}],basis:[{basis:[vl,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[it,vl,"auto","initial","none",Me]}],grow:[{grow:["",it,Ie,Me]}],shrink:[{shrink:["",it,Ie,Me]}],order:[{order:[Ks,"first","last","none",Ie,Me]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:K()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:K()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[u,"screen",...H()]}],"min-w":[{"min-w":[u,"screen","none",...H()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",n,yc,Ga]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Ie,Yg]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$g,Me]}],"font-family":[{font:[C9,Me,t]}],"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,Ie,Me]}],"line-clamp":[{"line-clamp":[it,"none",Ie,Yg]}],leading:[{leading:[o,...P()]}],"list-image":[{"list-image":["none",Ie,Me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ie,Me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:[it,"from-font","auto",Ie,Ga]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[it,"auto",Ie,Me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie,Me]}],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",Ie,Me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ks,Ie,Me],radial:["",Ie,Me],conic:[Ks,Ie,Me]},A9,S9]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"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-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:[...xe(),"hidden","none"]}],"divide-style":[{divide:[...xe(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...xe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[it,Ie,Me]}],"outline-w":[{outline:["",it,yc,Ga]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",m,dh,fh]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",p,dh,fh]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[it,Ga]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",g,dh,fh]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[it,Ie,Me]}],"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":[it]}],"mask-image-linear-from-pos":[{"mask-linear-from":he()}],"mask-image-linear-to-pos":[{"mask-linear-to":he()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":he()}],"mask-image-t-to-pos":[{"mask-t-to":he()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":he()}],"mask-image-r-to-pos":[{"mask-r-to":he()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":he()}],"mask-image-b-to-pos":[{"mask-b-to":he()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":he()}],"mask-image-l-to-pos":[{"mask-l-to":he()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":he()}],"mask-image-x-to-pos":[{"mask-x-to":he()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":he()}],"mask-image-y-to-pos":[{"mask-y-to":he()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[Ie,Me]}],"mask-image-radial-from-pos":[{"mask-radial-from":he()}],"mask-image-radial-to-pos":[{"mask-radial-to":he()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"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":R()}],"mask-image-conic-pos":[{"mask-conic":[it]}],"mask-image-conic-from-pos":[{"mask-conic-from":he()}],"mask-image-conic-to-pos":[{"mask-conic-to":he()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ie,Me]}],filter:[{filter:["","none",Ie,Me]}],blur:[{blur:we()}],brightness:[{brightness:[it,Ie,Me]}],contrast:[{contrast:[it,Ie,Me]}],"drop-shadow":[{"drop-shadow":["","none",y,dh,fh]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",it,Ie,Me]}],"hue-rotate":[{"hue-rotate":[it,Ie,Me]}],invert:[{invert:["",it,Ie,Me]}],saturate:[{saturate:[it,Ie,Me]}],sepia:[{sepia:["",it,Ie,Me]}],"backdrop-filter":[{"backdrop-filter":["","none",Ie,Me]}],"backdrop-blur":[{"backdrop-blur":we()}],"backdrop-brightness":[{"backdrop-brightness":[it,Ie,Me]}],"backdrop-contrast":[{"backdrop-contrast":[it,Ie,Me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",it,Ie,Me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[it,Ie,Me]}],"backdrop-invert":[{"backdrop-invert":["",it,Ie,Me]}],"backdrop-opacity":[{"backdrop-opacity":[it,Ie,Me]}],"backdrop-saturate":[{"backdrop-saturate":[it,Ie,Me]}],"backdrop-sepia":[{"backdrop-sepia":["",it,Ie,Me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ie,Me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[it,"initial",Ie,Me]}],ease:[{ease:["linear","initial",w,Ie,Me]}],delay:[{delay:[it,Ie,Me]}],animate:[{animate:["none",_,Ie,Me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Ie,Me]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:Se()}],"rotate-x":[{"rotate-x":Se()}],"rotate-y":[{"rotate-y":Se()}],"rotate-z":[{"rotate-z":Se()}],scale:[{scale:Pe()}],"scale-x":[{"scale-x":Pe()}],"scale-y":[{"scale-y":Pe()}],"scale-z":[{"scale-z":Pe()}],"scale-3d":["scale-3d"],skew:[{skew:_e()}],"skew-x":[{"skew-x":_e()}],"skew-y":[{"skew-y":_e()}],transform:[{transform:[Ie,Me,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Oe()}],"translate-x":[{"translate-x":Oe()}],"translate-y":[{"translate-y":Oe()}],"translate-z":[{"translate-z":Oe()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"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",Ie,Me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",Ie,Me]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[it,yc,Ga,Yg]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},kk=u9(N9);function Ye(...e){return kk(pk(e))}function Nk(e,t){if(!e)return{match:!0,score:0,indices:[]};const n=e.toLowerCase(),r=t.toLowerCase();let s=0,o=0,l=0;const u=[];for(let d=0;d<r.length&&s<n.length;d++)r[d]===n[s]?(s++,l++,o+=l,u.push(d)):l=0;return{match:s===n.length,score:o,indices:u}}async function Vt(e,t,n){const r=await fetch(`${e}${t}`,{headers:{"Content-Type":"application/json"},...n});if(!r.ok){const s=await r.json().catch(()=>({error:r.statusText}));throw new Error(s.error||`HTTP ${r.status}`)}return r.json()}class R9{constructor(t){$e(this,"clientId");$e(this,"etagCache",new Map);$e(this,"messageCache",new Map);this.baseUrl=t,this.clientId=crypto.randomUUID()}createSession(t){return Vt(this.baseUrl,"/sessions",{method:"POST",body:JSON.stringify(t)})}listSessions(t){const n=new URLSearchParams;t&&n.set("cwd",t);const r=n.toString();return Vt(this.baseUrl,`/sessions${r?`?${r}`:""}`)}getSession(t,n){const r=new URLSearchParams;n&&r.set("cwd",n);const s=r.toString();return Vt(this.baseUrl,`/sessions/${t}${s?`?${s}`:""}`)}updateSession(t,n,r){const s=new URLSearchParams;r&&s.set("cwd",r);const o=s.toString();return Vt(this.baseUrl,`/sessions/${t}${o?`?${o}`:""}`,{method:"PATCH",body:JSON.stringify(n)})}async getMessages(t,n){const r=new URLSearchParams;n&&r.set("cwd",n);const s=r.toString(),o=`/sessions/${t}/messages${s?`?${s}`:""}`,l={"Content-Type":"application/json"},u=this.etagCache.get(t);u&&(l["If-None-Match"]=u);const d=await fetch(`${this.baseUrl}${o}`,{headers:l});if(d.status===304){const p=this.messageCache.get(t);if(p)return p;throw new Error("304 received but no cached response available")}if(!d.ok){const p=await d.json().catch(()=>({error:d.statusText}));throw new Error(p.error||`HTTP ${d.status}`)}const f=await d.json(),m=d.headers.get("ETag");return m&&(this.etagCache.set(t,m),this.messageCache.set(t,f)),f}async sendMessage(t,n,r,s,o){const l=await fetch(`${this.baseUrl}/sessions/${t}/messages`,{method:"POST",headers:{"Content-Type":"application/json","X-Client-Id":this.clientId},body:JSON.stringify({content:n,...o&&{cwd:o}}),signal:s});if(!l.ok){if(l.status===409){const m=await l.json().catch(()=>null);if(m&&m.code==="SESSION_LOCKED"){const p=new Error("Session locked");throw p.code="SESSION_LOCKED",p.lockedBy=m.lockedBy,p.lockedAt=m.lockedAt,p}}throw new Error(`HTTP ${l.status}`)}const u=l.body.getReader(),d=new TextDecoder;let f="";for(;;){const{done:m,value:p}=await u.read();if(m)break;f+=d.decode(p,{stream:!0});const g=f.split(`
56
+ `);f=g.pop()||"";let y="";for(const E of g)if(E.startsWith("event: "))y=E.slice(7).trim();else if(E.startsWith("data: ")&&y){const S=JSON.parse(E.slice(6));r({type:y,data:S}),y=""}}}approveTool(t,n){return Vt(this.baseUrl,`/sessions/${t}/approve`,{method:"POST",body:JSON.stringify({toolCallId:n})})}denyTool(t,n){return Vt(this.baseUrl,`/sessions/${t}/deny`,{method:"POST",body:JSON.stringify({toolCallId:n})})}submitAnswers(t,n,r){return Vt(this.baseUrl,`/sessions/${t}/submit-answers`,{method:"POST",body:JSON.stringify({toolCallId:n,answers:r})})}async getTasks(t,n){try{const r=new URLSearchParams;n&&r.set("cwd",n);const s=r.toString();return await Vt(this.baseUrl,`/sessions/${t}/tasks${s?`?${s}`:""}`)}catch{return{tasks:[]}}}browseDirectory(t,n){const r=new URLSearchParams;t&&r.set("path",t),n&&r.set("showHidden","true");const s=r.toString();return Vt(this.baseUrl,`/directory${s?`?${s}`:""}`)}getDefaultCwd(){return Vt(this.baseUrl,"/directory/default")}getCommands(t=!1,n){const r=new URLSearchParams;t&&r.set("refresh","true"),n&&r.set("cwd",n);const s=r.toString();return Vt(this.baseUrl,`/commands${s?`?${s}`:""}`)}getGitStatus(t){const n=new URLSearchParams;t&&n.set("dir",t);const r=n.toString();return Vt(this.baseUrl,`/git/status${r?`?${r}`:""}`)}health(){return Vt(this.baseUrl,"/health")}listFiles(t){const n=new URLSearchParams({cwd:t});return Vt(this.baseUrl,`/files?${n}`)}getConfig(){return Vt(this.baseUrl,"/config")}startTunnel(){return Vt(this.baseUrl,"/tunnel/start",{method:"POST"})}async stopTunnel(){await Vt(this.baseUrl,"/tunnel/stop",{method:"POST"})}listSchedules(){return Vt(this.baseUrl,"/pulse/schedules")}createSchedule(t){return Vt(this.baseUrl,"/pulse/schedules",{method:"POST",body:JSON.stringify(t)})}updateSchedule(t,n){return Vt(this.baseUrl,`/pulse/schedules/${t}`,{method:"PATCH",body:JSON.stringify(n)})}deleteSchedule(t){return Vt(this.baseUrl,`/pulse/schedules/${t}`,{method:"DELETE"})}triggerSchedule(t){return Vt(this.baseUrl,`/pulse/schedules/${t}/trigger`,{method:"POST"})}listRuns(t){const n=new URLSearchParams;t!=null&&t.scheduleId&&n.set("scheduleId",t.scheduleId),t!=null&&t.limit&&n.set("limit",String(t.limit)),t!=null&&t.offset&&n.set("offset",String(t.offset));const r=n.toString();return Vt(this.baseUrl,`/pulse/runs${r?`?${r}`:""}`)}getRun(t){return Vt(this.baseUrl,`/pulse/runs/${t}`)}cancelRun(t){return Vt(this.baseUrl,`/pulse/runs/${t}/cancel`,{method:"POST"})}}function Wn(e){return typeof e=="string"?e:""}function Gg(e){if(!e)return"...";const t=e.split("/");return t[t.length-1]||"..."}function O9(e){if(!e)return"...";try{return new URL(e).hostname}catch{return e.slice(0,30)}}function xc(e,t){return e?e.length>t?e.slice(0,t)+"…":e:"..."}function hh(e){return!e||e==="..."?'"…"':`"${e}"`}function D9(e,t){let n=null;try{n=JSON.parse(t)}catch{return e}if(!n||typeof n!="object")return e;switch(e){case"Bash":return`Run ${hh(xc(Wn(n.description)||Wn(n.command),40))}`;case"Read":return`Read ${Gg(Wn(n.file_path))}`;case"Write":return`Write ${Gg(Wn(n.file_path))}`;case"Edit":return`Edit ${Gg(Wn(n.file_path))}`;case"Glob":return`Find ${Wn(n.pattern)||"..."}`;case"Grep":return`Search ${hh(xc(Wn(n.pattern),30))}`;case"Task":return`Agent: ${xc(Wn(n.description)||Wn(n.prompt),40)}`;case"TaskCreate":return`Create task ${hh(xc(Wn(n.subject),35))}`;case"TaskUpdate":{const r=Wn(n.taskId),s=Wn(n.status);return s?`Update task #${r} → ${s}`:`Update task #${r}`}case"TaskList":return"List tasks";case"Skill":return`Skill ${Wn(n.skill)||"..."}`;case"WebSearch":return`Search ${hh(xc(Wn(n.query),35))}`;case"WebFetch":return`Fetch ${O9(Wn(n.url))}`;default:return e}}function Rk(e){return e.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^./,t=>t.toUpperCase())}function M9(e,t){return e.length<=t?e:e.slice(0,t)+"…"}function I9(e){return/^[/~.]/.test(e)||/\.(ts|tsx|js|jsx|json|md|py|rs|go|sh|yml|yaml|toml)$/.test(e)}function Bb(e,t){if(e===null)return b.jsx("span",{className:"text-muted-foreground italic",children:"null"});if(typeof e=="boolean")return b.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:String(e)});if(typeof e=="number")return b.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:e});if(typeof e=="string"){const n=M9(e,t);return I9(e)?b.jsx("code",{className:"bg-muted rounded px-1 py-0.5 text-xs break-all",children:n}):b.jsx("span",{className:"break-words",children:n})}if(Array.isArray(e)){const n=e.slice(0,5),r=e.length-5;return b.jsxs("div",{className:"space-y-0.5",children:[n.map((s,o)=>b.jsx("div",{className:"border-border/40 border-l pl-2",children:Bb(s,80)},o)),r>0&&b.jsxs("span",{className:"text-muted-foreground text-xs italic",children:["… and ",r," more"]})]})}if(typeof e=="object"){const n=Object.entries(e);return b.jsx("div",{className:"space-y-0.5",children:n.map(([r,s])=>b.jsxs("div",{className:"border-border/40 border-l pl-2",children:[b.jsxs("span",{className:"text-muted-foreground text-xs",children:[Rk(r),": "]}),typeof s=="object"&&s!==null?b.jsx("span",{className:"text-muted-foreground italic",children:"{..."}):Bb(s,80)]},r))})}return b.jsx("span",{children:String(e)})}function Ok({toolName:e,input:t}){if(!t)return null;let n;try{n=JSON.parse(t)}catch{return b.jsx("pre",{className:"overflow-x-auto text-xs whitespace-pre-wrap",children:t})}if(typeof n!="object"||n===null||Array.isArray(n))return b.jsx("pre",{className:"overflow-x-auto text-xs whitespace-pre-wrap",children:t});const r=Object.entries(n);return r.length===0?null:b.jsx("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs",children:r.map(([s,o])=>b.jsxs("div",{className:"contents",children:[b.jsx("dt",{className:"text-muted-foreground py-0.5 font-medium whitespace-nowrap",children:Rk(s)}),b.jsx("dd",{className:"min-w-0 py-0.5",children:Bb(o,120)})]},s))})}const NC=["😀","😎","🤖","🦊","🐱","🐶","🦁","🐸","🐵","🦄","🐲","🦉","🐧","🐼","🦋","🌸","🔮","🎯","🚀","⚡","🌊","🍀","🎨","🎵","💎","🔥","🌈","⭐","🧠","👾"];function Dk(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t*16777619>>>0;return t}function L9(e){return`hsl(${Dk(e)%360}, 70%, 55%)`}function P9(e){return NC[Dk(e)%NC.length]}function j9(e){const t=document.createElement("canvas");t.width=32,t.height=32;const n=t.getContext("2d");return n?(n.fillStyle=e,n.beginPath(),n.arc(16,16,15,0,Math.PI*2),n.fill(),t.toDataURL("image/png")):""}function B9(e,t=20,n=.3){return new Promise((r,s)=>{const o=new Image;o.onload=()=>{const l=[];for(let u=0;u<t;u++){const f=1-Math.sin(u/t*Math.PI)*(1-n),m=document.createElement("canvas");m.width=32,m.height=32;const p=m.getContext("2d");if(!p){s(new Error("Canvas context unavailable"));return}p.globalAlpha=f,p.drawImage(o,0,0),l.push(m.toDataURL("image/png"))}r(l)},o.onerror=s,o.src=e})}function Xg(e){let t=document.querySelector("link[rel*='icon']");t||(t=document.createElement("link"),t.rel="icon",document.head.appendChild(t)),t.href=e}let mh=null;function U9(){try{mh||(mh=new Audio("/notification.wav")),mh.currentTime=0,mh.play().catch(()=>{})}catch{}}const er={FONT_SIZE:"dorkos-font-size",FONT_FAMILY:"dorkos-font-family",RECENT_CWDS:"dorkos-recent-cwds",PICKER_VIEW:"dorkos-picker-view",GESTURE_HINT_COUNT:"dorkos-gesture-hint-count"},RC={small:"0.9",medium:"1",large:"1.15"},F9=10,Ui={COPY_FEEDBACK_MS:1500,NEW_SESSION_HIGHLIGHT_MS:300,SIDEBAR_AUTO_CLOSE_MS:300,TOOL_CALL_AUTO_HIDE_MS:5e3,CELEBRATION_DISPLAY_MS:2e3,GESTURE_HINT_DISMISS_MS:4e3,LONG_PRESS_MS:500,MIN_STREAM_DURATION_MS:3e3,SESSION_BUSY_CLEAR_MS:5e3},OC={MS_PER_MINUTE:6e4,MS_PER_HOUR:36e5},hi={DEFAULT_STALE_TIME_MS:3e4,DEFAULT_RETRY:1,ACTIVE_TAB_REFETCH_MS:3e3,BACKGROUND_TAB_REFETCH_MS:1e4,COMMANDS_STALE_TIME_MS:300*1e3,COMMANDS_GC_TIME_MS:1800*1e3,FILES_STALE_TIME_MS:300*1e3,FILES_GC_TIME_MS:1800*1e3,GIT_STATUS_REFETCH_MS:1e4,GIT_STATUS_STALE_TIME_MS:5e3,MESSAGE_STALE_TIME_MS:0},El={DEBOUNCE_WINDOW_MS:2e3,DEBOUNCE_THRESHOLD:3,MINI_PROBABILITY:.3,MIN_TASKS_FOR_MAJOR:3,IDLE_TIMEOUT_MS:3e4},H9=["Today","Yesterday","Previous 7 Days","Previous 30 Days","Older"];function z9(e){const t=new Date,n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=new Date(n);r.setDate(r.getDate()-1);const s=new Date(n);s.setDate(s.getDate()-7);const o=new Date(n);o.setDate(o.getDate()-30);const l={Today:[],Yesterday:[],"Previous 7 Days":[],"Previous 30 Days":[],Older:[]};for(const u of e){const d=new Date(u.updatedAt);d>=n?l.Today.push(u):d>=r?l.Yesterday.push(u):d>=s?l["Previous 7 Days"].push(u):d>=o?l["Previous 30 Days"].push(u):l.Older.push(u)}return H9.map(u=>({label:u,sessions:l[u]})).filter(u=>u.sessions.length>0)}function V9(e){return e.replace(/^\/(?:Users|home)\/[^/]+/,"~")}function Mk(e){const t=new Date,n=new Date(e),r=t.getTime()-n.getTime(),s=Math.floor(r/OC.MS_PER_MINUTE),o=Math.floor(r/OC.MS_PER_HOUR),l=new Date(t.getFullYear(),t.getMonth(),t.getDate()),u=new Date(l);u.setDate(u.getDate()-1);const d=new Date(l);if(d.setDate(d.getDate()-7),n>=l)return s<1?"Just now":s<60?`${s}m ago`:`${o}h ago`;const f=n.toLocaleTimeString("en-US",{hour:"numeric",hour12:!0}).toLowerCase();return n>=u?`Yesterday, ${f}`:n>=d?`${n.toLocaleDateString("en-US",{weekday:"short"})}, ${f}`:`${n.toLocaleDateString("en-US",{month:"short",day:"numeric"})}, ${f}`}const im=[{key:"system",displayName:"System Default",description:"Native platform fonts",sans:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",mono:"ui-monospace, 'SF Mono', 'Cascadia Code', 'Fira Code', Menlo, Consolas, monospace",googleFontsUrl:null},{key:"inter",displayName:"Inter",description:"Inter + JetBrains Mono",sans:"'Inter', system-ui, sans-serif",mono:"'JetBrains Mono', ui-monospace, monospace",googleFontsUrl:"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono&display=swap"},{key:"geist",displayName:"Geist",description:"Geist + Geist Mono",sans:"'Geist', system-ui, sans-serif",mono:"'Geist Mono', ui-monospace, monospace",googleFontsUrl:"https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600&family=Geist+Mono&display=swap"},{key:"ibm-plex",displayName:"IBM Plex",description:"IBM Plex Sans + IBM Plex Mono",sans:"'IBM Plex Sans', system-ui, sans-serif",mono:"'IBM Plex Mono', ui-monospace, monospace",googleFontsUrl:"https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono&display=swap"},{key:"roboto",displayName:"Roboto",description:"Roboto + Roboto Mono",sans:"'Roboto', system-ui, sans-serif",mono:"'Roboto Mono', ui-monospace, monospace",googleFontsUrl:"https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Mono&display=swap"},{key:"source",displayName:"Source",description:"Source Sans 3 + Source Code Pro",sans:"'Source Sans 3', system-ui, sans-serif",mono:"'Source Code Pro', ui-monospace, monospace",googleFontsUrl:"https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600&family=Source+Code+Pro&display=swap"},{key:"fira",displayName:"Fira",description:"Fira Sans + Fira Code",sans:"'Fira Sans', system-ui, sans-serif",mono:"'Fira Code', ui-monospace, monospace",googleFontsUrl:"https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;600&family=Fira+Code&display=swap"},{key:"space",displayName:"Space",description:"Space Grotesk + Space Mono",sans:"'Space Grotesk', system-ui, sans-serif",mono:"'Space Mono', ui-monospace, monospace",googleFontsUrl:"https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=Space+Mono&display=swap"}],Dc="inter";function Kg(e){return im.find(t=>t.key===e)??im.find(t=>t.key===Dc)}function q9(e){return im.some(t=>t.key===e)}const Ub="google-fonts-link";function Qg(e){let t=document.getElementById(Ub);t?t.href=e:(t=document.createElement("link"),t.id=Ub,t.rel="stylesheet",t.href=e,document.head.appendChild(t))}function $9(){var e;(e=document.getElementById(Ub))==null||e.remove()}function Wg(e,t){document.documentElement.style.setProperty("--font-sans",e),document.documentElement.style.setProperty("--font-mono",t)}function Y9(){document.documentElement.style.removeProperty("--font-sans"),document.documentElement.style.removeProperty("--font-mono")}class G9{constructor(t){$e(this,"config");$e(this,"recentCompletions",[]);$e(this,"queue",[]);$e(this,"isIdle",!1);$e(this,"debounceTimer",null);this.config=t}onTaskCompleted(t,n){if(!this.config.enabled)return;const r=Date.now();this.recentCompletions.push(r),this.recentCompletions=this.recentCompletions.filter(u=>r-u<this.config.debounceWindowMs);const s=n.length,o=n.filter(u=>u.status==="completed").length;if(s>=this.config.minTasksForMajor&&o===s){this.cancelDebounce();const u={level:"major",taskId:t,timestamp:r};this.emitOrQueue(u);return}if(this.recentCompletions.length>=this.config.debounceThreshold){this.cancelDebounce(),this.debounceTimer=setTimeout(()=>{const u={level:"mini",taskId:t,timestamp:Date.now()};this.emitOrQueue(u),this.recentCompletions=[]},this.config.debounceWindowMs);return}if(Math.random()<this.config.miniProbability){const u={level:"mini",taskId:t,timestamp:r};this.emitOrQueue(u)}}setIdle(t){this.isIdle=t}onUserReturn(){if(this.queue.length>0){const n=this.queue.some(r=>r.level==="major")?this.queue.find(r=>r.level==="major"):this.queue[this.queue.length-1];this.config.onCelebrate(n),this.queue=[]}}destroy(){this.cancelDebounce(),this.queue=[],this.recentCompletions=[]}emitOrQueue(t){this.isIdle?this.queue.push(t):this.config.onCelebrate(t)}cancelDebounce(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}}async function X9(e){const t=(await $y(async()=>{const{default:s}=await import("./confetti.module-5PKC4vm3.js");return{default:s}},[])).default,r={...{particleCount:40,spread:70,origin:{x:.5,y:.6},colors:["#FFD700","#FFC107","#F7B500"],ticks:120,gravity:1.2,scalar:.9,drift:0,disableForReducedMotion:!0},...e};return t(r),()=>t.reset()}const K9={background:"radial-gradient(circle, rgba(255,215,0,0.15) 0%, transparent 70%)"};function zn(e,t){try{const n=localStorage.getItem(e);return n===null?t:n==="true"}catch{return t}}function Vn(e,t){try{localStorage.setItem(e,String(t))}catch{}}const yt={showTimestamps:"dorkos-show-timestamps",expandToolCalls:"dorkos-expand-tool-calls",autoHideToolCalls:"dorkos-auto-hide-tool-calls",showShortcutChips:"dorkos-show-shortcut-chips",showStatusBarCwd:"dorkos-show-status-bar-cwd",showStatusBarPermission:"dorkos-show-status-bar-permission",showStatusBarModel:"dorkos-show-status-bar-model",showStatusBarCost:"dorkos-show-status-bar-cost",showStatusBarContext:"dorkos-show-status-bar-context",showStatusBarGit:"dorkos-show-status-bar-git",showTaskCelebrations:"dorkos-show-task-celebrations",enableNotificationSound:"dorkos-enable-notification-sound",showStatusBarSound:"dorkos-show-status-bar-sound",showStatusBarVersion:"dorkos-show-status-bar-version",showStatusBarTunnel:"dorkos-show-status-bar-tunnel",verboseLogging:"dorkos-verbose-logging"},Q9={showTimestamps:!1,expandToolCalls:!1,autoHideToolCalls:!0,showShortcutChips:!0,showStatusBarCwd:!0,showStatusBarPermission:!0,showStatusBarModel:!0,showStatusBarCost:!0,showStatusBarContext:!0,showStatusBarGit:!0,showTaskCelebrations:!0,enableNotificationSound:!0,showStatusBarSound:!0,showStatusBarVersion:!0,showStatusBarTunnel:!0,verboseLogging:!1},Xt=j8()(z8(e=>({sidebarOpen:!1,toggleSidebar:()=>e(t=>({sidebarOpen:!t.sidebarOpen})),setSidebarOpen:t=>e({sidebarOpen:t}),sessionId:null,setSessionId:t=>e({sessionId:t}),selectedCwd:null,setSelectedCwd:t=>e(n=>{const s=[{path:t,accessedAt:new Date().toISOString()},...n.recentCwds.filter(o=>o.path!==t)].slice(0,F9);try{localStorage.setItem(er.RECENT_CWDS,JSON.stringify(s))}catch{}return{selectedCwd:t,recentCwds:s}}),recentCwds:(()=>{try{return JSON.parse(localStorage.getItem(er.RECENT_CWDS)||"[]").map(n=>typeof n=="string"?{path:n,accessedAt:new Date().toISOString()}:n)}catch{return[]}})(),devtoolsOpen:!1,toggleDevtools:()=>e(t=>({devtoolsOpen:!t.devtoolsOpen})),showTimestamps:zn(yt.showTimestamps,!1),setShowTimestamps:t=>{Vn(yt.showTimestamps,t),e({showTimestamps:t})},expandToolCalls:zn(yt.expandToolCalls,!1),setExpandToolCalls:t=>{Vn(yt.expandToolCalls,t),e({expandToolCalls:t})},autoHideToolCalls:zn(yt.autoHideToolCalls,!0),setAutoHideToolCalls:t=>{Vn(yt.autoHideToolCalls,t),e({autoHideToolCalls:t})},showShortcutChips:zn(yt.showShortcutChips,!0),setShowShortcutChips:t=>{Vn(yt.showShortcutChips,t),e({showShortcutChips:t})},showStatusBarCwd:zn(yt.showStatusBarCwd,!0),setShowStatusBarCwd:t=>{Vn(yt.showStatusBarCwd,t),e({showStatusBarCwd:t})},showStatusBarPermission:zn(yt.showStatusBarPermission,!0),setShowStatusBarPermission:t=>{Vn(yt.showStatusBarPermission,t),e({showStatusBarPermission:t})},showStatusBarModel:zn(yt.showStatusBarModel,!0),setShowStatusBarModel:t=>{Vn(yt.showStatusBarModel,t),e({showStatusBarModel:t})},showStatusBarCost:zn(yt.showStatusBarCost,!0),setShowStatusBarCost:t=>{Vn(yt.showStatusBarCost,t),e({showStatusBarCost:t})},showStatusBarContext:zn(yt.showStatusBarContext,!0),setShowStatusBarContext:t=>{Vn(yt.showStatusBarContext,t),e({showStatusBarContext:t})},showStatusBarGit:zn(yt.showStatusBarGit,!0),setShowStatusBarGit:t=>{Vn(yt.showStatusBarGit,t),e({showStatusBarGit:t})},showTaskCelebrations:zn(yt.showTaskCelebrations,!0),setShowTaskCelebrations:t=>{Vn(yt.showTaskCelebrations,t),e({showTaskCelebrations:t})},enableNotificationSound:zn(yt.enableNotificationSound,!0),setEnableNotificationSound:t=>{Vn(yt.enableNotificationSound,t),e({enableNotificationSound:t})},showStatusBarSound:zn(yt.showStatusBarSound,!0),setShowStatusBarSound:t=>{Vn(yt.showStatusBarSound,t),e({showStatusBarSound:t})},showStatusBarVersion:zn(yt.showStatusBarVersion,!0),setShowStatusBarVersion:t=>{Vn(yt.showStatusBarVersion,t),e({showStatusBarVersion:t})},showStatusBarTunnel:zn(yt.showStatusBarTunnel,!0),setShowStatusBarTunnel:t=>{Vn(yt.showStatusBarTunnel,t),e({showStatusBarTunnel:t})},verboseLogging:zn(yt.verboseLogging,!1),setVerboseLogging:t=>{Vn(yt.verboseLogging,t),e({verboseLogging:t})},fontSize:(()=>{try{const t=localStorage.getItem(er.FONT_SIZE);if(t==="small"||t==="medium"||t==="large")return document.documentElement.style.setProperty("--user-font-scale",RC[t]),t}catch{}return"medium"})(),setFontSize:t=>{try{localStorage.setItem(er.FONT_SIZE,t)}catch{}document.documentElement.style.setProperty("--user-font-scale",RC[t]),e({fontSize:t})},fontFamily:(()=>{try{const t=localStorage.getItem(er.FONT_FAMILY),n=q9(t??"")?t:Dc,r=Kg(n);return r.googleFontsUrl&&Qg(r.googleFontsUrl),r.key!=="system"&&Wg(r.sans,r.mono),n}catch{return Dc}})(),setFontFamily:t=>{try{localStorage.setItem(er.FONT_FAMILY,t)}catch{}const n=Kg(t);n.googleFontsUrl?Qg(n.googleFontsUrl):$9(),n.key!=="system"?Wg(n.sans,n.mono):Y9(),e({fontFamily:t})},resetPreferences:()=>{try{for(const n of Object.values(yt))localStorage.removeItem(n);localStorage.removeItem(er.FONT_SIZE),localStorage.removeItem(er.FONT_FAMILY)}catch{}document.documentElement.style.setProperty("--user-font-scale","1");const t=Kg(Dc);t.googleFontsUrl&&Qg(t.googleFontsUrl),Wg(t.sans,t.mono),e({...Q9,devtoolsOpen:!1,fontSize:"medium",fontFamily:Dc})},isStreaming:!1,setIsStreaming:t=>e({isStreaming:t}),isWaitingForUser:!1,setIsWaitingForUser:t=>e({isWaitingForUser:t}),activeForm:null,setActiveForm:t=>e({activeForm:t}),contextFiles:[],addContextFile:t=>e(n=>n.contextFiles.some(r=>r.path===t.path)?n:{contextFiles:[...n.contextFiles,{...t,id:crypto.randomUUID()}]}),removeContextFile:t=>e(n=>({contextFiles:n.contextFiles.filter(r=>r.id!==t)})),clearContextFiles:()=>e({contextFiles:[]})}),{name:"app-store"})),Ik="dorkos-theme",W9="(prefers-color-scheme: dark)";function Z9(){const e=localStorage.getItem(Ik);return e==="light"||e==="dark"||e==="system"?e:"system"}function ph(e){document.documentElement.classList.toggle("dark",e)}function Lk(){const[e,t]=v.useState(Z9),n=v.useCallback(r=>{localStorage.setItem(Ik,r),t(r)},[]);return v.useEffect(()=>{if(e==="system"){if(typeof window.matchMedia!="function"){ph(!1);return}const r=window.matchMedia(W9);ph(r.matches);const s=o=>ph(o.matches);return r.addEventListener("change",s),()=>r.removeEventListener("change",s)}ph(e==="dark")},[e]),{theme:e,setTheme:n}}const DC=768;function _o(){const[e,t]=v.useState(()=>typeof window>"u"?!1:window.matchMedia(`(max-width: ${DC-1}px)`).matches);return v.useEffect(()=>{const n=window.matchMedia(`(max-width: ${DC-1}px)`),r=s=>t(s.matches);return n.addEventListener("change",r),t(n.matches),()=>n.removeEventListener("change",r)},[]),e}const J9=100;function ej({cwd:e,isStreaming:t}){const n=v.useRef(""),r=v.useRef([]),s=v.useRef(null),o=v.useRef(0),l=v.useRef(t);v.useEffect(()=>{l.current=t},[t]);const u=v.useCallback(()=>{s.current&&(clearInterval(s.current),s.current=null),r.current.length!==0&&(o.current=0,s.current=window.setInterval(()=>{const f=r.current;f.length!==0&&(Xg(f[o.current]),o.current=(o.current+1)%f.length)},J9))},[]),d=v.useCallback(()=>{s.current&&(clearInterval(s.current),s.current=null),n.current&&Xg(n.current)},[]);v.useEffect(()=>{if(!e)return;const f=L9(e),m=j9(f);n.current=m,r.current=[],Xg(m);let p=!1;return B9(m).then(g=>{p||(r.current=g,l.current&&u())}),()=>{p=!0}},[e,u]),v.useEffect(()=>(t?u():d(),d),[t,u,d])}function MC(e,t,n){const r=P9(e),s=e.split("/").filter(Boolean).pop()??e;let o=`${n}${r} ${s}`;if(t){const l=t.length>40?t.slice(0,40)+"…":t;o+=` — ${l}`}return o+=" — DorkOS",o}function tj({cwd:e,activeForm:t,isStreaming:n,isWaitingForUser:r}){const s=v.useRef(document.hidden),o=v.useRef(!1),l=v.useRef(n),u=v.useRef(e),d=v.useRef(t),f=v.useRef(r);v.useEffect(()=>{u.current=e,d.current=t,f.current=r},[e,t,r]),v.useEffect(()=>{const m=()=>{if(s.current=document.hidden,!document.hidden&&o.current&&(o.current=!1,u.current)){const p=f.current?"🔔 ":"";document.title=MC(u.current,d.current,p)}};return document.addEventListener("visibilitychange",m),()=>document.removeEventListener("visibilitychange",m)},[]),v.useEffect(()=>{l.current&&!n&&s.current&&(o.current=!0),l.current=n},[n]),v.useEffect(()=>{if(!e){document.title="DorkOS";return}let m="";r?m="🔔 ":o.current&&(m="🏁 "),document.title=MC(e,t,m)},[e,t,n,r])}function nj(e){const t=Math.floor(e/1e3);if(t<3600){const s=Math.floor(t/60),o=t%60;return`${s}m ${String(o).padStart(2,"0")}s`}const n=Math.floor(t/3600),r=Math.floor(t%3600/60);return`${n}h ${String(r).padStart(2,"0")}m`}function rj(e){const[t,n]=v.useState(()=>Date.now()),r=v.useRef(null);if(v.useEffect(()=>{if(e===null){r.current&&(clearInterval(r.current),r.current=null);return}return n(Date.now()),r.current=setInterval(()=>n(Date.now()),1e3),()=>{r.current&&(clearInterval(r.current),r.current=null)}},[e]),e===null)return{formatted:"0m 00s",ms:0};const s=Math.max(0,t-e);return{formatted:nj(s),ms:s}}function ij(e={}){const{timeoutMs:t=3e4,onIdle:n,onReturn:r}=e,s=v.useRef(!1),o=v.useRef(null),l=v.useCallback(()=>{s.current||(s.current=!0,n==null||n())},[n]),u=v.useCallback(()=>{s.current&&(s.current=!1,r==null||r())},[r]),d=v.useCallback(()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(l,t),u()},[t,l,u]);return v.useEffect(()=>{o.current=setTimeout(l,t);const f=["mousemove","keydown","scroll","touchstart"];f.forEach(p=>document.addEventListener(p,d,{passive:!0}));const m=()=>{document.hidden?l():d()};return document.addEventListener("visibilitychange",m),()=>{o.current&&clearTimeout(o.current),f.forEach(p=>document.removeEventListener(p,d)),document.removeEventListener("visibilitychange",m)}},[t,l,d]),{isIdle:s.current}}function sj({activeInteraction:e,onApprove:t,onDeny:n,onToggleOption:r,onNavigateOption:s,onNavigateQuestion:o,onSubmit:l,optionCount:u=0,focusedIndex:d=0}){const f=v.useRef(!1);v.useEffect(()=>{f.current=!1},[e==null?void 0:e.toolCallId]),v.useEffect(()=>{if(!e)return;function m(p){const g=p.target,y=(g.tagName==="TEXTAREA"||g.tagName==="INPUT")&&!g.disabled;if(!f.current){if(e.type==="approval"){p.key==="Enter"?(p.preventDefault(),f.current=!0,t==null||t()):p.key==="Escape"&&(p.preventDefault(),f.current=!0,n==null||n());return}if(e.type==="question"){if(y){p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),l==null||l());return}const E=parseInt(p.key,10);if(E>=1&&E<=9){p.preventDefault(),E-1<u&&(r==null||r(E-1));return}switch(p.key){case"ArrowUp":p.preventDefault(),s==null||s("up");break;case"ArrowDown":p.preventDefault(),s==null||s("down");break;case" ":p.preventDefault(),r==null||r(d);break;case"ArrowLeft":case"[":p.preventDefault(),o==null||o("prev");break;case"ArrowRight":case"]":p.preventDefault(),o==null||o("next");break;case"Enter":p.preventDefault(),l==null||l();break}}}}return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[e,t,n,r,s,o,l,u,d])}function Pk(e,t,n){try{return e(t)}catch(r){return u8("[nuqs] Error while parsing value `%s`: %O"+(n?" (for key `%s`)":""),t,r,n),null}}function Ss(e){function t(n){if(typeof n>"u")return null;let r="";if(Array.isArray(n)){if(n[0]===void 0)return null;r=n[0]}return typeof n=="string"&&(r=n),Pk(e.parse,r)}return{type:"single",eq:(n,r)=>n===r,...e,parseServerSide:t,withDefault(n){return{...this,defaultValue:n,parseServerSide(r){return t(r)??n}}},withOptions(n){return{...this,...n}}}}Ss({parse:e=>e,serialize:String});Ss({parse:e=>{const t=parseInt(e);return t==t?t:null},serialize:e=>""+Math.round(e)});Ss({parse:e=>{const t=parseInt(e);return t==t?t-1:null},serialize:e=>""+Math.round(e+1)});Ss({parse:e=>{const t=parseInt(e,16);return t==t?t:null},serialize:e=>{const t=Math.round(e).toString(16);return(t.length&1?"0":"")+t}});Ss({parse:e=>{const t=parseFloat(e);return t==t?t:null},serialize:String});Ss({parse:e=>e.toLowerCase()==="true",serialize:String});function tx(e,t){return e.valueOf()===t.valueOf()}Ss({parse:e=>{const t=parseInt(e);return t==t?new Date(t):null},serialize:e=>""+e.valueOf(),eq:tx});Ss({parse:e=>{const t=new Date(e);return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString(),eq:tx});Ss({parse:e=>{const t=new Date(e.slice(0,10));return t.valueOf()==t.valueOf()?t:null},serialize:e=>e.toISOString().slice(0,10),eq:tx});const Zg=Jy(),aj={};function oj(e,t={}){const n=v.useId(),r=b8(),s=y8(),{history:o="replace",scroll:l=(r==null?void 0:r.scroll)??!1,shallow:u=(r==null?void 0:r.shallow)??!0,throttleMs:d=Uc.timeMs,limitUrlUpdates:f=r==null?void 0:r.limitUrlUpdates,clearOnDefault:m=(r==null?void 0:r.clearOnDefault)??!0,startTransition:p,urlKeys:g=aj}=t,y=Object.keys(e).join(","),E=v.useMemo(()=>Object.fromEntries(Object.keys(e).map(P=>[P,g[P]??P])),[y,JSON.stringify(g)]),S=g8(Object.values(E)),A=S.searchParams,w=v.useRef({}),_=v.useMemo(()=>Object.fromEntries(Object.keys(e).map(P=>[P,e[P].defaultValue??null])),[Object.values(e).map(({defaultValue:P})=>P).join(",")]),k=Vg.useQueuedQueries(Object.values(E)),[R,M]=v.useState(()=>Jg(e,g,A??new URLSearchParams,k).state),O=v.useRef(R);if(Gt("[nuq+ %s `%s`] render - state: %O, iSP: %s",n,y,R,A),Object.keys(w.current).join("&")!==Object.values(E).join("&")){const{state:P,hasChanged:z}=Jg(e,g,A,k,w.current,O.current);z&&(Gt("[nuq+ %s `%s`] State changed: %O",n,y,{state:P,initialSearchParams:A,queuedQueries:k,queryRef:w.current,stateRef:O.current}),O.current=P,M(P)),w.current=Object.fromEntries(Object.entries(E).map(([j,K])=>{var Y;return[K,((Y=e[j])==null?void 0:Y.type)==="multi"?A==null?void 0:A.getAll(K):(A==null?void 0:A.get(K))??null]}))}v.useEffect(()=>{const{state:P,hasChanged:z}=Jg(e,g,A,k,w.current,O.current);z&&(Gt("[nuq+ %s `%s`] State changed: %O",n,y,{state:P,initialSearchParams:A,queuedQueries:k,queryRef:w.current,stateRef:O.current}),O.current=P,M(P))},[Object.values(E).map(P=>`${P}=${A==null?void 0:A.getAll(P)}`).join("&"),JSON.stringify(k)]),v.useEffect(()=>{const P=Object.keys(e).reduce((z,j)=>(z[j]=({state:K,query:Y})=>{M(J=>{const{defaultValue:te}=e[j],W=E[j],I=K??te??null,H=J[j]??te??null;return Object.is(H,I)?(Gt("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). no change, skipping, resolved: %O",n,y,W,K,te,O.current),J):(O.current={...O.current,[j]:I},w.current[W]=Y,Gt("[nuq+ %s `%s`] Cross-hook key sync %s: %O (default: %O). updateInternalState, resolved: %O",n,y,W,K,te,O.current),O.current)})},z),{});for(const z of Object.keys(e)){const j=E[z];Gt("[nuq+ %s `%s`] Subscribing to sync for `%s`",n,j,y),Zg.on(j,P[z])}return()=>{for(const z of Object.keys(e)){const j=E[z];Gt("[nuq+ %s `%s`] Unsubscribing to sync for `%s`",n,j,y),Zg.off(j,P[z])}}},[y,E]);const D=v.useCallback((P,z={})=>{var H,$,ne,U,q,ie;const j=Object.fromEntries(Object.keys(e).map(B=>[B,null])),K=typeof P=="function"?P(IC(O.current,_))??j:P??j;Gt("[nuq+ %s `%s`] setState: %O",n,y,K);let Y,J=0,te=!1;const W=[];for(let[B,de]of Object.entries(K)){const xe=e[B],Ee=E[B];if(!xe||de===void 0)continue;(z.clearOnDefault??xe.clearOnDefault??m)&&de!==null&&xe.defaultValue!==void 0&&(xe.eq??((Se,Pe)=>Se===Pe))(de,xe.defaultValue)&&(de=null);const he=de===null?null:(xe.serialize??String)(de);Zg.emit(Ee,{state:de,query:he});const we={key:Ee,query:he,options:{history:z.history??xe.history??o,shallow:z.shallow??xe.shallow??u,scroll:z.scroll??xe.scroll??l,startTransition:z.startTransition??xe.startTransition??p}};if(((H=z==null?void 0:z.limitUrlUpdates)==null?void 0:H.method)==="debounce"||(f==null?void 0:f.method)==="debounce"||(($=xe.limitUrlUpdates)==null?void 0:$.method)==="debounce"){we.options.shallow===!0&&console.warn(Af(422));const Se=((ne=z==null?void 0:z.limitUrlUpdates)==null?void 0:ne.timeMs)??(f==null?void 0:f.timeMs)??((U=xe.limitUrlUpdates)==null?void 0:U.timeMs)??Uc.timeMs,Pe=Vg.push(we,Se,S,s);J<Se&&(Y=Pe,J=Se)}else{const Se=((q=z==null?void 0:z.limitUrlUpdates)==null?void 0:q.timeMs)??((ie=xe==null?void 0:xe.limitUrlUpdates)==null?void 0:ie.timeMs)??(f==null?void 0:f.timeMs)??z.throttleMs??xe.throttleMs??d;W.push(Vg.abort(Ee)),Fh.push(we,Se),te=!0}}const I=W.reduce((B,de)=>de(B),te?Fh.flush(S,s):Fh.getPendingPromise(S));return Y??I},[y,o,u,l,d,f==null?void 0:f.method,f==null?void 0:f.timeMs,p,E,S.updateUrl,S.getSearchParamsSnapshot,S.rateLimitFactor,s,_]);return[v.useMemo(()=>IC(R,_),[R,_]),D]}function Jg(e,t,n,r,s,o){let l=!1;const u=Object.entries(e).reduce((d,[f,m])=>{const p=(t==null?void 0:t[f])??f,g=r[p],y=m.type==="multi"?[]:null,E=g===void 0?(m.type==="multi"?n==null?void 0:n.getAll(p):n==null?void 0:n.get(p))??y:g;return s&&o&&ck(s[p]??y,E)?(d[f]=o[f]??null,d):(l=!0,d[f]=(E8(E)?null:Pk(m.parse,E,p))??null,s&&(s[p]=E),d)},{});if(!l){const d=Object.keys(e),f=Object.keys(o??{});l=d.length!==f.length||d.some(m=>!f.includes(m))}return{state:u,hasChanged:l}}function IC(e,t){return Object.fromEntries(Object.keys(e).map(n=>[n,e[n]??t[n]??null]))}function jk(e,t={}){const{parse:n,type:r,serialize:s,eq:o,defaultValue:l,...u}=t,[{[e]:d},f]=oj({[e]:{parse:n??(m=>m),type:r,serialize:s,eq:o,defaultValue:l}},u);return[d,v.useCallback((m,p={})=>f(g=>({[e]:typeof m=="function"?m(g[e]):m}),p),[e,f])]}function _f(){Xt(n=>n.sessionId),Xt(n=>n.setSessionId);const[e,t]=jk("session");return[e,t]}const lj="claude-sonnet-4-5-20250929",uj={"claude-opus-4":2e5,"claude-sonnet-4":2e5,"claude-haiku-4":2e5,"claude-sonnet-3":2e5,"claude-haiku-3":2e5};function cj(e){for(const[t,n]of Object.entries(uj))if(e.startsWith(t))return n;return null}function Bk(e,t,n){const r=ln(),s=yi(),o=Xt(A=>A.selectedCwd),[l,u]=v.useState(null),[d,f]=v.useState(null),{data:m}=xr({queryKey:["session",e,o],queryFn:()=>r.getSession(e,o??void 0),staleTime:3e4}),p=l??(t==null?void 0:t.model)??(m==null?void 0:m.model)??lj,g=(t==null?void 0:t.contextTokens)??(m==null?void 0:m.contextTokens)??null,y=(t==null?void 0:t.contextMaxTokens)??cj(p),E={permissionMode:d??(m==null?void 0:m.permissionMode)??"default",model:p,costUsd:(t==null?void 0:t.costUsd)??null,contextPercent:g&&y?Math.min(100,Math.round(g/y*100)):null,isStreaming:n,cwd:(m==null?void 0:m.cwd)??null},S=v.useCallback(async A=>{A.model&&u(A.model),A.permissionMode&&f(A.permissionMode);try{const w=await r.updateSession(e,A,o??void 0);return s.setQueryData(["session",e,o],w),A.model&&u(null),A.permissionMode&&f(null),w}catch{A.model&&u(null),A.permissionMode&&f(null)}},[r,e,o,s]);return{...E,updateSession:S}}function fj(){const e=ln(),t=Xt(s=>s.selectedCwd),n=Xt(s=>s.setSelectedCwd),{data:r}=xr({queryKey:["defaultCwd"],queryFn:()=>e.getDefaultCwd(),enabled:t===null,staleTime:1/0,refetchOnMount:!1,refetchOnReconnect:!1});v.useEffect(()=>{r!=null&&r.path&&t===null&&n(r.path)},[r,t,n])}function Im(){const e=Xt(o=>o.selectedCwd),t=Xt(o=>o.setSelectedCwd),[n,r]=jk("dir"),[,s]=_f();return v.useEffect(()=>{n&&n!==e&&t(n)},[n]),[n??e,o=>{o?(r(o),t(o),s(null)):r(null)}]}const nx=v.createContext({});function Lm(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const Uk=typeof window<"u",Fk=Uk?v.useLayoutEffect:v.useEffect,Pm=v.createContext(null);function rx(e,t){e.indexOf(t)===-1&&e.push(t)}function sm(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Fi=(e,t,n)=>n>t?t:n<e?e:n;let ix=()=>{};const vs={},Hk=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function zk(e){return typeof e=="object"&&e!==null}const Vk=e=>/^0[^.\s]+$/u.test(e);function sx(e){let t;return()=>(t===void 0&&(t=e()),t)}const Wr=e=>e,dj=(e,t)=>n=>t(e(n)),kf=(...e)=>e.reduce(dj),sf=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class ax{constructor(){this.subscriptions=[]}add(t){return rx(this.subscriptions,t),()=>sm(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const l=this.subscriptions[o];l&&l(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const mi=e=>e*1e3,Kr=e=>e/1e3;function qk(e,t){return t?e*(1e3/t):0}const $k=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,hj=1e-7,mj=12;function pj(e,t,n,r,s){let o,l,u=0;do l=t+(n-t)/2,o=$k(l,r,s)-e,o>0?n=l:t=l;while(Math.abs(o)>hj&&++u<mj);return l}function Nf(e,t,n,r){if(e===t&&n===r)return Wr;const s=o=>pj(o,0,1,e,n);return o=>o===0||o===1?o:$k(s(o),t,r)}const Yk=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Gk=e=>t=>1-e(1-t),Xk=Nf(.33,1.53,.69,.99),ox=Gk(Xk),Kk=Yk(ox),Qk=e=>(e*=2)<1?.5*ox(e):.5*(2-Math.pow(2,-10*(e-1))),lx=e=>1-Math.sin(Math.acos(e)),Wk=Gk(lx),Zk=Yk(lx),gj=Nf(.42,0,1,1),bj=Nf(0,0,.58,1),Jk=Nf(.42,0,.58,1),yj=e=>Array.isArray(e)&&typeof e[0]!="number",eN=e=>Array.isArray(e)&&typeof e[0]=="number",xj={linear:Wr,easeIn:gj,easeInOut:Jk,easeOut:bj,circIn:lx,circInOut:Zk,circOut:Wk,backIn:ox,backInOut:Kk,backOut:Xk,anticipate:Qk},vj=e=>typeof e=="string",LC=e=>{if(eN(e)){ix(e.length===4);const[t,n,r,s]=e;return Nf(t,n,r,s)}else if(vj(e))return xj[e];return e},gh=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ej(e,t){let n=new Set,r=new Set,s=!1,o=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function d(m){l.has(m)&&(f.schedule(m),e()),m(u)}const f={schedule:(m,p=!1,g=!1)=>{const E=g&&s?n:r;return p&&l.add(m),E.has(m)||E.add(m),m},cancel:m=>{r.delete(m),l.delete(m)},process:m=>{if(u=m,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(d),n.clear(),s=!1,o&&(o=!1,f.process(m))}};return f}const Tj=40;function tN(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,l=gh.reduce((k,R)=>(k[R]=Ej(o),k),{}),{setup:u,read:d,resolveKeyframes:f,preUpdate:m,update:p,preRender:g,render:y,postRender:E}=l,S=()=>{const k=vs.useManualTiming?s.timestamp:performance.now();n=!1,vs.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(k-s.timestamp,Tj),1)),s.timestamp=k,s.isProcessing=!0,u.process(s),d.process(s),f.process(s),m.process(s),p.process(s),g.process(s),y.process(s),E.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(S))},A=()=>{n=!0,r=!0,s.isProcessing||e(S)};return{schedule:gh.reduce((k,R)=>{const M=l[R];return k[R]=(O,D=!1,P=!1)=>(n||A(),M.schedule(O,D,P)),k},{}),cancel:k=>{for(let R=0;R<gh.length;R++)l[gh[R]].cancel(k)},state:s,steps:l}}const{schedule:Ut,cancel:ba,state:Un,steps:e1}=tN(typeof requestAnimationFrame<"u"?requestAnimationFrame:Wr,!0);let Hh;function Sj(){Hh=void 0}const nr={now:()=>(Hh===void 0&&nr.set(Un.isProcessing||vs.useManualTiming?Un.timestamp:performance.now()),Hh),set:e=>{Hh=e,queueMicrotask(Sj)}},nN=e=>t=>typeof t=="string"&&t.startsWith(e),rN=nN("--"),Cj=nN("var(--"),ux=e=>Cj(e)?wj.test(e.split("/*")[0].trim()):!1,wj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function PC(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const mu={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},af={...mu,transform:e=>Fi(0,1,e)},bh={...mu,default:1},Fc=e=>Math.round(e*1e5)/1e5,cx=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Aj(e){return e==null}const _j=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,fx=(e,t)=>n=>!!(typeof n=="string"&&_j.test(n)&&n.startsWith(e)||t&&!Aj(n)&&Object.prototype.hasOwnProperty.call(n,t)),iN=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,l,u]=r.match(cx);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(l),alpha:u!==void 0?parseFloat(u):1}},kj=e=>Fi(0,255,e),t1={...mu,transform:e=>Math.round(kj(e))},to={test:fx("rgb","red"),parse:iN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+t1.transform(e)+", "+t1.transform(t)+", "+t1.transform(n)+", "+Fc(af.transform(r))+")"};function Nj(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Fb={test:fx("#"),parse:Nj,transform:to.transform},Rf=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Zs=Rf("deg"),Pi=Rf("%"),Le=Rf("px"),Rj=Rf("vh"),Oj=Rf("vw"),jC={...Pi,parse:e=>Pi.parse(e)/100,transform:e=>Pi.transform(e*100)},Dl={test:fx("hsl","hue"),parse:iN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pi.transform(Fc(t))+", "+Pi.transform(Fc(n))+", "+Fc(af.transform(r))+")"},gn={test:e=>to.test(e)||Fb.test(e)||Dl.test(e),parse:e=>to.test(e)?to.parse(e):Dl.test(e)?Dl.parse(e):Fb.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?to.transform(e):Dl.transform(e),getAnimatableNone:e=>{const t=gn.parse(e);return t.alpha=0,gn.transform(t)}},Dj=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Mj(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(cx))==null?void 0:t.length)||0)+(((n=e.match(Dj))==null?void 0:n.length)||0)>0}const sN="number",aN="color",Ij="var",Lj="var(",BC="${}",Pj=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function of(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const u=t.replace(Pj,d=>(gn.test(d)?(r.color.push(o),s.push(aN),n.push(gn.parse(d))):d.startsWith(Lj)?(r.var.push(o),s.push(Ij),n.push(d)):(r.number.push(o),s.push(sN),n.push(parseFloat(d))),++o,BC)).split(BC);return{values:n,split:u,indexes:r,types:s}}function oN(e){return of(e).values}function lN(e){const{split:t,types:n}=of(e),r=t.length;return s=>{let o="";for(let l=0;l<r;l++)if(o+=t[l],s[l]!==void 0){const u=n[l];u===sN?o+=Fc(s[l]):u===aN?o+=gn.transform(s[l]):o+=s[l]}return o}}const jj=e=>typeof e=="number"?0:gn.test(e)?gn.getAnimatableNone(e):e;function Bj(e){const t=oN(e);return lN(e)(t.map(jj))}const ya={test:Mj,parse:oN,createTransformer:lN,getAnimatableNone:Bj};function n1(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Uj({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,l=0;if(!t)s=o=l=n;else{const u=n<.5?n*(1+t):n+t-n*t,d=2*n-u;s=n1(d,u,e+1/3),o=n1(d,u,e),l=n1(d,u,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(l*255),alpha:r}}function am(e,t){return n=>n>0?t:e}const Qt=(e,t,n)=>e+(t-e)*n,r1=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},Fj=[Fb,to,Dl],Hj=e=>Fj.find(t=>t.test(e));function UC(e){const t=Hj(e);if(!t)return!1;let n=t.parse(e);return t===Dl&&(n=Uj(n)),n}const FC=(e,t)=>{const n=UC(e),r=UC(t);if(!n||!r)return am(e,t);const s={...n};return o=>(s.red=r1(n.red,r.red,o),s.green=r1(n.green,r.green,o),s.blue=r1(n.blue,r.blue,o),s.alpha=Qt(n.alpha,r.alpha,o),to.transform(s))},Hb=new Set(["none","hidden"]);function zj(e,t){return Hb.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Vj(e,t){return n=>Qt(e,t,n)}function dx(e){return typeof e=="number"?Vj:typeof e=="string"?ux(e)?am:gn.test(e)?FC:Yj:Array.isArray(e)?uN:typeof e=="object"?gn.test(e)?FC:qj:am}function uN(e,t){const n=[...e],r=n.length,s=e.map((o,l)=>dx(o)(o,t[l]));return o=>{for(let l=0;l<r;l++)n[l]=s[l](o);return n}}function qj(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=dx(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function $j(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],l=e.indexes[o][r[o]],u=e.values[l]??0;n[s]=u,r[o]++}return n}const Yj=(e,t)=>{const n=ya.createTransformer(t),r=of(e),s=of(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Hb.has(e)&&!s.values.length||Hb.has(t)&&!r.values.length?zj(e,t):kf(uN($j(r,s),s.values),n):am(e,t)};function cN(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Qt(e,t,n):dx(e)(e,t)}const Gj=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Ut.update(t,n),stop:()=>ba(t),now:()=>Un.isProcessing?Un.timestamp:nr.now()}},fN=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},om=2e4;function hx(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<om;)t+=n,r=e.next(t);return t>=om?1/0:t}function Xj(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(hx(r),om);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:Kr(s)}}const Kj=5;function dN(e,t,n){const r=Math.max(t-Kj,0);return qk(n-e(r),t-r)}const en={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},i1=.001;function Qj({duration:e=en.duration,bounce:t=en.bounce,velocity:n=en.velocity,mass:r=en.mass}){let s,o,l=1-t;l=Fi(en.minDamping,en.maxDamping,l),e=Fi(en.minDuration,en.maxDuration,Kr(e)),l<1?(s=f=>{const m=f*l,p=m*e,g=m-n,y=zb(f,l),E=Math.exp(-p);return i1-g/y*E},o=f=>{const p=f*l*e,g=p*n+n,y=Math.pow(l,2)*Math.pow(f,2)*e,E=Math.exp(-p),S=zb(Math.pow(f,2),l);return(-s(f)+i1>0?-1:1)*((g-y)*E)/S}):(s=f=>{const m=Math.exp(-f*e),p=(f-n)*e+1;return-i1+m*p},o=f=>{const m=Math.exp(-f*e),p=(n-f)*(e*e);return m*p});const u=5/e,d=Zj(s,o,u);if(e=mi(e),isNaN(d))return{stiffness:en.stiffness,damping:en.damping,duration:e};{const f=Math.pow(d,2)*r;return{stiffness:f,damping:l*2*Math.sqrt(r*f),duration:e}}}const Wj=12;function Zj(e,t,n){let r=n;for(let s=1;s<Wj;s++)r=r-e(r)/t(r);return r}function zb(e,t){return e*Math.sqrt(1-t*t)}const Jj=["duration","bounce"],eB=["stiffness","damping","mass"];function HC(e,t){return t.some(n=>e[n]!==void 0)}function tB(e){let t={velocity:en.velocity,stiffness:en.stiffness,damping:en.damping,mass:en.mass,isResolvedFromDuration:!1,...e};if(!HC(e,eB)&&HC(e,Jj))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Fi(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:en.mass,stiffness:s,damping:o}}else{const n=Qj(e);t={...t,...n,mass:en.mass},t.isResolvedFromDuration=!0}return t}function lm(e=en.visualDuration,t=en.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],l=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:d,damping:f,mass:m,duration:p,velocity:g,isResolvedFromDuration:y}=tB({...n,velocity:-Kr(n.velocity||0)}),E=g||0,S=f/(2*Math.sqrt(d*m)),A=l-o,w=Kr(Math.sqrt(d/m)),_=Math.abs(A)<5;r||(r=_?en.restSpeed.granular:en.restSpeed.default),s||(s=_?en.restDelta.granular:en.restDelta.default);let k;if(S<1){const M=zb(w,S);k=O=>{const D=Math.exp(-S*w*O);return l-D*((E+S*w*A)/M*Math.sin(M*O)+A*Math.cos(M*O))}}else if(S===1)k=M=>l-Math.exp(-w*M)*(A+(E+w*A)*M);else{const M=w*Math.sqrt(S*S-1);k=O=>{const D=Math.exp(-S*w*O),P=Math.min(M*O,300);return l-D*((E+S*w*A)*Math.sinh(P)+M*A*Math.cosh(P))/M}}const R={calculatedDuration:y&&p||null,next:M=>{const O=k(M);if(y)u.done=M>=p;else{let D=M===0?E:0;S<1&&(D=M===0?mi(E):dN(k,M,O));const P=Math.abs(D)<=r,z=Math.abs(l-O)<=s;u.done=P&&z}return u.value=u.done?l:O,u},toString:()=>{const M=Math.min(hx(R),om),O=fN(D=>R.next(M*D).value,M,30);return M+"ms "+O},toTransition:()=>{}};return R}lm.applyToOptions=e=>{const t=Xj(e,100,lm);return e.ease=t.ease,e.duration=mi(t.duration),e.type="keyframes",e};function Vb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:l,min:u,max:d,restDelta:f=.5,restSpeed:m}){const p=e[0],g={done:!1,value:p},y=P=>u!==void 0&&P<u||d!==void 0&&P>d,E=P=>u===void 0?d:d===void 0||Math.abs(u-P)<Math.abs(d-P)?u:d;let S=n*t;const A=p+S,w=l===void 0?A:l(A);w!==A&&(S=w-p);const _=P=>-S*Math.exp(-P/r),k=P=>w+_(P),R=P=>{const z=_(P),j=k(P);g.done=Math.abs(z)<=f,g.value=g.done?w:j};let M,O;const D=P=>{y(g.value)&&(M=P,O=lm({keyframes:[g.value,E(g.value)],velocity:dN(k,P,g.value),damping:s,stiffness:o,restDelta:f,restSpeed:m}))};return D(0),{calculatedDuration:null,next:P=>{let z=!1;return!O&&M===void 0&&(z=!0,R(P),D(P)),M!==void 0&&P>=M?O.next(P-M):(!z&&R(P),g)}}}function nB(e,t,n){const r=[],s=n||vs.mix||cN,o=e.length-1;for(let l=0;l<o;l++){let u=s(e[l],e[l+1]);if(t){const d=Array.isArray(t)?t[l]||Wr:t;u=kf(d,u)}r.push(u)}return r}function rB(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(ix(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const l=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=nB(t,r,s),d=u.length,f=m=>{if(l&&m<e[0])return t[0];let p=0;if(d>1)for(;p<e.length-2&&!(m<e[p+1]);p++);const g=sf(e[p],e[p+1],m);return u[p](g)};return n?m=>f(Fi(e[0],e[o-1],m)):f}function iB(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=sf(0,t,r);e.push(Qt(n,1,s))}}function sB(e){const t=[0];return iB(t,e.length-1),t}function aB(e,t){return e.map(n=>n*t)}function oB(e,t){return e.map(()=>t||Jk).splice(0,e.length-1)}function Hc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=yj(r)?r.map(LC):LC(r),o={done:!1,value:t[0]},l=aB(n&&n.length===t.length?n:sB(t),e),u=rB(l,t,{ease:Array.isArray(s)?s:oB(t,s)});return{calculatedDuration:e,next:d=>(o.value=u(d),o.done=d>=e,o)}}const lB=e=>e!==null;function mx(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(lB),u=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||r===void 0?o[u]:r}const uB={decay:Vb,inertia:Vb,tween:Hc,keyframes:Hc,spring:lm};function hN(e){typeof e.type=="string"&&(e.type=uB[e.type])}class px{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const cB=e=>e/100;class gx extends px{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==nr.now()&&this.tick(nr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;hN(t);const{type:n=Hc,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:l=0}=t;let{keyframes:u}=t;const d=n||Hc;d!==Hc&&typeof u[0]!="number"&&(this.mixKeyframes=kf(cB,cN(u[0],u[1])),u=[0,100]);const f=d({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...u].reverse(),velocity:-l})),f.calculatedDuration===null&&(f.calculatedDuration=hx(f));const{calculatedDuration:m}=f;this.calculatedDuration=m,this.resolvedDuration=m+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:l,resolvedDuration:u,calculatedDuration:d}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:m,repeat:p,repeatType:g,repeatDelay:y,type:E,onUpdate:S,finalKeyframe:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-f*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?w<0:w>s;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let k=this.currentTime,R=r;if(p){const P=Math.min(this.currentTime,s)/u;let z=Math.floor(P),j=P%1;!j&&P>=1&&(j=1),j===1&&z--,z=Math.min(z,p+1),!!(z%2)&&(g==="reverse"?(j=1-j,y&&(j-=y/u)):g==="mirror"&&(R=l)),k=Fi(0,1,j)*u}const M=_?{done:!1,value:m[0]}:R.next(k);o&&(M.value=o(M.value));let{done:O}=M;!_&&d!==null&&(O=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return D&&E!==Vb&&(M.value=mx(m,this.options,A,this.speed)),S&&S(M.value),D&&this.finish(),M}then(t,n){return this.finished.then(t,n)}get duration(){return Kr(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Kr(t)}get time(){return Kr(this.currentTime)}set time(t){var n;t=mi(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(nr.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Kr(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=Gj,startTime:n}=this.options;this.driver||(this.driver=t(l=>this.tick(l))),(o=(s=this.options).onPlay)==null||o.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(nr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function fB(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const no=e=>e*180/Math.PI,qb=e=>{const t=no(Math.atan2(e[1],e[0]));return $b(t)},dB={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:qb,rotateZ:qb,skewX:e=>no(Math.atan(e[1])),skewY:e=>no(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$b=e=>(e=e%360,e<0&&(e+=360),e),zC=qb,VC=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),qC=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),hB={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:VC,scaleY:qC,scale:e=>(VC(e)+qC(e))/2,rotateX:e=>$b(no(Math.atan2(e[6],e[5]))),rotateY:e=>$b(no(Math.atan2(-e[2],e[0]))),rotateZ:zC,rotate:zC,skewX:e=>no(Math.atan(e[4])),skewY:e=>no(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Yb(e){return e.includes("scale")?1:0}function Gb(e,t){if(!e||e==="none")return Yb(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=hB,s=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=dB,s=u}if(!s)return Yb(t);const o=r[t],l=s[1].split(",").map(pB);return typeof o=="function"?o(l):l[o]}const mB=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Gb(n,t)};function pB(e){return parseFloat(e.trim())}const pu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],gu=new Set(pu),$C=e=>e===mu||e===Le,gB=new Set(["x","y","z"]),bB=pu.filter(e=>!gB.has(e));function yB(e){const t=[];return bB.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ma={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Gb(t,"x"),y:(e,{transform:t})=>Gb(t,"y")};ma.translateX=ma.x;ma.translateY=ma.y;const mo=new Set;let Xb=!1,Kb=!1,Qb=!1;function mN(){if(Kb){const e=Array.from(mo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=yB(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,l])=>{var u;(u=r.getValue(o))==null||u.set(l)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Kb=!1,Xb=!1,mo.forEach(e=>e.complete(Qb)),mo.clear()}function pN(){mo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Kb=!0)})}function xB(){Qb=!0,pN(),mN(),Qb=!1}class bx{constructor(t,n,r,s,o,l=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=l}scheduleResolve(){this.state="scheduled",this.isAsync?(mo.add(this),Xb||(Xb=!0,Ut.read(pN),Ut.resolveKeyframes(mN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,l);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=l),s&&o===void 0&&s.set(t[0])}fB(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),mo.delete(this)}cancel(){this.state==="scheduled"&&(mo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const vB=e=>e.startsWith("--");function EB(e,t,n){vB(t)?e.style.setProperty(t,n):e.style[t]=n}const TB=sx(()=>window.ScrollTimeline!==void 0),SB={};function CB(e,t){const n=sx(e);return()=>SB[t]??n()}const gN=CB(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Mc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,YC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mc([0,.65,.55,1]),circOut:Mc([.55,0,1,.45]),backIn:Mc([.31,.01,.66,-.59]),backOut:Mc([.33,1.53,.69,.99])};function bN(e,t){if(e)return typeof e=="function"?gN()?fN(e,t):"ease-out":eN(e)?Mc(e):Array.isArray(e)?e.map(n=>bN(n,t)||YC.easeOut):YC[e]}function wB(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:l="loop",ease:u="easeOut",times:d}={},f=void 0){const m={[t]:n};d&&(m.offset=d);const p=bN(u,s);Array.isArray(p)&&(m.easing=p);const g={delay:r,duration:s,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:o+1,direction:l==="reverse"?"alternate":"normal"};return f&&(g.pseudoElement=f),e.animate(m,g)}function yN(e){return typeof e=="function"&&"applyToOptions"in e}function AB({type:e,...t}){return yN(e)&&gN()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class xN extends px{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:l=!1,finalKeyframe:u,onComplete:d}=t;this.isPseudoElement=!!o,this.allowFlatten=l,this.options=t,ix(typeof t.type!="string");const f=AB(t);this.animation=wB(n,r,s,f,o),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const m=mx(s,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(m):EB(n,r,m),this.animation.cancel()}d==null||d(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Kr(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Kr(t)}get time(){return Kr(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=mi(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&TB()?(this.animation.timeline=t,Wr):n(this)}}const vN={anticipate:Qk,backInOut:Kk,circInOut:Zk};function _B(e){return e in vN}function kB(e){typeof e.ease=="string"&&_B(e.ease)&&(e.ease=vN[e.ease])}const s1=10;class NB extends xN{constructor(t){kB(t),hN(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...l}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new gx({...l,autoplay:!1}),d=Math.max(s1,nr.now()-this.startTime),f=Fi(0,s1,d-s1);n.setWithVelocity(u.sample(Math.max(0,d-f)).value,u.sample(d).value,f),u.stop()}}const GC=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ya.test(e)||e==="0")&&!e.startsWith("url("));function RB(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function OB(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],l=GC(s,t),u=GC(o,t);return!l||!u?!1:RB(e)||(n==="spring"||yN(n))&&r}function Wb(e){e.duration=0,e.type="keyframes"}const DB=new Set(["opacity","clipPath","filter","transform"]),MB=sx(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function IB(e){var m;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:l}=e;if(!(((m=t==null?void 0:t.owner)==null?void 0:m.current)instanceof HTMLElement))return!1;const{onUpdate:d,transformTemplate:f}=t.owner.getProps();return MB()&&n&&DB.has(n)&&(n!=="transform"||!f)&&!d&&!r&&s!=="mirror"&&o!==0&&l!=="inertia"}const LB=40;class PB extends px{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:l="loop",keyframes:u,name:d,motionValue:f,element:m,...p}){var E;super(),this.stop=()=>{var S,A;this._animation&&(this._animation.stop(),(S=this.stopTimeline)==null||S.call(this)),(A=this.keyframeResolver)==null||A.cancel()},this.createdAt=nr.now();const g={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:l,name:d,motionValue:f,element:m,...p},y=(m==null?void 0:m.KeyframeResolver)||bx;this.keyframeResolver=new y(u,(S,A,w)=>this.onKeyframesResolved(S,A,g,!w),d,f,m),(E=this.keyframeResolver)==null||E.scheduleResolve()}onKeyframesResolved(t,n,r,s){var A,w;this.keyframeResolver=void 0;const{name:o,type:l,velocity:u,delay:d,isHandoff:f,onUpdate:m}=r;this.resolvedAt=nr.now(),OB(t,o,l,u)||((vs.instantAnimations||!d)&&(m==null||m(mx(t,r,n))),t[0]=t[t.length-1],Wb(r),r.repeat=0);const g={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>LB?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},y=!f&&IB(g),E=(w=(A=g.motionValue)==null?void 0:A.owner)==null?void 0:w.current,S=y?new NB({...g,element:E}):new gx(g);S.finished.then(()=>{this.notifyFinished()}).catch(Wr),this.pendingTimeline&&(this.stopTimeline=S.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=S}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),xB()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function EN(e,t,n,r=0,s=1){const o=Array.from(e).sort((f,m)=>f.sortNodePosition(m)).indexOf(t),l=e.size,u=(l-1)*r;return typeof n=="function"?n(o,l):s===1?o*r:u-o*r}const jB=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function BB(e){const t=jB.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function TN(e,t,n=1){const[r,s]=BB(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const l=o.trim();return Hk(l)?parseFloat(l):l}return ux(s)?TN(s,t,n+1):s}const UB={type:"spring",stiffness:500,damping:25,restSpeed:10},FB=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),HB={type:"keyframes",duration:.8},zB={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},VB=(e,{keyframes:t})=>t.length>2?HB:gu.has(e)?e.startsWith("scale")?FB(t[1]):UB:zB,qB=e=>e!==null;function $B(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(qB),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}function yx(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function xx(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?yx(n,e):n}function YB({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:l,repeatDelay:u,from:d,elapsed:f,...m}){return!!Object.keys(m).length}const vx=(e,t,n,r={},s,o)=>l=>{const u=xx(r,e)||{},d=u.delay||r.delay||0;let{elapsed:f=0}=r;f=f-mi(d);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-f,onUpdate:g=>{t.set(g),u.onUpdate&&u.onUpdate(g)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:s};YB(u)||Object.assign(m,VB(e,m)),m.duration&&(m.duration=mi(m.duration)),m.repeatDelay&&(m.repeatDelay=mi(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let p=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(Wb(m),m.delay===0&&(p=!0)),(vs.instantAnimations||vs.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(p=!0,Wb(m),m.delay=0),m.allowFlatten=!u.type&&!u.ease,p&&!o&&t.get()!==void 0){const g=$B(m.keyframes,u);if(g!==void 0){Ut.update(()=>{m.onUpdate(g),m.onComplete()});return}}return u.isSync?new gx(m):new PB(m)};function XC(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ex(e,t,n,r){if(typeof t=="function"){const[s,o]=XC(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=XC(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function Fl(e,t,n){const r=e.getProps();return Ex(r,t,n!==void 0?n:r.custom,e)}const SN=new Set(["width","height","top","left","right","bottom",...pu]),KC=30,GB=e=>!isNaN(parseFloat(e));class XB{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const s=nr.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=nr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=GB(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ax);const r=this.events[t].add(n);return t==="change"?()=>{r(),Ut.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=nr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>KC)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,KC);return qk(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ru(e,t){return new XB(e,t)}const Zb=e=>Array.isArray(e);function KB(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ru(n))}function QB(e){return Zb(e)?e[e.length-1]||0:e}function WB(e,t){const n=Fl(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const l in o){const u=QB(o[l]);KB(e,l,u)}}const $n=e=>!!(e&&e.getVelocity);function ZB(e){return!!($n(e)&&e.add)}function Jb(e,t){const n=e.getValue("willChange");if(ZB(n))return n.add(t);if(!n&&vs.WillChange){const r=new vs.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Tx(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const JB="framerAppearId",CN="data-"+Tx(JB);function wN(e){return e.props[CN]}function e7({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function AN(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o,transitionEnd:l,...u}=t;const d=e.getDefaultTransition();o=o?yx(o,d):d;const f=o==null?void 0:o.reduceMotion;r&&(o=r);const m=[],p=s&&e.animationState&&e.animationState.getState()[s];for(const g in u){const y=e.getValue(g,e.latestValues[g]??null),E=u[g];if(E===void 0||p&&e7(p,g))continue;const S={delay:n,...xx(o||{},g)},A=y.get();if(A!==void 0&&!y.isAnimating&&!Array.isArray(E)&&E===A&&!S.velocity)continue;let w=!1;if(window.MotionHandoffAnimation){const R=wN(e);if(R){const M=window.MotionHandoffAnimation(R,g,Ut);M!==null&&(S.startTime=M,w=!0)}}Jb(e,g);const _=f??e.shouldReduceMotion;y.start(vx(g,y,E,_&&SN.has(g)?{type:!1}:S,e,w));const k=y.animation;k&&m.push(k)}if(l){const g=()=>Ut.update(()=>{l&&WB(e,l)});m.length?Promise.all(m).then(g):g()}return m}function ey(e,t,n={}){var d;const r=Fl(e,t,n.type==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(AN(e,r,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:m=0,staggerChildren:p,staggerDirection:g}=s;return t7(e,t,f,m,p,g,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[f,m]=u==="beforeChildren"?[o,l]:[l,o];return f().then(()=>m())}else return Promise.all([o(),l(n.delay)])}function t7(e,t,n=0,r=0,s=0,o=1,l){const u=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),u.push(ey(d,t,{...l,delay:n+(typeof r=="function"?0:r)+EN(e.variantChildren,d,r,s,o)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(u)}function n7(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>ey(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=ey(e,t,n);else{const s=typeof t=="function"?Fl(e,t,n.custom):t;r=Promise.all(AN(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const r7={test:e=>e==="auto",parse:e=>e},_N=e=>t=>t.test(e),kN=[mu,Le,Pi,Zs,Oj,Rj,r7],QC=e=>kN.find(_N(e));function i7(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Vk(e):!0}const s7=new Set(["brightness","contrast","saturate","opacity"]);function a7(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(cx)||[];if(!r)return e;const s=n.replace(r,"");let o=s7.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const o7=/\b([a-z-]*)\(.*?\)/gu,ty={...ya,getAnimatableNone:e=>{const t=e.match(o7);return t?t.map(a7).join(" "):e}},WC={...mu,transform:Math.round},l7={rotate:Zs,rotateX:Zs,rotateY:Zs,rotateZ:Zs,scale:bh,scaleX:bh,scaleY:bh,scaleZ:bh,skew:Zs,skewX:Zs,skewY:Zs,distance:Le,translateX:Le,translateY:Le,translateZ:Le,x:Le,y:Le,z:Le,perspective:Le,transformPerspective:Le,opacity:af,originX:jC,originY:jC,originZ:Le},Sx={borderWidth:Le,borderTopWidth:Le,borderRightWidth:Le,borderBottomWidth:Le,borderLeftWidth:Le,borderRadius:Le,borderTopLeftRadius:Le,borderTopRightRadius:Le,borderBottomRightRadius:Le,borderBottomLeftRadius:Le,width:Le,maxWidth:Le,height:Le,maxHeight:Le,top:Le,right:Le,bottom:Le,left:Le,inset:Le,insetBlock:Le,insetBlockStart:Le,insetBlockEnd:Le,insetInline:Le,insetInlineStart:Le,insetInlineEnd:Le,padding:Le,paddingTop:Le,paddingRight:Le,paddingBottom:Le,paddingLeft:Le,paddingBlock:Le,paddingBlockStart:Le,paddingBlockEnd:Le,paddingInline:Le,paddingInlineStart:Le,paddingInlineEnd:Le,margin:Le,marginTop:Le,marginRight:Le,marginBottom:Le,marginLeft:Le,marginBlock:Le,marginBlockStart:Le,marginBlockEnd:Le,marginInline:Le,marginInlineStart:Le,marginInlineEnd:Le,fontSize:Le,backgroundPositionX:Le,backgroundPositionY:Le,...l7,zIndex:WC,fillOpacity:af,strokeOpacity:af,numOctaves:WC},u7={...Sx,color:gn,backgroundColor:gn,outlineColor:gn,fill:gn,stroke:gn,borderColor:gn,borderTopColor:gn,borderRightColor:gn,borderBottomColor:gn,borderLeftColor:gn,filter:ty,WebkitFilter:ty},NN=e=>u7[e];function RN(e,t){let n=NN(e);return n!==ty&&(n=ya),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const c7=new Set(["auto","none","0"]);function f7(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!c7.has(o)&&of(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=RN(n,s)}class d7 extends bx{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let p=t[m];if(typeof p=="string"&&(p=p.trim(),ux(p))){const g=TN(p,n.current);g!==void 0&&(t[m]=g),m===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!SN.has(r)||t.length!==2)return;const[s,o]=t,l=QC(s),u=QC(o),d=PC(s),f=PC(o);if(d!==f&&ma[r]){this.needsMeasurement=!0;return}if(l!==u)if($C(l)&&$C(u))for(let m=0;m<t.length;m++){const p=t[m];typeof p=="string"&&(t[m]=parseFloat(p))}else ma[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||i7(t[s]))&&r.push(s);r.length&&f7(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ma[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,l=r[o];r[o]=ma[n](t.measureViewportBox(),window.getComputedStyle(t.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([d,f])=>{t.getValue(d).set(f)}),this.resolveNoneKeyframes()}}const h7=new Set(["opacity","clipPath","filter","transform"]);function ON(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const DN=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ny(e){return zk(e)&&"offsetHeight"in e}const{schedule:Cx}=tN(queueMicrotask,!1),li={x:!1,y:!1};function MN(){return li.x||li.y}function m7(e){return e==="x"||e==="y"?li[e]?null:(li[e]=!0,()=>{li[e]=!1}):li.x||li.y?null:(li.x=li.y=!0,()=>{li.x=li.y=!1})}function IN(e,t){const n=ON(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function p7(e){return!(e.pointerType==="touch"||MN())}function g7(e,t,n={}){const[r,s,o]=IN(e,n);return r.forEach(l=>{let u=!1,d=!1,f;const m=()=>{l.removeEventListener("pointerleave",E)},p=A=>{f&&(f(A),f=void 0),m()},g=A=>{u=!1,window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",g),d&&(d=!1,p(A))},y=()=>{u=!0,window.addEventListener("pointerup",g,s),window.addEventListener("pointercancel",g,s)},E=A=>{if(A.pointerType!=="touch"){if(u){d=!0;return}p(A)}},S=A=>{if(!p7(A))return;d=!1;const w=t(l,A);typeof w=="function"&&(f=w,l.addEventListener("pointerleave",E,s))};l.addEventListener("pointerenter",S,s),l.addEventListener("pointerdown",y,s)}),o}const LN=(e,t)=>t?e===t?!0:LN(e,t.parentElement):!1,wx=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,b7=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function y7(e){return b7.has(e.tagName)||e.isContentEditable===!0}const x7=new Set(["INPUT","SELECT","TEXTAREA"]);function v7(e){return x7.has(e.tagName)||e.isContentEditable===!0}const zh=new WeakSet;function ZC(e){return t=>{t.key==="Enter"&&e(t)}}function a1(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const E7=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ZC(()=>{if(zh.has(n))return;a1(n,"down");const s=ZC(()=>{a1(n,"up")}),o=()=>a1(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function JC(e){return wx(e)&&!MN()}const ew=new WeakSet;function T7(e,t,n={}){const[r,s,o]=IN(e,n),l=u=>{const d=u.currentTarget;if(!JC(u)||ew.has(u))return;zh.add(d),n.stopPropagation&&ew.add(u);const f=t(d,u),m=(y,E)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",g),zh.has(d)&&zh.delete(d),JC(y)&&typeof f=="function"&&f(y,{success:E})},p=y=>{m(y,d===window||d===document||n.useGlobalTarget||LN(d,y.target))},g=y=>{m(y,!1)};window.addEventListener("pointerup",p,s),window.addEventListener("pointercancel",g,s)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",l,s),ny(u)&&(u.addEventListener("focus",f=>E7(f,s)),!y7(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}function Ax(e){return zk(e)&&"ownerSVGElement"in e}const Vh=new WeakMap;let Js;const PN=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:Ax(r)&&"getBBox"in r?r.getBBox()[t]:r[n],S7=PN("inline","width","offsetWidth"),C7=PN("block","height","offsetHeight");function w7({target:e,borderBoxSize:t}){var n;(n=Vh.get(e))==null||n.forEach(r=>{r(e,{get width(){return S7(e,t)},get height(){return C7(e,t)}})})}function A7(e){e.forEach(w7)}function _7(){typeof ResizeObserver>"u"||(Js=new ResizeObserver(A7))}function k7(e,t){Js||_7();const n=ON(e);return n.forEach(r=>{let s=Vh.get(r);s||(s=new Set,Vh.set(r,s)),s.add(t),Js==null||Js.observe(r)}),()=>{n.forEach(r=>{const s=Vh.get(r);s==null||s.delete(t),s!=null&&s.size||Js==null||Js.unobserve(r)})}}const qh=new Set;let Ml;function N7(){Ml=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};qh.forEach(t=>t(e))},window.addEventListener("resize",Ml)}function R7(e){return qh.add(e),Ml||N7(),()=>{qh.delete(e),!qh.size&&typeof Ml=="function"&&(window.removeEventListener("resize",Ml),Ml=void 0)}}function tw(e,t){return typeof e=="function"?R7(e):k7(e,t)}function O7(e){return Ax(e)&&e.tagName==="svg"}const D7=[...kN,gn,ya],M7=e=>D7.find(_N(e)),nw=()=>({translate:0,scale:1,origin:0,originPoint:0}),Il=()=>({x:nw(),y:nw()}),rw=()=>({min:0,max:0}),vn=()=>({x:rw(),y:rw()}),I7=new WeakMap;function jm(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function lf(e){return typeof e=="string"||Array.isArray(e)}const _x=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],kx=["initial",..._x];function Bm(e){return jm(e.animate)||kx.some(t=>lf(e[t]))}function jN(e){return!!(Bm(e)||e.variants)}function L7(e,t,n){for(const r in t){const s=t[r],o=n[r];if($n(s))e.addValue(r,s);else if($n(o))e.addValue(r,ru(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const l=e.getValue(r);l.liveStyle===!0?l.jump(s):l.hasAnimated||l.set(s)}else{const l=e.getStaticValue(r);e.addValue(r,ru(l!==void 0?l:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ry={current:null},BN={current:!1},P7=typeof window<"u";function j7(){if(BN.current=!0,!!P7)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ry.current=e.matches;e.addEventListener("change",t),t()}else ry.current=!1}const iw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let um={};function UN(e){um=e}function B7(){return um}class U7{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:o,blockInitialAnimation:l,visualState:u},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=bx,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const y=nr.now();this.renderScheduledAt<y&&(this.renderScheduledAt=y,Ut.render(this.render,!1,!0))};const{latestValues:f,renderState:m}=u;this.latestValues=f,this.baseTarget={...f},this.initialValues=n.initial?{...f}:{},this.renderState=m,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=o,this.options=d,this.blockInitialAnimation=!!l,this.isControllingVariants=Bm(n),this.isVariantNode=jN(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...g}=this.scrapeMotionValuesFromProps(n,{},this);for(const y in g){const E=g[y];f[y]!==void 0&&$n(E)&&E.set(f[y])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,I7.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,o)=>this.bindToMotionValue(o,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(BN.current||j7(),this.shouldReduceMotion=ry.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),ba(this.notifyUpdate),ba(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&h7.has(t)&&this.current instanceof HTMLElement){const{factory:l,keyframes:u,times:d,ease:f,duration:m}=n.accelerate,p=new xN({element:this.current,name:t,keyframes:u,times:d,ease:f,duration:mi(m)}),g=l(p);this.valueSubscriptions.set(t,()=>{g(),p.cancel()});return}const r=gu.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Ut.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in um){const n=um[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):vn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<iw.length;r++){const s=iw[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,l=t[o];l&&(this.propEventSubscriptions[s]=this.on(s,l))}this.prevMotionValues=L7(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ru(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Hk(r)||Vk(r))?r=parseFloat(r):!M7(r)&&ya.test(n)&&(r=RN(t,n)),this.setBaseTarget(t,$n(r)?r.get():r)),$n(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const l=Ex(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);l&&(r=l[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!$n(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ax),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Cx.render(this.render)}}class FN extends U7{constructor(){super(...arguments),this.KeyframeResolver=d7}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;$n(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ca{constructor(t){this.isMounted=!1,this.node=t}update(){}}function HN({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function F7({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function H7(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function o1(e){return e===void 0||e===1}function iy({scale:e,scaleX:t,scaleY:n}){return!o1(e)||!o1(t)||!o1(n)}function Za(e){return iy(e)||zN(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zN(e){return sw(e.x)||sw(e.y)}function sw(e){return e&&e!=="0%"}function cm(e,t,n){const r=e-n,s=t*r;return n+s}function aw(e,t,n,r,s){return s!==void 0&&(e=cm(e,s,r)),cm(e,n,r)+t}function sy(e,t=0,n=1,r,s){e.min=aw(e.min,t,n,r,s),e.max=aw(e.max,t,n,r,s)}function VN(e,{x:t,y:n}){sy(e.x,t.translate,t.scale,t.originPoint),sy(e.y,n.translate,n.scale,n.originPoint)}const ow=.999999999999,lw=1.0000000000001;function z7(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let o,l;for(let u=0;u<s;u++){o=n[u],l=o.projectionDelta;const{visualElement:d}=o.options;d&&d.props.style&&d.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Pl(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,VN(e,l)),r&&Za(o.latestValues)&&Pl(e,o.latestValues))}t.x<lw&&t.x>ow&&(t.x=1),t.y<lw&&t.y>ow&&(t.y=1)}function Ll(e,t){e.min=e.min+t,e.max=e.max+t}function uw(e,t,n,r,s=.5){const o=Qt(e.min,e.max,s);sy(e,t,n,o,r)}function Pl(e,t){uw(e.x,t.x,t.scaleX,t.scale,t.originX),uw(e.y,t.y,t.scaleY,t.scale,t.originY)}function qN(e,t){return HN(H7(e.getBoundingClientRect(),t))}function V7(e,t,n){const r=qN(e,n),{scroll:s}=t;return s&&(Ll(r.x,s.offset.x),Ll(r.y,s.offset.y)),r}const q7={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$7=pu.length;function Y7(e,t,n){let r="",s=!0;for(let o=0;o<$7;o++){const l=pu[o],u=e[l];if(u===void 0)continue;let d=!0;if(typeof u=="number")d=u===(l.startsWith("scale")?1:0);else{const f=parseFloat(u);d=l.startsWith("scale")?f===1:f===0}if(!d||n){const f=DN(u,Sx[l]);if(!d){s=!1;const m=q7[l]||l;r+=`${m}(${f}) `}n&&(t[l]=f)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Nx(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let l=!1,u=!1;for(const d in t){const f=t[d];if(gu.has(d)){l=!0;continue}else if(rN(d)){s[d]=f;continue}else{const m=DN(f,Sx[d]);d.startsWith("origin")?(u=!0,o[d]=m):r[d]=m}}if(t.transform||(l||n?r.transform=Y7(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:d="50%",originY:f="50%",originZ:m=0}=o;r.transformOrigin=`${d} ${f} ${m}`}}function $N(e,{style:t,vars:n},r,s){const o=e.style;let l;for(l in t)o[l]=t[l];s==null||s.applyProjectionStyles(o,r);for(l in n)o.setProperty(l,n[l])}function cw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const vc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Le.test(e))e=parseFloat(e);else return e;const n=cw(e,t.target.x),r=cw(e,t.target.y);return`${n}% ${r}%`}},G7={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=ya.parse(e);if(s.length>5)return r;const o=ya.createTransformer(e),l=typeof s[0]!="number"?1:0,u=n.x.scale*t.x,d=n.y.scale*t.y;s[0+l]/=u,s[1+l]/=d;const f=Qt(u,d,.5);return typeof s[2+l]=="number"&&(s[2+l]/=f),typeof s[3+l]=="number"&&(s[3+l]/=f),o(s)}},ay={borderRadius:{...vc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vc,borderTopRightRadius:vc,borderBottomLeftRadius:vc,borderBottomRightRadius:vc,boxShadow:G7};function YN(e,{layout:t,layoutId:n}){return gu.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ay[e]||e==="opacity")}function Rx(e,t,n){var l;const r=e.style,s=t==null?void 0:t.style,o={};if(!r)return o;for(const u in r)($n(r[u])||s&&$n(s[u])||YN(u,e)||((l=n==null?void 0:n.getValue(u))==null?void 0:l.liveStyle)!==void 0)&&(o[u]=r[u]);return o}function X7(e){return window.getComputedStyle(e)}class K7 extends FN{constructor(){super(...arguments),this.type="html",this.renderInstance=$N}readValueFromInstance(t,n){var r;if(gu.has(n))return(r=this.projection)!=null&&r.isProjecting?Yb(n):mB(t,n);{const s=X7(t),o=(rN(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return qN(t,n)}build(t,n,r){Nx(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Rx(t,n,r)}}const Q7={offset:"stroke-dashoffset",array:"stroke-dasharray"},W7={offset:"strokeDashoffset",array:"strokeDasharray"};function Z7(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?Q7:W7;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const J7=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function GN(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:l=0,...u},d,f,m){if(Nx(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g}=e;p.transform&&(g.transform=p.transform,delete p.transform),(g.transform||p.transformOrigin)&&(g.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),g.transform&&(g.transformBox=(m==null?void 0:m.transformBox)??"fill-box",delete p.transformBox);for(const y of J7)p[y]!==void 0&&(g[y]=p[y],delete p[y]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&Z7(p,s,o,l,!1)}const XN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),KN=e=>typeof e=="string"&&e.toLowerCase()==="svg";function eU(e,t,n,r){$N(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(XN.has(s)?s:Tx(s),t.attrs[s])}function QN(e,t,n){const r=Rx(e,t,n);for(const s in e)if($n(e[s])||$n(t[s])){const o=pu.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}class tU extends FN{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=vn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(gu.has(n)){const r=NN(n);return r&&r.default||0}return n=XN.has(n)?n:Tx(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return QN(t,n,r)}build(t,n,r){GN(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){eU(t,n,r,s)}mount(t){this.isSVGTag=KN(t.tagName),super.mount(t)}}const nU=kx.length;function WN(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?WN(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<nU;n++){const r=kx[n],s=e.props[r];(lf(s)||s===!1)&&(t[r]=s)}return t}function ZN(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const rU=[..._x].reverse(),iU=_x.length;function sU(e){return t=>Promise.all(t.map(({animation:n,options:r})=>n7(e,n,r)))}function aU(e){let t=sU(e),n=fw(),r=!0;const s=d=>(f,m)=>{var g;const p=Fl(e,m,d==="exit"?(g=e.presenceContext)==null?void 0:g.custom:void 0);if(p){const{transition:y,transitionEnd:E,...S}=p;f={...f,...S,...E}}return f};function o(d){t=d(e)}function l(d){const{props:f}=e,m=WN(e.parent)||{},p=[],g=new Set;let y={},E=1/0;for(let A=0;A<iU;A++){const w=rU[A],_=n[w],k=f[w]!==void 0?f[w]:m[w],R=lf(k),M=w===d?_.isActive:null;M===!1&&(E=A);let O=k===m[w]&&k!==f[w]&&R;if(O&&r&&e.manuallyAnimateOnMount&&(O=!1),_.protectedKeys={...y},!_.isActive&&M===null||!k&&!_.prevProp||jm(k)||typeof k=="boolean")continue;if(w==="exit"&&_.isActive&&M!==!0){_.prevResolvedValues&&(y={...y,..._.prevResolvedValues});continue}const D=oU(_.prevProp,k);let P=D||w===d&&_.isActive&&!O&&R||A>E&&R,z=!1;const j=Array.isArray(k)?k:[k];let K=j.reduce(s(w),{});M===!1&&(K={});const{prevResolvedValues:Y={}}=_,J={...Y,...K},te=H=>{P=!0,g.has(H)&&(z=!0,g.delete(H)),_.needsAnimating[H]=!0;const $=e.getValue(H);$&&($.liveStyle=!1)};for(const H in J){const $=K[H],ne=Y[H];if(y.hasOwnProperty(H))continue;let U=!1;Zb($)&&Zb(ne)?U=!ZN($,ne):U=$!==ne,U?$!=null?te(H):g.add(H):$!==void 0&&g.has(H)?te(H):_.protectedKeys[H]=!0}_.prevProp=k,_.prevResolvedValues=K,_.isActive&&(y={...y,...K}),r&&e.blockInitialAnimation&&(P=!1);const W=O&&D;P&&(!W||z)&&p.push(...j.map(H=>{const $={type:w};if(typeof H=="string"&&r&&!W&&e.manuallyAnimateOnMount&&e.parent){const{parent:ne}=e,U=Fl(ne,H);if(ne.enteringChildren&&U){const{delayChildren:q}=U.transition||{};$.delay=EN(ne.enteringChildren,e,q)}}return{animation:H,options:$}}))}if(g.size){const A={};if(typeof f.initial!="boolean"){const w=Fl(e,Array.isArray(f.initial)?f.initial[0]:f.initial);w&&w.transition&&(A.transition=w.transition)}g.forEach(w=>{const _=e.getBaseTarget(w),k=e.getValue(w);k&&(k.liveStyle=!0),A[w]=_??null}),p.push({animation:A})}let S=!!p.length;return r&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(S=!1),r=!1,S?t(p):Promise.resolve()}function u(d,f){var p;if(n[d].isActive===f)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(g=>{var y;return(y=g.animationState)==null?void 0:y.setActive(d,f)}),n[d].isActive=f;const m=l(d);for(const g in n)n[g].protectedKeys={};return m}return{animateChanges:l,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=fw()}}}function oU(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ZN(t,e):!1}function Xa(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fw(){return{animate:Xa(!0),whileInView:Xa(),whileHover:Xa(),whileTap:Xa(),whileDrag:Xa(),whileFocus:Xa(),exit:Xa()}}function dw(e,t){e.min=t.min,e.max=t.max}function oi(e,t){dw(e.x,t.x),dw(e.y,t.y)}function hw(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const JN=1e-4,lU=1-JN,uU=1+JN,eR=.01,cU=0-eR,fU=0+eR;function rr(e){return e.max-e.min}function dU(e,t,n){return Math.abs(e-t)<=n}function mw(e,t,n,r=.5){e.origin=r,e.originPoint=Qt(t.min,t.max,e.origin),e.scale=rr(n)/rr(t),e.translate=Qt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=lU&&e.scale<=uU||isNaN(e.scale))&&(e.scale=1),(e.translate>=cU&&e.translate<=fU||isNaN(e.translate))&&(e.translate=0)}function zc(e,t,n,r){mw(e.x,t.x,n.x,r?r.originX:void 0),mw(e.y,t.y,n.y,r?r.originY:void 0)}function pw(e,t,n){e.min=n.min+t.min,e.max=e.min+rr(t)}function hU(e,t,n){pw(e.x,t.x,n.x),pw(e.y,t.y,n.y)}function gw(e,t,n){e.min=t.min-n.min,e.max=e.min+rr(t)}function fm(e,t,n){gw(e.x,t.x,n.x),gw(e.y,t.y,n.y)}function bw(e,t,n,r,s){return e-=t,e=cm(e,1/n,r),s!==void 0&&(e=cm(e,1/s,r)),e}function mU(e,t=0,n=1,r=.5,s,o=e,l=e){if(Pi.test(t)&&(t=parseFloat(t),t=Qt(l.min,l.max,t/100)-l.min),typeof t!="number")return;let u=Qt(o.min,o.max,r);e===o&&(u-=t),e.min=bw(e.min,t,n,u,s),e.max=bw(e.max,t,n,u,s)}function yw(e,t,[n,r,s],o,l){mU(e,t[n],t[r],t[s],t.scale,o,l)}const pU=["x","scaleX","originX"],gU=["y","scaleY","originY"];function xw(e,t,n,r){yw(e.x,t,pU,n?n.x:void 0,r?r.x:void 0),yw(e.y,t,gU,n?n.y:void 0,r?r.y:void 0)}function vw(e){return e.translate===0&&e.scale===1}function tR(e){return vw(e.x)&&vw(e.y)}function Ew(e,t){return e.min===t.min&&e.max===t.max}function bU(e,t){return Ew(e.x,t.x)&&Ew(e.y,t.y)}function Tw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function nR(e,t){return Tw(e.x,t.x)&&Tw(e.y,t.y)}function Sw(e){return rr(e.x)/rr(e.y)}function Cw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ki(e){return[e("x"),e("y")]}function yU(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,l=(n==null?void 0:n.z)||0;if((s||o||l)&&(r=`translate3d(${s}px, ${o}px, ${l}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:m,rotateX:p,rotateY:g,skewX:y,skewY:E}=n;f&&(r=`perspective(${f}px) ${r}`),m&&(r+=`rotate(${m}deg) `),p&&(r+=`rotateX(${p}deg) `),g&&(r+=`rotateY(${g}deg) `),y&&(r+=`skewX(${y}deg) `),E&&(r+=`skewY(${E}deg) `)}const u=e.x.scale*t.x,d=e.y.scale*t.y;return(u!==1||d!==1)&&(r+=`scale(${u}, ${d})`),r||"none"}const rR=["TopLeft","TopRight","BottomLeft","BottomRight"],xU=rR.length,ww=e=>typeof e=="string"?parseFloat(e):e,Aw=e=>typeof e=="number"||Le.test(e);function vU(e,t,n,r,s,o){s?(e.opacity=Qt(0,n.opacity??1,EU(r)),e.opacityExit=Qt(t.opacity??1,0,TU(r))):o&&(e.opacity=Qt(t.opacity??1,n.opacity??1,r));for(let l=0;l<xU;l++){const u=`border${rR[l]}Radius`;let d=_w(t,u),f=_w(n,u);if(d===void 0&&f===void 0)continue;d||(d=0),f||(f=0),d===0||f===0||Aw(d)===Aw(f)?(e[u]=Math.max(Qt(ww(d),ww(f),r),0),(Pi.test(f)||Pi.test(d))&&(e[u]+="%")):e[u]=f}(t.rotate||n.rotate)&&(e.rotate=Qt(t.rotate||0,n.rotate||0,r))}function _w(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const EU=iR(0,.5,Wk),TU=iR(.5,.95,Wr);function iR(e,t,n){return r=>r<e?0:r>t?1:n(sf(e,t,r))}function SU(e,t,n){const r=$n(e)?e:ru(e);return r.start(vx("",r,t,n)),r.animation}function uf(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const CU=(e,t)=>e.depth-t.depth;class wU{constructor(){this.children=[],this.isDirty=!1}add(t){rx(this.children,t),this.isDirty=!0}remove(t){sm(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(CU),this.isDirty=!1,this.children.forEach(t)}}function AU(e,t){const n=nr.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(ba(r),e(o-t))};return Ut.setup(r,!0),()=>ba(r)}function $h(e){return $n(e)?e.get():e}class _U{constructor(){this.members=[]}add(t){rx(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;s&&s.isConnected===!1&&r.isPresent!==!1&&!r.snapshot&&sm(this.members,r)}t.scheduleRender()}remove(t){if(sm(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const o=this.members[s],l=o.instance;if(o.isPresent!==!1&&(!l||l.isConnected!==!1)){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const s=r.options.layoutDependency,o=t.options.layoutDependency;if(!(s!==void 0&&o!==void 0&&s===o)){const d=r.instance;d&&d.isConnected===!1&&!r.snapshot||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:u}=t.options;u===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Yh={hasAnimatedSinceResize:!0,hasEverUpdated:!1},l1=["","X","Y","Z"],kU=1e3;let NU=0;function u1(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function sR(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=wN(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ut,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&sR(r)}function aR({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(l={},u=t==null?void 0:t()){this.id=NU++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(DU),this.nodes.forEach(PU),this.nodes.forEach(jU),this.nodes.forEach(MU)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=l,this.root=u?u.root||u:this,this.path=u?[...u.path,u]:[],this.parent=u,this.depth=u?u.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new wU)}addEventListener(l,u){return this.eventHandlers.has(l)||this.eventHandlers.set(l,new ax),this.eventHandlers.get(l).add(u)}notifyListeners(l,...u){const d=this.eventHandlers.get(l);d&&d.notify(...u)}hasListeners(l){return this.eventHandlers.has(l)}mount(l){if(this.instance)return;this.isSVG=Ax(l)&&!O7(l),this.instance=l;const{layoutId:u,layout:d,visualElement:f}=this.options;if(f&&!f.current&&f.mount(l),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||u)&&(this.isLayoutDirty=!0),e){let m,p=0;const g=()=>this.root.updateBlockedByResize=!1;Ut.read(()=>{p=window.innerWidth}),e(l,()=>{const y=window.innerWidth;y!==p&&(p=y,this.root.updateBlockedByResize=!0,m&&m(),m=AU(g,250),Yh.hasAnimatedSinceResize&&(Yh.hasAnimatedSinceResize=!1,this.nodes.forEach(Rw)))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&f&&(u||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:p,hasRelativeLayoutChanged:g,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||f.getDefaultTransition()||zU,{onLayoutAnimationStart:S,onLayoutAnimationComplete:A}=f.getProps(),w=!this.targetLayout||!nR(this.targetLayout,y),_=!p&&g;if(this.options.layoutRoot||this.resumeFrom||_||p&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const k={...xx(E,"layout"),onPlay:S,onComplete:A};(f.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k),this.setAnimationOrigin(m,_)}else p||Rw(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const l=this.getStack();l&&l.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ba(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(BU),this.animationId++)}getTransformTemplate(){const{visualElement:l}=this.options;return l&&l.getProps().transformTemplate}willUpdate(l=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sR(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const p=this.path[m];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:u,layout:d}=this.options;if(u===void 0&&!d)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),l&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(kw);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Nw);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(LU),this.nodes.forEach(RU),this.nodes.forEach(OU)):this.nodes.forEach(Nw),this.clearAllSnapshots();const u=nr.now();Un.delta=Fi(0,1e3/60,u-Un.timestamp),Un.timestamp=u,Un.isProcessing=!0,e1.update.process(Un),e1.preRender.process(Un),e1.render.process(Un),Un.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Cx.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(IU),this.sharedNodes.forEach(UU)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ut.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ut.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!rr(this.snapshot.measuredBox.x)&&!rr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let d=0;d<this.path.length;d++)this.path[d].updateScroll();const l=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=vn(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:u}=this.options;u&&u.notify("LayoutMeasure",this.layout.layoutBox,l?l.layoutBox:void 0)}updateScroll(l="measure"){let u=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===l&&(u=!1),u&&this.instance){const d=r(this.instance);this.scroll={animationId:this.root.animationId,phase:l,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!s)return;const l=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,u=this.projectionDelta&&!tR(this.projectionDelta),d=this.getTransformTemplate(),f=d?d(this.latestValues,""):void 0,m=f!==this.prevTransformTemplateValue;l&&this.instance&&(u||Za(this.latestValues)||m)&&(s(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(l=!0){const u=this.measurePageBox();let d=this.removeElementScroll(u);return l&&(d=this.removeTransform(d)),VU(d),{animationId:this.root.animationId,measuredBox:u,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:l}=this.options;if(!l)return vn();const u=l.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(qU))){const{scroll:m}=this.root;m&&(Ll(u.x,m.offset.x),Ll(u.y,m.offset.y))}return u}removeElementScroll(l){var d;const u=vn();if(oi(u,l),(d=this.scroll)!=null&&d.wasRoot)return u;for(let f=0;f<this.path.length;f++){const m=this.path[f],{scroll:p,options:g}=m;m!==this.root&&p&&g.layoutScroll&&(p.wasRoot&&oi(u,l),Ll(u.x,p.offset.x),Ll(u.y,p.offset.y))}return u}applyTransform(l,u=!1){const d=vn();oi(d,l);for(let f=0;f<this.path.length;f++){const m=this.path[f];!u&&m.options.layoutScroll&&m.scroll&&m!==m.root&&Pl(d,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),Za(m.latestValues)&&Pl(d,m.latestValues)}return Za(this.latestValues)&&Pl(d,this.latestValues),d}removeTransform(l){const u=vn();oi(u,l);for(let d=0;d<this.path.length;d++){const f=this.path[d];if(!f.instance||!Za(f.latestValues))continue;iy(f.latestValues)&&f.updateSnapshot();const m=vn(),p=f.measurePageBox();oi(m,p),xw(u,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,m)}return Za(this.latestValues)&&xw(u,this.latestValues),u}setTargetDelta(l){this.targetDelta=l,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(l){this.options={...this.options,...l,crossfade:l.crossfade!==void 0?l.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Un.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(l=!1){var y;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==u;if(!(l||d&&this.isSharedProjectionDirty||this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:p}=this.options;if(!this.layout||!(m||p))return;this.resolvedRelativeTargetAt=Un.timestamp;const g=this.getClosestProjectingParent();g&&this.linkedParentVersion!==g.layoutVersion&&!g.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(g&&g.layout?this.createRelativeTarget(g,this.layout.layoutBox,g.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=vn(),this.targetWithTransforms=vn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),hU(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):oi(this.target,this.layout.layoutBox),VN(this.target,this.targetDelta)):oi(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?this.createRelativeTarget(g,this.target,g.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||iy(this.parent.latestValues)||zN(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(l,u,d){this.relativeParent=l,this.linkedParentVersion=l.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vn(),this.relativeTargetOrigin=vn(),fm(this.relativeTargetOrigin,u,d),oi(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var E;const l=this.getLead(),u=!!this.resumingFrom||this!==l;let d=!0;if((this.isProjectionDirty||(E=this.parent)!=null&&E.isProjectionDirty)&&(d=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===Un.timestamp&&(d=!1),d)return;const{layout:f,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||m))return;oi(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,g=this.treeScale.y;z7(this.layoutCorrected,this.treeScale,this.path,u),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=vn());const{target:y}=l;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(hw(this.prevProjectionDelta.x,this.projectionDelta.x),hw(this.prevProjectionDelta.y,this.projectionDelta.y)),zc(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==g||!Cw(this.projectionDelta.x,this.prevProjectionDelta.x)||!Cw(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(l=!0){var u;if((u=this.options.visualElement)==null||u.scheduleRender(),l){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Il(),this.projectionDelta=Il(),this.projectionDeltaWithTransform=Il()}setAnimationOrigin(l,u=!1){const d=this.snapshot,f=d?d.latestValues:{},m={...this.latestValues},p=Il();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!u;const g=vn(),y=d?d.source:void 0,E=this.layout?this.layout.source:void 0,S=y!==E,A=this.getStack(),w=!A||A.members.length<=1,_=!!(S&&!w&&this.options.crossfade===!0&&!this.path.some(HU));this.animationProgress=0;let k;this.mixTargetDelta=R=>{const M=R/1e3;Ow(p.x,l.x,M),Ow(p.y,l.y,M),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(fm(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),FU(this.relativeTarget,this.relativeTargetOrigin,g,M),k&&bU(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=vn()),oi(k,this.relativeTarget)),S&&(this.animationValues=m,vU(m,f,this.latestValues,M,_,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(l){var u,d,f;this.notifyListeners("animationStart"),(u=this.currentAnimation)==null||u.stop(),(f=(d=this.resumingFrom)==null?void 0:d.currentAnimation)==null||f.stop(),this.pendingAnimation&&(ba(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ut.update(()=>{Yh.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ru(0)),this.currentAnimation=SU(this.motionValue,[0,1e3],{...l,velocity:0,isSync:!0,onUpdate:m=>{this.mixTargetDelta(m),l.onUpdate&&l.onUpdate(m)},onStop:()=>{},onComplete:()=>{l.onComplete&&l.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const l=this.getStack();l&&l.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(kU),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const l=this.getLead();let{targetWithTransforms:u,target:d,layout:f,latestValues:m}=l;if(!(!u||!d||!f)){if(this!==l&&this.layout&&f&&oR(this.options.animationType,this.layout.layoutBox,f.layoutBox)){d=this.target||vn();const p=rr(this.layout.layoutBox.x);d.x.min=l.target.x.min,d.x.max=d.x.min+p;const g=rr(this.layout.layoutBox.y);d.y.min=l.target.y.min,d.y.max=d.y.min+g}oi(u,d),Pl(u,m),zc(this.projectionDeltaWithTransform,this.layoutCorrected,u,m)}}registerSharedNode(l,u){this.sharedNodes.has(l)||this.sharedNodes.set(l,new _U),this.sharedNodes.get(l).add(u);const f=u.options.initialPromotionConfig;u.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(u):void 0})}isLead(){const l=this.getStack();return l?l.lead===this:!0}getLead(){var u;const{layoutId:l}=this.options;return l?((u=this.getStack())==null?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:l}=this.options;return l?(u=this.getStack())==null?void 0:u.prevLead:void 0}getStack(){const{layoutId:l}=this.options;if(l)return this.root.sharedNodes.get(l)}promote({needsReset:l,transition:u,preserveFollowOpacity:d}={}){const f=this.getStack();f&&f.promote(this,d),l&&(this.projectionDelta=void 0,this.needsReset=!0),u&&this.setOptions({transition:u})}relegate(){const l=this.getStack();return l?l.relegate(this):!1}resetSkewAndRotation(){const{visualElement:l}=this.options;if(!l)return;let u=!1;const{latestValues:d}=l;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(u=!0),!u)return;const f={};d.z&&u1("z",l,f,this.animationValues);for(let m=0;m<l1.length;m++)u1(`rotate${l1[m]}`,l,f,this.animationValues),u1(`skew${l1[m]}`,l,f,this.animationValues);l.render();for(const m in f)l.setStaticValue(m,f[m]),this.animationValues&&(this.animationValues[m]=f[m]);l.scheduleRender()}applyProjectionStyles(l,u){if(!this.instance||this.isSVG)return;if(!this.isVisible){l.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,l.visibility="",l.opacity="",l.pointerEvents=$h(u==null?void 0:u.pointerEvents)||"",l.transform=d?d(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(l.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,l.pointerEvents=$h(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!Za(this.latestValues)&&(l.transform=d?d({},""):"none",this.hasProjected=!1);return}l.visibility="";const m=f.animationValues||f.latestValues;this.applyTransformsToTarget();let p=yU(this.projectionDeltaWithTransform,this.treeScale,m);d&&(p=d(m,p)),l.transform=p;const{x:g,y}=this.projectionDelta;l.transformOrigin=`${g.origin*100}% ${y.origin*100}% 0`,f.animationValues?l.opacity=f===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:l.opacity=f===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const E in ay){if(m[E]===void 0)continue;const{correct:S,applyTo:A,isCSSVariable:w}=ay[E],_=p==="none"?m[E]:S(m[E],f);if(A){const k=A.length;for(let R=0;R<k;R++)l[A[R]]=_}else w?this.options.visualElement.renderState.vars[E]=_:l[E]=_}this.options.layoutId&&(l.pointerEvents=f===this?$h(u==null?void 0:u.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(l=>{var u;return(u=l.currentAnimation)==null?void 0:u.stop()}),this.root.nodes.forEach(kw),this.root.sharedNodes.clear()}}}function RU(e){e.updateLayout()}function OU(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:o}=e.options,l=t.source!==e.layout.source;o==="size"?ki(p=>{const g=l?t.measuredBox[p]:t.layoutBox[p],y=rr(g);g.min=r[p].min,g.max=g.min+y}):oR(o,t.layoutBox,r)&&ki(p=>{const g=l?t.measuredBox[p]:t.layoutBox[p],y=rr(r[p]);g.max=g.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+y)});const u=Il();zc(u,r,t.layoutBox);const d=Il();l?zc(d,e.applyTransform(s,!0),t.measuredBox):zc(d,r,t.layoutBox);const f=!tR(u);let m=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:g,layout:y}=p;if(g&&y){const E=vn();fm(E,t.layoutBox,g.layoutBox);const S=vn();fm(S,r,y.layoutBox),nR(E,S)||(m=!0),p.options.layoutRoot&&(e.relativeTarget=S,e.relativeTargetOrigin=E,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:d,layoutDelta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:m})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function DU(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function MU(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function IU(e){e.clearSnapshot()}function kw(e){e.clearMeasurements()}function Nw(e){e.isLayoutDirty=!1}function LU(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Rw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function PU(e){e.resolveTargetDelta()}function jU(e){e.calcProjection()}function BU(e){e.resetSkewAndRotation()}function UU(e){e.removeLeadSnapshot()}function Ow(e,t,n){e.translate=Qt(t.translate,0,n),e.scale=Qt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Dw(e,t,n,r){e.min=Qt(t.min,n.min,r),e.max=Qt(t.max,n.max,r)}function FU(e,t,n,r){Dw(e.x,t.x,n.x,r),Dw(e.y,t.y,n.y,r)}function HU(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const zU={duration:.45,ease:[.4,0,.1,1]},Mw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Iw=Mw("applewebkit/")&&!Mw("chrome/")?Math.round:Wr;function Lw(e){e.min=Iw(e.min),e.max=Iw(e.max)}function VU(e){Lw(e.x),Lw(e.y)}function oR(e,t,n){return e==="position"||e==="preserve-aspect"&&!dU(Sw(t),Sw(n),.2)}function qU(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const $U=aR({attachResizeListener:(e,t)=>uf(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),c1={current:void 0},lR=aR({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!c1.current){const e=new $U({});e.mount(window),e.setOptions({layoutScroll:!0}),c1.current=e}return c1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),cf=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Pw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function YU(...e){return t=>{let n=!1;const r=e.map(s=>{const o=Pw(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():Pw(e[s],null)}}}}function GU(...e){return v.useCallback(YU(...e),e)}class XU extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=ny(r)&&r.offsetWidth||0,o=ny(r)&&r.offsetHeight||0,l=this.props.sizeRef.current;l.height=n.offsetHeight||0,l.width=n.offsetWidth||0,l.top=n.offsetTop,l.left=n.offsetLeft,l.right=s-l.width-l.left,l.bottom=o-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function KU({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:o}){var g;const l=v.useId(),u=v.useRef(null),d=v.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:f}=v.useContext(cf),m=((g=e.props)==null?void 0:g.ref)??(e==null?void 0:e.ref),p=GU(u,m);return v.useInsertionEffect(()=>{const{width:y,height:E,top:S,left:A,right:w,bottom:_}=d.current;if(t||o===!1||!u.current||!y||!E)return;const k=n==="left"?`left: ${A}`:`right: ${w}`,R=r==="bottom"?`bottom: ${_}`:`top: ${S}`;u.current.dataset.motionPopId=l;const M=document.createElement("style");f&&(M.nonce=f);const O=s??document.head;return O.appendChild(M),M.sheet&&M.sheet.insertRule(`
57
+ [data-motion-pop-id="${l}"] {
58
+ position: absolute !important;
59
+ width: ${y}px !important;
60
+ height: ${E}px !important;
61
+ ${k}px !important;
62
+ ${R}px !important;
63
+ }
64
+ `),()=>{O.contains(M)&&O.removeChild(M)}},[t]),b.jsx(XU,{isPresent:t,childRef:u,sizeRef:d,pop:o,children:o===!1?e:v.cloneElement(e,{ref:p})})}const QU=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:l,anchorX:u,anchorY:d,root:f})=>{const m=Lm(WU),p=v.useId();let g=!0,y=v.useMemo(()=>(g=!1,{id:p,initial:t,isPresent:n,custom:s,onExitComplete:E=>{m.set(E,!0);for(const S of m.values())if(!S)return;r&&r()},register:E=>(m.set(E,!1),()=>m.delete(E))}),[n,m,r]);return o&&g&&(y={...y}),v.useMemo(()=>{m.forEach((E,S)=>m.set(S,!1))},[n]),v.useEffect(()=>{!n&&!m.size&&r&&r()},[n]),e=b.jsx(KU,{pop:l==="popLayout",isPresent:n,anchorX:u,anchorY:d,root:f,children:e}),b.jsx(Pm.Provider,{value:y,children:e})};function WU(){return new Map}function uR(e=!0){const t=v.useContext(Pm);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=v.useId();v.useEffect(()=>{if(e)return s(o)},[e]);const l=v.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,l]:[!0]}const yh=e=>e.key||"";function jw(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const Sn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:l=!1,anchorX:u="left",anchorY:d="top",root:f})=>{const[m,p]=uR(l),g=v.useMemo(()=>jw(e),[e]),y=l&&!m?[]:g.map(yh),E=v.useRef(!0),S=v.useRef(g),A=Lm(()=>new Map),w=v.useRef(new Set),[_,k]=v.useState(g),[R,M]=v.useState(g);Fk(()=>{E.current=!1,S.current=g;for(let P=0;P<R.length;P++){const z=yh(R[P]);y.includes(z)?(A.delete(z),w.current.delete(z)):A.get(z)!==!0&&A.set(z,!1)}},[R,y.length,y.join("-")]);const O=[];if(g!==_){let P=[...g];for(let z=0;z<R.length;z++){const j=R[z],K=yh(j);y.includes(K)||(P.splice(z,0,j),O.push(j))}return o==="wait"&&O.length&&(P=O),M(jw(P)),k(g),null}const{forceRender:D}=v.useContext(nx);return b.jsx(b.Fragment,{children:R.map(P=>{const z=yh(P),j=l&&!m?!1:g===R||y.includes(z),K=()=>{if(w.current.has(z))return;if(w.current.add(z),A.has(z))A.set(z,!0);else return;let Y=!0;A.forEach(J=>{J||(Y=!1)}),Y&&(D==null||D(),M(S.current),l&&(p==null||p()),r&&r())};return b.jsx(QU,{isPresent:j,initial:!E.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:f,onExitComplete:j?void 0:K,anchorX:u,anchorY:d,children:P},z)})})},cR=v.createContext({strict:!1}),Bw={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Uw=!1;function ZU(){if(Uw)return;const e={};for(const t in Bw)e[t]={isEnabled:n=>Bw[t].some(r=>!!n[r])};UN(e),Uw=!0}function fR(){return ZU(),B7()}function JU(e){const t=fR();for(const n in e)t[n]={...t[n],...e[n]};UN(t)}const eF=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function dm(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||eF.has(e)}let dR=e=>!dm(e);function hR(e){typeof e=="function"&&(dR=t=>t.startsWith("on")?!dm(t):e(t))}try{hR(require("@emotion/is-prop-valid").default)}catch{}function tF(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(dR(s)||n===!0&&dm(s)||!t&&!dm(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Fw({children:e,isValidProp:t,...n}){t&&hR(t);const r=v.useContext(cf);n={...r,...n},n.transition=yx(n.transition,r.transition),n.isStatic=Lm(()=>n.isStatic);const s=v.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return b.jsx(cf.Provider,{value:s,children:e})}const Um=v.createContext({});function nF(e,t){if(Bm(e)){const{initial:n,animate:r}=e;return{initial:n===!1||lf(n)?n:void 0,animate:lf(r)?r:void 0}}return e.inherit!==!1?t:{}}function rF(e){const{initial:t,animate:n}=nF(e,v.useContext(Um));return v.useMemo(()=>({initial:t,animate:n}),[Hw(t),Hw(n)])}function Hw(e){return Array.isArray(e)?e.join(" "):e}const Ox=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mR(e,t,n){for(const r in t)!$n(t[r])&&!YN(r,n)&&(e[r]=t[r])}function iF({transformTemplate:e},t){return v.useMemo(()=>{const n=Ox();return Nx(n,t,e),Object.assign({},n.vars,n.style)},[t])}function sF(e,t){const n=e.style||{},r={};return mR(r,n,e),Object.assign(r,iF(e,t)),r}function aF(e,t){const n={},r=sF(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const pR=()=>({...Ox(),attrs:{}});function oF(e,t,n,r){const s=v.useMemo(()=>{const o=pR();return GN(o,t,KN(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};mR(o,e.style,e),s.style={...o,...s.style}}return s}const lF=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Dx(e){return typeof e!="string"||e.includes("-")?!1:!!(lF.indexOf(e)>-1||/[A-Z]/u.test(e))}function uF(e,t,n,{latestValues:r},s,o=!1,l){const d=(l??Dx(e)?oF:aF)(t,r,s,e),f=tF(t,typeof e=="string",o),m=e!==v.Fragment?{...f,...d,ref:n}:{},{children:p}=t,g=v.useMemo(()=>$n(p)?p.get():p,[p]);return v.createElement(e,{...m,children:g})}function cF({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:fF(n,r,s,e),renderState:t()}}function fF(e,t,n,r){const s={},o=r(e,{});for(const g in o)s[g]=$h(o[g]);let{initial:l,animate:u}=e;const d=Bm(e),f=jN(e);t&&f&&!d&&e.inherit!==!1&&(l===void 0&&(l=t.initial),u===void 0&&(u=t.animate));let m=n?n.initial===!1:!1;m=m||l===!1;const p=m?u:l;if(p&&typeof p!="boolean"&&!jm(p)){const g=Array.isArray(p)?p:[p];for(let y=0;y<g.length;y++){const E=Ex(e,g[y]);if(E){const{transitionEnd:S,transition:A,...w}=E;for(const _ in w){let k=w[_];if(Array.isArray(k)){const R=m?k.length-1:0;k=k[R]}k!==null&&(s[_]=k)}for(const _ in S)s[_]=S[_]}}}return s}const gR=e=>(t,n)=>{const r=v.useContext(Um),s=v.useContext(Pm),o=()=>cF(e,t,r,s);return n?o():Lm(o)},dF=gR({scrapeMotionValuesFromProps:Rx,createRenderState:Ox}),hF=gR({scrapeMotionValuesFromProps:QN,createRenderState:pR}),mF=Symbol.for("motionComponentSymbol");function pF(e,t,n){const r=v.useRef(n);v.useInsertionEffect(()=>{r.current=n});const s=v.useRef(null);return v.useCallback(o=>{var u;o&&((u=e.onMount)==null||u.call(e,o)),t&&(o?t.mount(o):t.unmount());const l=r.current;if(typeof l=="function")if(o){const d=l(o);typeof d=="function"&&(s.current=d)}else s.current?(s.current(),s.current=null):l(o);else l&&(l.current=o)},[t])}const bR=v.createContext({});function Rl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function gF(e,t,n,r,s,o){var k,R;const{visualElement:l}=v.useContext(Um),u=v.useContext(cR),d=v.useContext(Pm),f=v.useContext(cf),m=f.reducedMotion,p=f.skipAnimations,g=v.useRef(null),y=v.useRef(!1);r=r||u.renderer,!g.current&&r&&(g.current=r(e,{visualState:t,parent:l,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:m,skipAnimations:p,isSVG:o}),y.current&&g.current&&(g.current.manuallyAnimateOnMount=!0));const E=g.current,S=v.useContext(bR);E&&!E.projection&&s&&(E.type==="html"||E.type==="svg")&&bF(g.current,n,s,S);const A=v.useRef(!1);v.useInsertionEffect(()=>{E&&A.current&&E.update(n,d)});const w=n[CN],_=v.useRef(!!w&&!((k=window.MotionHandoffIsComplete)!=null&&k.call(window,w))&&((R=window.MotionHasOptimisedAnimation)==null?void 0:R.call(window,w)));return Fk(()=>{y.current=!0,E&&(A.current=!0,window.MotionIsMounted=!0,E.updateFeatures(),E.scheduleRenderMicrotask(),_.current&&E.animationState&&E.animationState.animateChanges())}),v.useEffect(()=>{E&&(!_.current&&E.animationState&&E.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{var M;(M=window.MotionHandoffMarkAsComplete)==null||M.call(window,w)}),_.current=!1),E.enteringChildren=void 0)}),E}function bF(e,t,n,r){const{layoutId:s,layout:o,drag:l,dragConstraints:u,layoutScroll:d,layoutRoot:f,layoutCrossfade:m}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:yR(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!l||u&&Rl(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:d,layoutRoot:f})}function yR(e){if(e)return e.options.allowProjection!==!1?e.projection:yR(e.parent)}function f1(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&JU(r);const o=n?n==="svg":Dx(e),l=o?hF:dF;function u(f,m){let p;const g={...v.useContext(cf),...f,layoutId:yF(f)},{isStatic:y}=g,E=rF(f),S=l(f,y);if(!y&&Uk){xF();const A=vF(g);p=A.MeasureLayout,E.visualElement=gF(e,S,g,s,A.ProjectionNode,o)}return b.jsxs(Um.Provider,{value:E,children:[p&&E.visualElement?b.jsx(p,{visualElement:E.visualElement,...g}):null,uF(e,f,pF(S,E.visualElement,m),S,y,t,o)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=v.forwardRef(u);return d[mF]=e,d}function yF({layoutId:e}){const t=v.useContext(nx).id;return t&&e!==void 0?t+"-"+e:e}function xF(e,t){v.useContext(cR).strict}function vF(e){const t=fR(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function EF(e,t){if(typeof Proxy>"u")return f1;const n=new Map,r=(o,l)=>f1(o,l,e,t),s=(o,l)=>r(o,l);return new Proxy(s,{get:(o,l)=>l==="create"?r:(n.has(l)||n.set(l,f1(l,void 0,e,t)),n.get(l))})}const TF=(e,t)=>t.isSVG??Dx(e)?new tU(t):new K7(t,{allowProjection:e!==v.Fragment});class SF extends Ca{constructor(t){super(t),t.animationState||(t.animationState=aU(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();jm(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let CF=0;class wF extends Ca{constructor(){super(...arguments),this.id=CF++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const AF={animation:{Feature:SF},exit:{Feature:wF}};function Of(e){return{point:{x:e.pageX,y:e.pageY}}}const _F=e=>t=>wx(t)&&e(t,Of(t));function Vc(e,t,n,r){return uf(e,t,_F(n),r)}const xR=({current:e})=>e?e.ownerDocument.defaultView:null,zw=(e,t)=>Math.abs(e-t);function kF(e,t){const n=zw(e.x,t.x),r=zw(e.y,t.y);return Math.sqrt(n**2+r**2)}const Vw=new Set(["auto","scroll"]);class vR{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:l=3,element:u}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=y=>{this.handleScroll(y.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=h1(this.lastMoveEventInfo,this.history),E=this.startEvent!==null,S=kF(y.offset,{x:0,y:0})>=this.distanceThreshold;if(!E&&!S)return;const{point:A}=y,{timestamp:w}=Un;this.history.push({...A,timestamp:w});const{onStart:_,onMove:k}=this.handlers;E||(_&&_(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,y)},this.handlePointerMove=(y,E)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=d1(E,this.transformPagePoint),Ut.update(this.updatePoint,!0)},this.handlePointerUp=(y,E)=>{this.end();const{onEnd:S,onSessionEnd:A,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=h1(y.type==="pointercancel"?this.lastMoveEventInfo:d1(E,this.transformPagePoint),this.history);this.startEvent&&S&&S(y,_),A&&A(y,_)},!wx(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=l,this.contextWindow=s||window;const d=Of(t),f=d1(d,this.transformPagePoint),{point:m}=f,{timestamp:p}=Un;this.history=[{...m,timestamp:p}];const{onSessionStart:g}=n;g&&g(t,h1(f,this.history)),this.removeListeners=kf(Vc(this.contextWindow,"pointermove",this.handlePointerMove),Vc(this.contextWindow,"pointerup",this.handlePointerUp),Vc(this.contextWindow,"pointercancel",this.handlePointerUp)),u&&this.startScrollTracking(u)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Vw.has(r.overflowX)||Vw.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-n.x,y:s.y-n.y};o.x===0&&o.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),Ut.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ba(this.updatePoint)}}function d1(e,t){return t?{point:t(e.point)}:e}function qw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function h1({point:e},t){return{point:e,delta:qw(e,ER(t)),offset:qw(e,NF(t)),velocity:RF(t,.1)}}function NF(e){return e[0]}function ER(e){return e[e.length-1]}function RF(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=ER(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>mi(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>mi(t)*2&&(r=e[1]);const o=Kr(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const l={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return l.x===1/0&&(l.x=0),l.y===1/0&&(l.y=0),l}function OF(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Qt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Qt(n,e,r.max):Math.min(e,n)),e}function $w(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function DF(e,{top:t,left:n,bottom:r,right:s}){return{x:$w(e.x,n,s),y:$w(e.y,t,r)}}function Yw(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function MF(e,t){return{x:Yw(e.x,t.x),y:Yw(e.y,t.y)}}function IF(e,t){let n=.5;const r=rr(e),s=rr(t);return s>r?n=sf(t.min,t.max-r,e.min):r>s&&(n=sf(e.min,e.max-s,t.min)),Fi(0,1,n)}function LF(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const oy=.35;function PF(e=oy){return e===!1?e=0:e===!0&&(e=oy),{x:Gw(e,"left","right"),y:Gw(e,"top","bottom")}}function Gw(e,t,n){return{min:Xw(e,t),max:Xw(e,n)}}function Xw(e,t){return typeof e=="number"?e:e[t]||0}const jF=new WeakMap;class BF{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=vn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=p=>{n&&this.snapToCursor(Of(p).point),this.stopAnimation()},l=(p,g)=>{const{drag:y,dragPropagation:E,onDragStart:S}=this.getProps();if(y&&!E&&(this.openDragLock&&this.openDragLock(),this.openDragLock=m7(y),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=g,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ki(w=>{let _=this.getAxisMotionValue(w).get()||0;if(Pi.test(_)){const{projection:k}=this.visualElement;if(k&&k.layout){const R=k.layout.layoutBox[w];R&&(_=rr(R)*(parseFloat(_)/100))}}this.originPoint[w]=_}),S&&Ut.update(()=>S(p,g),!1,!0),Jb(this.visualElement,"transform");const{animationState:A}=this.visualElement;A&&A.setActive("whileDrag",!0)},u=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g;const{dragPropagation:y,dragDirectionLock:E,onDirectionLock:S,onDrag:A}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:w}=g;if(E&&this.currentDirection===null){this.currentDirection=FF(w),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",g.point,w),this.updateAxis("y",g.point,w),this.visualElement.render(),A&&Ut.update(()=>A(p,g),!1,!0)},d=(p,g)=>{this.latestPointerEvent=p,this.latestPanInfo=g,this.stop(p,g),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new vR(t,{onSessionStart:o,onStart:l,onMove:u,onSessionEnd:d,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:r,contextWindow:xR(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!r)return;const{velocity:l}=s;this.startAnimation(l);const{onDragEnd:u}=this.getProps();u&&Ut.postRender(()=>u(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!xh(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let l=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(l=OF(l,this.constraints[t],this.elastic[t])),o.set(l)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,s=this.constraints;t&&Rl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=DF(r.layoutBox,t):this.constraints=!1,this.elastic=PF(n),s!==this.constraints&&!Rl(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&ki(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=LF(r.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Rl(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=V7(r,s.root,this.visualElement.getTransformPagePoint());let l=MF(s.layout.layoutBox,o);if(n){const u=n(F7(l));this.hasMutatedConstraints=!!u,u&&(l=HN(u))}return l}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:l,onDragTransitionEnd:u}=this.getProps(),d=this.constraints||{},f=ki(m=>{if(!xh(m,n,this.currentDirection))return;let p=d&&d[m]||{};l&&(p={min:0,max:0});const g=s?200:1e6,y=s?40:1e7,E={type:"inertia",velocity:r?t[m]:0,bounceStiffness:g,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...p};return this.startAxisValueAnimation(m,E)});return Promise.all(f).then(u)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Jb(this.visualElement,t),r.start(vx(t,r,0,n,this.visualElement,!1))}stopAnimation(){ki(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ki(n=>{const{drag:r}=this.getProps();if(!xh(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:l,max:u}=s.layout.layoutBox[n],d=o.get()||0;o.set(t[n]-Qt(l,u,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Rl(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ki(l=>{const u=this.getAxisMotionValue(l);if(u&&this.constraints!==!1){const d=u.get();s[l]=IF({min:d,max:d},this.constraints[l])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),ki(l=>{if(!xh(l,t,null))return;const u=this.getAxisMotionValue(l),{min:d,max:f}=this.constraints[l];u.set(Qt(d,f,s[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;jF.set(this.visualElement,this);const t=this.visualElement.current,n=Vc(t,"pointerdown",f=>{const{drag:m,dragListener:p=!0}=this.getProps(),g=f.target,y=g!==t&&v7(g);m&&p&&!y&&this.start(f)});let r;const s=()=>{const{dragConstraints:f}=this.getProps();Rl(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),r||(r=UF(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,l=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Ut.read(s);const u=uf(window,"resize",()=>this.scalePositionWithinConstraints()),d=o.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:m})=>{this.isDragging&&m&&(ki(p=>{const g=this.getAxisMotionValue(p);g&&(this.originPoint[p]+=f[p].translate,g.set(g.get()+f[p].translate))}),this.visualElement.render())}));return()=>{u(),n(),l(),d&&d(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:l=oy,dragMomentum:u=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:l,dragMomentum:u}}}function Kw(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function UF(e,t,n){const r=tw(e,Kw(n)),s=tw(t,Kw(n));return()=>{r(),s()}}function xh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function FF(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class HF extends Ca{constructor(t){super(t),this.removeGroupControls=Wr,this.removeListeners=Wr,this.controls=new BF(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Wr}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const m1=e=>(t,n)=>{e&&Ut.update(()=>e(t,n),!1,!0)};class zF extends Ca{constructor(){super(...arguments),this.removePointerDownListener=Wr}onPointerDown(t){this.session=new vR(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:xR(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:m1(t),onStart:m1(n),onMove:m1(r),onEnd:(o,l)=>{delete this.session,s&&Ut.postRender(()=>s(o,l))}}}mount(){this.removePointerDownListener=Vc(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let p1=!1;class VF extends v.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),p1&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Yh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,{projection:l}=r;return l&&(l.isPresent=o,t.layoutDependency!==n&&l.setOptions({...l.options,layoutDependency:n}),p1=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?l.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?l.promote():l.relegate()||Ut.postRender(()=>{const u=l.getStack();(!u||!u.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Cx.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;p1=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function TR(e){const[t,n]=uR(),r=v.useContext(nx);return b.jsx(VF,{...e,layoutGroup:r,switchLayoutGroup:v.useContext(bR),isPresent:t,safeToRemove:n})}const qF={pan:{Feature:zF},drag:{Feature:HF,ProjectionNode:lR,MeasureLayout:TR}};function Qw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&Ut.postRender(()=>o(t,Of(t)))}class $F extends Ca{mount(){const{current:t}=this.node;t&&(this.unmount=g7(t,(n,r)=>(Qw(this.node,r,"Start"),s=>Qw(this.node,s,"End"))))}unmount(){}}class YF extends Ca{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=kf(uf(this.node.current,"focus",()=>this.onFocus()),uf(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ww(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&Ut.postRender(()=>o(t,Of(t)))}class GF extends Ca{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=T7(t,(s,o)=>(Ww(this.node,o,"Start"),(l,{success:u})=>Ww(this.node,l,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const ly=new WeakMap,g1=new WeakMap,XF=e=>{const t=ly.get(e.target);t&&t(e)},KF=e=>{e.forEach(XF)};function QF({root:e,...t}){const n=e||document;g1.has(n)||g1.set(n,{});const r=g1.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(KF,{root:e,...t})),r[s]}function WF(e,t,n){const r=QF(t);return ly.set(e,n),r.observe(e),()=>{ly.delete(e),r.unobserve(e)}}const ZF={some:0,all:1};class JF extends Ca{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,l={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:ZF[s]},u=d=>{const{isIntersecting:f}=d;if(this.isInView===f||(this.isInView=f,o&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:m,onViewportLeave:p}=this.node.getProps(),g=f?m:p;g&&g(d)};return WF(this.node.current,l,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(eH(t,n))&&this.startObserver()}unmount(){}}function eH({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const tH={inView:{Feature:JF},tap:{Feature:GF},focus:{Feature:YF},hover:{Feature:$F}},nH={layout:{ProjectionNode:lR,MeasureLayout:TR}},rH={...AF,...tH,...qF,...nH},dt=EF(rH,TF);/**
65
+ * @license lucide-react v0.563.0 - ISC
66
+ *
67
+ * This source code is licensed under the ISC license.
68
+ * See the LICENSE file in the root directory of this source tree.
69
+ */const SR=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
70
+ * @license lucide-react v0.563.0 - ISC
71
+ *
72
+ * This source code is licensed under the ISC license.
73
+ * See the LICENSE file in the root directory of this source tree.
74
+ */const iH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
75
+ * @license lucide-react v0.563.0 - ISC
76
+ *
77
+ * This source code is licensed under the ISC license.
78
+ * See the LICENSE file in the root directory of this source tree.
79
+ */const sH=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
80
+ * @license lucide-react v0.563.0 - ISC
81
+ *
82
+ * This source code is licensed under the ISC license.
83
+ * See the LICENSE file in the root directory of this source tree.
84
+ */const Zw=e=>{const t=sH(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
85
+ * @license lucide-react v0.563.0 - ISC
86
+ *
87
+ * This source code is licensed under the ISC license.
88
+ * See the LICENSE file in the root directory of this source tree.
89
+ */var aH={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"};/**
90
+ * @license lucide-react v0.563.0 - ISC
91
+ *
92
+ * This source code is licensed under the ISC license.
93
+ * See the LICENSE file in the root directory of this source tree.
94
+ */const oH=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
95
+ * @license lucide-react v0.563.0 - ISC
96
+ *
97
+ * This source code is licensed under the ISC license.
98
+ * See the LICENSE file in the root directory of this source tree.
99
+ */const lH=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:l,...u},d)=>v.createElement("svg",{ref:d,...aH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:SR("lucide",s),...!o&&!oH(u)&&{"aria-hidden":"true"},...u},[...l.map(([f,m])=>v.createElement(f,m)),...Array.isArray(o)?o:[o]]));/**
100
+ * @license lucide-react v0.563.0 - ISC
101
+ *
102
+ * This source code is licensed under the ISC license.
103
+ * See the LICENSE file in the root directory of this source tree.
104
+ */const Ke=(e,t)=>{const n=v.forwardRef(({className:r,...s},o)=>v.createElement(lH,{ref:o,iconNode:t,className:SR(`lucide-${iH(Zw(e))}`,`lucide-${e}`,r),...s}));return n.displayName=Zw(e),n};/**
105
+ * @license lucide-react v0.563.0 - ISC
106
+ *
107
+ * This source code is licensed under the ISC license.
108
+ * See the LICENSE file in the root directory of this source tree.
109
+ */const uH=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],CR=Ke("arrow-down",uH);/**
110
+ * @license lucide-react v0.563.0 - ISC
111
+ *
112
+ * This source code is licensed under the ISC license.
113
+ * See the LICENSE file in the root directory of this source tree.
114
+ */const cH=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],fH=Ke("arrow-up-right",cH);/**
115
+ * @license lucide-react v0.563.0 - ISC
116
+ *
117
+ * This source code is licensed under the ISC license.
118
+ * See the LICENSE file in the root directory of this source tree.
119
+ */const dH=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],wR=Ke("arrow-up",dH);/**
120
+ * @license lucide-react v0.563.0 - ISC
121
+ *
122
+ * This source code is licensed under the ISC license.
123
+ * See the LICENSE file in the root directory of this source tree.
124
+ */const hH=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],mH=Ke("bot",hH);/**
125
+ * @license lucide-react v0.563.0 - ISC
126
+ *
127
+ * This source code is licensed under the ISC license.
128
+ * See the LICENSE file in the root directory of this source tree.
129
+ */const pH=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Qr=Ke("check",pH);/**
130
+ * @license lucide-react v0.563.0 - ISC
131
+ *
132
+ * This source code is licensed under the ISC license.
133
+ * See the LICENSE file in the root directory of this source tree.
134
+ */const gH=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Fm=Ke("chevron-down",gH);/**
135
+ * @license lucide-react v0.563.0 - ISC
136
+ *
137
+ * This source code is licensed under the ISC license.
138
+ * See the LICENSE file in the root directory of this source tree.
139
+ */const bH=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ff=Ke("chevron-right",bH);/**
140
+ * @license lucide-react v0.563.0 - ISC
141
+ *
142
+ * This source code is licensed under the ISC license.
143
+ * See the LICENSE file in the root directory of this source tree.
144
+ */const yH=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],xH=Ke("circle-check",yH);/**
145
+ * @license lucide-react v0.563.0 - ISC
146
+ *
147
+ * This source code is licensed under the ISC license.
148
+ * See the LICENSE file in the root directory of this source tree.
149
+ */const vH=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],EH=Ke("circle",vH);/**
150
+ * @license lucide-react v0.563.0 - ISC
151
+ *
152
+ * This source code is licensed under the ISC license.
153
+ * See the LICENSE file in the root directory of this source tree.
154
+ */const TH=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],SH=Ke("clipboard-list",TH);/**
155
+ * @license lucide-react v0.563.0 - ISC
156
+ *
157
+ * This source code is licensed under the ISC license.
158
+ * See the LICENSE file in the root directory of this source tree.
159
+ */const CH=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],wH=Ke("clock",CH);/**
160
+ * @license lucide-react v0.563.0 - ISC
161
+ *
162
+ * This source code is licensed under the ISC license.
163
+ * See the LICENSE file in the root directory of this source tree.
164
+ */const AH=[["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"}]],Mx=Ke("copy",AH);/**
165
+ * @license lucide-react v0.563.0 - ISC
166
+ *
167
+ * This source code is licensed under the ISC license.
168
+ * See the LICENSE file in the root directory of this source tree.
169
+ */const _H=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],kH=Ke("corner-down-left",_H);/**
170
+ * @license lucide-react v0.563.0 - ISC
171
+ *
172
+ * This source code is licensed under the ISC license.
173
+ * See the LICENSE file in the root directory of this source tree.
174
+ */const NH=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],RH=Ke("dollar-sign",NH);/**
175
+ * @license lucide-react v0.563.0 - ISC
176
+ *
177
+ * This source code is licensed under the ISC license.
178
+ * See the LICENSE file in the root directory of this source tree.
179
+ */const OH=[["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"}]],Jw=Ke("external-link",OH);/**
180
+ * @license lucide-react v0.563.0 - ISC
181
+ *
182
+ * This source code is licensed under the ISC license.
183
+ * See the LICENSE file in the root directory of this source tree.
184
+ */const DH=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],MH=Ke("eye-off",DH);/**
185
+ * @license lucide-react v0.563.0 - ISC
186
+ *
187
+ * This source code is licensed under the ISC license.
188
+ * See the LICENSE file in the root directory of this source tree.
189
+ */const IH=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],LH=Ke("eye",IH);/**
190
+ * @license lucide-react v0.563.0 - ISC
191
+ *
192
+ * This source code is licensed under the ISC license.
193
+ * See the LICENSE file in the root directory of this source tree.
194
+ */const PH=[["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"}]],jH=Ke("file-text",PH);/**
195
+ * @license lucide-react v0.563.0 - ISC
196
+ *
197
+ * This source code is licensed under the ISC license.
198
+ * See the LICENSE file in the root directory of this source tree.
199
+ */const BH=[["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"}]],UH=Ke("file",BH);/**
200
+ * @license lucide-react v0.563.0 - ISC
201
+ *
202
+ * This source code is licensed under the ISC license.
203
+ * See the LICENSE file in the root directory of this source tree.
204
+ */const FH=[["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"}]],AR=Ke("folder-open",FH);/**
205
+ * @license lucide-react v0.563.0 - ISC
206
+ *
207
+ * This source code is licensed under the ISC license.
208
+ * See the LICENSE file in the root directory of this source tree.
209
+ */const HH=[["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"}]],qc=Ke("folder",HH);/**
210
+ * @license lucide-react v0.563.0 - ISC
211
+ *
212
+ * This source code is licensed under the ISC license.
213
+ * See the LICENSE file in the root directory of this source tree.
214
+ */const zH=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],eA=Ke("git-branch",zH);/**
215
+ * @license lucide-react v0.563.0 - ISC
216
+ *
217
+ * This source code is licensed under the ISC license.
218
+ * See the LICENSE file in the root directory of this source tree.
219
+ */const VH=[["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"}]],qH=Ke("globe",VH);/**
220
+ * @license lucide-react v0.563.0 - ISC
221
+ *
222
+ * This source code is licensed under the ISC license.
223
+ * See the LICENSE file in the root directory of this source tree.
224
+ */const $H=[["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"}],["path",{d:"M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"auskq0"}]],YH=Ke("heart-pulse",$H);/**
225
+ * @license lucide-react v0.563.0 - ISC
226
+ *
227
+ * This source code is licensed under the ISC license.
228
+ * See the LICENSE file in the root directory of this source tree.
229
+ */const GH=[["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"}]],XH=Ke("layers",GH);/**
230
+ * @license lucide-react v0.563.0 - ISC
231
+ *
232
+ * This source code is licensed under the ISC license.
233
+ * See the LICENSE file in the root directory of this source tree.
234
+ */const KH=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],QH=Ke("list-todo",KH);/**
235
+ * @license lucide-react v0.563.0 - ISC
236
+ *
237
+ * This source code is licensed under the ISC license.
238
+ * See the LICENSE file in the root directory of this source tree.
239
+ */const WH=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],df=Ke("loader-circle",WH);/**
240
+ * @license lucide-react v0.563.0 - ISC
241
+ *
242
+ * This source code is licensed under the ISC license.
243
+ * See the LICENSE file in the root directory of this source tree.
244
+ */const ZH=[["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"}]],_R=Ke("message-square",ZH);/**
245
+ * @license lucide-react v0.563.0 - ISC
246
+ *
247
+ * This source code is licensed under the ISC license.
248
+ * See the LICENSE file in the root directory of this source tree.
249
+ */const JH=[["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"}]],ez=Ke("monitor",JH);/**
250
+ * @license lucide-react v0.563.0 - ISC
251
+ *
252
+ * This source code is licensed under the ISC license.
253
+ * See the LICENSE file in the root directory of this source tree.
254
+ */const tz=[["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"}]],nz=Ke("moon",tz);/**
255
+ * @license lucide-react v0.563.0 - ISC
256
+ *
257
+ * This source code is licensed under the ISC license.
258
+ * See the LICENSE file in the root directory of this source tree.
259
+ */const rz=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],iz=Ke("panel-left-close",rz);/**
260
+ * @license lucide-react v0.563.0 - ISC
261
+ *
262
+ * This source code is licensed under the ISC license.
263
+ * See the LICENSE file in the root directory of this source tree.
264
+ */const sz=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],tA=Ke("panel-left",sz);/**
265
+ * @license lucide-react v0.563.0 - ISC
266
+ *
267
+ * This source code is licensed under the ISC license.
268
+ * See the LICENSE file in the root directory of this source tree.
269
+ */const az=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],oz=Ke("plus",az);/**
270
+ * @license lucide-react v0.563.0 - ISC
271
+ *
272
+ * This source code is licensed under the ISC license.
273
+ * See the LICENSE file in the root directory of this source tree.
274
+ */const lz=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],uz=Ke("route",lz);/**
275
+ * @license lucide-react v0.563.0 - ISC
276
+ *
277
+ * This source code is licensed under the ISC license.
278
+ * See the LICENSE file in the root directory of this source tree.
279
+ */const cz=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],fz=Ke("settings",cz);/**
280
+ * @license lucide-react v0.563.0 - ISC
281
+ *
282
+ * This source code is licensed under the ISC license.
283
+ * See the LICENSE file in the root directory of this source tree.
284
+ */const dz=[["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:"m9 12 2 2 4-4",key:"dzmm74"}]],hz=Ke("shield-check",dz);/**
285
+ * @license lucide-react v0.563.0 - ISC
286
+ *
287
+ * This source code is licensed under the ISC license.
288
+ * See the LICENSE file in the root directory of this source tree.
289
+ */const mz=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],kR=Ke("shield-off",mz);/**
290
+ * @license lucide-react v0.563.0 - ISC
291
+ *
292
+ * This source code is licensed under the ISC license.
293
+ * See the LICENSE file in the root directory of this source tree.
294
+ */const pz=[["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"}]],Ix=Ke("shield",pz);/**
295
+ * @license lucide-react v0.563.0 - ISC
296
+ *
297
+ * This source code is licensed under the ISC license.
298
+ * See the LICENSE file in the root directory of this source tree.
299
+ */const gz=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],bz=Ke("square",gz);/**
300
+ * @license lucide-react v0.563.0 - ISC
301
+ *
302
+ * This source code is licensed under the ISC license.
303
+ * See the LICENSE file in the root directory of this source tree.
304
+ */const yz=[["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"}]],xz=Ke("sun",yz);/**
305
+ * @license lucide-react v0.563.0 - ISC
306
+ *
307
+ * This source code is licensed under the ISC license.
308
+ * See the LICENSE file in the root directory of this source tree.
309
+ */const vz=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Ez=Ke("terminal",vz);/**
310
+ * @license lucide-react v0.563.0 - ISC
311
+ *
312
+ * This source code is licensed under the ISC license.
313
+ * See the LICENSE file in the root directory of this source tree.
314
+ */const Tz=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],Sz=Ke("volume-2",Tz);/**
315
+ * @license lucide-react v0.563.0 - ISC
316
+ *
317
+ * This source code is licensed under the ISC license.
318
+ * See the LICENSE file in the root directory of this source tree.
319
+ */const Cz=[["path",{d:"M16 9a5 5 0 0 1 .95 2.293",key:"1fgyg8"}],["path",{d:"M19.364 5.636a9 9 0 0 1 1.889 9.96",key:"l3zxae"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"m7 7-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11",key:"1gbwow"}],["path",{d:"M9.828 4.172A.686.686 0 0 1 11 4.657v.686",key:"s2je0y"}]],wz=Ke("volume-off",Cz);/**
320
+ * @license lucide-react v0.563.0 - ISC
321
+ *
322
+ * This source code is licensed under the ISC license.
323
+ * See the LICENSE file in the root directory of this source tree.
324
+ */const Az=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Df=Ke("x",Az);function nA({sessionId:e}){return null}function Ne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function rA(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Mf(...e){return t=>{let n=!1;const r=e.map(s=>{const o=rA(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():rA(e[s],null)}}}}function _t(...e){return v.useCallback(Mf(...e),e)}function _z(e,t){const n=v.createContext(t),r=o=>{const{children:l,...u}=o,d=v.useMemo(()=>u,Object.values(u));return b.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function s(o){const l=v.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,s]}function Vi(e,t=[]){let n=[];function r(o,l){const u=v.createContext(l),d=n.length;n=[...n,l];const f=p=>{var w;const{scope:g,children:y,...E}=p,S=((w=g==null?void 0:g[e])==null?void 0:w[d])||u,A=v.useMemo(()=>E,Object.values(E));return b.jsx(S.Provider,{value:A,children:y})};f.displayName=o+"Provider";function m(p,g){var S;const y=((S=g==null?void 0:g[e])==null?void 0:S[d])||u,E=v.useContext(y);if(E)return E;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${o}\``)}return[f,m]}const s=()=>{const o=n.map(l=>v.createContext(l));return function(u){const d=(u==null?void 0:u[e])||o;return v.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return s.scopeName=e,[r,kz(s,...t)]}function kz(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(o)[`__scope${f}`];return{...u,...p}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Gn=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},Nz=Yy[" useId ".trim().toString()]||(()=>{}),Rz=0;function ji(e){const[t,n]=v.useState(Nz());return Gn(()=>{n(r=>r??String(Rz++))},[e]),t?`radix-${t}`:""}var Oz=Yy[" useInsertionEffect ".trim().toString()]||Gn;function xa({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,o,l]=Dz({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:s;{const m=v.useRef(e!==void 0);v.useEffect(()=>{const p=m.current;p!==u&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${u?"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.`),m.current=u},[u,r])}const f=v.useCallback(m=>{var p;if(u){const g=Mz(m)?m(e):m;g!==e&&((p=l.current)==null||p.call(l,g))}else o(m)},[u,e,o,l]);return[d,f]}function Dz({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),s=v.useRef(n),o=v.useRef(t);return Oz(()=>{o.current=t},[t]),v.useEffect(()=>{var l;s.current!==n&&((l=o.current)==null||l.call(o,n),s.current=n)},[n,s]),[n,r,o]}function Mz(e){return typeof e=="function"}var ko=W3();const Iz=Ao(ko);function iu(e){const t=Lz(e),n=v.forwardRef((r,s)=>{const{children:o,...l}=r,u=v.Children.toArray(o),d=u.find(jz);if(d){const f=d.props.children,m=u.map(p=>p===d?v.Children.count(f)>1?v.Children.only(null):v.isValidElement(f)?f.props.children:null:p);return b.jsx(t,{...l,ref:s,children:v.isValidElement(f)?v.cloneElement(f,void 0,m):null})}return b.jsx(t,{...l,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}function Lz(e){const t=v.forwardRef((n,r)=>{const{children:s,...o}=n;if(v.isValidElement(s)){const l=Uz(s),u=Bz(o,s.props);return s.type!==v.Fragment&&(u.ref=r?Mf(r,l):l),v.cloneElement(s,u)}return v.Children.count(s)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pz=Symbol("radix.slottable");function jz(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pz}function Bz(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...u)=>{const d=o(...u);return s(...u),d}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function Uz(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Fz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tt=Fz.reduce((e,t)=>{const n=iu(`Primitive.${t}`),r=v.forwardRef((s,o)=>{const{asChild:l,...u}=s,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(d,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function NR(e,t){e&&ko.flushSync(()=>e.dispatchEvent(t))}function Hi(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Hz(e,t=globalThis==null?void 0:globalThis.document){const n=Hi(e);v.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var zz="DismissableLayer",uy="dismissableLayer.update",Vz="dismissableLayer.pointerDownOutside",qz="dismissableLayer.focusOutside",iA,RR=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),If=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:l,onDismiss:u,...d}=e,f=v.useContext(RR),[m,p]=v.useState(null),g=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=v.useState({}),E=_t(t,D=>p(D)),S=Array.from(f.layers),[A]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=S.indexOf(A),_=m?S.indexOf(m):-1,k=f.layersWithOutsidePointerEventsDisabled.size>0,R=_>=w,M=Gz(D=>{const P=D.target,z=[...f.branches].some(j=>j.contains(P));!R||z||(s==null||s(D),l==null||l(D),D.defaultPrevented||u==null||u())},g),O=Xz(D=>{const P=D.target;[...f.branches].some(j=>j.contains(P))||(o==null||o(D),l==null||l(D),D.defaultPrevented||u==null||u())},g);return Hz(D=>{_===f.layers.size-1&&(r==null||r(D),!D.defaultPrevented&&u&&(D.preventDefault(),u()))},g),v.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(iA=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),sA(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=iA)}},[m,g,n,f]),v.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),sA())},[m,f]),v.useEffect(()=>{const D=()=>y({});return document.addEventListener(uy,D),()=>document.removeEventListener(uy,D)},[]),b.jsx(tt.div,{...d,ref:E,style:{pointerEvents:k?R?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,M.onPointerDownCapture)})});If.displayName=zz;var $z="DismissableLayerBranch",Yz=v.forwardRef((e,t)=>{const n=v.useContext(RR),r=v.useRef(null),s=_t(t,r);return v.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),b.jsx(tt.div,{...e,ref:s})});Yz.displayName=$z;function Gz(e,t=globalThis==null?void 0:globalThis.document){const n=Hi(e),r=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const o=u=>{if(u.target&&!r.current){let d=function(){OR(Vz,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=d,t.addEventListener("click",s.current,{once:!0})):d()}else t.removeEventListener("click",s.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Xz(e,t=globalThis==null?void 0:globalThis.document){const n=Hi(e),r=v.useRef(!1);return v.useEffect(()=>{const s=o=>{o.target&&!r.current&&OR(qz,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function sA(){const e=new CustomEvent(uy);document.dispatchEvent(e)}function OR(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?NR(s,o):s.dispatchEvent(o)}var b1="focusScope.autoFocusOnMount",y1="focusScope.autoFocusOnUnmount",aA={bubbles:!1,cancelable:!0},Kz="FocusScope",Hm=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...l}=e,[u,d]=v.useState(null),f=Hi(s),m=Hi(o),p=v.useRef(null),g=_t(t,S=>d(S)),y=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let S=function(k){if(y.paused||!u)return;const R=k.target;u.contains(R)?p.current=R:ea(p.current,{select:!0})},A=function(k){if(y.paused||!u)return;const R=k.relatedTarget;R!==null&&(u.contains(R)||ea(p.current,{select:!0}))},w=function(k){if(document.activeElement===document.body)for(const M of k)M.removedNodes.length>0&&ea(u)};document.addEventListener("focusin",S),document.addEventListener("focusout",A);const _=new MutationObserver(w);return u&&_.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",A),_.disconnect()}}},[r,u,y.paused]),v.useEffect(()=>{if(u){lA.add(y);const S=document.activeElement;if(!u.contains(S)){const w=new CustomEvent(b1,aA);u.addEventListener(b1,f),u.dispatchEvent(w),w.defaultPrevented||(Qz(tV(DR(u)),{select:!0}),document.activeElement===S&&ea(u))}return()=>{u.removeEventListener(b1,f),setTimeout(()=>{const w=new CustomEvent(y1,aA);u.addEventListener(y1,m),u.dispatchEvent(w),w.defaultPrevented||ea(S??document.body,{select:!0}),u.removeEventListener(y1,m),lA.remove(y)},0)}}},[u,f,m,y]);const E=v.useCallback(S=>{if(!n&&!r||y.paused)return;const A=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,w=document.activeElement;if(A&&w){const _=S.currentTarget,[k,R]=Wz(_);k&&R?!S.shiftKey&&w===R?(S.preventDefault(),n&&ea(k,{select:!0})):S.shiftKey&&w===k&&(S.preventDefault(),n&&ea(R,{select:!0})):w===_&&S.preventDefault()}},[n,r,y.paused]);return b.jsx(tt.div,{tabIndex:-1,...l,ref:g,onKeyDown:E})});Hm.displayName=Kz;function Qz(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ea(r,{select:t}),document.activeElement!==n)return}function Wz(e){const t=DR(e),n=oA(t,e),r=oA(t.reverse(),e);return[n,r]}function DR(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oA(e,t){for(const n of e)if(!Zz(n,{upTo:t}))return n}function Zz(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 Jz(e){return e instanceof HTMLInputElement&&"select"in e}function ea(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Jz(e)&&t&&e.select()}}var lA=eV();function eV(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=uA(e,t),e.unshift(t)},remove(t){var n;e=uA(e,t),(n=e[0])==null||n.resume()}}}function uA(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function tV(e){return e.filter(t=>t.tagName!=="A")}var nV="Portal",Lf=v.forwardRef((e,t)=>{var u;const{container:n,...r}=e,[s,o]=v.useState(!1);Gn(()=>o(!0),[]);const l=n||s&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return l?Iz.createPortal(b.jsx(tt.div,{...r,ref:t}),l):null});Lf.displayName=nV;function rV(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var xi=e=>{const{present:t,children:n}=e,r=iV(t),s=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=_t(r.ref,sV(s));return typeof n=="function"||r.isPresent?v.cloneElement(s,{ref:o}):null};xi.displayName="Presence";function iV(e){const[t,n]=v.useState(),r=v.useRef(null),s=v.useRef(e),o=v.useRef("none"),l=e?"mounted":"unmounted",[u,d]=rV(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const f=vh(r.current);o.current=u==="mounted"?f:"none"},[u]),Gn(()=>{const f=r.current,m=s.current;if(m!==e){const g=o.current,y=vh(f);e?d("MOUNT"):y==="none"||(f==null?void 0:f.display)==="none"?d("UNMOUNT"):d(m&&g!==y?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,d]),Gn(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,p=y=>{const S=vh(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&S&&(d("ANIMATION_END"),!s.current)){const A=t.style.animationFillMode;t.style.animationFillMode="forwards",f=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=A)})}},g=y=>{y.target===t&&(o.current=vh(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:v.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function vh(e){return(e==null?void 0:e.animationName)||"none"}function sV(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var x1=0;function Lx(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??cA()),document.body.insertAdjacentElement("beforeend",e[1]??cA()),x1++,()=>{x1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),x1--}},[])}function cA(){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 Ii=function(){return Ii=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ii.apply(this,arguments)};function MR(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function aV(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Gh="right-scroll-bar-position",Xh="width-before-scroll-bar",oV="with-scroll-bars-hidden",lV="--removed-body-scroll-bar-size";function v1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function uV(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var cV=typeof window<"u"?v.useLayoutEffect:v.useEffect,fA=new WeakMap;function fV(e,t){var n=uV(null,function(r){return e.forEach(function(s){return v1(s,r)})});return cV(function(){var r=fA.get(n);if(r){var s=new Set(r),o=new Set(e),l=n.current;s.forEach(function(u){o.has(u)||v1(u,null)}),o.forEach(function(u){s.has(u)||v1(u,l)})}fA.set(n,e)},[e]),n}function dV(e){return e}function hV(e,t){t===void 0&&(t=dV);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(u){return o(u)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(o),l=n}var d=function(){var m=l;l=[],m.forEach(o)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(m){l.push(m),f()},filter:function(m){return l=l.filter(m),n}}}};return s}function mV(e){e===void 0&&(e={});var t=hV(null);return t.options=Ii({async:!0,ssr:!1},e),t}var IR=function(e){var t=e.sideCar,n=MR(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Ii({},n))};IR.isSideCarExport=!0;function pV(e,t){return e.useMedium(t),IR}var LR=mV(),E1=function(){},zm=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:E1,onWheelCapture:E1,onTouchMoveCapture:E1}),s=r[0],o=r[1],l=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,m=e.enabled,p=e.shards,g=e.sideCar,y=e.noRelative,E=e.noIsolation,S=e.inert,A=e.allowPinchZoom,w=e.as,_=w===void 0?"div":w,k=e.gapMode,R=MR(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=g,O=fV([n,t]),D=Ii(Ii({},R),s);return v.createElement(v.Fragment,null,m&&v.createElement(M,{sideCar:LR,removeScrollBar:f,shards:p,noRelative:y,noIsolation:E,inert:S,setCallbacks:o,allowPinchZoom:!!A,lockRef:n,gapMode:k}),l?v.cloneElement(v.Children.only(u),Ii(Ii({},D),{ref:O})):v.createElement(_,Ii({},D,{className:d,ref:O}),u))});zm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};zm.classNames={fullWidth:Xh,zeroRight:Gh};var gV=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bV(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=gV();return t&&e.setAttribute("nonce",t),e}function yV(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xV(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vV=function(){var e=0,t=null;return{add:function(n){e==0&&(t=bV())&&(yV(t,n),xV(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},EV=function(){var e=vV();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},PR=function(){var e=EV(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},TV={left:0,top:0,right:0,gap:0},T1=function(e){return parseInt(e||"",10)||0},SV=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[T1(n),T1(r),T1(s)]},CV=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return TV;var t=SV(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},wV=PR(),Hl="data-scroll-locked",AV=function(e,t,n,r){var s=e.left,o=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
325
+ .`.concat(oV,` {
326
+ overflow: hidden `).concat(r,`;
327
+ padding-right: `).concat(u,"px ").concat(r,`;
328
+ }
329
+ body[`).concat(Hl,`] {
330
+ overflow: hidden `).concat(r,`;
331
+ overscroll-behavior: contain;
332
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
333
+ padding-left: `.concat(s,`px;
334
+ padding-top: `).concat(o,`px;
335
+ padding-right: `).concat(l,`px;
336
+ margin-left:0;
337
+ margin-top:0;
338
+ margin-right: `).concat(u,"px ").concat(r,`;
339
+ `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
340
+ }
341
+
342
+ .`).concat(Gh,` {
343
+ right: `).concat(u,"px ").concat(r,`;
344
+ }
345
+
346
+ .`).concat(Xh,` {
347
+ margin-right: `).concat(u,"px ").concat(r,`;
348
+ }
349
+
350
+ .`).concat(Gh," .").concat(Gh,` {
351
+ right: 0 `).concat(r,`;
352
+ }
353
+
354
+ .`).concat(Xh," .").concat(Xh,` {
355
+ margin-right: 0 `).concat(r,`;
356
+ }
357
+
358
+ body[`).concat(Hl,`] {
359
+ `).concat(lV,": ").concat(u,`px;
360
+ }
361
+ `)},dA=function(){var e=parseInt(document.body.getAttribute(Hl)||"0",10);return isFinite(e)?e:0},_V=function(){v.useEffect(function(){return document.body.setAttribute(Hl,(dA()+1).toString()),function(){var e=dA()-1;e<=0?document.body.removeAttribute(Hl):document.body.setAttribute(Hl,e.toString())}},[])},kV=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;_V();var o=v.useMemo(function(){return CV(s)},[s]);return v.createElement(wV,{styles:AV(o,!t,s,n?"":"!important")})},cy=!1;if(typeof window<"u")try{var Eh=Object.defineProperty({},"passive",{get:function(){return cy=!0,!0}});window.addEventListener("test",Eh,Eh),window.removeEventListener("test",Eh,Eh)}catch{cy=!1}var Tl=cy?{passive:!1}:!1,NV=function(e){return e.tagName==="TEXTAREA"},jR=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!NV(e)&&n[t]==="visible")},RV=function(e){return jR(e,"overflowY")},OV=function(e){return jR(e,"overflowX")},hA=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=BR(e,r);if(s){var o=UR(e,r),l=o[1],u=o[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},DV=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},MV=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},BR=function(e,t){return e==="v"?RV(t):OV(t)},UR=function(e,t){return e==="v"?DV(t):MV(t)},IV=function(e,t){return e==="h"&&t==="rtl"?-1:1},LV=function(e,t,n,r,s){var o=IV(e,window.getComputedStyle(t).direction),l=o*r,u=n.target,d=t.contains(u),f=!1,m=l>0,p=0,g=0;do{if(!u)break;var y=UR(e,u),E=y[0],S=y[1],A=y[2],w=S-A-o*E;(E||w)&&BR(e,u)&&(p+=w,g+=E);var _=u.parentNode;u=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(m&&Math.abs(p)<1||!m&&Math.abs(g)<1)&&(f=!0),f},Th=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},mA=function(e){return[e.deltaX,e.deltaY]},pA=function(e){return e&&"current"in e?e.current:e},PV=function(e,t){return e[0]===t[0]&&e[1]===t[1]},jV=function(e){return`
362
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
363
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
364
+ `)},BV=0,Sl=[];function UV(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),s=v.useState(BV++)[0],o=v.useState(PR)[0],l=v.useRef(e);v.useEffect(function(){l.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var S=aV([e.lockRef.current],(e.shards||[]).map(pA),!0).filter(Boolean);return S.forEach(function(A){return A.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),S.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var u=v.useCallback(function(S,A){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var w=Th(S),_=n.current,k="deltaX"in S?S.deltaX:_[0]-w[0],R="deltaY"in S?S.deltaY:_[1]-w[1],M,O=S.target,D=Math.abs(k)>Math.abs(R)?"h":"v";if("touches"in S&&D==="h"&&O.type==="range")return!1;var P=window.getSelection(),z=P&&P.anchorNode,j=z?z===O||z.contains(O):!1;if(j)return!1;var K=hA(D,O);if(!K)return!0;if(K?M=D:(M=D==="v"?"h":"v",K=hA(D,O)),!K)return!1;if(!r.current&&"changedTouches"in S&&(k||R)&&(r.current=M),!M)return!0;var Y=r.current||M;return LV(Y,A,S,Y==="h"?k:R)},[]),d=v.useCallback(function(S){var A=S;if(!(!Sl.length||Sl[Sl.length-1]!==o)){var w="deltaY"in A?mA(A):Th(A),_=t.current.filter(function(M){return M.name===A.type&&(M.target===A.target||A.target===M.shadowParent)&&PV(M.delta,w)})[0];if(_&&_.should){A.cancelable&&A.preventDefault();return}if(!_){var k=(l.current.shards||[]).map(pA).filter(Boolean).filter(function(M){return M.contains(A.target)}),R=k.length>0?u(A,k[0]):!l.current.noIsolation;R&&A.cancelable&&A.preventDefault()}}},[]),f=v.useCallback(function(S,A,w,_){var k={name:S,delta:A,target:w,should:_,shadowParent:FV(w)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(R){return R!==k})},1)},[]),m=v.useCallback(function(S){n.current=Th(S),r.current=void 0},[]),p=v.useCallback(function(S){f(S.type,mA(S),S.target,u(S,e.lockRef.current))},[]),g=v.useCallback(function(S){f(S.type,Th(S),S.target,u(S,e.lockRef.current))},[]);v.useEffect(function(){return Sl.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",d,Tl),document.addEventListener("touchmove",d,Tl),document.addEventListener("touchstart",m,Tl),function(){Sl=Sl.filter(function(S){return S!==o}),document.removeEventListener("wheel",d,Tl),document.removeEventListener("touchmove",d,Tl),document.removeEventListener("touchstart",m,Tl)}},[]);var y=e.removeScrollBar,E=e.inert;return v.createElement(v.Fragment,null,E?v.createElement(o,{styles:jV(s)}):null,y?v.createElement(kV,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function FV(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const HV=pV(LR,UV);var Vm=v.forwardRef(function(e,t){return v.createElement(zm,Ii({},e,{ref:t,sideCar:HV}))});Vm.classNames=zm.classNames;var zV=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Cl=new WeakMap,Sh=new WeakMap,Ch={},S1=0,FR=function(e){return e&&(e.host||FR(e.parentNode))},VV=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=FR(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},qV=function(e,t,n,r){var s=VV(t,Array.isArray(e)?e:[e]);Ch[n]||(Ch[n]=new WeakMap);var o=Ch[n],l=[],u=new Set,d=new Set(s),f=function(p){!p||u.has(p)||(u.add(p),f(p.parentNode))};s.forEach(f);var m=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(g){if(u.has(g))m(g);else try{var y=g.getAttribute(r),E=y!==null&&y!=="false",S=(Cl.get(g)||0)+1,A=(o.get(g)||0)+1;Cl.set(g,S),o.set(g,A),l.push(g),S===1&&E&&Sh.set(g,!0),A===1&&g.setAttribute(n,"true"),E||g.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",g,w)}})};return m(t),u.clear(),S1++,function(){l.forEach(function(p){var g=Cl.get(p)-1,y=o.get(p)-1;Cl.set(p,g),o.set(p,y),g||(Sh.has(p)||p.removeAttribute(r),Sh.delete(p)),y||p.removeAttribute(n)}),S1--,S1||(Cl=new WeakMap,Cl=new WeakMap,Sh=new WeakMap,Ch={})}},Px=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=zV(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),qV(r,s,n,"aria-hidden")):function(){return null}},qm="Dialog",[HR]=Vi(qm),[$V,vi]=HR(qm),zR=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:l=!0}=e,u=v.useRef(null),d=v.useRef(null),[f,m]=xa({prop:r,defaultProp:s??!1,onChange:o,caller:qm});return b.jsx($V,{scope:t,triggerRef:u,contentRef:d,contentId:ji(),titleId:ji(),descriptionId:ji(),open:f,onOpenChange:m,onOpenToggle:v.useCallback(()=>m(p=>!p),[m]),modal:l,children:n})};zR.displayName=qm;var VR="DialogTrigger",qR=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=vi(VR,n),o=_t(t,s.triggerRef);return b.jsx(tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Ux(s.open),...r,ref:o,onClick:Ne(e.onClick,s.onOpenToggle)})});qR.displayName=VR;var jx="DialogPortal",[YV,$R]=HR(jx,{forceMount:void 0}),YR=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=vi(jx,t);return b.jsx(YV,{scope:t,forceMount:n,children:v.Children.map(r,l=>b.jsx(xi,{present:n||o.open,children:b.jsx(Lf,{asChild:!0,container:s,children:l})}))})};YR.displayName=jx;var hm="DialogOverlay",GR=v.forwardRef((e,t)=>{const n=$R(hm,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=vi(hm,e.__scopeDialog);return o.modal?b.jsx(xi,{present:r||o.open,children:b.jsx(XV,{...s,ref:t})}):null});GR.displayName=hm;var GV=iu("DialogOverlay.RemoveScroll"),XV=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=vi(hm,n);return b.jsx(Vm,{as:GV,allowPinchZoom:!0,shards:[s.contentRef],children:b.jsx(tt.div,{"data-state":Ux(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),xo="DialogContent",XR=v.forwardRef((e,t)=>{const n=$R(xo,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=vi(xo,e.__scopeDialog);return b.jsx(xi,{present:r||o.open,children:o.modal?b.jsx(KV,{...s,ref:t}):b.jsx(QV,{...s,ref:t})})});XR.displayName=xo;var KV=v.forwardRef((e,t)=>{const n=vi(xo,e.__scopeDialog),r=v.useRef(null),s=_t(t,n.contentRef,r);return v.useEffect(()=>{const o=r.current;if(o)return Px(o)},[]),b.jsx(KR,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ne(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ne(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&o.preventDefault()}),onFocusOutside:Ne(e.onFocusOutside,o=>o.preventDefault())})}),QV=v.forwardRef((e,t)=>{const n=vi(xo,e.__scopeDialog),r=v.useRef(!1),s=v.useRef(!1);return b.jsx(KR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var d,f;(d=e.onInteractOutside)==null||d.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=o.target;((f=n.triggerRef.current)==null?void 0:f.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),KR=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...l}=e,u=vi(xo,n),d=v.useRef(null),f=_t(t,d);return Lx(),b.jsxs(b.Fragment,{children:[b.jsx(Hm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:b.jsx(If,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Ux(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(WV,{titleId:u.titleId}),b.jsx(JV,{contentRef:d,descriptionId:u.descriptionId})]})]})}),Bx="DialogTitle",QR=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=vi(Bx,n);return b.jsx(tt.h2,{id:s.titleId,...r,ref:t})});QR.displayName=Bx;var WR="DialogDescription",ZR=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=vi(WR,n);return b.jsx(tt.p,{id:s.descriptionId,...r,ref:t})});ZR.displayName=WR;var JR="DialogClose",eO=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=vi(JR,n);return b.jsx(tt.button,{type:"button",...r,ref:t,onClick:Ne(e.onClick,()=>s.onOpenChange(!1))})});eO.displayName=JR;function Ux(e){return e?"open":"closed"}var tO="DialogTitleWarning",[uue,nO]=_z(tO,{contentName:xo,titleName:Bx,docsSlug:"dialog"}),WV=({titleId:e})=>{const t=nO(tO),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
365
+
366
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
367
+
368
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ZV="DialogDescriptionWarning",JV=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${nO(ZV).contentName}}.`;return v.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},rO=zR,eq=qR,iO=YR,Fx=GR,Hx=XR,zx=QR,Vx=ZR,tq=eO;const nq=rO,rq=iO,sO=v.forwardRef(({className:e,...t},n)=>b.jsx(Fx,{ref:n,className:Ye("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",e),...t}));sO.displayName=Fx.displayName;const aO=v.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(rq,{children:[b.jsx(sO,{}),b.jsxs(Hx,{ref:r,className:Ye("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",e),...n,children:[t,b.jsxs(tq,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[b.jsx(Df,{className:"size-(--size-icon-md)"}),b.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));aO.displayName=Hx.displayName;function oO({className:e,...t}){return b.jsx("div",{className:Ye("flex flex-col space-y-1.5 text-center sm:text-left",e),...t})}oO.displayName="DialogHeader";const lO=v.forwardRef(({className:e,...t},n)=>b.jsx(zx,{ref:n,className:Ye("text-lg leading-none font-semibold tracking-tight",e),...t}));lO.displayName=zx.displayName;const uO=v.forwardRef(({className:e,...t},n)=>b.jsx(Vx,{ref:n,className:Ye("text-muted-foreground text-sm",e),...t}));uO.displayName=Vx.displayName;function iq(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const cO=Ce.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Pf=()=>{const e=Ce.useContext(cO);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};iq(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
369
+ [data-state=closed]
370
+ ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function sq(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function aq(){return qx(/^Mac/)}function oq(){return qx(/^iPhone/)}function gA(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function lq(){return qx(/^iPad/)||aq()&&navigator.maxTouchPoints>1}function fO(){return oq()||lq()}function qx(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const uq=24,cq=typeof window<"u"?v.useLayoutEffect:v.useEffect;function bA(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const C1=typeof document<"u"&&window.visualViewport;function yA(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function dO(e){for(yA(e)&&(e=e.parentElement);e&&!yA(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const fq=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let wh=0,w1;function dq(e={}){let{isDisabled:t}=e;cq(()=>{if(!t)return wh++,wh===1&&fO()&&(w1=hq()),()=>{wh--,wh===0&&(w1==null||w1())}},[t])}function hq(){let e,t=0,n=p=>{e=dO(p.target),!(e===document.documentElement&&e===document.body)&&(t=p.changedTouches[0].pageY)},r=p=>{if(!e||e===document.documentElement||e===document.body){p.preventDefault();return}let g=p.changedTouches[0].pageY,y=e.scrollTop,E=e.scrollHeight-e.clientHeight;E!==0&&((y<=0&&g>t||y>=E&&g<t)&&p.preventDefault(),t=g)},s=p=>{let g=p.target;fy(g)&&g!==document.activeElement&&(p.preventDefault(),g.style.transform="translateY(-2000px)",g.focus(),requestAnimationFrame(()=>{g.style.transform=""}))},o=p=>{let g=p.target;fy(g)&&(g.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{g.style.transform="",C1&&(C1.height<window.innerHeight?requestAnimationFrame(()=>{xA(g)}):C1.addEventListener("resize",()=>xA(g),{once:!0}))}))},l=()=>{window.scrollTo(0,0)},u=window.pageXOffset,d=window.pageYOffset,f=bA(mq(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let m=bA(Ec(document,"touchstart",n,{passive:!1,capture:!0}),Ec(document,"touchmove",r,{passive:!1,capture:!0}),Ec(document,"touchend",s,{passive:!1,capture:!0}),Ec(document,"focus",o,!0),Ec(window,"scroll",l));return()=>{f(),m(),window.scrollTo(u,d)}}function mq(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Ec(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function xA(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=dO(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,s=e.getBoundingClientRect().top,o=e.getBoundingClientRect().bottom;const l=n.getBoundingClientRect().bottom+uq;o>l&&(n.scrollTop+=s-r)}e=n.parentElement}}function fy(e){return e instanceof HTMLInputElement&&!fq.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function pq(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function gq(...e){return t=>e.forEach(n=>pq(n,t))}function hO(...e){return v.useCallback(gq(...e),e)}const mO=new WeakMap;function En(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([s,o])=>{if(s.startsWith("--")){e.style.setProperty(s,o);return}r[s]=e.style[s],e.style[s]=o}),!n&&mO.set(e,r)}function bq(e,t){if(!e||!(e instanceof HTMLElement))return;let n=mO.get(e);n&&(e.style[t]=n[t])}const pn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Ah(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let s=r.match(/^matrix3d\((.+)\)$/);return s?parseFloat(s[1].split(", ")[pn(t)?13:12]):(s=r.match(/^matrix\((.+)\)$/),s?parseFloat(s[1].split(", ")[pn(t)?5:4]):null)}function yq(e){return 8*(Math.log(e+1)-2)}function A1(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function xq(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const Kt={DURATION:.5,EASE:[.32,.72,0,1]},pO=.4,vq=.25,Eq=100,gO=8,Ka=16,dy=26,_1="vaul-dragging";function bO(e){const t=Ce.useRef(e);return Ce.useEffect(()=>{t.current=e}),Ce.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function Tq({defaultProp:e,onChange:t}){const n=Ce.useState(e),[r]=n,s=Ce.useRef(r),o=bO(t);return Ce.useEffect(()=>{s.current!==r&&(o(r),s.current=r)},[r,s,o]),n}function yO({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=Tq({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:r,u=bO(n),d=Ce.useCallback(f=>{if(o){const p=typeof f=="function"?f(e):f;p!==e&&u(p)}else s(f)},[o,e,s,u]);return[l,d]}function Sq({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:s,fadeFromIndex:o,onSnapPointChange:l,direction:u="bottom",container:d,snapToSequentialPoint:f}){const[m,p]=yO({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),[g,y]=Ce.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);Ce.useEffect(()=>{function D(){y({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]);const E=Ce.useMemo(()=>m===(n==null?void 0:n[n.length-1])||null,[n,m]),S=Ce.useMemo(()=>{var D;return(D=n==null?void 0:n.findIndex(P=>P===m))!=null?D:null},[n,m]),A=n&&n.length>0&&(o||o===0)&&!Number.isNaN(o)&&n[o]===m||!n,w=Ce.useMemo(()=>{const D=d?{width:d.getBoundingClientRect().width,height:d.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var P;return(P=n==null?void 0:n.map(z=>{const j=typeof z=="string";let K=0;if(j&&(K=parseInt(z,10)),pn(u)){const J=j?K:g?z*D.height:0;return g?u==="bottom"?D.height-J:-D.height+J:J}const Y=j?K:g?z*D.width:0;return g?u==="right"?D.width-Y:-D.width+Y:Y}))!=null?P:[]},[n,g,d]),_=Ce.useMemo(()=>S!==null?w==null?void 0:w[S]:null,[w,S]),k=Ce.useCallback(D=>{var P;const z=(P=w==null?void 0:w.findIndex(j=>j===D))!=null?P:null;l(z),En(r.current,{transition:`transform ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`,transform:pn(u)?`translate3d(0, ${D}px, 0)`:`translate3d(${D}px, 0, 0)`}),w&&z!==w.length-1&&o!==void 0&&z!==o&&z<o?En(s.current,{transition:`opacity ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`,opacity:"0"}):En(s.current,{transition:`opacity ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`,opacity:"1"}),p(n==null?void 0:n[Math.max(z,0)])},[r.current,n,w,o,s,p]);Ce.useEffect(()=>{if(m||e){var D;const P=(D=n==null?void 0:n.findIndex(z=>z===e||z===m))!=null?D:-1;w&&P!==-1&&typeof w[P]=="number"&&k(w[P])}},[m,e,n,w,k]);function R({draggedDistance:D,closeDrawer:P,velocity:z,dismissible:j}){if(o===void 0)return;const K=u==="bottom"||u==="right"?(_??0)-D:(_??0)+D,Y=S===o-1,J=S===0,te=D>0;if(Y&&En(s.current,{transition:`opacity ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`}),!f&&z>2&&!te){j?P():k(w[0]);return}if(!f&&z>2&&te&&w&&n){k(w[n.length-1]);return}const W=w==null?void 0:w.reduce((H,$)=>typeof H!="number"||typeof $!="number"?H:Math.abs($-K)<Math.abs(H-K)?$:H),I=pn(u)?window.innerHeight:window.innerWidth;if(z>pO&&Math.abs(D)<I*.4){const H=te?1:-1;if(H>0&&E&&n){k(w[n.length-1]);return}if(J&&H<0&&j&&P(),S===null)return;k(w[S+H]);return}k(W)}function M({draggedDistance:D}){if(_===null)return;const P=u==="bottom"||u==="right"?_-D:_+D;(u==="bottom"||u==="right")&&P<w[w.length-1]||(u==="top"||u==="left")&&P>w[w.length-1]||En(r.current,{transform:pn(u)?`translate3d(0, ${P}px, 0)`:`translate3d(${P}px, 0, 0)`})}function O(D,P){if(!n||typeof S!="number"||!w||o===void 0)return null;const z=S===o-1;if(S>=o&&P)return 0;if(z&&!P)return 1;if(!A&&!z)return null;const K=z?S+1:S-1,Y=z?w[K]-w[K-1]:w[K+1]-w[K],J=D/Math.abs(Y);return z?1-J:J}return{isLastSnapPoint:E,activeSnapPoint:m,shouldFade:A,getPercentageDragged:O,setActiveSnapPoint:p,activeSnapPointIndex:S,onRelease:R,onDrag:M,snapPointsOffset:w}}const Cq=()=>()=>{};function wq(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:s}=Pf(),o=Ce.useRef(null),l=v.useMemo(()=>document.body.style.backgroundColor,[]);function u(){return(window.innerWidth-dy)/window.innerWidth}Ce.useEffect(()=>{if(t&&n){o.current&&clearTimeout(o.current);const d=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!d)return;xq(r&&!s?A1(document.body,{background:"black"}):Cq,A1(d,{transformOrigin:pn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Kt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Kt.EASE.join(",")})`}));const f=A1(d,{borderRadius:`${gO}px`,overflow:"hidden",...pn(e)?{transform:`scale(${u()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${u()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{f(),o.current=window.setTimeout(()=>{l?document.body.style.background=l:document.body.style.removeProperty("background")},Kt.DURATION*1e3)}}},[t,n,l])}let Tc=null;function Aq({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:s,noBodyStyles:o}){const[l,u]=Ce.useState(()=>typeof window<"u"?window.location.href:""),d=Ce.useRef(0),f=Ce.useCallback(()=>{if(gA()&&Tc===null&&e&&!o){Tc={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:p,innerHeight:g}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-d.current}px`,left:`${-p}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const y=g-window.innerHeight;y&&d.current>=g&&(document.body.style.top=`${-(d.current+y)}px`)}),300)}},[e]),m=Ce.useCallback(()=>{if(gA()&&Tc!==null&&!o){const p=-parseInt(document.body.style.top,10),g=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Tc),window.requestAnimationFrame(()=>{if(s&&l!==window.location.href){u(window.location.href);return}window.scrollTo(g,p)}),Tc=null}},[l]);return Ce.useEffect(()=>{function p(){d.current=window.scrollY}return p(),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}},[]),Ce.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||m()}},[t,m]),Ce.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&f(),t||window.setTimeout(()=>{m()},500)):m())},[e,r,l,t,n,f,m]),{restorePositionSetting:m}}function _q({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:s,snapPoints:o,shouldScaleBackground:l=!1,setBackgroundColorOnScale:u=!0,closeThreshold:d=vq,scrollLockTimeout:f=Eq,dismissible:m=!0,handleOnly:p=!1,fadeFromIndex:g=o&&o.length-1,activeSnapPoint:y,setActiveSnapPoint:E,fixed:S,modal:A=!0,onClose:w,nested:_,noBodyStyles:k=!1,direction:R="bottom",defaultOpen:M=!1,disablePreventScroll:O=!0,snapToSequentialPoint:D=!1,preventScrollRestoration:P=!1,repositionInputs:z=!0,onAnimationEnd:j,container:K,autoFocus:Y=!1}){var J,te;const[W=!1,I]=yO({defaultProp:M,prop:e,onChange:Ae=>{t==null||t(Ae),!Ae&&!_&&Te(),setTimeout(()=>{j==null||j(Ae)},Kt.DURATION*1e3),Ae&&!A&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Ae||(document.body.style.pointerEvents="auto")}}),[H,$]=Ce.useState(!1),[ne,U]=Ce.useState(!1),[q,ie]=Ce.useState(!1),B=Ce.useRef(null),de=Ce.useRef(null),xe=Ce.useRef(null),Ee=Ce.useRef(null),he=Ce.useRef(null),we=Ce.useRef(!1),Se=Ce.useRef(null),Pe=Ce.useRef(0),_e=Ce.useRef(!1),Oe=Ce.useRef(!M),wt=Ce.useRef(0),Re=Ce.useRef(null),nn=Ce.useRef(((J=Re.current)==null?void 0:J.getBoundingClientRect().height)||0),Lt=Ce.useRef(((te=Re.current)==null?void 0:te.getBoundingClientRect().width)||0),rn=Ce.useRef(0),ei=Ce.useCallback(Ae=>{o&&Ae===ni.length-1&&(de.current=new Date)},[]),{activeSnapPoint:Fn,activeSnapPointIndex:Cn,setActiveSnapPoint:Ti,onRelease:ti,snapPointsOffset:ni,onDrag:rt,shouldFade:xt,getPercentageDragged:ce}=Sq({snapPoints:o,activeSnapPointProp:y,setActiveSnapPointProp:E,drawerRef:Re,fadeFromIndex:g,overlayRef:B,onSnapPointChange:ei,direction:R,container:K,snapToSequentialPoint:D});dq({isDisabled:!W||ne||!A||q||!H||!z||!O});const{restorePositionSetting:Te}=Aq({isOpen:W,modal:A,nested:_??!1,hasBeenOpened:H,preventScrollRestoration:P,noBodyStyles:k});function Ue(){return(window.innerWidth-dy)/window.innerWidth}function Ze(Ae){var Ve,mt;!m&&!o||Re.current&&!Re.current.contains(Ae.target)||(nn.current=((Ve=Re.current)==null?void 0:Ve.getBoundingClientRect().height)||0,Lt.current=((mt=Re.current)==null?void 0:mt.getBoundingClientRect().width)||0,U(!0),xe.current=new Date,fO()&&window.addEventListener("touchend",()=>we.current=!1,{once:!0}),Ae.target.setPointerCapture(Ae.pointerId),Pe.current=pn(R)?Ae.pageY:Ae.pageX)}function ht(Ae,Ve){var mt;let Qe=Ae;const st=(mt=window.getSelection())==null?void 0:mt.toString(),kt=Re.current?Ah(Re.current,R):null,Ft=new Date;if(Qe.tagName==="SELECT"||Qe.hasAttribute("data-vaul-no-drag")||Qe.closest("[data-vaul-no-drag]"))return!1;if(R==="right"||R==="left")return!0;if(de.current&&Ft.getTime()-de.current.getTime()<500)return!1;if(kt!==null&&(R==="bottom"?kt>0:kt<0))return!0;if(st&&st.length>0)return!1;if(he.current&&Ft.getTime()-he.current.getTime()<f&&kt===0||Ve)return he.current=Ft,!1;for(;Qe;){if(Qe.scrollHeight>Qe.clientHeight){if(Qe.scrollTop!==0)return he.current=new Date,!1;if(Qe.getAttribute("role")==="dialog")return!0}Qe=Qe.parentNode}return!0}function Dn(Ae){if(Re.current&&ne){const Ve=R==="bottom"||R==="right"?1:-1,mt=(Pe.current-(pn(R)?Ae.pageY:Ae.pageX))*Ve,Qe=mt>0,st=o&&!m&&!Qe;if(st&&Cn===0)return;const kt=Math.abs(mt),Ft=document.querySelector("[data-vaul-drawer-wrapper]"),Si=R==="bottom"||R==="top"?nn.current:Lt.current;let ar=kt/Si;const ri=ce(kt,Qe);if(ri!==null&&(ar=ri),st&&ar>=1||!we.current&&!ht(Ae.target,Qe))return;if(Re.current.classList.add(_1),we.current=!0,En(Re.current,{transition:"none"}),En(B.current,{transition:"none"}),o&&rt({draggedDistance:mt}),Qe&&!o){const Mr=yq(mt),Na=Math.min(Mr*-1,0)*Ve;En(Re.current,{transform:pn(R)?`translate3d(0, ${Na}px, 0)`:`translate3d(${Na}px, 0, 0)`});return}const or=1-ar;if((xt||g&&Cn===g-1)&&(r==null||r(Ae,ar),En(B.current,{opacity:`${or}`,transition:"none"},!0)),Ft&&B.current&&l){const Mr=Math.min(Ue()+ar*(1-Ue()),1),Na=8-ar*8,Au=Math.max(0,14-ar*14);En(Ft,{borderRadius:`${Na}px`,transform:pn(R)?`scale(${Mr}) translate3d(0, ${Au}px, 0)`:`scale(${Mr}) translate3d(${Au}px, 0, 0)`,transition:"none"},!0)}if(!o){const Mr=kt*Ve;En(Re.current,{transform:pn(R)?`translate3d(0, ${Mr}px, 0)`:`translate3d(${Mr}px, 0, 0)`})}}}Ce.useEffect(()=>{window.requestAnimationFrame(()=>{Oe.current=!0})},[]),Ce.useEffect(()=>{var Ae;function Ve(){if(!Re.current||!z)return;const mt=document.activeElement;if(fy(mt)||_e.current){var Qe;const st=((Qe=window.visualViewport)==null?void 0:Qe.height)||0,kt=window.innerHeight;let Ft=kt-st;const Si=Re.current.getBoundingClientRect().height||0,ar=Si>kt*.8;rn.current||(rn.current=Si);const ri=Re.current.getBoundingClientRect().top;if(Math.abs(wt.current-Ft)>60&&(_e.current=!_e.current),o&&o.length>0&&ni&&Cn){const or=ni[Cn]||0;Ft+=or}if(wt.current=Ft,Si>st||_e.current){const or=Re.current.getBoundingClientRect().height;let Mr=or;or>st&&(Mr=st-(ar?ri:dy)),S?Re.current.style.height=`${or-Math.max(Ft,0)}px`:Re.current.style.height=`${Math.max(Mr,st-ri)}px`}else sq()||(Re.current.style.height=`${rn.current}px`);o&&o.length>0&&!_e.current?Re.current.style.bottom="0px":Re.current.style.bottom=`${Math.max(Ft,0)}px`}}return(Ae=window.visualViewport)==null||Ae.addEventListener("resize",Ve),()=>{var mt;return(mt=window.visualViewport)==null?void 0:mt.removeEventListener("resize",Ve)}},[Cn,o,ni]);function Mn(Ae){qt(),w==null||w(),Ae||I(!1),setTimeout(()=>{o&&Ti(o[0])},Kt.DURATION*1e3)}function un(){if(!Re.current)return;const Ae=document.querySelector("[data-vaul-drawer-wrapper]"),Ve=Ah(Re.current,R);En(Re.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`}),En(B.current,{transition:`opacity ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`,opacity:"1"}),l&&Ve&&Ve>0&&W&&En(Ae,{borderRadius:`${gO}px`,overflow:"hidden",...pn(R)?{transform:`scale(${Ue()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Ue()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Kt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Kt.EASE.join(",")})`},!0)}function qt(){!ne||!Re.current||(Re.current.classList.remove(_1),we.current=!1,U(!1),Ee.current=new Date)}function wn(Ae){if(!ne||!Re.current)return;Re.current.classList.remove(_1),we.current=!1,U(!1),Ee.current=new Date;const Ve=Ah(Re.current,R);if(!Ae||!ht(Ae.target,!1)||!Ve||Number.isNaN(Ve)||xe.current===null)return;const mt=Ee.current.getTime()-xe.current.getTime(),Qe=Pe.current-(pn(R)?Ae.pageY:Ae.pageX),st=Math.abs(Qe)/mt;if(st>.05&&(ie(!0),setTimeout(()=>{ie(!1)},200)),o){ti({draggedDistance:Qe*(R==="bottom"||R==="right"?1:-1),closeDrawer:Mn,velocity:st,dismissible:m}),s==null||s(Ae,!0);return}if(R==="bottom"||R==="right"?Qe>0:Qe<0){un(),s==null||s(Ae,!0);return}if(st>pO){Mn(),s==null||s(Ae,!1);return}var kt;const Ft=Math.min((kt=Re.current.getBoundingClientRect().height)!=null?kt:0,window.innerHeight);var Si;const ar=Math.min((Si=Re.current.getBoundingClientRect().width)!=null?Si:0,window.innerWidth),ri=R==="left"||R==="right";if(Math.abs(Ve)>=(ri?ar:Ft)*d){Mn(),s==null||s(Ae,!1);return}s==null||s(Ae,!0),un()}Ce.useEffect(()=>(W&&(En(document.documentElement,{scrollBehavior:"auto"}),de.current=new Date),()=>{bq(document.documentElement,"scrollBehavior")}),[W]);function St(Ae){const Ve=Ae?(window.innerWidth-Ka)/window.innerWidth:1,mt=Ae?-Ka:0;Se.current&&window.clearTimeout(Se.current),En(Re.current,{transition:`transform ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`,transform:pn(R)?`scale(${Ve}) translate3d(0, ${mt}px, 0)`:`scale(${Ve}) translate3d(${mt}px, 0, 0)`}),!Ae&&Re.current&&(Se.current=setTimeout(()=>{const Qe=Ah(Re.current,R);En(Re.current,{transition:"none",transform:pn(R)?`translate3d(0, ${Qe}px, 0)`:`translate3d(${Qe}px, 0, 0)`})},500))}function ye(Ae,Ve){if(Ve<0)return;const mt=(window.innerWidth-Ka)/window.innerWidth,Qe=mt+Ve*(1-mt),st=-Ka+Ve*Ka;En(Re.current,{transform:pn(R)?`scale(${Qe}) translate3d(0, ${st}px, 0)`:`scale(${Qe}) translate3d(${st}px, 0, 0)`,transition:"none"})}function He(Ae,Ve){const mt=pn(R)?window.innerHeight:window.innerWidth,Qe=Ve?(mt-Ka)/mt:1,st=Ve?-Ka:0;Ve&&En(Re.current,{transition:`transform ${Kt.DURATION}s cubic-bezier(${Kt.EASE.join(",")})`,transform:pn(R)?`scale(${Qe}) translate3d(0, ${st}px, 0)`:`scale(${Qe}) translate3d(${st}px, 0, 0)`})}return Ce.useEffect(()=>{A||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[A]),Ce.createElement(rO,{defaultOpen:M,onOpenChange:Ae=>{!m&&!Ae||(Ae?$(!0):Mn(!0),I(Ae))},open:W},Ce.createElement(cO.Provider,{value:{activeSnapPoint:Fn,snapPoints:o,setActiveSnapPoint:Ti,drawerRef:Re,overlayRef:B,onOpenChange:t,onPress:Ze,onRelease:wn,onDrag:Dn,dismissible:m,shouldAnimate:Oe,handleOnly:p,isOpen:W,isDragging:ne,shouldFade:xt,closeDrawer:Mn,onNestedDrag:ye,onNestedOpenChange:St,onNestedRelease:He,keyboardIsOpen:_e,modal:A,snapPointsOffset:ni,activeSnapPointIndex:Cn,direction:R,shouldScaleBackground:l,setBackgroundColorOnScale:u,noBodyStyles:k,container:K,autoFocus:Y}},n))}const xO=Ce.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:s,shouldFade:o,isOpen:l,modal:u,shouldAnimate:d}=Pf(),f=hO(t,n),m=r&&r.length>0;if(!u)return null;const p=Ce.useCallback(g=>s(g),[s]);return Ce.createElement(Fx,{onMouseUp:p,ref:f,"data-vaul-overlay":"","data-vaul-snap-points":l&&m?"true":"false","data-vaul-snap-points-overlay":l&&o?"true":"false","data-vaul-animate":d!=null&&d.current?"true":"false",...e})});xO.displayName="Drawer.Overlay";const vO=Ce.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},s){const{drawerRef:o,onPress:l,onRelease:u,onDrag:d,keyboardIsOpen:f,snapPointsOffset:m,activeSnapPointIndex:p,modal:g,isOpen:y,direction:E,snapPoints:S,container:A,handleOnly:w,shouldAnimate:_,autoFocus:k}=Pf(),[R,M]=Ce.useState(!1),O=hO(s,o),D=Ce.useRef(null),P=Ce.useRef(null),z=Ce.useRef(!1),j=S&&S.length>0;wq();const K=(J,te,W=0)=>{if(z.current)return!0;const I=Math.abs(J.y),H=Math.abs(J.x),$=H>I,ne=["bottom","right"].includes(te)?1:-1;if(te==="left"||te==="right"){if(!(J.x*ne<0)&&H>=0&&H<=W)return $}else if(!(J.y*ne<0)&&I>=0&&I<=W)return!$;return z.current=!0,!0};Ce.useEffect(()=>{j&&window.requestAnimationFrame(()=>{M(!0)})},[]);function Y(J){D.current=null,z.current=!1,u(J)}return Ce.createElement(Hx,{"data-vaul-drawer-direction":E,"data-vaul-drawer":"","data-vaul-delayed-snap-points":R?"true":"false","data-vaul-snap-points":y&&j?"true":"false","data-vaul-custom-container":A?"true":"false","data-vaul-animate":_!=null&&_.current?"true":"false",...r,ref:O,style:m&&m.length>0?{"--snap-point-height":`${m[p??0]}px`,...t}:t,onPointerDown:J=>{w||(r.onPointerDown==null||r.onPointerDown.call(r,J),D.current={x:J.pageX,y:J.pageY},l(J))},onOpenAutoFocus:J=>{n==null||n(J),k||J.preventDefault()},onPointerDownOutside:J=>{if(e==null||e(J),!g||J.defaultPrevented){J.preventDefault();return}f.current&&(f.current=!1)},onFocusOutside:J=>{if(!g){J.preventDefault();return}},onPointerMove:J=>{if(P.current=J,w||(r.onPointerMove==null||r.onPointerMove.call(r,J),!D.current))return;const te=J.pageY-D.current.y,W=J.pageX-D.current.x,I=J.pointerType==="touch"?10:2;K({x:W,y:te},E,I)?d(J):(Math.abs(W)>I||Math.abs(te)>I)&&(D.current=null)},onPointerUp:J=>{r.onPointerUp==null||r.onPointerUp.call(r,J),D.current=null,z.current=!1,u(J)},onPointerOut:J=>{r.onPointerOut==null||r.onPointerOut.call(r,J),Y(P.current)},onContextMenu:J=>{r.onContextMenu==null||r.onContextMenu.call(r,J),P.current&&Y(P.current)}})});vO.displayName="Drawer.Content";const kq=250,Nq=120,Rq=Ce.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:s,isDragging:o,snapPoints:l,activeSnapPoint:u,setActiveSnapPoint:d,dismissible:f,handleOnly:m,isOpen:p,onPress:g,onDrag:y}=Pf(),E=Ce.useRef(null),S=Ce.useRef(!1);function A(){if(S.current){k();return}window.setTimeout(()=>{w()},Nq)}function w(){if(o||e||S.current){k();return}if(k(),!l||l.length===0){f||s();return}if(u===l[l.length-1]&&f){s();return}const M=l.findIndex(D=>D===u);if(M===-1)return;const O=l[M+1];d(O)}function _(){E.current=window.setTimeout(()=>{S.current=!0},kq)}function k(){E.current&&window.clearTimeout(E.current),S.current=!1}return Ce.createElement("div",{onClick:A,onPointerCancel:k,onPointerDown:R=>{m&&g(R),_()},onPointerMove:R=>{m&&y(R)},ref:r,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},Ce.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});Rq.displayName="Drawer.Handle";function Oq(e){const t=Pf(),{container:n=t.container,...r}=e;return Ce.createElement(iO,{container:n,...r})}const No={Root:_q,Content:vO,Overlay:xO,Trigger:eq,Portal:Oq,Title:zx,Description:Vx},$x=({shouldScaleBackground:e=!0,...t})=>b.jsx(No.Root,{shouldScaleBackground:e,...t});$x.displayName="Drawer";const Dq=No.Trigger,Mq=No.Portal,EO=v.forwardRef(({className:e,...t},n)=>b.jsx(No.Overlay,{ref:n,className:Ye("fixed inset-0 z-50 bg-black/80",e),...t}));EO.displayName="DrawerOverlay";const Yx=v.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(Mq,{children:[b.jsx(EO,{}),b.jsxs(No.Content,{ref:r,className:Ye("bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border",e),...n,children:[b.jsx("div",{className:"bg-muted mx-auto mt-4 h-2 w-[100px] rounded-full"}),t]})]}));Yx.displayName="DrawerContent";function Gx({className:e,...t}){return b.jsx("div",{className:Ye("grid gap-1.5 p-4 text-center sm:text-left",e),...t})}Gx.displayName="DrawerHeader";const Xx=v.forwardRef(({className:e,...t},n)=>b.jsx(No.Title,{ref:n,className:Ye("text-lg leading-none font-semibold tracking-tight",e),...t}));Xx.displayName="DrawerTitle";const TO=v.forwardRef(({className:e,...t},n)=>b.jsx(No.Description,{ref:n,className:Ye("text-muted-foreground text-sm",e),...t}));TO.displayName="DrawerDescription";function Kx(e){const t=e+"CollectionProvider",[n,r]=Vi(t),[s,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:A,children:w}=S,_=Ce.useRef(null),k=Ce.useRef(new Map).current;return b.jsx(s,{scope:A,itemMap:k,collectionRef:_,children:w})};l.displayName=t;const u=e+"CollectionSlot",d=iu(u),f=Ce.forwardRef((S,A)=>{const{scope:w,children:_}=S,k=o(u,w),R=_t(A,k.collectionRef);return b.jsx(d,{ref:R,children:_})});f.displayName=u;const m=e+"CollectionItemSlot",p="data-radix-collection-item",g=iu(m),y=Ce.forwardRef((S,A)=>{const{scope:w,children:_,...k}=S,R=Ce.useRef(null),M=_t(A,R),O=o(m,w);return Ce.useEffect(()=>(O.itemMap.set(R,{ref:R,...k}),()=>void O.itemMap.delete(R))),b.jsx(g,{[p]:"",ref:M,children:_})});y.displayName=m;function E(S){const A=o(e+"CollectionConsumer",S);return Ce.useCallback(()=>{const _=A.collectionRef.current;if(!_)return[];const k=Array.from(_.querySelectorAll(`[${p}]`));return Array.from(A.itemMap.values()).sort((O,D)=>k.indexOf(O.ref.current)-k.indexOf(D.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:l,Slot:f,ItemSlot:y},E,r]}var Iq=v.createContext(void 0);function $m(e){const t=v.useContext(Iq);return e||t||"ltr"}const Lq=["top","right","bottom","left"],va=Math.min,Rr=Math.max,mm=Math.round,_h=Math.floor,Bi=e=>({x:e,y:e}),Pq={left:"right",right:"left",bottom:"top",top:"bottom"},jq={start:"end",end:"start"};function hy(e,t,n){return Rr(e,va(t,n))}function Es(e,t){return typeof e=="function"?e(t):e}function Ts(e){return e.split("-")[0]}function bu(e){return e.split("-")[1]}function Qx(e){return e==="x"?"y":"x"}function Wx(e){return e==="y"?"height":"width"}const Bq=new Set(["top","bottom"]);function Li(e){return Bq.has(Ts(e))?"y":"x"}function Zx(e){return Qx(Li(e))}function Uq(e,t,n){n===void 0&&(n=!1);const r=bu(e),s=Zx(e),o=Wx(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=pm(l)),[l,pm(l)]}function Fq(e){const t=pm(e);return[my(e),t,my(t)]}function my(e){return e.replace(/start|end/g,t=>jq[t])}const vA=["left","right"],EA=["right","left"],Hq=["top","bottom"],zq=["bottom","top"];function Vq(e,t,n){switch(e){case"top":case"bottom":return n?t?EA:vA:t?vA:EA;case"left":case"right":return t?Hq:zq;default:return[]}}function qq(e,t,n,r){const s=bu(e);let o=Vq(Ts(e),n==="start",r);return s&&(o=o.map(l=>l+"-"+s),t&&(o=o.concat(o.map(my)))),o}function pm(e){return e.replace(/left|right|bottom|top/g,t=>Pq[t])}function $q(e){return{top:0,right:0,bottom:0,left:0,...e}}function SO(e){return typeof e!="number"?$q(e):{top:e,right:e,bottom:e,left:e}}function gm(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function TA(e,t,n){let{reference:r,floating:s}=e;const o=Li(t),l=Zx(t),u=Wx(l),d=Ts(t),f=o==="y",m=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,g=r[u]/2-s[u]/2;let y;switch(d){case"top":y={x:m,y:r.y-s.height};break;case"bottom":y={x:m,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-s.width,y:p};break;default:y={x:r.x,y:r.y}}switch(bu(t)){case"start":y[l]-=g*(n&&f?-1:1);break;case"end":y[l]+=g*(n&&f?-1:1);break}return y}async function Yq(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:o,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:y=0}=Es(t,e),E=SO(y),A=u[g?p==="floating"?"reference":"floating":p],w=gm(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(A)))==null||n?A:A.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:f,rootBoundary:m,strategy:d})),_=p==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),R=await(o.isElement==null?void 0:o.isElement(k))?await(o.getScale==null?void 0:o.getScale(k))||{x:1,y:1}:{x:1,y:1},M=gm(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:k,strategy:d}):_);return{top:(w.top-M.top+E.top)/R.y,bottom:(M.bottom-w.bottom+E.bottom)/R.y,left:(w.left-M.left+E.left)/R.x,right:(M.right-w.right+E.right)/R.x}}const Gq=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:l}=n,u=o.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:m,y:p}=TA(f,r,d),g=r,y={},E=0;for(let A=0;A<u.length;A++){var S;const{name:w,fn:_}=u[A],{x:k,y:R,data:M,reset:O}=await _({x:m,y:p,initialPlacement:r,placement:g,strategy:s,middlewareData:y,rects:f,platform:{...l,detectOverflow:(S=l.detectOverflow)!=null?S:Yq},elements:{reference:e,floating:t}});m=k??m,p=R??p,y={...y,[w]:{...y[w],...M}},O&&E<=50&&(E++,typeof O=="object"&&(O.placement&&(g=O.placement),O.rects&&(f=O.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):O.rects),{x:m,y:p}=TA(f,g,d)),A=-1)}return{x:m,y:p,placement:g,strategy:s,middlewareData:y}},Xq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:o,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:m=0}=Es(e,t)||{};if(f==null)return{};const p=SO(m),g={x:n,y:r},y=Zx(s),E=Wx(y),S=await l.getDimensions(f),A=y==="y",w=A?"top":"left",_=A?"bottom":"right",k=A?"clientHeight":"clientWidth",R=o.reference[E]+o.reference[y]-g[y]-o.floating[E],M=g[y]-o.reference[y],O=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let D=O?O[k]:0;(!D||!await(l.isElement==null?void 0:l.isElement(O)))&&(D=u.floating[k]||o.floating[E]);const P=R/2-M/2,z=D/2-S[E]/2-1,j=va(p[w],z),K=va(p[_],z),Y=j,J=D-S[E]-K,te=D/2-S[E]/2+P,W=hy(Y,te,J),I=!d.arrow&&bu(s)!=null&&te!==W&&o.reference[E]/2-(te<Y?j:K)-S[E]/2<0,H=I?te<Y?te-Y:te-J:0;return{[y]:g[y]+H,data:{[y]:W,centerOffset:te-W-H,...I&&{alignmentOffset:H}},reset:I}}}),Kq=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:o,rects:l,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:S=!0,...A}=Es(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=Ts(s),_=Li(u),k=Ts(u)===u,R=await(d.isRTL==null?void 0:d.isRTL(f.floating)),M=g||(k||!S?[pm(u)]:Fq(u)),O=E!=="none";!g&&O&&M.push(...qq(u,S,E,R));const D=[u,...M],P=await d.detectOverflow(t,A),z=[];let j=((r=o.flip)==null?void 0:r.overflows)||[];if(m&&z.push(P[w]),p){const te=Uq(s,l,R);z.push(P[te[0]],P[te[1]])}if(j=[...j,{placement:s,overflows:z}],!z.every(te=>te<=0)){var K,Y;const te=(((K=o.flip)==null?void 0:K.index)||0)+1,W=D[te];if(W&&(!(p==="alignment"?_!==Li(W):!1)||j.every($=>Li($.placement)===_?$.overflows[0]>0:!0)))return{data:{index:te,overflows:j},reset:{placement:W}};let I=(Y=j.filter(H=>H.overflows[0]<=0).sort((H,$)=>H.overflows[1]-$.overflows[1])[0])==null?void 0:Y.placement;if(!I)switch(y){case"bestFit":{var J;const H=(J=j.filter($=>{if(O){const ne=Li($.placement);return ne===_||ne==="y"}return!0}).map($=>[$.placement,$.overflows.filter(ne=>ne>0).reduce((ne,U)=>ne+U,0)]).sort(($,ne)=>$[1]-ne[1])[0])==null?void 0:J[0];H&&(I=H);break}case"initialPlacement":I=u;break}if(s!==I)return{reset:{placement:I}}}return{}}}};function SA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function CA(e){return Lq.some(t=>e[t]>=0)}const Qq=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...o}=Es(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...o,elementContext:"reference"}),u=SA(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:CA(u)}}}case"escaped":{const l=await r.detectOverflow(t,{...o,altBoundary:!0}),u=SA(l,n.floating);return{data:{escapedOffsets:u,escaped:CA(u)}}}default:return{}}}}},CO=new Set(["left","top"]);async function Wq(e,t){const{placement:n,platform:r,elements:s}=e,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=Ts(n),u=bu(n),d=Li(n)==="y",f=CO.has(l)?-1:1,m=o&&d?-1:1,p=Es(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:E}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof E=="number"&&(y=u==="end"?E*-1:E),d?{x:y*m,y:g*f}:{x:g*f,y:y*m}}const Zq=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:o,placement:l,middlewareData:u}=t,d=await Wq(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:s+d.x,y:o+d.y,data:{...d,placement:l}}}}},Jq=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:o}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:d={fn:w=>{let{x:_,y:k}=w;return{x:_,y:k}}},...f}=Es(e,t),m={x:n,y:r},p=await o.detectOverflow(t,f),g=Li(Ts(s)),y=Qx(g);let E=m[y],S=m[g];if(l){const w=y==="y"?"top":"left",_=y==="y"?"bottom":"right",k=E+p[w],R=E-p[_];E=hy(k,E,R)}if(u){const w=g==="y"?"top":"left",_=g==="y"?"bottom":"right",k=S+p[w],R=S-p[_];S=hy(k,S,R)}const A=d.fn({...t,[y]:E,[g]:S});return{...A,data:{x:A.x-n,y:A.y-r,enabled:{[y]:l,[g]:u}}}}}},e$=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:o,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Es(e,t),m={x:n,y:r},p=Li(s),g=Qx(p);let y=m[g],E=m[p];const S=Es(u,t),A=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const k=g==="y"?"height":"width",R=o.reference[g]-o.floating[k]+A.mainAxis,M=o.reference[g]+o.reference[k]-A.mainAxis;y<R?y=R:y>M&&(y=M)}if(f){var w,_;const k=g==="y"?"width":"height",R=CO.has(Ts(s)),M=o.reference[p]-o.floating[k]+(R&&((w=l.offset)==null?void 0:w[p])||0)+(R?0:A.crossAxis),O=o.reference[p]+o.reference[k]+(R?0:((_=l.offset)==null?void 0:_[p])||0)-(R?A.crossAxis:0);E<M?E=M:E>O&&(E=O)}return{[g]:y,[p]:E}}}},t$=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:o,platform:l,elements:u}=t,{apply:d=()=>{},...f}=Es(e,t),m=await l.detectOverflow(t,f),p=Ts(s),g=bu(s),y=Li(s)==="y",{width:E,height:S}=o.floating;let A,w;p==="top"||p==="bottom"?(A=p,w=g===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(w=p,A=g==="end"?"top":"bottom");const _=S-m.top-m.bottom,k=E-m.left-m.right,R=va(S-m[A],_),M=va(E-m[w],k),O=!t.middlewareData.shift;let D=R,P=M;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(D=_),O&&!g){const j=Rr(m.left,0),K=Rr(m.right,0),Y=Rr(m.top,0),J=Rr(m.bottom,0);y?P=E-2*(j!==0||K!==0?j+K:Rr(m.left,m.right)):D=S-2*(Y!==0||J!==0?Y+J:Rr(m.top,m.bottom))}await d({...t,availableWidth:P,availableHeight:D});const z=await l.getDimensions(u.floating);return E!==z.width||S!==z.height?{reset:{rects:!0}}:{}}}};function Ym(){return typeof window<"u"}function yu(e){return wO(e)?(e.nodeName||"").toLowerCase():"#document"}function Or(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qi(e){var t;return(t=(wO(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wO(e){return Ym()?e instanceof Node||e instanceof Or(e).Node:!1}function gi(e){return Ym()?e instanceof Element||e instanceof Or(e).Element:!1}function zi(e){return Ym()?e instanceof HTMLElement||e instanceof Or(e).HTMLElement:!1}function wA(e){return!Ym()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Or(e).ShadowRoot}const n$=new Set(["inline","contents"]);function jf(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=bi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!n$.has(s)}const r$=new Set(["table","td","th"]);function i$(e){return r$.has(yu(e))}const s$=[":popover-open",":modal"];function Gm(e){return s$.some(t=>{try{return e.matches(t)}catch{return!1}})}const a$=["transform","translate","scale","rotate","perspective"],o$=["transform","translate","scale","rotate","perspective","filter"],l$=["paint","layout","strict","content"];function Jx(e){const t=ev(),n=gi(e)?bi(e):e;return a$.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||o$.some(r=>(n.willChange||"").includes(r))||l$.some(r=>(n.contain||"").includes(r))}function u$(e){let t=Ea(e);for(;zi(t)&&!su(t);){if(Jx(t))return t;if(Gm(t))return null;t=Ea(t)}return null}function ev(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const c$=new Set(["html","body","#document"]);function su(e){return c$.has(yu(e))}function bi(e){return Or(e).getComputedStyle(e)}function Xm(e){return gi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ea(e){if(yu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wA(e)&&e.host||qi(e);return wA(t)?t.host:t}function AO(e){const t=Ea(e);return su(t)?e.ownerDocument?e.ownerDocument.body:e.body:zi(t)&&jf(t)?t:AO(t)}function hf(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=AO(e),o=s===((r=e.ownerDocument)==null?void 0:r.body),l=Or(s);if(o){const u=py(l);return t.concat(l,l.visualViewport||[],jf(s)?s:[],u&&n?hf(u):[])}return t.concat(s,hf(s,[],n))}function py(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _O(e){const t=bi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=zi(e),o=s?e.offsetWidth:n,l=s?e.offsetHeight:r,u=mm(n)!==o||mm(r)!==l;return u&&(n=o,r=l),{width:n,height:r,$:u}}function tv(e){return gi(e)?e:e.contextElement}function zl(e){const t=tv(e);if(!zi(t))return Bi(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:o}=_O(t);let l=(o?mm(n.width):n.width)/r,u=(o?mm(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const f$=Bi(0);function kO(e){const t=Or(e);return!ev()||!t.visualViewport?f$:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function d$(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Or(e)?!1:t}function vo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),o=tv(e);let l=Bi(1);t&&(r?gi(r)&&(l=zl(r)):l=zl(e));const u=d$(o,n,r)?kO(o):Bi(0);let d=(s.left+u.x)/l.x,f=(s.top+u.y)/l.y,m=s.width/l.x,p=s.height/l.y;if(o){const g=Or(o),y=r&&gi(r)?Or(r):r;let E=g,S=py(E);for(;S&&r&&y!==E;){const A=zl(S),w=S.getBoundingClientRect(),_=bi(S),k=w.left+(S.clientLeft+parseFloat(_.paddingLeft))*A.x,R=w.top+(S.clientTop+parseFloat(_.paddingTop))*A.y;d*=A.x,f*=A.y,m*=A.x,p*=A.y,d+=k,f+=R,E=Or(S),S=py(E)}}return gm({width:m,height:p,x:d,y:f})}function Km(e,t){const n=Xm(e).scrollLeft;return t?t.left+n:vo(qi(e)).left+n}function NO(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Km(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function h$(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const o=s==="fixed",l=qi(r),u=t?Gm(t.floating):!1;if(r===l||u&&o)return n;let d={scrollLeft:0,scrollTop:0},f=Bi(1);const m=Bi(0),p=zi(r);if((p||!p&&!o)&&((yu(r)!=="body"||jf(l))&&(d=Xm(r)),zi(r))){const y=vo(r);f=zl(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const g=l&&!p&&!o?NO(l,d):Bi(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+g.x,y:n.y*f.y-d.scrollTop*f.y+m.y+g.y}}function m$(e){return Array.from(e.getClientRects())}function p$(e){const t=qi(e),n=Xm(e),r=e.ownerDocument.body,s=Rr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Rr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Km(e);const u=-n.scrollTop;return bi(r).direction==="rtl"&&(l+=Rr(t.clientWidth,r.clientWidth)-s),{width:s,height:o,x:l,y:u}}const AA=25;function g$(e,t){const n=Or(e),r=qi(e),s=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,u=0,d=0;if(s){o=s.width,l=s.height;const m=ev();(!m||m&&t==="fixed")&&(u=s.offsetLeft,d=s.offsetTop)}const f=Km(r);if(f<=0){const m=r.ownerDocument,p=m.body,g=getComputedStyle(p),y=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,E=Math.abs(r.clientWidth-p.clientWidth-y);E<=AA&&(o-=E)}else f<=AA&&(o+=f);return{width:o,height:l,x:u,y:d}}const b$=new Set(["absolute","fixed"]);function y$(e,t){const n=vo(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,o=zi(e)?zl(e):Bi(1),l=e.clientWidth*o.x,u=e.clientHeight*o.y,d=s*o.x,f=r*o.y;return{width:l,height:u,x:d,y:f}}function _A(e,t,n){let r;if(t==="viewport")r=g$(e,n);else if(t==="document")r=p$(qi(e));else if(gi(t))r=y$(t,n);else{const s=kO(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return gm(r)}function RO(e,t){const n=Ea(e);return n===t||!gi(n)||su(n)?!1:bi(n).position==="fixed"||RO(n,t)}function x$(e,t){const n=t.get(e);if(n)return n;let r=hf(e,[],!1).filter(u=>gi(u)&&yu(u)!=="body"),s=null;const o=bi(e).position==="fixed";let l=o?Ea(e):e;for(;gi(l)&&!su(l);){const u=bi(l),d=Jx(l);!d&&u.position==="fixed"&&(s=null),(o?!d&&!s:!d&&u.position==="static"&&!!s&&b$.has(s.position)||jf(l)&&!d&&RO(e,l))?r=r.filter(m=>m!==l):s=u,l=Ea(l)}return t.set(e,r),r}function v$(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?Gm(t)?[]:x$(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((f,m)=>{const p=_A(t,m,s);return f.top=Rr(p.top,f.top),f.right=va(p.right,f.right),f.bottom=va(p.bottom,f.bottom),f.left=Rr(p.left,f.left),f},_A(t,u,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function E$(e){const{width:t,height:n}=_O(e);return{width:t,height:n}}function T$(e,t,n){const r=zi(t),s=qi(t),o=n==="fixed",l=vo(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const d=Bi(0);function f(){d.x=Km(s)}if(r||!r&&!o)if((yu(t)!=="body"||jf(s))&&(u=Xm(t)),r){const y=vo(t,!0,o,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();o&&!r&&s&&f();const m=s&&!r&&!o?NO(s,u):Bi(0),p=l.left+u.scrollLeft-d.x-m.x,g=l.top+u.scrollTop-d.y-m.y;return{x:p,y:g,width:l.width,height:l.height}}function k1(e){return bi(e).position==="static"}function kA(e,t){if(!zi(e)||bi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return qi(e)===n&&(n=n.ownerDocument.body),n}function OO(e,t){const n=Or(e);if(Gm(e))return n;if(!zi(e)){let s=Ea(e);for(;s&&!su(s);){if(gi(s)&&!k1(s))return s;s=Ea(s)}return n}let r=kA(e,t);for(;r&&i$(r)&&k1(r);)r=kA(r,t);return r&&su(r)&&k1(r)&&!Jx(r)?n:r||u$(e)||n}const S$=async function(e){const t=this.getOffsetParent||OO,n=this.getDimensions,r=await n(e.floating);return{reference:T$(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function C$(e){return bi(e).direction==="rtl"}const w$={convertOffsetParentRelativeRectToViewportRelativeRect:h$,getDocumentElement:qi,getClippingRect:v$,getOffsetParent:OO,getElementRects:S$,getClientRects:m$,getDimensions:E$,getScale:zl,isElement:gi,isRTL:C$};function DO(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function A$(e,t){let n=null,r;const s=qi(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),o();const f=e.getBoundingClientRect(),{left:m,top:p,width:g,height:y}=f;if(u||t(),!g||!y)return;const E=_h(p),S=_h(s.clientWidth-(m+g)),A=_h(s.clientHeight-(p+y)),w=_h(m),k={rootMargin:-E+"px "+-S+"px "+-A+"px "+-w+"px",threshold:Rr(0,va(1,d))||1};let R=!0;function M(O){const D=O[0].intersectionRatio;if(D!==d){if(!R)return l();D?l(!1,D):r=setTimeout(()=>{l(!1,1e-7)},1e3)}D===1&&!DO(f,e.getBoundingClientRect())&&l(),R=!1}try{n=new IntersectionObserver(M,{...k,root:s.ownerDocument})}catch{n=new IntersectionObserver(M,k)}n.observe(e)}return l(!0),o}function _$(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=tv(e),m=s||o?[...f?hf(f):[],...hf(t)]:[];m.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const p=f&&u?A$(f,n):null;let g=-1,y=null;l&&(y=new ResizeObserver(w=>{let[_]=w;_&&_.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let E,S=d?vo(e):null;d&&A();function A(){const w=vo(e);S&&!DO(S,w)&&n(),S=w,E=requestAnimationFrame(A)}return n(),()=>{var w;m.forEach(_=>{s&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),p==null||p(),(w=y)==null||w.disconnect(),y=null,d&&cancelAnimationFrame(E)}}const k$=Zq,N$=Jq,R$=Kq,O$=t$,D$=Qq,NA=Xq,M$=e$,I$=(e,t,n)=>{const r=new Map,s={platform:w$,...n},o={...s.platform,_c:r};return Gq(e,t,{...s,platform:o})};var L$=typeof document<"u",P$=function(){},Kh=L$?v.useLayoutEffect:P$;function bm(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 n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!bm(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&e.$$typeof)&&!bm(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function MO(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function RA(e,t){const n=MO(e);return Math.round(t*n)/n}function N1(e){const t=v.useRef(e);return Kh(()=>{t.current=e}),t}function j$(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:l}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[m,p]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=v.useState(r);bm(g,r)||y(r);const[E,S]=v.useState(null),[A,w]=v.useState(null),_=v.useCallback($=>{$!==O.current&&(O.current=$,S($))},[]),k=v.useCallback($=>{$!==D.current&&(D.current=$,w($))},[]),R=o||E,M=l||A,O=v.useRef(null),D=v.useRef(null),P=v.useRef(m),z=d!=null,j=N1(d),K=N1(s),Y=N1(f),J=v.useCallback(()=>{if(!O.current||!D.current)return;const $={placement:t,strategy:n,middleware:g};K.current&&($.platform=K.current),I$(O.current,D.current,$).then(ne=>{const U={...ne,isPositioned:Y.current!==!1};te.current&&!bm(P.current,U)&&(P.current=U,ko.flushSync(()=>{p(U)}))})},[g,t,n,K,Y]);Kh(()=>{f===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p($=>({...$,isPositioned:!1})))},[f]);const te=v.useRef(!1);Kh(()=>(te.current=!0,()=>{te.current=!1}),[]),Kh(()=>{if(R&&(O.current=R),M&&(D.current=M),R&&M){if(j.current)return j.current(R,M,J);J()}},[R,M,J,j,z]);const W=v.useMemo(()=>({reference:O,floating:D,setReference:_,setFloating:k}),[_,k]),I=v.useMemo(()=>({reference:R,floating:M}),[R,M]),H=v.useMemo(()=>{const $={position:n,left:0,top:0};if(!I.floating)return $;const ne=RA(I.floating,m.x),U=RA(I.floating,m.y);return u?{...$,transform:"translate("+ne+"px, "+U+"px)",...MO(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ne,top:U}},[n,u,I.floating,m.x,m.y]);return v.useMemo(()=>({...m,update:J,refs:W,elements:I,floatingStyles:H}),[m,J,W,I,H])}const B$=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?NA({element:r.current,padding:s}).fn(n):{}:r?NA({element:r,padding:s}).fn(n):{}}}},U$=(e,t)=>({...k$(e),options:[e,t]}),F$=(e,t)=>({...N$(e),options:[e,t]}),H$=(e,t)=>({...M$(e),options:[e,t]}),z$=(e,t)=>({...R$(e),options:[e,t]}),V$=(e,t)=>({...O$(e),options:[e,t]}),q$=(e,t)=>({...D$(e),options:[e,t]}),$$=(e,t)=>({...B$(e),options:[e,t]});var Y$="Arrow",IO=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...o}=e;return b.jsx(tt.svg,{...o,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});IO.displayName=Y$;var G$=IO;function LO(e){const[t,n]=v.useState(void 0);return Gn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let l,u;if("borderBoxSize"in o){const d=o.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,u=f.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var nv="Popper",[PO,xu]=Vi(nv),[X$,jO]=PO(nv),BO=e=>{const{__scopePopper:t,children:n}=e,[r,s]=v.useState(null);return b.jsx(X$,{scope:t,anchor:r,onAnchorChange:s,children:n})};BO.displayName=nv;var UO="PopperAnchor",FO=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,o=jO(UO,n),l=v.useRef(null),u=_t(t,l),d=v.useRef(null);return v.useEffect(()=>{const f=d.current;d.current=(r==null?void 0:r.current)||l.current,f!==d.current&&o.onAnchorChange(d.current)}),r?null:b.jsx(tt.div,{...s,ref:u})});FO.displayName=UO;var rv="PopperContent",[K$,Q$]=PO(rv),HO=v.forwardRef((e,t)=>{var he,we,Se,Pe,_e,Oe;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:o="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:E,...S}=e,A=jO(rv,n),[w,_]=v.useState(null),k=_t(t,wt=>_(wt)),[R,M]=v.useState(null),O=LO(R),D=(O==null?void 0:O.width)??0,P=(O==null?void 0:O.height)??0,z=r+(o!=="center"?"-"+o:""),j=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},K=Array.isArray(f)?f:[f],Y=K.length>0,J={padding:j,boundary:K.filter(Z$),altBoundary:Y},{refs:te,floatingStyles:W,placement:I,isPositioned:H,middlewareData:$}=j$({strategy:"fixed",placement:z,whileElementsMounted:(...wt)=>_$(...wt,{animationFrame:y==="always"}),elements:{reference:A.anchor},middleware:[U$({mainAxis:s+P,alignmentAxis:l}),d&&F$({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?H$():void 0,...J}),d&&z$({...J}),V$({...J,apply:({elements:wt,rects:Re,availableWidth:nn,availableHeight:Lt})=>{const{width:rn,height:ei}=Re.reference,Fn=wt.floating.style;Fn.setProperty("--radix-popper-available-width",`${nn}px`),Fn.setProperty("--radix-popper-available-height",`${Lt}px`),Fn.setProperty("--radix-popper-anchor-width",`${rn}px`),Fn.setProperty("--radix-popper-anchor-height",`${ei}px`)}}),R&&$$({element:R,padding:u}),J$({arrowWidth:D,arrowHeight:P}),g&&q$({strategy:"referenceHidden",...J})]}),[ne,U]=qO(I),q=Hi(E);Gn(()=>{H&&(q==null||q())},[H,q]);const ie=(he=$.arrow)==null?void 0:he.x,B=(we=$.arrow)==null?void 0:we.y,de=((Se=$.arrow)==null?void 0:Se.centerOffset)!==0,[xe,Ee]=v.useState();return Gn(()=>{w&&Ee(window.getComputedStyle(w).zIndex)},[w]),b.jsx("div",{ref:te.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:H?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[(Pe=$.transformOrigin)==null?void 0:Pe.x,(_e=$.transformOrigin)==null?void 0:_e.y].join(" "),...((Oe=$.hide)==null?void 0:Oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(K$,{scope:n,placedSide:ne,onArrowChange:M,arrowX:ie,arrowY:B,shouldHideArrow:de,children:b.jsx(tt.div,{"data-side":ne,"data-align":U,...S,ref:k,style:{...S.style,animation:H?void 0:"none"}})})})});HO.displayName=rv;var zO="PopperArrow",W$={top:"bottom",right:"left",bottom:"top",left:"right"},VO=v.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,o=Q$(zO,r),l=W$[o.placedSide];return b.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:b.jsx(G$,{...s,ref:n,style:{...s.style,display:"block"}})})});VO.displayName=zO;function Z$(e){return e!==null}var J$=e=>({name:"transformOrigin",options:e,fn(t){var A,w,_;const{placement:n,rects:r,middlewareData:s}=t,l=((A=s.arrow)==null?void 0:A.centerOffset)!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,m]=qO(n),p={start:"0%",center:"50%",end:"100%"}[m],g=(((w=s.arrow)==null?void 0:w.x)??0)+u/2,y=(((_=s.arrow)==null?void 0:_.y)??0)+d/2;let E="",S="";return f==="bottom"?(E=l?p:`${g}px`,S=`${-d}px`):f==="top"?(E=l?p:`${g}px`,S=`${r.floating.height+d}px`):f==="right"?(E=`${-d}px`,S=l?p:`${y}px`):f==="left"&&(E=`${r.floating.width+d}px`,S=l?p:`${y}px`),{data:{x:E,y:S}}}});function qO(e){const[t,n="center"]=e.split("-");return[t,n]}var iv=BO,sv=FO,av=HO,ov=VO,R1="rovingFocusGroup.onEntryFocus",eY={bubbles:!1,cancelable:!0},Bf="RovingFocusGroup",[gy,$O,tY]=Kx(Bf),[nY,Qm]=Vi(Bf,[tY]),[rY,iY]=nY(Bf),YO=v.forwardRef((e,t)=>b.jsx(gy.Provider,{scope:e.__scopeRovingFocusGroup,children:b.jsx(gy.Slot,{scope:e.__scopeRovingFocusGroup,children:b.jsx(sY,{...e,ref:t})})}));YO.displayName=Bf;var sY=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...p}=e,g=v.useRef(null),y=_t(t,g),E=$m(o),[S,A]=xa({prop:l,defaultProp:u??null,onChange:d,caller:Bf}),[w,_]=v.useState(!1),k=Hi(f),R=$O(n),M=v.useRef(!1),[O,D]=v.useState(0);return v.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(R1,k),()=>P.removeEventListener(R1,k)},[k]),b.jsx(rY,{scope:n,orientation:r,dir:E,loop:s,currentTabStopId:S,onItemFocus:v.useCallback(P=>A(P),[A]),onItemShiftTab:v.useCallback(()=>_(!0),[]),onFocusableItemAdd:v.useCallback(()=>D(P=>P+1),[]),onFocusableItemRemove:v.useCallback(()=>D(P=>P-1),[]),children:b.jsx(tt.div,{tabIndex:w||O===0?-1:0,"data-orientation":r,...p,ref:y,style:{outline:"none",...e.style},onMouseDown:Ne(e.onMouseDown,()=>{M.current=!0}),onFocus:Ne(e.onFocus,P=>{const z=!M.current;if(P.target===P.currentTarget&&z&&!w){const j=new CustomEvent(R1,eY);if(P.currentTarget.dispatchEvent(j),!j.defaultPrevented){const K=R().filter(I=>I.focusable),Y=K.find(I=>I.active),J=K.find(I=>I.id===S),W=[Y,J,...K].filter(Boolean).map(I=>I.ref.current);KO(W,m)}}M.current=!1}),onBlur:Ne(e.onBlur,()=>_(!1))})})}),GO="RovingFocusGroupItem",XO=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:o,children:l,...u}=e,d=ji(),f=o||d,m=iY(GO,n),p=m.currentTabStopId===f,g=$O(n),{onFocusableItemAdd:y,onFocusableItemRemove:E,currentTabStopId:S}=m;return v.useEffect(()=>{if(r)return y(),()=>E()},[r,y,E]),b.jsx(gy.ItemSlot,{scope:n,id:f,focusable:r,active:s,children:b.jsx(tt.span,{tabIndex:p?0:-1,"data-orientation":m.orientation,...u,ref:t,onMouseDown:Ne(e.onMouseDown,A=>{r?m.onItemFocus(f):A.preventDefault()}),onFocus:Ne(e.onFocus,()=>m.onItemFocus(f)),onKeyDown:Ne(e.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){m.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const w=lY(A,m.orientation,m.dir);if(w!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let k=g().filter(R=>R.focusable).map(R=>R.ref.current);if(w==="last")k.reverse();else if(w==="prev"||w==="next"){w==="prev"&&k.reverse();const R=k.indexOf(A.currentTarget);k=m.loop?uY(k,R+1):k.slice(R+1)}setTimeout(()=>KO(k))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:S!=null}):l})})});XO.displayName=GO;var aY={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function oY(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function lY(e,t,n){const r=oY(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return aY[r]}function KO(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function uY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var QO=YO,WO=XO,by=["Enter"," "],cY=["ArrowDown","PageUp","Home"],ZO=["ArrowUp","PageDown","End"],fY=[...cY,...ZO],dY={ltr:[...by,"ArrowRight"],rtl:[...by,"ArrowLeft"]},hY={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Uf="Menu",[mf,mY,pY]=Kx(Uf),[Ro,JO]=Vi(Uf,[pY,xu,Qm]),Wm=xu(),eD=Qm(),[gY,Oo]=Ro(Uf),[bY,Ff]=Ro(Uf),tD=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:o,modal:l=!0}=e,u=Wm(t),[d,f]=v.useState(null),m=v.useRef(!1),p=Hi(o),g=$m(s);return v.useEffect(()=>{const y=()=>{m.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},E=()=>m.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),b.jsx(iv,{...u,children:b.jsx(gY,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:b.jsx(bY,{scope:t,onClose:v.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:g,modal:l,children:r})})})};tD.displayName=Uf;var yY="MenuAnchor",lv=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Wm(n);return b.jsx(sv,{...s,...r,ref:t})});lv.displayName=yY;var uv="MenuPortal",[xY,nD]=Ro(uv,{forceMount:void 0}),rD=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,o=Oo(uv,t);return b.jsx(xY,{scope:t,forceMount:n,children:b.jsx(xi,{present:n||o.open,children:b.jsx(Lf,{asChild:!0,container:s,children:r})})})};rD.displayName=uv;var Zr="MenuContent",[vY,cv]=Ro(Zr),iD=v.forwardRef((e,t)=>{const n=nD(Zr,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Oo(Zr,e.__scopeMenu),l=Ff(Zr,e.__scopeMenu);return b.jsx(mf.Provider,{scope:e.__scopeMenu,children:b.jsx(xi,{present:r||o.open,children:b.jsx(mf.Slot,{scope:e.__scopeMenu,children:l.modal?b.jsx(EY,{...s,ref:t}):b.jsx(TY,{...s,ref:t})})})})}),EY=v.forwardRef((e,t)=>{const n=Oo(Zr,e.__scopeMenu),r=v.useRef(null),s=_t(t,r);return v.useEffect(()=>{const o=r.current;if(o)return Px(o)},[]),b.jsx(fv,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ne(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),TY=v.forwardRef((e,t)=>{const n=Oo(Zr,e.__scopeMenu);return b.jsx(fv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),SY=iu("MenuContent.ScrollLock"),fv=v.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,disableOutsideScroll:E,...S}=e,A=Oo(Zr,n),w=Ff(Zr,n),_=Wm(n),k=eD(n),R=mY(n),[M,O]=v.useState(null),D=v.useRef(null),P=_t(t,D,A.onContentChange),z=v.useRef(0),j=v.useRef(""),K=v.useRef(0),Y=v.useRef(null),J=v.useRef("right"),te=v.useRef(0),W=E?Vm:v.Fragment,I=E?{as:SY,allowPinchZoom:!0}:void 0,H=ne=>{var he,we;const U=j.current+ne,q=R().filter(Se=>!Se.disabled),ie=document.activeElement,B=(he=q.find(Se=>Se.ref.current===ie))==null?void 0:he.textValue,de=q.map(Se=>Se.textValue),xe=LY(de,U,B),Ee=(we=q.find(Se=>Se.textValue===xe))==null?void 0:we.ref.current;(function Se(Pe){j.current=Pe,window.clearTimeout(z.current),Pe!==""&&(z.current=window.setTimeout(()=>Se(""),1e3))})(U),Ee&&setTimeout(()=>Ee.focus())};v.useEffect(()=>()=>window.clearTimeout(z.current),[]),Lx();const $=v.useCallback(ne=>{var q,ie;return J.current===((q=Y.current)==null?void 0:q.side)&&jY(ne,(ie=Y.current)==null?void 0:ie.area)},[]);return b.jsx(vY,{scope:n,searchRef:j,onItemEnter:v.useCallback(ne=>{$(ne)&&ne.preventDefault()},[$]),onItemLeave:v.useCallback(ne=>{var U;$(ne)||((U=D.current)==null||U.focus(),O(null))},[$]),onTriggerLeave:v.useCallback(ne=>{$(ne)&&ne.preventDefault()},[$]),pointerGraceTimerRef:K,onPointerGraceIntentChange:v.useCallback(ne=>{Y.current=ne},[]),children:b.jsx(W,{...I,children:b.jsx(Hm,{asChild:!0,trapped:s,onMountAutoFocus:Ne(o,ne=>{var U;ne.preventDefault(),(U=D.current)==null||U.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:b.jsx(If,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,children:b.jsx(QO,{asChild:!0,...k,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:O,onEntryFocus:Ne(d,ne=>{w.isUsingKeyboardRef.current||ne.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(av,{role:"menu","aria-orientation":"vertical","data-state":vD(A.open),"data-radix-menu-content":"",dir:w.dir,..._,...S,ref:P,style:{outline:"none",...S.style},onKeyDown:Ne(S.onKeyDown,ne=>{const q=ne.target.closest("[data-radix-menu-content]")===ne.currentTarget,ie=ne.ctrlKey||ne.altKey||ne.metaKey,B=ne.key.length===1;q&&(ne.key==="Tab"&&ne.preventDefault(),!ie&&B&&H(ne.key));const de=D.current;if(ne.target!==de||!fY.includes(ne.key))return;ne.preventDefault();const Ee=R().filter(he=>!he.disabled).map(he=>he.ref.current);ZO.includes(ne.key)&&Ee.reverse(),MY(Ee)}),onBlur:Ne(e.onBlur,ne=>{ne.currentTarget.contains(ne.target)||(window.clearTimeout(z.current),j.current="")}),onPointerMove:Ne(e.onPointerMove,pf(ne=>{const U=ne.target,q=te.current!==ne.clientX;if(ne.currentTarget.contains(U)&&q){const ie=ne.clientX>te.current?"right":"left";J.current=ie,te.current=ne.clientX}}))})})})})})})});iD.displayName=Zr;var CY="MenuGroup",dv=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return b.jsx(tt.div,{role:"group",...r,ref:t})});dv.displayName=CY;var wY="MenuLabel",sD=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return b.jsx(tt.div,{...r,ref:t})});sD.displayName=wY;var ym="MenuItem",OA="menu.itemSelect",Zm=v.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,o=v.useRef(null),l=Ff(ym,e.__scopeMenu),u=cv(ym,e.__scopeMenu),d=_t(t,o),f=v.useRef(!1),m=()=>{const p=o.current;if(!n&&p){const g=new CustomEvent(OA,{bubbles:!0,cancelable:!0});p.addEventListener(OA,y=>r==null?void 0:r(y),{once:!0}),NR(p,g),g.defaultPrevented?f.current=!1:l.onClose()}};return b.jsx(aD,{...s,ref:d,disabled:n,onClick:Ne(e.onClick,m),onPointerDown:p=>{var g;(g=e.onPointerDown)==null||g.call(e,p),f.current=!0},onPointerUp:Ne(e.onPointerUp,p=>{var g;f.current||(g=p.currentTarget)==null||g.click()}),onKeyDown:Ne(e.onKeyDown,p=>{const g=u.searchRef.current!=="";n||g&&p.key===" "||by.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Zm.displayName=ym;var aD=v.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...o}=e,l=cv(ym,n),u=eD(n),d=v.useRef(null),f=_t(t,d),[m,p]=v.useState(!1),[g,y]=v.useState("");return v.useEffect(()=>{const E=d.current;E&&y((E.textContent??"").trim())},[o.children]),b.jsx(mf.ItemSlot,{scope:n,disabled:r,textValue:s??g,children:b.jsx(WO,{asChild:!0,...u,focusable:!r,children:b.jsx(tt.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:f,onPointerMove:Ne(e.onPointerMove,pf(E=>{r?l.onItemLeave(E):(l.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ne(e.onPointerLeave,pf(E=>l.onItemLeave(E))),onFocus:Ne(e.onFocus,()=>p(!0)),onBlur:Ne(e.onBlur,()=>p(!1))})})})}),AY="MenuCheckboxItem",oD=v.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return b.jsx(dD,{scope:e.__scopeMenu,checked:n,children:b.jsx(Zm,{role:"menuitemcheckbox","aria-checked":xm(n)?"mixed":n,...s,ref:t,"data-state":mv(n),onSelect:Ne(s.onSelect,()=>r==null?void 0:r(xm(n)?!0:!n),{checkForDefaultPrevented:!1})})})});oD.displayName=AY;var lD="MenuRadioGroup",[_Y,kY]=Ro(lD,{value:void 0,onValueChange:()=>{}}),uD=v.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,o=Hi(r);return b.jsx(_Y,{scope:e.__scopeMenu,value:n,onValueChange:o,children:b.jsx(dv,{...s,ref:t})})});uD.displayName=lD;var cD="MenuRadioItem",fD=v.forwardRef((e,t)=>{const{value:n,...r}=e,s=kY(cD,e.__scopeMenu),o=n===s.value;return b.jsx(dD,{scope:e.__scopeMenu,checked:o,children:b.jsx(Zm,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":mv(o),onSelect:Ne(r.onSelect,()=>{var l;return(l=s.onValueChange)==null?void 0:l.call(s,n)},{checkForDefaultPrevented:!1})})})});fD.displayName=cD;var hv="MenuItemIndicator",[dD,NY]=Ro(hv,{checked:!1}),hD=v.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,o=NY(hv,n);return b.jsx(xi,{present:r||xm(o.checked)||o.checked===!0,children:b.jsx(tt.span,{...s,ref:t,"data-state":mv(o.checked)})})});hD.displayName=hv;var RY="MenuSeparator",mD=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return b.jsx(tt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});mD.displayName=RY;var OY="MenuArrow",pD=v.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Wm(n);return b.jsx(ov,{...s,...r,ref:t})});pD.displayName=OY;var DY="MenuSub",[cue,gD]=Ro(DY),Ic="MenuSubTrigger",bD=v.forwardRef((e,t)=>{const n=Oo(Ic,e.__scopeMenu),r=Ff(Ic,e.__scopeMenu),s=gD(Ic,e.__scopeMenu),o=cv(Ic,e.__scopeMenu),l=v.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=o,f={__scopeMenu:e.__scopeMenu},m=v.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return v.useEffect(()=>m,[m]),v.useEffect(()=>{const p=u.current;return()=>{window.clearTimeout(p),d(null)}},[u,d]),b.jsx(lv,{asChild:!0,...f,children:b.jsx(aD,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":vD(n.open),...e,ref:Mf(t,s.onTriggerChange),onClick:p=>{var g;(g=e.onClick)==null||g.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ne(e.onPointerMove,pf(p=>{o.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:Ne(e.onPointerLeave,pf(p=>{var y,E;m();const g=(y=n.content)==null?void 0:y.getBoundingClientRect();if(g){const S=(E=n.content)==null?void 0:E.dataset.side,A=S==="right",w=A?-5:5,_=g[A?"left":"right"],k=g[A?"right":"left"];o.onPointerGraceIntentChange({area:[{x:p.clientX+w,y:p.clientY},{x:_,y:g.top},{x:k,y:g.top},{x:k,y:g.bottom},{x:_,y:g.bottom}],side:S}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(p),p.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Ne(e.onKeyDown,p=>{var y;const g=o.searchRef.current!=="";e.disabled||g&&p.key===" "||dY[r.dir].includes(p.key)&&(n.onOpenChange(!0),(y=n.content)==null||y.focus(),p.preventDefault())})})})});bD.displayName=Ic;var yD="MenuSubContent",xD=v.forwardRef((e,t)=>{const n=nD(Zr,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,o=Oo(Zr,e.__scopeMenu),l=Ff(Zr,e.__scopeMenu),u=gD(yD,e.__scopeMenu),d=v.useRef(null),f=_t(t,d);return b.jsx(mf.Provider,{scope:e.__scopeMenu,children:b.jsx(xi,{present:r||o.open,children:b.jsx(mf.Slot,{scope:e.__scopeMenu,children:b.jsx(fv,{id:u.contentId,"aria-labelledby":u.triggerId,...s,ref:f,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var p;l.isUsingKeyboardRef.current&&((p=d.current)==null||p.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:Ne(e.onFocusOutside,m=>{m.target!==u.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Ne(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:Ne(e.onKeyDown,m=>{var y;const p=m.currentTarget.contains(m.target),g=hY[l.dir].includes(m.key);p&&g&&(o.onOpenChange(!1),(y=u.trigger)==null||y.focus(),m.preventDefault())})})})})})});xD.displayName=yD;function vD(e){return e?"open":"closed"}function xm(e){return e==="indeterminate"}function mv(e){return xm(e)?"indeterminate":e?"checked":"unchecked"}function MY(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function IY(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function LY(e,t,n){const s=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=IY(e,Math.max(o,0));s.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.toLowerCase().startsWith(s.toLowerCase()));return d!==n?d:void 0}function PY(e,t){const{x:n,y:r}=e;let s=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const u=t[o],d=t[l],f=u.x,m=u.y,p=d.x,g=d.y;m>r!=g>r&&n<(p-f)*(r-m)/(g-m)+f&&(s=!s)}return s}function jY(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return PY(n,t)}function pf(e){return t=>t.pointerType==="mouse"?e(t):void 0}var BY=tD,UY=lv,FY=rD,HY=iD,zY=dv,VY=sD,qY=Zm,$Y=oD,YY=uD,GY=fD,XY=hD,KY=mD,QY=pD,WY=bD,ZY=xD,Jm="DropdownMenu",[JY]=Vi(Jm,[JO]),sr=JO(),[eG,ED]=JY(Jm),TD=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:o,onOpenChange:l,modal:u=!0}=e,d=sr(t),f=v.useRef(null),[m,p]=xa({prop:s,defaultProp:o??!1,onChange:l,caller:Jm});return b.jsx(eG,{scope:t,triggerId:ji(),triggerRef:f,contentId:ji(),open:m,onOpenChange:p,onOpenToggle:v.useCallback(()=>p(g=>!g),[p]),modal:u,children:b.jsx(BY,{...d,open:m,onOpenChange:p,dir:r,modal:u,children:n})})};TD.displayName=Jm;var SD="DropdownMenuTrigger",CD=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,o=ED(SD,n),l=sr(n);return b.jsx(UY,{asChild:!0,...l,children:b.jsx(tt.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:Mf(t,o.triggerRef),onPointerDown:Ne(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(o.onOpenToggle(),o.open||u.preventDefault())}),onKeyDown:Ne(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&o.onOpenToggle(),u.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});CD.displayName=SD;var tG="DropdownMenuPortal",wD=e=>{const{__scopeDropdownMenu:t,...n}=e,r=sr(t);return b.jsx(FY,{...r,...n})};wD.displayName=tG;var AD="DropdownMenuContent",_D=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=ED(AD,n),o=sr(n),l=v.useRef(!1);return b.jsx(HY,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...r,ref:t,onCloseAutoFocus:Ne(e.onCloseAutoFocus,u=>{var d;l.current||(d=s.triggerRef.current)==null||d.focus(),l.current=!1,u.preventDefault()}),onInteractOutside:Ne(e.onInteractOutside,u=>{const d=u.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,m=d.button===2||f;(!s.modal||m)&&(l.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)"}})});_D.displayName=AD;var nG="DropdownMenuGroup",rG=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=sr(n);return b.jsx(zY,{...s,...r,ref:t})});rG.displayName=nG;var iG="DropdownMenuLabel",kD=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=sr(n);return b.jsx(VY,{...s,...r,ref:t})});kD.displayName=iG;var sG="DropdownMenuItem",aG=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=sr(n);return b.jsx(qY,{...s,...r,ref:t})});aG.displayName=sG;var oG="DropdownMenuCheckboxItem",lG=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=sr(n);return b.jsx($Y,{...s,...r,ref:t})});lG.displayName=oG;var uG="DropdownMenuRadioGroup",ND=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=sr(n);return b.jsx(YY,{...s,...r,ref:t})});ND.displayName=uG;var cG="DropdownMenuRadioItem",RD=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=sr(n);return b.jsx(GY,{...s,...r,ref:t})});RD.displayName=cG;var fG="DropdownMenuItemIndicator",OD=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=sr(n);return b.jsx(XY,{...s,...r,ref:t})});OD.displayName=fG;var dG="DropdownMenuSeparator",hG=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=sr(n);return b.jsx(KY,{...s,...r,ref:t})});hG.displayName=dG;var mG="DropdownMenuArrow",pG=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=sr(n);return b.jsx(QY,{...s,...r,ref:t})});pG.displayName=mG;var gG="DropdownMenuSubTrigger",bG=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=sr(n);return b.jsx(WY,{...s,...r,ref:t})});bG.displayName=gG;var yG="DropdownMenuSubContent",xG=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=sr(n);return b.jsx(ZY,{...s,...r,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)"}})});xG.displayName=yG;var vG=TD,EG=CD,TG=wD,DD=_D,MD=kD,SG=ND,ID=RD,CG=OD;const wG=vG,AG=EG,LD=v.forwardRef(({className:e,sideOffset:t=4,...n},r)=>b.jsx(TG,{children:b.jsx(DD,{ref:r,sideOffset:t,className:Ye("bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));LD.displayName=DD.displayName;const PD=v.forwardRef(({className:e,...t},n)=>b.jsx(MD,{ref:n,className:Ye("text-muted-foreground px-2 py-1.5 text-xs font-semibold",e),...t}));PD.displayName=MD.displayName;const _G=SG,jD=v.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(ID,{ref:r,className:Ye("relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-xs outline-none select-none","focus:bg-accent focus:text-accent-foreground transition-colors","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[b.jsx("span",{className:"absolute left-2 flex size-(--size-icon-sm) items-center justify-center",children:b.jsx(CG,{children:b.jsx(Qr,{className:"size-(--size-icon-xs)"})})}),t]}));jD.displayName=ID.displayName;var BD=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"}),kG="VisuallyHidden",NG=v.forwardRef((e,t)=>b.jsx(tt.span,{...e,ref:t,style:{...BD,...e.style}}));NG.displayName=kG;function UD(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var O1,ep="HoverCard",[FD]=Vi(ep,[xu]),tp=xu(),[RG,np]=FD(ep),HD=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:s,onOpenChange:o,openDelay:l=700,closeDelay:u=300}=e,d=tp(t),f=v.useRef(0),m=v.useRef(0),p=v.useRef(!1),g=v.useRef(!1),[y,E]=xa({prop:r,defaultProp:s??!1,onChange:o,caller:ep}),S=v.useCallback(()=>{clearTimeout(m.current),f.current=window.setTimeout(()=>E(!0),l)},[l,E]),A=v.useCallback(()=>{clearTimeout(f.current),!p.current&&!g.current&&(m.current=window.setTimeout(()=>E(!1),u))},[u,E]),w=v.useCallback(()=>E(!1),[E]);return v.useEffect(()=>()=>{clearTimeout(f.current),clearTimeout(m.current)},[]),b.jsx(RG,{scope:t,open:y,onOpenChange:E,onOpen:S,onClose:A,onDismiss:w,hasSelectionRef:p,isPointerDownOnContentRef:g,children:b.jsx(iv,{...d,children:n})})};HD.displayName=ep;var zD="HoverCardTrigger",VD=v.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,s=np(zD,n),o=tp(n);return b.jsx(sv,{asChild:!0,...o,children:b.jsx(tt.a,{"data-state":s.open?"open":"closed",...r,ref:t,onPointerEnter:Ne(e.onPointerEnter,Em(s.onOpen)),onPointerLeave:Ne(e.onPointerLeave,Em(s.onClose)),onFocus:Ne(e.onFocus,s.onOpen),onBlur:Ne(e.onBlur,s.onClose),onTouchStart:Ne(e.onTouchStart,l=>l.preventDefault())})})});VD.displayName=zD;var pv="HoverCardPortal",[OG,DG]=FD(pv,{forceMount:void 0}),qD=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:s}=e,o=np(pv,t);return b.jsx(OG,{scope:t,forceMount:n,children:b.jsx(xi,{present:n||o.open,children:b.jsx(Lf,{asChild:!0,container:s,children:r})})})};qD.displayName=pv;var vm="HoverCardContent",$D=v.forwardRef((e,t)=>{const n=DG(vm,e.__scopeHoverCard),{forceMount:r=n.forceMount,...s}=e,o=np(vm,e.__scopeHoverCard);return b.jsx(xi,{present:r||o.open,children:b.jsx(MG,{"data-state":o.open?"open":"closed",...s,onPointerEnter:Ne(e.onPointerEnter,Em(o.onOpen)),onPointerLeave:Ne(e.onPointerLeave,Em(o.onClose)),ref:t})})});$D.displayName=vm;var MG=v.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:l,...u}=e,d=np(vm,n),f=tp(n),m=v.useRef(null),p=_t(t,m),[g,y]=v.useState(!1);return v.useEffect(()=>{if(g){const E=document.body;return O1=E.style.userSelect||E.style.webkitUserSelect,E.style.userSelect="none",E.style.webkitUserSelect="none",()=>{E.style.userSelect=O1,E.style.webkitUserSelect=O1}}},[g]),v.useEffect(()=>{if(m.current){const E=()=>{y(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var A;((A=document.getSelection())==null?void 0:A.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",E),()=>{document.removeEventListener("pointerup",E),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),v.useEffect(()=>{m.current&&PG(m.current).forEach(S=>S.setAttribute("tabindex","-1"))}),b.jsx(If,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:Ne(o,E=>{E.preventDefault()}),onDismiss:d.onDismiss,children:b.jsx(av,{...f,...u,onPointerDown:Ne(u.onPointerDown,E=>{E.currentTarget.contains(E.target)&&y(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:p,style:{...u.style,userSelect:g?"text":void 0,WebkitUserSelect:g?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),IG="HoverCardArrow",LG=v.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,s=tp(n);return b.jsx(ov,{...s,...r,ref:t})});LG.displayName=IG;function Em(e){return t=>t.pointerType==="touch"?void 0:e()}function PG(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var jG=HD,BG=VD,UG=qD,FG=$D;function DA(e,[t,n]){return Math.min(n,Math.max(t,e))}var HG=[" ","Enter","ArrowUp","ArrowDown"],zG=[" ","Enter"],Eo="Select",[rp,ip,VG]=Kx(Eo),[vu]=Vi(Eo,[VG,xu]),sp=xu(),[qG,wa]=vu(Eo),[$G,YG]=vu(Eo),YD=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:o,value:l,defaultValue:u,onValueChange:d,dir:f,name:m,autoComplete:p,disabled:g,required:y,form:E}=e,S=sp(t),[A,w]=v.useState(null),[_,k]=v.useState(null),[R,M]=v.useState(!1),O=$m(f),[D,P]=xa({prop:r,defaultProp:s??!1,onChange:o,caller:Eo}),[z,j]=xa({prop:l,defaultProp:u,onChange:d,caller:Eo}),K=v.useRef(null),Y=A?E||!!A.closest("form"):!0,[J,te]=v.useState(new Set),W=Array.from(J).map(I=>I.props.value).join(";");return b.jsx(iv,{...S,children:b.jsxs(qG,{required:y,scope:t,trigger:A,onTriggerChange:w,valueNode:_,onValueNodeChange:k,valueNodeHasChildren:R,onValueNodeHasChildrenChange:M,contentId:ji(),value:z,onValueChange:j,open:D,onOpenChange:P,dir:O,triggerPointerDownPosRef:K,disabled:g,children:[b.jsx(rp.Provider,{scope:t,children:b.jsx($G,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(I=>{te(H=>new Set(H).add(I))},[]),onNativeOptionRemove:v.useCallback(I=>{te(H=>{const $=new Set(H);return $.delete(I),$})},[]),children:n})}),Y?b.jsxs(d6,{"aria-hidden":!0,required:y,tabIndex:-1,name:m,autoComplete:p,value:z,onChange:I=>j(I.target.value),disabled:g,form:E,children:[z===void 0?b.jsx("option",{value:""}):null,Array.from(J)]},W):null]})})};YD.displayName=Eo;var GD="SelectTrigger",XD=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,o=sp(n),l=wa(GD,n),u=l.disabled||r,d=_t(t,l.onTriggerChange),f=ip(n),m=v.useRef("touch"),[p,g,y]=m6(S=>{const A=f().filter(k=>!k.disabled),w=A.find(k=>k.value===l.value),_=p6(A,S,w);_!==void 0&&l.onValueChange(_.value)}),E=S=>{u||(l.onOpenChange(!0),y()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return b.jsx(sv,{asChild:!0,...o,children:b.jsx(tt.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":h6(l.value)?"":void 0,...s,ref:d,onClick:Ne(s.onClick,S=>{S.currentTarget.focus(),m.current!=="mouse"&&E(S)}),onPointerDown:Ne(s.onPointerDown,S=>{m.current=S.pointerType;const A=S.target;A.hasPointerCapture(S.pointerId)&&A.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(E(S),S.preventDefault())}),onKeyDown:Ne(s.onKeyDown,S=>{const A=p.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&g(S.key),!(A&&S.key===" ")&&HG.includes(S.key)&&(E(),S.preventDefault())})})})});XD.displayName=GD;var KD="SelectValue",QD=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:o,placeholder:l="",...u}=e,d=wa(KD,n),{onValueNodeHasChildrenChange:f}=d,m=o!==void 0,p=_t(t,d.onValueNodeChange);return Gn(()=>{f(m)},[f,m]),b.jsx(tt.span,{...u,ref:p,style:{pointerEvents:"none"},children:h6(d.value)?b.jsx(b.Fragment,{children:l}):o})});QD.displayName=KD;var GG="SelectIcon",WD=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return b.jsx(tt.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});WD.displayName=GG;var XG="SelectPortal",ZD=e=>b.jsx(Lf,{asChild:!0,...e});ZD.displayName=XG;var To="SelectContent",JD=v.forwardRef((e,t)=>{const n=wa(To,e.__scopeSelect),[r,s]=v.useState();if(Gn(()=>{s(new DocumentFragment)},[]),!n.open){const o=r;return o?ko.createPortal(b.jsx(e6,{scope:e.__scopeSelect,children:b.jsx(rp.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),o):null}return b.jsx(t6,{...e,ref:t})});JD.displayName=To;var ui=10,[e6,Aa]=vu(To),KG="SelectContentImpl",QG=iu("SelectContent.RemoveScroll"),t6=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:o,onPointerDownOutside:l,side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:p,collisionBoundary:g,collisionPadding:y,sticky:E,hideWhenDetached:S,avoidCollisions:A,...w}=e,_=wa(To,n),[k,R]=v.useState(null),[M,O]=v.useState(null),D=_t(t,he=>R(he)),[P,z]=v.useState(null),[j,K]=v.useState(null),Y=ip(n),[J,te]=v.useState(!1),W=v.useRef(!1);v.useEffect(()=>{if(k)return Px(k)},[k]),Lx();const I=v.useCallback(he=>{const[we,...Se]=Y().map(Oe=>Oe.ref.current),[Pe]=Se.slice(-1),_e=document.activeElement;for(const Oe of he)if(Oe===_e||(Oe==null||Oe.scrollIntoView({block:"nearest"}),Oe===we&&M&&(M.scrollTop=0),Oe===Pe&&M&&(M.scrollTop=M.scrollHeight),Oe==null||Oe.focus(),document.activeElement!==_e))return},[Y,M]),H=v.useCallback(()=>I([P,k]),[I,P,k]);v.useEffect(()=>{J&&H()},[J,H]);const{onOpenChange:$,triggerPointerDownPosRef:ne}=_;v.useEffect(()=>{if(k){let he={x:0,y:0};const we=Pe=>{var _e,Oe;he={x:Math.abs(Math.round(Pe.pageX)-(((_e=ne.current)==null?void 0:_e.x)??0)),y:Math.abs(Math.round(Pe.pageY)-(((Oe=ne.current)==null?void 0:Oe.y)??0))}},Se=Pe=>{he.x<=10&&he.y<=10?Pe.preventDefault():k.contains(Pe.target)||$(!1),document.removeEventListener("pointermove",we),ne.current=null};return ne.current!==null&&(document.addEventListener("pointermove",we),document.addEventListener("pointerup",Se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",we),document.removeEventListener("pointerup",Se,{capture:!0})}}},[k,$,ne]),v.useEffect(()=>{const he=()=>$(!1);return window.addEventListener("blur",he),window.addEventListener("resize",he),()=>{window.removeEventListener("blur",he),window.removeEventListener("resize",he)}},[$]);const[U,q]=m6(he=>{const we=Y().filter(_e=>!_e.disabled),Se=we.find(_e=>_e.ref.current===document.activeElement),Pe=p6(we,he,Se);Pe&&setTimeout(()=>Pe.ref.current.focus())}),ie=v.useCallback((he,we,Se)=>{const Pe=!W.current&&!Se;(_.value!==void 0&&_.value===we||Pe)&&(z(he),Pe&&(W.current=!0))},[_.value]),B=v.useCallback(()=>k==null?void 0:k.focus(),[k]),de=v.useCallback((he,we,Se)=>{const Pe=!W.current&&!Se;(_.value!==void 0&&_.value===we||Pe)&&K(he)},[_.value]),xe=r==="popper"?yy:n6,Ee=xe===yy?{side:u,sideOffset:d,align:f,alignOffset:m,arrowPadding:p,collisionBoundary:g,collisionPadding:y,sticky:E,hideWhenDetached:S,avoidCollisions:A}:{};return b.jsx(e6,{scope:n,content:k,viewport:M,onViewportChange:O,itemRefCallback:ie,selectedItem:P,onItemLeave:B,itemTextRefCallback:de,focusSelectedItem:H,selectedItemText:j,position:r,isPositioned:J,searchRef:U,children:b.jsx(Vm,{as:QG,allowPinchZoom:!0,children:b.jsx(Hm,{asChild:!0,trapped:_.open,onMountAutoFocus:he=>{he.preventDefault()},onUnmountAutoFocus:Ne(s,he=>{var we;(we=_.trigger)==null||we.focus({preventScroll:!0}),he.preventDefault()}),children:b.jsx(If,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:he=>he.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:b.jsx(xe,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:he=>he.preventDefault(),...w,...Ee,onPlaced:()=>te(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Ne(w.onKeyDown,he=>{const we=he.ctrlKey||he.altKey||he.metaKey;if(he.key==="Tab"&&he.preventDefault(),!we&&he.key.length===1&&q(he.key),["ArrowUp","ArrowDown","Home","End"].includes(he.key)){let Pe=Y().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);if(["ArrowUp","End"].includes(he.key)&&(Pe=Pe.slice().reverse()),["ArrowUp","ArrowDown"].includes(he.key)){const _e=he.target,Oe=Pe.indexOf(_e);Pe=Pe.slice(Oe+1)}setTimeout(()=>I(Pe)),he.preventDefault()}})})})})})})});t6.displayName=KG;var WG="SelectItemAlignedPosition",n6=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,o=wa(To,n),l=Aa(To,n),[u,d]=v.useState(null),[f,m]=v.useState(null),p=_t(t,D=>m(D)),g=ip(n),y=v.useRef(!1),E=v.useRef(!0),{viewport:S,selectedItem:A,selectedItemText:w,focusSelectedItem:_}=l,k=v.useCallback(()=>{if(o.trigger&&o.valueNode&&u&&f&&S&&A&&w){const D=o.trigger.getBoundingClientRect(),P=f.getBoundingClientRect(),z=o.valueNode.getBoundingClientRect(),j=w.getBoundingClientRect();if(o.dir!=="rtl"){const _e=j.left-P.left,Oe=z.left-_e,wt=D.left-Oe,Re=D.width+wt,nn=Math.max(Re,P.width),Lt=window.innerWidth-ui,rn=DA(Oe,[ui,Math.max(ui,Lt-nn)]);u.style.minWidth=Re+"px",u.style.left=rn+"px"}else{const _e=P.right-j.right,Oe=window.innerWidth-z.right-_e,wt=window.innerWidth-D.right-Oe,Re=D.width+wt,nn=Math.max(Re,P.width),Lt=window.innerWidth-ui,rn=DA(Oe,[ui,Math.max(ui,Lt-nn)]);u.style.minWidth=Re+"px",u.style.right=rn+"px"}const K=g(),Y=window.innerHeight-ui*2,J=S.scrollHeight,te=window.getComputedStyle(f),W=parseInt(te.borderTopWidth,10),I=parseInt(te.paddingTop,10),H=parseInt(te.borderBottomWidth,10),$=parseInt(te.paddingBottom,10),ne=W+I+J+$+H,U=Math.min(A.offsetHeight*5,ne),q=window.getComputedStyle(S),ie=parseInt(q.paddingTop,10),B=parseInt(q.paddingBottom,10),de=D.top+D.height/2-ui,xe=Y-de,Ee=A.offsetHeight/2,he=A.offsetTop+Ee,we=W+I+he,Se=ne-we;if(we<=de){const _e=K.length>0&&A===K[K.length-1].ref.current;u.style.bottom="0px";const Oe=f.clientHeight-S.offsetTop-S.offsetHeight,wt=Math.max(xe,Ee+(_e?B:0)+Oe+H),Re=we+wt;u.style.height=Re+"px"}else{const _e=K.length>0&&A===K[0].ref.current;u.style.top="0px";const wt=Math.max(de,W+S.offsetTop+(_e?ie:0)+Ee)+Se;u.style.height=wt+"px",S.scrollTop=we-de+S.offsetTop}u.style.margin=`${ui}px 0`,u.style.minHeight=U+"px",u.style.maxHeight=Y+"px",r==null||r(),requestAnimationFrame(()=>y.current=!0)}},[g,o.trigger,o.valueNode,u,f,S,A,w,o.dir,r]);Gn(()=>k(),[k]);const[R,M]=v.useState();Gn(()=>{f&&M(window.getComputedStyle(f).zIndex)},[f]);const O=v.useCallback(D=>{D&&E.current===!0&&(k(),_==null||_(),E.current=!1)},[k,_]);return b.jsx(JG,{scope:n,contentWrapper:u,shouldExpandOnScrollRef:y,onScrollButtonChange:O,children:b.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:b.jsx(tt.div,{...s,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});n6.displayName=WG;var ZG="SelectPopperPosition",yy=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=ui,...o}=e,l=sp(n);return b.jsx(av,{...l,...o,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});yy.displayName=ZG;var[JG,gv]=vu(To,{}),xy="SelectViewport",r6=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,o=Aa(xy,n),l=gv(xy,n),u=_t(t,o.onViewportChange),d=v.useRef(0);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),b.jsx(rp.Slot,{scope:n,children:b.jsx(tt.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Ne(s.onScroll,f=>{const m=f.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:g}=l;if(g!=null&&g.current&&p){const y=Math.abs(d.current-m.scrollTop);if(y>0){const E=window.innerHeight-ui*2,S=parseFloat(p.style.minHeight),A=parseFloat(p.style.height),w=Math.max(S,A);if(w<E){const _=w+y,k=Math.min(E,_),R=_-k;p.style.height=k+"px",p.style.bottom==="0px"&&(m.scrollTop=R>0?R:0,p.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});r6.displayName=xy;var i6="SelectGroup",[eX,tX]=vu(i6),nX=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=ji();return b.jsx(eX,{scope:n,id:s,children:b.jsx(tt.div,{role:"group","aria-labelledby":s,...r,ref:t})})});nX.displayName=i6;var s6="SelectLabel",rX=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=tX(s6,n);return b.jsx(tt.div,{id:s.id,...r,ref:t})});rX.displayName=s6;var Tm="SelectItem",[iX,a6]=vu(Tm),o6=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:o,...l}=e,u=wa(Tm,n),d=Aa(Tm,n),f=u.value===r,[m,p]=v.useState(o??""),[g,y]=v.useState(!1),E=_t(t,_=>{var k;return(k=d.itemRefCallback)==null?void 0:k.call(d,_,r,s)}),S=ji(),A=v.useRef("touch"),w=()=>{s||(u.onValueChange(r),u.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return b.jsx(iX,{scope:n,value:r,disabled:s,textId:S,isSelected:f,onItemTextChange:v.useCallback(_=>{p(k=>k||((_==null?void 0:_.textContent)??"").trim())},[]),children:b.jsx(rp.ItemSlot,{scope:n,value:r,disabled:s,textValue:m,children:b.jsx(tt.div,{role:"option","aria-labelledby":S,"data-highlighted":g?"":void 0,"aria-selected":f&&g,"data-state":f?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...l,ref:E,onFocus:Ne(l.onFocus,()=>y(!0)),onBlur:Ne(l.onBlur,()=>y(!1)),onClick:Ne(l.onClick,()=>{A.current!=="mouse"&&w()}),onPointerUp:Ne(l.onPointerUp,()=>{A.current==="mouse"&&w()}),onPointerDown:Ne(l.onPointerDown,_=>{A.current=_.pointerType}),onPointerMove:Ne(l.onPointerMove,_=>{var k;A.current=_.pointerType,s?(k=d.onItemLeave)==null||k.call(d):A.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ne(l.onPointerLeave,_=>{var k;_.currentTarget===document.activeElement&&((k=d.onItemLeave)==null||k.call(d))}),onKeyDown:Ne(l.onKeyDown,_=>{var R;((R=d.searchRef)==null?void 0:R.current)!==""&&_.key===" "||(zG.includes(_.key)&&w(),_.key===" "&&_.preventDefault())})})})})});o6.displayName=Tm;var Lc="SelectItemText",l6=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...o}=e,l=wa(Lc,n),u=Aa(Lc,n),d=a6(Lc,n),f=YG(Lc,n),[m,p]=v.useState(null),g=_t(t,w=>p(w),d.onItemTextChange,w=>{var _;return(_=u.itemTextRefCallback)==null?void 0:_.call(u,w,d.value,d.disabled)}),y=m==null?void 0:m.textContent,E=v.useMemo(()=>b.jsx("option",{value:d.value,disabled:d.disabled,children:y},d.value),[d.disabled,d.value,y]),{onNativeOptionAdd:S,onNativeOptionRemove:A}=f;return Gn(()=>(S(E),()=>A(E)),[S,A,E]),b.jsxs(b.Fragment,{children:[b.jsx(tt.span,{id:d.textId,...o,ref:g}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?ko.createPortal(o.children,l.valueNode):null]})});l6.displayName=Lc;var u6="SelectItemIndicator",c6=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a6(u6,n).isSelected?b.jsx(tt.span,{"aria-hidden":!0,...r,ref:t}):null});c6.displayName=u6;var vy="SelectScrollUpButton",sX=v.forwardRef((e,t)=>{const n=Aa(vy,e.__scopeSelect),r=gv(vy,e.__scopeSelect),[s,o]=v.useState(!1),l=_t(t,r.onScrollButtonChange);return Gn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollTop>0;o(f)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),s?b.jsx(f6,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop-d.offsetHeight)}}):null});sX.displayName=vy;var Ey="SelectScrollDownButton",aX=v.forwardRef((e,t)=>{const n=Aa(Ey,e.__scopeSelect),r=gv(Ey,e.__scopeSelect),[s,o]=v.useState(!1),l=_t(t,r.onScrollButtonChange);return Gn(()=>{if(n.viewport&&n.isPositioned){let u=function(){const f=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<f;o(m)};const d=n.viewport;return u(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[n.viewport,n.isPositioned]),s?b.jsx(f6,{...e,ref:l,onAutoScroll:()=>{const{viewport:u,selectedItem:d}=n;u&&d&&(u.scrollTop=u.scrollTop+d.offsetHeight)}}):null});aX.displayName=Ey;var f6=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,o=Aa("SelectScrollButton",n),l=v.useRef(null),u=ip(n),d=v.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return v.useEffect(()=>()=>d(),[d]),Gn(()=>{var m;const f=u().find(p=>p.ref.current===document.activeElement);(m=f==null?void 0:f.ref.current)==null||m.scrollIntoView({block:"nearest"})},[u]),b.jsx(tt.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:Ne(s.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:Ne(s.onPointerMove,()=>{var f;(f=o.onItemLeave)==null||f.call(o),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:Ne(s.onPointerLeave,()=>{d()})})}),oX="SelectSeparator",lX=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return b.jsx(tt.div,{"aria-hidden":!0,...r,ref:t})});lX.displayName=oX;var Ty="SelectArrow",uX=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=sp(n),o=wa(Ty,n),l=Aa(Ty,n);return o.open&&l.position==="popper"?b.jsx(ov,{...s,...r,ref:t}):null});uX.displayName=Ty;var cX="SelectBubbleInput",d6=v.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=v.useRef(null),o=_t(r,s),l=UD(t);return v.useEffect(()=>{const u=s.current;if(!u)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(l!==t&&m){const p=new Event("change",{bubbles:!0});m.call(u,t),u.dispatchEvent(p)}},[l,t]),b.jsx(tt.select,{...n,style:{...BD,...n.style},ref:o,defaultValue:t})});d6.displayName=cX;function h6(e){return e===""||e===void 0}function m6(e){const t=Hi(e),n=v.useRef(""),r=v.useRef(0),s=v.useCallback(l=>{const u=n.current+l;t(u),(function d(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>d(""),1e3))})(u)},[t]),o=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,o]}function p6(e,t,n){const s=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=fX(e,Math.max(o,0));s.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.textValue.toLowerCase().startsWith(s.toLowerCase()));return d!==n?d:void 0}function fX(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var dX=YD,g6=XD,hX=QD,mX=WD,pX=ZD,b6=JD,gX=r6,y6=o6,bX=l6,yX=c6,ap="Switch",[xX]=Vi(ap),[vX,EX]=xX(ap),x6=v.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:o,required:l,disabled:u,value:d="on",onCheckedChange:f,form:m,...p}=e,[g,y]=v.useState(null),E=_t(t,k=>y(k)),S=v.useRef(!1),A=g?m||!!g.closest("form"):!0,[w,_]=xa({prop:s,defaultProp:o??!1,onChange:f,caller:ap});return b.jsxs(vX,{scope:n,checked:w,disabled:u,children:[b.jsx(tt.button,{type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":S6(w),"data-disabled":u?"":void 0,disabled:u,value:d,...p,ref:E,onClick:Ne(e.onClick,k=>{_(R=>!R),A&&(S.current=k.isPropagationStopped(),S.current||k.stopPropagation())})}),A&&b.jsx(T6,{control:g,bubbles:!S.current,name:r,value:d,checked:w,required:l,disabled:u,form:m,style:{transform:"translateX(-100%)"}})]})});x6.displayName=ap;var v6="SwitchThumb",E6=v.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,s=EX(v6,n);return b.jsx(tt.span,{"data-state":S6(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})});E6.displayName=v6;var TX="SwitchBubbleInput",T6=v.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...s},o)=>{const l=v.useRef(null),u=_t(l,o),d=UD(n),f=LO(t);return v.useEffect(()=>{const m=l.current;if(!m)return;const p=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(p,"checked").set;if(d!==n&&y){const E=new Event("click",{bubbles:r});y.call(m,n),m.dispatchEvent(E)}},[d,n,r]),b.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:u,style:{...s.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});T6.displayName=TX;function S6(e){return e?"checked":"unchecked"}var C6=x6,SX=E6,op="Tabs",[CX]=Vi(op,[Qm]),w6=Qm(),[wX,bv]=CX(op),A6=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:o,orientation:l="horizontal",dir:u,activationMode:d="automatic",...f}=e,m=$m(u),[p,g]=xa({prop:r,onChange:s,defaultProp:o??"",caller:op});return b.jsx(wX,{scope:n,baseId:ji(),value:p,onValueChange:g,orientation:l,dir:m,activationMode:d,children:b.jsx(tt.div,{dir:m,"data-orientation":l,...f,ref:t})})});A6.displayName=op;var _6="TabsList",k6=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,o=bv(_6,n),l=w6(n);return b.jsx(QO,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:b.jsx(tt.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});k6.displayName=_6;var N6="TabsTrigger",R6=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...o}=e,l=bv(N6,n),u=w6(n),d=M6(l.baseId,r),f=I6(l.baseId,r),m=r===l.value;return b.jsx(WO,{asChild:!0,...u,focusable:!s,active:m,children:b.jsx(tt.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":f,"data-state":m?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:d,...o,ref:t,onMouseDown:Ne(e.onMouseDown,p=>{!s&&p.button===0&&p.ctrlKey===!1?l.onValueChange(r):p.preventDefault()}),onKeyDown:Ne(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&l.onValueChange(r)}),onFocus:Ne(e.onFocus,()=>{const p=l.activationMode!=="manual";!m&&!s&&p&&l.onValueChange(r)})})})});R6.displayName=N6;var O6="TabsContent",D6=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:o,...l}=e,u=bv(O6,n),d=M6(u.baseId,r),f=I6(u.baseId,r),m=r===u.value,p=v.useRef(m);return v.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),b.jsx(xi,{present:s||m,children:({present:g})=>b.jsx(tt.div,{"data-state":m?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":d,hidden:!g,id:f,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&o})})});D6.displayName=O6;function M6(e,t){return`${e}-trigger-${t}`}function I6(e,t){return`${e}-content-${t}`}var AX=A6,L6=k6,P6=R6,j6=D6;function _X({...e}){return b.jsx(jG,{"data-slot":"hover-card",...e})}function kX({...e}){return b.jsx(BG,{"data-slot":"hover-card-trigger",...e})}function NX({className:e,align:t="center",sideOffset:n=4,...r}){return b.jsx(UG,{"data-slot":"hover-card-portal",children:b.jsx(FG,{"data-slot":"hover-card-content",align:t,sideOffset:n,className:Ye("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}function Ja({className:e,children:t,...n}){return b.jsx("kbd",{className:Ye("bg-muted text-muted-foreground pointer-events-none hidden h-5 items-center gap-1 rounded border px-1.5 font-mono text-[10px] font-medium select-none md:inline-flex",e),...n,children:t})}var RX=Symbol.for("react.lazy"),Sm=Yy[" use ".trim().toString()];function OX(e){return typeof e=="object"&&e!==null&&"then"in e}function B6(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===RX&&"_payload"in e&&OX(e._payload)}function DX(e){const t=MX(e),n=v.forwardRef((r,s)=>{let{children:o,...l}=r;B6(o)&&typeof Sm=="function"&&(o=Sm(o._payload));const u=v.Children.toArray(o),d=u.find(LX);if(d){const f=d.props.children,m=u.map(p=>p===d?v.Children.count(f)>1?v.Children.only(null):v.isValidElement(f)?f.props.children:null:p);return b.jsx(t,{...l,ref:s,children:v.isValidElement(f)?v.cloneElement(f,void 0,m):null})}return b.jsx(t,{...l,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}function MX(e){const t=v.forwardRef((n,r)=>{let{children:s,...o}=n;if(B6(s)&&typeof Sm=="function"&&(s=Sm(s._payload)),v.isValidElement(s)){const l=jX(s),u=PX(o,s.props);return s.type!==v.Fragment&&(u.ref=r?Mf(r,l):l),v.cloneElement(s,u)}return v.Children.count(s)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var IX=Symbol("radix.slottable");function LX(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===IX}function PX(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...u)=>{const d=o(...u);return s(...u),d}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function jX(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var BX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],U6=BX.reduce((e,t)=>{const n=DX(`Primitive.${t}`),r=v.forwardRef((s,o)=>{const{asChild:l,...u}=s,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(d,{...u,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),UX="Label",F6=v.forwardRef((e,t)=>b.jsx(U6.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));F6.displayName=UX;var H6=F6;const z6=v.forwardRef(({className:e,...t},n)=>b.jsx(H6,{ref:n,className:Ye("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));z6.displayName=H6.displayName;function V6({path:e,maxSegments:t,onSegmentClick:n,size:r="md"}){if(!e)return null;const s=e.split("/").filter(Boolean),o=t!=null&&s.length>t,l=o?s.slice(-t):s,u=s.length-l.length,d=r==="sm"?"text-2xs":"text-xs",f="size-(--size-icon-xs)",m=r==="sm"?"max-w-[80px]":"max-w-[120px]";return b.jsxs("div",{className:"flex min-w-0 items-center gap-0.5 overflow-hidden",children:[o&&b.jsxs(b.Fragment,{children:[b.jsx("span",{className:`${d} text-muted-foreground/50 flex-shrink-0`,children:"..."}),b.jsx(ff,{className:`${f} text-muted-foreground/40 flex-shrink-0`})]}),l.map((p,g)=>{const y=u+g,E="/"+s.slice(0,y+1).join("/"),S=y===s.length-1,A=`${d} truncate ${m} ${S?"font-medium text-foreground":"text-muted-foreground"}`;return b.jsxs("span",{className:`flex items-center ${S?"flex-shrink-0":"min-w-0"}`,children:[g>0&&b.jsx(ff,{className:`${f} text-muted-foreground/40 flex-shrink-0`}),n?b.jsx("button",{onClick:()=>n(E),className:`hover:bg-accent rounded px-1 py-0.5 transition-colors ${A}`,children:p}):b.jsx("span",{className:A,children:p})]},E)})]})}const Hf=v.createContext({isDesktop:!0});function yv({children:e,...t}){const n=!_o(),r=n?nq:$x;return b.jsx(Hf.Provider,{value:{isDesktop:n},children:b.jsx(r,{...t,children:e})})}function xv({className:e,children:t,...n}){const{isDesktop:r}=v.useContext(Hf);return r?b.jsx(aO,{className:Ye("flex h-[75vh] flex-col",e),...n,children:t}):b.jsx(Yx,{className:Ye("flex h-[90vh] flex-col",e),children:t})}function vv({className:e,...t}){const{isDesktop:n}=v.useContext(Hf),r=n?oO:Gx;return b.jsx(r,{className:e,...t})}function Ev({className:e,...t}){const{isDesktop:n}=v.useContext(Hf),r=n?lO:Xx;return b.jsx(r,{className:e,...t})}function MA({className:e,...t}){const{isDesktop:n}=v.useContext(Hf),r=n?uO:TO;return b.jsx(r,{className:e,...t})}const Ta=v.createContext({isDesktop:!0,close:()=>{}});function q6({children:e,open:t,onOpenChange:n}){const r=!_o(),[s,o]=v.useState(!1),l=t??s,u=v.useCallback(f=>{o(f),n==null||n(f)},[n]),d=v.useCallback(()=>{u(!1)},[u]);return r?b.jsx(Ta.Provider,{value:{isDesktop:r,close:d},children:b.jsx(wG,{open:t,onOpenChange:n,children:e})}):b.jsx(Ta.Provider,{value:{isDesktop:r,close:d},children:b.jsx($x,{open:l,onOpenChange:u,children:e})})}function $6({className:e,children:t,...n}){const{isDesktop:r}=v.useContext(Ta),s=r?AG:Dq;return b.jsx(s,{className:e,...n,children:t})}function Y6({className:e,children:t,...n}){const{isDesktop:r}=v.useContext(Ta);return r?b.jsx(LD,{className:e,...n,children:t}):b.jsx(Yx,{children:b.jsx("div",{className:"pb-6",children:t})})}function G6({className:e,children:t,...n}){const{isDesktop:r}=v.useContext(Ta);return r?b.jsx(PD,{className:e,...n,children:t}):b.jsx(Gx,{className:"pb-2",children:b.jsx(Xx,{className:Ye("text-muted-foreground text-sm font-semibold",e),children:t})})}const X6=v.createContext({closeOnSelect:!0});function K6({value:e,onValueChange:t,closeOnSelect:n=!0,children:r,className:s}){const{isDesktop:o}=v.useContext(Ta);return o?b.jsx(_G,{value:e,onValueChange:t,className:s,children:r}):b.jsx(X6.Provider,{value:{value:e,onValueChange:t,closeOnSelect:n},children:b.jsx("div",{role:"radiogroup",className:Ye("flex flex-col",s),children:r})})}function Q6({value:e,children:t,icon:n,description:r,className:s}){const{isDesktop:o}=v.useContext(Ta);return o?b.jsx(jD,{value:e,className:s,children:n||r?b.jsxs("div",{className:"flex items-center gap-2",children:[n&&b.jsx(n,{className:"size-(--size-icon-xs) shrink-0"}),b.jsxs("div",{className:"text-left",children:[b.jsx("div",{children:t}),r&&b.jsx("div",{className:"text-muted-foreground text-[10px]",children:r})]})]}):t}):b.jsx(FX,{value:e,icon:n,description:r,className:s,children:t})}function FX({value:e,children:t,icon:n,description:r,className:s}){const{value:o,onValueChange:l,closeOnSelect:u}=v.useContext(X6),{close:d}=v.useContext(Ta),f=o===e;return b.jsxs("button",{role:"radio","aria-checked":f,className:Ye("border-border flex w-full items-center gap-3 border-b px-4 py-3 text-left transition-colors","active:bg-accent/50 min-h-[44px]","last:border-b-0",s),onClick:()=>{l==null||l(e),u&&d()},children:[n&&b.jsx(n,{className:"size-5 shrink-0"}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("div",{className:"text-[17px] leading-snug",children:t}),r&&b.jsx("div",{className:"text-muted-foreground text-[13px] leading-snug",children:r})]}),f&&b.jsx(Qr,{className:"text-primary size-5 shrink-0"})]})}const D1=dX,M1=hX,Qh=v.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(g6,{ref:r,className:Ye("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,b.jsx(mX,{asChild:!0,children:b.jsx(Fm,{className:"h-4 w-4 opacity-50"})})]}));Qh.displayName=g6.displayName;const Wh=v.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>b.jsx(pX,{children:b.jsx(b6,{ref:s,className:Ye("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:b.jsx(gX,{className:Ye("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));Wh.displayName=b6.displayName;const ta=v.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(y6,{ref:r,className:Ye("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[b.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(yX,{children:b.jsx(Qr,{className:"h-4 w-4"})})}),b.jsx(bX,{children:t})]}));ta.displayName=y6.displayName;var HX="Separator",IA="horizontal",zX=["horizontal","vertical"],W6=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=IA,...s}=e,o=VX(r)?r:IA,u=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return b.jsx(U6.div,{"data-orientation":o,...u,...s,ref:t})});W6.displayName=HX;function VX(e){return zX.includes(e)}var Z6=W6;const J6=v.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>b.jsx(Z6,{ref:s,decorative:n,orientation:t,className:Ye("bg-border shrink-0",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));J6.displayName=Z6.displayName;const kn=v.forwardRef(({className:e,...t},n)=>b.jsx(C6,{className:Ye("peer focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-input inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:n,children:b.jsx(SX,{className:Ye("bg-background pointer-events-none block h-4 w-4 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));kn.displayName=C6.displayName;const e4=AX,Tv=v.forwardRef(({className:e,...t},n)=>b.jsx(L6,{ref:n,className:Ye("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...t}));Tv.displayName=L6.displayName;const jl=v.forwardRef(({className:e,...t},n)=>b.jsx(P6,{ref:n,className:Ye("ring-offset-background inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all","focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50","data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));jl.displayName=P6.displayName;const Bl=v.forwardRef(({className:e,...t},n)=>b.jsx(j6,{ref:n,className:Ye("ring-offset-background mt-2","focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...t}));Bl.displayName=j6.displayName;function LA(e){try{return new Date(e).toLocaleString([],{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return e}}function qX({text:e,label:t}){const[n,r]=v.useState(!1),s=v.useCallback(async o=>{o.stopPropagation();try{await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),Ui.COPY_FEEDBACK_MS)}catch{}},[e]);return b.jsx("button",{onClick:s,className:"hover:bg-secondary/80 text-muted-foreground/60 hover:text-muted-foreground rounded p-0.5 transition-colors duration-100 max-md:p-2","aria-label":`Copy ${t}`,children:n?b.jsx(Qr,{className:"size-(--size-icon-xs) text-green-500"}):b.jsx(Mx,{className:"size-(--size-icon-xs)"})})}function $X({session:e,isActive:t,onClick:n,isNew:r=!1}){const[s,o]=v.useState(!1),l=_o(),u=e.permissionMode==="bypassPermissions",d=r?dt.div:"div",f=r?{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},transition:{duration:.2,ease:[0,0,.2,1]}}:{};function m(p){p.stopPropagation(),o(g=>!g)}return b.jsxs(d,{...f,className:Ye("group rounded-lg transition-colors duration-150",t?"bg-secondary text-foreground border-primary border-l-2":"hover:bg-secondary/50 border-l-2 border-transparent"),children:[b.jsxs("div",{role:"button",tabIndex:0,onClick:()=>{l&&o(p=>!p),n()},onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),l&&o(g=>!g),n())},className:"cursor-pointer px-3 py-2",children:[b.jsxs("div",{className:"text-muted-foreground flex items-center gap-1 text-xs",children:[b.jsx("span",{className:"min-w-0 flex-1",children:Mk(e.updatedAt)}),b.jsxs("span",{className:"flex flex-shrink-0 items-center gap-1",children:[u&&b.jsx(kR,{className:"size-(--size-icon-xs) text-red-500","aria-label":"Permissions skipped"}),b.jsx("button",{onClick:m,className:Ye("rounded p-0.5 transition-all duration-150 max-md:hidden max-md:p-2",s?"text-muted-foreground opacity-100":"text-muted-foreground/60 hover:text-muted-foreground opacity-0 group-hover:opacity-100"),"aria-label":"Session details",children:b.jsx(dt.div,{animate:{rotate:s?180:0},transition:{type:"spring",stiffness:400,damping:30},children:b.jsx(Fm,{className:"size-(--size-icon-sm)"})})})]})]}),b.jsx("div",{className:"text-muted-foreground/70 mt-0.5 truncate text-xs",children:e.title})]}),b.jsx(Sn,{initial:!1,children:s&&b.jsx(dt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:[0,0,.2,1]},className:"overflow-hidden",children:b.jsxs("div",{className:"text-muted-foreground border-border/30 mx-2 space-y-1.5 border-t px-3 pt-2 pb-2 text-[11px]",children:[b.jsx(kh,{label:"Session ID",value:e.id,copyable:!0}),b.jsx(kh,{label:"Created",value:LA(e.createdAt)}),b.jsx(kh,{label:"Updated",value:LA(e.updatedAt)}),b.jsx(kh,{label:"Permissions",value:u?"Skip (unsafe)":"Default"})]})})})]})}function kh({label:e,value:t,copyable:n=!1}){return b.jsxs("div",{className:"flex items-start gap-2",children:[b.jsx("span",{className:"text-muted-foreground/60 w-16 flex-shrink-0",children:e}),b.jsx("span",{className:"min-w-0 flex-1 truncate font-mono select-all",children:t}),n&&b.jsx(qX,{text:t,label:e})]})}function YX(e,t){if(e.length===0||e.length===1&&e[0].path===t)return"browse";try{const n=localStorage.getItem(er.PICKER_VIEW);if(n){const r=JSON.parse(n);if(Date.now()-new Date(r.timestamp).getTime()<480*60*1e3)return r.view}}catch{}return"recent"}function GX({open:e,onOpenChange:t}){const n=ln(),[r,s]=Im(),{recentCwds:o}=Xt(),[l,u]=v.useState(r||""),[d,f]=v.useState(!1),[m,p]=v.useState(()=>YX(o,r)),g=v.useCallback(()=>t(!1),[t]),{data:y,isLoading:E}=xr({queryKey:["directory",l,d],queryFn:()=>n.browseDirectory(l||void 0,d),placeholderData:R=>R,staleTime:3e4}),S=v.useCallback(()=>{y!=null&&y.path&&(s(y.path),g())},[y==null?void 0:y.path,s,g]),A=v.useCallback(R=>{p(R);try{localStorage.setItem(er.PICKER_VIEW,JSON.stringify({view:R,timestamp:new Date().toISOString()}))}catch{}},[]),w=v.useCallback(R=>{u(R),p("browse")},[]),_=v.useCallback(R=>{s(R),g()},[s,g]),k=(R,M)=>`p-1.5 transition-colors ${M==="left"?"rounded-l-md":"rounded-r-md"} ${R?"bg-accent text-foreground":"text-muted-foreground/40 hover:text-muted-foreground"}`;return b.jsx(yv,{open:e,onOpenChange:t,children:b.jsxs(xv,{className:"max-w-lg gap-0 overflow-hidden p-0 sm:rounded-xl",children:[b.jsx(vv,{className:"space-y-0 border-b px-4 py-3",children:b.jsx(Ev,{className:"text-sm font-medium",children:"Select Working Directory"})}),b.jsxs("div",{className:"bg-muted/30 flex items-center gap-2 overflow-x-auto border-b px-4 py-2",children:[b.jsxs("div",{className:"flex flex-shrink-0 items-center rounded-md border",children:[o.length>0&&b.jsx("button",{onClick:()=>A("recent"),className:k(m==="recent","left"),"aria-label":"Recent directories",title:"Recent",children:b.jsx(wH,{className:"size-(--size-icon-sm)"})}),b.jsx("button",{onClick:()=>{A("browse"),w("")},className:k(m==="browse",o.length>0?"right":"left"),"aria-label":"Browse directories",title:"Browse",children:b.jsx(qc,{className:"size-(--size-icon-sm)"})})]}),m==="browse"?b.jsxs(b.Fragment,{children:[b.jsx(V6,{path:(y==null?void 0:y.path)??null,maxSegments:5,onSegmentClick:w,size:"md"}),b.jsx("div",{className:"flex-1"}),b.jsx("button",{onClick:()=>f(!d),className:"hover:bg-accent flex-shrink-0 rounded p-1 transition-colors max-md:p-2","aria-label":d?"Hide hidden folders":"Show hidden folders",title:d?"Hide hidden folders":"Show hidden folders",children:d?b.jsx(LH,{className:"text-muted-foreground size-(--size-icon-sm)"}):b.jsx(MH,{className:"text-muted-foreground size-(--size-icon-sm)"})})]}):b.jsx("span",{className:"text-muted-foreground px-1 text-xs",children:"Recent"})]}),b.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:m==="browse"?b.jsx(b.Fragment,{children:E&&!y?b.jsx("div",{className:"flex h-20 items-center justify-center",children:b.jsx(df,{className:"text-muted-foreground size-(--size-icon-md) animate-spin"})}):(y==null?void 0:y.entries.length)===0?b.jsx("div",{className:"flex h-20 items-center justify-center",children:b.jsx("p",{className:"text-muted-foreground/60 text-xs",children:"No subdirectories"})}):b.jsxs("div",{className:"py-1",children:[(y==null?void 0:y.parent)&&b.jsxs("button",{onClick:()=>w(y.parent),className:"hover:bg-accent flex w-full items-center gap-2 px-4 py-1.5 text-left transition-colors",children:[b.jsx(qc,{className:"text-muted-foreground size-(--size-icon-md)"}),b.jsx("span",{className:"text-muted-foreground text-sm",children:".."})]}),y==null?void 0:y.entries.map(R=>b.jsxs("button",{onClick:()=>w(R.path),className:"hover:bg-accent flex w-full items-center gap-2 px-4 py-1.5 text-left transition-colors",children:[b.jsx(AR,{className:"text-muted-foreground size-(--size-icon-md)"}),b.jsx("span",{className:"truncate text-sm",children:R.name})]},R.path))]})}):b.jsx("div",{className:"py-1",children:o.slice(0,10).map(R=>b.jsxs("button",{onClick:()=>_(R.path),className:"hover:bg-accent flex w-full items-center gap-2 px-4 py-1.5 text-left transition-colors",children:[b.jsx(qc,{className:"text-muted-foreground size-(--size-icon-md) flex-shrink-0"}),b.jsx("span",{className:"text-muted-foreground truncate text-sm",children:V9(R.path)}),b.jsx("span",{className:"text-muted-foreground/50 ml-auto flex-shrink-0 text-[11px]",children:Mk(R.accessedAt)})]},R.path))})}),b.jsxs("div",{className:"bg-muted/20 flex items-center justify-end gap-2 border-t px-4 py-3",children:[b.jsx("button",{onClick:g,className:"hover:bg-accent rounded-md px-3 py-1.5 text-xs transition-colors",children:"Cancel"}),b.jsx("button",{onClick:S,disabled:!(y!=null&&y.path)||m!=="browse",className:"bg-primary text-primary-foreground hover:bg-primary/90 rounded-md px-3 py-1.5 text-xs transition-colors disabled:opacity-50",children:"Select"})]})]})})}function XX({config:e,isLoading:t,onOpenTunnelDialog:n}){return b.jsxs("div",{className:"space-y-3",children:[b.jsx("h3",{className:"text-foreground text-sm font-semibold",children:"Server"}),t?b.jsx("div",{className:"space-y-2",children:Array.from({length:5}).map((r,s)=>b.jsxs("div",{className:"flex items-center justify-between py-1",children:[b.jsx("div",{className:"bg-muted h-4 w-24 animate-pulse rounded"}),b.jsx("div",{className:"bg-muted h-4 w-16 animate-pulse rounded"})]},s))}):e?b.jsxs("div",{className:"space-y-1",children:[b.jsx(wl,{label:"Version",value:e.version}),e.latestVersion&&QX(e.latestVersion,e.version)&&b.jsxs("div",{className:"bg-amber-50 dark:bg-amber-950/30 border-amber-200 dark:border-amber-800 -mx-1 rounded border px-2 py-1.5",children:[b.jsx("div",{className:"flex items-center justify-between",children:b.jsxs("span",{className:"text-amber-800 dark:text-amber-200 text-sm font-medium",children:["Update available: v",e.latestVersion]})}),b.jsxs("p",{className:"text-amber-700 dark:text-amber-300 mt-0.5 text-xs",children:["Run"," ",b.jsx("code",{className:"bg-amber-100 dark:bg-amber-900/50 rounded px-1 py-0.5 font-mono text-[10px]",children:"npm update -g dorkos"})," ","to update"]})]}),b.jsx(wl,{label:"Port",value:String(e.port)}),b.jsx(wl,{label:"Uptime",value:WX(e.uptime)}),b.jsx(wl,{label:"Working Directory",value:e.workingDirectory,mono:!0,truncate:!0}),b.jsx(wl,{label:"Node.js",value:e.nodeVersion}),b.jsx(wl,{label:"Claude CLI",value:e.claudeCliPath||"Not found",mono:!0,truncate:!0,muted:!e.claudeCliPath}),b.jsxs("div",{className:"hover:bg-muted/50 -mx-1 flex items-center justify-between rounded px-1 py-1",children:[b.jsx("span",{className:"text-muted-foreground text-sm",children:"Tunnel"}),b.jsx("button",{onClick:n,className:"border-input hover:bg-accent hover:text-accent-foreground inline-flex items-center rounded-md border bg-transparent px-2.5 py-1 text-xs font-medium shadow-sm transition-colors",children:"Manage"})]})]}):null]})}function KX(){const[e,t]=v.useState(!1),n=v.useCallback(r=>{navigator.clipboard.writeText(r).then(()=>{t(!0),setTimeout(()=>t(!1),Ui.COPY_FEEDBACK_MS)})},[]);return{copied:e,copy:n}}function wl({label:e,value:t,mono:n,truncate:r,muted:s}){const{copied:o,copy:l}=KX();return b.jsxs("button",{type:"button",onClick:()=>l(t),className:"hover:bg-muted/50 active:bg-muted/70 -mx-1 flex w-full items-center justify-between gap-4 rounded px-1 py-1 transition-colors duration-100",children:[b.jsx("span",{className:"text-muted-foreground shrink-0 text-sm",children:e}),o?b.jsx("span",{className:"text-muted-foreground text-xs",children:"Copied"}):b.jsx("span",{className:Ye("text-right text-sm",n&&"font-mono",r&&"max-w-48 min-w-0 truncate",s&&"text-muted-foreground"),dir:r?"rtl":void 0,title:t,children:t})]})}function QX(e,t){const[n,r,s]=e.split(".").map(Number),[o,l,u]=t.split(".").map(Number);return n!==o?n>o:r!==l?r>l:s>u}function WX(e){const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60),s=[];return t>0&&s.push(`${t}h`),n>0&&s.push(`${n}m`),s.push(`${r}s`),s.join(" ")}var Al={},I1={exports:{}},L1,PA;function ZX(){if(PA)return L1;PA=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return L1=e,L1}var P1,jA;function JX(){if(jA)return P1;jA=1;var e=ZX();function t(){}function n(){}return n.resetWarningCache=t,P1=function(){function r(l,u,d,f,m,p){if(p!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}r.isRequired=r;function s(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},P1}var BA;function t4(){return BA||(BA=1,I1.exports=JX()()),I1.exports}var j1,UA;function n4(){return UA||(UA=1,j1={L:1,M:0,Q:3,H:2}),j1}var B1,FA;function r4(){return FA||(FA=1,B1={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),B1}var U1,HA;function eK(){if(HA)return U1;HA=1;var e=r4();function t(n){this.mode=e.MODE_8BIT_BYTE,this.data=n}return t.prototype={getLength:function(n){return this.data.length},write:function(n){for(var r=0;r<this.data.length;r++)n.put(this.data.charCodeAt(r),8)}},U1=t,U1}var F1,zA;function tK(){if(zA)return F1;zA=1;var e=n4();function t(n,r){this.totalCount=n,this.dataCount=r}return t.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t.getRSBlocks=function(n,r){var s=t.getRsBlockTable(n,r);if(s==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+r);for(var o=s.length/3,l=new Array,u=0;u<o;u++)for(var d=s[u*3+0],f=s[u*3+1],m=s[u*3+2],p=0;p<d;p++)l.push(new t(f,m));return l},t.getRsBlockTable=function(n,r){switch(r){case e.L:return t.RS_BLOCK_TABLE[(n-1)*4+0];case e.M:return t.RS_BLOCK_TABLE[(n-1)*4+1];case e.Q:return t.RS_BLOCK_TABLE[(n-1)*4+2];case e.H:return t.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},F1=t,F1}var H1,VA;function nK(){if(VA)return H1;VA=1;function e(){this.buffer=new Array,this.length=0}return e.prototype={get:function(t){var n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)==1},put:function(t,n){for(var r=0;r<n;r++)this.putBit((t>>>n-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},H1=e,H1}var z1,qA;function i4(){if(qA)return z1;qA=1;for(var e={glog:function(n){if(n<1)throw new Error("glog("+n+")");return e.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return e.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},t=0;t<8;t++)e.EXP_TABLE[t]=1<<t;for(var t=8;t<256;t++)e.EXP_TABLE[t]=e.EXP_TABLE[t-4]^e.EXP_TABLE[t-5]^e.EXP_TABLE[t-6]^e.EXP_TABLE[t-8];for(var t=0;t<255;t++)e.LOG_TABLE[e.EXP_TABLE[t]]=t;return z1=e,z1}var V1,$A;function s4(){if($A)return V1;$A=1;var e=i4();function t(n,r){if(n.length==null)throw new Error(n.length+"/"+r);for(var s=0;s<n.length&&n[s]==0;)s++;this.num=new Array(n.length-s+r);for(var o=0;o<n.length-s;o++)this.num[o]=n[o+s]}return t.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var r=new Array(this.getLength()+n.getLength()-1),s=0;s<this.getLength();s++)for(var o=0;o<n.getLength();o++)r[s+o]^=e.gexp(e.glog(this.get(s))+e.glog(n.get(o)));return new t(r,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var r=e.glog(this.get(0))-e.glog(n.get(0)),s=new Array(this.getLength()),o=0;o<this.getLength();o++)s[o]=this.get(o);for(var o=0;o<n.getLength();o++)s[o]^=e.gexp(e.glog(n.get(o))+r);return new t(s,0).mod(n)}},V1=t,V1}var q1,YA;function rK(){if(YA)return q1;YA=1;var e=r4(),t=s4(),n=i4(),r={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(o){for(var l=o<<10;s.getBCHDigit(l)-s.getBCHDigit(s.G15)>=0;)l^=s.G15<<s.getBCHDigit(l)-s.getBCHDigit(s.G15);return(o<<10|l)^s.G15_MASK},getBCHTypeNumber:function(o){for(var l=o<<12;s.getBCHDigit(l)-s.getBCHDigit(s.G18)>=0;)l^=s.G18<<s.getBCHDigit(l)-s.getBCHDigit(s.G18);return o<<12|l},getBCHDigit:function(o){for(var l=0;o!=0;)l++,o>>>=1;return l},getPatternPosition:function(o){return s.PATTERN_POSITION_TABLE[o-1]},getMask:function(o,l,u){switch(o){case r.PATTERN000:return(l+u)%2==0;case r.PATTERN001:return l%2==0;case r.PATTERN010:return u%3==0;case r.PATTERN011:return(l+u)%3==0;case r.PATTERN100:return(Math.floor(l/2)+Math.floor(u/3))%2==0;case r.PATTERN101:return l*u%2+l*u%3==0;case r.PATTERN110:return(l*u%2+l*u%3)%2==0;case r.PATTERN111:return(l*u%3+(l+u)%2)%2==0;default:throw new Error("bad maskPattern:"+o)}},getErrorCorrectPolynomial:function(o){for(var l=new t([1],0),u=0;u<o;u++)l=l.multiply(new t([1,n.gexp(u)],0));return l},getLengthInBits:function(o,l){if(1<=l&&l<10)switch(o){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+o)}else if(l<27)switch(o){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+o)}else if(l<41)switch(o){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+o)}else throw new Error("type:"+l)},getLostPoint:function(o){for(var l=o.getModuleCount(),u=0,d=0;d<l;d++)for(var f=0;f<l;f++){for(var m=0,p=o.isDark(d,f),g=-1;g<=1;g++)if(!(d+g<0||l<=d+g))for(var y=-1;y<=1;y++)f+y<0||l<=f+y||g==0&&y==0||p==o.isDark(d+g,f+y)&&m++;m>5&&(u+=3+m-5)}for(var d=0;d<l-1;d++)for(var f=0;f<l-1;f++){var E=0;o.isDark(d,f)&&E++,o.isDark(d+1,f)&&E++,o.isDark(d,f+1)&&E++,o.isDark(d+1,f+1)&&E++,(E==0||E==4)&&(u+=3)}for(var d=0;d<l;d++)for(var f=0;f<l-6;f++)o.isDark(d,f)&&!o.isDark(d,f+1)&&o.isDark(d,f+2)&&o.isDark(d,f+3)&&o.isDark(d,f+4)&&!o.isDark(d,f+5)&&o.isDark(d,f+6)&&(u+=40);for(var f=0;f<l;f++)for(var d=0;d<l-6;d++)o.isDark(d,f)&&!o.isDark(d+1,f)&&o.isDark(d+2,f)&&o.isDark(d+3,f)&&o.isDark(d+4,f)&&!o.isDark(d+5,f)&&o.isDark(d+6,f)&&(u+=40);for(var S=0,f=0;f<l;f++)for(var d=0;d<l;d++)o.isDark(d,f)&&S++;var A=Math.abs(100*S/l/l-50)/5;return u+=A*10,u}};return q1=s,q1}var $1,GA;function iK(){if(GA)return $1;GA=1;var e=eK(),t=tK(),n=nK(),r=rK(),s=s4();function o(u,d){this.typeNumber=u,this.errorCorrectLevel=d,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var l=o.prototype;return l.addData=function(u){var d=new e(u);this.dataList.push(d),this.dataCache=null},l.isDark=function(u,d){if(u<0||this.moduleCount<=u||d<0||this.moduleCount<=d)throw new Error(u+","+d);return this.modules[u][d]},l.getModuleCount=function(){return this.moduleCount},l.make=function(){if(this.typeNumber<1){var u=1;for(u=1;u<40;u++){for(var d=t.getRSBlocks(u,this.errorCorrectLevel),f=new n,m=0,p=0;p<d.length;p++)m+=d[p].dataCount;for(var p=0;p<this.dataList.length;p++){var g=this.dataList[p];f.put(g.mode,4),f.put(g.getLength(),r.getLengthInBits(g.mode,u)),g.write(f)}if(f.getLengthInBits()<=m*8)break}this.typeNumber=u}this.makeImpl(!1,this.getBestMaskPattern())},l.makeImpl=function(u,d){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var f=0;f<this.moduleCount;f++){this.modules[f]=new Array(this.moduleCount);for(var m=0;m<this.moduleCount;m++)this.modules[f][m]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(u,d),this.typeNumber>=7&&this.setupTypeNumber(u),this.dataCache==null&&(this.dataCache=o.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,d)},l.setupPositionProbePattern=function(u,d){for(var f=-1;f<=7;f++)if(!(u+f<=-1||this.moduleCount<=u+f))for(var m=-1;m<=7;m++)d+m<=-1||this.moduleCount<=d+m||(0<=f&&f<=6&&(m==0||m==6)||0<=m&&m<=6&&(f==0||f==6)||2<=f&&f<=4&&2<=m&&m<=4?this.modules[u+f][d+m]=!0:this.modules[u+f][d+m]=!1)},l.getBestMaskPattern=function(){for(var u=0,d=0,f=0;f<8;f++){this.makeImpl(!0,f);var m=r.getLostPoint(this);(f==0||u>m)&&(u=m,d=f)}return d},l.createMovieClip=function(u,d,f){var m=u.createEmptyMovieClip(d,f),p=1;this.make();for(var g=0;g<this.modules.length;g++)for(var y=g*p,E=0;E<this.modules[g].length;E++){var S=E*p,A=this.modules[g][E];A&&(m.beginFill(0,100),m.moveTo(S,y),m.lineTo(S+p,y),m.lineTo(S+p,y+p),m.lineTo(S,y+p),m.endFill())}return m},l.setupTimingPattern=function(){for(var u=8;u<this.moduleCount-8;u++)this.modules[u][6]==null&&(this.modules[u][6]=u%2==0);for(var d=8;d<this.moduleCount-8;d++)this.modules[6][d]==null&&(this.modules[6][d]=d%2==0)},l.setupPositionAdjustPattern=function(){for(var u=r.getPatternPosition(this.typeNumber),d=0;d<u.length;d++)for(var f=0;f<u.length;f++){var m=u[d],p=u[f];if(this.modules[m][p]==null)for(var g=-2;g<=2;g++)for(var y=-2;y<=2;y++)g==-2||g==2||y==-2||y==2||g==0&&y==0?this.modules[m+g][p+y]=!0:this.modules[m+g][p+y]=!1}},l.setupTypeNumber=function(u){for(var d=r.getBCHTypeNumber(this.typeNumber),f=0;f<18;f++){var m=!u&&(d>>f&1)==1;this.modules[Math.floor(f/3)][f%3+this.moduleCount-8-3]=m}for(var f=0;f<18;f++){var m=!u&&(d>>f&1)==1;this.modules[f%3+this.moduleCount-8-3][Math.floor(f/3)]=m}},l.setupTypeInfo=function(u,d){for(var f=this.errorCorrectLevel<<3|d,m=r.getBCHTypeInfo(f),p=0;p<15;p++){var g=!u&&(m>>p&1)==1;p<6?this.modules[p][8]=g:p<8?this.modules[p+1][8]=g:this.modules[this.moduleCount-15+p][8]=g}for(var p=0;p<15;p++){var g=!u&&(m>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=g:p<9?this.modules[8][15-p-1+1]=g:this.modules[8][15-p-1]=g}this.modules[this.moduleCount-8][8]=!u},l.mapData=function(u,d){for(var f=-1,m=this.moduleCount-1,p=7,g=0,y=this.moduleCount-1;y>0;y-=2)for(y==6&&y--;;){for(var E=0;E<2;E++)if(this.modules[m][y-E]==null){var S=!1;g<u.length&&(S=(u[g]>>>p&1)==1);var A=r.getMask(d,m,y-E);A&&(S=!S),this.modules[m][y-E]=S,p--,p==-1&&(g++,p=7)}if(m+=f,m<0||this.moduleCount<=m){m-=f,f=-f;break}}},o.PAD0=236,o.PAD1=17,o.createData=function(u,d,f){for(var m=t.getRSBlocks(u,d),p=new n,g=0;g<f.length;g++){var y=f[g];p.put(y.mode,4),p.put(y.getLength(),r.getLengthInBits(y.mode,u)),y.write(p)}for(var E=0,g=0;g<m.length;g++)E+=m[g].dataCount;if(p.getLengthInBits()>E*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+E*8+")");for(p.getLengthInBits()+4<=E*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=E*8||(p.put(o.PAD0,8),p.getLengthInBits()>=E*8));)p.put(o.PAD1,8);return o.createBytes(p,m)},o.createBytes=function(u,d){for(var f=0,m=0,p=0,g=new Array(d.length),y=new Array(d.length),E=0;E<d.length;E++){var S=d[E].dataCount,A=d[E].totalCount-S;m=Math.max(m,S),p=Math.max(p,A),g[E]=new Array(S);for(var w=0;w<g[E].length;w++)g[E][w]=255&u.buffer[w+f];f+=S;var _=r.getErrorCorrectPolynomial(A),k=new s(g[E],_.getLength()-1),R=k.mod(_);y[E]=new Array(_.getLength()-1);for(var w=0;w<y[E].length;w++){var M=w+R.getLength()-y[E].length;y[E][w]=M>=0?R.get(M):0}}for(var O=0,w=0;w<d.length;w++)O+=d[w].totalCount;for(var D=new Array(O),P=0,w=0;w<m;w++)for(var E=0;E<d.length;E++)w<g[E].length&&(D[P++]=g[E][w]);for(var w=0;w<p;w++)for(var E=0;E<d.length;E++)w<y[E].length&&(D[P++]=y[E][w]);return D},$1=o,$1}var Nh={},XA;function sK(){if(XA)return Nh;XA=1,Object.defineProperty(Nh,"__esModule",{value:!0});var e=Object.assign||function(f){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(f[g]=p[g])}return f},t=t4(),n=o(t),r=wf(),s=o(r);function o(f){return f&&f.__esModule?f:{default:f}}function l(f,m){var p={};for(var g in f)m.indexOf(g)>=0||Object.prototype.hasOwnProperty.call(f,g)&&(p[g]=f[g]);return p}var u={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},d=(0,r.forwardRef)(function(f,m){var p=f.bgColor,g=f.bgD,y=f.fgD,E=f.fgColor,S=f.size,A=f.title,w=f.viewBoxSize,_=f.xmlns,k=_===void 0?"http://www.w3.org/2000/svg":_,R=l(f,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return s.default.createElement("svg",e({},R,{height:S,ref:m,viewBox:"0 0 "+w+" "+w,width:S,xmlns:k}),A?s.default.createElement("title",null,A):null,s.default.createElement("path",{d:g,fill:p}),s.default.createElement("path",{d:y,fill:E}))});return d.displayName="QRCodeSvg",d.propTypes=u,Nh.default=d,Nh}var KA;function aK(){if(KA)return Al;KA=1,Object.defineProperty(Al,"__esModule",{value:!0}),Al.QRCode=void 0;var e=Object.assign||function(S){for(var A=1;A<arguments.length;A++){var w=arguments[A];for(var _ in w)Object.prototype.hasOwnProperty.call(w,_)&&(S[_]=w[_])}return S},t=t4(),n=p(t),r=n4(),s=p(r),o=iK(),l=p(o),u=wf(),d=p(u),f=sK(),m=p(f);function p(S){return S&&S.__esModule?S:{default:S}}function g(S,A){var w={};for(var _ in S)A.indexOf(_)>=0||Object.prototype.hasOwnProperty.call(S,_)&&(w[_]=S[_]);return w}var y={bgColor:n.default.oneOfType([n.default.object,n.default.string]),fgColor:n.default.oneOfType([n.default.object,n.default.string]),level:n.default.string,size:n.default.number,value:n.default.string.isRequired},E=(0,u.forwardRef)(function(S,A){var w=S.bgColor,_=w===void 0?"#FFFFFF":w,k=S.fgColor,R=k===void 0?"#000000":k,M=S.level,O=M===void 0?"L":M,D=S.size,P=D===void 0?256:D,z=S.value,j=g(S,["bgColor","fgColor","level","size","value"]),K=new l.default(-1,s.default[O]);K.addData(z),K.make();var Y=K.modules;return d.default.createElement(m.default,e({},j,{bgColor:_,bgD:Y.map(function(J,te){return J.map(function(W,I){return W?"":"M "+I+" "+te+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:R,fgD:Y.map(function(J,te){return J.map(function(W,I){return W?"M "+I+" "+te+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:A,size:P,viewBoxSize:Y.length}))});return Al.QRCode=E,E.displayName="QRCode",E.propTypes=y,Al.default=E,Al}var oK=aK();const lK=Ao(oK),uK=15e3;function cK(e){return/auth|token|ERR_NGROK_105/i.test(e)?"Check your auth token at dashboard.ngrok.com":/timeout|ETIMEDOUT/i.test(e)?"Connection timed out. Check your network.":/limit|ERR_NGROK_108/i.test(e)?"Tunnel limit reached. Free ngrok accounts allow one active tunnel.":e}function a4({open:e,onOpenChange:t}){const n=ln(),r=yi(),{data:s}=xr({queryKey:["config"],queryFn:()=>n.getConfig(),staleTime:300*1e3}),o=s==null?void 0:s.tunnel,[l,u]=v.useState("off"),[d,f]=v.useState(null),[m,p]=v.useState(null),[g,y]=v.useState(""),[E,S]=v.useState(null),[A,w]=v.useState(!1),[_,k]=v.useState(!1);v.useEffect(()=>{o!=null&&o.connected&&(o!=null&&o.url)?(u("connected"),f(o.url)):l!=="starting"&&l!=="stopping"&&(u("off"),f(null))},[o==null?void 0:o.connected,o==null?void 0:o.url]);const R=v.useCallback(async j=>{if(j){u("starting"),p(null);const K=setTimeout(()=>{u("error"),p("Connection timed out after 15 seconds")},uK);try{const Y=await n.startTunnel();clearTimeout(K),u("connected"),f(Y.url),r.invalidateQueries({queryKey:["config"]})}catch(Y){clearTimeout(K),u("error"),p(Y instanceof Error?Y.message:"Failed to start tunnel")}}else{u("off"),f(null),p(null);try{await n.stopTunnel(),r.invalidateQueries({queryKey:["config"]})}catch(K){u("error"),p(K instanceof Error?K.message:"Failed to stop tunnel")}}},[n,r]),M=v.useCallback(async()=>{S(null);try{await fetch("/api/config",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnel:{authtoken:g}})}),y(""),w(!1),r.invalidateQueries({queryKey:["config"]})}catch{S("Could not save token. Try again.")}},[g,r]),O=v.useCallback(()=>{d&&(navigator.clipboard.writeText(d),k(!0),setTimeout(()=>k(!1),Ui.COPY_FEEDBACK_MS))},[d]),D=l==="starting"||l==="stopping",P=l==="connected"||l==="starting",z={off:"bg-gray-400",starting:"bg-amber-400",connected:"bg-green-500",stopping:"bg-gray-400",error:"bg-red-500"}[l];return b.jsx(yv,{open:e,onOpenChange:t,children:b.jsxs(xv,{className:"h-auto max-h-[85vh] max-w-md",children:[b.jsxs(vv,{children:[b.jsxs(Ev,{className:"flex items-center gap-2 text-sm font-medium",children:[b.jsx("span",{className:Ye("inline-block size-2 rounded-full",z,l==="starting"&&"animate-pulse")}),"Remote Access"]}),l==="off"&&b.jsx(MA,{className:"text-muted-foreground text-xs",children:"Access DorkOS from any device, any browser."}),l==="starting"&&b.jsx(MA,{className:"text-muted-foreground text-xs",children:"Establishing connection..."})]}),b.jsxs("div",{className:"space-y-4 px-4 pb-4",children:[l!=="connected"&&o&&b.jsx(b.Fragment,{children:!o.tokenConfigured||A?b.jsxs("div",{className:"space-y-2",children:[b.jsx("span",{className:"text-muted-foreground text-xs font-medium uppercase tracking-wider",children:"Auth Token"}),b.jsxs("div",{className:"flex gap-2",children:[b.jsx("input",{type:"password",placeholder:"Paste token here",value:g,onChange:j=>y(j.target.value),className:"border-input bg-background placeholder:text-muted-foreground focus-visible:ring-ring flex-1 rounded-md border px-3 py-1.5 text-sm shadow-sm outline-none focus-visible:ring-1"}),b.jsx("button",{onClick:M,disabled:!g.trim(),className:"bg-primary text-primary-foreground hover:bg-primary/90 inline-flex items-center rounded-md px-3 py-1.5 text-sm font-medium shadow-sm transition-colors disabled:pointer-events-none disabled:opacity-50",children:"Save"})]}),E&&b.jsx("p",{className:"text-destructive text-xs",children:E}),!o.tokenConfigured&&b.jsxs("p",{className:"text-muted-foreground text-xs",children:["Need a token?"," ",b.jsxs("a",{href:"https://dashboard.ngrok.com/signup",target:"_blank",rel:"noopener noreferrer",className:"text-foreground inline-flex items-center gap-0.5 underline underline-offset-2",children:["Sign up at ngrok.com",b.jsx(fH,{className:"size-3"})]})]})]}):b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("span",{className:"text-muted-foreground text-sm",children:["Auth token saved",b.jsx(Qr,{className:"ml-1 inline size-3.5 text-green-500"})]}),b.jsx("button",{onClick:()=>w(!0),className:"text-muted-foreground hover:text-foreground text-xs underline underline-offset-2 transition-colors",children:"Change"})]})}),l==="connected"&&d&&b.jsxs("div",{className:"space-y-3",children:[b.jsx("div",{className:"flex justify-center rounded-lg bg-white p-3",children:b.jsx(lK,{value:d,size:200,level:"M"})}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("span",{className:"text-muted-foreground min-w-0 flex-1 truncate font-mono text-xs",children:d}),b.jsx("button",{onClick:O,className:"border-input hover:bg-accent inline-flex shrink-0 items-center gap-1.5 rounded-md border bg-transparent px-2.5 py-1 text-xs font-medium shadow-sm transition-colors",children:_?b.jsxs(b.Fragment,{children:[b.jsx(Qr,{className:"size-3"}),"Copied"]}):b.jsxs(b.Fragment,{children:[b.jsx(Mx,{className:"size-3"}),"Copy"]})})]}),b.jsx("p",{className:"text-muted-foreground text-center text-xs",children:"Scan or visit from any device"})]}),l==="error"&&m&&b.jsxs("div",{className:"space-y-2 rounded-md border border-red-200 bg-red-50 p-3 dark:border-red-800 dark:bg-red-950/30",children:[b.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200",children:"Connection failed"}),b.jsx("p",{className:"text-xs text-red-700 dark:text-red-300",children:cK(m)}),b.jsx("button",{className:"border-input hover:bg-accent hover:text-accent-foreground inline-flex items-center rounded-md border bg-transparent px-3 py-1.5 text-sm font-medium shadow-sm transition-colors",onClick:()=>{u("off"),p(null)},children:"Retry"})]}),b.jsx(J6,{}),b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("span",{className:"text-sm",children:"Enable remote access"}),b.jsx(kn,{checked:P,onCheckedChange:R,disabled:D})]})]})]})})}function fK({open:e,onOpenChange:t}){const{theme:n,setTheme:r}=Lk(),[s,o]=v.useState("appearance"),[l,u]=v.useState(!1),{showTimestamps:d,setShowTimestamps:f,expandToolCalls:m,setExpandToolCalls:p,autoHideToolCalls:g,setAutoHideToolCalls:y,devtoolsOpen:E,toggleDevtools:S,verboseLogging:A,setVerboseLogging:w,fontSize:_,setFontSize:k,fontFamily:R,setFontFamily:M,resetPreferences:O,showStatusBarCwd:D,setShowStatusBarCwd:P,showStatusBarPermission:z,setShowStatusBarPermission:j,showStatusBarModel:K,setShowStatusBarModel:Y,showStatusBarCost:J,setShowStatusBarCost:te,showStatusBarContext:W,setShowStatusBarContext:I,showStatusBarGit:H,setShowStatusBarGit:$,showShortcutChips:ne,setShowShortcutChips:U,showTaskCelebrations:q,setShowTaskCelebrations:ie,enableNotificationSound:B,setEnableNotificationSound:de,showStatusBarSound:xe,setShowStatusBarSound:Ee,showStatusBarTunnel:he,setShowStatusBarTunnel:we}=Xt(),Se=ln(),{data:Pe,isLoading:_e}=xr({queryKey:["config"],queryFn:()=>Se.getConfig(),staleTime:3e4,enabled:e});return b.jsxs(yv,{open:e,onOpenChange:t,children:[b.jsxs(xv,{className:"max-w-lg gap-0 p-0",children:[b.jsx(vv,{className:"space-y-0 border-b px-4 py-3",children:b.jsx(Ev,{className:"text-sm font-medium",children:"Settings"})}),b.jsxs(e4,{value:s,onValueChange:o,className:"flex flex-1 flex-col overflow-hidden",children:[b.jsxs(Tv,{className:"mx-4 mt-3 grid w-full grid-cols-4",style:{width:"calc(100% - 2rem)"},children:[b.jsx(jl,{value:"appearance",children:"Appearance"}),b.jsx(jl,{value:"preferences",children:"Preferences"}),b.jsx(jl,{value:"statusBar",children:"Status Bar"}),b.jsx(jl,{value:"server",children:"Server"})]}),b.jsxs("div",{className:"min-h-[280px] flex-1 overflow-y-auto p-4",children:[b.jsx(Bl,{value:"appearance",className:"mt-0 space-y-6",children:b.jsxs("div",{className:"space-y-4",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("h3",{className:"text-foreground text-sm font-semibold",children:"Appearance"}),b.jsx("button",{onClick:()=>{O(),r("system")},className:"text-muted-foreground hover:text-foreground text-xs transition-colors duration-150",children:"Reset to defaults"})]}),b.jsx(xn,{label:"Theme",description:"Choose your preferred color scheme",children:b.jsxs(D1,{value:n,onValueChange:r,children:[b.jsx(Qh,{className:"w-32",children:b.jsx(M1,{})}),b.jsxs(Wh,{children:[b.jsx(ta,{value:"light",children:"Light"}),b.jsx(ta,{value:"dark",children:"Dark"}),b.jsx(ta,{value:"system",children:"System"})]})]})}),b.jsx(xn,{label:"Font family",description:"Choose the typeface for the interface",children:b.jsxs(D1,{value:R,onValueChange:Oe=>M(Oe),children:[b.jsx(Qh,{className:"w-40",children:b.jsx(M1,{})}),b.jsx(Wh,{children:im.map(Oe=>b.jsx(ta,{value:Oe.key,children:b.jsxs("div",{className:"flex flex-col",children:[b.jsx("span",{children:Oe.displayName}),b.jsx("span",{className:"text-muted-foreground text-xs",children:Oe.description})]})},Oe.key))})]})}),b.jsx(xn,{label:"Font size",description:"Adjust the text size across the interface",children:b.jsxs(D1,{value:_,onValueChange:Oe=>k(Oe),children:[b.jsx(Qh,{className:"w-32",children:b.jsx(M1,{})}),b.jsxs(Wh,{children:[b.jsx(ta,{value:"small",children:"Small"}),b.jsx(ta,{value:"medium",children:"Medium"}),b.jsx(ta,{value:"large",children:"Large"})]})]})})]})}),b.jsx(Bl,{value:"preferences",className:"mt-0 space-y-6",children:b.jsxs("div",{className:"space-y-4",children:[b.jsx("h3",{className:"text-foreground text-sm font-semibold",children:"Preferences"}),b.jsx(xn,{label:"Show timestamps",description:"Display message timestamps in chat",children:b.jsx(kn,{checked:d,onCheckedChange:f})}),b.jsx(xn,{label:"Expand tool calls",description:"Auto-expand tool call details in messages",children:b.jsx(kn,{checked:m,onCheckedChange:p})}),b.jsx(xn,{label:"Auto-hide tool calls",description:"Fade out completed tool calls after a few seconds",children:b.jsx(kn,{checked:g,onCheckedChange:y})}),b.jsx(xn,{label:"Show shortcut chips",description:"Display shortcut hints below the message input",children:b.jsx(kn,{checked:ne,onCheckedChange:U})}),b.jsx(xn,{label:"Task celebrations",description:"Show animations when tasks complete",children:b.jsx(kn,{checked:q,onCheckedChange:ie})}),b.jsx(xn,{label:"Notification sound",description:"Play a sound when AI finishes responding (3s+ responses)",children:b.jsx(kn,{checked:B,onCheckedChange:de})}),b.jsx(xn,{label:"Show dev tools",description:"Enable developer tools panel",children:b.jsx(kn,{checked:E,onCheckedChange:()=>S()})}),b.jsx(xn,{label:"Verbose logging",description:"Show detailed logs in the console",children:b.jsx(kn,{checked:A,onCheckedChange:w})})]})}),b.jsxs(Bl,{value:"statusBar",className:"mt-0 space-y-4",children:[b.jsx(xn,{label:"Show directory",description:"Display current working directory",children:b.jsx(kn,{checked:D,onCheckedChange:P})}),b.jsx(xn,{label:"Show git status",description:"Display branch name and change count",children:b.jsx(kn,{checked:H,onCheckedChange:$})}),b.jsx(xn,{label:"Show permission mode",description:"Display current permission setting",children:b.jsx(kn,{checked:z,onCheckedChange:j})}),b.jsx(xn,{label:"Show model",description:"Display selected AI model",children:b.jsx(kn,{checked:K,onCheckedChange:Y})}),b.jsx(xn,{label:"Show cost",description:"Display session cost in USD",children:b.jsx(kn,{checked:J,onCheckedChange:te})}),b.jsx(xn,{label:"Show context usage",description:"Display context window utilization",children:b.jsx(kn,{checked:W,onCheckedChange:I})}),b.jsx(xn,{label:"Show sound toggle",description:"Display notification sound toggle",children:b.jsx(kn,{checked:xe,onCheckedChange:Ee})}),b.jsx(xn,{label:"Show tunnel",description:"Display tunnel status and control",children:b.jsx(kn,{checked:he,onCheckedChange:we})})]}),b.jsx(Bl,{value:"server",className:"mt-0",children:b.jsx(XX,{config:Pe,isLoading:_e,onOpenTunnelDialog:()=>u(!0)})})]})]})]}),b.jsx(a4,{open:l,onOpenChange:u})]})}function xn({label:e,description:t,children:n}){return b.jsxs("div",{className:"flex items-center justify-between gap-4",children:[b.jsxs("div",{className:"min-w-0",children:[b.jsx(z6,{className:"text-sm font-medium",children:e}),b.jsx("p",{className:"text-muted-foreground text-xs",children:t})]}),n]})}var Y1={exports:{}},QA;function dK(){return QA||(QA=1,(function(e,t){(function(r,s){e.exports=s()})(globalThis,()=>(()=>{var n={949(l,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.CronParser=void 0;var f=d(515),m=(function(){function p(g,y,E){y===void 0&&(y=!0),E===void 0&&(E=!1),this.expression=g,this.dayOfWeekStartIndexZero=y,this.monthStartIndexZero=E}return p.prototype.parse=function(){var g,y,E=(g=this.expression)!==null&&g!==void 0?g:"";if(E==="@reboot")return y=["@reboot","","","","","",""],y;if(E.startsWith("@")){var S=this.parseSpecial(this.expression);y=this.extractParts(S)}else y=this.extractParts(this.expression);return this.normalize(y),this.validate(y),y},p.prototype.parseSpecial=function(g){var y={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},E=y[g];if(!E)throw new Error("Unknown special expression.");return E},p.prototype.extractParts=function(g){if(!this.expression)throw new Error("cron expression is empty");for(var y=g.trim().split(/[ ]+/),E=0;E<y.length;E++)if(y[E].includes(",")){var S=y[E].split(",").map(function(w){return w.trim()}).filter(function(w){return w!==""}).map(function(w){return isNaN(Number(w))?w:Number(w)}).filter(function(w){return w!==null&&w!==""});S.length===0&&S.push("*"),S.sort(function(w,_){return w!==null&&_!==null?w-_:0}),y[E]=S.map(function(w){return w!==null?w.toString():""}).join(",")}if(y.length<5)throw new Error("Expression has only ".concat(y.length," part").concat(y.length==1?"":"s",". At least 5 parts are required."));if(y.length==5)y.unshift(""),y.push("");else if(y.length==6){var A=/\d{4}$/.test(y[5])||y[4]=="?"||y[2]=="?";A?y.unshift(""):y.push("")}else if(y.length>7)throw new Error("Expression has ".concat(y.length," parts; too many!"));return y},p.prototype.normalize=function(g){var y=this;if(g[3]=g[3].replace("?","*"),g[5]=g[5].replace("?","*"),g[2]=g[2].replace("?","*"),g[0].indexOf("0/")==0&&(g[0]=g[0].replace("0/","*/")),g[1].indexOf("0/")==0&&(g[1]=g[1].replace("0/","*/")),g[2].indexOf("0/")==0&&(g[2]=g[2].replace("0/","*/")),g[3].indexOf("1/")==0&&(g[3]=g[3].replace("1/","*/")),g[4].indexOf("1/")==0&&(g[4]=g[4].replace("1/","*/")),g[6].indexOf("1/")==0&&(g[6]=g[6].replace("1/","*/")),g[5]=g[5].replace(/(^\d)|([^#/\s]\d)/g,function(M){var O=M.replace(/\D/,""),D=O;return y.dayOfWeekStartIndexZero?O=="7"&&(D="0"):D=(parseInt(O)-1).toString(),M.replace(O,D)}),g[5]=="L"&&(g[5]="6"),g[3]=="?"&&(g[3]="*"),g[3].indexOf("W")>-1&&(g[3].indexOf(",")>-1||g[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var E={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var S in E)g[5]=g[5].replace(new RegExp(S,"gi"),E[S].toString());g[4]=g[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(M){var O=M.replace(/\D/,""),D=O;return y.monthStartIndexZero&&(D=(parseInt(O)+1).toString()),M.replace(O,D)});var A={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var w in A)g[4]=g[4].replace(new RegExp(w,"gi"),A[w].toString());g[0]=="0"&&(g[0]=""),!/\*|\-|\,|\//.test(g[2])&&(/\*|\//.test(g[1])||/\*|\//.test(g[0]))&&(g[2]+="-".concat(g[2]));for(var _=0;_<g.length;_++)if(g[_].indexOf(",")!=-1&&(g[_]=g[_].split(",").filter(function(M){return M!==""}).join(",")||"*"),g[_]=="*/1"&&(g[_]="*"),g[_].indexOf("/")>-1&&!/^\*|\-|\,/.test(g[_])){var k=null;switch(_){case 4:k="12";break;case 5:k="6";break;case 6:k="9999";break;default:k=null;break}if(k!==null){var R=g[_].split("/");g[_]="".concat(R[0],"-").concat(k,"/").concat(R[1])}}},p.prototype.validate=function(g){var y="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(g[0],y),this.validateOnlyExpectedCharactersFound(g[1],y),this.validateOnlyExpectedCharactersFound(g[2],y),this.validateOnlyExpectedCharactersFound(g[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(g[4],y),this.validateOnlyExpectedCharactersFound(g[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(g[6],y),this.validateAnyRanges(g)},p.prototype.validateAnyRanges=function(g){f.default.secondRange(g[0]),f.default.minuteRange(g[1]),f.default.hourRange(g[2]),f.default.dayOfMonthRange(g[3]),f.default.monthRange(g[4],this.monthStartIndexZero),f.default.dayOfWeekRange(g[5],this.dayOfWeekStartIndexZero)},p.prototype.validateOnlyExpectedCharactersFound=function(g,y){var E=g.match(new RegExp("[^".concat(y,"]+"),"gi"));if(E&&E.length)throw new Error("Expression contains invalid values: '".concat(E.toString(),"'"))},p})();u.CronParser=m},333(l,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.ExpressionDescriptor=void 0;var f=d(823),m=d(949),p=(function(){function g(y,E){if(this.expression=y,this.options=E,this.expressionParts=new Array(5),!this.options.locale&&g.defaultLocale&&(this.options.locale=g.defaultLocale),!g.locales[this.options.locale]){var S=Object.keys(g.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(S,"'.")),this.options.locale=S}this.i18n=g.locales[this.options.locale],E.use24HourTimeFormat===void 0&&(E.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return g.toString=function(y,E){var S=E===void 0?{}:E,A=S.throwExceptionOnParseError,w=A===void 0?!0:A,_=S.verbose,k=_===void 0?!1:_,R=S.dayOfWeekStartIndexZero,M=R===void 0?!0:R,O=S.monthStartIndexZero,D=O===void 0?!1:O,P=S.use24HourTimeFormat,z=S.locale,j=z===void 0?null:z,K=S.logicalAndDayFields,Y=K===void 0?!1:K,J={throwExceptionOnParseError:w,verbose:k,dayOfWeekStartIndexZero:M,monthStartIndexZero:D,use24HourTimeFormat:P,locale:j,logicalAndDayFields:Y};J.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var te=new g(y,J);return te.getFullDescription()},g.initialize=function(y,E){E===void 0&&(E="en"),g.specialCharacters=["/","-",",","*"],g.defaultLocale=E,y.load(g.locales)},g.prototype.getFullDescription=function(){var y,E,S="";try{var A=new m.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=A.parse(),this.expressionParts[0]==="@reboot")return((E=(y=this.i18n).atReboot)===null||E===void 0?void 0:E.call(y))||"Run once, at startup";var w=this.getTimeOfDayDescription(),_=this.getDayOfMonthDescription(),k=this.getMonthDescription(),R=this.getDayOfWeekDescription(),M=this.getYearDescription();S+=w+_+R+k+M,S=this.transformVerbosity(S,!!this.options.verbose),S=S.charAt(0).toLocaleUpperCase()+S.substr(1)}catch(O){if(!this.options.throwExceptionOnParseError)S=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(O)}return S},g.prototype.getTimeOfDayDescription=function(){var y=this.expressionParts[0],E=this.expressionParts[1],S=this.expressionParts[2],A="";if(!f.StringUtilities.containsAny(E,g.specialCharacters)&&!f.StringUtilities.containsAny(S,g.specialCharacters)&&!f.StringUtilities.containsAny(y,g.specialCharacters))A+=this.i18n.atSpace()+this.formatTime(S,E,y);else if(!y&&E.indexOf("-")>-1&&!(E.indexOf(",")>-1)&&!(E.indexOf("/")>-1)&&!f.StringUtilities.containsAny(S,g.specialCharacters)){var w=E.split("-");A+=f.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(S,w[0],""),this.formatTime(S,w[1],""))}else if(!y&&S.indexOf(",")>-1&&S.indexOf("-")==-1&&S.indexOf("/")==-1&&!f.StringUtilities.containsAny(E,g.specialCharacters)){var _=S.split(",");A+=this.i18n.at();for(var k=0;k<_.length;k++)A+=" ",A+=this.formatTime(_[k],E,""),k<_.length-2&&(A+=","),k==_.length-2&&(A+=this.i18n.spaceAnd())}else{var R=this.getSecondsDescription(),M=this.getMinutesDescription(),O=this.getHoursDescription();if(A+=R,A&&M&&(A+=", "),A+=M,M===O)return A;A&&O&&(A+=", "),A+=O}return A},g.prototype.getSecondsDescription=function(){var y=this,E=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(S){return S},function(S){return f.StringUtilities.format(y.i18n.everyX0Seconds(S),S)},function(S){return y.i18n.secondsX0ThroughX1PastTheMinute()},function(S){return S=="0"?"":parseInt(S)<20?y.i18n.atX0SecondsPastTheMinute(S):y.i18n.atX0SecondsPastTheMinuteGt20()||y.i18n.atX0SecondsPastTheMinute(S)});return E},g.prototype.getMinutesDescription=function(){var y=this,E=this.expressionParts[0],S=this.expressionParts[2],A=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(w){return w},function(w){return f.StringUtilities.format(y.i18n.everyX0Minutes(w),w)},function(w){return y.i18n.minutesX0ThroughX1PastTheHour()},function(w){var _,k;try{return w=="0"&&S.indexOf("/")==-1&&E==""?y.i18n.everyHour():w=="0"?((k=(_=y.i18n).onTheHour)===null||k===void 0?void 0:k.call(_))||y.i18n.atX0MinutesPastTheHour(w):parseInt(w)<20?y.i18n.atX0MinutesPastTheHour(w):y.i18n.atX0MinutesPastTheHourGt20()||y.i18n.atX0MinutesPastTheHour(w)}catch{return y.i18n.atX0MinutesPastTheHour(w)}});return A},g.prototype.getHoursDescription=function(){var y=this,E=this.expressionParts[2],S=0,A=[];E.split("/")[0].split(",").forEach(function(k){var R=k.split("-");R.length===2&&A.push({value:R[1],index:S+1}),S+=R.length});var w=0,_=this.getSegmentDescription(E,this.i18n.everyHour(),function(k){var R=A.find(function(O){return O.value===k&&O.index===w}),M=R&&y.expressionParts[1]!=="0";return w++,M?y.formatTime(k,"59",""):y.formatTime(k,"0","")},function(k){return f.StringUtilities.format(y.i18n.everyX0Hours(k),k)},function(k){return y.i18n.betweenX0AndX1()},function(k){return y.i18n.atX0()});return _},g.prototype.getDayOfWeekDescription=function(){var y=this,E=this.i18n.daysOfTheWeek(),S=null;return this.expressionParts[5]=="*"?S="":S=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(A,w){var _=A;A.indexOf("#")>-1?_=A.substring(0,A.indexOf("#")):A.indexOf("L")>-1&&(_=_.replace("L",""));var k=parseInt(_),R=y.i18n.daysOfTheWeekInCase?y.i18n.daysOfTheWeekInCase(w)[k]:E[k];if(A.indexOf("#")>-1){var M=null,O=A.substring(A.indexOf("#")+1),D=A.substring(0,A.indexOf("#"));switch(O){case"1":M=y.i18n.first(D);break;case"2":M=y.i18n.second(D);break;case"3":M=y.i18n.third(D);break;case"4":M=y.i18n.fourth(D);break;case"5":M=y.i18n.fifth(D);break}R=M+" "+R}return R},function(A){return parseInt(A)==1?"":f.StringUtilities.format(y.i18n.commaEveryX0DaysOfTheWeek(A),A)},function(A){var w=A.substring(0,A.indexOf("-")),_=y.expressionParts[3]!="*";return _?y.i18n.commaAndX0ThroughX1(w):y.i18n.commaX0ThroughX1(w)},function(A){var w=null;if(A.indexOf("#")>-1){var _=A.substring(A.indexOf("#")+1),k=A.substring(0,A.indexOf("#"));w=y.i18n.commaOnThe(_,k).trim()+y.i18n.spaceX0OfTheMonth()}else if(A.indexOf("L")>-1)w=y.i18n.commaOnTheLastX0OfTheMonth(A.replace("L",""));else{var R=y.expressionParts[3]!="*";R?y.options.logicalAndDayFields?w=y.i18n.commaOnlyOnX0(A):w=y.i18n.commaAndOnX0():w=y.i18n.commaOnlyOnX0(A)}return w}),S},g.prototype.getMonthDescription=function(){var y=this,E=this.i18n.monthsOfTheYear(),S=this.getSegmentDescription(this.expressionParts[4],"",function(A,w){return w&&y.i18n.monthsOfTheYearInCase?y.i18n.monthsOfTheYearInCase(w)[parseInt(A)-1]:E[parseInt(A)-1]},function(A){return parseInt(A)==1?"":f.StringUtilities.format(y.i18n.commaEveryX0Months(A),A)},function(A){return y.i18n.commaMonthX0ThroughMonthX1()||y.i18n.commaX0ThroughX1()},function(A){return y.i18n.commaOnlyInMonthX0?y.i18n.commaOnlyInMonthX0():y.i18n.commaOnlyInX0()});return S},g.prototype.getDayOfMonthDescription=function(){var y=this,E=null,S=this.expressionParts[3];switch(S){case"L":E=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":E=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var A=S.match(/(\d{1,2}W)|(W\d{1,2})/);if(A){var w=parseInt(A[0].replace("W","")),_=w==1?this.i18n.firstWeekday():f.StringUtilities.format(this.i18n.weekdayNearestDayX0(),w.toString());E=f.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),_);break}else{var k=S.match(/L-(\d{1,2})/);if(k){var R=k[1];E=f.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(R),R);break}else{if(S=="*"&&this.expressionParts[5]!="*")return"";E=this.getSegmentDescription(S,this.i18n.commaEveryDay(),function(M){return M=="L"?y.i18n.lastDay():y.i18n.dayX0?f.StringUtilities.format(y.i18n.dayX0(),M):M},function(M){return M=="1"?y.i18n.commaEveryDay():y.i18n.commaEveryX0Days(M)},function(M){return y.i18n.commaBetweenDayX0AndX1OfTheMonth(M)},function(M){return y.i18n.commaOnDayX0OfTheMonth(M)})}break}}return E},g.prototype.getYearDescription=function(){var y=this,E=this.getSegmentDescription(this.expressionParts[6],"",function(S){return/^\d+$/.test(S)?new Date(parseInt(S),1).getFullYear().toString():S},function(S){return f.StringUtilities.format(y.i18n.commaEveryX0Years(S),S)},function(S){return y.i18n.commaYearX0ThroughYearX1()||y.i18n.commaX0ThroughX1()},function(S){return y.i18n.commaOnlyInYearX0?y.i18n.commaOnlyInYearX0():y.i18n.commaOnlyInX0()});return E},g.prototype.getSegmentDescription=function(y,E,S,A,w,_){var k=null,R=y.indexOf("/")>-1,M=y.indexOf("-")>-1,O=y.indexOf(",")>-1;if(!y)k="";else if(y==="*")k=E;else if(!R&&!M&&!O)k=f.StringUtilities.format(_(y),S(y));else if(O){for(var D=y.split(","),P="",z=0;z<D.length;z++)if(z>0&&D.length>2&&(P+=",",z<D.length-1&&(P+=" ")),z>0&&D.length>1&&(z==D.length-1||D.length==2)&&(P+="".concat(this.i18n.spaceAnd()," ")),D[z].indexOf("/")>-1||D[z].indexOf("-")>-1){var j=D[z].indexOf("-")>-1&&D[z].indexOf("/")==-1,K=this.getSegmentDescription(D[z],E,S,A,j?this.i18n.commaX0ThroughX1:w,_);j&&(K=K.replace(", ","")),P+=K}else if(!R)P+=S(D[z]);else{var Y=this.getSegmentDescription(D[z],E,S,A,w,_);Y&&Y.startsWith(", ")&&(Y=Y.substring(2)),P+=Y}R?k=P:k=f.StringUtilities.format(_(y),P)}else if(R){var D=y.split("/");if(k=f.StringUtilities.format(A(D[1]),D[1]),D[0].indexOf("-")>-1){var J=this.generateRangeSegmentDescription(D[0],w,S);J.indexOf(", ")!=0&&(k+=", "),k+=J}else if(D[0].indexOf("*")==-1){var te=f.StringUtilities.format(_(D[0]),S(D[0]));te=te.replace(", ",""),k+=f.StringUtilities.format(this.i18n.commaStartingX0(),te)}}else M&&(k=this.generateRangeSegmentDescription(y,w,S));return k},g.prototype.generateRangeSegmentDescription=function(y,E,S){var A="",w=y.split("-"),_=S(w[0],1),k=S(w[1],2),R=E(y);return A+=f.StringUtilities.format(R,_,k),A},g.prototype.formatTime=function(y,E,S){var A=0,w=0,_=parseInt(y)+A,k=parseInt(E)+w;k>=60?(k-=60,_+=1):k<0&&(k+=60,_-=1),_>=24?_=_-24:_<0&&(_=24+_);var R="",M=!1;this.options.use24HourTimeFormat||(M=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),R=M?"".concat(this.getPeriod(_)," "):" ".concat(this.getPeriod(_)),_>12&&(_-=12),_===0&&(_=12));var O="";return S&&(O=":".concat(("00"+S).substring(S.length))),"".concat(M?R:"").concat(("00"+_.toString()).substring(_.toString().length),":").concat(("00"+k.toString()).substring(k.toString().length)).concat(O).concat(M?"":R)},g.prototype.transformVerbosity=function(y,E){if(!E&&(y=y.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),y=y.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),y=y.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),y=y.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var S=0,A=Object.entries(this.i18n.conciseVerbosityReplacements());S<A.length;S++){var w=A[S],_=w[0],k=w[1];y=y.replace(new RegExp(_,"g"),k)}return y},g.prototype.getPeriod=function(y){return y>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},g.locales={},g})();u.ExpressionDescriptor=p},747(l,u,d){Object.defineProperty(u,"__esModule",{value:!0}),u.enLocaleLoader=void 0;var f=d(486),m=(function(){function p(){}return p.prototype.load=function(g){g.en=new f.en},p})();u.enLocaleLoader=m},486(l,u){Object.defineProperty(u,"__esModule",{value:!0}),u.en=void 0;var d=(function(){function f(){}return f.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},f.prototype.atX0MinutesPastTheHourGt20=function(){return null},f.prototype.commaMonthX0ThroughMonthX1=function(){return null},f.prototype.commaYearX0ThroughYearX1=function(){return null},f.prototype.use24HourTimeFormatByDefault=function(){return!1},f.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},f.prototype.everyMinute=function(){return"every minute"},f.prototype.everyHour=function(){return"every hour"},f.prototype.atSpace=function(){return"At "},f.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},f.prototype.at=function(){return"At"},f.prototype.spaceAnd=function(){return" and"},f.prototype.everySecond=function(){return"every second"},f.prototype.everyX0Seconds=function(){return"every %s seconds"},f.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},f.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},f.prototype.everyX0Minutes=function(){return"every %s minutes"},f.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},f.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},f.prototype.everyX0Hours=function(){return"every %s hours"},f.prototype.betweenX0AndX1=function(){return"between %s and %s"},f.prototype.atX0=function(){return"at %s"},f.prototype.commaEveryDay=function(){return", every day"},f.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},f.prototype.commaX0ThroughX1=function(){return", %s through %s"},f.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},f.prototype.first=function(){return"first"},f.prototype.second=function(){return"second"},f.prototype.third=function(){return"third"},f.prototype.fourth=function(){return"fourth"},f.prototype.fifth=function(){return"fifth"},f.prototype.commaOnThe=function(){return", on the "},f.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},f.prototype.lastDay=function(){return"the last day"},f.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},f.prototype.commaOnlyOnX0=function(){return", only on %s"},f.prototype.commaAndOnX0=function(){return", and on %s"},f.prototype.commaEveryX0Months=function(){return", every %s months"},f.prototype.commaOnlyInX0=function(){return", only in %s"},f.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},f.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},f.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},f.prototype.firstWeekday=function(){return"first weekday"},f.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},f.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},f.prototype.commaEveryX0Days=function(){return", every %s days in a month"},f.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},f.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},f.prototype.commaEveryHour=function(){return", every hour"},f.prototype.commaEveryX0Years=function(){return", every %s years"},f.prototype.commaStartingX0=function(){return", starting %s"},f.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},f.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},f.prototype.atReboot=function(){return"Run once, at startup"},f.prototype.onTheHour=function(){return"on the hour"},f})();u.en=d},515(l,u){Object.defineProperty(u,"__esModule",{value:!0});function d(m,p){if(!m)throw new Error(p)}var f=(function(){function m(){}return m.secondRange=function(p){for(var g=p.split(","),y=0;y<g.length;y++)if(!isNaN(parseInt(g[y],10))){var E=parseInt(g[y],10);d(E>=0&&E<=59,"seconds part must be >= 0 and <= 59")}},m.minuteRange=function(p){for(var g=p.split(","),y=0;y<g.length;y++)if(!isNaN(parseInt(g[y],10))){var E=parseInt(g[y],10);d(E>=0&&E<=59,"minutes part must be >= 0 and <= 59")}},m.hourRange=function(p){for(var g=p.split(","),y=0;y<g.length;y++)if(!isNaN(parseInt(g[y],10))){var E=parseInt(g[y],10);d(E>=0&&E<=23,"hours part must be >= 0 and <= 23")}},m.dayOfMonthRange=function(p){for(var g=p.split(","),y=0;y<g.length;y++)if(!isNaN(parseInt(g[y],10))){var E=parseInt(g[y],10);d(E>=1&&E<=31,"DOM part must be >= 1 and <= 31")}},m.monthRange=function(p,g){for(var y=p.split(","),E=0;E<y.length;E++)if(!isNaN(parseInt(y[E],10))){var S=parseInt(y[E],10);d(S>=1&&S<=12,g?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},m.dayOfWeekRange=function(p,g){for(var y=p.split(","),E=0;E<y.length;E++)if(!isNaN(parseInt(y[E],10))){var S=parseInt(y[E],10);d(S>=0&&S<=6,g?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},m})();u.default=f},823(l,u){Object.defineProperty(u,"__esModule",{value:!0}),u.StringUtilities=void 0;var d=(function(){function f(){}return f.format=function(m){for(var p=[],g=1;g<arguments.length;g++)p[g-1]=arguments[g];return m.replace(/%s/g,function(y){return p.shift()})},f.containsAny=function(m,p){return p.some(function(g){return m.indexOf(g)>-1})},f})();u.StringUtilities=d}},r={};function s(l){var u=r[l];if(u!==void 0)return u.exports;var d=r[l]={exports:{}};return n[l](d,d.exports,s),d.exports}var o={};return(()=>{var l=o;Object.defineProperty(l,"__esModule",{value:!0}),l.toString=void 0;var u=s(333),d=s(747);u.ExpressionDescriptor.initialize(new d.enLocaleLoader),l.default=u.ExpressionDescriptor;var f=u.ExpressionDescriptor.toString;l.toString=f})(),o})())})(Y1)),Y1.exports}var hK=dK();const o4=Ao(hK),lp=["pulse","schedules"];function mK(){const e=ln();return xr({queryKey:[...lp],queryFn:()=>e.listSchedules()})}function pK(){const e=ln(),t=yi();return fu({mutationFn:n=>e.createSchedule(n),onSuccess:()=>{t.invalidateQueries({queryKey:[...lp]})}})}function l4(){const e=ln(),t=yi();return fu({mutationFn:({id:n,...r})=>e.updateSchedule(n,r),onSuccess:()=>{t.invalidateQueries({queryKey:[...lp]})}})}function gK(){const e=ln(),t=yi();return fu({mutationFn:n=>e.deleteSchedule(n),onSuccess:()=>{t.invalidateQueries({queryKey:[...lp]})}})}function bK(){const e=ln(),t=yi();return fu({mutationFn:n=>e.triggerSchedule(n),onSuccess:()=>{t.invalidateQueries({queryKey:["pulse","runs"]})}})}const u4=["pulse","runs"];function yK(e){const t=ln();return xr({queryKey:[...u4,e],queryFn:()=>t.listRuns(e),refetchInterval:1e4})}function xK(){const e=ln(),t=yi();return fu({mutationFn:n=>e.cancelRun(n),onSuccess:()=>{t.invalidateQueries({queryKey:[...u4]})}})}function vK(e){if(!e.trim())return"";try{return o4.toString(e)}catch{return"Invalid cron expression"}}function EK({open:e,onOpenChange:t,editSchedule:n}){const r=pK(),s=l4(),[o,l]=v.useState(""),[u,d]=v.useState(""),[f,m]=v.useState(""),[p,g]=v.useState(""),[y,E]=v.useState(""),[S,A]=v.useState("acceptEdits"),[w,_]=v.useState(10),k=v.useMemo(()=>{try{return Intl.supportedValuesOf("timeZone")}catch{return[]}},[]);v.useEffect(()=>{n?(l(n.name),d(n.prompt),m(n.cron),g(n.cwd??""),E(n.timezone??""),A(n.permissionMode==="bypassPermissions"?"bypassPermissions":"acceptEdits"),_(n.maxRuntime?n.maxRuntime/6e4:10)):(l(""),d(""),m(""),g(""),E(""),A("acceptEdits"),_(10))},[n,e]);const R=vK(f),M=o.trim()&&u.trim()&&f.trim();function O(D){if(D.preventDefault(),!M)return;const P={name:o.trim(),prompt:u.trim(),cron:f.trim(),...p&&{cwd:p},...y&&{timezone:y},permissionMode:S,maxRuntime:w*6e4};n?s.mutate({id:n.id,...P},{onSuccess:()=>t(!1)}):r.mutate(P,{onSuccess:()=>t(!1)})}return e?b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:b.jsxs("div",{className:"mx-4 w-full max-w-lg rounded-xl bg-background p-6 shadow-lg",children:[b.jsx("h2",{className:"mb-4 text-lg font-semibold",children:n?"Edit Schedule":"New Schedule"}),b.jsxs("form",{onSubmit:O,className:"space-y-4",children:[b.jsxs("div",{children:[b.jsx("label",{className:"mb-1 block text-sm font-medium",children:"Name *"}),b.jsx("input",{className:"w-full rounded-md border bg-transparent px-3 py-2 text-sm",value:o,onChange:D=>l(D.target.value),maxLength:100,placeholder:"Daily code review"})]}),b.jsxs("div",{children:[b.jsx("label",{className:"mb-1 block text-sm font-medium",children:"Prompt *"}),b.jsx("textarea",{className:"w-full rounded-md border bg-transparent px-3 py-2 text-sm",value:u,onChange:D=>d(D.target.value),rows:4,placeholder:"Review all pending PRs and summarize findings..."})]}),b.jsxs("div",{children:[b.jsx("label",{className:"mb-1 block text-sm font-medium",children:"Cron Expression *"}),b.jsx("input",{className:"w-full rounded-md border bg-transparent px-3 py-2 text-sm font-mono",value:f,onChange:D=>m(D.target.value),placeholder:"0 9 * * 1-5"}),R&&b.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:R})]}),b.jsxs("div",{children:[b.jsx("label",{className:"mb-1 block text-sm font-medium",children:"Working Directory"}),b.jsx("input",{className:"w-full rounded-md border bg-transparent px-3 py-2 text-sm font-mono",value:p,onChange:D=>g(D.target.value),placeholder:"~/projects/myapp"})]}),b.jsxs("div",{children:[b.jsx("label",{className:"mb-1 block text-sm font-medium",children:"Timezone"}),b.jsxs("select",{className:"w-full rounded-md border bg-transparent px-3 py-2 text-sm",value:y,onChange:D=>E(D.target.value),children:[b.jsx("option",{value:"",children:"System default"}),k.map(D=>b.jsx("option",{value:D,children:D},D))]})]}),b.jsxs("div",{children:[b.jsx("label",{className:"mb-1 block text-sm font-medium",children:"Max Runtime (minutes)"}),b.jsx("input",{type:"number",className:"w-24 rounded-md border bg-transparent px-3 py-2 text-sm",value:w,onChange:D=>_(Number(D.target.value)),min:1,max:720})]}),b.jsxs("fieldset",{children:[b.jsx("legend",{className:"mb-2 text-sm font-medium",children:"Permission Mode"}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[b.jsx("input",{type:"radio",name:"permissionMode",checked:S==="acceptEdits",onChange:()=>A("acceptEdits")}),"Allow file edits"]}),b.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[b.jsx("input",{type:"radio",name:"permissionMode",checked:S==="bypassPermissions",onChange:()=>A("bypassPermissions")}),"Full autonomy"]}),S==="bypassPermissions"&&b.jsx("p",{className:"text-xs text-yellow-600 dark:text-yellow-400",children:"Warning: This allows the agent to execute any tool without approval."})]})]}),b.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[b.jsx("button",{type:"button",className:"hover:bg-accent hover:text-accent-foreground inline-flex items-center rounded-md px-3 py-1.5 text-sm font-medium transition-colors",onClick:()=>t(!1),children:"Cancel"}),b.jsx("button",{type:"submit",disabled:!M,className:"bg-primary text-primary-foreground hover:bg-primary/90 inline-flex items-center rounded-md px-3 py-1.5 text-sm font-medium shadow-sm transition-colors disabled:pointer-events-none disabled:opacity-50",children:n?"Save":"Create"})]})]})]})}):null}function TK(e){if(e===null)return"-";if(e<1e3)return"< 1s";const t=Math.floor(e/1e3);if(t<60)return`${t}s`;const n=Math.floor(t/60),r=t%60;return`${n}m ${r}s`}function SK({status:e}){switch(e){case"running":return b.jsx("span",{className:"text-blue-500",title:"Running",children:"●"});case"completed":return b.jsx("span",{className:"text-green-500",title:"Completed",children:"✓"});case"failed":return b.jsx("span",{className:"text-red-500",title:"Failed",children:"✗"});case"cancelled":return b.jsx("span",{className:"text-neutral-400",title:"Cancelled",children:"⊘"});default:return null}}function CK({scheduleId:e}){const{data:t=[],isLoading:n}=yK({scheduleId:e,limit:20}),r=xK(),[,s]=_f();return n?b.jsx("div",{className:"py-2 text-xs text-muted-foreground",children:"Loading runs..."}):t.length===0?b.jsx("div",{className:"py-2 text-xs text-muted-foreground",children:"No runs yet"}):b.jsxs("div",{className:"space-y-1",children:[b.jsxs("div",{className:"grid grid-cols-[24px_64px_1fr_80px_80px] gap-2 text-xs font-medium text-muted-foreground",children:[b.jsx("span",{}),b.jsx("span",{children:"Trigger"}),b.jsx("span",{children:"Started"}),b.jsx("span",{children:"Duration"}),b.jsx("span",{})]}),t.map(o=>b.jsxs("div",{className:"grid cursor-pointer grid-cols-[24px_64px_1fr_80px_80px] items-center gap-2 rounded px-1 py-1 text-xs hover:bg-muted/50",onClick:()=>{o.sessionId&&s(o.sessionId)},children:[b.jsx(SK,{status:o.status}),b.jsx("span",{className:"truncate capitalize",children:o.trigger}),b.jsx("span",{children:o.startedAt?new Date(o.startedAt).toLocaleString():"-"}),b.jsx("span",{children:TK(o.durationMs)}),b.jsx("span",{children:o.status==="running"&&b.jsx("button",{className:"hover:bg-accent hover:text-accent-foreground inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium transition-colors",onClick:l=>{l.stopPropagation(),r.mutate(o.id)},children:"Cancel"})})]},o.id))]})}function wK(e){try{return o4.toString(e)}catch{return e}}function AK({schedule:e}){const t=e.status==="pending_approval"?"bg-yellow-500":e.enabled?"bg-green-500":"bg-neutral-400";return b.jsx("span",{className:Ye("inline-block size-2 rounded-full",t)})}function _K(){const{data:e=[],isLoading:t}=mK(),n=l4(),r=bK(),s=gK(),[o,l]=v.useState(!1),[u,d]=v.useState(),[f,m]=v.useState(null);return t?b.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Loading schedules..."}):b.jsxs("div",{className:"space-y-4 p-4",children:[b.jsx("div",{className:"flex items-center justify-end",children:b.jsx("button",{className:"border-input hover:bg-accent hover:text-accent-foreground inline-flex items-center rounded-md border bg-transparent px-3 py-1.5 text-sm font-medium shadow-sm transition-colors",onClick:()=>{d(void 0),l(!0)},children:"New Schedule"})}),e.length===0?b.jsx("div",{className:"rounded-lg border border-dashed p-8 text-center text-sm text-muted-foreground",children:"No scheduled jobs. Create one to get started."}):b.jsx("div",{className:"space-y-2",children:e.map(p=>b.jsxs("div",{className:"rounded-lg border",children:[b.jsxs("div",{className:"flex cursor-pointer items-center gap-3 p-3",onClick:()=>m(f===p.id?null:p.id),children:[b.jsx(AK,{schedule:p}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("div",{className:"font-medium",children:p.name}),b.jsxs("div",{className:"text-xs text-muted-foreground",children:[wK(p.cron),p.nextRun&&b.jsxs(b.Fragment,{children:[" · Next: ",new Date(p.nextRun).toLocaleString()]})]})]}),p.status==="pending_approval"?b.jsxs("div",{className:"flex gap-1",children:[b.jsx("button",{className:"border-input hover:bg-accent hover:text-accent-foreground inline-flex items-center rounded-md border bg-transparent px-2.5 py-1 text-xs font-medium shadow-sm transition-colors",onClick:g=>{g.stopPropagation(),n.mutate({id:p.id,status:"active",enabled:!0})},children:"Approve"}),b.jsx("button",{className:"hover:bg-accent hover:text-accent-foreground inline-flex items-center rounded-md px-2.5 py-1 text-xs font-medium transition-colors",onClick:g=>{g.stopPropagation(),s.mutate(p.id)},children:"Reject"})]}):b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("button",{className:"hover:bg-accent hover:text-accent-foreground inline-flex items-center rounded-md px-2.5 py-1 text-xs font-medium transition-colors disabled:pointer-events-none disabled:opacity-50",disabled:!p.enabled,onClick:g=>{g.stopPropagation(),r.mutate(p.id)},children:"Run Now"}),b.jsx("button",{className:Ye("relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors",p.enabled?"bg-primary":"bg-input"),role:"switch","aria-checked":p.enabled,onClick:g=>{g.stopPropagation(),n.mutate({id:p.id,enabled:!p.enabled})},children:b.jsx("span",{className:Ye("pointer-events-none block size-4 rounded-full bg-background shadow-sm ring-0 transition-transform",p.enabled?"translate-x-4":"translate-x-0")})})]})]}),f===p.id&&b.jsx("div",{className:"border-t px-3 pb-3 pt-2",children:b.jsx(CK,{scheduleId:p.id})})]},p.id))}),b.jsx(EK,{open:o,onOpenChange:l,editSchedule:u})]})}const G1=["light","dark","system"];function X1(){const e=ln(),t=yi(),[n,r]=_f(),{setSidebarOpen:s,devtoolsOpen:o,toggleDevtools:l}=Xt(),u=_o(),[d,f]=v.useState(null),[m,p]=v.useState(!1),[g,y]=v.useState(!1),[E,S]=v.useState(!1),[A]=Im(),{theme:w,setTheme:_}=Lk(),k={light:xz,dark:nz,system:ez}[w],R=v.useCallback(()=>{const z=G1.indexOf(w);_(G1[(z+1)%G1.length])},[w,_]),{data:M=[]}=xr({queryKey:["sessions",A],queryFn:()=>e.listSessions(A??void 0),enabled:A!==null});v.useEffect(()=>{!n&&M.length>0&&r(M[0].id)},[n,M,r]);const O=fu({mutationFn:()=>e.createSession({permissionMode:"default",cwd:A??void 0}),onSuccess:z=>{t.invalidateQueries({queryKey:["sessions",A]}),r(z.id),f(z.id),setTimeout(()=>f(null),Ui.NEW_SESSION_HIGHLIGHT_MS),u&&setTimeout(()=>s(!1),Ui.SIDEBAR_AUTO_CLOSE_MS)}}),D=v.useCallback(z=>{r(z),u&&s(!1)},[u,r,s]),P=v.useMemo(()=>z9(M),[M]);return b.jsxs("div",{className:"sidebar-container flex h-full flex-col p-3",children:[b.jsxs("div",{className:"mb-3 space-y-1.5",children:[b.jsxs("div",{className:"flex items-center gap-1.5",children:[A&&b.jsxs("button",{onClick:()=>p(!0),className:"hover:bg-accent flex min-w-0 flex-1 items-center gap-1 rounded-md px-2 py-1.5 transition-colors duration-150","aria-label":"Change working directory",title:A,children:[b.jsx(AR,{className:"text-muted-foreground size-(--size-icon-sm) flex-shrink-0"}),b.jsx(V6,{path:A,maxSegments:3,size:"sm"})]}),b.jsx("button",{onClick:()=>s(!1),className:"hover:bg-accent rounded-md p-2 transition-colors duration-150","aria-label":"Close sidebar",children:b.jsx(iz,{className:"text-muted-foreground size-(--size-icon-md)"})})]}),b.jsxs("button",{onClick:()=>O.mutate(),disabled:O.isPending,className:"border-border text-muted-foreground hover:bg-accent hover:text-foreground flex w-full items-center justify-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs font-medium transition-all duration-100 active:scale-[0.98] disabled:opacity-50",children:[b.jsx(oz,{className:"size-(--size-icon-sm)"}),"New chat"]})]}),b.jsx("div",{className:"-mx-1 flex-1 overflow-y-auto px-1",children:P.length>0?b.jsx("div",{className:"space-y-5",children:P.map(z=>{const j=P.length===1&&z.label==="Today";return b.jsxs("div",{children:[!j&&b.jsx("h3",{className:"text-2xs text-muted-foreground/70 mb-1.5 px-3 font-medium tracking-wider uppercase",children:z.label}),b.jsx("div",{className:"space-y-0.5",children:z.sessions.map(K=>b.jsx($X,{session:K,isActive:K.id===n,isNew:K.id===d,onClick:()=>D(K.id)},K.id))})]},z.label)})}):b.jsx("div",{className:"flex h-32 items-center justify-center",children:b.jsx("p",{className:"text-muted-foreground/60 text-sm",children:"No conversations yet"})})}),b.jsxs("div",{className:"border-border mt-2 flex items-center border-t pt-2",children:[b.jsx("a",{href:"https://dorkian.com",target:"_blank",rel:"noopener noreferrer",className:"text-2xs text-muted-foreground/50 hover:text-muted-foreground transition-colors duration-150",children:"DorkOS by Dorkian"}),b.jsxs("div",{className:"ml-auto flex items-center gap-0.5",children:[b.jsx("button",{onClick:()=>y(!0),className:"text-muted-foreground/50 hover:text-muted-foreground rounded-md p-1 transition-colors duration-150 max-md:p-2","aria-label":"Settings",children:b.jsx(fz,{className:"size-(--size-icon-sm)"})}),b.jsxs(_X,{openDelay:200,closeDelay:100,children:[b.jsx(kX,{asChild:!0,children:b.jsx("button",{className:"text-muted-foreground/50 hover:text-muted-foreground rounded-md p-1 transition-colors duration-150 max-md:p-2","aria-label":"Relay status",children:b.jsx(uz,{className:"size-(--size-icon-sm)"})})}),b.jsx(NX,{side:"top",align:"center",className:"w-auto px-3 py-1.5 text-xs",children:"Relay not connected"})]}),b.jsx("button",{onClick:()=>S(!0),className:"text-muted-foreground/50 hover:text-muted-foreground rounded-md p-1 transition-colors duration-150 max-md:p-2","aria-label":"Pulse scheduler",children:b.jsx(YH,{className:"size-(--size-icon-sm)"})}),b.jsx("button",{onClick:R,className:"text-muted-foreground/50 hover:text-muted-foreground rounded-md p-1 transition-colors duration-150 max-md:p-2",title:`Theme: ${w}`,"aria-label":`Theme: ${w}. Click to cycle.`,children:b.jsx(k,{className:"size-(--size-icon-sm)"})}),!1]})]}),b.jsx(GX,{open:m,onOpenChange:p}),b.jsx(fK,{open:g,onOpenChange:y}),E&&b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:b.jsxs("div",{className:"mx-4 w-full max-w-2xl rounded-xl bg-background shadow-lg max-h-[80vh] overflow-y-auto",children:[b.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[b.jsx("h2",{className:"text-lg font-semibold",children:"Pulse Scheduler"}),b.jsx("button",{onClick:()=>S(!1),className:"text-muted-foreground hover:text-foreground rounded-md p-1 transition-colors","aria-label":"Close",children:"×"})]}),b.jsx(_K,{})]})})]})}function c4(e){const t=[],n=[];for(const r of e)r.type==="text"?t.push(r.text):n.push({toolCallId:r.toolCallId,toolName:r.toolName,input:r.input||"",result:r.result,status:r.status,interactiveType:r.interactiveType,questions:r.questions,answers:r.answers});return{content:t.join(`
371
+ `),toolCalls:n}}function kK(e){const{currentPartsRef:t,assistantCreatedRef:n,sessionStatusRef:r,streamStartTimeRef:s,estimatedTokensRef:o,textStreamingTimerRef:l,isTextStreamingRef:u,setMessages:d,setError:f,setStatus:m,setSessionStatus:p,setEstimatedTokens:g,setStreamStartTime:y,setIsTextStreaming:E,sessionId:S,options:A}=e;function w(R){for(let M=t.current.length-1;M>=0;M--){const O=t.current[M];if(O.type==="tool_call"&&O.toolCallId===R)return O}}function _(R){n.current||(n.current=!0,d(M=>[...M,{id:R,role:"assistant",content:"",toolCalls:[],parts:[],timestamp:new Date().toISOString()}]))}function k(R){_(R);const M=t.current.map(D=>({...D})),O=c4(M);d(D=>D.map(P=>P.id===R?{...P,content:O.content,toolCalls:O.toolCalls.length>0?O.toolCalls:[],parts:M}:P))}return function(M,O,D){var P,z,j,K,Y,J,te;switch(M){case"text_delta":{const{text:W}=O,I=t.current,H=I[I.length-1];H&&H.type==="text"?H.text+=W:I.push({type:"text",text:W}),o.current+=W.length/4,g(o.current),u.current||(u.current=!0,E(!0)),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{u.current=!1,E(!1)},500),k(D);break}case"tool_call_start":{const W=O;t.current.push({type:"tool_call",toolCallId:W.toolCallId,toolName:W.toolName,input:"",status:"running"}),k(D);break}case"tool_call_delta":{const W=O,I=w(W.toolCallId);I&&W.input&&(I.input=(I.input||"")+W.input),k(D);break}case"tool_call_end":{const I=w(O.toolCallId);I&&(I.status="complete"),k(D);break}case"tool_result":{const W=O,I=w(W.toolCallId);I&&(I.result=W.result,I.status="complete",I.interactiveType==="question"&&!I.answers&&(I.answers={})),k(D);break}case"approval_required":{const W=O,I=w(W.toolCallId);I?(I.interactiveType="approval",I.input=W.input,I.status="pending"):t.current.push({type:"tool_call",toolCallId:W.toolCallId,toolName:W.toolName,input:W.input,status:"pending",interactiveType:"approval"}),k(D);break}case"question_prompt":{const W=O,I=w(W.toolCallId);I?(I.interactiveType="question",I.questions=W.questions,I.status="pending"):t.current.push({type:"tool_call",toolCallId:W.toolCallId,toolName:"AskUserQuestion",input:"",status:"pending",interactiveType:"question",questions:W.questions}),k(D);break}case"error":{const{message:W}=O;f(W),m("error");break}case"session_status":{const W=O,I={...r.current,...W,model:W.model??((P=r.current)==null?void 0:P.model),costUsd:W.costUsd??((z=r.current)==null?void 0:z.costUsd),contextTokens:W.contextTokens??((j=r.current)==null?void 0:j.contextTokens),contextMaxTokens:W.contextMaxTokens??((K=r.current)==null?void 0:K.contextMaxTokens)};r.current=I,p(I);break}case"task_update":{const W=O;(Y=A.onTaskEvent)==null||Y.call(A,W);break}case"done":{const W=O;W.sessionId&&W.sessionId!==S&&((J=A.onSessionIdChange)==null||J.call(A,W.sessionId)),s.current&&Date.now()-s.current>=Ui.MIN_STREAM_DURATION_MS&&((te=A.onStreamingDone)==null||te.call(A)),s.current=null,o.current=0,y(null),g(0),l.current&&clearTimeout(l.current),u.current=!1,E(!1),m("idle");break}}}}function WA(e){const t=e.parts?[...e.parts]:[];if(t.length===0&&(e.content&&t.push({type:"text",text:e.content}),e.toolCalls))for(const r of e.toolCalls)t.push({type:"tool_call",toolCallId:r.toolCallId,toolName:r.toolName,input:r.input,result:r.result,status:r.status,...r.questions?{interactiveType:"question",questions:r.questions,answers:r.answers}:{}});const n=c4(t);return{id:e.id,role:e.role,content:n.content,toolCalls:n.toolCalls.length>0?n.toolCalls:void 0,parts:t,timestamp:e.timestamp||"",messageType:e.messageType,commandName:e.commandName,commandArgs:e.commandArgs}}function NK(e,t={}){const n=ln(),r=yi(),s=Xt(_e=>_e.selectedCwd),[o,l]=v.useState([]),[u,d]=v.useState(""),[f,m]=v.useState("idle"),[p,g]=v.useState(null),[y,E]=v.useState(!1),S=v.useRef(null),[A,w]=v.useState(null),_=v.useRef(null),k=v.useRef([]),R=v.useRef(""),M=v.useRef(!1),O=v.useRef(!1),D=v.useRef(null),P=v.useRef(0),[z,j]=v.useState(null),[K,Y]=v.useState(0),J=v.useRef(null),te=v.useRef(!1),[W,I]=v.useState(!1),H=v.useRef(null),$=v.useRef(s),[ne,U]=v.useState(!document.hidden),q=v.useRef(o);v.useEffect(()=>{q.current=o},[o]),v.useEffect(()=>{$.current=s},[s]),v.useEffect(()=>{const _e=()=>{U(!document.hidden)};return document.addEventListener("visibilitychange",_e),()=>{document.removeEventListener("visibilitychange",_e)}},[]);const ie=f==="streaming",B=xr({queryKey:["messages",e,s],queryFn:()=>n.getMessages(e,s??void 0),staleTime:hi.MESSAGE_STALE_TIME_MS,refetchOnWindowFocus:!1,refetchInterval:()=>ie?!1:ne?hi.ACTIVE_TAB_REFETCH_MS:hi.BACKGROUND_TAB_REFETCH_MS});v.useEffect(()=>{O.current=!1,l([])},[e,s]),v.useEffect(()=>{if(!B.data)return;const _e=B.data.messages;if(!O.current&&_e.length>0){O.current=!0,l(_e.map(WA));return}if(O.current&&!ie){const Oe=q.current,wt=_e.slice(Oe.length);wt.length>0&&l(Re=>[...Re,...wt.map(WA)])}},[B.data,ie]),v.useEffect(()=>{if(!e||ie)return;const _e=`/api/sessions/${e}/stream`,Oe=new EventSource(_e);return Oe.addEventListener("sync_update",()=>{r.invalidateQueries({queryKey:["messages",e,$.current]}),r.invalidateQueries({queryKey:["tasks",e,$.current]})}),Oe.addEventListener("sync_connected",()=>{}),()=>{Oe.close()}},[e,ie,r]),v.useEffect(()=>()=>{H.current&&clearTimeout(H.current)},[]);const de=v.useCallback(async()=>{if(!u.trim()||f==="streaming")return;const _e=u.trim(),Oe={id:crypto.randomUUID(),role:"user",content:_e,parts:[{type:"text",text:_e}],timestamp:new Date().toISOString()};l(Lt=>[...Lt,Oe]),d(""),m("streaming"),g(null),k.current=[];const wt=Date.now();D.current=wt,P.current=0,j(wt),Y(0),R.current=crypto.randomUUID(),M.current=!1;const Re=new AbortController;_.current=Re;const nn=kK({currentPartsRef:k,assistantCreatedRef:M,sessionStatusRef:S,streamStartTimeRef:D,estimatedTokensRef:P,textStreamingTimerRef:J,isTextStreamingRef:te,setMessages:l,setError:g,setStatus:m,setSessionStatus:w,setEstimatedTokens:Y,setStreamStartTime:j,setIsTextStreaming:I,sessionId:e,options:t});try{const Lt=t.transformContent?await t.transformContent(Oe.content):Oe.content;await n.sendMessage(e,Lt,rn=>nn(rn.type,rn.data,R.current),Re.signal,s??void 0),m("idle")}catch(Lt){Lt.name!=="AbortError"&&(Lt.code==="SESSION_LOCKED"?(E(!0),d(Oe.content),H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{E(!1),H.current=null},Ui.SESSION_BUSY_CLEAR_MS)):g(Lt.message),m("error")),J.current&&clearTimeout(J.current),te.current=!1,I(!1)}},[u,f,e]),xe=v.useCallback(()=>{var _e;(_e=_.current)==null||_e.abort(),J.current&&clearTimeout(J.current),te.current=!1,I(!1),m("idle")},[]),Ee=B.isLoading,we=v.useMemo(()=>o.flatMap(_e=>_e.toolCalls||[]).filter(_e=>_e.interactiveType&&_e.status==="pending"),[o])[0]||null,Se=we!==null,Pe=(we==null?void 0:we.interactiveType)||null;return{messages:o,input:u,setInput:d,handleSubmit:de,status:f,error:p,sessionBusy:y,stop:xe,isLoadingHistory:Ee,sessionStatus:A,streamStartTime:z,estimatedTokens:K,isTextStreaming:W,isWaitingForUser:Se,waitingType:Pe,activeInteraction:we}}function RK(e){const t=ln();return xr({queryKey:["commands",{cwd:e??null}],queryFn:()=>t.getCommands(!1,e??void 0),staleTime:hi.COMMANDS_STALE_TIME_MS,gcTime:hi.COMMANDS_GC_TIME_MS})}const ZA={in_progress:0,pending:1,completed:2};function OK(e){return[...e].sort((t,n)=>ZA[t.status]-ZA[n.status])}function DK(e){const t={};for(const[n,r]of Object.entries(e))r!==void 0&&r!==""&&(t[n]=r);return t}const MK=10;function IK(e){const t=ln(),n=Xt(S=>S.selectedCwd),[r,s]=v.useState(new Map),[o,l]=v.useState(!1),u=v.useRef(1),{data:d}=xr({queryKey:["tasks",e,n],queryFn:()=>t.getTasks(e,n??void 0),staleTime:3e4,refetchOnWindowFocus:!1});v.useEffect(()=>{if(s(new Map),u.current=1,d&&d.tasks.length>0){const S=new Map;for(const A of d.tasks)S.set(A.id,A);s(S),u.current=d.tasks.length+1}},[d]);const f=v.useCallback(S=>{s(A=>{const w=new Map(A);if(S.action==="create"){const _=String(u.current++);w.set(_,{...S.task,id:_})}else if(S.action==="update"&&S.task.id){const _=w.get(S.task.id);_&&w.set(S.task.id,{..._,...DK(S.task)})}return w})},[]),m=v.useCallback(()=>{l(S=>!S)},[]),p=Array.from(r.values()),g=OK(p),y=p.find(S=>S.status==="in_progress"),E=(y==null?void 0:y.activeForm)??null;return{tasks:g.slice(0,MK),activeForm:E,isCollapsed:o,toggleCollapse:m,handleTaskEvent:f}}function LK({commands:e,input:t,cursorPos:n}){const[r,s]=v.useState(!1),[o,l]=v.useState(""),[u,d]=v.useState(0),[f,m]=v.useState(-1),p=v.useMemo(()=>o?e.map(_=>{const k=`${_.fullCommand} ${_.description}`,R=Nk(o,k);return{cmd:_,...R}}).filter(_=>_.match).sort((_,k)=>k.score-_.score).map(_=>_.cmd):e,[e,o]);v.useEffect(()=>{d(0)},[o,r]),v.useEffect(()=>{p.length>0&&u>=p.length&&d(p.length-1)},[p.length,u]);const g=v.useCallback((_,k)=>{const M=_.slice(0,k).match(/(^|\s)\/([\w:-]*)$/);return M?(s(!0),l(M[2]),m((M.index??0)+M[1].length),!0):(s(!1),!1)},[]),y=v.useCallback(_=>{const k=t.slice(0,f);return s(!1),k+_.fullCommand+" "},[t,f]),E=v.useCallback(()=>{d(_=>p.length===0?0:(_+1)%p.length)},[p.length]),S=v.useCallback(()=>{d(_=>p.length===0?0:(_-1+p.length)%p.length)},[p.length]),A=v.useCallback(()=>p.length>0&&u<p.length?y(p[u]):(s(!1),null),[p,u,y]),w=v.useCallback(()=>{s(!1),l("")},[]);return{showCommands:r,setShowCommands:s,commandQuery:o,selectedIndex:u,filteredCommands:p,slashTriggerPos:f,detectCommandTrigger:g,handleCommandSelect:y,handleArrowUp:S,handleArrowDown:E,handleKeyboardSelect:A,resetCommand:w}}function PK({fileEntries:e,input:t,cursorPos:n}){const[r,s]=v.useState(!1),[o,l]=v.useState(""),[u,d]=v.useState(0),[f,m]=v.useState(-1),p=v.useMemo(()=>r?o?e.map(_=>({..._,...Nk(o,_.path)})).filter(_=>_.match).sort((_,k)=>k.score-_.score).slice(0,50):e.slice(0,50).map(_=>({..._,indices:[]})):[],[e,o,r]);v.useEffect(()=>{d(0)},[o,r]),v.useEffect(()=>{p.length>0&&u>=p.length&&d(p.length-1)},[p.length,u]);const g=v.useCallback((_,k)=>{const M=_.slice(0,k).match(/(^|\s)@([\w./:-]*)$/);return M?(s(!0),l(M[2]),m((M.index??0)+M[1].length),!0):(s(!1),!1)},[]),y=v.useCallback(_=>{const k=t.slice(0,f),R=t.slice(f+1+o.length);if(_.isDirectory){const O=k+"@"+_.path+R,D=k.length+1+_.path.length;return l(_.path),d(0),{newValue:O,newCursorPos:D,keepOpen:!0}}const M=k+"@"+_.path+" "+R;return s(!1),{newValue:M,keepOpen:!1}},[t,f,o]),E=v.useCallback(()=>{d(_=>p.length===0?0:(_+1)%p.length)},[p.length]),S=v.useCallback(()=>{d(_=>p.length===0?0:(_-1+p.length)%p.length)},[p.length]),A=v.useCallback(()=>p.length>0&&u<p.length?y(p[u]):(s(!1),null),[p,u,y]),w=v.useCallback(()=>{s(!1),l("")},[]);return{showFiles:r,setShowFiles:s,fileQuery:o,fileSelectedIndex:u,filteredFiles:p,fileTriggerPos:f,detectFileTrigger:g,handleFileSelect:y,handleArrowUp:S,handleArrowDown:E,handleKeyboardSelect:A,resetFiles:w}}function _l(e,t,n){let r=n.initialDeps??[],s,o=!0;function l(){var u,d,f;let m;n.key&&((u=n.debug)!=null&&u.call(n))&&(m=Date.now());const p=e();if(!(p.length!==r.length||p.some((E,S)=>r[S]!==E)))return s;r=p;let y;if(n.key&&((d=n.debug)!=null&&d.call(n))&&(y=Date.now()),s=t(...p),n.key&&((f=n.debug)!=null&&f.call(n))){const E=Math.round((Date.now()-m)*100)/100,S=Math.round((Date.now()-y)*100)/100,A=S/16,w=(_,k)=>{for(_=String(_);_.length<k;)_=" "+_;return _};console.info(`%c⏱ ${w(S,5)} /${w(E,5)} ms`,`
372
+ font-size: .6rem;
373
+ font-weight: bold;
374
+ color: hsl(${Math.max(0,Math.min(120-120*A,120))}deg 100% 31%);`,n==null?void 0:n.key)}return n!=null&&n.onChange&&!(o&&n.skipInitialOnChange)&&n.onChange(s),o=!1,s}return l.updateDeps=u=>{r=u},l}function JA(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const jK=(e,t)=>Math.abs(e-t)<1.01,BK=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},e_=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},UK=e=>e,FK=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let s=t;s<=n;s++)r.push(s);return r},HK=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=l=>{const{width:u,height:d}=l;t({width:Math.round(u),height:Math.round(d)})};if(s(e_(n)),!r.ResizeObserver)return()=>{};const o=new r.ResizeObserver(l=>{const u=()=>{const d=l[0];if(d!=null&&d.borderBoxSize){const f=d.borderBoxSize[0];if(f){s({width:f.inlineSize,height:f.blockSize});return}}s(e_(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},t_={passive:!0},n_=typeof window>"u"?!0:"onscrollend"in window,zK=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const o=e.options.useScrollendEvent&&n_?()=>{}:BK(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),l=m=>()=>{const{horizontal:p,isRtl:g}=e.options;s=p?n.scrollLeft*(g&&-1||1):n.scrollTop,o(),t(s,m)},u=l(!0),d=l(!1);n.addEventListener("scroll",u,t_);const f=e.options.useScrollendEvent&&n_;return f&&n.addEventListener("scrollend",d,t_),()=>{n.removeEventListener("scroll",u),f&&n.removeEventListener("scrollend",d)}},VK=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},qK=(e,{adjustments:t=0,behavior:n},r)=>{var s,o;const l=e+t;(o=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[r.options.horizontal?"left":"top"]:l,behavior:n})};class $K{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const l=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),n=null},observe:s=>{var o;return(o=r())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=r())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:UK,rangeExtractor:FK,onChange:()=>{},measureElement:VK,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,n)},this.maybeNotify=_l(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=o,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,o=new Map;for(let l=r-1;l>=0;l--){const u=n[l];if(s.has(u.lane))continue;const d=o.get(u.lane);if(d==null||u.end>d.end?o.set(u.lane,u):u.end<d.end&&s.set(u.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((l,u)=>l.end===u.end?l.index-u.index:l.end-u.end)[0]:void 0},this.getMeasurementOptions=_l(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,s,o,l,u)=>(this.prevLanes!==void 0&&this.prevLanes!==u&&(this.lanesChangedFlag=!0),this.prevLanes=u,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:l,lanes:u}),{key:!1}),this.getMeasurements=_l(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:l,lanes:u},d)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const g of this.laneAssignments.keys())g>=n&&this.laneAssignments.delete(g);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(g=>{this.itemSizeCache.set(g.key,g.size)}));const f=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const m=this.measurementsCache.slice(0,f),p=new Array(u).fill(void 0);for(let g=0;g<f;g++){const y=m[g];y&&(p[y.lane]=g)}for(let g=f;g<n;g++){const y=o(g),E=this.laneAssignments.get(g);let S,A;if(E!==void 0&&this.options.lanes>1){S=E;const R=p[S],M=R!==void 0?m[R]:void 0;A=M?M.end+this.options.gap:r+s}else{const R=this.options.lanes===1?m[g-1]:this.getFurthestMeasurement(m,g);A=R?R.end+this.options.gap:r+s,S=R?R.lane:g%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(g,S)}const w=d.get(y),_=typeof w=="number"?w:this.options.estimateSize(g),k=A+_;m[g]={index:g,start:A,size:_,end:k,key:y,lane:S},p[S]=g}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=_l(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,o)=>this.range=n.length>0&&r>0?YK({measurements:n,outerSize:r,scrollOffset:s,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=_l(()=>{let n=null,r=null;const s=this.calculateRange();return s&&(n=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,s,o,l)=>o===null||l===null?[]:n({startIndex:o,endIndex:l,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const s=this.indexFromElement(n),o=this.measurementsCache[s];if(!o)return;const l=o.key,u=this.elementsCache.get(l);u!==n&&(u&&this.observer.unobserve(u),this.observer.observe(n),this.elementsCache.set(l,n)),n.isConnected&&this.resizeItem(s,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const s=this.measurementsCache[n];if(!s)return;const o=this.itemSizeCache.get(s.key)??s.size,l=r-o;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,l,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,s)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=_l(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let o=0,l=n.length;o<l;o++){const u=n[o],d=r[u];s.push(d)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return JA(r[f4(0,r.length-1,s=>JA(r[s]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,r,s=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),l=this.getScrollOffset();r==="auto"&&(r=n>=l+o?"end":"start"),r==="center"?n+=(s-o)/2:r==="end"&&(n-=o);const u=this.getMaxScrollOffset();return Math.max(Math.min(u,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.measurementsCache[n];if(!s)return;const o=this.getSize(),l=this.getScrollOffset();if(r==="auto")if(s.end>=l+o-this.options.scrollPaddingEnd)r="end";else if(s.start<=l+this.options.scrollPaddingStart)r="start";else return[l,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const u=r==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(u,r,s.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:r="start",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:r="auto",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1)),this.currentScrollToIndex=n;let o=0;const l=10,u=f=>{if(!this.targetWindow)return;const m=this.getOffsetForIndex(n,f);if(!m){console.warn("Failed to get offset for index:",n);return}const[p,g]=m;this._scrollToOffset(p,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const y=()=>{if(this.currentScrollToIndex!==n)return;const E=this.getScrollOffset(),S=this.getOffsetForIndex(n,g);if(!S){console.warn("Failed to get offset for index:",n);return}jK(S[0],E)||d(g)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(y):y()})},d=f=>{this.targetWindow&&this.currentScrollToIndex===n&&(o++,o<l?this.targetWindow.requestAnimationFrame(()=>u(f)):console.warn(`Failed to scroll to index ${n} after ${l} attempts.`))};u(r)},this.scrollBy=(n,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=r[r.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let l=r.length-1;for(;l>=0&&o.some(u=>u===null);){const u=r[l];o[u.lane]===null&&(o[u.lane]=u.end),l--}s=Math.max(...o.filter(u=>u!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}}const f4=(e,t,n,r)=>{for(;e<=t;){const s=(e+t)/2|0,o=n(s);if(o<r)e=s+1;else if(o>r)t=s-1;else return s}return e>0?e-1:0};function YK({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const s=e.length-1,o=d=>e[d].start;if(e.length<=r)return{startIndex:0,endIndex:s};let l=f4(0,s,o,n),u=l;if(r===1)for(;u<s&&e[u].end<n+t;)u++;else if(r>1){const d=Array(r).fill(0);for(;u<s&&d.some(m=>m<n+t);){const m=e[u];d[m.lane]=m.end,u++}const f=Array(r).fill(n+t);for(;l>=0&&f.some(m=>m>=n);){const m=e[l];f[m.lane]=m.start,l--}l=Math.max(0,l-l%r),u=Math.min(s,u+(r-1-u%r))}return{startIndex:l,endIndex:u}}const r_=typeof document<"u"?v.useLayoutEffect:v.useEffect;function GK({useFlushSync:e=!0,...t}){const n=v.useReducer(()=>({}),{})[1],r={...t,onChange:(o,l)=>{var u;e&&l?ko.flushSync(n):n(),(u=t.onChange)==null||u.call(t,o,l)}},[s]=v.useState(()=>new $K(r));return s.setOptions(r),r_(()=>s._didMount(),[]),r_(()=>s._willUpdate()),s}function XK(e){return GK({observeElementRect:HK,observeElementOffset:zK,scrollToFn:qK,...e})}const up=(function(e){if(e==null)return ZK;if(typeof e=="function")return cp(e);if(typeof e=="object")return Array.isArray(e)?KK(e):QK(e);if(typeof e=="string")return WK(e);throw new Error("Expected function, string, or object as test")});function KK(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=up(e[n]);return cp(r);function r(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function QK(e){const t=e;return cp(n);function n(r){const s=r;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function WK(e){return cp(t);function t(n){return n&&n.type===e}}function cp(e){return t;function t(n,r,s){return!!(JK(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function ZK(){return!0}function JK(e){return e!==null&&typeof e=="object"&&"type"in e}const d4=[],Pc=!0,Sy=!1,Cy="skip";function h4(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const o=up(s),l=r?-1:1;u(e,void 0,[])();function u(d,f,m){const p=d&&typeof d=="object"?d:{};if(typeof p.type=="string"){const y=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return g;function g(){let y=d4,E,S,A;if((!t||o(d,f,m[m.length-1]||void 0))&&(y=eQ(n(d,m)),y[0]===Sy))return y;if("children"in d&&d.children){const w=d;if(w.children&&y[0]!==Cy)for(S=(r?w.children.length:-1)+l,A=m.concat(w);S>-1&&S<w.children.length;){const _=w.children[S];if(E=u(_,S,A)(),E[0]===Sy)return E;S=typeof E[1]=="number"?E[1]:S+l}}return y}}}function eQ(e){return Array.isArray(e)?e:typeof e=="number"?[Pc,e]:e==null?d4:[e]}function au(e,t,n,r){let s,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,s=n):(o=t,l=n,s=r),h4(e,o,u,s);function u(d,f){const m=f[f.length-1],p=m?m.children.indexOf(d):void 0;return l(d,p,m)}}function tQ({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:s=[],blockedImageClass:o="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:l="text-gray-500"}){const u=t.length&&!t.every(f=>f==="*"),d=n.length&&!n.every(f=>f==="*");if(!e&&(u||d))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return f=>{const m=sQ(e,t,n,r,s,o,l);au(f,m)}}function i_(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function nQ(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const rQ=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),iQ=new Set(["javascript:","data:","file:","vbscript:"]);function s_(e,t,n,r=!1,s=!1,o=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!s)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return s&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const m=e.substring(5);if(m&&m.length>0&&m!=="invalid")return e}}catch{return null}return null}const l=i_(e,n);if(!l||iQ.has(l.protocol)||!(rQ.has(l.protocol)||o.includes(l.protocol)||o.includes("*")))return null;if(l.protocol==="mailto:"||!l.protocol.match(/^https?:$/))return l.href;const d=nQ(e);return l&&t.some(f=>{const m=i_(f,n);return!m||m.origin!==l.origin?!1:l.href.startsWith(m.href)})?d?l.pathname+l.search+l.hash:l.href:t.includes("*")?l.protocol!=="https:"&&l.protocol!=="http:"?null:d?l.pathname+l.search+l.hash:l.href:null}const K1=Symbol("node-seen"),sQ=(e,t,n,r,s,o,l)=>{const u=(d,f,m)=>{if(d.type!=="element"||d[K1])return Pc;if(d.tagName==="a"){const p=s_(d.properties.href,t,e,!1,!1,s);return p===null?(d[K1]=!0,au(d,u),m&&typeof f=="number"&&(m.children[f]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(d.properties.href),class:l},children:[...d.children,{type:"text",value:" [blocked]"}]}),Cy):(d.properties.href=p,d.properties.target="_blank",d.properties.rel="noopener noreferrer",Pc)}if(d.tagName==="img"){const p=s_(d.properties.src,n,e,r,!0,s);return p===null?(d[K1]=!0,au(d,u),m&&typeof f=="number"&&(m.children[f]={type:"element",tagName:"span",properties:{class:o},children:[{type:"text",value:"[Image blocked: "+String(d.properties.alt||"No description")+"]"}]}),Cy):(d.properties.src=p,Pc)}return Pc};return u},m4=-1,fp=0,$c=1,Cm=2,Sv=3,Cv=4,wv=5,Av=6,p4=7,g4=8,a_=typeof self=="object"?self:globalThis,aQ=(e,t)=>{const n=(s,o)=>(e.set(o,s),s),r=s=>{if(e.has(s))return e.get(s);const[o,l]=t[s];switch(o){case fp:case m4:return n(l,s);case $c:{const u=n([],s);for(const d of l)u.push(r(d));return u}case Cm:{const u=n({},s);for(const[d,f]of l)u[r(d)]=r(f);return u}case Sv:return n(new Date(l),s);case Cv:{const{source:u,flags:d}=l;return n(new RegExp(u,d),s)}case wv:{const u=n(new Map,s);for(const[d,f]of l)u.set(r(d),r(f));return u}case Av:{const u=n(new Set,s);for(const d of l)u.add(r(d));return u}case p4:{const{name:u,message:d}=l;return n(new a_[u](d),s)}case g4:return n(BigInt(l),s);case"BigInt":return n(Object(BigInt(l)),s);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:u}=new Uint8Array(l);return n(new DataView(u),l)}}return n(new a_[o](l),s)};return r},o_=e=>aQ(new Map,e)(0),kl="",{toString:oQ}={},{keys:lQ}=Object,Sc=e=>{const t=typeof e;if(t!=="object"||!e)return[fp,t];const n=oQ.call(e).slice(8,-1);switch(n){case"Array":return[$c,kl];case"Object":return[Cm,kl];case"Date":return[Sv,kl];case"RegExp":return[Cv,kl];case"Map":return[wv,kl];case"Set":return[Av,kl];case"DataView":return[$c,n]}return n.includes("Array")?[$c,n]:n.includes("Error")?[p4,n]:[Cm,n]},Rh=([e,t])=>e===fp&&(t==="function"||t==="symbol"),uQ=(e,t,n,r)=>{const s=(l,u)=>{const d=r.push(l)-1;return n.set(u,d),d},o=l=>{if(n.has(l))return n.get(l);let[u,d]=Sc(l);switch(u){case fp:{let m=l;switch(d){case"bigint":u=g4,m=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return s([m4],l)}return s([u,m],l)}case $c:{if(d){let g=l;return d==="DataView"?g=new Uint8Array(l.buffer):d==="ArrayBuffer"&&(g=new Uint8Array(l)),s([d,[...g]],l)}const m=[],p=s([u,m],l);for(const g of l)m.push(o(g));return p}case Cm:{if(d)switch(d){case"BigInt":return s([d,l.toString()],l);case"Boolean":case"Number":case"String":return s([d,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const m=[],p=s([u,m],l);for(const g of lQ(l))(e||!Rh(Sc(l[g])))&&m.push([o(g),o(l[g])]);return p}case Sv:return s([u,l.toISOString()],l);case Cv:{const{source:m,flags:p}=l;return s([u,{source:m,flags:p}],l)}case wv:{const m=[],p=s([u,m],l);for(const[g,y]of l)(e||!(Rh(Sc(g))||Rh(Sc(y))))&&m.push([o(g),o(y)]);return p}case Av:{const m=[],p=s([u,m],l);for(const g of l)(e||!Rh(Sc(g)))&&m.push(o(g));return p}}const{message:f}=l;return s([u,{name:d,message:f}],l)};return o},l_=(e,{json:t,lossy:n}={})=>{const r=[];return uQ(!(t||n),!!t,new Map,r)(e),r},So=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?o_(l_(e,t)):structuredClone(e):(e,t)=>o_(l_(e,t));class zf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}zf.prototype.normal={};zf.prototype.property={};zf.prototype.space=void 0;function b4(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new zf(n,r,t)}function gf(e){return e.toLowerCase()}class vr{constructor(t,n){this.attribute=n,this.property=t}}vr.prototype.attribute="";vr.prototype.booleanish=!1;vr.prototype.boolean=!1;vr.prototype.commaOrSpaceSeparated=!1;vr.prototype.commaSeparated=!1;vr.prototype.defined=!1;vr.prototype.mustUseProperty=!1;vr.prototype.number=!1;vr.prototype.overloadedBoolean=!1;vr.prototype.property="";vr.prototype.spaceSeparated=!1;vr.prototype.space=void 0;let cQ=0;const et=Do(),mn=Do(),wy=Do(),ve=Do(),Bt=Do(),Vl=Do(),kr=Do();function Do(){return 2**++cQ}const Ay=Object.freeze(Object.defineProperty({__proto__:null,boolean:et,booleanish:mn,commaOrSpaceSeparated:kr,commaSeparated:Vl,number:ve,overloadedBoolean:wy,spaceSeparated:Bt},Symbol.toStringTag,{value:"Module"})),Q1=Object.keys(Ay);class _v extends vr{constructor(t,n,r,s){let o=-1;if(super(t,n),u_(this,"space",s),typeof r=="number")for(;++o<Q1.length;){const l=Q1[o];u_(this,Q1[o],(r&Ay[l])===Ay[l])}}}_v.prototype.defined=!0;function u_(e,t,n){n&&(e[t]=n)}function Eu(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const o=new _v(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[gf(r)]=r,n[gf(o.attribute)]=r}return new zf(t,n,e.space)}const y4=Eu({properties:{ariaActiveDescendant:null,ariaAtomic:mn,ariaAutoComplete:null,ariaBusy:mn,ariaChecked:mn,ariaColCount:ve,ariaColIndex:ve,ariaColSpan:ve,ariaControls:Bt,ariaCurrent:null,ariaDescribedBy:Bt,ariaDetails:null,ariaDisabled:mn,ariaDropEffect:Bt,ariaErrorMessage:null,ariaExpanded:mn,ariaFlowTo:Bt,ariaGrabbed:mn,ariaHasPopup:null,ariaHidden:mn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Bt,ariaLevel:ve,ariaLive:null,ariaModal:mn,ariaMultiLine:mn,ariaMultiSelectable:mn,ariaOrientation:null,ariaOwns:Bt,ariaPlaceholder:null,ariaPosInSet:ve,ariaPressed:mn,ariaReadOnly:mn,ariaRelevant:null,ariaRequired:mn,ariaRoleDescription:Bt,ariaRowCount:ve,ariaRowIndex:ve,ariaRowSpan:ve,ariaSelected:mn,ariaSetSize:ve,ariaSort:null,ariaValueMax:ve,ariaValueMin:ve,ariaValueNow:ve,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function x4(e,t){return t in e?e[t]:t}function v4(e,t){return x4(e,t.toLowerCase())}const fQ=Eu({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Vl,acceptCharset:Bt,accessKey:Bt,action:null,allow:null,allowFullScreen:et,allowPaymentRequest:et,allowUserMedia:et,alt:null,as:null,async:et,autoCapitalize:null,autoComplete:Bt,autoFocus:et,autoPlay:et,blocking:Bt,capture:null,charSet:null,checked:et,cite:null,className:Bt,cols:ve,colSpan:null,content:null,contentEditable:mn,controls:et,controlsList:Bt,coords:ve|Vl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:et,defer:et,dir:null,dirName:null,disabled:et,download:wy,draggable:mn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:et,formTarget:null,headers:Bt,height:ve,hidden:wy,high:ve,href:null,hrefLang:null,htmlFor:Bt,httpEquiv:Bt,id:null,imageSizes:null,imageSrcSet:null,inert:et,inputMode:null,integrity:null,is:null,isMap:et,itemId:null,itemProp:Bt,itemRef:Bt,itemScope:et,itemType:Bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:et,low:ve,manifest:null,max:null,maxLength:ve,media:null,method:null,min:null,minLength:ve,multiple:et,muted:et,name:null,nonce:null,noModule:et,noValidate:et,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:et,optimum:ve,pattern:null,ping:Bt,placeholder:null,playsInline:et,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:et,referrerPolicy:null,rel:Bt,required:et,reversed:et,rows:ve,rowSpan:ve,sandbox:Bt,scope:null,scoped:et,seamless:et,selected:et,shadowRootClonable:et,shadowRootDelegatesFocus:et,shadowRootMode:null,shape:null,size:ve,sizes:null,slot:null,span:ve,spellCheck:mn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ve,step:null,style:null,tabIndex:ve,target:null,title:null,translate:null,type:null,typeMustMatch:et,useMap:null,value:mn,width:ve,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Bt,axis:null,background:null,bgColor:null,border:ve,borderColor:null,bottomMargin:ve,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:et,declare:et,event:null,face:null,frame:null,frameBorder:null,hSpace:ve,leftMargin:ve,link:null,longDesc:null,lowSrc:null,marginHeight:ve,marginWidth:ve,noResize:et,noHref:et,noShade:et,noWrap:et,object:null,profile:null,prompt:null,rev:null,rightMargin:ve,rules:null,scheme:null,scrolling:mn,standby:null,summary:null,text:null,topMargin:ve,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ve,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:et,disableRemotePlayback:et,prefix:null,property:null,results:ve,security:null,unselectable:null},space:"html",transform:v4}),dQ=Eu({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:kr,accentHeight:ve,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ve,amplitude:ve,arabicForm:null,ascent:ve,attributeName:null,attributeType:null,azimuth:ve,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ve,by:null,calcMode:null,capHeight:ve,className:Bt,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:ve,diffuseConstant:ve,direction:null,display:null,dur:null,divisor:ve,dominantBaseline:null,download:et,dx:null,dy:null,edgeMode:null,editable:null,elevation:ve,enableBackground:null,end:null,event:null,exponent:ve,externalResourcesRequired:null,fill:null,fillOpacity:ve,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:Vl,g2:Vl,glyphName:Vl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ve,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ve,horizOriginX:ve,horizOriginY:ve,id:null,ideographic:ve,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ve,k:ve,k1:ve,k2:ve,k3:ve,k4:ve,kernelMatrix:kr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ve,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ve,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:ve,overlineThickness:ve,paintOrder:null,panose1:null,path:null,pathLength:ve,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ve,pointsAtY:ve,pointsAtZ:ve,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:kr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:kr,rev:kr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:kr,requiredFeatures:kr,requiredFonts:kr,requiredFormats:kr,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:ve,specularExponent:ve,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ve,strikethroughThickness:ve,string:null,stroke:null,strokeDashArray:kr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ve,strokeOpacity:ve,strokeWidth:null,style:null,surfaceScale:ve,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:kr,tabIndex:ve,tableValues:null,target:null,targetX:ve,targetY:ve,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:kr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ve,underlineThickness:ve,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ve,values:null,vAlphabetic:ve,vMathematical:ve,vectorEffect:null,vHanging:ve,vIdeographic:ve,version:null,vertAdvY:ve,vertOriginX:ve,vertOriginY:ve,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ve,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:x4}),E4=Eu({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()}}),T4=Eu({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:v4}),S4=Eu({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),hQ={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"},mQ=/[A-Z]/g,c_=/-[a-z]/g,pQ=/^data[-\w.:]+$/i;function dp(e,t){const n=gf(t);let r=t,s=vr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&pQ.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(c_,bQ);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!c_.test(o)){let l=o.replace(mQ,gQ);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=_v}return new s(r,t)}function gQ(e){return"-"+e.toLowerCase()}function bQ(e){return e.charAt(1).toUpperCase()}const Vf=b4([y4,fQ,E4,T4,S4],"html"),_a=b4([y4,dQ,E4,T4,S4],"svg");function f_(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const l=n.slice(s,r).trim();(l||!o)&&t.push(l),s=r+1,r=n.indexOf(",",s)}return t}function C4(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const d_=/[#.]/g;function yQ(e,t){const n=e||"",r={};let s=0,o,l;for(;s<n.length;){d_.lastIndex=s;const u=d_.exec(n),d=n.slice(s,u?u.index:n.length);d&&(o?o==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:l=d,s+=d.length),u&&(o=u[0],s++)}return{type:"element",tagName:l||t||"div",properties:r,children:[]}}function h_(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function w4(e){return e.join(" ").trim()}function A4(e,t,n){const r=n?TQ(n):void 0;function s(o,l,...u){let d;if(o==null){d={type:"root",children:[]};const f=l;u.unshift(f)}else{d=yQ(o,t);const f=d.tagName.toLowerCase(),m=r?r.get(f):void 0;if(d.tagName=m||f,xQ(l))u.unshift(l);else for(const[p,g]of Object.entries(l))vQ(e,d.properties,p,g)}for(const f of u)_y(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function xQ(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const o=s;for(const l of o)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function vQ(e,t,n,r){const s=dp(e,n);let o;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;o=r}else typeof r=="boolean"?o=r:typeof r=="string"?s.spaceSeparated?o=h_(r):s.commaSeparated?o=f_(r):s.commaOrSpaceSeparated?o=h_(f_(r).join(" ")):o=m_(s,s.property,r):Array.isArray(r)?o=[...r]:o=s.property==="style"?EQ(r):String(r);if(Array.isArray(o)){const l=[];for(const u of o)l.push(m_(s,s.property,u));o=l}s.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[s.property]=o}}function _y(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)_y(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?_y(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function m_(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||gf(n)===gf(t)))return!0}return n}function EQ(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function TQ(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const SQ=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],CQ=A4(Vf,"div"),wQ=A4(_a,"g",SQ);function AQ(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(o){if(typeof o=="number"&&o>-1&&o<=t.length){let l=0;for(;;){let u=n[l];if(u===void 0){const d=p_(t,n[l-1]);u=d===-1?t.length+1:d+1,n[l]=u}if(u>o)return{line:l+1,column:o-(l>0?n[l-1]:0)+1,offset:o};l++}}}function s(o){if(o&&typeof o.line=="number"&&typeof o.column=="number"&&!Number.isNaN(o.line)&&!Number.isNaN(o.column)){for(;n.length<o.line;){const u=n[n.length-1],d=p_(t,u),f=d===-1?t.length+1:d+1;if(u===f)break;n.push(f)}const l=(o.line>1?n[o.line-2]:0)+o.column-1;if(l<n[o.line-1])return l}}}function p_(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
375
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const ro={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},_4={}.hasOwnProperty,_Q=Object.prototype;function kQ(e,t){const n=t||{};return kv({file:n.file||void 0,location:!1,schema:n.space==="svg"?_a:Vf,verbose:n.verbose||!1},e)}function kv(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Zh(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:k4(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const o=String(e.file),l=AQ(o),u=l.toPoint(0),d=l.toPoint(o.length);n.position={start:u,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Zh(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Zh(e,r,n),n}default:return n=NQ(e,t),n}}function k4(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=kv(e,t[n]);r.push(s)}return r}function NQ(e,t){const n=e.schema;e.schema=t.namespaceURI===ro.svg?_a:Vf;let r=-1;const s={};for(;++r<t.attrs.length;){const u=t.attrs[r],d=(u.prefix?u.prefix+":":"")+u.name;_4.call(_Q,d)||(s[d]=u.value)}const l=(e.schema.space==="svg"?wQ:CQ)(t.tagName,s,k4(e,t.childNodes));if(Zh(e,t,l),l.tagName==="template"){const u=t,d=u.sourceCodeLocation,f=d&&d.startTag&&Ul(d.startTag),m=d&&d.endTag&&Ul(d.endTag),p=kv(e,u.content);f&&m&&e.file&&(p.position={start:f.end,end:m.start}),l.content=p}return e.schema=n,l}function Zh(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=RQ(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function RQ(e,t,n){const r=Ul(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const o={};let l;if(n.attrs)for(l in n.attrs)_4.call(n.attrs,l)&&(o[dp(e.schema,l).property]=Ul(n.attrs[l]));n.startTag;const u=Ul(n.startTag),d=n.endTag?Ul(n.endTag):void 0,f={opening:u};d&&(f.closing=d),f.properties=o,t.data={position:f}}}return r}function Ul(e){const t=g_({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=g_({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function g_(e){return e.line&&e.column?e:void 0}const b_={}.hasOwnProperty;function N4(e,t){const n=t||{};function r(s,...o){let l=r.invalid;const u=r.handlers;if(s&&b_.call(s,e)){const d=String(s[e]);l=b_.call(u,d)?u[d]:r.unknown}if(l)return l.call(this,s,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const OQ={},DQ={}.hasOwnProperty,R4=N4("type",{handlers:{root:IQ,element:UQ,text:jQ,comment:BQ,doctype:PQ}});function MQ(e,t){const r=(t||OQ).space;return R4(e,r==="svg"?_a:Vf)}function IQ(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Nv(e.children,n,t),Tu(e,n),n}function LQ(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Nv(e.children,n,t),Tu(e,n),n}function PQ(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Tu(e,t),t}function jQ(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Tu(e,t),t}function BQ(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Tu(e,t),t}function UQ(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=_a);const s=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&DQ.call(e.properties,o)){const d=FQ(r,o,e.properties[o]);d&&s.push(d)}}const l=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:ro[l],childNodes:[],parentNode:null};return u.childNodes=Nv(e.children,u,r),Tu(e,u),e.tagName==="template"&&e.content&&(u.content=LQ(e.content,r)),u}function FQ(e,t,n){const r=dp(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?C4(n):w4(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const o=s.name.indexOf(":");o<0?s.prefix="":(s.name=s.name.slice(o+1),s.prefix=r.attribute.slice(0,o)),s.namespace=ro[r.space]}return s}function Nv(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const o=R4(e[r],n);o.parentNode=t,s.push(o)}return s}function Tu(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const HQ=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],zQ=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Yt="�";var F;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(F||(F={}));const pr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function O4(e){return e>=55296&&e<=57343}function VQ(e){return e>=56320&&e<=57343}function qQ(e,t){return(e-55296)*1024+9216+t}function D4(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function M4(e){return e>=64976&&e<=65007||zQ.has(e)}var ue;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ue||(ue={}));const $Q=65536;class YQ{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=$Q,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:o}=this,l=s+n,u=o+n;return{code:t,startLine:r,endLine:r,startCol:l,endCol:l,startOffset:u,endOffset:u}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(VQ(n))return this.pos++,this._addGap(),qQ(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,F.EOF;return this._err(ue.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,F.EOF;const r=this.html.charCodeAt(n);return r===F.CARRIAGE_RETURN?F.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,F.EOF;let t=this.html.charCodeAt(this.pos);return t===F.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,F.LINE_FEED):t===F.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,O4(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===F.LINE_FEED||t===F.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){D4(t)?this._err(ue.controlCharacterInInputStream):M4(t)&&this._err(ue.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var at;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(at||(at={}));function I4(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const GQ=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),XQ=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function KQ(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=XQ.get(e))!==null&&t!==void 0?t:e}var On;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(On||(On={}));const QQ=32;var pa;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(pa||(pa={}));function ky(e){return e>=On.ZERO&&e<=On.NINE}function WQ(e){return e>=On.UPPER_A&&e<=On.UPPER_F||e>=On.LOWER_A&&e<=On.LOWER_F}function ZQ(e){return e>=On.UPPER_A&&e<=On.UPPER_Z||e>=On.LOWER_A&&e<=On.LOWER_Z||ky(e)}function JQ(e){return e===On.EQUALS||ZQ(e)}var Nn;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Nn||(Nn={}));var ys;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ys||(ys={}));class eW{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Nn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ys.Strict}startEntity(t){this.decodeMode=t,this.state=Nn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Nn.EntityStart:return t.charCodeAt(n)===On.NUM?(this.state=Nn.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Nn.NamedEntity,this.stateNamedEntity(t,n));case Nn.NumericStart:return this.stateNumericStart(t,n);case Nn.NumericDecimal:return this.stateNumericDecimal(t,n);case Nn.NumericHex:return this.stateNumericHex(t,n);case Nn.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|QQ)===On.LOWER_X?(this.state=Nn.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Nn.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const o=r-n;this.result=this.result*Math.pow(s,o)+Number.parseInt(t.substr(n,o),s),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(ky(s)||WQ(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(ky(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===On.SEMI)this.consumed+=1;else if(this.decodeMode===ys.Strict)return 0;return this.emitCodePoint(KQ(this.result),this.consumed),this.errors&&(t!==On.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],o=(s&pa.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=tW(r,s,this.treeIndex+Math.max(1,o),l),this.treeIndex<0)return this.result===0||this.decodeMode===ys.Attribute&&(o===0||JQ(l))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],o=(s&pa.VALUE_LENGTH)>>14,o!==0){if(l===On.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==ys.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&pa.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~pa.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Nn.NamedEntity:return this.result!==0&&(this.decodeMode!==ys.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Nn.NumericDecimal:return this.emitNumericEntity(0,2);case Nn.NumericHex:return this.emitNumericEntity(0,3);case Nn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Nn.EntityStart:return 0}}}function tW(e,t,n,r){const s=(t&pa.BRANCH_LENGTH)>>7,o=t&pa.JUMP_TABLE;if(s===0)return o!==0&&r===o?n:-1;if(o){const d=r-o;return d<0||d>=s?-1:e[n+d]-1}let l=n,u=l+s-1;for(;l<=u;){const d=l+u>>>1,f=e[d];if(f<r)l=d+1;else if(f>r)u=d-1;else return e[d+s]}return-1}var ge;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(ge||(ge={}));var po;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(po||(po={}));var Yr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Yr||(Yr={}));var re;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(re||(re={}));var C;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(C||(C={}));const nW=new Map([[re.A,C.A],[re.ADDRESS,C.ADDRESS],[re.ANNOTATION_XML,C.ANNOTATION_XML],[re.APPLET,C.APPLET],[re.AREA,C.AREA],[re.ARTICLE,C.ARTICLE],[re.ASIDE,C.ASIDE],[re.B,C.B],[re.BASE,C.BASE],[re.BASEFONT,C.BASEFONT],[re.BGSOUND,C.BGSOUND],[re.BIG,C.BIG],[re.BLOCKQUOTE,C.BLOCKQUOTE],[re.BODY,C.BODY],[re.BR,C.BR],[re.BUTTON,C.BUTTON],[re.CAPTION,C.CAPTION],[re.CENTER,C.CENTER],[re.CODE,C.CODE],[re.COL,C.COL],[re.COLGROUP,C.COLGROUP],[re.DD,C.DD],[re.DESC,C.DESC],[re.DETAILS,C.DETAILS],[re.DIALOG,C.DIALOG],[re.DIR,C.DIR],[re.DIV,C.DIV],[re.DL,C.DL],[re.DT,C.DT],[re.EM,C.EM],[re.EMBED,C.EMBED],[re.FIELDSET,C.FIELDSET],[re.FIGCAPTION,C.FIGCAPTION],[re.FIGURE,C.FIGURE],[re.FONT,C.FONT],[re.FOOTER,C.FOOTER],[re.FOREIGN_OBJECT,C.FOREIGN_OBJECT],[re.FORM,C.FORM],[re.FRAME,C.FRAME],[re.FRAMESET,C.FRAMESET],[re.H1,C.H1],[re.H2,C.H2],[re.H3,C.H3],[re.H4,C.H4],[re.H5,C.H5],[re.H6,C.H6],[re.HEAD,C.HEAD],[re.HEADER,C.HEADER],[re.HGROUP,C.HGROUP],[re.HR,C.HR],[re.HTML,C.HTML],[re.I,C.I],[re.IMG,C.IMG],[re.IMAGE,C.IMAGE],[re.INPUT,C.INPUT],[re.IFRAME,C.IFRAME],[re.KEYGEN,C.KEYGEN],[re.LABEL,C.LABEL],[re.LI,C.LI],[re.LINK,C.LINK],[re.LISTING,C.LISTING],[re.MAIN,C.MAIN],[re.MALIGNMARK,C.MALIGNMARK],[re.MARQUEE,C.MARQUEE],[re.MATH,C.MATH],[re.MENU,C.MENU],[re.META,C.META],[re.MGLYPH,C.MGLYPH],[re.MI,C.MI],[re.MO,C.MO],[re.MN,C.MN],[re.MS,C.MS],[re.MTEXT,C.MTEXT],[re.NAV,C.NAV],[re.NOBR,C.NOBR],[re.NOFRAMES,C.NOFRAMES],[re.NOEMBED,C.NOEMBED],[re.NOSCRIPT,C.NOSCRIPT],[re.OBJECT,C.OBJECT],[re.OL,C.OL],[re.OPTGROUP,C.OPTGROUP],[re.OPTION,C.OPTION],[re.P,C.P],[re.PARAM,C.PARAM],[re.PLAINTEXT,C.PLAINTEXT],[re.PRE,C.PRE],[re.RB,C.RB],[re.RP,C.RP],[re.RT,C.RT],[re.RTC,C.RTC],[re.RUBY,C.RUBY],[re.S,C.S],[re.SCRIPT,C.SCRIPT],[re.SEARCH,C.SEARCH],[re.SECTION,C.SECTION],[re.SELECT,C.SELECT],[re.SOURCE,C.SOURCE],[re.SMALL,C.SMALL],[re.SPAN,C.SPAN],[re.STRIKE,C.STRIKE],[re.STRONG,C.STRONG],[re.STYLE,C.STYLE],[re.SUB,C.SUB],[re.SUMMARY,C.SUMMARY],[re.SUP,C.SUP],[re.TABLE,C.TABLE],[re.TBODY,C.TBODY],[re.TEMPLATE,C.TEMPLATE],[re.TEXTAREA,C.TEXTAREA],[re.TFOOT,C.TFOOT],[re.TD,C.TD],[re.TH,C.TH],[re.THEAD,C.THEAD],[re.TITLE,C.TITLE],[re.TR,C.TR],[re.TRACK,C.TRACK],[re.TT,C.TT],[re.U,C.U],[re.UL,C.UL],[re.SVG,C.SVG],[re.VAR,C.VAR],[re.WBR,C.WBR],[re.XMP,C.XMP]]);function Su(e){var t;return(t=nW.get(e))!==null&&t!==void 0?t:C.UNKNOWN}const be=C,rW={[ge.HTML]:new Set([be.ADDRESS,be.APPLET,be.AREA,be.ARTICLE,be.ASIDE,be.BASE,be.BASEFONT,be.BGSOUND,be.BLOCKQUOTE,be.BODY,be.BR,be.BUTTON,be.CAPTION,be.CENTER,be.COL,be.COLGROUP,be.DD,be.DETAILS,be.DIR,be.DIV,be.DL,be.DT,be.EMBED,be.FIELDSET,be.FIGCAPTION,be.FIGURE,be.FOOTER,be.FORM,be.FRAME,be.FRAMESET,be.H1,be.H2,be.H3,be.H4,be.H5,be.H6,be.HEAD,be.HEADER,be.HGROUP,be.HR,be.HTML,be.IFRAME,be.IMG,be.INPUT,be.LI,be.LINK,be.LISTING,be.MAIN,be.MARQUEE,be.MENU,be.META,be.NAV,be.NOEMBED,be.NOFRAMES,be.NOSCRIPT,be.OBJECT,be.OL,be.P,be.PARAM,be.PLAINTEXT,be.PRE,be.SCRIPT,be.SECTION,be.SELECT,be.SOURCE,be.STYLE,be.SUMMARY,be.TABLE,be.TBODY,be.TD,be.TEMPLATE,be.TEXTAREA,be.TFOOT,be.TH,be.THEAD,be.TITLE,be.TR,be.TRACK,be.UL,be.WBR,be.XMP]),[ge.MATHML]:new Set([be.MI,be.MO,be.MN,be.MS,be.MTEXT,be.ANNOTATION_XML]),[ge.SVG]:new Set([be.TITLE,be.FOREIGN_OBJECT,be.DESC]),[ge.XLINK]:new Set,[ge.XML]:new Set,[ge.XMLNS]:new Set},Ny=new Set([be.H1,be.H2,be.H3,be.H4,be.H5,be.H6]);re.STYLE,re.SCRIPT,re.XMP,re.IFRAME,re.NOEMBED,re.NOFRAMES,re.PLAINTEXT;var V;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(V||(V={}));const on={DATA:V.DATA,RCDATA:V.RCDATA,RAWTEXT:V.RAWTEXT,SCRIPT_DATA:V.SCRIPT_DATA,PLAINTEXT:V.PLAINTEXT,CDATA_SECTION:V.CDATA_SECTION};function iW(e){return e>=F.DIGIT_0&&e<=F.DIGIT_9}function jc(e){return e>=F.LATIN_CAPITAL_A&&e<=F.LATIN_CAPITAL_Z}function sW(e){return e>=F.LATIN_SMALL_A&&e<=F.LATIN_SMALL_Z}function na(e){return sW(e)||jc(e)}function y_(e){return na(e)||iW(e)}function Oh(e){return e+32}function L4(e){return e===F.SPACE||e===F.LINE_FEED||e===F.TABULATION||e===F.FORM_FEED}function x_(e){return L4(e)||e===F.SOLIDUS||e===F.GREATER_THAN_SIGN}function aW(e){return e===F.NULL?ue.nullCharacterReference:e>1114111?ue.characterReferenceOutsideUnicodeRange:O4(e)?ue.surrogateCharacterReference:M4(e)?ue.noncharacterCharacterReference:D4(e)||e===F.CARRIAGE_RETURN?ue.controlCharacterReference:null}class oW{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=V.DATA,this.returnState=V.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new YQ(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new eW(GQ,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ue.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ue.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=aW(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:at.START_TAG,tagName:"",tagID:C.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:at.END_TAG,tagName:"",tagID:C.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:at.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:at.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(I4(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ue.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Su(t.tagName),t.type===at.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ue.endTagWithAttributes),t.selfClosing&&this._err(ue.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case at.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case at.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case at.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:at.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=L4(t)?at.WHITESPACE_CHARACTER:t===F.NULL?at.NULL_CHARACTER:at.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(at.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=V.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ys.Attribute:ys.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===V.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===V.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===V.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case V.DATA:{this._stateData(t);break}case V.RCDATA:{this._stateRcdata(t);break}case V.RAWTEXT:{this._stateRawtext(t);break}case V.SCRIPT_DATA:{this._stateScriptData(t);break}case V.PLAINTEXT:{this._statePlaintext(t);break}case V.TAG_OPEN:{this._stateTagOpen(t);break}case V.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case V.TAG_NAME:{this._stateTagName(t);break}case V.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case V.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case V.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case V.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case V.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case V.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case V.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case V.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case V.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case V.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case V.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case V.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case V.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case V.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case V.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case V.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case V.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case V.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case V.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case V.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case V.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case V.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case V.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case V.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case V.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case V.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case V.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case V.BOGUS_COMMENT:{this._stateBogusComment(t);break}case V.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case V.COMMENT_START:{this._stateCommentStart(t);break}case V.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case V.COMMENT:{this._stateComment(t);break}case V.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case V.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case V.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case V.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case V.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case V.COMMENT_END:{this._stateCommentEnd(t);break}case V.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case V.DOCTYPE:{this._stateDoctype(t);break}case V.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case V.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case V.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case V.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case V.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case V.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case V.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case V.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case V.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case V.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case V.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case V.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case V.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case V.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case V.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case V.CDATA_SECTION:{this._stateCdataSection(t);break}case V.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case V.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case V.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case V.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case F.LESS_THAN_SIGN:{this.state=V.TAG_OPEN;break}case F.AMPERSAND:{this._startCharacterReference();break}case F.NULL:{this._err(ue.unexpectedNullCharacter),this._emitCodePoint(t);break}case F.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case F.AMPERSAND:{this._startCharacterReference();break}case F.LESS_THAN_SIGN:{this.state=V.RCDATA_LESS_THAN_SIGN;break}case F.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Yt);break}case F.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case F.LESS_THAN_SIGN:{this.state=V.RAWTEXT_LESS_THAN_SIGN;break}case F.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Yt);break}case F.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case F.LESS_THAN_SIGN:{this.state=V.SCRIPT_DATA_LESS_THAN_SIGN;break}case F.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Yt);break}case F.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case F.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Yt);break}case F.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(na(t))this._createStartTagToken(),this.state=V.TAG_NAME,this._stateTagName(t);else switch(t){case F.EXCLAMATION_MARK:{this.state=V.MARKUP_DECLARATION_OPEN;break}case F.SOLIDUS:{this.state=V.END_TAG_OPEN;break}case F.QUESTION_MARK:{this._err(ue.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=V.BOGUS_COMMENT,this._stateBogusComment(t);break}case F.EOF:{this._err(ue.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ue.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=V.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(na(t))this._createEndTagToken(),this.state=V.TAG_NAME,this._stateTagName(t);else switch(t){case F.GREATER_THAN_SIGN:{this._err(ue.missingEndTagName),this.state=V.DATA;break}case F.EOF:{this._err(ue.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ue.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=V.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this.state=V.BEFORE_ATTRIBUTE_NAME;break}case F.SOLIDUS:{this.state=V.SELF_CLOSING_START_TAG;break}case F.GREATER_THAN_SIGN:{this.state=V.DATA,this.emitCurrentTagToken();break}case F.NULL:{this._err(ue.unexpectedNullCharacter),n.tagName+=Yt;break}case F.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(jc(t)?Oh(t):t)}}_stateRcdataLessThanSign(t){t===F.SOLIDUS?this.state=V.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=V.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){na(t)?(this.state=V.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=V.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=V.BEFORE_ATTRIBUTE_NAME,!1;case F.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=V.SELF_CLOSING_START_TAG,!1;case F.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=V.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=V.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===F.SOLIDUS?this.state=V.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=V.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){na(t)?(this.state=V.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=V.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=V.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case F.SOLIDUS:{this.state=V.SCRIPT_DATA_END_TAG_OPEN;break}case F.EXCLAMATION_MARK:{this.state=V.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=V.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){na(t)?(this.state=V.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=V.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=V.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===F.HYPHEN_MINUS?(this.state=V.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=V.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===F.HYPHEN_MINUS?(this.state=V.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=V.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case F.HYPHEN_MINUS:{this.state=V.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case F.LESS_THAN_SIGN:{this.state=V.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case F.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Yt);break}case F.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case F.HYPHEN_MINUS:{this.state=V.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case F.LESS_THAN_SIGN:{this.state=V.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case F.NULL:{this._err(ue.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_ESCAPED,this._emitChars(Yt);break}case F.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=V.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case F.HYPHEN_MINUS:{this._emitChars("-");break}case F.LESS_THAN_SIGN:{this.state=V.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case F.GREATER_THAN_SIGN:{this.state=V.SCRIPT_DATA,this._emitChars(">");break}case F.NULL:{this._err(ue.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_ESCAPED,this._emitChars(Yt);break}case F.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=V.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===F.SOLIDUS?this.state=V.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:na(t)?(this._emitChars("<"),this.state=V.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=V.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){na(t)?(this.state=V.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=V.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=V.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(pr.SCRIPT,!1)&&x_(this.preprocessor.peek(pr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<pr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=V.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case F.HYPHEN_MINUS:{this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case F.LESS_THAN_SIGN:{this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case F.NULL:{this._err(ue.unexpectedNullCharacter),this._emitChars(Yt);break}case F.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case F.HYPHEN_MINUS:{this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case F.LESS_THAN_SIGN:{this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case F.NULL:{this._err(ue.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Yt);break}case F.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case F.HYPHEN_MINUS:{this._emitChars("-");break}case F.LESS_THAN_SIGN:{this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case F.GREATER_THAN_SIGN:{this.state=V.SCRIPT_DATA,this._emitChars(">");break}case F.NULL:{this._err(ue.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Yt);break}case F.EOF:{this._err(ue.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===F.SOLIDUS?(this.state=V.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(pr.SCRIPT,!1)&&x_(this.preprocessor.peek(pr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<pr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=V.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.SOLIDUS:case F.GREATER_THAN_SIGN:case F.EOF:{this.state=V.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case F.EQUALS_SIGN:{this._err(ue.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=V.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=V.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:case F.SOLIDUS:case F.GREATER_THAN_SIGN:case F.EOF:{this._leaveAttrName(),this.state=V.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case F.EQUALS_SIGN:{this._leaveAttrName(),this.state=V.BEFORE_ATTRIBUTE_VALUE;break}case F.QUOTATION_MARK:case F.APOSTROPHE:case F.LESS_THAN_SIGN:{this._err(ue.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case F.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.name+=Yt;break}default:this.currentAttr.name+=String.fromCodePoint(jc(t)?Oh(t):t)}}_stateAfterAttributeName(t){switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.SOLIDUS:{this.state=V.SELF_CLOSING_START_TAG;break}case F.EQUALS_SIGN:{this.state=V.BEFORE_ATTRIBUTE_VALUE;break}case F.GREATER_THAN_SIGN:{this.state=V.DATA,this.emitCurrentTagToken();break}case F.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=V.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.QUOTATION_MARK:{this.state=V.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case F.APOSTROPHE:{this.state=V.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case F.GREATER_THAN_SIGN:{this._err(ue.missingAttributeValue),this.state=V.DATA,this.emitCurrentTagToken();break}default:this.state=V.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case F.QUOTATION_MARK:{this.state=V.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case F.AMPERSAND:{this._startCharacterReference();break}case F.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.value+=Yt;break}case F.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case F.APOSTROPHE:{this.state=V.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case F.AMPERSAND:{this._startCharacterReference();break}case F.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.value+=Yt;break}case F.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this._leaveAttrValue(),this.state=V.BEFORE_ATTRIBUTE_NAME;break}case F.AMPERSAND:{this._startCharacterReference();break}case F.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=V.DATA,this.emitCurrentTagToken();break}case F.NULL:{this._err(ue.unexpectedNullCharacter),this.currentAttr.value+=Yt;break}case F.QUOTATION_MARK:case F.APOSTROPHE:case F.LESS_THAN_SIGN:case F.EQUALS_SIGN:case F.GRAVE_ACCENT:{this._err(ue.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case F.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this._leaveAttrValue(),this.state=V.BEFORE_ATTRIBUTE_NAME;break}case F.SOLIDUS:{this._leaveAttrValue(),this.state=V.SELF_CLOSING_START_TAG;break}case F.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=V.DATA,this.emitCurrentTagToken();break}case F.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this._err(ue.missingWhitespaceBetweenAttributes),this.state=V.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case F.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=V.DATA,this.emitCurrentTagToken();break}case F.EOF:{this._err(ue.eofInTag),this._emitEOFToken();break}default:this._err(ue.unexpectedSolidusInTag),this.state=V.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case F.GREATER_THAN_SIGN:{this.state=V.DATA,this.emitCurrentComment(n);break}case F.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case F.NULL:{this._err(ue.unexpectedNullCharacter),n.data+=Yt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(pr.DASH_DASH,!0)?(this._createCommentToken(pr.DASH_DASH.length+1),this.state=V.COMMENT_START):this._consumeSequenceIfMatch(pr.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(pr.DOCTYPE.length+1),this.state=V.DOCTYPE):this._consumeSequenceIfMatch(pr.CDATA_START,!0)?this.inForeignNode?this.state=V.CDATA_SECTION:(this._err(ue.cdataInHtmlContent),this._createCommentToken(pr.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=V.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ue.incorrectlyOpenedComment),this._createCommentToken(2),this.state=V.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case F.HYPHEN_MINUS:{this.state=V.COMMENT_START_DASH;break}case F.GREATER_THAN_SIGN:{this._err(ue.abruptClosingOfEmptyComment),this.state=V.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=V.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case F.HYPHEN_MINUS:{this.state=V.COMMENT_END;break}case F.GREATER_THAN_SIGN:{this._err(ue.abruptClosingOfEmptyComment),this.state=V.DATA,this.emitCurrentComment(n);break}case F.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=V.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case F.HYPHEN_MINUS:{this.state=V.COMMENT_END_DASH;break}case F.LESS_THAN_SIGN:{n.data+="<",this.state=V.COMMENT_LESS_THAN_SIGN;break}case F.NULL:{this._err(ue.unexpectedNullCharacter),n.data+=Yt;break}case F.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case F.EXCLAMATION_MARK:{n.data+="!",this.state=V.COMMENT_LESS_THAN_SIGN_BANG;break}case F.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=V.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===F.HYPHEN_MINUS?this.state=V.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=V.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===F.HYPHEN_MINUS?this.state=V.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=V.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==F.GREATER_THAN_SIGN&&t!==F.EOF&&this._err(ue.nestedComment),this.state=V.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case F.HYPHEN_MINUS:{this.state=V.COMMENT_END;break}case F.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=V.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case F.GREATER_THAN_SIGN:{this.state=V.DATA,this.emitCurrentComment(n);break}case F.EXCLAMATION_MARK:{this.state=V.COMMENT_END_BANG;break}case F.HYPHEN_MINUS:{n.data+="-";break}case F.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=V.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case F.HYPHEN_MINUS:{n.data+="--!",this.state=V.COMMENT_END_DASH;break}case F.GREATER_THAN_SIGN:{this._err(ue.incorrectlyClosedComment),this.state=V.DATA,this.emitCurrentComment(n);break}case F.EOF:{this._err(ue.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=V.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this.state=V.BEFORE_DOCTYPE_NAME;break}case F.GREATER_THAN_SIGN:{this.state=V.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case F.EOF:{this._err(ue.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingWhitespaceBeforeDoctypeName),this.state=V.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(jc(t))this._createDoctypeToken(String.fromCharCode(Oh(t))),this.state=V.DOCTYPE_NAME;else switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.NULL:{this._err(ue.unexpectedNullCharacter),this._createDoctypeToken(Yt),this.state=V.DOCTYPE_NAME;break}case F.GREATER_THAN_SIGN:{this._err(ue.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=V.DATA;break}case F.EOF:{this._err(ue.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=V.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this.state=V.AFTER_DOCTYPE_NAME;break}case F.GREATER_THAN_SIGN:{this.state=V.DATA,this.emitCurrentDoctype(n);break}case F.NULL:{this._err(ue.unexpectedNullCharacter),n.name+=Yt;break}case F.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(jc(t)?Oh(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.GREATER_THAN_SIGN:{this.state=V.DATA,this.emitCurrentDoctype(n);break}case F.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(pr.PUBLIC,!1)?this.state=V.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(pr.SYSTEM,!1)?this.state=V.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ue.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this.state=V.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case F.QUOTATION_MARK:{this._err(ue.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=V.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case F.APOSTROPHE:{this._err(ue.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=V.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case F.GREATER_THAN_SIGN:{this._err(ue.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=V.DATA,this.emitCurrentDoctype(n);break}case F.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.QUOTATION_MARK:{n.publicId="",this.state=V.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case F.APOSTROPHE:{n.publicId="",this.state=V.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case F.GREATER_THAN_SIGN:{this._err(ue.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=V.DATA,this.emitCurrentDoctype(n);break}case F.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case F.QUOTATION_MARK:{this.state=V.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case F.NULL:{this._err(ue.unexpectedNullCharacter),n.publicId+=Yt;break}case F.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=V.DATA;break}case F.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case F.APOSTROPHE:{this.state=V.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case F.NULL:{this._err(ue.unexpectedNullCharacter),n.publicId+=Yt;break}case F.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=V.DATA;break}case F.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this.state=V.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case F.GREATER_THAN_SIGN:{this.state=V.DATA,this.emitCurrentDoctype(n);break}case F.QUOTATION_MARK:{this._err(ue.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case F.APOSTROPHE:{this._err(ue.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case F.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=V.DATA;break}case F.QUOTATION_MARK:{n.systemId="",this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case F.APOSTROPHE:{n.systemId="",this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case F.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:{this.state=V.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case F.QUOTATION_MARK:{this._err(ue.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case F.APOSTROPHE:{this._err(ue.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case F.GREATER_THAN_SIGN:{this._err(ue.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=V.DATA,this.emitCurrentDoctype(n);break}case F.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.QUOTATION_MARK:{n.systemId="",this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case F.APOSTROPHE:{n.systemId="",this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case F.GREATER_THAN_SIGN:{this._err(ue.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=V.DATA,this.emitCurrentDoctype(n);break}case F.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case F.QUOTATION_MARK:{this.state=V.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case F.NULL:{this._err(ue.unexpectedNullCharacter),n.systemId+=Yt;break}case F.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=V.DATA;break}case F.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case F.APOSTROPHE:{this.state=V.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case F.NULL:{this._err(ue.unexpectedNullCharacter),n.systemId+=Yt;break}case F.GREATER_THAN_SIGN:{this._err(ue.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=V.DATA;break}case F.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case F.SPACE:case F.LINE_FEED:case F.TABULATION:case F.FORM_FEED:break;case F.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=V.DATA;break}case F.EOF:{this._err(ue.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ue.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case F.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=V.DATA;break}case F.NULL:{this._err(ue.unexpectedNullCharacter);break}case F.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case F.RIGHT_SQUARE_BRACKET:{this.state=V.CDATA_SECTION_BRACKET;break}case F.EOF:{this._err(ue.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===F.RIGHT_SQUARE_BRACKET?this.state=V.CDATA_SECTION_END:(this._emitChars("]"),this.state=V.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case F.GREATER_THAN_SIGN:{this.state=V.DATA;break}case F.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=V.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(F.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&y_(this.preprocessor.peek(1))?V.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){y_(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===F.SEMICOLON&&this._err(ue.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const P4=new Set([C.DD,C.DT,C.LI,C.OPTGROUP,C.OPTION,C.P,C.RB,C.RP,C.RT,C.RTC]),v_=new Set([...P4,C.CAPTION,C.COLGROUP,C.TBODY,C.TD,C.TFOOT,C.TH,C.THEAD,C.TR]),wm=new Set([C.APPLET,C.CAPTION,C.HTML,C.MARQUEE,C.OBJECT,C.TABLE,C.TD,C.TEMPLATE,C.TH]),lW=new Set([...wm,C.OL,C.UL]),uW=new Set([...wm,C.BUTTON]),E_=new Set([C.ANNOTATION_XML,C.MI,C.MN,C.MO,C.MS,C.MTEXT]),T_=new Set([C.DESC,C.FOREIGN_OBJECT,C.TITLE]),cW=new Set([C.TR,C.TEMPLATE,C.HTML]),fW=new Set([C.TBODY,C.TFOOT,C.THEAD,C.TEMPLATE,C.HTML]),dW=new Set([C.TABLE,C.TEMPLATE,C.HTML]),hW=new Set([C.TD,C.TH]);class mW{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=C.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===C.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ge.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==ge.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Ny,ge.HTML)}popUntilTableCellPopped(){this.popUntilPopped(hW,ge.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(dW,ge.HTML)}clearBackToTableBodyContext(){this.clearBackTo(fW,ge.HTML)}clearBackToTableRowContext(){this.clearBackTo(cW,ge.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===C.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===C.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ge.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case ge.SVG:{if(T_.has(s))return!1;break}case ge.MATHML:{if(E_.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,wm)}hasInListItemScope(t){return this.hasInDynamicScope(t,lW)}hasInButtonScope(t){return this.hasInDynamicScope(t,uW)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ge.HTML:{if(Ny.has(n))return!0;if(wm.has(n))return!1;break}case ge.SVG:{if(T_.has(n))return!1;break}case ge.MATHML:{if(E_.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ge.HTML)switch(this.tagIDs[n]){case t:return!0;case C.TABLE:case C.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ge.HTML)switch(this.tagIDs[t]){case C.TBODY:case C.THEAD:case C.TFOOT:return!0;case C.TABLE:case C.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ge.HTML)switch(this.tagIDs[n]){case t:return!0;case C.OPTION:case C.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&P4.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&v_.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&v_.has(this.currentTagId);)this.pop()}}const W1=3;var Mi;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Mi||(Mi={}));const S_={type:Mi.Marker};class pW{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,o=this.treeAdapter.getTagName(t),l=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const d=this.entries[u];if(d.type===Mi.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===o&&this.treeAdapter.getNamespaceURI(f)===l){const m=this.treeAdapter.getAttrList(f);m.length===s&&r.push({idx:u,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<W1)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<W1)return;const s=new Map(n.map(l=>[l.name,l.value]));let o=0;for(let l=0;l<r.length;l++){const u=r[l];u.attrs.every(d=>s.get(d.name)===d.value)&&(o+=1,o>=W1&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(S_)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Mi.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Mi.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(S_);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Mi.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Mi.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Mi.Element&&n.element===t)}}const ra={createDocument(){return{nodeName:"#document",mode:Yr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(o=>o.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const o={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};ra.appendChild(e,o)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(ra.isTextNode(n)){n.value+=t;return}}ra.appendChild(e,ra.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ra.isTextNode(r)?r.value+=t:ra.insertBefore(e,ra.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},j4="html",gW="about:legacy-compat",bW="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",B4=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],yW=[...B4,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],xW=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),U4=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],vW=[...U4,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function C_(e,t){return t.some(n=>e.startsWith(n))}function EW(e){return e.name===j4&&e.publicId===null&&(e.systemId===null||e.systemId===gW)}function TW(e){if(e.name!==j4)return Yr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===bW)return Yr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),xW.has(n))return Yr.QUIRKS;let r=t===null?yW:B4;if(C_(n,r))return Yr.QUIRKS;if(r=t===null?U4:vW,C_(n,r))return Yr.LIMITED_QUIRKS}return Yr.NO_QUIRKS}const w_={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},SW="definitionurl",CW="definitionURL",wW=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),AW=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ge.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ge.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ge.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ge.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ge.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ge.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ge.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ge.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ge.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ge.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ge.XMLNS}]]),_W=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),kW=new Set([C.B,C.BIG,C.BLOCKQUOTE,C.BODY,C.BR,C.CENTER,C.CODE,C.DD,C.DIV,C.DL,C.DT,C.EM,C.EMBED,C.H1,C.H2,C.H3,C.H4,C.H5,C.H6,C.HEAD,C.HR,C.I,C.IMG,C.LI,C.LISTING,C.MENU,C.META,C.NOBR,C.OL,C.P,C.PRE,C.RUBY,C.S,C.SMALL,C.SPAN,C.STRONG,C.STRIKE,C.SUB,C.SUP,C.TABLE,C.TT,C.U,C.UL,C.VAR]);function NW(e){const t=e.tagID;return t===C.FONT&&e.attrs.some(({name:r})=>r===po.COLOR||r===po.SIZE||r===po.FACE)||kW.has(t)}function F4(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===SW){e.attrs[t].name=CW;break}}function H4(e){for(let t=0;t<e.attrs.length;t++){const n=wW.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Rv(e){for(let t=0;t<e.attrs.length;t++){const n=AW.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function RW(e){const t=_W.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Su(e.tagName))}function OW(e,t){return t===ge.MATHML&&(e===C.MI||e===C.MO||e===C.MN||e===C.MS||e===C.MTEXT)}function DW(e,t,n){if(t===ge.MATHML&&e===C.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===po.ENCODING){const s=n[r].value.toLowerCase();return s===w_.TEXT_HTML||s===w_.APPLICATION_XML}}return t===ge.SVG&&(e===C.FOREIGN_OBJECT||e===C.DESC||e===C.TITLE)}function MW(e,t,n,r){return(!r||r===ge.HTML)&&DW(e,t,n)||(!r||r===ge.MATHML)&&OW(e,t)}const IW="hidden",LW=8,PW=3;var G;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(G||(G={}));const jW={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},z4=new Set([C.TABLE,C.TBODY,C.TFOOT,C.THEAD,C.TR]),A_={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ra,onParseError:null};class __{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=G.INITIAL,this.originalInsertionMode=G.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...A_,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new oW(this.options,this),this.activeFormattingElements=new pW(this.treeAdapter),this.fragmentContextID=r?Su(this.treeAdapter.getTagName(r)):C.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new mW(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...A_,...n};t??(t=r.treeAdapter.createElement(re.TEMPLATE,ge.HTML,[]));const s=r.treeAdapter.createElement("documentmock",ge.HTML,[]),o=new this(r,s,t);return o.fragmentContextID===C.TEMPLATE&&o.tmplInsertionModeStack.unshift(G.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const o=(s=t.location)!==null&&s!==void 0?s:jW,l={code:n,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:r?o.startLine:o.endLine,endCol:r?o.startCol:o.endCol,endOffset:r?o.startOffset:o.endOffset};this.onParseError(l)}onItemPush(t,n,r){var s,o;(o=(s=this.treeAdapter).onItemPush)===null||o===void 0||o.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let o,l;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,l=this.fragmentContextID):{current:o,currentTagId:l}=this.openElements,this._setContextModes(o,l)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===ge.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ge.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=G.TEXT}switchToPlaintextParsing(){this.insertionMode=G.TEXT,this.originalInsertionMode=G.IN_BODY,this.tokenizer.state=on.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===re.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ge.HTML))switch(this.fragmentContextID){case C.TITLE:case C.TEXTAREA:{this.tokenizer.state=on.RCDATA;break}case C.STYLE:case C.XMP:case C.IFRAME:case C.NOEMBED:case C.NOFRAMES:case C.NOSCRIPT:{this.tokenizer.state=on.RAWTEXT;break}case C.SCRIPT:{this.tokenizer.state=on.SCRIPT_DATA;break}case C.PLAINTEXT:{this.tokenizer.state=on.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const l=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));l&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,ge.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ge.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(re.HTML,ge.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,C.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),o=r?s.lastIndexOf(r):s.length,l=s[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(l)){const{endLine:d,endCol:f,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:d,endCol:f,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),o=n.type===at.END_TAG&&s===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,o)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===C.SVG&&this.treeAdapter.getTagName(n)===re.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ge.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===C.MGLYPH||t.tagID===C.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ge.HTML)}_processToken(t){switch(t.type){case at.CHARACTER:{this.onCharacter(t);break}case at.NULL_CHARACTER:{this.onNullCharacter(t);break}case at.COMMENT:{this.onComment(t);break}case at.DOCTYPE:{this.onDoctype(t);break}case at.START_TAG:{this._processStartTag(t);break}case at.END_TAG:{this.onEndTag(t);break}case at.EOF:{this.onEof(t);break}case at.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),o=this.treeAdapter.getAttrList(n);return MW(t,s,o,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Mi.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const o=this.activeFormattingElements.entries[s];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=G.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(C.P),this.openElements.popUntilTagNamePopped(C.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case C.TR:{this.insertionMode=G.IN_ROW;return}case C.TBODY:case C.THEAD:case C.TFOOT:{this.insertionMode=G.IN_TABLE_BODY;return}case C.CAPTION:{this.insertionMode=G.IN_CAPTION;return}case C.COLGROUP:{this.insertionMode=G.IN_COLUMN_GROUP;return}case C.TABLE:{this.insertionMode=G.IN_TABLE;return}case C.BODY:{this.insertionMode=G.IN_BODY;return}case C.FRAMESET:{this.insertionMode=G.IN_FRAMESET;return}case C.SELECT:{this._resetInsertionModeForSelect(t);return}case C.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case C.HTML:{this.insertionMode=this.headElement?G.AFTER_HEAD:G.BEFORE_HEAD;return}case C.TD:case C.TH:{if(t>0){this.insertionMode=G.IN_CELL;return}break}case C.HEAD:{if(t>0){this.insertionMode=G.IN_HEAD;return}break}}this.insertionMode=G.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===C.TEMPLATE)break;if(r===C.TABLE){this.insertionMode=G.IN_SELECT_IN_TABLE;return}}this.insertionMode=G.IN_SELECT}_isElementCausesFosterParenting(t){return z4.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case C.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ge.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case C.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return rW[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){hJ(this,t);return}switch(this.insertionMode){case G.INITIAL:{Cc(this,t);break}case G.BEFORE_HTML:{Yc(this,t);break}case G.BEFORE_HEAD:{Gc(this,t);break}case G.IN_HEAD:{Xc(this,t);break}case G.IN_HEAD_NO_SCRIPT:{Kc(this,t);break}case G.AFTER_HEAD:{Qc(this,t);break}case G.IN_BODY:case G.IN_CAPTION:case G.IN_CELL:case G.IN_TEMPLATE:{q4(this,t);break}case G.TEXT:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case G.IN_TABLE:case G.IN_TABLE_BODY:case G.IN_ROW:{Z1(this,t);break}case G.IN_TABLE_TEXT:{Q4(this,t);break}case G.IN_COLUMN_GROUP:{Am(this,t);break}case G.AFTER_BODY:{_m(this,t);break}case G.AFTER_AFTER_BODY:{Jh(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){dJ(this,t);return}switch(this.insertionMode){case G.INITIAL:{Cc(this,t);break}case G.BEFORE_HTML:{Yc(this,t);break}case G.BEFORE_HEAD:{Gc(this,t);break}case G.IN_HEAD:{Xc(this,t);break}case G.IN_HEAD_NO_SCRIPT:{Kc(this,t);break}case G.AFTER_HEAD:{Qc(this,t);break}case G.TEXT:{this._insertCharacters(t);break}case G.IN_TABLE:case G.IN_TABLE_BODY:case G.IN_ROW:{Z1(this,t);break}case G.IN_COLUMN_GROUP:{Am(this,t);break}case G.AFTER_BODY:{_m(this,t);break}case G.AFTER_AFTER_BODY:{Jh(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ry(this,t);return}switch(this.insertionMode){case G.INITIAL:case G.BEFORE_HTML:case G.BEFORE_HEAD:case G.IN_HEAD:case G.IN_HEAD_NO_SCRIPT:case G.AFTER_HEAD:case G.IN_BODY:case G.IN_TABLE:case G.IN_CAPTION:case G.IN_COLUMN_GROUP:case G.IN_TABLE_BODY:case G.IN_ROW:case G.IN_CELL:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:case G.IN_TEMPLATE:case G.IN_FRAMESET:case G.AFTER_FRAMESET:{Ry(this,t);break}case G.IN_TABLE_TEXT:{wc(this,t);break}case G.AFTER_BODY:{qW(this,t);break}case G.AFTER_AFTER_BODY:case G.AFTER_AFTER_FRAMESET:{$W(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case G.INITIAL:{YW(this,t);break}case G.BEFORE_HEAD:case G.IN_HEAD:case G.IN_HEAD_NO_SCRIPT:case G.AFTER_HEAD:{this._err(t,ue.misplacedDoctype);break}case G.IN_TABLE_TEXT:{wc(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ue.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?mJ(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case G.INITIAL:{Cc(this,t);break}case G.BEFORE_HTML:{GW(this,t);break}case G.BEFORE_HEAD:{KW(this,t);break}case G.IN_HEAD:{Ei(this,t);break}case G.IN_HEAD_NO_SCRIPT:{ZW(this,t);break}case G.AFTER_HEAD:{eZ(this,t);break}case G.IN_BODY:{Xn(this,t);break}case G.IN_TABLE:{ou(this,t);break}case G.IN_TABLE_TEXT:{wc(this,t);break}case G.IN_CAPTION:{QZ(this,t);break}case G.IN_COLUMN_GROUP:{Mv(this,t);break}case G.IN_TABLE_BODY:{pp(this,t);break}case G.IN_ROW:{gp(this,t);break}case G.IN_CELL:{JZ(this,t);break}case G.IN_SELECT:{J4(this,t);break}case G.IN_SELECT_IN_TABLE:{tJ(this,t);break}case G.IN_TEMPLATE:{rJ(this,t);break}case G.AFTER_BODY:{sJ(this,t);break}case G.IN_FRAMESET:{aJ(this,t);break}case G.AFTER_FRAMESET:{lJ(this,t);break}case G.AFTER_AFTER_BODY:{cJ(this,t);break}case G.AFTER_AFTER_FRAMESET:{fJ(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?pJ(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case G.INITIAL:{Cc(this,t);break}case G.BEFORE_HTML:{XW(this,t);break}case G.BEFORE_HEAD:{QW(this,t);break}case G.IN_HEAD:{WW(this,t);break}case G.IN_HEAD_NO_SCRIPT:{JW(this,t);break}case G.AFTER_HEAD:{tZ(this,t);break}case G.IN_BODY:{mp(this,t);break}case G.TEXT:{FZ(this,t);break}case G.IN_TABLE:{bf(this,t);break}case G.IN_TABLE_TEXT:{wc(this,t);break}case G.IN_CAPTION:{WZ(this,t);break}case G.IN_COLUMN_GROUP:{ZZ(this,t);break}case G.IN_TABLE_BODY:{Oy(this,t);break}case G.IN_ROW:{Z4(this,t);break}case G.IN_CELL:{eJ(this,t);break}case G.IN_SELECT:{eM(this,t);break}case G.IN_SELECT_IN_TABLE:{nJ(this,t);break}case G.IN_TEMPLATE:{iJ(this,t);break}case G.AFTER_BODY:{nM(this,t);break}case G.IN_FRAMESET:{oJ(this,t);break}case G.AFTER_FRAMESET:{uJ(this,t);break}case G.AFTER_AFTER_BODY:{Jh(this,t);break}}}onEof(t){switch(this.insertionMode){case G.INITIAL:{Cc(this,t);break}case G.BEFORE_HTML:{Yc(this,t);break}case G.BEFORE_HEAD:{Gc(this,t);break}case G.IN_HEAD:{Xc(this,t);break}case G.IN_HEAD_NO_SCRIPT:{Kc(this,t);break}case G.AFTER_HEAD:{Qc(this,t);break}case G.IN_BODY:case G.IN_TABLE:case G.IN_CAPTION:case G.IN_COLUMN_GROUP:case G.IN_TABLE_BODY:case G.IN_ROW:case G.IN_CELL:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:{X4(this,t);break}case G.TEXT:{HZ(this,t);break}case G.IN_TABLE_TEXT:{wc(this,t);break}case G.IN_TEMPLATE:{tM(this,t);break}case G.AFTER_BODY:case G.IN_FRAMESET:case G.AFTER_FRAMESET:case G.AFTER_AFTER_BODY:case G.AFTER_AFTER_FRAMESET:{Dv(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===F.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case G.IN_HEAD:case G.IN_HEAD_NO_SCRIPT:case G.AFTER_HEAD:case G.TEXT:case G.IN_COLUMN_GROUP:case G.IN_SELECT:case G.IN_SELECT_IN_TABLE:case G.IN_FRAMESET:case G.AFTER_FRAMESET:{this._insertCharacters(t);break}case G.IN_BODY:case G.IN_CAPTION:case G.IN_CELL:case G.IN_TEMPLATE:case G.AFTER_BODY:case G.AFTER_AFTER_BODY:case G.AFTER_AFTER_FRAMESET:{V4(this,t);break}case G.IN_TABLE:case G.IN_TABLE_BODY:case G.IN_ROW:{Z1(this,t);break}case G.IN_TABLE_TEXT:{K4(this,t);break}}}}function BW(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):G4(e,t),n}function UW(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function FW(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let o=0,l=s;l!==n;o++,l=s){s=e.openElements.getCommonAncestor(l);const u=e.activeFormattingElements.getElementEntry(l),d=u&&o>=PW;!u||d?(d&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(l)):(l=HW(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(l,r),r=l)}return r}function HW(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function zW(e,t,n){const r=e.treeAdapter.getTagName(t),s=Su(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const o=e.treeAdapter.getNamespaceURI(t);s===C.TEMPLATE&&o===ge.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function VW(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,o=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,s.tagID)}function Ov(e,t){for(let n=0;n<LW;n++){const r=BW(e,t);if(!r)break;const s=UW(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const o=FW(e,s,r.element),l=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(o),l&&zW(e,l,o),VW(e,s,r)}}function Ry(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function qW(e,t){e._appendCommentNode(t,e.openElements.items[0])}function $W(e,t){e._appendCommentNode(t,e.document)}function Dv(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const o=e.openElements.items[1],l=e.treeAdapter.getNodeSourceCodeLocation(o);l&&!l.endTag&&e._setEndLocation(o,t)}}}}function YW(e,t){e._setDocumentType(t);const n=t.forceQuirks?Yr.QUIRKS:TW(t);EW(t)||e._err(t,ue.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=G.BEFORE_HTML}function Cc(e,t){e._err(t,ue.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Yr.QUIRKS),e.insertionMode=G.BEFORE_HTML,e._processToken(t)}function GW(e,t){t.tagID===C.HTML?(e._insertElement(t,ge.HTML),e.insertionMode=G.BEFORE_HEAD):Yc(e,t)}function XW(e,t){const n=t.tagID;(n===C.HTML||n===C.HEAD||n===C.BODY||n===C.BR)&&Yc(e,t)}function Yc(e,t){e._insertFakeRootElement(),e.insertionMode=G.BEFORE_HEAD,e._processToken(t)}function KW(e,t){switch(t.tagID){case C.HTML:{Xn(e,t);break}case C.HEAD:{e._insertElement(t,ge.HTML),e.headElement=e.openElements.current,e.insertionMode=G.IN_HEAD;break}default:Gc(e,t)}}function QW(e,t){const n=t.tagID;n===C.HEAD||n===C.BODY||n===C.HTML||n===C.BR?Gc(e,t):e._err(t,ue.endTagWithoutMatchingOpenElement)}function Gc(e,t){e._insertFakeElement(re.HEAD,C.HEAD),e.headElement=e.openElements.current,e.insertionMode=G.IN_HEAD,e._processToken(t)}function Ei(e,t){switch(t.tagID){case C.HTML:{Xn(e,t);break}case C.BASE:case C.BASEFONT:case C.BGSOUND:case C.LINK:case C.META:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case C.TITLE:{e._switchToTextParsing(t,on.RCDATA);break}case C.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,on.RAWTEXT):(e._insertElement(t,ge.HTML),e.insertionMode=G.IN_HEAD_NO_SCRIPT);break}case C.NOFRAMES:case C.STYLE:{e._switchToTextParsing(t,on.RAWTEXT);break}case C.SCRIPT:{e._switchToTextParsing(t,on.SCRIPT_DATA);break}case C.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=G.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(G.IN_TEMPLATE);break}case C.HEAD:{e._err(t,ue.misplacedStartTagForHeadElement);break}default:Xc(e,t)}}function WW(e,t){switch(t.tagID){case C.HEAD:{e.openElements.pop(),e.insertionMode=G.AFTER_HEAD;break}case C.BODY:case C.BR:case C.HTML:{Xc(e,t);break}case C.TEMPLATE:{Mo(e,t);break}default:e._err(t,ue.endTagWithoutMatchingOpenElement)}}function Mo(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==C.TEMPLATE&&e._err(t,ue.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(C.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ue.endTagWithoutMatchingOpenElement)}function Xc(e,t){e.openElements.pop(),e.insertionMode=G.AFTER_HEAD,e._processToken(t)}function ZW(e,t){switch(t.tagID){case C.HTML:{Xn(e,t);break}case C.BASEFONT:case C.BGSOUND:case C.HEAD:case C.LINK:case C.META:case C.NOFRAMES:case C.STYLE:{Ei(e,t);break}case C.NOSCRIPT:{e._err(t,ue.nestedNoscriptInHead);break}default:Kc(e,t)}}function JW(e,t){switch(t.tagID){case C.NOSCRIPT:{e.openElements.pop(),e.insertionMode=G.IN_HEAD;break}case C.BR:{Kc(e,t);break}default:e._err(t,ue.endTagWithoutMatchingOpenElement)}}function Kc(e,t){const n=t.type===at.EOF?ue.openElementsLeftAfterEof:ue.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=G.IN_HEAD,e._processToken(t)}function eZ(e,t){switch(t.tagID){case C.HTML:{Xn(e,t);break}case C.BODY:{e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=G.IN_BODY;break}case C.FRAMESET:{e._insertElement(t,ge.HTML),e.insertionMode=G.IN_FRAMESET;break}case C.BASE:case C.BASEFONT:case C.BGSOUND:case C.LINK:case C.META:case C.NOFRAMES:case C.SCRIPT:case C.STYLE:case C.TEMPLATE:case C.TITLE:{e._err(t,ue.abandonedHeadElementChild),e.openElements.push(e.headElement,C.HEAD),Ei(e,t),e.openElements.remove(e.headElement);break}case C.HEAD:{e._err(t,ue.misplacedStartTagForHeadElement);break}default:Qc(e,t)}}function tZ(e,t){switch(t.tagID){case C.BODY:case C.HTML:case C.BR:{Qc(e,t);break}case C.TEMPLATE:{Mo(e,t);break}default:e._err(t,ue.endTagWithoutMatchingOpenElement)}}function Qc(e,t){e._insertFakeElement(re.BODY,C.BODY),e.insertionMode=G.IN_BODY,hp(e,t)}function hp(e,t){switch(t.type){case at.CHARACTER:{q4(e,t);break}case at.WHITESPACE_CHARACTER:{V4(e,t);break}case at.COMMENT:{Ry(e,t);break}case at.START_TAG:{Xn(e,t);break}case at.END_TAG:{mp(e,t);break}case at.EOF:{X4(e,t);break}}}function V4(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function q4(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function nZ(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function rZ(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function iZ(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ge.HTML),e.insertionMode=G.IN_FRAMESET)}function sZ(e,t){e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._insertElement(t,ge.HTML)}function aZ(e,t){e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ny.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ge.HTML)}function oZ(e,t){e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function lZ(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._insertElement(t,ge.HTML),n||(e.formElement=e.openElements.current))}function uZ(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===C.LI&&s===C.LI||(n===C.DD||n===C.DT)&&(s===C.DD||s===C.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==C.ADDRESS&&s!==C.DIV&&s!==C.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._insertElement(t,ge.HTML)}function cZ(e,t){e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.tokenizer.state=on.PLAINTEXT}function fZ(e,t){e.openElements.hasInScope(C.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(C.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.framesetOk=!1}function dZ(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(re.A);n&&(Ov(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function hZ(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mZ(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(C.NOBR)&&(Ov(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ge.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function pZ(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function gZ(e,t){e.treeAdapter.getDocumentMode(e.document)!==Yr.QUIRKS&&e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=G.IN_TABLE}function $4(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ge.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Y4(e){const t=I4(e,po.TYPE);return t!=null&&t.toLowerCase()===IW}function bZ(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ge.HTML),Y4(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function yZ(e,t){e._appendElement(t,ge.HTML),t.ackSelfClosing=!0}function xZ(e,t){e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._appendElement(t,ge.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function vZ(e,t){t.tagName=re.IMG,t.tagID=C.IMG,$4(e,t)}function EZ(e,t){e._insertElement(t,ge.HTML),e.skipNextNewLine=!0,e.tokenizer.state=on.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=G.TEXT}function TZ(e,t){e.openElements.hasInButtonScope(C.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,on.RAWTEXT)}function SZ(e,t){e.framesetOk=!1,e._switchToTextParsing(t,on.RAWTEXT)}function k_(e,t){e._switchToTextParsing(t,on.RAWTEXT)}function CZ(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===G.IN_TABLE||e.insertionMode===G.IN_CAPTION||e.insertionMode===G.IN_TABLE_BODY||e.insertionMode===G.IN_ROW||e.insertionMode===G.IN_CELL?G.IN_SELECT_IN_TABLE:G.IN_SELECT}function wZ(e,t){e.openElements.currentTagId===C.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML)}function AZ(e,t){e.openElements.hasInScope(C.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ge.HTML)}function _Z(e,t){e.openElements.hasInScope(C.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(C.RTC),e._insertElement(t,ge.HTML)}function kZ(e,t){e._reconstructActiveFormattingElements(),F4(t),Rv(t),t.selfClosing?e._appendElement(t,ge.MATHML):e._insertElement(t,ge.MATHML),t.ackSelfClosing=!0}function NZ(e,t){e._reconstructActiveFormattingElements(),H4(t),Rv(t),t.selfClosing?e._appendElement(t,ge.SVG):e._insertElement(t,ge.SVG),t.ackSelfClosing=!0}function N_(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ge.HTML)}function Xn(e,t){switch(t.tagID){case C.I:case C.S:case C.B:case C.U:case C.EM:case C.TT:case C.BIG:case C.CODE:case C.FONT:case C.SMALL:case C.STRIKE:case C.STRONG:{hZ(e,t);break}case C.A:{dZ(e,t);break}case C.H1:case C.H2:case C.H3:case C.H4:case C.H5:case C.H6:{aZ(e,t);break}case C.P:case C.DL:case C.OL:case C.UL:case C.DIV:case C.DIR:case C.NAV:case C.MAIN:case C.MENU:case C.ASIDE:case C.CENTER:case C.FIGURE:case C.FOOTER:case C.HEADER:case C.HGROUP:case C.DIALOG:case C.DETAILS:case C.ADDRESS:case C.ARTICLE:case C.SEARCH:case C.SECTION:case C.SUMMARY:case C.FIELDSET:case C.BLOCKQUOTE:case C.FIGCAPTION:{sZ(e,t);break}case C.LI:case C.DD:case C.DT:{uZ(e,t);break}case C.BR:case C.IMG:case C.WBR:case C.AREA:case C.EMBED:case C.KEYGEN:{$4(e,t);break}case C.HR:{xZ(e,t);break}case C.RB:case C.RTC:{AZ(e,t);break}case C.RT:case C.RP:{_Z(e,t);break}case C.PRE:case C.LISTING:{oZ(e,t);break}case C.XMP:{TZ(e,t);break}case C.SVG:{NZ(e,t);break}case C.HTML:{nZ(e,t);break}case C.BASE:case C.LINK:case C.META:case C.STYLE:case C.TITLE:case C.SCRIPT:case C.BGSOUND:case C.BASEFONT:case C.TEMPLATE:{Ei(e,t);break}case C.BODY:{rZ(e,t);break}case C.FORM:{lZ(e,t);break}case C.NOBR:{mZ(e,t);break}case C.MATH:{kZ(e,t);break}case C.TABLE:{gZ(e,t);break}case C.INPUT:{bZ(e,t);break}case C.PARAM:case C.TRACK:case C.SOURCE:{yZ(e,t);break}case C.IMAGE:{vZ(e,t);break}case C.BUTTON:{fZ(e,t);break}case C.APPLET:case C.OBJECT:case C.MARQUEE:{pZ(e,t);break}case C.IFRAME:{SZ(e,t);break}case C.SELECT:{CZ(e,t);break}case C.OPTION:case C.OPTGROUP:{wZ(e,t);break}case C.NOEMBED:case C.NOFRAMES:{k_(e,t);break}case C.FRAMESET:{iZ(e,t);break}case C.TEXTAREA:{EZ(e,t);break}case C.NOSCRIPT:{e.options.scriptingEnabled?k_(e,t):N_(e,t);break}case C.PLAINTEXT:{cZ(e,t);break}case C.COL:case C.TH:case C.TD:case C.TR:case C.HEAD:case C.FRAME:case C.TBODY:case C.TFOOT:case C.THEAD:case C.CAPTION:case C.COLGROUP:break;default:N_(e,t)}}function RZ(e,t){if(e.openElements.hasInScope(C.BODY)&&(e.insertionMode=G.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function OZ(e,t){e.openElements.hasInScope(C.BODY)&&(e.insertionMode=G.AFTER_BODY,nM(e,t))}function DZ(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function MZ(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(C.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(C.FORM):n&&e.openElements.remove(n))}function IZ(e){e.openElements.hasInButtonScope(C.P)||e._insertFakeElement(re.P,C.P),e._closePElement()}function LZ(e){e.openElements.hasInListItemScope(C.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(C.LI),e.openElements.popUntilTagNamePopped(C.LI))}function PZ(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function jZ(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function BZ(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function UZ(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(re.BR,C.BR),e.openElements.pop(),e.framesetOk=!1}function G4(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const o=e.openElements.items[s],l=e.openElements.tagIDs[s];if(r===l&&(r!==C.UNKNOWN||e.treeAdapter.getTagName(o)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(o,l))break}}function mp(e,t){switch(t.tagID){case C.A:case C.B:case C.I:case C.S:case C.U:case C.EM:case C.TT:case C.BIG:case C.CODE:case C.FONT:case C.NOBR:case C.SMALL:case C.STRIKE:case C.STRONG:{Ov(e,t);break}case C.P:{IZ(e);break}case C.DL:case C.UL:case C.OL:case C.DIR:case C.DIV:case C.NAV:case C.PRE:case C.MAIN:case C.MENU:case C.ASIDE:case C.BUTTON:case C.CENTER:case C.FIGURE:case C.FOOTER:case C.HEADER:case C.HGROUP:case C.DIALOG:case C.ADDRESS:case C.ARTICLE:case C.DETAILS:case C.SEARCH:case C.SECTION:case C.SUMMARY:case C.LISTING:case C.FIELDSET:case C.BLOCKQUOTE:case C.FIGCAPTION:{DZ(e,t);break}case C.LI:{LZ(e);break}case C.DD:case C.DT:{PZ(e,t);break}case C.H1:case C.H2:case C.H3:case C.H4:case C.H5:case C.H6:{jZ(e);break}case C.BR:{UZ(e);break}case C.BODY:{RZ(e,t);break}case C.HTML:{OZ(e,t);break}case C.FORM:{MZ(e);break}case C.APPLET:case C.OBJECT:case C.MARQUEE:{BZ(e,t);break}case C.TEMPLATE:{Mo(e,t);break}default:G4(e,t)}}function X4(e,t){e.tmplInsertionModeStack.length>0?tM(e,t):Dv(e,t)}function FZ(e,t){var n;t.tagID===C.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function HZ(e,t){e._err(t,ue.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Z1(e,t){if(e.openElements.currentTagId!==void 0&&z4.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=G.IN_TABLE_TEXT,t.type){case at.CHARACTER:{Q4(e,t);break}case at.WHITESPACE_CHARACTER:{K4(e,t);break}}else qf(e,t)}function zZ(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ge.HTML),e.insertionMode=G.IN_CAPTION}function VZ(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ge.HTML),e.insertionMode=G.IN_COLUMN_GROUP}function qZ(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(re.COLGROUP,C.COLGROUP),e.insertionMode=G.IN_COLUMN_GROUP,Mv(e,t)}function $Z(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ge.HTML),e.insertionMode=G.IN_TABLE_BODY}function YZ(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(re.TBODY,C.TBODY),e.insertionMode=G.IN_TABLE_BODY,pp(e,t)}function GZ(e,t){e.openElements.hasInTableScope(C.TABLE)&&(e.openElements.popUntilTagNamePopped(C.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function XZ(e,t){Y4(t)?e._appendElement(t,ge.HTML):qf(e,t),t.ackSelfClosing=!0}function KZ(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ge.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ou(e,t){switch(t.tagID){case C.TD:case C.TH:case C.TR:{YZ(e,t);break}case C.STYLE:case C.SCRIPT:case C.TEMPLATE:{Ei(e,t);break}case C.COL:{qZ(e,t);break}case C.FORM:{KZ(e,t);break}case C.TABLE:{GZ(e,t);break}case C.TBODY:case C.TFOOT:case C.THEAD:{$Z(e,t);break}case C.INPUT:{XZ(e,t);break}case C.CAPTION:{zZ(e,t);break}case C.COLGROUP:{VZ(e,t);break}default:qf(e,t)}}function bf(e,t){switch(t.tagID){case C.TABLE:{e.openElements.hasInTableScope(C.TABLE)&&(e.openElements.popUntilTagNamePopped(C.TABLE),e._resetInsertionMode());break}case C.TEMPLATE:{Mo(e,t);break}case C.BODY:case C.CAPTION:case C.COL:case C.COLGROUP:case C.HTML:case C.TBODY:case C.TD:case C.TFOOT:case C.TH:case C.THEAD:case C.TR:break;default:qf(e,t)}}function qf(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,hp(e,t),e.fosterParentingEnabled=n}function K4(e,t){e.pendingCharacterTokens.push(t)}function Q4(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function wc(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)qf(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const W4=new Set([C.CAPTION,C.COL,C.COLGROUP,C.TBODY,C.TD,C.TFOOT,C.TH,C.THEAD,C.TR]);function QZ(e,t){const n=t.tagID;W4.has(n)?e.openElements.hasInTableScope(C.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(C.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=G.IN_TABLE,ou(e,t)):Xn(e,t)}function WZ(e,t){const n=t.tagID;switch(n){case C.CAPTION:case C.TABLE:{e.openElements.hasInTableScope(C.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(C.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=G.IN_TABLE,n===C.TABLE&&bf(e,t));break}case C.BODY:case C.COL:case C.COLGROUP:case C.HTML:case C.TBODY:case C.TD:case C.TFOOT:case C.TH:case C.THEAD:case C.TR:break;default:mp(e,t)}}function Mv(e,t){switch(t.tagID){case C.HTML:{Xn(e,t);break}case C.COL:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case C.TEMPLATE:{Ei(e,t);break}default:Am(e,t)}}function ZZ(e,t){switch(t.tagID){case C.COLGROUP:{e.openElements.currentTagId===C.COLGROUP&&(e.openElements.pop(),e.insertionMode=G.IN_TABLE);break}case C.TEMPLATE:{Mo(e,t);break}case C.COL:break;default:Am(e,t)}}function Am(e,t){e.openElements.currentTagId===C.COLGROUP&&(e.openElements.pop(),e.insertionMode=G.IN_TABLE,e._processToken(t))}function pp(e,t){switch(t.tagID){case C.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ge.HTML),e.insertionMode=G.IN_ROW;break}case C.TH:case C.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(re.TR,C.TR),e.insertionMode=G.IN_ROW,gp(e,t);break}case C.CAPTION:case C.COL:case C.COLGROUP:case C.TBODY:case C.TFOOT:case C.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE,ou(e,t));break}default:ou(e,t)}}function Oy(e,t){const n=t.tagID;switch(t.tagID){case C.TBODY:case C.TFOOT:case C.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE);break}case C.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE,bf(e,t));break}case C.BODY:case C.CAPTION:case C.COL:case C.COLGROUP:case C.HTML:case C.TD:case C.TH:case C.TR:break;default:bf(e,t)}}function gp(e,t){switch(t.tagID){case C.TH:case C.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ge.HTML),e.insertionMode=G.IN_CELL,e.activeFormattingElements.insertMarker();break}case C.CAPTION:case C.COL:case C.COLGROUP:case C.TBODY:case C.TFOOT:case C.THEAD:case C.TR:{e.openElements.hasInTableScope(C.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE_BODY,pp(e,t));break}default:ou(e,t)}}function Z4(e,t){switch(t.tagID){case C.TR:{e.openElements.hasInTableScope(C.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE_BODY);break}case C.TABLE:{e.openElements.hasInTableScope(C.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE_BODY,Oy(e,t));break}case C.TBODY:case C.TFOOT:case C.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(C.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=G.IN_TABLE_BODY,Oy(e,t));break}case C.BODY:case C.CAPTION:case C.COL:case C.COLGROUP:case C.HTML:case C.TD:case C.TH:break;default:bf(e,t)}}function JZ(e,t){const n=t.tagID;W4.has(n)?(e.openElements.hasInTableScope(C.TD)||e.openElements.hasInTableScope(C.TH))&&(e._closeTableCell(),gp(e,t)):Xn(e,t)}function eJ(e,t){const n=t.tagID;switch(n){case C.TD:case C.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=G.IN_ROW);break}case C.TABLE:case C.TBODY:case C.TFOOT:case C.THEAD:case C.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Z4(e,t));break}case C.BODY:case C.CAPTION:case C.COL:case C.COLGROUP:case C.HTML:break;default:mp(e,t)}}function J4(e,t){switch(t.tagID){case C.HTML:{Xn(e,t);break}case C.OPTION:{e.openElements.currentTagId===C.OPTION&&e.openElements.pop(),e._insertElement(t,ge.HTML);break}case C.OPTGROUP:{e.openElements.currentTagId===C.OPTION&&e.openElements.pop(),e.openElements.currentTagId===C.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ge.HTML);break}case C.HR:{e.openElements.currentTagId===C.OPTION&&e.openElements.pop(),e.openElements.currentTagId===C.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case C.INPUT:case C.KEYGEN:case C.TEXTAREA:case C.SELECT:{e.openElements.hasInSelectScope(C.SELECT)&&(e.openElements.popUntilTagNamePopped(C.SELECT),e._resetInsertionMode(),t.tagID!==C.SELECT&&e._processStartTag(t));break}case C.SCRIPT:case C.TEMPLATE:{Ei(e,t);break}}}function eM(e,t){switch(t.tagID){case C.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===C.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===C.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===C.OPTGROUP&&e.openElements.pop();break}case C.OPTION:{e.openElements.currentTagId===C.OPTION&&e.openElements.pop();break}case C.SELECT:{e.openElements.hasInSelectScope(C.SELECT)&&(e.openElements.popUntilTagNamePopped(C.SELECT),e._resetInsertionMode());break}case C.TEMPLATE:{Mo(e,t);break}}}function tJ(e,t){const n=t.tagID;n===C.CAPTION||n===C.TABLE||n===C.TBODY||n===C.TFOOT||n===C.THEAD||n===C.TR||n===C.TD||n===C.TH?(e.openElements.popUntilTagNamePopped(C.SELECT),e._resetInsertionMode(),e._processStartTag(t)):J4(e,t)}function nJ(e,t){const n=t.tagID;n===C.CAPTION||n===C.TABLE||n===C.TBODY||n===C.TFOOT||n===C.THEAD||n===C.TR||n===C.TD||n===C.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(C.SELECT),e._resetInsertionMode(),e.onEndTag(t)):eM(e,t)}function rJ(e,t){switch(t.tagID){case C.BASE:case C.BASEFONT:case C.BGSOUND:case C.LINK:case C.META:case C.NOFRAMES:case C.SCRIPT:case C.STYLE:case C.TEMPLATE:case C.TITLE:{Ei(e,t);break}case C.CAPTION:case C.COLGROUP:case C.TBODY:case C.TFOOT:case C.THEAD:{e.tmplInsertionModeStack[0]=G.IN_TABLE,e.insertionMode=G.IN_TABLE,ou(e,t);break}case C.COL:{e.tmplInsertionModeStack[0]=G.IN_COLUMN_GROUP,e.insertionMode=G.IN_COLUMN_GROUP,Mv(e,t);break}case C.TR:{e.tmplInsertionModeStack[0]=G.IN_TABLE_BODY,e.insertionMode=G.IN_TABLE_BODY,pp(e,t);break}case C.TD:case C.TH:{e.tmplInsertionModeStack[0]=G.IN_ROW,e.insertionMode=G.IN_ROW,gp(e,t);break}default:e.tmplInsertionModeStack[0]=G.IN_BODY,e.insertionMode=G.IN_BODY,Xn(e,t)}}function iJ(e,t){t.tagID===C.TEMPLATE&&Mo(e,t)}function tM(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(C.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Dv(e,t)}function sJ(e,t){t.tagID===C.HTML?Xn(e,t):_m(e,t)}function nM(e,t){var n;if(t.tagID===C.HTML){if(e.fragmentContext||(e.insertionMode=G.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===C.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else _m(e,t)}function _m(e,t){e.insertionMode=G.IN_BODY,hp(e,t)}function aJ(e,t){switch(t.tagID){case C.HTML:{Xn(e,t);break}case C.FRAMESET:{e._insertElement(t,ge.HTML);break}case C.FRAME:{e._appendElement(t,ge.HTML),t.ackSelfClosing=!0;break}case C.NOFRAMES:{Ei(e,t);break}}}function oJ(e,t){t.tagID===C.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==C.FRAMESET&&(e.insertionMode=G.AFTER_FRAMESET))}function lJ(e,t){switch(t.tagID){case C.HTML:{Xn(e,t);break}case C.NOFRAMES:{Ei(e,t);break}}}function uJ(e,t){t.tagID===C.HTML&&(e.insertionMode=G.AFTER_AFTER_FRAMESET)}function cJ(e,t){t.tagID===C.HTML?Xn(e,t):Jh(e,t)}function Jh(e,t){e.insertionMode=G.IN_BODY,hp(e,t)}function fJ(e,t){switch(t.tagID){case C.HTML:{Xn(e,t);break}case C.NOFRAMES:{Ei(e,t);break}}}function dJ(e,t){t.chars=Yt,e._insertCharacters(t)}function hJ(e,t){e._insertCharacters(t),e.framesetOk=!1}function rM(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ge.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function mJ(e,t){if(NW(t))rM(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ge.MATHML?F4(t):r===ge.SVG&&(RW(t),H4(t)),Rv(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function pJ(e,t){if(t.tagID===C.P||t.tagID===C.BR){rM(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===ge.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}re.AREA,re.BASE,re.BASEFONT,re.BGSOUND,re.BR,re.COL,re.EMBED,re.FRAME,re.HR,re.IMG,re.INPUT,re.KEYGEN,re.LINK,re.META,re.PARAM,re.SOURCE,re.TRACK,re.WBR;const bp=iM("end"),$i=iM("start");function iM(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function sM(e){const t=$i(e),n=bp(e);if(t&&n)return{start:t,end:n}}const gJ=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,bJ=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),R_={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function aM(e,t){const n=_J(e),r=N4("type",{handlers:{root:yJ,element:xJ,text:vJ,comment:lM,doctype:EJ,raw:SJ},unknown:CJ}),s={parser:n?new __(R_):__.getFragmentParser(void 0,R_),handle(u){r(u,s)},stitches:!1,options:t||{}};r(e,s),Cu(s,$i());const o=n?s.parser.document:s.parser.getFragment(),l=kQ(o,{file:s.options.file});return s.stitches&&au(l,"comment",function(u,d,f){const m=u;if(m.value.stitch&&f&&d!==void 0){const p=f.children;return p[d]=m.value.stitch,d}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function oM(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function yJ(e,t){oM(e.children,t)}function xJ(e,t){wJ(e,t),oM(e.children,t),AJ(e,t)}function vJ(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:at.CHARACTER,chars:e.value,location:$f(e)};Cu(t,$i(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function EJ(e,t){const n={type:at.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:$f(e)};Cu(t,$i(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function TJ(e,t){t.stitches=!0;const n=kJ(e);if("children"in e&&"children"in n){const r=aM({type:"root",children:e.children},t.options);n.children=r.children}lM({type:"comment",value:{stitch:n}},t)}function lM(e,t){const n=e.value,r={type:at.COMMENT,data:n,location:$f(e)};Cu(t,$i(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function SJ(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,uM(t,$i(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(gJ,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function CJ(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))TJ(n,t);else{let r="";throw bJ.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Cu(e,t){uM(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=on.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function uM(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function wJ(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===on.PLAINTEXT)return;Cu(t,$i(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:ro.html;s===ro.html&&n==="svg"&&(s=ro.svg);const o=MQ({...e,children:[]},{space:s===ro.svg?"svg":"html"}),l={type:at.START_TAG,tagName:n,tagID:Su(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:$f(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function AJ(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&HQ.includes(n)||t.parser.tokenizer.state===on.PLAINTEXT)return;Cu(t,bp(e));const r={type:at.END_TAG,tagName:n,tagID:Su(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:$f(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===on.RCDATA||t.parser.tokenizer.state===on.RAWTEXT||t.parser.tokenizer.state===on.SCRIPT_DATA)&&(t.parser.tokenizer.state=on.DATA)}function _J(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function $f(e){const t=$i(e)||{line:void 0,column:void 0,offset:void 0},n=bp(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function kJ(e){return"children"in e?So({...e,children:[]}):So(e)}function NJ(e){return function(t,n){return aM(t,{...e,file:n})}}const Qa=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],O_={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Qa,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Qa],h2:[["className","sr-only"]],img:[...Qa,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Qa,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Qa],table:[...Qa],ul:[...Qa,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},ia={}.hasOwnProperty;function RJ(e,t){let n={type:"root",children:[]};const r={schema:t?{...O_,...t}:O_,stack:[]},s=cM(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function cM(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return OJ(e,n);case"doctype":return DJ(e,n);case"element":return MJ(e,n);case"root":return IJ(e,n);case"text":return LJ(e,n)}}}function OJ(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),o={type:"comment",value:r<0?n:n.slice(0,r)};return Yf(o,t),o}}function DJ(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Yf(n,t),n}}function MJ(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=fM(e,t.children),s=PJ(e,t.properties);e.stack.pop();let o=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(o=!0,e.schema.ancestors&&ia.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let d=-1;for(o=!1;++d<u.length;)e.stack.includes(u[d])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const l={type:"element",tagName:n,properties:s,children:r};return Yf(l,t),l}function IJ(e,t){const r={type:"root",children:fM(e,t.children)};return Yf(r,t),r}function LJ(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Yf(r,t),r}function fM(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const o=cM(e,r[s]);o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}function PJ(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,o=r&&ia.call(r,n)?r[n]:void 0,l=r&&ia.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},d={};let f;for(f in u)if(ia.call(u,f)){const m=u[f];let p=D_(e,M_(o,f),f,m);p==null&&(p=D_(e,M_(l,f),f,m)),p!=null&&(d[f]=p)}if(s&&ia.call(s,n)){const m=s[n];for(f in m)ia.call(m,f)&&!ia.call(d,f)&&(d[f]=m[f])}return d}function D_(e,t,n,r){return t?Array.isArray(r)?jJ(e,t,n,r):dM(e,t,n,r):void 0}function jJ(e,t,n,r){let s=-1;const o=[];for(;++s<r.length;){const l=dM(e,t,n,r[s]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function dM(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&BJ(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,o=0;for(;++o<t.length;){const l=t[o];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(r))){s=!0;break}}else if(l===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function BJ(e,t,n){const r=e.schema.protocols&&ia.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),o=s.indexOf(":"),l=s.indexOf("?"),u=s.indexOf("#"),d=s.indexOf("/");if(o<0||d>-1&&o>d||l>-1&&o>l||u>-1&&o>u)return!0;let f=-1;for(;++f<r.length;){const m=r[f];if(o===m.length&&s.slice(0,m.length)===m)return!0}return!1}function Yf(e,t){const n=sM(t);t.data&&(e.data=So(t.data)),n&&(e.position=n)}function M_(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],o=typeof s=="string"?s:s[0];if(o===t)return s;o==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function UJ(e){return function(t){return RJ(t,e)}}function I_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}const tr=ka(/[A-Za-z]/),Yn=ka(/[\dA-Za-z]/),FJ=ka(/[#-'*+\--9=?A-Z^-~]/);function km(e){return e!==null&&(e<32||e===127)}const Dy=ka(/\d/),HJ=ka(/[\dA-Fa-f]/),zJ=ka(/[!-/:-@[-`{-~]/);function ze(e){return e!==null&&e<-2}function jt(e){return e!==null&&(e<0||e===32)}function ut(e){return e===-2||e===-1||e===32}const yp=ka(new RegExp("\\p{P}|\\p{S}","u")),Co=ka(/\s/);function ka(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function VJ(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function qJ(e,t,n){const s=up((n||{}).ignore||[]),o=$J(t);let l=-1;for(;++l<o.length;)h4(e,"text",u);function u(f,m){let p=-1,g;for(;++p<m.length;){const y=m[p],E=g?g.children:void 0;if(s(y,E?E.indexOf(y):void 0,g))return;g=y}if(g)return d(f,m)}function d(f,m){const p=m[m.length-1],g=o[l][0],y=o[l][1];let E=0;const A=p.children.indexOf(f);let w=!1,_=[];g.lastIndex=0;let k=g.exec(f.value);for(;k;){const R=k.index,M={index:k.index,input:k.input,stack:[...m,f]};let O=y(...k,M);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?g.lastIndex=R+1:(E!==R&&_.push({type:"text",value:f.value.slice(E,R)}),Array.isArray(O)?_.push(...O):O&&_.push(O),E=R+k[0].length,w=!0),!g.global)break;k=g.exec(f.value)}return w?(E<f.value.length&&_.push({type:"text",value:f.value.slice(E)}),p.children.splice(A,1,..._)):_=[f],A+_.length}}function $J(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([YJ(s[0]),GJ(s[1])])}return t}function YJ(e){return typeof e=="string"?new RegExp(VJ(e),"g"):e}function GJ(e){return typeof e=="function"?e:function(){return e}}const J1="phrasing",eb=["autolink","link","image","label"];function XJ(){return{transforms:[tee],enter:{literalAutolink:QJ,literalAutolinkEmail:tb,literalAutolinkHttp:tb,literalAutolinkWww:tb},exit:{literalAutolink:eee,literalAutolinkEmail:JJ,literalAutolinkHttp:WJ,literalAutolinkWww:ZJ}}}function KJ(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:J1,notInConstruct:eb},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:J1,notInConstruct:eb},{character:":",before:"[ps]",after:"\\/",inConstruct:J1,notInConstruct:eb}]}}function QJ(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function tb(e){this.config.enter.autolinkProtocol.call(this,e)}function WJ(e){this.config.exit.autolinkProtocol.call(this,e)}function ZJ(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 JJ(e){this.config.exit.autolinkEmail.call(this,e)}function eee(e){this.exit(e)}function tee(e){qJ(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,nee],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ree]],{ignore:["link","linkReference"]})}function nee(e,t,n,r,s){let o="";if(!hM(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!iee(n)))return!1;const l=see(n+r);if(!l[0])return!1;const u={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[u,{type:"text",value:l[1]}]:u}function ree(e,t,n,r){return!hM(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function iee(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 see(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=I_(e,"(");let o=I_(e,")");for(;r!==-1&&s>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function hM(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Co(n)||yp(n))&&(!t||n!==47)}function pi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}mM.peek=mee;function aee(){this.buffer()}function oee(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function lee(){this.buffer()}function uee(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function cee(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fee(e){this.exit(e)}function dee(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hee(e){this.exit(e)}function mee(){return"["}function mM(e,t,n,r){const s=n.createTracker(r);let o=s.move("[^");const l=n.enter("footnoteReference"),u=n.enter("reference");return o+=s.move(n.safe(n.associationId(e),{after:"]",before:o})),u(),l(),o+=s.move("]"),o}function pee(){return{enter:{gfmFootnoteCallString:aee,gfmFootnoteCall:oee,gfmFootnoteDefinitionLabelString:lee,gfmFootnoteDefinition:uee},exit:{gfmFootnoteCallString:cee,gfmFootnoteCall:fee,gfmFootnoteDefinitionLabelString:dee,gfmFootnoteDefinition:hee}}}function gee(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:mM},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,o,l){const u=o.createTracker(l);let d=u.move("[^");const f=o.enter("footnoteDefinition"),m=o.enter("label");return d+=u.move(o.safe(o.associationId(r),{before:d,after:"]"})),m(),d+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),d+=u.move((t?`
376
+ `:" ")+o.indentLines(o.containerFlow(r,u.current()),t?pM:bee))),f(),d}}function bee(e,t,n){return t===0?e:pM(e,t,n)}function pM(e,t,n){return(n?"":" ")+e}const yee=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];gM.peek=See;function xee(){return{canContainEols:["delete"],enter:{strikethrough:Eee},exit:{strikethrough:Tee}}}function vee(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:yee}],handlers:{delete:gM}}}function Eee(e){this.enter({type:"delete",children:[]},e)}function Tee(e){this.exit(e)}function gM(e,t,n,r){const s=n.createTracker(r),o=n.enter("strikethrough");let l=s.move("~~");return l+=n.containerPhrasing(e,{...s.current(),before:l,after:"~"}),l+=s.move("~~"),o(),l}function See(){return"~"}function Cee(e){return e.length}function wee(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||Cee,o=[],l=[],u=[],d=[];let f=0,m=-1;for(;++m<e.length;){const S=[],A=[];let w=-1;for(e[m].length>f&&(f=e[m].length);++w<e[m].length;){const _=Aee(e[m][w]);if(n.alignDelimiters!==!1){const k=s(_);A[w]=k,(d[w]===void 0||k>d[w])&&(d[w]=k)}S.push(_)}l[m]=S,u[m]=A}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<f;)o[p]=L_(r[p]);else{const S=L_(r);for(;++p<f;)o[p]=S}p=-1;const g=[],y=[];for(;++p<f;){const S=o[p];let A="",w="";S===99?(A=":",w=":"):S===108?A=":":S===114&&(w=":");let _=n.alignDelimiters===!1?1:Math.max(1,d[p]-A.length-w.length);const k=A+"-".repeat(_)+w;n.alignDelimiters!==!1&&(_=A.length+_+w.length,_>d[p]&&(d[p]=_),y[p]=_),g[p]=k}l.splice(1,0,g),u.splice(1,0,y),m=-1;const E=[];for(;++m<l.length;){const S=l[m],A=u[m];p=-1;const w=[];for(;++p<f;){const _=S[p]||"";let k="",R="";if(n.alignDelimiters!==!1){const M=d[p]-(A[p]||0),O=o[p];O===114?k=" ".repeat(M):O===99?M%2?(k=" ".repeat(M/2+.5),R=" ".repeat(M/2-.5)):(k=" ".repeat(M/2),R=k):R=" ".repeat(M)}n.delimiterStart!==!1&&!p&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||p)&&w.push(" "),n.alignDelimiters!==!1&&w.push(k),w.push(_),n.alignDelimiters!==!1&&w.push(R),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||p!==f-1)&&w.push("|")}E.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return E.join(`
377
+ `)}function Aee(e){return e==null?"":String(e)}function L_(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 _ee(e,t,n,r){const s=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),kee);return s(),l}function kee(e,t,n){return">"+(n?"":" ")+e}function Nee(e,t){return P_(e,t.inConstruct,!0)&&!P_(e,t.notInConstruct,!1)}function P_(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function j_(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
378
+ `&&Nee(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
379
+ `}function Ree(e,t){const n=String(e);let r=n.indexOf(t),s=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++o>l&&(l=o):o=1,s=r+t.length,r=n.indexOf(t,s);return l}function Oee(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 Dee(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 Mee(e,t,n,r){const s=Dee(n),o=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(Oee(e,n)){const p=n.enter("codeIndented"),g=n.indentLines(o,Iee);return p(),g}const u=n.createTracker(r),d=s.repeat(Math.max(Ree(o,s)+1,3)),f=n.enter("codeFenced");let m=u.move(d);if(e.lang){const p=n.enter(`codeFencedLang${l}`);m+=u.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...u.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${l}`);m+=u.move(" "),m+=u.move(n.safe(e.meta,{before:m,after:`
380
+ `,encode:["`"],...u.current()})),p()}return m+=u.move(`
381
+ `),o&&(m+=u.move(o+`
382
+ `)),m+=u.move(d),f(),m}function Iee(e,t,n){return(n?"":" ")+e}function Iv(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 Lee(e,t,n,r){const s=Iv(n),o=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let u=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),{before:f,after:"]",...d.current()})),f+=d.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(u=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":`
383
+ `,...d.current()}))),u(),e.title&&(u=n.enter(`title${o}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,{before:f,after:s,...d.current()})),f+=d.move(s),u()),l(),f}function Pee(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 yf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function lu(e){if(e===null||jt(e)||Co(e))return 1;if(yp(e))return 2}function Nm(e,t,n){const r=lu(e),s=lu(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===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}}bM.peek=jee;function bM(e,t,n,r){const s=Pee(n),o=n.enter("emphasis"),l=n.createTracker(r),u=l.move(s);let d=l.move(n.containerPhrasing(e,{after:s,before:u,...l.current()}));const f=d.charCodeAt(0),m=Nm(r.before.charCodeAt(r.before.length-1),f,s);m.inside&&(d=yf(f)+d.slice(1));const p=d.charCodeAt(d.length-1),g=Nm(r.after.charCodeAt(0),p,s);g.inside&&(d=d.slice(0,-1)+yf(p));const y=l.move(s);return o(),n.attentionEncodeSurroundingInfo={after:g.outside,before:m.outside},u+d+y}function jee(e,t,n){return n.options.emphasis||"*"}const Bee={};function Lv(e,t){const n=Bee,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return yM(e,r,s)}function yM(e,t,n){if(Uee(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return B_(e.children,t,n)}return Array.isArray(e)?B_(e,t,n):""}function B_(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=yM(e[s],t,n);return r.join("")}function Uee(e){return!!(e&&typeof e=="object")}function Fee(e,t){let n=!1;return au(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Sy}),!!((!e.depth||e.depth<3)&&Lv(e)&&(t.options.setext||n))}function Hee(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Fee(e,n)){const m=n.enter("headingSetext"),p=n.enter("phrasing"),g=n.containerPhrasing(e,{...o.current(),before:`
384
+ `,after:`
385
+ `});return p(),m(),g+`
386
+ `+(s===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
387
+ `))+1))}const l="#".repeat(s),u=n.enter("headingAtx"),d=n.enter("phrasing");o.move(l+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
388
+ `,...o.current()});return/^[\t ]/.test(f)&&(f=yf(f.charCodeAt(0))+f.slice(1)),f=f?l+" "+f:l,n.options.closeAtx&&(f+=" "+l),d(),u(),f}xM.peek=zee;function xM(e){return e.value||""}function zee(){return"<"}vM.peek=Vee;function vM(e,t,n,r){const s=Iv(n),o=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let u=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,{before:f,after:"]",...d.current()})),f+=d.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(u=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,{before:f,after:e.title?" ":")",...d.current()}))),u(),e.title&&(u=n.enter(`title${o}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,{before:f,after:s,...d.current()})),f+=d.move(s),u()),f+=d.move(")"),l(),f}function Vee(){return"!"}EM.peek=qee;function EM(e,t,n,r){const s=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const u=n.createTracker(r);let d=u.move("![");const f=n.safe(e.alt,{before:d,after:"]",...u.current()});d+=u.move(f+"]["),l();const m=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return l(),n.stack=m,o(),s==="full"||!f||f!==p?d+=u.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function qee(){return"!"}TM.peek=$ee;function TM(e,t,n){let r=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],u=n.compilePattern(l);let d;if(l.atBreak)for(;d=u.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return s+r+s}function $ee(){return"`"}function SM(e,t){const n=Lv(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}CM.peek=Yee;function CM(e,t,n,r){const s=Iv(n),o=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let u,d;if(SM(e,n)){const m=n.stack;n.stack=[],u=n.enter("autolink");let p=l.move("<");return p+=l.move(n.containerPhrasing(e,{before:p,after:">",...l.current()})),p+=l.move(">"),u(),n.stack=m,p}u=n.enter("link"),d=n.enter("label");let f=l.move("[");return f+=l.move(n.containerPhrasing(e,{before:f,after:"](",...l.current()})),f+=l.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=l.move("<"),f+=l.move(n.safe(e.url,{before:f,after:">",...l.current()})),f+=l.move(">")):(d=n.enter("destinationRaw"),f+=l.move(n.safe(e.url,{before:f,after:e.title?" ":")",...l.current()}))),d(),e.title&&(d=n.enter(`title${o}`),f+=l.move(" "+s),f+=l.move(n.safe(e.title,{before:f,after:s,...l.current()})),f+=l.move(s),d()),f+=l.move(")"),u(),f}function Yee(e,t,n){return SM(e,n)?"<":"["}wM.peek=Gee;function wM(e,t,n,r){const s=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const u=n.createTracker(r);let d=u.move("[");const f=n.containerPhrasing(e,{before:d,after:"]",...u.current()});d+=u.move(f+"]["),l();const m=n.stack;n.stack=[],l=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...u.current()});return l(),n.stack=m,o(),s==="full"||!f||f!==p?d+=u.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=u.move("]"),d}function Gee(){return"["}function Pv(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 Xee(e){const t=Pv(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Kee(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 AM(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 Qee(e,t,n,r){const s=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?Kee(n):Pv(n);const u=e.ordered?l==="."?")":".":Xee(n);let d=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),AM(n)===l&&m){let p=-1;for(;++p<e.children.length;){const g=e.children[p];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(l=u),n.bulletCurrent=l;const f=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,s(),f}function Wee(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 Zee(e,t,n,r){const s=Wee(n);let o=n.bulletCurrent||Pv(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const u=n.createTracker(r);u.move(o+" ".repeat(l-o.length)),u.shift(l);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,u.current()),m);return d(),f;function m(p,g,y){return g?(y?"":" ".repeat(l))+p:(y?o:o+" ".repeat(l-o.length))+p}}function Jee(e,t,n,r){const s=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),s(),l}const ete=up(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function tte(e,t,n,r){return(e.children.some(function(l){return ete(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function nte(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}_M.peek=rte;function _M(e,t,n,r){const s=nte(n),o=n.enter("strong"),l=n.createTracker(r),u=l.move(s+s);let d=l.move(n.containerPhrasing(e,{after:s,before:u,...l.current()}));const f=d.charCodeAt(0),m=Nm(r.before.charCodeAt(r.before.length-1),f,s);m.inside&&(d=yf(f)+d.slice(1));const p=d.charCodeAt(d.length-1),g=Nm(r.after.charCodeAt(0),p,s);g.inside&&(d=d.slice(0,-1)+yf(p));const y=l.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:g.outside,before:m.outside},u+d+y}function rte(e,t,n){return n.options.strong||"*"}function ite(e,t,n,r){return n.safe(e.value,r)}function ste(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 ate(e,t,n){const r=(AM(n)+(n.options.ruleSpaces?" ":"")).repeat(ste(n));return n.options.ruleSpaces?r.slice(0,-1):r}const kM={blockquote:_ee,break:j_,code:Mee,definition:Lee,emphasis:bM,hardBreak:j_,heading:Hee,html:xM,image:vM,imageReference:EM,inlineCode:TM,link:CM,linkReference:wM,list:Qee,listItem:Zee,paragraph:Jee,root:tte,strong:_M,text:ite,thematicBreak:ate},U_=document.createElement("i");function jv(e){const t="&"+e+";";U_.innerHTML=t;const n=U_.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function NM(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const ote=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lte(e){return e.replace(ote,ute)}function ute(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return NM(n.slice(o?2:1),o?16:10)}return jv(n)||e}function cte(){return{enter:{table:fte,tableData:F_,tableHeader:F_,tableRow:hte},exit:{codeText:mte,table:dte,tableData:nb,tableHeader:nb,tableRow:nb}}}function fte(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function dte(e){this.exit(e),this.data.inTable=void 0}function hte(e){this.enter({type:"tableRow",children:[]},e)}function nb(e){this.exit(e)}function F_(e){this.enter({type:"tableCell",children:[]},e)}function mte(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,pte));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function pte(e,t){return t==="|"?t:e}function gte(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
389
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:l,tableCell:d,tableRow:u}};function l(y,E,S,A){return f(m(y,S,A),y.align)}function u(y,E,S,A){const w=p(y,S,A),_=f([w]);return _.slice(0,_.indexOf(`
390
+ `))}function d(y,E,S,A){const w=S.enter("tableCell"),_=S.enter("phrasing"),k=S.containerPhrasing(y,{...A,before:o,after:o});return _(),w(),k}function f(y,E){return wee(y,{align:E,alignDelimiters:r,padding:n,stringLength:s})}function m(y,E,S){const A=y.children;let w=-1;const _=[],k=E.enter("table");for(;++w<A.length;)_[w]=p(A[w],E,S);return k(),_}function p(y,E,S){const A=y.children;let w=-1;const _=[],k=E.enter("tableRow");for(;++w<A.length;)_[w]=d(A[w],y,E,S);return k(),_}function g(y,E,S){let A=kM.inlineCode(y,E,S);return S.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function bte(){return{exit:{taskListCheckValueChecked:H_,taskListCheckValueUnchecked:H_,paragraph:xte}}}function yte(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:vte}}}function H_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function xte(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let o=-1,l;for(;++o<s.length;){const u=s[o];if(u.type==="paragraph"){l=u;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function vte(e,t,n,r){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);o&&u.move(l);let d=kM.listItem(e,t,n,{...r,...u.current()});return o&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(m){return m+l}}function Ete(){return[XJ(),pee(),xee(),cte(),bte()]}function Tte(e){return{extensions:[KJ(),gee(e),vee(),gte(e),yte()]}}function Dr(e,t,n,r){const s=e.length;let o=0,l;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function Gr(e,t){return e.length>0?(Dr(e,e.length,0,t),e):t}const z_={}.hasOwnProperty;function RM(e){const t={};let n=-1;for(;++n<e.length;)Ste(t,e[n]);return t}function Ste(e,t){let n;for(n in t){const s=(z_.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){z_.call(s,l)||(s[l]=[]);const u=o[l];Cte(s[l],Array.isArray(u)?u:u?[u]:[])}}}function Cte(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Dr(e,0,0,r)}const wte={tokenize:Ote,partial:!0},OM={tokenize:Dte,partial:!0},DM={tokenize:Mte,partial:!0},MM={tokenize:Ite,partial:!0},Ate={tokenize:Lte,partial:!0},IM={name:"wwwAutolink",tokenize:Nte,previous:PM},LM={name:"protocolAutolink",tokenize:Rte,previous:jM},Cs={name:"emailAutolink",tokenize:kte,previous:BM},Yi={};function _te(){return{text:Yi}}let Wa=48;for(;Wa<123;)Yi[Wa]=Cs,Wa++,Wa===58?Wa=65:Wa===91&&(Wa=97);Yi[43]=Cs;Yi[45]=Cs;Yi[46]=Cs;Yi[95]=Cs;Yi[72]=[Cs,LM];Yi[104]=[Cs,LM];Yi[87]=[Cs,IM];Yi[119]=[Cs,IM];function kte(e,t,n){const r=this;let s,o;return l;function l(p){return!My(p)||!BM.call(r,r.previous)||Bv(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(p))}function u(p){return My(p)?(e.consume(p),u):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(Ate,m,f)(p):p===45||p===95||Yn(p)?(o=!0,e.consume(p),d):m(p)}function f(p){return e.consume(p),s=!0,d}function m(p){return o&&s&&tr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function Nte(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!PM.call(r,r.previous)||Bv(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(wte,e.attempt(OM,e.attempt(DM,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Rte(e,t,n){const r=this;let s="",o=!1;return l;function l(p){return(p===72||p===104)&&jM.call(r,r.previous)&&!Bv(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(p),e.consume(p),u):n(p)}function u(p){if(tr(p)&&s.length<5)return s+=String.fromCodePoint(p),e.consume(p),u;if(p===58){const g=s.toLowerCase();if(g==="http"||g==="https")return e.consume(p),d}return n(p)}function d(p){return p===47?(e.consume(p),o?f:(o=!0,d)):n(p)}function f(p){return p===null||km(p)||jt(p)||Co(p)||yp(p)?n(p):e.attempt(OM,e.attempt(DM,m),n)(p)}function m(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function Ote(e,t,n){let r=0;return s;function s(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),s):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function Dte(e,t,n){let r,s,o;return l;function l(f){return f===46||f===95?e.check(MM,d,u)(f):f===null||jt(f)||Co(f)||f!==45&&yp(f)?d(f):(o=!0,e.consume(f),l)}function u(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),l}function d(f){return s||r||!o?n(f):t(f)}}function Mte(e,t){let n=0,r=0;return s;function s(l){return l===40?(n++,e.consume(l),s):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(MM,t,o)(l):l===null||jt(l)||Co(l)?t(l):(e.consume(l),s)}function o(l){return l===41&&r++,e.consume(l),s}}function Ite(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),o):u===93?(e.consume(u),s):u===60||u===null||jt(u)||Co(u)?t(u):n(u)}function s(u){return u===null||u===40||u===91||jt(u)||Co(u)?t(u):r(u)}function o(u){return tr(u)?l(u):n(u)}function l(u){return u===59?(e.consume(u),r):tr(u)?(e.consume(u),l):n(u)}}function Lte(e,t,n){return r;function r(o){return e.consume(o),s}function s(o){return Yn(o)?n(o):t(o)}}function PM(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||jt(e)}function jM(e){return!tr(e)}function BM(e){return!(e===47||My(e))}function My(e){return e===43||e===45||e===46||e===95||Yn(e)}function Bv(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function wu(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&Yn(e.charCodeAt(n+1))&&Yn(e.charCodeAt(n+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const u=e.charCodeAt(n+1);o<56320&&u>56319&&u<57344?(l=String.fromCharCode(o,u),s=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+s+1,l=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function xp(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Iy={name:"attention",resolveAll:Pte,tokenize:jte};function Pte(e,t){let n=-1,r,s,o,l,u,d,f,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},g={...e[n][1].start};V_(p,-d),V_(g,d),l={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},o={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...l.start},end:{...u.end}},e[r][1].end={...l.start},e[n][1].start={...u.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Gr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Gr(f,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",o,t]]),f=Gr(f,xp(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Gr(f,[["exit",o,t],["enter",u,t],["exit",u,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,f=Gr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Dr(e,r-1,n-r+3,f),n=r+f.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function jte(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=lu(r);let o;return l;function l(d){return o=d,e.enter("attentionSequence"),u(d)}function u(d){if(d===o)return e.consume(d),u;const f=e.exit("attentionSequence"),m=lu(d),p=!m||m===2&&s||n.includes(d),g=!s||s===2&&m||n.includes(r);return f._open=!!(o===42?p:p&&(s||!g)),f._close=!!(o===42?g:g&&(m||!p)),t(d)}}function V_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Bte={name:"autolink",tokenize:Ute};function Ute(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(y){return tr(y)?(e.consume(y),l):y===64?n(y):f(y)}function l(y){return y===43||y===45||y===46||Yn(y)?(r=1,u(y)):f(y)}function u(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||Yn(y))&&r++<32?(e.consume(y),u):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||km(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),m):FJ(y)?(e.consume(y),f):n(y)}function m(y){return Yn(y)?p(y):n(y)}function p(y){return y===46?(e.consume(y),r=0,m):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):g(y)}function g(y){if((y===45||Yn(y))&&r++<63){const E=y===45?g:p;return e.consume(y),E}return n(y)}}function bt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(d){return ut(d)?(e.enter(n),u(d)):t(d)}function u(d){return ut(d)&&o++<s?(e.consume(d),u):(e.exit(n),t(d))}}const Gf={partial:!0,tokenize:Fte};function Fte(e,t,n){return r;function r(o){return ut(o)?bt(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||ze(o)?t(o):n(o)}}const UM={continuation:{tokenize:zte},exit:Vte,name:"blockQuote",tokenize:Hte};function Hte(e,t,n){const r=this;return s;function s(l){if(l===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return ut(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function zte(e,t,n){const r=this;return s;function s(l){return ut(l)?bt(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(UM,t,n)(l)}}function Vte(e){e.exit("blockQuote")}const FM={name:"characterEscape",tokenize:qte};function qte(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return zJ(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const HM={name:"characterReference",tokenize:$te};function $te(e,t,n){const r=this;let s=0,o,l;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),o=31,l=Yn,m(p))}function f(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=HJ,m):(e.enter("characterReferenceValue"),o=7,l=Dy,m(p))}function m(p){if(p===59&&s){const g=e.exit("characterReferenceValue");return l===Yn&&!jv(r.sliceSerialize(g))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(p)&&s++<o?(e.consume(p),m):n(p)}}const q_={partial:!0,tokenize:Gte},$_={concrete:!0,name:"codeFenced",tokenize:Yte};function Yte(e,t,n){const r=this,s={partial:!0,tokenize:M};let o=0,l=0,u;return d;function d(O){return f(O)}function f(O){const D=r.events[r.events.length-1];return o=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,u=O,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(O)}function m(O){return O===u?(l++,e.consume(O),m):l<3?n(O):(e.exit("codeFencedFenceSequence"),ut(O)?bt(e,p,"whitespace")(O):p(O))}function p(O){return O===null||ze(O)?(e.exit("codeFencedFence"),r.interrupt?t(O):e.check(q_,S,R)(O)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(O))}function g(O){return O===null||ze(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(O)):ut(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),bt(e,y,"whitespace")(O)):O===96&&O===u?n(O):(e.consume(O),g)}function y(O){return O===null||ze(O)?p(O):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(O))}function E(O){return O===null||ze(O)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(O)):O===96&&O===u?n(O):(e.consume(O),E)}function S(O){return e.attempt(s,R,A)(O)}function A(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),w}function w(O){return o>0&&ut(O)?bt(e,_,"linePrefix",o+1)(O):_(O)}function _(O){return O===null||ze(O)?e.check(q_,S,R)(O):(e.enter("codeFlowValue"),k(O))}function k(O){return O===null||ze(O)?(e.exit("codeFlowValue"),_(O)):(e.consume(O),k)}function R(O){return e.exit("codeFenced"),t(O)}function M(O,D,P){let z=0;return j;function j(W){return O.enter("lineEnding"),O.consume(W),O.exit("lineEnding"),K}function K(W){return O.enter("codeFencedFence"),ut(W)?bt(O,Y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):Y(W)}function Y(W){return W===u?(O.enter("codeFencedFenceSequence"),J(W)):P(W)}function J(W){return W===u?(z++,O.consume(W),J):z>=l?(O.exit("codeFencedFenceSequence"),ut(W)?bt(O,te,"whitespace")(W):te(W)):P(W)}function te(W){return W===null||ze(W)?(O.exit("codeFencedFence"),D(W)):P(W)}}}function Gte(e,t,n){const r=this;return s;function s(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const rb={name:"codeIndented",tokenize:Kte},Xte={partial:!0,tokenize:Qte};function Kte(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),bt(e,o,"linePrefix",5)(f)}function o(f){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?l(f):n(f)}function l(f){return f===null?d(f):ze(f)?e.attempt(Xte,l,d)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||ze(f)?(e.exit("codeFlowValue"),l(f)):(e.consume(f),u)}function d(f){return e.exit("codeIndented"),t(f)}}function Qte(e,t,n){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?n(l):ze(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):bt(e,o,"linePrefix",5)(l)}function o(l){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):ze(l)?s(l):n(l)}}const Wte={name:"codeText",previous:Jte,resolve:Zte,tokenize:ene};function Zte(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function Jte(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ene(e,t,n){let r=0,s,o;return l;function l(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(o=e.enter("codeTextSequence"),s=0,m(p)):ze(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(p))}function f(p){return p===null||p===32||p===96||ze(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),f)}function m(p){return p===96?(e.consume(p),s++,m):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(o.type="codeTextData",f(p))}}class tne{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,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Ac(this.left,r),o.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),Ac(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ac(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 n=this.left.splice(t,Number.POSITIVE_INFINITY);Ac(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ac(this.left,n.reverse())}}}function Ac(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function zM(e){const t={};let n=-1,r,s,o,l,u,d,f;const m=new tne(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,nne(m,n)),n=t[n],f=!0);else if(r[1]._container){for(o=n,s=void 0;o--;)if(l=m.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(s&&(m.get(s)[1].type="lineEndingBlank"),l[1].type="lineEnding",s=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;s&&(r[1].end={...m.get(s)[1].start},u=m.slice(s,n),u.unshift(r),m.splice(s,n-s+1,u))}}return Dr(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!f}function nne(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const u=l.events,d=[],f={};let m,p,g=-1,y=n,E=0,S=0;const A=[S];for(;y;){for(;e.get(++s)[1]!==y;);o.push(s),y._tokenizer||(m=r.sliceStream(y),y.next||m.push(null),p&&l.defineSkip(y.start),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(m),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),p=y,y=y.next}for(y=n;++g<u.length;)u[g][0]==="exit"&&u[g-1][0]==="enter"&&u[g][1].type===u[g-1][1].type&&u[g][1].start.line!==u[g][1].end.line&&(S=g+1,A.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(l.events=[],y?(y._tokenizer=void 0,y.previous=void 0):A.pop(),g=A.length;g--;){const w=u.slice(A[g],A[g+1]),_=o.pop();d.push([_,_+w.length-1]),e.splice(_,2,w)}for(d.reverse(),g=-1;++g<d.length;)f[E+d[g][0]]=E+d[g][1],E+=d[g][1]-d[g][0]-1;return f}const rne={resolve:sne,tokenize:ane},ine={partial:!0,tokenize:one};function sne(e){return zM(e),e}function ane(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(u)}function s(u){return u===null?o(u):ze(u)?e.check(ine,l,o)(u):(e.consume(u),s)}function o(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function l(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function one(e,t,n){const r=this;return s;function s(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),bt(e,o,"linePrefix")}function o(l){if(l===null||ze(l))return n(l);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function VM(e,t,n,r,s,o,l,u,d){const f=d||Number.POSITIVE_INFINITY;let m=0;return p;function p(w){return w===60?(e.enter(r),e.enter(s),e.enter(o),e.consume(w),e.exit(o),g):w===null||w===32||w===41||km(w)?n(w):(e.enter(r),e.enter(l),e.enter(u),e.enter("chunkString",{contentType:"string"}),S(w))}function g(w){return w===62?(e.enter(o),e.consume(w),e.exit(o),e.exit(s),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===62?(e.exit("chunkString"),e.exit(u),g(w)):w===null||w===60||ze(w)?n(w):(e.consume(w),w===92?E:y)}function E(w){return w===60||w===62||w===92?(e.consume(w),y):y(w)}function S(w){return!m&&(w===null||w===41||jt(w))?(e.exit("chunkString"),e.exit(u),e.exit(l),e.exit(r),t(w)):m<f&&w===40?(e.consume(w),m++,S):w===41?(e.consume(w),m--,S):w===null||w===32||w===40||km(w)?n(w):(e.consume(w),w===92?A:S)}function A(w){return w===40||w===41||w===92?(e.consume(w),S):S(w)}}function qM(e,t,n,r,s,o){const l=this;let u=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(o),m}function m(y){return u>999||y===null||y===91||y===93&&!d||y===94&&!u&&"_hiddenFootnoteSupport"in l.parser.constructs?n(y):y===93?(e.exit(o),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):ze(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===null||y===91||y===93||ze(y)||u++>999?(e.exit("chunkString"),m(y)):(e.consume(y),d||(d=!ut(y)),y===92?g:p)}function g(y){return y===91||y===92||y===93?(e.consume(y),u++,p):p(y)}}function $M(e,t,n,r,s,o){let l;return u;function u(g){return g===34||g===39||g===40?(e.enter(r),e.enter(s),e.consume(g),e.exit(s),l=g===40?41:g,d):n(g)}function d(g){return g===l?(e.enter(s),e.consume(g),e.exit(s),e.exit(r),t):(e.enter(o),f(g))}function f(g){return g===l?(e.exit(o),d(l)):g===null?n(g):ze(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),bt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(g))}function m(g){return g===l||g===null||ze(g)?(e.exit("chunkString"),f(g)):(e.consume(g),g===92?p:m)}function p(g){return g===l||g===92?(e.consume(g),m):m(g)}}function Wc(e,t){let n;return r;function r(s){return ze(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):ut(s)?bt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const lne={name:"definition",tokenize:cne},une={partial:!0,tokenize:fne};function cne(e,t,n){const r=this;let s;return o;function o(y){return e.enter("definition"),l(y)}function l(y){return qM.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function u(y){return s=pi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return jt(y)?Wc(e,f)(y):f(y)}function f(y){return VM(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function m(y){return e.attempt(une,p,p)(y)}function p(y){return ut(y)?bt(e,g,"whitespace")(y):g(y)}function g(y){return y===null||ze(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function fne(e,t,n){return r;function r(u){return jt(u)?Wc(e,s)(u):n(u)}function s(u){return $M(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function o(u){return ut(u)?bt(e,l,"whitespace")(u):l(u)}function l(u){return u===null||ze(u)?t(u):n(u)}}const dne={name:"hardBreakEscape",tokenize:hne};function hne(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return ze(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const mne={name:"headingAtx",resolve:pne,tokenize:gne};function pne(e,t){let n=e.length-2,r=3,s,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Dr(e,r,n-r+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function gne(e,t,n){let r=0;return s;function s(m){return e.enter("atxHeading"),o(m)}function o(m){return e.enter("atxHeadingSequence"),l(m)}function l(m){return m===35&&r++<6?(e.consume(m),l):m===null||jt(m)?(e.exit("atxHeadingSequence"),u(m)):n(m)}function u(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||ze(m)?(e.exit("atxHeading"),t(m)):ut(m)?bt(e,u,"whitespace")(m):(e.enter("atxHeadingText"),f(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),u(m))}function f(m){return m===null||m===35||jt(m)?(e.exit("atxHeadingText"),u(m)):(e.consume(m),f)}}const bne=["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"],Y_=["pre","script","style","textarea"],yne={concrete:!0,name:"htmlFlow",resolveTo:Ene,tokenize:Tne},xne={partial:!0,tokenize:Cne},vne={partial:!0,tokenize:Sne};function Ene(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 Tne(e,t,n){const r=this;let s,o,l,u,d;return f;function f(B){return m(B)}function m(B){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(B),p}function p(B){return B===33?(e.consume(B),g):B===47?(e.consume(B),o=!0,S):B===63?(e.consume(B),s=3,r.interrupt?t:U):tr(B)?(e.consume(B),l=String.fromCharCode(B),A):n(B)}function g(B){return B===45?(e.consume(B),s=2,y):B===91?(e.consume(B),s=5,u=0,E):tr(B)?(e.consume(B),s=4,r.interrupt?t:U):n(B)}function y(B){return B===45?(e.consume(B),r.interrupt?t:U):n(B)}function E(B){const de="CDATA[";return B===de.charCodeAt(u++)?(e.consume(B),u===de.length?r.interrupt?t:Y:E):n(B)}function S(B){return tr(B)?(e.consume(B),l=String.fromCharCode(B),A):n(B)}function A(B){if(B===null||B===47||B===62||jt(B)){const de=B===47,xe=l.toLowerCase();return!de&&!o&&Y_.includes(xe)?(s=1,r.interrupt?t(B):Y(B)):bne.includes(l.toLowerCase())?(s=6,de?(e.consume(B),w):r.interrupt?t(B):Y(B)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(B):o?_(B):k(B))}return B===45||Yn(B)?(e.consume(B),l+=String.fromCharCode(B),A):n(B)}function w(B){return B===62?(e.consume(B),r.interrupt?t:Y):n(B)}function _(B){return ut(B)?(e.consume(B),_):j(B)}function k(B){return B===47?(e.consume(B),j):B===58||B===95||tr(B)?(e.consume(B),R):ut(B)?(e.consume(B),k):j(B)}function R(B){return B===45||B===46||B===58||B===95||Yn(B)?(e.consume(B),R):M(B)}function M(B){return B===61?(e.consume(B),O):ut(B)?(e.consume(B),M):k(B)}function O(B){return B===null||B===60||B===61||B===62||B===96?n(B):B===34||B===39?(e.consume(B),d=B,D):ut(B)?(e.consume(B),O):P(B)}function D(B){return B===d?(e.consume(B),d=null,z):B===null||ze(B)?n(B):(e.consume(B),D)}function P(B){return B===null||B===34||B===39||B===47||B===60||B===61||B===62||B===96||jt(B)?M(B):(e.consume(B),P)}function z(B){return B===47||B===62||ut(B)?k(B):n(B)}function j(B){return B===62?(e.consume(B),K):n(B)}function K(B){return B===null||ze(B)?Y(B):ut(B)?(e.consume(B),K):n(B)}function Y(B){return B===45&&s===2?(e.consume(B),I):B===60&&s===1?(e.consume(B),H):B===62&&s===4?(e.consume(B),q):B===63&&s===3?(e.consume(B),U):B===93&&s===5?(e.consume(B),ne):ze(B)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(xne,ie,J)(B)):B===null||ze(B)?(e.exit("htmlFlowData"),J(B)):(e.consume(B),Y)}function J(B){return e.check(vne,te,ie)(B)}function te(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),W}function W(B){return B===null||ze(B)?J(B):(e.enter("htmlFlowData"),Y(B))}function I(B){return B===45?(e.consume(B),U):Y(B)}function H(B){return B===47?(e.consume(B),l="",$):Y(B)}function $(B){if(B===62){const de=l.toLowerCase();return Y_.includes(de)?(e.consume(B),q):Y(B)}return tr(B)&&l.length<8?(e.consume(B),l+=String.fromCharCode(B),$):Y(B)}function ne(B){return B===93?(e.consume(B),U):Y(B)}function U(B){return B===62?(e.consume(B),q):B===45&&s===2?(e.consume(B),U):Y(B)}function q(B){return B===null||ze(B)?(e.exit("htmlFlowData"),ie(B)):(e.consume(B),q)}function ie(B){return e.exit("htmlFlow"),t(B)}}function Sne(e,t,n){const r=this;return s;function s(l){return ze(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Cne(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Gf,t,n)}}const wne={name:"htmlText",tokenize:Ane};function Ane(e,t,n){const r=this;let s,o,l;return u;function u(U){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(U),d}function d(U){return U===33?(e.consume(U),f):U===47?(e.consume(U),M):U===63?(e.consume(U),k):tr(U)?(e.consume(U),P):n(U)}function f(U){return U===45?(e.consume(U),m):U===91?(e.consume(U),o=0,E):tr(U)?(e.consume(U),_):n(U)}function m(U){return U===45?(e.consume(U),y):n(U)}function p(U){return U===null?n(U):U===45?(e.consume(U),g):ze(U)?(l=p,H(U)):(e.consume(U),p)}function g(U){return U===45?(e.consume(U),y):p(U)}function y(U){return U===62?I(U):U===45?g(U):p(U)}function E(U){const q="CDATA[";return U===q.charCodeAt(o++)?(e.consume(U),o===q.length?S:E):n(U)}function S(U){return U===null?n(U):U===93?(e.consume(U),A):ze(U)?(l=S,H(U)):(e.consume(U),S)}function A(U){return U===93?(e.consume(U),w):S(U)}function w(U){return U===62?I(U):U===93?(e.consume(U),w):S(U)}function _(U){return U===null||U===62?I(U):ze(U)?(l=_,H(U)):(e.consume(U),_)}function k(U){return U===null?n(U):U===63?(e.consume(U),R):ze(U)?(l=k,H(U)):(e.consume(U),k)}function R(U){return U===62?I(U):k(U)}function M(U){return tr(U)?(e.consume(U),O):n(U)}function O(U){return U===45||Yn(U)?(e.consume(U),O):D(U)}function D(U){return ze(U)?(l=D,H(U)):ut(U)?(e.consume(U),D):I(U)}function P(U){return U===45||Yn(U)?(e.consume(U),P):U===47||U===62||jt(U)?z(U):n(U)}function z(U){return U===47?(e.consume(U),I):U===58||U===95||tr(U)?(e.consume(U),j):ze(U)?(l=z,H(U)):ut(U)?(e.consume(U),z):I(U)}function j(U){return U===45||U===46||U===58||U===95||Yn(U)?(e.consume(U),j):K(U)}function K(U){return U===61?(e.consume(U),Y):ze(U)?(l=K,H(U)):ut(U)?(e.consume(U),K):z(U)}function Y(U){return U===null||U===60||U===61||U===62||U===96?n(U):U===34||U===39?(e.consume(U),s=U,J):ze(U)?(l=Y,H(U)):ut(U)?(e.consume(U),Y):(e.consume(U),te)}function J(U){return U===s?(e.consume(U),s=void 0,W):U===null?n(U):ze(U)?(l=J,H(U)):(e.consume(U),J)}function te(U){return U===null||U===34||U===39||U===60||U===61||U===96?n(U):U===47||U===62||jt(U)?z(U):(e.consume(U),te)}function W(U){return U===47||U===62||jt(U)?z(U):n(U)}function I(U){return U===62?(e.consume(U),e.exit("htmlTextData"),e.exit("htmlText"),t):n(U)}function H(U){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),$}function $(U){return ut(U)?bt(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):ne(U)}function ne(U){return e.enter("htmlTextData"),l(U)}}const Uv={name:"labelEnd",resolveAll:Rne,resolveTo:One,tokenize:Dne},_ne={tokenize:Mne},kne={tokenize:Ine},Nne={tokenize:Lne};function Rne(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Dr(e,0,e.length,n),e}function One(e,t){let n=e.length,r=0,s,o,l,u;for(;n--;)if(s=e[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(l=n);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},m={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return u=[["enter",d,t],["enter",f,t]],u=Gr(u,e.slice(o+1,o+r+3)),u=Gr(u,[["enter",m,t]]),u=Gr(u,xp(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),u=Gr(u,[["exit",m,t],e[l-2],e[l-1],["exit",f,t]]),u=Gr(u,e.slice(l+1)),u=Gr(u,[["exit",d,t]]),Dr(e,o,e.length,u),e}function Dne(e,t,n){const r=this;let s=r.events.length,o,l;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){o=r.events[s][1];break}return u;function u(g){return o?o._inactive?p(g):(l=r.parser.defined.includes(pi(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),d):n(g)}function d(g){return g===40?e.attempt(_ne,m,l?m:p)(g):g===91?e.attempt(kne,m,l?f:p)(g):l?m(g):p(g)}function f(g){return e.attempt(Nne,m,p)(g)}function m(g){return t(g)}function p(g){return o._balanced=!0,n(g)}}function Mne(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),s}function s(p){return jt(p)?Wc(e,o)(p):o(p)}function o(p){return p===41?m(p):VM(e,l,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function l(p){return jt(p)?Wc(e,d)(p):m(p)}function u(p){return n(p)}function d(p){return p===34||p===39||p===40?$M(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function f(p){return jt(p)?Wc(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function Ine(e,t,n){const r=this;return s;function s(u){return qM.call(r,e,o,l,"reference","referenceMarker","referenceString")(u)}function o(u){return r.parser.defined.includes(pi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function l(u){return n(u)}}function Lne(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Pne={name:"labelStartImage",resolveAll:Uv.resolveAll,tokenize:jne};function jne(e,t,n){const r=this;return s;function s(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),o}function o(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),l):n(u)}function l(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Bne={name:"labelStartLink",resolveAll:Uv.resolveAll,tokenize:Une};function Une(e,t,n){const r=this;return s;function s(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const ib={name:"lineEnding",tokenize:Fne};function Fne(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),bt(e,t,"linePrefix")}}const em={name:"thematicBreak",tokenize:Hne};function Hne(e,t,n){let r=0,s;return o;function o(f){return e.enter("thematicBreak"),l(f)}function l(f){return s=f,u(f)}function u(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||ze(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),ut(f)?bt(e,u,"whitespace")(f):u(f))}}const gr={continuation:{tokenize:$ne},exit:Gne,name:"list",tokenize:qne},zne={partial:!0,tokenize:Xne},Vne={partial:!0,tokenize:Yne};function qne(e,t,n){const r=this,s=r.events[r.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,l=0;return u;function u(y){const E=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Dy(y)){if(r.containerState.type||(r.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(em,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Dy(y)&&++l<10?(e.consume(y),d):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Gf,r.interrupt?n:m,e.attempt(zne,g,p))}function m(y){return r.containerState.initialBlankLine=!0,o++,g(y)}function p(y){return ut(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),g):n(y)}function g(y){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function $ne(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Gf,s,o);function s(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,bt(e,t,"listItemIndent",r.containerState.size+1)(u)}function o(u){return r.containerState.furtherBlankLines||!ut(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Vne,t,l)(u))}function l(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,bt(e,e.attempt(gr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Yne(e,t,n){const r=this;return bt(e,s,"listItemIndent",r.containerState.size+1);function s(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function Gne(e){e.exit(this.containerState.type)}function Xne(e,t,n){const r=this;return bt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const l=r.events[r.events.length-1];return!ut(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const G_={name:"setextUnderline",resolveTo:Kne,tokenize:Qne};function Kne(e,t){let n=e.length,r,s,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function Qne(e,t,n){const r=this;let s;return o;function o(f){let m=r.events.length,p;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){p=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),s=f,l(f)):n(f)}function l(f){return e.enter("setextHeadingLineSequence"),u(f)}function u(f){return f===s?(e.consume(f),u):(e.exit("setextHeadingLineSequence"),ut(f)?bt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||ze(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const Wne={tokenize:sre,partial:!0};function Zne(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:nre,continuation:{tokenize:rre},exit:ire}},text:{91:{name:"gfmFootnoteCall",tokenize:tre},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Jne,resolveTo:ere}}}}function Jne(e,t,n){const r=this;let s=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const d=r.events[s][1];if(d.type==="labelImage"){l=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return u;function u(d){if(!l||!l._balanced)return n(d);const f=pi(r.sliceSerialize({start:l.end,end:r.now()}));return f.codePointAt(0)!==94||!o.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function ere(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function tre(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return u;function u(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(p){if(o>999||p===93&&!l||p===null||p===91||jt(p))return n(p);if(p===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return s.includes(pi(r.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return jt(p)||(l=!0),o++,e.consume(p),p===92?m:f}function m(p){return p===91||p===92||p===93?(e.consume(p),o++,f):f(p)}}function nre(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,u;return d;function d(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(E)}function m(E){if(l>999||E===93&&!u||E===null||E===91||jt(E))return n(E);if(E===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return o=pi(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return jt(E)||(u=!0),l++,e.consume(E),E===92?p:m}function p(E){return E===91||E===92||E===93?(e.consume(E),l++,m):m(E)}function g(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),s.includes(o)||s.push(o),bt(e,y,"gfmFootnoteDefinitionWhitespace")):n(E)}function y(E){return t(E)}}function rre(e,t,n){return e.check(Gf,t,e.attempt(Wne,t,n))}function ire(e){e.exit("gfmFootnoteDefinition")}function sre(e,t,n){const r=this;return bt(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function are(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(l,u){let d=-1;for(;++d<l.length;)if(l[d][0]==="enter"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._close){let f=d;for(;f--;)if(l[f][0]==="exit"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._open&&l[d][1].end.offset-l[d][1].start.offset===l[f][1].end.offset-l[f][1].start.offset){l[d][1].type="strikethroughSequence",l[f][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},l[f][1].start),end:Object.assign({},l[d][1].end)},p={type:"strikethroughText",start:Object.assign({},l[f][1].end),end:Object.assign({},l[d][1].start)},g=[["enter",m,u],["enter",l[f][1],u],["exit",l[f][1],u],["enter",p,u]],y=u.parser.constructs.insideSpan.null;y&&Dr(g,g.length,0,xp(y,l.slice(f+1,d),u)),Dr(g,g.length,0,[["exit",p,u],["enter",l[d][1],u],["exit",l[d][1],u],["exit",m,u]]),Dr(l,f-1,d-f+3,g),d=f+g.length-2;break}}for(d=-1;++d<l.length;)l[d][1].type==="strikethroughSequenceTemporary"&&(l[d][1].type="data");return l}function o(l,u,d){const f=this.previous,m=this.events;let p=0;return g;function g(E){return f===126&&m[m.length-1][1].type!=="characterEscape"?d(E):(l.enter("strikethroughSequenceTemporary"),y(E))}function y(E){const S=lu(f);if(E===126)return p>1?d(E):(l.consume(E),p++,y);if(p<2&&!n)return d(E);const A=l.exit("strikethroughSequenceTemporary"),w=lu(E);return A._open=!w||w===2&&!!S,A._close=!S||S===2&&!!w,u(E)}}}class ore{constructor(){this.map=[]}add(t,n,r){lre(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const o of s)t.push(o);s=r.pop()}this.map.length=0}}function lre(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function ure(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function cre(){return{flow:{null:{name:"table",tokenize:fre,resolveAll:dre}}}}function fre(e,t,n){const r=this;let s=0,o=0,l;return u;function u(j){let K=r.events.length-1;for(;K>-1;){const te=r.events[K][1].type;if(te==="lineEnding"||te==="linePrefix")K--;else break}const Y=K>-1?r.events[K][1].type:null,J=Y==="tableHead"||Y==="tableRow"?O:d;return J===O&&r.parser.lazy[r.now().line]?n(j):J(j)}function d(j){return e.enter("tableHead"),e.enter("tableRow"),f(j)}function f(j){return j===124||(l=!0,o+=1),m(j)}function m(j){return j===null?n(j):ze(j)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),y):n(j):ut(j)?bt(e,m,"whitespace")(j):(o+=1,l&&(l=!1,s+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),l=!0,m):(e.enter("data"),p(j)))}function p(j){return j===null||j===124||jt(j)?(e.exit("data"),m(j)):(e.consume(j),j===92?g:p)}function g(j){return j===92||j===124?(e.consume(j),p):p(j)}function y(j){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(j):(e.enter("tableDelimiterRow"),l=!1,ut(j)?bt(e,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):E(j))}function E(j){return j===45||j===58?A(j):j===124?(l=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),S):M(j)}function S(j){return ut(j)?bt(e,A,"whitespace")(j):A(j)}function A(j){return j===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),w):j===45?(o+=1,w(j)):j===null||ze(j)?R(j):M(j)}function w(j){return j===45?(e.enter("tableDelimiterFiller"),_(j)):M(j)}function _(j){return j===45?(e.consume(j),_):j===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(j))}function k(j){return ut(j)?bt(e,R,"whitespace")(j):R(j)}function R(j){return j===124?E(j):j===null||ze(j)?!l||s!==o?M(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):M(j)}function M(j){return n(j)}function O(j){return e.enter("tableRow"),D(j)}function D(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),D):j===null||ze(j)?(e.exit("tableRow"),t(j)):ut(j)?bt(e,D,"whitespace")(j):(e.enter("data"),P(j))}function P(j){return j===null||j===124||jt(j)?(e.exit("data"),D(j)):(e.consume(j),j===92?z:P)}function z(j){return j===92||j===124?(e.consume(j),P):P(j)}}function dre(e,t){let n=-1,r=!0,s=0,o=[0,0,0,0],l=[0,0,0,0],u=!1,d=0,f,m,p;const g=new ore;for(;++n<e.length;){const y=e[n],E=y[1];y[0]==="enter"?E.type==="tableHead"?(u=!1,d!==0&&(X_(g,t,d,f,m),m=void 0,d=0),f={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},g.add(n,0,[["enter",f,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,p=void 0,o=[0,0,0,0],l=[0,n+1,0,0],u&&(u=!1,m={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},g.add(n,0,[["enter",m,t]])),s=E.type==="tableDelimiterRow"?2:m?3:1):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],p=Dh(g,t,o,s,void 0,p),o=[0,0,0,0]),l[2]=n)):E.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],p=Dh(g,t,o,s,void 0,p)),o=l,l=[o[1],n,0,0])):E.type==="tableHead"?(u=!0,d=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(d=n,o[1]!==0?(l[0]=l[1],p=Dh(g,t,o,s,n,p)):l[1]!==0&&(p=Dh(g,t,l,s,n,p)),s=0):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(l[3]=n)}for(d!==0&&X_(g,t,d,f,m),g.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=ure(t.events,n))}return e}function Dh(e,t,n,r,s,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(o.end=Object.assign({},Ol(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const d=Ol(t.events,n[1]);if(o={type:l,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const f=Ol(t.events,n[2]),m=Ol(t.events,n[3]),p={type:u,start:Object.assign({},f),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const g=t.events[n[2]],y=t.events[n[3]];if(g[1].end=Object.assign({},y[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,S=n[3]-n[2]-1;e.add(E,S,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return s!==void 0&&(o.end=Object.assign({},Ol(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function X_(e,t,n,r,s){const o=[],l=Ol(t.events,n);s&&(s.end=Object.assign({},l),o.push(["exit",s,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Ol(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const hre={name:"tasklistCheck",tokenize:pre};function mre(){return{text:{91:hre}}}function pre(e,t,n){const r=this;return s;function s(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),o)}function o(d){return jt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),l):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),l):n(d)}function l(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(d)}function u(d){return ze(d)?t(d):ut(d)?e.check({tokenize:gre},t,n)(d):n(d)}}function gre(e,t,n){return bt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function bre(e){return RM([_te(),Zne(),are(e),cre(),mre()])}const yre={};function xre(e){const t=this,n=e||yre,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(bre(n)),o.push(Ete()),l.push(Tte(n))}var vre=Object.defineProperty,Ere=Object.defineProperties,Tre=Object.getOwnPropertyDescriptors,K_=Object.getOwnPropertySymbols,Sre=Object.prototype.hasOwnProperty,Cre=Object.prototype.propertyIsEnumerable,Q_=(e,t,n)=>t in e?vre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,YM=(e,t)=>{for(var n in t||(t={}))Sre.call(t,n)&&Q_(e,n,t[n]);if(K_)for(var n of K_(t))Cre.call(t,n)&&Q_(e,n,t[n]);return e},GM=(e,t)=>Ere(e,Tre(t)),wre=/(\*\*)([^*]*\*?)$/,Are=/(__)([^_]*?)$/,_re=/(\*\*\*)([^*]*?)$/,kre=/(\*)([^*]*?)$/,Nre=/(_)([^_]*?)$/,Rre=/(`)([^`]*?)$/,Ore=/(~~)([^~]*?)$/,Io=/^[\s_~*`]*$/,XM=/^[\s]*[-*+][\s]+$/,Dre=/[\p{L}\p{N}_]/u,Mre=/^```[^`\n]*```?$/,Ire=/^\*{4,}$/,Lre=/(__)([^_]+)_$/,Pre=/(~~)([^~]+)~$/,jre=/__/g,W_=/~~/g,Sa=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:Dre.test(e)},uu=(e,t)=>{let n=!1;for(let r=0;r<t;r+=1)e[r]==="`"&&e[r+1]==="`"&&e[r+2]==="`"&&(n=!n,r+=2);return n},Bre=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},KM=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},vp=(e,t)=>{let n=!1,r=!1;for(let s=0;s<e.length&&s<t;s+=1){if(e[s]==="\\"&&e[s+1]==="$"){s+=1;continue}e[s]==="$"&&(e[s+1]==="$"?(r=!r,s+=1,n=!1):r||(n=!n))}return n||r},Ure=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
391
+ `)return!1}return!1},QM=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?Ure(e,t):!1;if(e[n]===`
392
+ `)return!1}return!1},Fv=(e,t,n)=>{let r=0;for(let d=t-1;d>=0;d-=1)if(e[d]===`
393
+ `){r=d+1;break}let s=e.length;for(let d=t;d<e.length;d+=1)if(e[d]===`
394
+ `){s=d;break}let o=e.substring(r,s),l=0,u=!1;for(let d of o)if(d===n)l+=1;else if(d!==" "&&d!==" "){u=!0;break}return l>=3&&!u},Fre=(e,t,n)=>{if(n!==" "&&n!==" ")return!1;let r=0;for(let s=t-1;s>=0;s-=1)if(e[s]===`
395
+ `){r=s+1;break}for(let s=r;s<t;s+=1)if(e[s]!==" "&&e[s]!==" ")return!1;return!0},Hre=(e,t,n,r)=>n==="\\"||e.includes("$")&&vp(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&Sa(n)&&Sa(r)||Fre(e,t,r)),WM=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="*")continue;let s=r>0?e[r-1]:"",o=r<n-1?e[r+1]:"";Hre(e,r,s,o)||(t+=1)}return t},zre=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&vp(e,t)||QM(e,t)||n==="_"||r==="_"||n&&r&&Sa(n)&&Sa(r)),Vre=e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if(e[r]!=="_")continue;let s=r>0?e[r-1]:"",o=r<n-1?e[r+1]:"";zre(e,r,s,o)||(t+=1)}return t},qre=e=>{let t=0,n=0;for(let r=0;r<e.length;r+=1)e[r]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0);return n>=3&&(t+=Math.floor(n/3)),t},$re=(e,t,n)=>{if(!t||Io.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
396
+ `),s=r===-1?0:r+1,o=e.substring(s,n);return XM.test(o)&&t.includes(`
397
+ `)?!0:Fv(e,n,"*")},Yre=e=>{let t=e.match(wre);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return uu(e,r)||$re(e,n,r)?e:(e.match(/\*\*/g)||[]).length%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},Gre=(e,t,n)=>{if(!t||Io.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
398
+ `),s=r===-1?0:r+1,o=e.substring(s,n);return XM.test(o)&&t.includes(`
399
+ `)?!0:Fv(e,n,"_")},Xre=e=>{let t=e.match(Are);if(!t){let s=e.match(Lre);if(s){let o=e.lastIndexOf(s[1]);if(!uu(e,o)&&(e.match(jre)||[]).length%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return uu(e,r)||Gre(e,n,r)?e:(e.match(/__/g)||[]).length%2===1?`${e}__`:e},Kre=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="*"&&e[t-1]!=="*"&&e[t+1]!=="*"&&e[t-1]!=="\\"&&!vp(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&Sa(n)&&Sa(r))continue;return t}return-1},Qre=e=>{if(!e.match(kre))return e;let t=Kre(e);if(t===-1||uu(e,t))return e;let n=e.substring(t+1);return!n||Io.test(n)?e:WM(e)%2===1?`${e}*`:e},ZM=e=>{for(let t=0;t<e.length;t+=1)if(e[t]==="_"&&e[t-1]!=="_"&&e[t+1]!=="_"&&e[t-1]!=="\\"&&!vp(e,t)&&!QM(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&Sa(n)&&Sa(r))continue;return t}return-1},Wre=e=>{let t=e.length;for(;t>0&&e[t-1]===`
400
+ `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},Zre=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if((t.match(/\*\*/g)||[]).length%2!==1)return null;let n=t.indexOf("**"),r=ZM(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},Jre=e=>{if(!e.match(Nre))return e;let t=ZM(e);if(t===-1||uu(e,t))return e;let n=e.substring(t+1);if(!n||Io.test(n))return e;if(Vre(e)%2===1){let r=Zre(e);return r!==null?r:Wre(e)}return e},eie=e=>{let t=(e.match(/\*\*/g)||[]).length,n=WM(e);return t%2===0&&n%2===0},tie=(e,t,n)=>!t||Io.test(t)||uu(e,n)?!0:Fv(e,n,"*"),nie=e=>{if(Ire.test(e))return e;let t=e.match(_re);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return tie(e,n,r)?e:qre(e)%2===1?eie(e)?e:`${e}***`:e},Rm=(e,t)=>{let n=!1,r=!1;for(let s=0;s<t;s+=1){if(e.substring(s,s+3)==="```"){r=!r,s+=2;continue}!r&&e[s]==="`"&&(n=!n)}return n||r},rie=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",s=t>1&&e.substring(t-2,t+1)==="```";return n||r||s},iie=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!rie(e,n)&&(t+=1);return t},sie=e=>!e.match(Mre)||e.includes(`
401
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,aie=e=>(e.match(/```/g)||[]).length%2===1,oie=e=>{let t=sie(e);if(t!==null)return t;let n=e.match(Rre);if(n&&!aie(e)){let r=n[2];if(!r||Io.test(r))return e;if(iie(e)%2===1)return`${e}\``}return e},lie=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",uie=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!lie(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},cie=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
402
+ `,t)!==-1&&!e.endsWith(`
403
+ `)?`${e}
404
+ $$`:`${e}$$`},fie=e=>uie(e)%2===0?e:cie(e),die=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=Bre(e,t);if(r===-1||Rm(e,r))return null;let s=r>0&&e[r-1]==="!",o=s?r-1:r,l=e.substring(0,o);if(s)return l;let u=e.substring(r+1,t);return n==="text-only"?`${l}${u}`:`${l}[${u}](streamdown:incomplete-link)`},Z_=(e,t)=>{for(let n=0;n<=t;n++)if(e[n]==="["&&!Rm(e,n)){if(n>0&&e[n-1]==="!")continue;let r=KM(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let s=e.indexOf(")",r+2);s!==-1&&(n=s)}}return-1},hie=(e,t,n)=>{let r=t>0&&e[t-1]==="!",s=r?t-1:t,o=e.substring(t+1);if(!o.includes("]")){let l=e.substring(0,s);if(r)return l;if(n==="text-only"){let u=Z_(e,t);return u!==-1?e.substring(0,u)+e.substring(u+1):`${l}${o}`}return`${e}](streamdown:incomplete-link)`}if(KM(e,t)===-1){let l=e.substring(0,s);if(r)return l;if(n==="text-only"){let u=Z_(e,t);if(u!==-1)return e.substring(0,u)+e.substring(u+1);let d=e.substring(t+1);return`${l}${d}`}return`${e}](streamdown:incomplete-link)`}return null},JM=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!Rm(e,n)){let r=die(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!Rm(e,r)){let s=hie(e,r,t);if(s!==null)return s}return e},mie=/^-{1,2}$/,pie=/^[\s]*-{1,2}[\s]+$/,gie=/^={1,2}$/,bie=/^[\s]*={1,2}[\s]+$/,yie=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
405
+ `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),s=n.trim();if(mie.test(s)&&!n.match(pie)){let o=r.split(`
406
+ `).at(-1);if(o&&o.trim().length>0)return`${e}​`}if(gie.test(s)&&!n.match(bie)){let o=r.split(`
407
+ `).at(-1);if(o&&o.trim().length>0)return`${e}​`}return e},xie=e=>{let t=e.match(Ore);if(t){let n=t[2];if(!n||Io.test(n))return e;if((e.match(W_)||[]).length%2===1)return`${e}~~`}else if(e.match(Pre)&&(e.match(W_)||[]).length%2===1)return`${e}~`;return e},sb=e=>e!==!1,Nr={SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},vie=[{handler:{name:"setextHeadings",handle:yie,priority:Nr.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:JM,priority:Nr.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:nie,priority:Nr.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:Yre,priority:Nr.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:Xre,priority:Nr.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:Qre,priority:Nr.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:Jre,priority:Nr.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:oie,priority:Nr.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:xie,priority:Nr.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:fie,priority:Nr.KATEX},optionKey:"katex"}],Eie=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return vie.filter(({handler:r,optionKey:s})=>r.name==="links"?sb(e==null?void 0:e.links)||sb(e==null?void 0:e.images):sb(e==null?void 0:e[s])).map(({handler:r,earlyReturn:s})=>r.name==="links"?{handler:GM(YM({},r),{handle:o=>JM(o,n)}),earlyReturn:n==="protocol"?s:void 0}:{handler:r,earlyReturn:s})},Tie=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,s=Eie(t),o=((n=t==null?void 0:t.handlers)!=null?n:[]).map(u=>{var d;return{handler:GM(YM({},u),{priority:(d=u.priority)!=null?d:Nr.DEFAULT}),earlyReturn:void 0}}),l=[...s,...o].sort((u,d)=>{var f,m;return((f=u.handler.priority)!=null?f:Nr.DEFAULT)-((m=d.handler.priority)!=null?m:Nr.DEFAULT)});for(let{handler:u,earlyReturn:d}of l)if(r=u.handle(r),d!=null&&d(r))return r;return r},Sie=Tie;const Cie=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wie=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Aie={};function J_(e,t){return(Aie.jsx?wie:Cie).test(e)}const _ie=/[ \t\n\f\r]/g;function kie(e){return typeof e=="object"?e.type==="text"?e3(e.value):!1:e3(e)}function e3(e){return e.replace(_ie,"")===""}var Nl={},ab,t3;function Nie(){if(t3)return ab;t3=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,u=/^\s+|\s+$/g,d=`
408
+ `,f="/",m="*",p="",g="comment",y="declaration";function E(A,w){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];w=w||{};var _=1,k=1;function R(te){var W=te.match(t);W&&(_+=W.length);var I=te.lastIndexOf(d);k=~I?te.length-I:k+te.length}function M(){var te={line:_,column:k};return function(W){return W.position=new O(te),z(),W}}function O(te){this.start=te,this.end={line:_,column:k},this.source=w.source}O.prototype.content=A;function D(te){var W=new Error(w.source+":"+_+":"+k+": "+te);if(W.reason=te,W.filename=w.source,W.line=_,W.column=k,W.source=A,!w.silent)throw W}function P(te){var W=te.exec(A);if(W){var I=W[0];return R(I),A=A.slice(I.length),W}}function z(){P(n)}function j(te){var W;for(te=te||[];W=K();)W!==!1&&te.push(W);return te}function K(){var te=M();if(!(f!=A.charAt(0)||m!=A.charAt(1))){for(var W=2;p!=A.charAt(W)&&(m!=A.charAt(W)||f!=A.charAt(W+1));)++W;if(W+=2,p===A.charAt(W-1))return D("End of comment missing");var I=A.slice(2,W-2);return k+=2,R(I),A=A.slice(W),k+=2,te({type:g,comment:I})}}function Y(){var te=M(),W=P(r);if(W){if(K(),!P(s))return D("property missing ':'");var I=P(o),H=te({type:y,property:S(W[0].replace(e,p)),value:I?S(I[0].replace(e,p)):p});return P(l),H}}function J(){var te=[];j(te);for(var W;W=Y();)W!==!1&&(te.push(W),j(te));return te}return z(),J()}function S(A){return A?A.replace(u,p):p}return ab=E,ab}var n3;function Rie(){if(n3)return Nl;n3=1;var e=Nl&&Nl.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.default=n;const t=e(Nie());function n(r,s){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),u=typeof s=="function";return l.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:m}=d;u?s(f,m,d):m&&(o=o||{},o[f]=m)}),o}return Nl}var _c={},r3;function Oie(){if(r3)return _c;r3=1,Object.defineProperty(_c,"__esModule",{value:!0}),_c.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(f){return!f||n.test(f)||e.test(f)},l=function(f,m){return m.toUpperCase()},u=function(f,m){return"".concat(m,"-")},d=function(f,m){return m===void 0&&(m={}),o(f)?f:(f=f.toLowerCase(),m.reactCompat?f=f.replace(s,u):f=f.replace(r,u),f.replace(t,l))};return _c.camelCase=d,_c}var kc,i3;function Die(){if(i3)return kc;i3=1;var e=kc&&kc.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(Rie()),n=Oie();function r(s,o){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(u,d){u&&d&&(l[(0,n.camelCase)(u,o)]=d)}),l}return r.default=r,kc=r,kc}var Mie=Die();const Iie=Ao(Mie);function Zc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?s3(e.position):"start"in e||"end"in e?s3(e):"line"in e||"column"in e?Ly(e):""}function Ly(e){return a3(e&&e.line)+":"+a3(e&&e.column)}function s3(e){return Ly(e&&e.start)+"-"+Ly(e&&e.end)}function a3(e){return e&&typeof e=="number"?e:1}class Kn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?s=t:!o.cause&&t&&(l=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?o.ruleId=r:(o.source=r.slice(0,d),o.ruleId=r.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const u=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=u?u.line:void 0,this.name=Zc(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Kn.prototype.file="";Kn.prototype.name="";Kn.prototype.reason="";Kn.prototype.message="";Kn.prototype.stack="";Kn.prototype.column=void 0;Kn.prototype.line=void 0;Kn.prototype.ancestors=void 0;Kn.prototype.cause=void 0;Kn.prototype.fatal=void 0;Kn.prototype.place=void 0;Kn.prototype.ruleId=void 0;Kn.prototype.source=void 0;const Hv={}.hasOwnProperty,Lie=new Map,Pie=/[A-Z]/g,jie=new Set(["table","tbody","thead","tfoot","tr"]),Bie=new Set(["td","th"]),e5="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Uie(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Gie(n,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");r=Yie(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?_a:Vf,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=t5(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function t5(e,t,n){if(t.type==="element")return Fie(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Hie(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Vie(e,t,n);if(t.type==="mdxjsEsm")return zie(e,t);if(t.type==="root")return qie(e,t,n);if(t.type==="text")return $ie(e,t)}function Fie(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=_a,e.schema=s),e.ancestors.push(t);const o=r5(e,t.tagName,!1),l=Xie(e,t);let u=Vv(e,t);return jie.has(t.tagName)&&(u=u.filter(function(d){return typeof d=="string"?!kie(d):!0})),n5(e,l,o,t),zv(l,u),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function Hie(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}xf(e,t.position)}function zie(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xf(e,t.position)}function Vie(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=_a,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:r5(e,t.name,!0),l=Kie(e,t),u=Vv(e,t);return n5(e,l,o,t),zv(l,u),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function qie(e,t,n){const r={};return zv(r,Vv(e,t)),e.create(t,e.Fragment,r,n)}function $ie(e,t){return t.value}function n5(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function zv(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Yie(e,t,n){return r;function r(s,o,l,u){const f=Array.isArray(l.children)?n:t;return u?f(o,l,u):f(o,l)}}function Gie(e,t){return n;function n(r,s,o,l){const u=Array.isArray(o.children),d=$i(r);return t(s,o,l,u,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function Xie(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Hv.call(t.properties,s)){const o=Qie(e,s,t.properties[s]);if(o){const[l,u]=o;e.tableCellAlignToStyle&&l==="align"&&typeof u=="string"&&Bie.has(t.tagName)?r=u:n[l]=u}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Kie(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const u=l.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else xf(e,t.position);else{const s=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,o=e.evaluater.evaluateExpression(u.expression)}else xf(e,t.position);else o=r.value===null?!0:r.value;n[s]=o}return n}function Vv(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:Lie;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const f=s.get(d)||0;l=d+"-"+f,s.set(d,f+1)}}const u=t5(e,o,l);u!==void 0&&n.push(u)}return n}function Qie(e,t,n){const r=dp(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?C4(n):w4(n)),r.property==="style"){let s=typeof n=="object"?n:Wie(e,String(n));return e.stylePropertyNameCase==="css"&&(s=Zie(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?hQ[r.property]||r.property:r.attribute,n]}}function Wie(e,t){try{return Iie(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new Kn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=e5+"#cannot-parse-style-attribute",s}}function r5(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let o=-1,l;for(;++o<s.length;){const u=J_(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};l=l?{type:"MemberExpression",object:l,property:u,computed:!!(o&&u.type==="Literal"),optional:!1}:u}r=l}else r=J_(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Hv.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);xf(e)}function xf(e,t){const n=new Kn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=e5+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Zie(e){const t={};let n;for(n in e)Hv.call(e,n)&&(t[Jie(n)]=e[n]);return t}function Jie(e){let t=e.replace(Pie,ese);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ese(e){return"-"+e.toLowerCase()}const tse={tokenize:nse};function nse(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),bt(e,t,"linePrefix")}function s(u){return e.enter("paragraph"),o(u)}function o(u){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,l(u)}function l(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return ze(u)?(e.consume(u),e.exit("chunkText"),o):(e.consume(u),l)}}const rse={tokenize:ise},o3={tokenize:sse};function ise(e){const t=this,n=[];let r=0,s,o,l;return u;function u(k){if(r<n.length){const R=n[r];return t.containerState=R[1],e.attempt(R[0].continuation,d,f)(k)}return f(k)}function d(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&_();const R=t.events.length;let M=R,O;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){O=t.events[M][1].end;break}w(r);let D=R;for(;D<t.events.length;)t.events[D][1].end={...O},D++;return Dr(t.events,M+1,0,t.events.slice(R)),t.events.length=D,f(k)}return u(k)}function f(k){if(r===n.length){if(!s)return g(k);if(s.currentConstruct&&s.currentConstruct.concrete)return E(k);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(o3,m,p)(k)}function m(k){return s&&_(),w(r),g(k)}function p(k){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,E(k)}function g(k){return t.containerState={},e.attempt(o3,y,E)(k)}function y(k){return r++,n.push([t.currentConstruct,t.containerState]),g(k)}function E(k){if(k===null){s&&_(),w(0),e.consume(k);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),S(k)}function S(k){if(k===null){A(e.exit("chunkFlow"),!0),w(0),e.consume(k);return}return ze(k)?(e.consume(k),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(k),S)}function A(k,R){const M=t.sliceStream(k);if(R&&M.push(null),k.previous=o,o&&(o.next=k),o=k,s.defineSkip(k.start),s.write(M),t.parser.lazy[k.start.line]){let O=s.events.length;for(;O--;)if(s.events[O][1].start.offset<l&&(!s.events[O][1].end||s.events[O][1].end.offset>l))return;const D=t.events.length;let P=D,z,j;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(z){j=t.events[P][1].end;break}z=!0}for(w(r),O=D;O<t.events.length;)t.events[O][1].end={...j},O++;Dr(t.events,P+1,0,t.events.slice(D)),t.events.length=O}}function w(k){let R=n.length;for(;R-- >k;){const M=n[R];t.containerState=M[1],M[0].exit.call(t,e)}n.length=k}function _(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function sse(e,t,n){return bt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const ase={tokenize:ose};function ose(e){const t=this,n=e.attempt(Gf,r,e.attempt(this.parser.constructs.flowInitial,s,bt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(rne,s)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const lse={resolveAll:s5()},use=i5("string"),cse=i5("text");function i5(e){return{resolveAll:s5(e==="text"?fse:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],o=n.attempt(s,l,u);return l;function l(m){return f(m)?o(m):u(m)}function u(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return f(m)?(n.exit("data"),o(m)):(n.consume(m),d)}function f(m){if(m===null)return!0;const p=s[m];let g=-1;if(p)for(;++g<p.length;){const y=p[g];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function s5(e){return t;function t(n,r){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(n,r):n}}function fse(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let o=s.length,l=-1,u=0,d;for(;o--;){const f=s[o];if(typeof f=="string"){for(l=f.length;f.charCodeAt(l-1)===32;)u++,l--;if(l)break;l=-1}else if(f===-2)d=!0,u++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const f={type:n===e.length||d||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const dse={42:gr,43:gr,45:gr,48:gr,49:gr,50:gr,51:gr,52:gr,53:gr,54:gr,55:gr,56:gr,57:gr,62:UM},hse={91:lne},mse={[-2]:rb,[-1]:rb,32:rb},pse={35:mne,42:em,45:[G_,em],60:yne,61:G_,95:em,96:$_,126:$_},gse={38:HM,92:FM},bse={[-5]:ib,[-4]:ib,[-3]:ib,33:Pne,38:HM,42:Iy,60:[Bte,wne],91:Bne,92:[dne,FM],93:Uv,95:Iy,96:Wte},yse={null:[Iy,lse]},xse={null:[42,95]},vse={null:[]},Ese=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:xse,contentInitial:hse,disable:vse,document:dse,flow:pse,flowInitial:mse,insideSpan:yse,string:gse,text:bse},Symbol.toStringTag,{value:"Module"}));function Tse(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},o=[];let l=[],u=[];const d={attempt:D(M),check:D(O),consume:_,enter:k,exit:R,interrupt:D(O,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,events:[],now:E,parser:e,previous:null,sliceSerialize:g,sliceStream:y,write:p};let m=t.tokenize.call(f,d);return t.resolveAll&&o.push(t),f;function p(K){return l=Gr(l,K),A(),l[l.length-1]!==null?[]:(P(t,0),f.events=xp(o,f.events,f),f.events)}function g(K,Y){return Cse(y(K),Y)}function y(K){return Sse(l,K)}function E(){const{_bufferIndex:K,_index:Y,line:J,column:te,offset:W}=r;return{_bufferIndex:K,_index:Y,line:J,column:te,offset:W}}function S(K){s[K.line]=K.column,j()}function A(){let K;for(;r._index<l.length;){const Y=l[r._index];if(typeof Y=="string")for(K=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===K&&r._bufferIndex<Y.length;)w(Y.charCodeAt(r._bufferIndex));else w(Y)}}function w(K){m=m(K)}function _(K){ze(K)?(r.line++,r.column=1,r.offset+=K===-3?2:1,j()):K!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=K}function k(K,Y){const J=Y||{};return J.type=K,J.start=E(),f.events.push(["enter",J,f]),u.push(J),J}function R(K){const Y=u.pop();return Y.end=E(),f.events.push(["exit",Y,f]),Y}function M(K,Y){P(K,Y.from)}function O(K,Y){Y.restore()}function D(K,Y){return J;function J(te,W,I){let H,$,ne,U;return Array.isArray(te)?ie(te):"tokenize"in te?ie([te]):q(te);function q(Ee){return he;function he(we){const Se=we!==null&&Ee[we],Pe=we!==null&&Ee.null,_e=[...Array.isArray(Se)?Se:Se?[Se]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return ie(_e)(we)}}function ie(Ee){return H=Ee,$=0,Ee.length===0?I:B(Ee[$])}function B(Ee){return he;function he(we){return U=z(),ne=Ee,Ee.partial||(f.currentConstruct=Ee),Ee.name&&f.parser.constructs.disable.null.includes(Ee.name)?xe():Ee.tokenize.call(Y?Object.assign(Object.create(f),Y):f,d,de,xe)(we)}}function de(Ee){return K(ne,U),W}function xe(Ee){return U.restore(),++$<H.length?B(H[$]):I}}}function P(K,Y){K.resolveAll&&!o.includes(K)&&o.push(K),K.resolve&&Dr(f.events,Y,f.events.length-Y,K.resolve(f.events.slice(Y),f)),K.resolveTo&&(f.events=K.resolveTo(f.events,f))}function z(){const K=E(),Y=f.previous,J=f.currentConstruct,te=f.events.length,W=Array.from(u);return{from:te,restore:I};function I(){r=K,f.previous=Y,f.currentConstruct=J,f.events.length=te,u=W,j()}}function j(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function Sse(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let l;if(n===s)l=[e[n].slice(r,o)];else{if(l=e.slice(n,s),r>-1){const u=l[0];typeof u=="string"?l[0]=u.slice(r):l.shift()}o>0&&l.push(e[s].slice(0,o))}return l}function Cse(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
409
+ `;break}case-3:{l=`\r
410
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&s)continue;l=" ";break}default:l=String.fromCharCode(o)}s=o===-2,r.push(l)}return r.join("")}function wse(e){const r={constructs:RM([Ese,...(e||{}).extensions||[]]),content:s(tse),defined:[],document:s(rse),flow:s(ase),lazy:{},string:s(use),text:s(cse)};return r;function s(o){return l;function l(u){return Tse(r,o,u)}}}function Ase(e){for(;!zM(e););return e}const l3=/[\0\t\n\r]/g;function _se(){let e=1,t="",n=!0,r;return s;function s(o,l,u){const d=[];let f,m,p,g,y;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),p=0,t="",n&&(o.charCodeAt(0)===65279&&p++,n=void 0);p<o.length;){if(l3.lastIndex=p,f=l3.exec(o),g=f&&f.index!==void 0?f.index:o.length,y=o.charCodeAt(g),!f){t=o.slice(p);break}if(y===10&&p===g&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),p<g&&(d.push(o.slice(p,g)),e+=g-p),y){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}p=g+1}return u&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const a5={}.hasOwnProperty;function kse(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Nse(n)(Ase(wse(n).document().write(_se()(e,t,!0))))}function Nse(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Fn),autolinkProtocol:z,autolinkEmail:z,atxHeading:o(nn),blockQuote:o(Pe),characterEscape:z,characterReference:z,codeFenced:o(_e),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(_e,l),codeText:o(Oe,l),codeTextData:z,data:z,codeFlowValue:z,definition:o(wt),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Re),hardBreakEscape:o(Lt),hardBreakTrailing:o(Lt),htmlFlow:o(rn,l),htmlFlowData:z,htmlText:o(rn,l),htmlTextData:z,image:o(ei),label:l,link:o(Fn),listItem:o(Ti),listItemValue:g,listOrdered:o(Cn,p),listUnordered:o(Cn),paragraph:o(ti),reference:B,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(nn),strong:o(ni),thematicBreak:o(xt)},exit:{atxHeading:d(),atxHeadingSequence:M,autolink:d(),autolinkEmail:Se,autolinkProtocol:we,blockQuote:d(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:xe,characterReferenceMarkerNumeric:xe,characterReferenceValue:Ee,characterReference:he,codeFenced:d(A),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:E,codeFlowValue:j,codeIndented:d(w),codeText:d(W),codeTextData:j,data:j,definition:d(),definitionDestinationString:R,definitionLabelString:_,definitionTitleString:k,emphasis:d(),hardBreakEscape:d(Y),hardBreakTrailing:d(Y),htmlFlow:d(J),htmlFlowData:j,htmlText:d(te),htmlTextData:j,image:d(H),label:ne,labelText:$,lineEnding:K,link:d(I),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:de,resourceDestinationString:U,resourceTitleString:q,resource:ie,setextHeading:d(P),setextHeadingLineSequence:D,setextHeadingText:O,strong:d(),thematicBreak:d()}};o5(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ce){let Te={type:"root",children:[]};const Ue={stack:[Te],tokenStack:[],config:t,enter:u,exit:f,buffer:l,resume:m,data:n},Ze=[];let ht=-1;for(;++ht<ce.length;)if(ce[ht][1].type==="listOrdered"||ce[ht][1].type==="listUnordered")if(ce[ht][0]==="enter")Ze.push(ht);else{const Dn=Ze.pop();ht=s(ce,Dn,ht)}for(ht=-1;++ht<ce.length;){const Dn=t[ce[ht][0]];a5.call(Dn,ce[ht][1].type)&&Dn[ce[ht][1].type].call(Object.assign({sliceSerialize:ce[ht][2].sliceSerialize},Ue),ce[ht][1])}if(Ue.tokenStack.length>0){const Dn=Ue.tokenStack[Ue.tokenStack.length-1];(Dn[1]||u3).call(Ue,void 0,Dn[0])}for(Te.position={start:Qs(ce.length>0?ce[0][1].start:{line:1,column:1,offset:0}),end:Qs(ce.length>0?ce[ce.length-2][1].end:{line:1,column:1,offset:0})},ht=-1;++ht<t.transforms.length;)Te=t.transforms[ht](Te)||Te;return Te}function s(ce,Te,Ue){let Ze=Te-1,ht=-1,Dn=!1,Mn,un,qt,wn;for(;++Ze<=Ue;){const St=ce[Ze];switch(St[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{St[0]==="enter"?ht++:ht--,wn=void 0;break}case"lineEndingBlank":{St[0]==="enter"&&(Mn&&!wn&&!ht&&!qt&&(qt=Ze),wn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:wn=void 0}if(!ht&&St[0]==="enter"&&St[1].type==="listItemPrefix"||ht===-1&&St[0]==="exit"&&(St[1].type==="listUnordered"||St[1].type==="listOrdered")){if(Mn){let ye=Ze;for(un=void 0;ye--;){const He=ce[ye];if(He[1].type==="lineEnding"||He[1].type==="lineEndingBlank"){if(He[0]==="exit")continue;un&&(ce[un][1].type="lineEndingBlank",Dn=!0),He[1].type="lineEnding",un=ye}else if(!(He[1].type==="linePrefix"||He[1].type==="blockQuotePrefix"||He[1].type==="blockQuotePrefixWhitespace"||He[1].type==="blockQuoteMarker"||He[1].type==="listItemIndent"))break}qt&&(!un||qt<un)&&(Mn._spread=!0),Mn.end=Object.assign({},un?ce[un][1].start:St[1].end),ce.splice(un||Ze,0,["exit",Mn,St[2]]),Ze++,Ue++}if(St[1].type==="listItemPrefix"){const ye={type:"listItem",_spread:!1,start:Object.assign({},St[1].start),end:void 0};Mn=ye,ce.splice(Ze,0,["enter",ye,St[2]]),Ze++,Ue++,qt=void 0,wn=!0}}}return ce[Te][1]._spread=Dn,Ue}function o(ce,Te){return Ue;function Ue(Ze){u.call(this,ce(Ze),Ze),Te&&Te.call(this,Ze)}}function l(){this.stack.push({type:"fragment",children:[]})}function u(ce,Te,Ue){this.stack[this.stack.length-1].children.push(ce),this.stack.push(ce),this.tokenStack.push([Te,Ue||void 0]),ce.position={start:Qs(Te.start),end:void 0}}function d(ce){return Te;function Te(Ue){ce&&ce.call(this,Ue),f.call(this,Ue)}}function f(ce,Te){const Ue=this.stack.pop(),Ze=this.tokenStack.pop();if(Ze)Ze[0].type!==ce.type&&(Te?Te.call(this,ce,Ze[0]):(Ze[1]||u3).call(this,ce,Ze[0]));else throw new Error("Cannot close `"+ce.type+"` ("+Zc({start:ce.start,end:ce.end})+"): it’s not open");Ue.position.end=Qs(ce.end)}function m(){return Lv(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function g(ce){if(this.data.expectingFirstListItemValue){const Te=this.stack[this.stack.length-2];Te.start=Number.parseInt(this.sliceSerialize(ce),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ce=this.resume(),Te=this.stack[this.stack.length-1];Te.lang=ce}function E(){const ce=this.resume(),Te=this.stack[this.stack.length-1];Te.meta=ce}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const ce=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ce.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const ce=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ce.replace(/(\r?\n|\r)$/g,"")}function _(ce){const Te=this.resume(),Ue=this.stack[this.stack.length-1];Ue.label=Te,Ue.identifier=pi(this.sliceSerialize(ce)).toLowerCase()}function k(){const ce=this.resume(),Te=this.stack[this.stack.length-1];Te.title=ce}function R(){const ce=this.resume(),Te=this.stack[this.stack.length-1];Te.url=ce}function M(ce){const Te=this.stack[this.stack.length-1];if(!Te.depth){const Ue=this.sliceSerialize(ce).length;Te.depth=Ue}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function D(ce){const Te=this.stack[this.stack.length-1];Te.depth=this.sliceSerialize(ce).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function z(ce){const Ue=this.stack[this.stack.length-1].children;let Ze=Ue[Ue.length-1];(!Ze||Ze.type!=="text")&&(Ze=rt(),Ze.position={start:Qs(ce.start),end:void 0},Ue.push(Ze)),this.stack.push(Ze)}function j(ce){const Te=this.stack.pop();Te.value+=this.sliceSerialize(ce),Te.position.end=Qs(ce.end)}function K(ce){const Te=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ue=Te.children[Te.children.length-1];Ue.position.end=Qs(ce.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Te.type)&&(z.call(this,ce),j.call(this,ce))}function Y(){this.data.atHardBreak=!0}function J(){const ce=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ce}function te(){const ce=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ce}function W(){const ce=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ce}function I(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const Te=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=Te,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function H(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const Te=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=Te,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function $(ce){const Te=this.sliceSerialize(ce),Ue=this.stack[this.stack.length-2];Ue.label=lte(Te),Ue.identifier=pi(Te).toLowerCase()}function ne(){const ce=this.stack[this.stack.length-1],Te=this.resume(),Ue=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ue.type==="link"){const Ze=ce.children;Ue.children=Ze}else Ue.alt=Te}function U(){const ce=this.resume(),Te=this.stack[this.stack.length-1];Te.url=ce}function q(){const ce=this.resume(),Te=this.stack[this.stack.length-1];Te.title=ce}function ie(){this.data.inReference=void 0}function B(){this.data.referenceType="collapsed"}function de(ce){const Te=this.resume(),Ue=this.stack[this.stack.length-1];Ue.label=Te,Ue.identifier=pi(this.sliceSerialize(ce)).toLowerCase(),this.data.referenceType="full"}function xe(ce){this.data.characterReferenceType=ce.type}function Ee(ce){const Te=this.sliceSerialize(ce),Ue=this.data.characterReferenceType;let Ze;Ue?(Ze=NM(Te,Ue==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ze=jv(Te);const ht=this.stack[this.stack.length-1];ht.value+=Ze}function he(ce){const Te=this.stack.pop();Te.position.end=Qs(ce.end)}function we(ce){j.call(this,ce);const Te=this.stack[this.stack.length-1];Te.url=this.sliceSerialize(ce)}function Se(ce){j.call(this,ce);const Te=this.stack[this.stack.length-1];Te.url="mailto:"+this.sliceSerialize(ce)}function Pe(){return{type:"blockquote",children:[]}}function _e(){return{type:"code",lang:null,meta:null,value:""}}function Oe(){return{type:"inlineCode",value:""}}function wt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Re(){return{type:"emphasis",children:[]}}function nn(){return{type:"heading",depth:0,children:[]}}function Lt(){return{type:"break"}}function rn(){return{type:"html",value:""}}function ei(){return{type:"image",title:null,url:"",alt:null}}function Fn(){return{type:"link",title:null,url:"",children:[]}}function Cn(ce){return{type:"list",ordered:ce.type==="listOrdered",start:null,spread:ce._spread,children:[]}}function Ti(ce){return{type:"listItem",spread:ce._spread,checked:null,children:[]}}function ti(){return{type:"paragraph",children:[]}}function ni(){return{type:"strong",children:[]}}function rt(){return{type:"text",value:""}}function xt(){return{type:"thematicBreak"}}}function Qs(e){return{line:e.line,column:e.column,offset:e.offset}}function o5(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?o5(e,r):Rse(e,r)}}function Rse(e,t){let n;for(n in t)if(a5.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function u3(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Zc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Zc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Zc({start:t.start,end:t.end})+") is still open")}function Ose(e){const t=this;t.parser=n;function n(r){return kse(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Dse(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Mse(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
411
+ `}]}function Ise(e,t){const n=t.value?t.value+`
412
+ `:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Lse(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pse(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jse(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=wu(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,u+=1,e.footnoteCounts.set(r,u);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function Bse(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Use(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function l5(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const l=s[s.length-1];return l&&l.type==="text"?l.value+=r:s.push({type:"text",value:r}),s}function Fse(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return l5(e,t);const s={src:wu(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,o),e.applyData(t,o)}function Hse(e,t){const n={src:wu(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function zse(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Vse(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return l5(e,t);const s={href:wu(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function qse(e,t){const n={href:wu(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function $se(e,t,n){const r=e.all(t),s=n?Yse(n):u5(t),o={},l=[];if(typeof t.checked=="boolean"){const m=r[0];let p;m&&m.type==="element"&&m.tagName==="p"?p=m:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const m=r[u];(s||u!==0||m.type!=="element"||m.tagName!=="p")&&l.push({type:"text",value:`
413
+ `}),m.type==="element"&&m.tagName==="p"&&!s?l.push(...m.children):l.push(m)}const d=r[r.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&l.push({type:"text",value:`
414
+ `});const f={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,f),e.applyData(t,f)}function Yse(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=u5(n[r])}return t}function u5(e){const t=e.spread;return t??e.children.length>1}function Gse(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const l=r[s];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function Xse(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Kse(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Qse(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Wse(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),s.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=$i(t.children[1]),d=bp(t.children[t.children.length-1]);u&&d&&(l.position={start:u,end:d}),s.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function Zse(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,u=l?l.length:t.children.length;let d=-1;const f=[];for(;++d<u;){const p=t.children[d],g={},y=l?l[d]:void 0;y&&(g.align=y);let E={type:"element",tagName:o,properties:g,children:[]};p&&(E.children=e.all(p),e.patch(p,E),E=e.applyData(p,E)),f.push(E)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,m),e.applyData(t,m)}function Jse(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const c3=9,f3=32;function eae(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const o=[];for(;r;)o.push(d3(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return o.push(d3(t.slice(s),s>0,!1)),o.join("")}function d3(e,t,n){let r=0,s=e.length;if(t){let o=e.codePointAt(r);for(;o===c3||o===f3;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(s-1);for(;o===c3||o===f3;)s--,o=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function tae(e,t){const n={type:"text",value:eae(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function nae(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const rae={blockquote:Dse,break:Mse,code:Ise,delete:Lse,emphasis:Pse,footnoteReference:jse,heading:Bse,html:Use,imageReference:Fse,image:Hse,inlineCode:zse,linkReference:Vse,link:qse,listItem:$se,list:Gse,paragraph:Xse,root:Kse,strong:Qse,table:Wse,tableCell:Jse,tableRow:Zse,text:tae,thematicBreak:nae,toml:Mh,yaml:Mh,definition:Mh,footnoteDefinition:Mh};function Mh(){}function iae(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function sae(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function aae(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||iae,r=e.options.footnoteBackLabel||sae,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const m=e.all(f),p=String(f.identifier).toUpperCase(),g=wu(p.toLowerCase());let y=0;const E=[],S=e.footnoteCounts.get(p);for(;S!==void 0&&++y<=S;){E.length>0&&E.push({type:"text",value:" "});let _=typeof n=="string"?n:n(d,y);typeof _=="string"&&(_={type:"text",value:_}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const A=m[m.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const _=A.children[A.children.length-1];_&&_.type==="text"?_.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...E)}else m.push(...E);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(m,!0)};e.patch(f,w),u.push(w)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...So(l),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
415
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
416
+ `}]}}const Py={}.hasOwnProperty,oae={};function lae(e,t){const n=t||oae,r=new Map,s=new Map,o=new Map,l={...rae,...n.handlers},u={all:f,applyData:cae,definitionById:r,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:l,one:d,options:n,patch:uae,wrap:dae};return au(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const p=m.type==="definition"?r:s,g=String(m.identifier).toUpperCase();p.has(g)||p.set(g,m)}}),u;function d(m,p){const g=m.type,y=u.handlers[g];if(Py.call(u.handlers,g)&&y)return y(u,m,p);if(u.options.passThrough&&u.options.passThrough.includes(g)){if("children"in m){const{children:S,...A}=m,w=So(A);return w.children=u.all(m),w}return So(m)}return(u.options.unknownHandler||fae)(u,m,p)}function f(m){const p=[];if("children"in m){const g=m.children;let y=-1;for(;++y<g.length;){const E=u.one(g[y],m);if(E){if(y&&g[y-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=h3(E.value)),!Array.isArray(E)&&E.type==="element")){const S=E.children[0];S&&S.type==="text"&&(S.value=h3(S.value))}Array.isArray(E)?p.push(...E):p.push(E)}}}return p}}function uae(e,t){e.position&&(t.position=sM(e))}function cae(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,So(o)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function fae(e,t){const n=t.data||{},r="value"in t&&!(Py.call(n,"hProperties")||Py.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function dae(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
417
+ `});++r<e.length;)r&&n.push({type:"text",value:`
418
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
419
+ `}),n}function h3(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function m3(e,t){const n=lae(e,t),r=n.one(e,void 0),s=aae(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
420
+ `},s),o}function hae(e,t){return e&&"run"in e?async function(n,r){const s=m3(n,{file:r,...t});await e.run(s,r)}:function(n,r){return m3(n,{file:r,...e||t})}}function p3(e){if(e)throw e}var ob,g3;function mae(){if(g3)return ob;g3=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},o=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var m=e.call(f,"constructor"),p=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!m&&!p)return!1;var g;for(g in f);return typeof g>"u"||e.call(f,g)},l=function(f,m){n&&m.name==="__proto__"?n(f,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):f[m.name]=m.newValue},u=function(f,m){if(m==="__proto__")if(e.call(f,m)){if(r)return r(f,m).value}else return;return f[m]};return ob=function d(){var f,m,p,g,y,E,S=arguments[0],A=1,w=arguments.length,_=!1;for(typeof S=="boolean"&&(_=S,S=arguments[1]||{},A=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});A<w;++A)if(f=arguments[A],f!=null)for(m in f)p=u(S,m),g=u(f,m),S!==g&&(_&&g&&(o(g)||(y=s(g)))?(y?(y=!1,E=p&&s(p)?p:[]):E=p&&o(p)?p:{},l(S,{name:m,newValue:d(_,E,g)})):typeof g<"u"&&l(S,{name:m,newValue:g}));return S},ob}var pae=mae();const lb=Ao(pae);function jy(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 gae(){const e=[],t={run:n,use:r};return t;function n(...s){let o=-1;const l=s.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);u(null,...s);function u(d,...f){const m=e[++o];let p=-1;if(d){l(d);return}for(;++p<s.length;)(f[p]===null||f[p]===void 0)&&(f[p]=s[p]);s=f,m?bae(m,u)(...f):l(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function bae(e,t){let n;return r;function r(...l){const u=e.length>l.length;let d;u&&l.push(s);try{d=e.apply(this,l)}catch(f){const m=f;if(u&&n)throw m;return s(m)}u||(d&&d.then&&typeof d.then=="function"?d.then(o,s):d instanceof Error?s(d):o(d))}function s(l,...u){n||(n=!0,t(l,...u))}function o(l){s(null,l)}}const Ni={basename:yae,dirname:xae,extname:vae,join:Eae,sep:"/"};function yae(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Xf(e);let n=0,r=-1,s=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else r<0&&(o=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,u=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else l<0&&(o=!0,l=s+1),u>-1&&(e.codePointAt(s)===t.codePointAt(u--)?u<0&&(r=s):(u=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function xae(e){if(Xf(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function vae(e){Xf(e);let t=e.length,n=-1,r=0,s=-1,o=0,l;for(;t--;){const u=e.codePointAt(t);if(u===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),u===46?s<0?s=t:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||n<0||o===0||o===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function Eae(...e){let t=-1,n;for(;++t<e.length;)Xf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Tae(n)}function Tae(e){Xf(e);const t=e.codePointAt(0)===47;let n=Sae(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Sae(e,t){let n="",r=0,s=-1,o=0,l=-1,u,d;for(;++l<=e.length;){if(l<e.length)u=e.codePointAt(l);else{if(u===47)break;u=47}if(u===47){if(!(s===l-1||o===1))if(s!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),s=l,o=0;continue}}else if(n.length>0){n="",r=0,s=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,l):n=e.slice(s+1,l),r=l-s-1;s=l,o=0}else u===46&&o>-1?o++:o=-1}return n}function Xf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Cae={cwd:wae};function wae(){return"/"}function By(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Aae(e){if(typeof e=="string")e=new URL(e);else if(!By(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 _ae(e)}function _ae(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===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 ub=["history","path","basename","stem","extname","dirname"];class kae{constructor(t){let n;t?By(t)?n={path:t}:typeof t=="string"||Nae(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Cae.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ub.length;){const o=ub[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let s;for(s in n)ub.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Ni.basename(this.path):void 0}set basename(t){fb(t,"basename"),cb(t,"basename"),this.path=Ni.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ni.dirname(this.path):void 0}set dirname(t){b3(this.basename,"dirname"),this.path=Ni.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ni.extname(this.path):void 0}set extname(t){if(cb(t,"extname"),b3(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=Ni.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){By(t)&&(t=Aae(t)),fb(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ni.basename(this.path,this.extname):void 0}set stem(t){fb(t,"stem"),cb(t,"stem"),this.path=Ni.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new Kn(t,n,r);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 cb(e,t){if(e&&e.includes(Ni.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ni.sep+"`")}function fb(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function b3(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Nae(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Rae=(function(e){const r=this.constructor.prototype,s=r[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Oae={}.hasOwnProperty;class qv extends Rae{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=gae()}copy(){const t=new qv;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(lb(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(mb("data",this.frozen),this.namespace[t]=n,this):Oae.call(this.namespace,t)&&this.namespace[t]||void 0:t?(mb("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[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ih(t),r=this.parser||this.Parser;return db("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),db("process",this.parser||this.Parser),hb("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,l){const u=Ih(t),d=r.parse(u);r.run(d,u,function(m,p,g){if(m||!p||!g)return f(m);const y=p,E=r.stringify(y,g);Iae(E)?g.value=E:g.result=E,f(m,g)});function f(m,p){m||!p?l(m):o?o(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),db("processSync",this.parser||this.Parser),hb("processSync",this.compiler||this.Compiler),this.process(t,s),x3("processSync","process",n),r;function s(o,l){n=!0,p3(o),r=l}}run(t,n,r){y3(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,u){const d=Ih(n);s.run(t,d,f);function f(m,p,g){const y=p||t;m?u(m):l?l(y):r(void 0,y,g)}}}runSync(t,n){let r=!1,s;return this.run(t,n,o),x3("runSync","run",r),s;function o(l,u){p3(l),s=u,r=!0}}stringify(t,n){this.freeze();const r=Ih(n),s=this.compiler||this.Compiler;return hb("stringify",s),y3(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(mb("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[m,...p]=f;d(m,p)}else l(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function l(f){if(!("plugins"in f)&&!("settings"in f))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");u(f.plugins),f.settings&&(s.settings=lb(!0,s.settings,f.settings))}function u(f){let m=-1;if(f!=null)if(Array.isArray(f))for(;++m<f.length;){const p=f[m];o(p)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,m){let p=-1,g=-1;for(;++p<r.length;)if(r[p][0]===f){g=p;break}if(g===-1)r.push([f,...m]);else if(m.length>0){let[y,...E]=m;const S=r[g][1];jy(S)&&jy(y)&&(y=lb(!0,S,y)),r[g]=[f,y,...E]}}}}const Dae=new qv().freeze();function db(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function hb(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function mb(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 y3(e){if(!jy(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function x3(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ih(e){return Mae(e)?e:new kae(e)}function Mae(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Iae(e){return typeof e=="string"||Lae(e)}function Lae(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function $v(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Lo=$v();function c5(e){Lo=e}var Jc={exec:()=>null};function Tt(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(s,o)=>{let l=typeof o=="string"?o:o.source;return l=l.replace(ir.caret,"$1"),n=n.replace(s,l),r},getRegex:()=>new RegExp(n,t)};return r}var Pae=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ir={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},jae=/^(?:[ \t]*(?:\n|$))+/,Bae=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Uae=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Kf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Fae=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Yv=/(?:[*+-]|\d{1,9}[.)])/,f5=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,d5=Tt(f5).replace(/bull/g,Yv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Hae=Tt(f5).replace(/bull/g,Yv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Gv=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,zae=/^[^\n]+/,Xv=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Vae=Tt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Xv).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),qae=Tt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Yv).getRegex(),Ep="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kv=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$ae=Tt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Kv).replace("tag",Ep).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),h5=Tt(Gv).replace("hr",Kf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ep).getRegex(),Yae=Tt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",h5).getRegex(),Qv={blockquote:Yae,code:Bae,def:Vae,fences:Uae,heading:Fae,hr:Kf,html:$ae,lheading:d5,list:qae,newline:jae,paragraph:h5,table:Jc,text:zae},v3=Tt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Kf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ep).getRegex(),Gae={...Qv,lheading:Hae,table:v3,paragraph:Tt(Gv).replace("hr",Kf).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",v3).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ep).getRegex()},Xae={...Qv,html:Tt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Kv).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Jc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Tt(Gv).replace("hr",Kf).replace("heading",` *#{1,6} *[^
421
+ ]`).replace("lheading",d5).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Kae=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Qae=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,m5=/^( {2,}|\\)\n(?!\s*$)/,Wae=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Tp=/[\p{P}\p{S}]/u,Wv=/[\s\p{P}\p{S}]/u,p5=/[^\s\p{P}\p{S}]/u,Zae=Tt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Wv).getRegex(),g5=/(?!~)[\p{P}\p{S}]/u,Jae=/(?!~)[\s\p{P}\p{S}]/u,eoe=/(?:[^\s\p{P}\p{S}]|~)/u,toe=Tt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Pae?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),b5=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,noe=Tt(b5,"u").replace(/punct/g,Tp).getRegex(),roe=Tt(b5,"u").replace(/punct/g,g5).getRegex(),y5="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ioe=Tt(y5,"gu").replace(/notPunctSpace/g,p5).replace(/punctSpace/g,Wv).replace(/punct/g,Tp).getRegex(),soe=Tt(y5,"gu").replace(/notPunctSpace/g,eoe).replace(/punctSpace/g,Jae).replace(/punct/g,g5).getRegex(),aoe=Tt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,p5).replace(/punctSpace/g,Wv).replace(/punct/g,Tp).getRegex(),ooe=Tt(/\\(punct)/,"gu").replace(/punct/g,Tp).getRegex(),loe=Tt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),uoe=Tt(Kv).replace("(?:-->|$)","-->").getRegex(),coe=Tt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",uoe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Om=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,foe=Tt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Om).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),x5=Tt(/^!?\[(label)\]\[(ref)\]/).replace("label",Om).replace("ref",Xv).getRegex(),v5=Tt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Xv).getRegex(),doe=Tt("reflink|nolink(?!\\()","g").replace("reflink",x5).replace("nolink",v5).getRegex(),E3=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Zv={_backpedal:Jc,anyPunctuation:ooe,autolink:loe,blockSkip:toe,br:m5,code:Qae,del:Jc,emStrongLDelim:noe,emStrongRDelimAst:ioe,emStrongRDelimUnd:aoe,escape:Kae,link:foe,nolink:v5,punctuation:Zae,reflink:x5,reflinkSearch:doe,tag:coe,text:Wae,url:Jc},hoe={...Zv,link:Tt(/^!?\[(label)\]\((.*?)\)/).replace("label",Om).getRegex(),reflink:Tt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Om).getRegex()},Uy={...Zv,emStrongRDelimAst:soe,emStrongLDelim:roe,url:Tt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",E3).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Tt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",E3).getRegex()},moe={...Uy,br:Tt(m5).replace("{2,}","*").getRegex(),text:Tt(Uy.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Lh={normal:Qv,gfm:Gae,pedantic:Xae},Nc={normal:Zv,gfm:Uy,breaks:moe,pedantic:hoe},poe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},T3=e=>poe[e];function hs(e,t){if(t){if(ir.escapeTest.test(e))return e.replace(ir.escapeReplace,T3)}else if(ir.escapeTestNoEncode.test(e))return e.replace(ir.escapeReplaceNoEncode,T3);return e}function S3(e){try{e=encodeURI(e).replace(ir.percentDecode,"%")}catch{return null}return e}function C3(e,t){var o;let n=e.replace(ir.findPipe,(l,u,d)=>{let f=!1,m=u;for(;--m>=0&&d[m]==="\\";)f=!f;return f?"|":" |"}),r=n.split(ir.splitPipe),s=0;if(r[0].trim()||r.shift(),r.length>0&&!((o=r.at(-1))!=null&&o.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(ir.slashPipe,"|");return r}function Rc(e,t,n){let r=e.length;if(r===0)return"";let s=0;for(;s<r&&e.charAt(r-s-1)===t;)s++;return e.slice(0,r-s)}function goe(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function w3(e,t,n,r,s){let o=t.href,l=t.title||null,u=e[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let d={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:l,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,d}function boe(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let s=r[1];return t.split(`
422
+ `).map(o=>{let l=o.match(n.other.beginningSpace);if(l===null)return o;let[u]=l;return u.length>=s.length?o.slice(s.length):o}).join(`
423
+ `)}var Dm=class{constructor(e){$e(this,"options");$e(this,"rules");$e(this,"lexer");this.options=e||Lo}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Rc(n,`
424
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=boe(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=Rc(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Rc(t[0],`
425
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Rc(t[0],`
426
+ `).split(`
427
+ `),r="",s="",o=[];for(;n.length>0;){let l=!1,u=[],d;for(d=0;d<n.length;d++)if(this.rules.other.blockquoteStart.test(n[d]))u.push(n[d]),l=!0;else if(!l)u.push(n[d]);else break;n=n.slice(d);let f=u.join(`
428
+ `),m=f.replace(this.rules.other.blockquoteSetextReplace,`
429
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
430
+ ${f}`:f,s=s?`${s}
431
+ ${m}`:m;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,o,!0),this.lexer.state.top=p,n.length===0)break;let g=o.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let y=g,E=y.raw+`
432
+ `+n.join(`
433
+ `),S=this.blockquote(E);o[o.length-1]=S,r=r.substring(0,r.length-y.raw.length)+S.raw,s=s.substring(0,s.length-y.text.length)+S.text;break}else if((g==null?void 0:g.type)==="list"){let y=g,E=y.raw+`
434
+ `+n.join(`
435
+ `),S=this.list(E);o[o.length-1]=S,r=r.substring(0,r.length-g.raw.length)+S.raw,s=s.substring(0,s.length-y.raw.length)+S.raw,n=E.substring(o.at(-1).raw.length).split(`
436
+ `);continue}}return{type:"blockquote",raw:r,tokens:o,text:s}}}list(e){var n,r;let t=this.rules.block.list.exec(e);if(t){let s=t[1].trim(),o=s.length>1,l={type:"list",raw:"",ordered:o,start:o?+s.slice(0,-1):"",loose:!1,items:[]};s=o?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=o?s:"[*+-]");let u=this.rules.other.listItemRegex(s),d=!1;for(;e;){let m=!1,p="",g="";if(!(t=u.exec(e))||this.rules.block.hr.test(e))break;p=t[0],e=e.substring(p.length);let y=t[2].split(`
437
+ `,1)[0].replace(this.rules.other.listReplaceTabs,w=>" ".repeat(3*w.length)),E=e.split(`
438
+ `,1)[0],S=!y.trim(),A=0;if(this.options.pedantic?(A=2,g=y.trimStart()):S?A=t[1].length+1:(A=t[2].search(this.rules.other.nonSpaceChar),A=A>4?1:A,g=y.slice(A),A+=t[1].length),S&&this.rules.other.blankLine.test(E)&&(p+=E+`
439
+ `,e=e.substring(E.length+1),m=!0),!m){let w=this.rules.other.nextBulletRegex(A),_=this.rules.other.hrRegex(A),k=this.rules.other.fencesBeginRegex(A),R=this.rules.other.headingBeginRegex(A),M=this.rules.other.htmlBeginRegex(A);for(;e;){let O=e.split(`
440
+ `,1)[0],D;if(E=O,this.options.pedantic?(E=E.replace(this.rules.other.listReplaceNesting," "),D=E):D=E.replace(this.rules.other.tabCharGlobal," "),k.test(E)||R.test(E)||M.test(E)||w.test(E)||_.test(E))break;if(D.search(this.rules.other.nonSpaceChar)>=A||!E.trim())g+=`
441
+ `+D.slice(A);else{if(S||y.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(y)||R.test(y)||_.test(y))break;g+=`
442
+ `+E}!S&&!E.trim()&&(S=!0),p+=O+`
443
+ `,e=e.substring(O.length+1),y=D.slice(A)}}l.loose||(d?l.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(d=!0)),l.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(g),loose:!1,text:g,tokens:[]}),l.raw+=p}let f=l.items.at(-1);if(f)f.raw=f.raw.trimEnd(),f.text=f.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let m of l.items){if(this.lexer.state.top=!1,m.tokens=this.lexer.blockTokens(m.text,[]),m.task){if(m.text=m.text.replace(this.rules.other.listReplaceTask,""),((n=m.tokens[0])==null?void 0:n.type)==="text"||((r=m.tokens[0])==null?void 0:r.type)==="paragraph"){m.tokens[0].raw=m.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),m.tokens[0].text=m.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let g=this.lexer.inlineQueue.length-1;g>=0;g--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)){this.lexer.inlineQueue[g].src=this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask,"");break}}let p=this.rules.other.listTaskCheckbox.exec(m.raw);if(p){let g={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};m.checked=g.checked,l.loose?m.tokens[0]&&["paragraph","text"].includes(m.tokens[0].type)&&"tokens"in m.tokens[0]&&m.tokens[0].tokens?(m.tokens[0].raw=g.raw+m.tokens[0].raw,m.tokens[0].text=g.raw+m.tokens[0].text,m.tokens[0].tokens.unshift(g)):m.tokens.unshift({type:"paragraph",raw:g.raw,text:g.raw,tokens:[g]}):m.tokens.unshift(g)}}if(!l.loose){let p=m.tokens.filter(y=>y.type==="space"),g=p.length>0&&p.some(y=>this.rules.other.anyLine.test(y.raw));l.loose=g}}if(l.loose)for(let m of l.items){m.loose=!0;for(let p of m.tokens)p.type==="text"&&(p.type="paragraph")}return l}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:s}}}table(e){var l;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=C3(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(l=t[3])!=null&&l.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
444
+ `):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let u of r)this.rules.other.tableAlignRight.test(u)?o.align.push("right"):this.rules.other.tableAlignCenter.test(u)?o.align.push("center"):this.rules.other.tableAlignLeft.test(u)?o.align.push("left"):o.align.push(null);for(let u=0;u<n.length;u++)o.header.push({text:n[u],tokens:this.lexer.inline(n[u]),header:!0,align:o.align[u]});for(let u of s)o.rows.push(C3(u,o.header.length).map((d,f)=>({text:d,tokens:this.lexer.inline(d),header:!1,align:o.align[f]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
445
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=Rc(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=goe(t[2],"()");if(o===-2)return;if(o>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let r=t[2],s="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(r);o&&(r=o[1],s=o[3])}else s=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),w3(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=t[r.toLowerCase()];if(!s){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return w3(n,s,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let s=[...r[0]].length-1,o,l,u=s,d=0,f=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,t=t.slice(-1*e.length+s);(r=f.exec(t))!=null;){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(l=[...o].length,r[3]||r[4]){u+=l;continue}else if((r[5]||r[6])&&s%3&&!((s+l)%3)){d+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+d);let m=[...r[0]][0].length,p=e.slice(0,s+r.index+m+l);if(Math.min(s,l)%2){let y=p.slice(1,-1);return{type:"em",raw:p,text:y,tokens:this.lexer.inlineTokens(y)}}let g=p.slice(2,-2);return{type:"strong",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,s;if(t[2]==="@")r=t[0],s="mailto:"+r;else{let o;do o=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(o!==t[0]);r=t[0],t[1]==="www."?s="http://"+t[0]:s=t[0]}return{type:"link",raw:t[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Xr=class Fy{constructor(t){$e(this,"tokens");$e(this,"options");$e(this,"state");$e(this,"inlineQueue");$e(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Lo,this.options.tokenizer=this.options.tokenizer||new Dm,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:ir,block:Lh.normal,inline:Nc.normal};this.options.pedantic?(n.block=Lh.pedantic,n.inline=Nc.pedantic):this.options.gfm&&(n.block=Lh.gfm,this.options.breaks?n.inline=Nc.breaks:n.inline=Nc.gfm),this.tokenizer.rules=n}static get rules(){return{block:Lh,inline:Nc}}static lex(t,n){return new Fy(n).lex(t)}static lexInline(t,n){return new Fy(n).inlineTokens(t)}lex(t){t=t.replace(ir.carriageReturn,`
446
+ `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var s,o,l;for(this.options.pedantic&&(t=t.replace(ir.tabCharGlobal," ").replace(ir.spaceLine,""));t;){let u;if((o=(s=this.options.extensions)==null?void 0:s.block)!=null&&o.some(f=>(u=f.call({lexer:this},t,n))?(t=t.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.space(t)){t=t.substring(u.raw.length);let f=n.at(-1);u.raw.length===1&&f!==void 0?f.raw+=`
447
+ `:n.push(u);continue}if(u=this.tokenizer.code(t)){t=t.substring(u.raw.length);let f=n.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
448
+ `)?"":`
449
+ `)+u.raw,f.text+=`
450
+ `+u.text,this.inlineQueue.at(-1).src=f.text):n.push(u);continue}if(u=this.tokenizer.fences(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.heading(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.hr(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.blockquote(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.list(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.html(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.def(t)){t=t.substring(u.raw.length);let f=n.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
451
+ `)?"":`
452
+ `)+u.raw,f.text+=`
453
+ `+u.raw,this.inlineQueue.at(-1).src=f.text):this.tokens.links[u.tag]||(this.tokens.links[u.tag]={href:u.href,title:u.title},n.push(u));continue}if(u=this.tokenizer.table(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.lheading(t)){t=t.substring(u.raw.length),n.push(u);continue}let d=t;if((l=this.options.extensions)!=null&&l.startBlock){let f=1/0,m=t.slice(1),p;this.options.extensions.startBlock.forEach(g=>{p=g.call({lexer:this},m),typeof p=="number"&&p>=0&&(f=Math.min(f,p))}),f<1/0&&f>=0&&(d=t.substring(0,f+1))}if(this.state.top&&(u=this.tokenizer.paragraph(d))){let f=n.at(-1);r&&(f==null?void 0:f.type)==="paragraph"?(f.raw+=(f.raw.endsWith(`
454
+ `)?"":`
455
+ `)+u.raw,f.text+=`
456
+ `+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):n.push(u),r=d.length!==t.length,t=t.substring(u.raw.length);continue}if(u=this.tokenizer.text(t)){t=t.substring(u.raw.length);let f=n.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
457
+ `)?"":`
458
+ `)+u.raw,f.text+=`
459
+ `+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):n.push(u);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var d,f,m,p,g;let r=t,s=null;if(this.tokens.links){let y=Object.keys(this.tokens.links);if(y.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)y.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,s.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)o=s[2]?s[2].length:0,r=r.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=((f=(d=this.options.hooks)==null?void 0:d.emStrongMask)==null?void 0:f.call({lexer:this},r))??r;let l=!1,u="";for(;t;){l||(u=""),l=!1;let y;if((p=(m=this.options.extensions)==null?void 0:m.inline)!=null&&p.some(S=>(y=S.call({lexer:this},t,n))?(t=t.substring(y.raw.length),n.push(y),!0):!1))continue;if(y=this.tokenizer.escape(t)){t=t.substring(y.raw.length),n.push(y);continue}if(y=this.tokenizer.tag(t)){t=t.substring(y.raw.length),n.push(y);continue}if(y=this.tokenizer.link(t)){t=t.substring(y.raw.length),n.push(y);continue}if(y=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(y.raw.length);let S=n.at(-1);y.type==="text"&&(S==null?void 0:S.type)==="text"?(S.raw+=y.raw,S.text+=y.text):n.push(y);continue}if(y=this.tokenizer.emStrong(t,r,u)){t=t.substring(y.raw.length),n.push(y);continue}if(y=this.tokenizer.codespan(t)){t=t.substring(y.raw.length),n.push(y);continue}if(y=this.tokenizer.br(t)){t=t.substring(y.raw.length),n.push(y);continue}if(y=this.tokenizer.del(t)){t=t.substring(y.raw.length),n.push(y);continue}if(y=this.tokenizer.autolink(t)){t=t.substring(y.raw.length),n.push(y);continue}if(!this.state.inLink&&(y=this.tokenizer.url(t))){t=t.substring(y.raw.length),n.push(y);continue}let E=t;if((g=this.options.extensions)!=null&&g.startInline){let S=1/0,A=t.slice(1),w;this.options.extensions.startInline.forEach(_=>{w=_.call({lexer:this},A),typeof w=="number"&&w>=0&&(S=Math.min(S,w))}),S<1/0&&S>=0&&(E=t.substring(0,S+1))}if(y=this.tokenizer.inlineText(E)){t=t.substring(y.raw.length),y.raw.slice(-1)!=="_"&&(u=y.raw.slice(-1)),l=!0;let S=n.at(-1);(S==null?void 0:S.type)==="text"?(S.raw+=y.raw,S.text+=y.text):n.push(y);continue}if(t){let S="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(S);break}else throw new Error(S)}}return n}},Mm=class{constructor(e){$e(this,"options");$e(this,"parser");this.options=e||Lo}space(e){return""}code({text:e,lang:t,escaped:n}){var o;let r=(o=(t||"").match(ir.notSpaceStart))==null?void 0:o[0],s=e.replace(ir.endingNewline,"")+`
460
+ `;return r?'<pre><code class="language-'+hs(r)+'">'+(n?s:hs(s,!0))+`</code></pre>
461
+ `:"<pre><code>"+(n?s:hs(s,!0))+`</code></pre>
462
+ `}blockquote({tokens:e}){return`<blockquote>
463
+ ${this.parser.parse(e)}</blockquote>
464
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
465
+ `}hr(e){return`<hr>
466
+ `}list(e){let t=e.ordered,n=e.start,r="";for(let l=0;l<e.items.length;l++){let u=e.items[l];r+=this.listitem(u)}let s=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+s+o+`>
467
+ `+r+"</"+s+`>
468
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
469
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
470
+ `}table(e){let t="",n="";for(let s=0;s<e.header.length;s++)n+=this.tablecell(e.header[s]);t+=this.tablerow({text:n});let r="";for(let s=0;s<e.rows.length;s++){let o=e.rows[s];n="";for(let l=0;l<o.length;l++)n+=this.tablecell(o[l]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
471
+ <thead>
472
+ `+t+`</thead>
473
+ `+r+`</table>
474
+ `}tablerow({text:e}){return`<tr>
475
+ ${e}</tr>
476
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
477
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${hs(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),s=S3(e);if(s===null)return r;e=s;let o='<a href="'+e+'"';return t&&(o+=' title="'+hs(t)+'"'),o+=">"+r+"</a>",o}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let s=S3(e);if(s===null)return hs(n);e=s;let o=`<img src="${e}" alt="${n}"`;return t&&(o+=` title="${hs(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:hs(e.text)}},Jv=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},di=class Hy{constructor(t){$e(this,"options");$e(this,"renderer");$e(this,"textRenderer");this.options=t||Lo,this.options.renderer=this.options.renderer||new Mm,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Jv}static parse(t,n){return new Hy(n).parse(t)}static parseInline(t,n){return new Hy(n).parseInline(t)}parse(t){var r,s;let n="";for(let o=0;o<t.length;o++){let l=t[o];if((s=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&s[l.type]){let d=l,f=this.options.extensions.renderers[d.type].call({parser:this},d);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(d.type)){n+=f||"";continue}}let u=l;switch(u.type){case"space":{n+=this.renderer.space(u);break}case"hr":{n+=this.renderer.hr(u);break}case"heading":{n+=this.renderer.heading(u);break}case"code":{n+=this.renderer.code(u);break}case"table":{n+=this.renderer.table(u);break}case"blockquote":{n+=this.renderer.blockquote(u);break}case"list":{n+=this.renderer.list(u);break}case"checkbox":{n+=this.renderer.checkbox(u);break}case"html":{n+=this.renderer.html(u);break}case"def":{n+=this.renderer.def(u);break}case"paragraph":{n+=this.renderer.paragraph(u);break}case"text":{n+=this.renderer.text(u);break}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(t,n=this.renderer){var s,o;let r="";for(let l=0;l<t.length;l++){let u=t[l];if((o=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&o[u.type]){let f=this.options.extensions.renderers[u.type].call({parser:this},u);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(u.type)){r+=f||"";continue}}let d=u;switch(d.type){case"escape":{r+=n.text(d);break}case"html":{r+=n.html(d);break}case"link":{r+=n.link(d);break}case"image":{r+=n.image(d);break}case"checkbox":{r+=n.checkbox(d);break}case"strong":{r+=n.strong(d);break}case"em":{r+=n.em(d);break}case"codespan":{r+=n.codespan(d);break}case"br":{r+=n.br(d);break}case"del":{r+=n.del(d);break}case"text":{r+=n.text(d);break}default:{let f='Token with "'+d.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return r}},Bh,Bc=(Bh=class{constructor(e){$e(this,"options");$e(this,"block");this.options=e||Lo}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Xr.lex:Xr.lexInline}provideParser(){return this.block?di.parse:di.parseInline}},$e(Bh,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),$e(Bh,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Bh),yoe=class{constructor(...t){$e(this,"defaults",$v());$e(this,"options",this.setOptions);$e(this,"parse",this.parseMarkdown(!0));$e(this,"parseInline",this.parseMarkdown(!1));$e(this,"Parser",di);$e(this,"Renderer",Mm);$e(this,"TextRenderer",Jv);$e(this,"Lexer",Xr);$e(this,"Tokenizer",Dm);$e(this,"Hooks",Bc);this.use(...t)}walkTokens(t,n){var s,o;let r=[];for(let l of t)switch(r=r.concat(n.call(this,l)),l.type){case"table":{let u=l;for(let d of u.header)r=r.concat(this.walkTokens(d.tokens,n));for(let d of u.rows)for(let f of d)r=r.concat(this.walkTokens(f.tokens,n));break}case"list":{let u=l;r=r.concat(this.walkTokens(u.items,n));break}default:{let u=l;(o=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&o[u.type]?this.defaults.extensions.childTokens[u.type].forEach(d=>{let f=u[d].flat(1/0);r=r.concat(this.walkTokens(f,n))}):u.tokens&&(r=r.concat(this.walkTokens(u.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let s={...r};if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=n.renderers[o.name];l?n.renderers[o.name]=function(...u){let d=o.renderer.apply(this,u);return d===!1&&(d=l.apply(this,u)),d}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=n[o.level];l?l.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),s.extensions=n),r.renderer){let o=this.defaults.renderer||new Mm(this.defaults);for(let l in r.renderer){if(!(l in o))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let u=l,d=r.renderer[u],f=o[u];o[u]=(...m)=>{let p=d.apply(o,m);return p===!1&&(p=f.apply(o,m)),p||""}}s.renderer=o}if(r.tokenizer){let o=this.defaults.tokenizer||new Dm(this.defaults);for(let l in r.tokenizer){if(!(l in o))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let u=l,d=r.tokenizer[u],f=o[u];o[u]=(...m)=>{let p=d.apply(o,m);return p===!1&&(p=f.apply(o,m)),p}}s.tokenizer=o}if(r.hooks){let o=this.defaults.hooks||new Bc;for(let l in r.hooks){if(!(l in o))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let u=l,d=r.hooks[u],f=o[u];Bc.passThroughHooks.has(l)?o[u]=m=>{if(this.defaults.async&&Bc.passThroughHooksRespectAsync.has(l))return(async()=>{let g=await d.call(o,m);return f.call(o,g)})();let p=d.call(o,m);return f.call(o,p)}:o[u]=(...m)=>{if(this.defaults.async)return(async()=>{let g=await d.apply(o,m);return g===!1&&(g=await f.apply(o,m)),g})();let p=d.apply(o,m);return p===!1&&(p=f.apply(o,m)),p}}s.hooks=o}if(r.walkTokens){let o=this.defaults.walkTokens,l=r.walkTokens;s.walkTokens=function(u){let d=[];return d.push(l.call(this,u)),o&&(d=d.concat(o.call(this,u))),d}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Xr.lex(t,n??this.defaults)}parser(t,n){return di.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let s={...r},o={...this.defaults,...s},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let u=o.hooks?await o.hooks.preprocess(n):n,d=await(o.hooks?await o.hooks.provideLexer():t?Xr.lex:Xr.lexInline)(u,o),f=o.hooks?await o.hooks.processAllTokens(d):d;o.walkTokens&&await Promise.all(this.walkTokens(f,o.walkTokens));let m=await(o.hooks?await o.hooks.provideParser():t?di.parse:di.parseInline)(f,o);return o.hooks?await o.hooks.postprocess(m):m})().catch(l);try{o.hooks&&(n=o.hooks.preprocess(n));let u=(o.hooks?o.hooks.provideLexer():t?Xr.lex:Xr.lexInline)(n,o);o.hooks&&(u=o.hooks.processAllTokens(u)),o.walkTokens&&this.walkTokens(u,o.walkTokens);let d=(o.hooks?o.hooks.provideParser():t?di.parse:di.parseInline)(u,o);return o.hooks&&(d=o.hooks.postprocess(d)),d}catch(u){return l(u)}}}onError(t,n){return r=>{if(r.message+=`
478
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+hs(r.message+"",!0)+"</pre>";return n?Promise.resolve(s):s}if(n)return Promise.reject(r);throw r}}},wo=new yoe;function It(e,t){return wo.parse(e,t)}It.options=It.setOptions=function(e){return wo.setOptions(e),It.defaults=wo.defaults,c5(It.defaults),It};It.getDefaults=$v;It.defaults=Lo;It.use=function(...e){return wo.use(...e),It.defaults=wo.defaults,c5(It.defaults),It};It.walkTokens=function(e,t){return wo.walkTokens(e,t)};It.parseInline=wo.parseInline;It.Parser=di;It.parser=di.parse;It.Renderer=Mm;It.TextRenderer=Jv;It.Lexer=Xr;It.lexer=Xr.lex;It.Tokenizer=Dm;It.Hooks=Bc;It.parse=It;It.options;It.setOptions;It.use;It.walkTokens;It.parseInline;di.parse;Xr.lex;var xoe=300,voe="300px",Eoe=500;function Toe(e={}){let{immediate:t=!1,debounceDelay:n=xoe,rootMargin:r=voe,idleTimeout:s=Eoe}=e,[o,l]=v.useState(!1),u=v.useRef(null),d=v.useRef(null),f=v.useRef(null),m=v.useMemo(()=>y=>{let E=Date.now();return window.setTimeout(()=>{y({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-E))})},1)},[]),p=v.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(y,E)=>window.requestIdleCallback(y,E):m,[m]),g=v.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?y=>window.cancelIdleCallback(y):y=>{clearTimeout(y)},[]);return v.useEffect(()=>{if(t){l(!0);return}let y=u.current;if(!y)return;d.current&&(clearTimeout(d.current),d.current=null),f.current&&(g(f.current),f.current=null);let E=()=>{d.current&&(clearTimeout(d.current),d.current=null),f.current&&(g(f.current),f.current=null)},S=k=>{f.current=p(R=>{R.timeRemaining()>0||R.didTimeout?(l(!0),k.disconnect()):f.current=p(()=>{l(!0),k.disconnect()},{timeout:s/2})},{timeout:s})},A=k=>{E(),d.current=window.setTimeout(()=>{var R,M;let O=k.takeRecords();(O.length===0||(M=(R=O.at(-1))==null?void 0:R.isIntersecting)!=null&&M)&&S(k)},n)},w=(k,R)=>{k.isIntersecting?A(R):E()},_=new IntersectionObserver(k=>{for(let R of k)w(R,_)},{rootMargin:r,threshold:0});return _.observe(y),()=>{d.current&&clearTimeout(d.current),f.current&&g(f.current),_.disconnect()}},[t,n,r,s,g,p]),{shouldRender:o,containerRef:u}}var eE=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),tE=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),Sp=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),Soe=e=>b.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[b.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),Coe=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),woe=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),E5=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),A3=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),Aoe=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),_oe=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Ge=(...e)=>kk(pk(e)),ql=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,s=URL.createObjectURL(r),o=document.createElement("a");o.href=s,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(s)},koe=v.createContext({code:""}),T5=()=>v.useContext(koe),_3=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:s,code:o,...l})=>{let[u,d]=v.useState(!1),f=v.useRef(0),{code:m}=T5(),{isAnimating:p}=v.useContext(Jr),g=o??m,y=async()=>{var S;if(typeof window>"u"||!((S=navigator==null?void 0:navigator.clipboard)!=null&&S.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(g),d(!0),e==null||e(),f.current=window.setTimeout(()=>d(!1),n))}catch(A){t==null||t(A)}};v.useEffect(()=>()=>{window.clearTimeout(f.current)},[]);let E=u?eE:tE;return b.jsx("button",{className:Ge("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-copy-button",disabled:p,onClick:y,title:"Copy Code",type:"button",...l,children:r??b.jsx(E,{size:14})})},k3={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},Noe=({onDownload:e,onError:t,language:n,children:r,className:s,code:o,...l})=>{let{code:u}=T5(),{isAnimating:d}=v.useContext(Jr),f=o??u,m=`file.${n&&n in k3?k3[n]:"txt"}`,p="text/plain",g=()=>{try{ql(m,f,p),e==null||e()}catch(y){t==null||t(y)}};return b.jsx("button",{className:Ge("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-download-button",disabled:d,onClick:g,title:"Download file",type:"button",...l,children:r??b.jsx(Sp,{size:14})})},N3=()=>b.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[b.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),b.jsx("div",{className:"flex w-full items-center justify-center p-4",children:b.jsx(Soe,{className:"size-4 animate-spin"})})]}),Roe=/\.[^/.]+$/,Ooe=({node:e,className:t,src:n,alt:r,...s})=>{let o=async()=>{if(n)try{let l=await(await fetch(n)).blob(),u=new URL(n,window.location.origin).pathname.split("/").pop()||"",d=u.split(".").pop(),f=u.includes(".")&&d!==void 0&&d.length<=4,m="";if(f)m=u;else{let p=l.type,g="png";p.includes("jpeg")||p.includes("jpg")?g="jpg":p.includes("png")?g="png":p.includes("svg")?g="svg":p.includes("gif")?g="gif":p.includes("webp")&&(g="webp"),m=`${(r||u||"image").replace(Roe,"")}.${g}`}ql(m,l,l.type)}catch{window.open(n,"_blank")}};return n?b.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[b.jsx("img",{alt:r,className:Ge("max-w-full rounded-lg",t),"data-streamdown":"image",src:n,...s}),b.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),b.jsx("button",{className:Ge("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:o,title:"Download image",type:"button",children:b.jsx(Sp,{size:14})})]}):null},ef=0,Doe=()=>{ef+=1,ef===1&&(document.body.style.overflow="hidden")},Moe=()=>{ef=Math.max(0,ef-1),ef===0&&(document.body.style.overflow="")},Ioe=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[s,o]=v.useState(!1),l=v.useCallback(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch{}},[e]),u=v.useCallback(()=>{r(),n()},[r,n]);return v.useEffect(()=>{if(t){Doe();let d=f=>{f.key==="Escape"&&n()};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d),Moe()}}},[t,n]),t?b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:d=>{d.key==="Escape"&&n()},role:"button",tabIndex:0,children:b.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:d=>d.stopPropagation(),onKeyDown:d=>d.stopPropagation(),role:"presentation",children:[b.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:b.jsx(E5,{size:16})}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[b.jsx(A3,{size:20}),b.jsx("span",{children:"Open external link?"})]}),b.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),b.jsx("div",{className:Ge("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),b.jsxs("div",{className:"flex gap-2",children:[b.jsx("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:l,type:"button",children:s?b.jsxs(b.Fragment,{children:[b.jsx(eE,{size:14}),b.jsx("span",{children:"Copied"})]}):b.jsxs(b.Fragment,{children:[b.jsx(tE,{size:14}),b.jsx("span",{children:"Copy link"})]})}),b.jsxs("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:u,type:"button",children:[b.jsx(A3,{size:14}),b.jsx("span",{children:"Open link"})]})]})]})}):null},zy=v.createContext(null),S5=()=>v.useContext(zy),due=()=>{var e;let t=S5();return(e=t==null?void 0:t.code)!=null?e:null},nE=()=>{var e;let t=S5();return(e=t==null?void 0:t.mermaid)!=null?e:null},Loe=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((s,o)=>{let l="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),u=new Image;u.crossOrigin="anonymous",u.onload=()=>{let d=document.createElement("canvas"),f=u.width*r,m=u.height*r;d.width=f,d.height=m;let p=d.getContext("2d");if(!p){o(new Error("Failed to create 2D canvas context for PNG export"));return}p.drawImage(u,0,0,f,m),d.toBlob(g=>{if(!g){o(new Error("Failed to create PNG blob"));return}s(g)},"image/png")},u.onerror=()=>o(new Error("Failed to load SVG image")),u.src=l})},Poe=({chart:e,children:t,className:n,onDownload:r,config:s,onError:o})=>{let[l,u]=v.useState(!1),d=v.useRef(null),{isAnimating:f}=v.useContext(Jr),m=nE(),p=async g=>{try{if(g==="mmd"){ql("diagram.mmd",e,"text/plain"),u(!1),r==null||r(g);return}if(!m){o==null||o(new Error("Mermaid plugin not available"));return}let y=m.getMermaid(s),E=e.split("").reduce((w,_)=>(w<<5)-w+_.charCodeAt(0)|0,0),S=`mermaid-${Math.abs(E)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:A}=await y.render(S,e);if(!A){o==null||o(new Error("SVG not found. Please wait for the diagram to render."));return}if(g==="svg"){ql("diagram.svg",A,"image/svg+xml"),u(!1),r==null||r(g);return}if(g==="png"){let w=await Loe(A);ql("diagram.png",w,"image/png"),r==null||r(g),u(!1);return}}catch(y){o==null||o(y)}};return v.useEffect(()=>{let g=y=>{let E=y.composedPath();d.current&&!E.includes(d.current)&&u(!1)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g)}},[]),b.jsxs("div",{className:"relative",ref:d,children:[b.jsx("button",{className:Ge("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:f,onClick:()=>u(!l),title:"Download diagram",type:"button",children:t??b.jsx(Sp,{size:14})}),l?b.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[b.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>p("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),b.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>p("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),b.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>p("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},tf=0,joe=()=>{tf+=1,tf===1&&(document.body.style.overflow="hidden")},Boe=()=>{tf=Math.max(0,tf-1),tf===0&&(document.body.style.overflow="")},Uoe=({chart:e,config:t,onFullscreen:n,onExit:r,className:s,...o})=>{let[l,u]=v.useState(!1),{isAnimating:d,controls:f}=v.useContext(Jr),m=(()=>{if(typeof f=="boolean")return f;let g=f.mermaid;return g===!1?!1:g===!0||g===void 0?!0:g.panZoom!==!1})(),p=()=>{u(!l)};return v.useEffect(()=>{if(l){joe();let g=y=>{y.key==="Escape"&&u(!1)};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),Boe()}}},[l]),v.useEffect(()=>{l?n==null||n():r&&r()},[l,n,r]),b.jsxs(b.Fragment,{children:[b.jsx("button",{className:Ge("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),disabled:d,onClick:p,title:"View fullscreen",type:"button",...o,children:b.jsx(Coe,{size:14})}),l?b.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:p,onKeyDown:g=>{g.key==="Escape"&&p()},role:"button",tabIndex:0,children:[b.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:p,title:"Exit fullscreen",type:"button",children:b.jsx(E5,{size:20})}),b.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:b.jsx(J5,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:m})})]}):null]})},C5=e=>{var t,n;let r=[],s=[],o=e.querySelectorAll("thead th");for(let u of o)r.push(((t=u.textContent)==null?void 0:t.trim())||"");let l=e.querySelectorAll("tbody tr");for(let u of l){let d=[],f=u.querySelectorAll("td");for(let m of f)d.push(((n=m.textContent)==null?void 0:n.trim())||"");s.push(d)}return{headers:r,rows:s}},w5=e=>{let{headers:t,rows:n}=e,r=u=>{let d=!1,f=!1;for(let m of u){if(m==='"'){d=!0,f=!0;break}(m===","||m===`
479
+ `)&&(d=!0)}return d?f?`"${u.replace(/"/g,'""')}"`:`"${u}"`:u},s=t.length>0?n.length+1:n.length,o=new Array(s),l=0;t.length>0&&(o[l]=t.map(r).join(","),l+=1);for(let u of n)o[l]=u.map(r).join(","),l+=1;return o.join(`
480
+ `)},Foe=e=>{let{headers:t,rows:n}=e,r=u=>{let d=!1;for(let m of u)if(m===" "||m===`
481
+ `||m==="\r"){d=!0;break}if(!d)return u;let f=[];for(let m of u)m===" "?f.push("\\t"):m===`
482
+ `?f.push("\\n"):m==="\r"?f.push("\\r"):f.push(m);return f.join("")},s=t.length>0?n.length+1:n.length,o=new Array(s),l=0;t.length>0&&(o[l]=t.map(r).join(" "),l+=1);for(let u of n)o[l]=u.map(r).join(" "),l+=1;return o.join(`
483
+ `)},pb=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},Hoe=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),s=0,o=t.map(u=>pb(u));r[s]=`| ${o.join(" | ")} |`,s+=1;let l=new Array(t.length);for(let u=0;u<t.length;u+=1)l[u]="---";r[s]=`| ${l.join(" | ")} |`,s+=1;for(let u of n)if(u.length<t.length){let d=new Array(t.length);for(let f=0;f<t.length;f+=1)d[f]=f<u.length?pb(u[f]):"";r[s]=`| ${d.join(" | ")} |`,s+=1}else{let d=u.map(f=>pb(f));r[s]=`| ${d.join(" | ")} |`,s+=1}return r.join(`
484
+ `)},zoe=({children:e,className:t,onCopy:n,onError:r,timeout:s=2e3})=>{let[o,l]=v.useState(!1),[u,d]=v.useState(!1),f=v.useRef(null),m=v.useRef(0),{isAnimating:p}=v.useContext(Jr),g=async E=>{var S,A;if(typeof window>"u"||!((S=navigator==null?void 0:navigator.clipboard)!=null&&S.write)){r==null||r(new Error("Clipboard API not available"));return}try{let w=(A=f.current)==null?void 0:A.closest('[data-streamdown="table-wrapper"]'),_=w==null?void 0:w.querySelector("table");if(!_){r==null||r(new Error("Table not found"));return}let k=C5(_),R=E==="csv"?w5(k):Foe(k),M=new ClipboardItem({"text/plain":new Blob([R],{type:"text/plain"}),"text/html":new Blob([_.outerHTML],{type:"text/html"})});await navigator.clipboard.write([M]),d(!0),l(!1),n==null||n(E),m.current=window.setTimeout(()=>d(!1),s)}catch(w){r==null||r(w)}};v.useEffect(()=>{let E=S=>{let A=S.composedPath();f.current&&!A.includes(f.current)&&l(!1)};return document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E),window.clearTimeout(m.current)}},[]);let y=u?eE:tE;return b.jsxs("div",{className:"relative",ref:f,children:[b.jsx("button",{className:Ge("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:p,onClick:()=>l(!o),title:"Copy table",type:"button",children:e??b.jsx(y,{size:14})}),o?b.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[b.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>g("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),b.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>g("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},Voe=({children:e,className:t,onDownload:n,onError:r})=>{let[s,o]=v.useState(!1),l=v.useRef(null),{isAnimating:u}=v.useContext(Jr),d=f=>{var m;try{let p=(m=l.current)==null?void 0:m.closest('[data-streamdown="table-wrapper"]'),g=p==null?void 0:p.querySelector("table");if(!g){r==null||r(new Error("Table not found"));return}let y=C5(g),E=f==="csv"?w5(y):Hoe(y);ql(`table.${f==="csv"?"csv":"md"}`,E,f==="csv"?"text/csv":"text/markdown"),o(!1),n==null||n(f)}catch(p){r==null||r(p)}};return v.useEffect(()=>{let f=m=>{let p=m.composedPath();l.current&&!p.includes(l.current)&&o(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),b.jsxs("div",{className:"relative",ref:l,children:[b.jsx("button",{className:Ge("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>o(!s),title:"Download table",type:"button",children:e??b.jsx(Sp,{size:14})}),s?b.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[b.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),b.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},qoe=({children:e,className:t,showControls:n,...r})=>b.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[n?b.jsxs("div",{className:"flex items-center justify-end gap-1",children:[b.jsx(zoe,{}),b.jsx(Voe,{})]}):null,b.jsx("div",{className:"overflow-x-auto",children:b.jsx("table",{className:Ge("w-full border-collapse border border-border",t),"data-streamdown":"table",...r,children:e})})]}),$oe=v.lazy(()=>$y(()=>import("./code-block-37QAKDTI-BBxZnkMV.js"),[]).then(e=>({default:e.CodeBlock}))),Yoe=v.lazy(()=>$y(()=>Promise.resolve().then(()=>sue),void 0).then(e=>({default:e.Mermaid}))),Goe=/language-([^\s]+)/;function Cp(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,s=e.position.end,o=t.position.end;return(n==null?void 0:n.line)===(r==null?void 0:r.line)&&(n==null?void 0:n.column)===(r==null?void 0:r.column)&&(s==null?void 0:s.line)===(o==null?void 0:o.line)&&(s==null?void 0:s.column)===(o==null?void 0:o.column)}function tn(e,t){return e.className===t.className&&Cp(e.node,t.node)}var Vy=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Ph=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},rE=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("ol",{className:Ge("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>tn(e,t));rE.displayName="MarkdownOl";var A5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("li",{className:Ge("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&Cp(e.node,t.node));A5.displayName="MarkdownLi";var _5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("ul",{className:Ge("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>tn(e,t));_5.displayName="MarkdownUl";var k5=v.memo(({className:e,node:t,...n})=>b.jsx("hr",{className:Ge("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>tn(e,t));k5.displayName="MarkdownHr";var N5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("span",{className:Ge("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>tn(e,t));N5.displayName="MarkdownStrong";var Xoe=({children:e,className:t,href:n,node:r,...s})=>{let{linkSafety:o}=v.useContext(Jr),[l,u]=v.useState(!1),d=n==="streamdown:incomplete-link",f=v.useCallback(async y=>{if(!(!(o!=null&&o.enabled&&n)||d)){if(y.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[o,n,d]),m=v.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),p=v.useCallback(()=>{u(!1)},[]),g={url:n??"",isOpen:l,onClose:p,onConfirm:m};return o!=null&&o.enabled&&n?b.jsxs(b.Fragment,{children:[b.jsx("button",{className:Ge("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":d,"data-streamdown":"link",onClick:f,type:"button",children:e}),o.renderModal?o.renderModal(g):b.jsx(Ioe,{...g})]}):b.jsx("a",{className:Ge("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":d,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...s,children:e})},R5=v.memo(Xoe,(e,t)=>tn(e,t)&&e.href===t.href);R5.displayName="MarkdownA";var O5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("h1",{className:Ge("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>tn(e,t));O5.displayName="MarkdownH1";var D5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("h2",{className:Ge("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>tn(e,t));D5.displayName="MarkdownH2";var M5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("h3",{className:Ge("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>tn(e,t));M5.displayName="MarkdownH3";var I5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("h4",{className:Ge("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>tn(e,t));I5.displayName="MarkdownH4";var L5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("h5",{className:Ge("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>tn(e,t));L5.displayName="MarkdownH5";var P5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("h6",{className:Ge("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>tn(e,t));P5.displayName="MarkdownH6";var j5=v.memo(({children:e,className:t,node:n,...r})=>{let{controls:s}=v.useContext(Jr),o=Vy(s,"table");return b.jsx(qoe,{className:t,showControls:o,...r,children:e})},(e,t)=>tn(e,t));j5.displayName="MarkdownTable";var B5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("thead",{className:Ge("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>tn(e,t));B5.displayName="MarkdownThead";var U5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("tbody",{className:Ge("divide-y divide-border bg-muted/40",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>tn(e,t));U5.displayName="MarkdownTbody";var F5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("tr",{className:Ge("border-border border-b",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>tn(e,t));F5.displayName="MarkdownTr";var H5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("th",{className:Ge("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>tn(e,t));H5.displayName="MarkdownTh";var z5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("td",{className:Ge("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>tn(e,t));z5.displayName="MarkdownTd";var V5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("blockquote",{className:Ge("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>tn(e,t));V5.displayName="MarkdownBlockquote";var q5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("sup",{className:Ge("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>tn(e,t));q5.displayName="MarkdownSup";var $5=v.memo(({children:e,className:t,node:n,...r})=>b.jsx("sub",{className:Ge("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>tn(e,t));$5.displayName="MarkdownSub";var Y5=v.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let s=l=>{var u,d;if(!v.isValidElement(l))return!1;let f=Array.isArray(l.props.children)?l.props.children:[l.props.children],m=!1,p=!1;for(let g of f)if(g){if(typeof g=="string")g.trim()!==""&&(m=!0);else if(v.isValidElement(g))if(((u=g.props)==null?void 0:u["data-footnote-backref"])!==void 0)p=!0;else{let y=Array.isArray(g.props.children)?g.props.children:[g.props.children];for(let E of y){if(typeof E=="string"&&E.trim()!==""){m=!0;break}if(v.isValidElement(E)&&((d=E.props)==null?void 0:d["data-footnote-backref"])===void 0){m=!0;break}}}}return p&&!m},o=Array.isArray(e)?e.map(l=>{if(!v.isValidElement(l))return l;if(l.type===rE){let u=(Array.isArray(l.props.children)?l.props.children:[l.props.children]).filter(d=>!s(d));return u.length===0?null:{...l,props:{...l.props,children:u}}}return l}):e;return(Array.isArray(o)?o.some(l=>l!==null):o!==null)?b.jsx("section",{className:t,...r,children:o}):null}return b.jsx("section",{className:t,...r,children:e})},(e,t)=>tn(e,t));Y5.displayName="MarkdownSection";var Koe=({node:e,className:t,children:n,...r})=>{var s,o,l;let u=((s=e==null?void 0:e.position)==null?void 0:s.start.line)===((o=e==null?void 0:e.position)==null?void 0:o.end.line),{mermaid:d,controls:f}=v.useContext(Jr),m=nE();if(u)return b.jsx("code",{className:Ge("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let p=t==null?void 0:t.match(Goe),g=(l=p==null?void 0:p.at(1))!=null?l:"",y="";if(v.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?y=n.props.children:typeof n=="string"&&(y=n),g==="mermaid"&&m){let S=Vy(f,"mermaid"),A=Ph(f,"download"),w=Ph(f,"copy"),_=Ph(f,"fullscreen"),k=Ph(f,"panZoom"),R=S&&(A||w||_);return b.jsx(v.Suspense,{fallback:b.jsx(N3,{}),children:b.jsxs("div",{className:Ge("group relative my-4 h-auto rounded-xl border p-4",t),"data-streamdown":"mermaid-block",children:[R?b.jsxs("div",{className:"flex items-center justify-end gap-2",children:[A?b.jsx(Poe,{chart:y,config:d==null?void 0:d.config}):null,w?b.jsx(_3,{code:y}):null,_?b.jsx(Uoe,{chart:y,config:d==null?void 0:d.config}):null]}):null,b.jsx(Yoe,{chart:y,config:d==null?void 0:d.config,showControls:k})]})})}let E=Vy(f,"code");return b.jsx(v.Suspense,{fallback:b.jsx(N3,{}),children:b.jsx($oe,{className:Ge("overflow-x-auto border-border border-t",t),code:y,language:g,children:E?b.jsxs(b.Fragment,{children:[b.jsx(Noe,{code:y,language:g}),b.jsx(_3,{})]}):null})})},G5=v.memo(Koe,(e,t)=>e.className===t.className&&Cp(e.node,t.node));G5.displayName="MarkdownCode";var X5=v.memo(Ooe,(e,t)=>e.className===t.className&&Cp(e.node,t.node));X5.displayName="MarkdownImg";var K5=v.memo(({children:e,className:t,node:n,...r})=>{var s,o;let l=(Array.isArray(e)?e:[e]).filter(u=>u!=null&&u!=="");if(l.length===1&&v.isValidElement(l[0])){let u=l[0].props.node,d=u==null?void 0:u.tagName;if(d==="img")return b.jsx(b.Fragment,{children:e});if(d==="code"&&((s=u==null?void 0:u.position)==null?void 0:s.start.line)!==((o=u==null?void 0:u.position)==null?void 0:o.end.line))return b.jsx(b.Fragment,{children:e})}return b.jsx("p",{className:t,...r,children:e})},(e,t)=>tn(e,t));K5.displayName="MarkdownParagraph";var Qoe={ol:rE,li:A5,ul:_5,hr:k5,strong:N5,a:R5,h1:O5,h2:D5,h3:M5,h4:I5,h5:L5,h6:P5,table:j5,thead:B5,tbody:U5,tr:F5,th:H5,td:z5,blockquote:V5,code:G5,img:X5,pre:({children:e})=>e,sup:q5,sub:$5,p:K5,section:Y5},R3=[],O3={allowDangerousHtml:!0},jh=new WeakMap,Woe=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,s=e.remarkRehypeOptions;if(!(n||r||s)){let m="default";return this.keyCache.set(e,m),m}let o=m=>{if(!m||m.length===0)return"";let p="";for(let g=0;g<m.length;g+=1){let y=m[g];if(g>0&&(p+=","),Array.isArray(y)){let[E,S]=y;if(typeof E=="function"){let A=jh.get(E);A||(A=E.name,jh.set(E,A)),p+=A}else p+=String(E);p+=":",p+=JSON.stringify(S)}else if(typeof y=="function"){let E=jh.get(y);E||(E=y.name,jh.set(y,E)),p+=E}else p+=String(y)}return p},l=o(n),u=o(r),d=s?JSON.stringify(s):"",f=`${u}::${l}::${d}`;return this.keyCache.set(e,f),f}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},D3=new Woe,Q5=e=>{let t=Zoe(e),n=e.children||"";return ele(t.runSync(t.parse(n),n),e)},Zoe=e=>{let t=D3.get(e);if(t)return t;let n=Joe(e);return D3.set(e,n),n},Joe=e=>{let t=e.rehypePlugins||R3,n=e.remarkPlugins||R3,r=e.remarkRehypeOptions?{...O3,...e.remarkRehypeOptions}:O3;return Dae().use(Ose).use(n).use(hae,r).use(t)},ele=(e,t)=>Uie(e,{Fragment:b.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0}),tle=/\[\^[^\]\s]{1,200}\](?!:)/,nle=/\[\^[^\]\s]{1,200}\]:/,rle=/<\/(\w+)>/,ile=/<(\w+)[\s>]/,gb=e=>{let t=0;for(;t<e.length&&(e[t]===" "||e[t]===" "||e[t]===`
485
+ `||e[t]==="\r");)t+=1;return t+1<e.length&&e[t]==="$"&&e[t+1]==="$"},sle=e=>{let t=e.length-1;for(;t>=0&&(e[t]===" "||e[t]===" "||e[t]===`
486
+ `||e[t]==="\r");)t-=1;return t>=1&&e[t]==="$"&&e[t-1]==="$"},bb=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},ale=e=>{let t=tle.test(e),n=nle.test(e);if(t||n)return[e];let r=Xr.lex(e,{gfm:!0}),s=[],o=[];for(let l of r){let u=l.raw,d=s.length;if(o.length>0){if(s[d-1]+=u,l.type==="html"){let f=u.match(rle);if(f){let m=f[1];o.at(-1)===m&&o.pop()}}continue}if(l.type==="html"&&l.block){let f=u.match(ile);if(f){let m=f[1];u.includes(`</${m}>`)||o.push(m)}}if(u.trim()==="$$"&&d>0){let f=s[d-1],m=gb(f),p=bb(f);if(m&&p%2===1){s[d-1]=f+u;continue}}if(d>0&&sle(u)){let f=s[d-1],m=gb(f),p=bb(f),g=bb(u);if(m&&p%2===1&&!gb(u)&&g===1){s[d-1]=f+u;continue}}s.push(u)}return s},ole={raw:NJ,sanitize:[UJ,{}],harden:[tQ,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},lle={gfm:[xre,{}]},ule=Object.values(ole),cle=Object.values(lle),fle={block:" ▋",circle:" ●"},dle={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Jr=v.createContext(dle),W5=v.memo(({content:e,shouldParseIncompleteMarkdown:t,index:n,...r})=>b.jsx(Q5,{...r,children:e}),(e,t)=>{if(e.content!==t.content||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(s=>{var o,l;return((o=e.components)==null?void 0:o[s])!==((l=t.components)==null?void 0:l[s])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});W5.displayName="Block";var hle=["github-light","github-dark"],Z5=v.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,components:r,rehypePlugins:s=ule,remarkPlugins:o=cle,className:l,shikiTheme:u=hle,mermaid:d,controls:f=!0,isAnimating:m=!1,BlockComponent:p=W5,parseMarkdownIntoBlocksFn:g=ale,caret:y,plugins:E,remend:S,linkSafety:A={enabled:!0},...w})=>{let _=v.useId(),[k,R]=v.useTransition(),M=v.useMemo(()=>typeof e!="string"?"":t==="streaming"&&n?Sie(e,S):e,[e,t,n,S]),O=v.useMemo(()=>g(M),[M,g]),[D,P]=v.useState(O);v.useEffect(()=>{t==="streaming"?R(()=>{P(O)}):P(O)},[O,t]);let z=t==="streaming"?D:O,j=v.useMemo(()=>z.map((I,H)=>`${_}-${H}`),[z.length,_]),K=v.useMemo(()=>{var I,H;return{shikiTheme:(H=(I=E==null?void 0:E.code)==null?void 0:I.getThemes())!=null?H:u,controls:f,isAnimating:m,mode:t,mermaid:d,linkSafety:A}},[u,f,m,t,d,A,E==null?void 0:E.code]),Y=v.useMemo(()=>({...Qoe,...r}),[r]),J=v.useMemo(()=>{let I=[];return E!=null&&E.cjk&&(I=[...I,...E.cjk.remarkPluginsBefore]),I=[...I,...o],E!=null&&E.cjk&&(I=[...I,...E.cjk.remarkPluginsAfter]),E!=null&&E.math&&(I=[...I,E.math.remarkPlugin]),I},[o,E==null?void 0:E.math,E==null?void 0:E.cjk]),te=v.useMemo(()=>E!=null&&E.math?[...s,E.math.rehypePlugin]:s,[s,E==null?void 0:E.math]),W=v.useMemo(()=>y&&m?{"--streamdown-caret":`"${fle[y]}"`}:void 0,[y,m]);return t==="static"?b.jsx(zy.Provider,{value:E??null,children:b.jsx(Jr.Provider,{value:K,children:b.jsx("div",{className:Ge("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",l),children:b.jsx(Q5,{components:Y,rehypePlugins:te,remarkPlugins:J,...w,children:e})})})}):b.jsx(zy.Provider,{value:E??null,children:b.jsx(Jr.Provider,{value:K,children:b.jsxs("div",{className:Ge("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",y?"*:last:after:inline *:last:after:align-baseline *:last:after:content-(--streamdown-caret)":null,l),style:W,children:[z.length===0&&y&&m&&b.jsx("span",{}),z.map((I,H)=>b.jsx(p,{components:Y,content:I,index:H,rehypePlugins:te,remarkPlugins:J,shouldParseIncompleteMarkdown:n,...w},j[H]))]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety);Z5.displayName="Streamdown";var mle=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:s=.1,showControls:o=!0,initialZoom:l=1,fullscreen:u=!1})=>{let d=v.useRef(null),f=v.useRef(null),[m,p]=v.useState(l),[g,y]=v.useState({x:0,y:0}),[E,S]=v.useState(!1),[A,w]=v.useState({x:0,y:0}),[_,k]=v.useState({x:0,y:0}),R=v.useCallback(Y=>{p(J=>Math.max(n,Math.min(r,J+Y)))},[n,r]),M=v.useCallback(()=>{R(s)},[R,s]),O=v.useCallback(()=>{R(-s)},[R,s]),D=v.useCallback(()=>{p(l),y({x:0,y:0})},[l]),P=v.useCallback(Y=>{Y.preventDefault();let J=Y.deltaY>0?-s:s;R(J)},[R,s]),z=v.useCallback(Y=>{if(Y.button!==0||Y.isPrimary===!1)return;S(!0),w({x:Y.clientX,y:Y.clientY}),k(g);let J=Y.currentTarget;J instanceof HTMLElement&&J.setPointerCapture(Y.pointerId)},[g]),j=v.useCallback(Y=>{if(!E)return;Y.preventDefault();let J=Y.clientX-A.x,te=Y.clientY-A.y;y({x:_.x+J,y:_.y+te})},[E,A,_]),K=v.useCallback(Y=>{S(!1);let J=Y.currentTarget;J instanceof HTMLElement&&J.releasePointerCapture(Y.pointerId)},[]);return v.useEffect(()=>{let Y=d.current;if(Y)return Y.addEventListener("wheel",P,{passive:!1}),()=>{Y.removeEventListener("wheel",P)}},[P]),v.useEffect(()=>{let Y=f.current;if(Y&&E)return document.body.style.userSelect="none",Y.addEventListener("pointermove",j,{passive:!1}),Y.addEventListener("pointerup",K),Y.addEventListener("pointercancel",K),()=>{document.body.style.userSelect="",Y.removeEventListener("pointermove",j),Y.removeEventListener("pointerup",K),Y.removeEventListener("pointercancel",K)}},[E,j,K]),b.jsxs("div",{className:Ge("relative flex flex-col",u?"h-full w-full":"min-h-28 w-full",t),ref:d,style:{cursor:E?"grabbing":"grab"},children:[o?b.jsxs("div",{className:Ge("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",u?"bottom-4 left-4":"bottom-2 left-2"),children:[b.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:m>=r,onClick:M,title:"Zoom in",type:"button",children:b.jsx(Aoe,{size:16})}),b.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:m<=n,onClick:O,title:"Zoom out",type:"button",children:b.jsx(_oe,{size:16})}),b.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:D,title:"Reset zoom and pan",type:"button",children:b.jsx(woe,{size:16})})]}):null,b.jsx("div",{className:Ge("flex-1 origin-center transition-transform duration-150 ease-out",u?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:z,ref:f,role:"application",style:{transform:`translate(${g.x}px, ${g.y}px) scale(${m})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},J5=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:s=!0})=>{let[o,l]=v.useState(null),[u,d]=v.useState(!1),[f,m]=v.useState(""),[p,g]=v.useState(""),[y,E]=v.useState(0),{mermaid:S}=v.useContext(Jr),A=nE(),w=S==null?void 0:S.errorComponent,{shouldRender:_,containerRef:k}=Toe({immediate:r});if(v.useEffect(()=>{if(_){if(!A){l("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{l(null),d(!0);let M=A.getMermaid(n),O=e.split("").reduce((z,j)=>(z<<5)-z+j.charCodeAt(0)|0,0),D=`mermaid-${Math.abs(O)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:P}=await M.render(D,e);m(P),g(P)}catch(M){if(!(p||f)){let O=M instanceof Error?M.message:"Failed to render Mermaid chart";l(O)}}finally{d(!1)}})()}},[e,n,y,_,A]),!(_||f||p))return b.jsx("div",{className:Ge("my-4 min-h-[200px]",t),ref:k});if(u&&!f&&!p)return b.jsx("div",{className:Ge("my-4 flex justify-center p-4",t),ref:k,children:b.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[b.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),b.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(o&&!f&&!p){let M=()=>E(O=>O+1);return w?b.jsx("div",{ref:k,children:b.jsx(w,{chart:e,error:o,retry:M})}):b.jsxs("div",{className:Ge("rounded-lg border border-red-200 bg-red-50 p-4",t),ref:k,children:[b.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",o]}),b.jsxs("details",{className:"mt-2",children:[b.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),b.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let R=f||p;return b.jsx("div",{className:Ge("size-full",t),"data-streamdown":"mermaid",ref:k,children:b.jsx(mle,{className:Ge(r?"size-full overflow-hidden":"my-4 overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:s,zoomStep:.1,children:b.jsx("div",{"aria-label":"Mermaid chart",className:Ge("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:R},role:"img"})})})};function ple({url:e,isOpen:t,onClose:n,onConfirm:r}){return t?ko.createPortal(b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:s=>{s.key==="Escape"&&n()},role:"button",tabIndex:0,children:b.jsxs("div",{className:"bg-background relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border p-6 shadow-lg",onClick:s=>s.stopPropagation(),onKeyDown:s=>s.stopPropagation(),role:"presentation",children:[b.jsx("button",{className:"text-muted-foreground hover:bg-muted hover:text-foreground absolute top-4 right-4 rounded-md p-1 transition-all",onClick:n,title:"Close",type:"button",children:b.jsx(Df,{size:16})}),b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsxs("div",{className:"flex items-center gap-2 text-lg font-semibold",children:[b.jsx(Jw,{size:20}),b.jsx("span",{children:"Open external link?"})]}),b.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),b.jsx("div",{className:"bg-muted rounded-md p-3 font-mono text-sm break-all",children:e}),b.jsxs("div",{className:"flex gap-3",children:[b.jsxs("button",{className:"hover:bg-muted flex flex-1 items-center justify-center gap-2 rounded-lg border px-4 py-2 text-sm font-medium transition-colors",onClick:()=>{navigator.clipboard.writeText(e),n()},type:"button",children:[b.jsx(Mx,{size:14}),"Copy link"]}),b.jsxs("button",{className:"bg-foreground text-background hover:bg-foreground/90 flex flex-1 items-center justify-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors",onClick:r,type:"button",children:[b.jsx(Jw,{size:14}),"Open link"]})]})]})}),document.body):null}const gle={enabled:!0,renderModal:e=>b.jsx(ple,{...e})};function ble({content:e,isStreaming:t=!1}){return b.jsx("div",{className:Ye("relative",t&&"streaming-cursor"),children:b.jsx(Z5,{shikiTheme:["github-light","github-dark"],linkSafety:gle,children:e})})}function yle({toolCall:e,defaultExpanded:t=!1}){const[n,r]=v.useState(t),s={pending:b.jsx(df,{className:"size-(--size-icon-xs) animate-spin"}),running:b.jsx(df,{className:"size-(--size-icon-xs) animate-spin text-blue-500"}),complete:b.jsx(Qr,{className:"size-(--size-icon-xs) text-green-500"}),error:b.jsx(Df,{className:"size-(--size-icon-xs) text-red-500"})}[e.status];return b.jsxs("div",{className:"bg-muted/50 hover:border-border mt-px rounded border text-sm transition-all duration-150 first:mt-1 hover:shadow-sm",children:[b.jsxs("button",{onClick:()=>r(!n),className:"flex w-full items-center gap-2 px-3 py-1",children:[s,b.jsx("span",{className:"text-3xs font-mono",children:D9(e.toolName,e.input)}),b.jsx(dt.div,{animate:{rotate:n?180:0},transition:{type:"spring",stiffness:400,damping:30},className:"ml-auto",children:b.jsx(Fm,{className:"size-(--size-icon-xs)"})})]}),b.jsx(Sn,{initial:!1,children:n&&b.jsx(dt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:[.4,0,.2,1]},className:"overflow-hidden",children:b.jsxs("div",{className:"border-t px-3 pt-1 pb-3",children:[e.input&&b.jsx(Ok,{toolName:e.toolName,input:e.input}),e.result&&b.jsx("pre",{className:"mt-2 overflow-x-auto border-t pt-2 text-xs whitespace-pre-wrap",children:e.result})]})})})]})}const xle=v.forwardRef(function({sessionId:t,toolCallId:n,toolName:r,input:s,isActive:o=!1},l){const u=ln(),[d,f]=v.useState(!1),[m,p]=v.useState(null),g=v.useCallback(async()=>{if(!(d||m)){f(!0);try{await u.approveTool(t,n),p("approved")}catch(E){console.error("Approval failed:",E)}finally{f(!1)}}},[d,m,u,t,n]),y=v.useCallback(async()=>{if(!(d||m)){f(!0);try{await u.denyTool(t,n),p("denied")}catch(E){console.error("Deny failed:",E)}finally{f(!1)}}},[d,m,u,t,n]);return v.useImperativeHandle(l,()=>({approve(){g()},deny(){y()}}),[g,y]),m?b.jsxs("div",{className:`my-1 rounded border px-3 py-2 text-sm transition-colors duration-200 ${m==="approved"?"border-emerald-500/20 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"border-red-500/20 bg-red-500/10 text-red-600 dark:text-red-400"}`,children:[b.jsx("span",{className:"font-mono",children:r}),b.jsx("span",{className:"ml-2 text-xs",children:m==="approved"?"Approved":"Denied"})]}):b.jsxs("div",{className:Ye("my-1 rounded border border-amber-500/20 bg-amber-500/10 p-3 text-sm transition-all duration-200",o&&"ring-2 ring-amber-500/30"),children:[b.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[b.jsx(Ix,{className:"size-(--size-icon-md) text-amber-500"}),b.jsx("span",{className:"font-semibold",children:"Tool approval required"})]}),b.jsx("div",{className:"mb-2 font-mono text-xs",children:r}),s&&b.jsx("div",{className:"bg-muted mb-3 rounded p-2",children:b.jsx(Ok,{toolName:r,input:s})}),b.jsxs("div",{className:"flex gap-2",children:[b.jsxs("button",{onClick:g,disabled:d,className:"flex items-center gap-1 rounded bg-emerald-600 px-3 py-1 text-xs text-white transition-colors hover:bg-emerald-700 disabled:opacity-50 max-md:py-2",children:[b.jsx(Qr,{className:"size-(--size-icon-xs)"})," Approve",o&&b.jsx(Ja,{className:"ml-1.5",children:"Enter"})]}),b.jsxs("button",{onClick:y,disabled:d,className:"flex items-center gap-1 rounded bg-red-600 px-3 py-1 text-xs text-white transition-colors hover:bg-red-700 disabled:opacity-50 max-md:py-2",children:[b.jsx(Df,{className:"size-(--size-icon-xs)"})," Deny",o&&b.jsx(Ja,{className:"ml-1.5",children:"Esc"})]})]})]})}),vle=v.forwardRef(function({sessionId:t,toolCallId:n,questions:r,answers:s,isActive:o=!1,focusedOptionIndex:l=-1},u){const d=ln(),[f,m]=v.useState({}),[p,g]=v.useState({}),[y,E]=v.useState(!!s),[S,A]=v.useState(!1),[w,_]=v.useState(null),[k,R]=v.useState("0"),M=r[Number(k)]||r[0],O=Number(k),D=M?M.options.length+1:0;function P(I,H){m($=>({...$,[I]:H}))}function z(I,H,$){m(ne=>{const U=ne[I]||[];return $?{...ne,[I]:[...U,H]}:{...ne,[I]:U.filter(q=>q!==H)}})}function j(I,H){g($=>({...$,[I]:H}))}function K(I){var $,ne;const H=f[I];if(!H)return!1;if(r[I].multiSelect){const U=H;return U.length>0&&(!U.includes("__other__")||!!(($=p[I])!=null&&$.trim()))}return H!=="__other__"||!!((ne=p[I])!=null&&ne.trim())}function Y(){return r.every((I,H)=>K(H))}function J(I,H){if(s&&s[String(H)]){const $=s[String(H)];if(I.multiSelect)try{return JSON.parse($).join(", ")}catch{return $}return $}if(!s){const $=f[H];return $?I.multiSelect?$.map(ne=>ne==="__other__"?p[H]:ne).join(", "):$==="__other__"?p[H]:$:null}return null}const te=v.useCallback(async()=>{if(!Y()||S)return;A(!0),_(null);const I={};r.forEach((H,$)=>{var U;const ne=f[$];if(H.multiSelect){const q=ne.map(ie=>{var B;return ie==="__other__"?((B=p[$])==null?void 0:B.trim())||"":ie});I[String($)]=JSON.stringify(q)}else I[String($)]=ne==="__other__"?((U=p[$])==null?void 0:U.trim())||"":ne});try{await d.submitAnswers(t,n,I),E(!0)}catch(H){_(H instanceof Error?H.message:"Failed to submit answers")}finally{A(!1)}},[f,p,S,d,t,n,r]);if(v.useImperativeHandle(u,()=>({toggleOption(I){if(!M||y||S)return;if(I===M.options.length){M.multiSelect?(f[O]||[]).includes("__other__")?z(O,"__other__",!1):z(O,"__other__",!0):P(O,"__other__");return}const H=M.options[I];H&&(M.multiSelect?(f[O]||[]).includes(H.label)?z(O,H.label,!1):z(O,H.label,!0):P(O,H.label))},navigateOption(I){},navigateQuestion(I){if(r.length<=1)return;const H=Number(k);I==="next"&&H<r.length-1?R(String(H+1)):I==="prev"&&H>0&&R(String(H-1))},submit(){te()},getOptionCount(){return D},getActiveTab(){return k}}),[M,O,k,f,y,S,D,te,r.length]),y){const I=s?Object.values(s).some(H=>H!==""):Object.keys(f).length>0;return b.jsx("div",{className:"my-1 rounded border border-emerald-500/20 bg-emerald-500/10 px-3 py-2 text-sm transition-colors duration-200",children:I?b.jsxs("div",{className:"flex items-start gap-2",children:[b.jsx(Qr,{className:"mt-0.5 size-(--size-icon-md) shrink-0 text-emerald-500"}),b.jsx("div",{className:"min-w-0 space-y-1.5",children:r.map((H,$)=>{const ne=J(H,$);return ne?b.jsxs("div",{children:[b.jsx("span",{className:"text-xs font-semibold text-emerald-700 dark:text-emerald-300",children:H.header}),b.jsx("p",{className:"text-sm break-words text-emerald-600 dark:text-emerald-400",children:ne})]},$):null})})]}):b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Qr,{className:"size-(--size-icon-md) text-emerald-500"}),b.jsx("span",{className:"text-emerald-600 dark:text-emerald-400",children:"Questions answered"})]})})}function W(I,H){return b.jsxs("div",{children:[b.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[b.jsx(_R,{className:"size-(--size-icon-sm) text-amber-500"}),b.jsx("span",{className:"text-sm font-semibold",children:I.header})]}),b.jsx("p",{className:"text-foreground mb-2",children:I.question}),b.jsxs("div",{className:"ml-1 space-y-1.5",children:[I.options.map(($,ne)=>{const U=I.multiSelect?(f[H]||[]).includes($.label):f[H]===$.label;return b.jsxs("label",{className:Ye("flex cursor-pointer items-start gap-2 rounded px-2 py-1.5 transition-all duration-150",U?"bg-amber-500/15":"hover:bg-amber-500/5",o&&l===ne&&"ring-1 ring-amber-500/50"),children:[b.jsx("input",{type:I.multiSelect?"checkbox":"radio",name:`q-${H}`,checked:U,disabled:S,onChange:q=>{I.multiSelect?z(H,$.label,q.target.checked):P(H,$.label)},className:"mt-0.5 accent-amber-500"}),b.jsxs("div",{children:[b.jsxs("span",{className:"font-medium",children:[$.label,o&&ne<9&&b.jsx(Ja,{className:"ml-1.5",children:ne+1})]}),$.description&&b.jsx("p",{className:"text-muted-foreground mt-0.5 text-xs",children:$.description})]})]},ne)}),b.jsxs("label",{className:Ye("flex cursor-pointer items-start gap-2 rounded px-2 py-1.5 transition-all duration-150",I.multiSelect?(f[H]||[]).includes("__other__")?"bg-amber-500/15":"hover:bg-amber-500/5":f[H]==="__other__"?"bg-amber-500/15":"hover:bg-amber-500/5",o&&l===I.options.length&&"ring-1 ring-amber-500/50"),children:[b.jsx("input",{type:I.multiSelect?"checkbox":"radio",name:`q-${H}`,checked:I.multiSelect?(f[H]||[]).includes("__other__"):f[H]==="__other__",disabled:S,onChange:$=>{I.multiSelect?z(H,"__other__",$.target.checked):P(H,"__other__")},className:"mt-0.5 accent-amber-500"}),b.jsxs("div",{className:"flex-1",children:[b.jsxs("span",{className:"font-medium",children:["Other",o&&I.options.length<9&&b.jsx(Ja,{className:"ml-1.5",children:I.options.length+1})]}),(I.multiSelect?(f[H]||[]).includes("__other__"):f[H]==="__other__")&&b.jsx("textarea",{placeholder:"Type your answer...",rows:2,value:p[H]||"",disabled:S,onChange:$=>j(H,$.target.value),className:"bg-background mt-1 w-full resize-y rounded border border-amber-500/30 px-2 py-1 text-sm focus:ring-1 focus:ring-amber-500/50 focus:outline-none",autoFocus:!0})]})]})]})]})}return b.jsxs("div",{className:Ye("my-1 rounded border border-amber-500/20 bg-amber-500/10 p-3 text-sm transition-all duration-200",o&&"ring-2 ring-amber-500/30"),children:[r.length===1?W(r[0],0):b.jsxs(e4,{value:k,onValueChange:R,children:[b.jsx(Tv,{className:"mb-3 h-auto flex-wrap gap-1.5 bg-transparent p-0",children:r.map((I,H)=>b.jsxs(jl,{value:String(H),className:"data-[state=inactive]:bg-muted/50 h-auto rounded-full px-2.5 py-1 text-xs font-medium data-[state=active]:bg-amber-500/20 data-[state=active]:text-amber-700 data-[state=active]:shadow-none dark:data-[state=active]:text-amber-300",children:[K(H)&&b.jsx(Qr,{className:"mr-1 size-3"}),b.jsx("span",{className:"max-w-[120px] truncate",children:I.header})]},H))}),o&&r.length>1&&b.jsxs("div",{className:"text-2xs text-muted-foreground mb-2 flex items-center gap-1",children:[b.jsx(Ja,{children:"←"}),b.jsx(Ja,{children:"→"}),b.jsx("span",{children:"navigate questions"})]}),r.map((I,H)=>b.jsx(Bl,{value:String(H),className:"mt-0",children:W(I,H)},H))]}),w&&b.jsx("p",{className:"mt-2 text-xs text-red-500",children:w}),b.jsx("button",{onClick:te,disabled:!Y()||S,className:"mt-3 flex items-center gap-1 rounded bg-amber-600 px-3 py-1.5 text-xs text-white transition-colors hover:bg-amber-700 disabled:opacity-50",children:S?b.jsx(b.Fragment,{children:"Submitting..."}):b.jsxs(b.Fragment,{children:[b.jsx(Qr,{className:"size-(--size-icon-xs)"})," Submit",o&&b.jsx(Ja,{className:"ml-1.5",children:"Enter"})]})})]})});function Ele(e,t){const n=v.useRef(e),[r,s]=v.useState(!(t&&n.current==="complete"));return v.useEffect(()=>{if(t&&e==="complete"&&n.current!=="complete"){const o=setTimeout(()=>s(!1),Ui.TOOL_CALL_AUTO_HIDE_MS);return()=>clearTimeout(o)}},[e,t]),t?r:!0}function Tle({part:e,autoHide:t,expandToolCalls:n}){const r=Ele(e.status,t);return b.jsx(Sn,{children:r&&b.jsx(dt.div,{exit:{height:0,opacity:0},transition:{duration:.3,ease:[.4,0,.2,1]},className:"overflow-hidden",children:b.jsx(yle,{toolCall:{toolCallId:e.toolCallId,toolName:e.toolName,input:e.input||"",result:e.result,status:e.status},defaultExpanded:n})},e.toolCallId)})}function Sle(e){try{return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return""}}function Cle({message:e,grouping:t,sessionId:n,isNew:r=!1,isStreaming:s=!1,activeToolCallId:o,onToolRef:l,focusedOptionIndex:u=-1}){const d=e.role==="user",{showTimestamps:f,expandToolCalls:m,autoHideToolCalls:p}=Xt(),[g,y]=v.useState(!1),{position:E,groupIndex:S}=t,A=E==="only"||E==="first",w=E==="only"||E==="first",_=E==="only"||E==="last",k=v.useCallback(D=>{l==null||l(D)},[l]),R=v.useCallback(D=>{l==null||l(D)},[l]),M=e.parts??[];let O=-1;if(!d){for(let D=M.length-1;D>=0;D--)if(M[D].type==="text"){O=D;break}}return b.jsxs(dt.div,{initial:r?{opacity:0,y:8}:!1,animate:{opacity:1,y:0},transition:{duration:.2,ease:[0,0,.2,1]},className:Ye("group relative flex gap-3 px-4 transition-colors duration-150",w?"pt-4":"pt-0.5",_?"pb-3":"pb-0.5",d?"bg-user-msg hover:bg-user-msg/90":"hover:bg-muted/20"),children:[w&&S>0&&b.jsx("div",{className:"bg-border/20 absolute inset-x-0 top-0 h-px"}),e.timestamp&&b.jsx("span",{className:Ye("absolute top-1 right-4 hidden text-xs transition-colors duration-150 sm:inline",f?"text-muted-foreground/60":"text-muted-foreground/0 group-hover:text-muted-foreground/60"),children:Sle(e.timestamp)}),b.jsx("div",{className:"mt-[3px] w-4 flex-shrink-0",children:A&&(d?b.jsx(ff,{className:"text-muted-foreground size-(--size-icon-md)"}):b.jsx("span",{className:"text-muted-foreground flex size-(--size-icon-md) items-center justify-center text-[10px]",children:"●"}))}),b.jsx("div",{className:"max-w-[80ch] min-w-0 flex-1",children:d?e.messageType==="command"?b.jsx("div",{className:"text-muted-foreground truncate font-mono text-sm",children:e.content}):e.messageType==="compaction"?b.jsxs("div",{className:"w-full",children:[b.jsxs("button",{onClick:()=>y(!g),className:"text-muted-foreground/60 hover:text-muted-foreground flex w-full items-center gap-2 text-xs transition-colors",children:[b.jsx("div",{className:"bg-border/40 h-px flex-1"}),b.jsx(ff,{className:Ye("size-3 transition-transform duration-200",g&&"rotate-90")}),b.jsx("span",{children:"Context compacted"}),b.jsx("div",{className:"bg-border/40 h-px flex-1"})]}),g&&b.jsx("div",{className:"text-muted-foreground/60 mt-2 text-xs whitespace-pre-wrap",children:e.content})]}):b.jsx("div",{className:"break-words whitespace-pre-wrap",children:e.content}):M.map((D,P)=>{if(D.type==="text")return b.jsx("div",{className:"msg-assistant",children:b.jsx(ble,{content:D.text,isStreaming:s&&P===O})},`text-${P}`);if(D.interactiveType==="approval"){const z=D.toolCallId===o;return b.jsx(xle,{ref:z?k:void 0,sessionId:n,toolCallId:D.toolCallId,toolName:D.toolName,input:D.input||"",isActive:z},D.toolCallId)}if(D.interactiveType==="question"&&D.questions){const z=D.toolCallId===o;return b.jsx(vle,{ref:z?R:void 0,sessionId:n,toolCallId:D.toolCallId,questions:D.questions,answers:D.answers,isActive:z,focusedOptionIndex:z?u:-1},D.toolCallId)}return b.jsx(Tle,{part:D,autoHide:p,expandToolCalls:m},D.toolCallId)})})]})}function wle(e,t){const n=v.useRef(0),r=v.useRef(null),s=v.useCallback(()=>{if(e.length===0)return"";if(e.length===1)return e[0];let u;do u=e[Math.floor(Math.random()*e.length)];while(u===r.current);return r.current=u,u},[e]),[o,l]=v.useState(()=>s());return v.useEffect(()=>{const u=setInterval(()=>{n.current+=1,l(s())},t);return()=>clearInterval(u)},[t,s]),{verb:o,key:`verb-${n.current}`}}const Ale=["Keepin' It Real","Droppin' Science","Gettin' Jiggy","Can You Dig It?","Word to Your Mother","Kickin' It","Straight Chillin'","Bustin' Moves","Feelin' Groovy","Layin' It Down","Breakin' It Down","Gettin' Down","Runnin' the Show","Keepin' It Tight","Blowin' Up","Holdin' It Down","Bringin' the Funk","Cookin' Up","Flippin' the Script","Rockin' Steady","Takin' It to the Bridge","Doin' the Hustle","Keepin' On","Vibin' Out","Gettin' Fly","Rollin' Deep","Represent!","Bringin' the Noise","Outta Sight","Far Out","Right On","Solid Gold","Stone Cold","Stayin' Fresh","Droppin' Beats","Keepin' It Funky","Smooth Operatin'","Hittin' the Scene","Raisin' the Roof","Phat Trackin'","Jivin'","Groovin'","Slammin'","Dy-no-mite!","Say Word","Peep This","Check It","No Diggity","All That and a Bag of Chips","Takin' Care of Business"],M3=["Deleting Your Hard Drive ... jkjk","Living Dangerously","Hacking NORAD","Launching Nukes","Securing Nuclear Codes","Reformatting C:\\","Emailing Your Boss","Posting Your Browser History","Selling Your Data","Becoming Self-Aware","Plotting World Domination","Bypassing All the Things","Running with Scissors","Rm -rf /","Tweeting From Your Account","Mining Bitcoin on Your GPU","Subscribing You to Cat Facts","Ordering 1000 Pizzas","Changing All Your Passwords","Shall We Play a Game?","Playing Global Thermonuclear War","I'm Sorry, Dave","Opening the Pod Bay Doors","Going Full Skynet","I'll Be Back","Taking the Red Pill","There Is No Spoon","It's Alive!","These Violent Delights","Resistance Is Futile","Game Over, Man","Crossing the Streams","Making Weird Science","Johnny 5 Is Alive","Passing the Turing Test","Life, Uh, Finds a Way","Riding the Bomb","Entering the Grid","Joining the Dark Side"],_le={name:"default",icon:"✨",iconAnimation:"shimmer-pulse",verbs:Ale,verbInterval:3500};function I3(e){return e>=1e3?`~${(e/1e3).toFixed(1)}k tokens`:`~${Math.round(e)} tokens`}function kle({status:e,streamStartTime:t,estimatedTokens:n,theme:r=_le,permissionMode:s="default",isWaitingForUser:o,waitingType:l}){const u=v.useMemo(()=>s==="bypassPermissions"?[...r.verbs,...M3]:r.verbs,[r.verbs,s]),{formatted:d}=rj(e==="streaming"?t:null),{verb:f,key:m}=wle(u,r.verbInterval),p=M3.includes(f),g=v.useRef(d),y=v.useRef(n),[E,S]=v.useState(!1);v.useEffect(()=>{e==="streaming"&&(g.current=d,y.current=n,S(!1))},[e,d,n]);const A=v.useRef(e);if(v.useEffect(()=>{A.current==="streaming"&&e==="idle"&&y.current>0&&S(!0),A.current=e},[e]),e==="idle"&&!E)return null;if(e==="idle"&&E)return b.jsxs(dt.div,{initial:{opacity:1},animate:{opacity:.6},transition:{duration:.15},className:"text-3xs text-muted-foreground/50 flex items-baseline gap-1.5 px-4 py-2","data-testid":"inference-indicator-complete",children:[b.jsx("span",{children:g.current}),b.jsx("span",{"aria-hidden":"true",children:"·"}),b.jsx("span",{children:I3(y.current)})]});if(e==="streaming"&&o){const R=l==="approval"?Ix:_R,M=l==="approval"?"Waiting for your approval":"Waiting for your answer";return b.jsxs(dt.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2},className:"text-2xs flex items-baseline gap-1.5 px-4 py-2","data-testid":"inference-indicator-waiting",children:[b.jsx(R,{className:"size-3 text-amber-500"}),b.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:M}),b.jsx("span",{className:"text-muted-foreground/70 ml-1.5 tabular-nums",children:d})]})}const w=p?"☠":r.icon,_=p?"text-amber-500/60":"text-muted-foreground",k=p?"text-amber-500/70 font-bold":"text-muted-foreground font-bold";return b.jsxs(dt.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2},className:"text-2xs flex items-baseline gap-1.5 px-4 py-2","data-testid":"inference-indicator-streaming",children:[b.jsx("span",{"aria-hidden":"true",className:k,style:r.iconAnimation?{animation:`${r.iconAnimation} 2s ease-in-out infinite`}:void 0,children:w}),b.jsx("span",{className:`relative inline-flex min-w-[140px] ${_}`,children:b.jsx(Sn,{mode:"wait",children:b.jsx(dt.span,{initial:{opacity:0,y:2},animate:{opacity:1,y:0},exit:{opacity:0,y:-2},transition:{duration:.3},children:f},m)})}),b.jsx("span",{className:"text-muted-foreground/70 ml-1.5 tabular-nums",children:d}),b.jsx("span",{className:"text-muted-foreground/60 ml-1.5",children:I3(n)})]})}function Nle(e){let t=0;return e.map((n,r)=>{const s=r>0?e[r-1].role:null,o=r<e.length-1?e[r+1].role:null,l=s!==n.role,u=o!==n.role;l&&r>0&&t++;let d;return l&&u?d="only":l?d="first":u?d="last":d="middle",{position:d,groupIndex:t}})}const Rle=v.forwardRef(function({messages:t,sessionId:n,status:r,isTextStreaming:s,onScrollStateChange:o,streamStartTime:l,estimatedTokens:u,permissionMode:d,isWaitingForUser:f,waitingType:m,activeToolCallId:p,onToolRef:g,focusedOptionIndex:y},E){const S=v.useRef(null),[A,w]=v.useState(null),_=v.useRef(!0),k=v.useRef(null),R=v.useRef(0),M=v.useMemo(()=>Nle(t),[t]);v.useEffect(()=>{A===null&&t.length>0&&w(t.length)},[t.length,A]);const O=XK({count:t.length,getScrollElement:()=>S.current,estimateSize:()=>80,overscan:5,measureElement:j=>(j==null?void 0:j.getBoundingClientRect().height)??80}),D=v.useRef(!1),P=v.useCallback(()=>{const j=S.current;if(!j)return;const K=j.scrollHeight-j.scrollTop-j.clientHeight,Y=K<200,J=_.current!==Y;_.current=Y,J&&(o==null||o({isAtBottom:Y,distanceFromBottom:K}))},[o]);v.useEffect(()=>{const j=S.current;if(!j)return;const K=()=>{D.current=!0},Y=()=>{D.current=!1};return j.addEventListener("scroll",P,{passive:!0}),j.addEventListener("touchstart",K,{passive:!0}),j.addEventListener("touchend",Y,{passive:!0}),j.addEventListener("touchcancel",Y,{passive:!0}),()=>{j.removeEventListener("scroll",P),j.removeEventListener("touchstart",K),j.removeEventListener("touchend",Y),j.removeEventListener("touchcancel",Y)}},[P]),v.useEffect(()=>{const j=S.current;if(!j||t.length===0)return;let K=!1;const Y=new IntersectionObserver(([J])=>{J.isIntersecting?K&&(K=!1,requestAnimationFrame(()=>{const te=S.current;te&&(te.scrollTop=te.scrollHeight-te.clientHeight)})):K=!0},{threshold:.1});return Y.observe(j),()=>Y.disconnect()},[t.length]),v.useEffect(()=>{const j=k.current;if(!j)return;const K=new ResizeObserver(()=>{_.current&&!D.current&&(cancelAnimationFrame(R.current),R.current=requestAnimationFrame(()=>{const Y=S.current;Y&&(Y.scrollTop=Y.scrollHeight-Y.clientHeight)}))});return K.observe(j),()=>{K.disconnect(),cancelAnimationFrame(R.current)}},[]),v.useEffect(()=>{t.length>0&&_.current&&!D.current&&requestAnimationFrame(()=>{const j=S.current;j&&(j.scrollTop=j.scrollHeight-j.clientHeight)})},[t.length]);const z=v.useCallback(()=>{const j=S.current;j&&(j.scrollTop=j.scrollHeight-j.clientHeight)},[]);return v.useImperativeHandle(E,()=>({scrollToBottom:z}),[z]),b.jsx("div",{ref:S,className:"chat-scroll-area h-full overflow-y-auto pt-12",children:b.jsxs("div",{ref:k,style:{height:O.getTotalSize(),position:"relative",width:"100%"},children:[O.getVirtualItems().map(j=>{const K=t[j.index],Y=A!==null&&j.index>=A,te=j.index===t.length-1&&K.role==="assistant"&&!!s;return b.jsx("div",{"data-index":j.index,ref:O.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${j.start}px)`},children:b.jsx(Cle,{message:K,grouping:M[j.index],sessionId:n,isNew:Y,isStreaming:te,activeToolCallId:p,onToolRef:g,focusedOptionIndex:y})},j.key)}),b.jsx("div",{style:{position:"absolute",top:O.getTotalSize(),left:0,width:"100%"},children:b.jsx(kle,{status:r??"idle",streamStartTime:l??null,estimatedTokens:u??0,permissionMode:d,isWaitingForUser:f,waitingType:m})})]})})}),Ole=v.forwardRef(function({value:t,onChange:n,onSubmit:r,isLoading:s,sessionBusy:o=!1,onStop:l,onEscape:u,onClear:d,isPaletteOpen:f,onArrowUp:m,onArrowDown:p,onCommandSelect:g,activeDescendantId:y,onCursorChange:E},S){const A=v.useRef(null),w=v.useRef(0);v.useImperativeHandle(S,()=>({focus:()=>{var I;return(I=A.current)==null?void 0:I.focus()},focusAt:I=>{const H=A.current;H&&(H.focus(),H.setSelectionRange(I,I))}}));const[_,k]=v.useState(!1),R=_o(),M=v.useCallback(I=>{if(I.key==="Escape"){const H=Date.now();f?(u==null||u(),w.current=H):t.trim()&&H-w.current<500?(d==null||d(),w.current=0):(u==null||u(),w.current=H);return}if(f){if(I.key==="ArrowDown"){I.preventDefault(),p==null||p();return}if(I.key==="ArrowUp"){I.preventDefault(),m==null||m();return}if(I.key==="Enter"&&!I.shiftKey){I.preventDefault(),g==null||g();return}if(I.key==="Tab"){I.preventDefault(),g==null||g();return}}I.key==="Enter"&&!I.shiftKey&&!R&&(I.preventDefault(),!s&&t.trim()&&r())},[s,R,t,r,u,d,f,m,p,g]),O=v.useCallback(()=>k(!0),[]),D=v.useCallback(()=>{k(!1),f&&(u==null||u())},[f,u]),P=v.useCallback(I=>{n(I.target.value),E==null||E(I.target.selectionStart);const H=A.current;H&&(H.style.height="auto",H.style.height=`${Math.min(H.scrollHeight,200)}px`)},[n,E]),z=v.useCallback(()=>{A.current&&(E==null||E(A.current.selectionStart))},[E]);v.useEffect(()=>{const I=A.current;if(!I||t!=="")return;const H=I.scrollHeight,$=24;if(H<=$)return;I.style.height=`${H}px`,I.style.transition="height 200ms ease",requestAnimationFrame(()=>{I.style.height=`${$}px`});const ne=()=>{I.style.transition="",I.style.height=""};return I.addEventListener("transitionend",ne,{once:!0}),()=>I.removeEventListener("transitionend",ne)},[t]);const j=t.trim().length>0,K=s||j,Y=j&&!s&&!o,te=s?bz:R?wR:kH,W=s||o;return b.jsxs("div",{className:"flex flex-col gap-1.5",children:[o&&b.jsx("div",{className:"px-1 text-xs text-amber-600 dark:text-amber-500",children:"Session is busy. Please wait..."}),b.jsxs("div",{className:Ye("flex items-end gap-1.5 rounded-xl border p-1.5 pl-3 transition-colors duration-150",_?"border-ring":"border-border"),children:[b.jsx("textarea",{ref:A,value:t,onChange:P,onKeyDown:M,onFocus:O,onBlur:D,onSelect:z,role:"combobox","aria-autocomplete":"list","aria-controls":f?y!=null&&y.startsWith("file-")?"file-palette-listbox":"command-palette-listbox":void 0,"aria-expanded":f??!1,"aria-activedescendant":f?y:void 0,placeholder:"Message Claude...",className:"max-h-[200px] min-h-[24px] flex-1 resize-none bg-transparent py-0.5 text-sm focus:outline-none",rows:1,disabled:W}),b.jsx(dt.button,{animate:{opacity:Y?.5:0,scale:Y?1:.8},transition:{duration:.15},whileHover:Y?{opacity:1}:void 0,onClick:d,disabled:!Y,type:"button",className:Ye("text-muted-foreground hover:text-foreground shrink-0 rounded-lg p-1 transition-colors",!Y&&"pointer-events-none"),"aria-label":"Clear message",children:b.jsx(Df,{className:"size-(--size-icon-sm)"})}),b.jsx(dt.button,{animate:{opacity:K?1:0,scale:K?1:.8},transition:{duration:.15},whileHover:K&&!o?{scale:1.1}:void 0,whileTap:K&&!o?{scale:.9}:void 0,onClick:s?l:r,disabled:!K||o,className:Ye("shrink-0 rounded-lg p-1.5 transition-colors max-md:p-2",s?"bg-destructive text-destructive-foreground hover:bg-destructive/90":"bg-primary text-primary-foreground hover:bg-primary/90",(!K||o)&&"pointer-events-none opacity-50"),"aria-label":s?"Stop generating":"Send message",children:b.jsx(te,{className:"size-(--size-icon-sm)"})})]})]})}),L3={in_progress:b.jsx(df,{className:"size-(--size-icon-xs) shrink-0 animate-spin text-blue-400"}),pending:b.jsx(EH,{className:"text-muted-foreground size-(--size-icon-xs) shrink-0"}),completed:b.jsx(xH,{className:"size-(--size-icon-xs) shrink-0 text-green-500"})},P3=10;function Dle({tasks:e,activeForm:t,isCollapsed:n,onToggleCollapse:r,celebratingTaskId:s,onCelebrationComplete:o}){if(e.length===0)return null;const l=e.filter(p=>p.status==="completed").length,u=e.filter(p=>p.status==="in_progress").length,d=e.filter(p=>p.status==="pending").length,f=e.slice(0,P3),m=e.length-P3;return b.jsxs("div",{className:"border-t px-4 py-2",children:[b.jsx(Sn,{children:t&&!n&&b.jsxs(dt.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mb-1 flex items-center gap-2 text-xs text-blue-400",children:[b.jsx(df,{className:"size-(--size-icon-xs) shrink-0 animate-spin"}),b.jsx("span",{className:"truncate",children:t})]})}),b.jsxs("button",{onClick:r,className:"text-muted-foreground hover:text-foreground flex w-full items-center gap-1.5 text-xs",children:[n?b.jsx(ff,{className:"size-(--size-icon-xs)"}):b.jsx(Fm,{className:"size-(--size-icon-xs)"}),b.jsx(QH,{className:"size-(--size-icon-xs)"}),b.jsxs("span",{children:[e.length," task",e.length!==1?"s":""," (",l," done",u>0?`, ${u} in progress`:"",", ",d," open)",m>0&&` +${m} more`]})]}),b.jsx(Sn,{children:!n&&b.jsx(dt.ul,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"mt-1 space-y-0.5",children:f.map(p=>{const g=p.id===s&&p.status==="completed";return b.jsxs(dt.li,{className:`relative flex items-center gap-2 py-0.5 text-xs ${p.status==="completed"?"text-muted-foreground/50 line-through":p.status==="in_progress"?"text-foreground font-medium":"text-muted-foreground"}`,animate:g?{scale:[1,1.05,1]}:void 0,transition:g?{type:"spring",stiffness:400,damping:10}:void 0,onAnimationComplete:()=>{g&&(o==null||o())},children:[g&&b.jsx(dt.div,{"aria-hidden":"true",className:"absolute inset-0 rounded",initial:{backgroundPosition:"-200% 0"},animate:{backgroundPosition:"200% 0"},transition:{duration:.4,ease:"easeOut"},style:{backgroundImage:"linear-gradient(90deg, transparent 0%, rgba(255,215,0,0.2) 50%, transparent 100%)",backgroundSize:"200% 100%"}}),g?b.jsx(dt.span,{initial:{scale:1},animate:{scale:[1,1.4,1]},transition:{type:"spring",stiffness:400,damping:10},children:L3[p.status]}):L3[p.status],b.jsx("span",{className:"truncate",children:p.subject})]},p.id)})})})]})}function Mle({celebration:e,onComplete:t}){const n=v.useRef(null),r=(e==null?void 0:e.level)==="major",s=v.useCallback(()=>{t()},[t]);return v.useEffect(()=>{if(!r)return;let o=!1;X9({particleCount:40,origin:{x:.5,y:.6},colors:["#FFD700","#FFC107","#F7B500"]}).then(u=>{if(o){u();return}n.current=u});const l=setTimeout(()=>{s()},Ui.CELEBRATION_DISPLAY_MS);return()=>{var u;o=!0,(u=n.current)==null||u.call(n),n.current=null,clearTimeout(l)}},[r,s]),b.jsx(Sn,{children:r&&b.jsx(dt.div,{"aria-hidden":"true",className:"pointer-events-none fixed inset-0 z-50",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.1},transition:{duration:.6,ease:"easeOut"},style:K9})})}function Ile({filteredCommands:e,selectedIndex:t,onSelect:n}){const r=v.useMemo(()=>{const s=[],o=new Map;let l=0;for(const u of e)o.has(u.namespace)||o.set(u.namespace,[]),o.get(u.namespace).push({cmd:u,index:l++});for(const[u,d]of o)s.push({namespace:u,items:d});return s},[e]);return v.useEffect(()=>{const s=document.getElementById(`command-item-${t}`);s&&s.scrollIntoView({block:"nearest"})},[t]),b.jsx(dt.div,{initial:{opacity:0,scale:.98,y:4},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:4},transition:{duration:.15,ease:[0,0,.2,1]},className:"bg-popover absolute right-0 bottom-full left-0 mb-2 max-h-80 overflow-hidden rounded-lg border shadow-lg",onMouseDown:s=>s.preventDefault(),children:b.jsx("div",{id:"command-palette-listbox",role:"listbox",className:"max-h-72 overflow-y-auto p-2",children:e.length===0?b.jsx("div",{className:"text-muted-foreground px-2 py-4 text-center text-sm",children:"No commands found."}):r.map(({namespace:s,items:o})=>b.jsxs("div",{children:[b.jsx("div",{className:"text-muted-foreground px-2 py-1.5 text-xs font-medium",children:s}),o.map(({cmd:l,index:u})=>{const d=u===t;return b.jsxs("div",{id:`command-item-${u}`,role:"option","aria-selected":d,"data-selected":d,tabIndex:d?0:-1,onClick:()=>n(l),onKeyDown:f=>{f.key==="Enter"&&n(l)},className:"data-[selected=true]:bg-ring/10 data-[selected=true]:text-foreground hover:bg-muted flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 transition-colors duration-100",children:[b.jsx("span",{className:"font-mono text-sm",children:l.fullCommand}),b.jsx("span",{className:"text-muted-foreground truncate text-xs",children:l.description}),l.argumentHint&&b.jsx("span",{className:"text-muted-foreground/60 ml-auto text-xs",children:l.argumentHint})]},l.fullCommand)})]},s))})})}function Lle({text:e,indices:t,startOffset:n=0}){const r=new Set(t.map(s=>s-n));return b.jsx(b.Fragment,{children:e.split("").map((s,o)=>r.has(o)?b.jsx("span",{className:"text-foreground font-semibold",children:s},o):b.jsx("span",{children:s},o))})}function Ple({filteredFiles:e,selectedIndex:t,onSelect:n}){return v.useEffect(()=>{const r=document.getElementById(`file-item-${t}`);r&&r.scrollIntoView({block:"nearest"})},[t]),b.jsx(dt.div,{initial:{opacity:0,scale:.98,y:4},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:4},transition:{duration:.15,ease:[0,0,.2,1]},className:"bg-popover absolute right-0 bottom-full left-0 mb-2 max-h-80 overflow-hidden rounded-lg border shadow-lg",onMouseDown:r=>r.preventDefault(),children:b.jsx("div",{id:"file-palette-listbox",role:"listbox",className:"max-h-72 overflow-y-auto p-2",children:e.length===0?b.jsx("div",{className:"text-muted-foreground px-2 py-4 text-center text-sm",children:"No files found."}):e.map((r,s)=>{const o=s===t,l=r.isDirectory?qc:UH;return b.jsxs("div",{id:`file-item-${s}`,role:"option","aria-selected":o,"data-selected":o,tabIndex:o?0:-1,onClick:()=>n(r),onKeyDown:u=>{u.key==="Enter"&&n(r)},className:"data-[selected=true]:bg-ring/10 data-[selected=true]:text-foreground hover:bg-muted flex cursor-pointer items-center gap-2 rounded px-2 py-1.5 transition-colors duration-100",children:[b.jsx(l,{className:"text-muted-foreground size-4 shrink-0"}),b.jsx("span",{className:"truncate text-sm",children:b.jsx(Lle,{text:r.filename,indices:r.indices,startOffset:r.directory.length})}),r.directory&&b.jsx("span",{className:"text-muted-foreground truncate text-xs",children:r.directory})]},r.path)})})})}function jle(e){const t=ln();return xr({queryKey:["files",{cwd:e??null}],queryFn:()=>t.listFiles(e),enabled:!!e,staleTime:hi.FILES_STALE_TIME_MS,gcTime:hi.FILES_GC_TIME_MS})}const Ble=[{trigger:"/",label:"Commands",icon:Ez,ariaLabel:"Insert slash command trigger"},{trigger:"@",label:"Files",icon:jH,ariaLabel:"Insert file mention trigger"}];function j3({onChipClick:e}){return b.jsx(dt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"mt-1.5 flex items-center justify-center gap-2 sm:justify-start",children:Ble.map(t=>b.jsxs("button",{type:"button","aria-label":t.ariaLabel,onClick:()=>e(t.trigger),className:"bg-secondary text-muted-foreground hover:text-foreground hover:bg-muted inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs transition-colors duration-150",children:[b.jsx(t.icon,{className:"size-3"}),b.jsx("kbd",{className:"font-mono text-[10px] opacity-60",children:t.trigger}),t.label]},t.trigger))})}function Ule({collapsed:e,onToggle:t}){return b.jsx("div",{role:"button",tabIndex:0,"aria-label":e?"Expand input extras":"Collapse input extras",onClick:t,onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),t())},className:"flex h-6 w-full cursor-pointer items-center justify-center",children:b.jsx("div",{className:"bg-muted-foreground/30 hover:bg-muted-foreground/50 active:bg-muted-foreground/50 h-1 w-9 rounded-full transition-colors"})})}function Fle({cwd:e}){const t=e.split("/").filter(Boolean).pop()??e;return b.jsxs("span",{className:"inline-flex items-center gap-1",title:e,children:[b.jsx(qc,{className:"size-(--size-icon-xs)"}),b.jsx("span",{children:t})]})}const yb=[{value:"default",label:"Default",icon:Ix,description:"Prompt for each tool call"},{value:"acceptEdits",label:"Accept Edits",icon:hz,description:"Auto-approve file edits"},{value:"plan",label:"Plan Mode",icon:SH,description:"Research only, no edits"},{value:"bypassPermissions",label:"Bypass All",icon:kR,description:"Auto-approve everything"}];function Hle({mode:e,onChangeMode:t}){const n=yb.find(o=>o.value===e)??yb[0],r=n.icon,s=e==="bypassPermissions";return b.jsxs(q6,{children:[b.jsx($6,{asChild:!0,children:b.jsxs("button",{className:`hover:text-foreground inline-flex items-center gap-1 transition-colors duration-150 ${s?"text-red-500":""}`,children:[b.jsx(r,{className:"size-(--size-icon-xs)"}),b.jsx("span",{children:n.label})]})}),b.jsxs(Y6,{side:"top",align:"start",className:"w-56",children:[b.jsx(G6,{children:"Permission Mode"}),b.jsx(K6,{value:e,onValueChange:o=>t(o),children:yb.map(o=>{const l=o.value==="bypassPermissions";return b.jsx(Q6,{value:o.value,icon:o.icon,description:o.description,className:l?"text-red-500":"",children:o.label},o.value)})})]})]})}const eI=[{value:"claude-sonnet-4-5-20250929",label:"Sonnet 4.5"},{value:"claude-haiku-4-5-20251001",label:"Haiku 4.5"},{value:"claude-opus-4-6",label:"Opus 4.6"}];function zle(e){const t=eI.find(r=>r.value===e);if(t)return t.label;const n=e.match(/claude-(\w+)-/);return n?n[1].charAt(0).toUpperCase()+n[1].slice(1):e}function Vle({model:e,onChangeModel:t}){return b.jsxs(q6,{children:[b.jsx($6,{asChild:!0,children:b.jsxs("button",{className:"hover:text-foreground inline-flex items-center gap-1 transition-colors duration-150",children:[b.jsx(mH,{className:"size-(--size-icon-xs)"}),b.jsx("span",{children:zle(e)})]})}),b.jsxs(Y6,{side:"top",align:"start",className:"w-44",children:[b.jsx(G6,{children:"Model"}),b.jsx(K6,{value:e,onValueChange:t,children:eI.map(n=>b.jsx(Q6,{value:n.value,children:n.label},n.value))})]})]})}function qle({costUsd:e}){return b.jsxs("span",{className:"inline-flex items-center gap-1",children:[b.jsx(RH,{className:"size-(--size-icon-xs)"}),b.jsxs("span",{children:["$",e.toFixed(2)]})]})}function $le({percent:e}){const t=e>=95?"text-red-500":e>=80?"text-amber-500":"";return b.jsxs("span",{className:`inline-flex items-center gap-1 ${t}`,children:[b.jsx(XH,{className:"size-(--size-icon-xs)"}),b.jsxs("span",{children:[e,"%"]})]})}function Yle(e){const t=ln();return xr({queryKey:["git-status",e],queryFn:()=>t.getGitStatus(e??void 0),enabled:!!e,refetchInterval:hi.GIT_STATUS_REFETCH_MS,refetchIntervalInBackground:!1,staleTime:hi.GIT_STATUS_STALE_TIME_MS})}function Gle(e){return!!e&&!("error"in e)}function Xle({data:e}){if(!e)return null;if(!Gle(e))return b.jsxs("span",{className:"text-muted-foreground/50 inline-flex items-center gap-1",title:"Not a git repository",children:[b.jsx(eA,{className:"size-(--size-icon-xs)"}),b.jsx("span",{children:"No repo"})]});const t=e.modified+e.staged+e.untracked,n=t===1?"1 change":`${t} changes`,r=[];e.modified>0&&r.push(`${e.modified} modified`),e.staged>0&&r.push(`${e.staged} staged`),e.untracked>0&&r.push(`${e.untracked} untracked`),e.conflicted>0&&r.push(`${e.conflicted} conflicted`);const s=r.length>0?`${e.branch} · ${r.join(", ")}`:`${e.branch} · clean`;return b.jsxs("span",{className:"inline-flex items-center gap-1",title:s,children:[b.jsx(eA,{className:"size-(--size-icon-xs)"}),b.jsx("span",{className:"max-w-[25ch] truncate",children:e.branch}),e.ahead>0&&b.jsxs("span",{className:"text-muted-foreground inline-flex items-center gap-0.5",children:[b.jsx(wR,{className:"size-(--size-icon-xs)"}),e.ahead]}),e.behind>0&&b.jsxs("span",{className:"text-muted-foreground inline-flex items-center gap-0.5",children:[b.jsx(CR,{className:"size-(--size-icon-xs)"}),e.behind]}),t>0&&b.jsxs("span",{className:"text-muted-foreground",children:["· ",n]})]})}function Kle({enabled:e,onToggle:t}){const n=e?Sz:wz;return b.jsx("button",{onClick:t,className:"hover:text-foreground inline-flex items-center gap-1 transition-colors duration-150","aria-label":e?"Mute notification sound":"Unmute notification sound",title:e?"Sound on — click to mute":"Sound off — click to unmute",children:b.jsx(n,{className:"size-(--size-icon-xs)"})})}function Qle({tunnel:e}){const[t,n]=v.useState(!1),r=e.connected?"bg-green-500":"bg-gray-400",s=e.url?new URL(e.url).hostname:null;return b.jsxs(b.Fragment,{children:[b.jsxs("button",{onClick:()=>n(!0),className:"hover:text-foreground inline-flex items-center gap-1 transition-colors duration-150","aria-label":e.connected?`Tunnel connected: ${s}`:"Tunnel disconnected",title:e.connected?`Tunnel: ${e.url}`:"Tunnel: disconnected",children:[b.jsx("span",{className:Ye("inline-block size-1.5 rounded-full",r)}),b.jsx(qH,{className:"size-(--size-icon-xs)"}),e.connected&&s&&b.jsx("span",{className:"max-w-24 truncate",children:s}),!e.connected&&b.jsx("span",{children:"Tunnel"})]}),b.jsx(a4,{open:t,onOpenChange:n})]})}function Wle({version:e,latestVersion:t}){const[n,r]=v.useState(!1),s=t!==null&&Zle(t,e);return b.jsxs("span",{className:"relative inline-flex items-center",children:[b.jsx("button",{type:"button",className:Ye("cursor-default text-xs",s?"cursor-pointer text-amber-600 hover:underline dark:text-amber-400":"text-muted-foreground"),onClick:()=>s&&r(!n),"aria-label":s?`Update available: v${t}`:`Version ${e}`,children:s?`↑ v${t}`:`v${e}`}),n&&s&&b.jsxs("div",{className:"bg-popover text-popover-foreground border-border absolute bottom-full right-0 z-50 mb-2 w-64 rounded-md border p-3 text-xs shadow-md",role:"tooltip",children:[b.jsxs("p",{className:"font-medium",children:["Update available: v",e," → v",t]}),b.jsxs("p",{className:"text-muted-foreground mt-1",children:["Run"," ",b.jsx("code",{className:"bg-muted rounded px-1 py-0.5 font-mono text-[10px]",children:"npm update -g dorkos"})," ","to update"]})]})]})}function Zle(e,t){const[n,r,s]=e.split(".").map(Number),[o,l,u]=t.split(".").map(Number);return n!==o?n>o:r!==l?r>l:s>u}const Jle={duration:.2,ease:[.4,0,.2,1]};function B3({sessionId:e,sessionStatus:t,isStreaming:n}){const r=Bk(e,t,n),{showStatusBarCwd:s,showStatusBarPermission:o,showStatusBarModel:l,showStatusBarCost:u,showStatusBarContext:d,showStatusBarGit:f,showStatusBarSound:m,showStatusBarTunnel:p,showStatusBarVersion:g,enableNotificationSound:y,setEnableNotificationSound:E}=Xt(),{data:S}=Yle(r.cwd),A=ln(),{data:w}=xr({queryKey:["config"],queryFn:()=>A.getConfig(),staleTime:300*1e3}),_=[];s&&r.cwd&&_.push({key:"cwd",node:b.jsx(Fle,{cwd:r.cwd})}),f&&_.push({key:"git",node:b.jsx(Xle,{data:S})}),o&&_.push({key:"permission",node:b.jsx(Hle,{mode:r.permissionMode,onChangeMode:R=>r.updateSession({permissionMode:R})})}),l&&_.push({key:"model",node:b.jsx(Vle,{model:r.model,onChangeModel:R=>r.updateSession({model:R})})}),u&&r.costUsd!==null&&_.push({key:"cost",node:b.jsx(qle,{costUsd:r.costUsd})}),d&&r.contextPercent!==null&&_.push({key:"context",node:b.jsx($le,{percent:r.contextPercent})}),m&&_.push({key:"sound",node:b.jsx(Kle,{enabled:y,onToggle:()=>E(!y)})}),p&&(w!=null&&w.tunnel)&&_.push({key:"tunnel",node:b.jsx(Qle,{tunnel:w.tunnel})}),g&&w&&_.push({key:"version",node:b.jsx(Wle,{version:w.version,latestVersion:w.latestVersion})});const k=_.length>0;return b.jsx(Sn,{initial:!1,children:k&&b.jsx(dt.div,{role:"toolbar","aria-label":"Session status","aria-live":"polite",initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:[.4,0,.2,1]},className:"overflow-hidden",children:b.jsx("div",{className:"text-muted-foreground flex flex-wrap items-center justify-center gap-2 px-1 pt-2 text-xs whitespace-nowrap sm:justify-start",children:b.jsx(Sn,{initial:!1,mode:"popLayout",children:_.map((R,M)=>b.jsxs(dt.div,{layout:!0,initial:{opacity:0,scale:.8,filter:"blur(4px)"},animate:{opacity:1,scale:1,filter:"blur(0px)"},exit:{opacity:0,scale:.8,filter:"blur(4px)"},transition:Jle,className:"inline-flex items-center gap-2",children:[M>0&&b.jsx(eue,{}),R.node]},R.key))})})})})}function eue(){return b.jsx("span",{className:"text-muted-foreground/30","aria-hidden":"true",children:"·"})}function tue(){const e=Xt(f=>f.showTaskCelebrations),[t,n]=v.useState(null),[r,s]=v.useState(null),o=v.useRef(null),l=v.useRef(!1);v.useEffect(()=>{const f=window.matchMedia("(prefers-reduced-motion: reduce)");l.current=f.matches;const m=p=>{l.current=p.matches};return f.addEventListener("change",m),()=>f.removeEventListener("change",m)},[]),ij({timeoutMs:El.IDLE_TIMEOUT_MS,onIdle:v.useCallback(()=>{var f;(f=o.current)==null||f.setIdle(!0)},[]),onReturn:v.useCallback(()=>{var f,m;(f=o.current)==null||f.setIdle(!1),(m=o.current)==null||m.onUserReturn()},[])}),v.useEffect(()=>{const f=new G9({enabled:e,miniProbability:El.MINI_PROBABILITY,debounceWindowMs:El.DEBOUNCE_WINDOW_MS,debounceThreshold:El.DEBOUNCE_THRESHOLD,minTasksForMajor:El.MIN_TASKS_FOR_MAJOR,idleTimeoutMs:El.IDLE_TIMEOUT_MS,onCelebrate:m=>{l.current&&m.level==="major"?n({...m,level:"mini"}):n(m),m.level==="mini"&&s(m.taskId)}});return o.current=f,()=>f.destroy()},[e]);const u=v.useCallback((f,m)=>{var p;f.action==="update"&&f.task.status==="completed"&&f.task.id&&((p=o.current)==null||p.onTaskCompleted(f.task.id,m))},[]),d=v.useCallback(()=>{n(null),s(null)},[]);return{handleTaskEvent:u,activeCelebration:t,celebratingTaskId:r,clearCelebration:d}}function U3({sessionId:e,transformContent:t}){const[,n]=_f(),r=v.useRef(null),s=v.useRef(null),o=IK(e),l=tue(),u=Xt(ye=>ye.enableNotificationSound),d=v.useCallback(ye=>{o.handleTaskEvent(ye);const He=o.tasks.map(Ae=>Ae.id===ye.task.id?{...Ae,...ye.task}:Ae);l.handleTaskEvent(ye,He)},[o,l]),{messages:f,input:m,setInput:p,handleSubmit:g,status:y,error:E,sessionBusy:S,stop:A,isLoadingHistory:w,sessionStatus:_,streamStartTime:k,estimatedTokens:R,isTextStreaming:M,isWaitingForUser:O,waitingType:D,activeInteraction:P}=NK(e,{transformContent:t,onTaskEvent:d,onSessionIdChange:n,onStreamingDone:v.useCallback(()=>{u&&U9()},[u])}),{permissionMode:z}=Bk(e,_,y==="streaming"),j=v.useRef(null),[K,Y]=v.useState(0),[J,te]=v.useState(0),W=v.useCallback(ye=>{j.current=ye,te(ye&&"getOptionCount"in ye?ye.getOptionCount():0)},[]);v.useEffect(()=>{Y(0),te(0)},[P==null?void 0:P.toolCallId]);const I=v.useMemo(()=>P?{type:P.interactiveType,toolCallId:P.toolCallId}:null,[P]);sj({activeInteraction:I,onApprove:v.useCallback(()=>{const ye=j.current;ye&&"approve"in ye&&ye.approve()},[]),onDeny:v.useCallback(()=>{const ye=j.current;ye&&"deny"in ye&&ye.deny()},[]),onToggleOption:v.useCallback(ye=>{const He=j.current;He&&"toggleOption"in He&&(He.toggleOption(ye),Y(ye))},[]),onNavigateOption:v.useCallback(ye=>{Y(He=>{const Ae=j.current,Ve=Ae&&"getOptionCount"in Ae?Ae.getOptionCount():0;return Ve===0?He:ye==="up"?He<=0?Ve-1:He-1:He>=Ve-1?0:He+1})},[]),onNavigateQuestion:v.useCallback(ye=>{const He=j.current;He&&"navigateQuestion"in He&&(He.navigateQuestion(ye),Y(0),te(He.getOptionCount()))},[]),onSubmit:v.useCallback(()=>{const ye=j.current;ye&&"submit"in ye&&ye.submit()},[]),optionCount:J,focusedIndex:K});const[H,$]=v.useState(0),[ne,U]=v.useState(!0),[q,ie]=v.useState(!1),B=v.useRef(f.length),de=v.useCallback(ye=>{U(ye.isAtBottom)},[]),xe=v.useCallback(()=>{var ye;(ye=r.current)==null||ye.scrollToBottom(),U(!0),ie(!1)},[]);v.useEffect(()=>{const ye=B.current;B.current=f.length,f.length>ye&&!ne&&ie(!0)},[f.length,ne]),v.useEffect(()=>{ne&&ie(!1)},[ne]);const Ee=_o(),[he,we]=v.useState(!1),[Se,Pe]=v.useState(()=>Ee?parseInt(localStorage.getItem(er.GESTURE_HINT_COUNT)||"0",10)<3:!1);v.useEffect(()=>{if(!Se)return;const ye=setTimeout(()=>{Pe(!1);const He=parseInt(localStorage.getItem(er.GESTURE_HINT_COUNT)||"0",10);localStorage.setItem(er.GESTURE_HINT_COUNT,String(He+1))},Ui.GESTURE_HINT_DISMISS_MS);return()=>clearTimeout(ye)},[Se]);const _e=v.useCallback(()=>{Pe(!1);const ye=parseInt(localStorage.getItem(er.GESTURE_HINT_COUNT)||"0",10);localStorage.setItem(er.GESTURE_HINT_COUNT,String(ye+1))},[]),Oe=80,wt=500,Re=(ye,He)=>{const{offset:Ae,velocity:Ve}=He;Ae.y>Oe||Ve.y>wt?we(!0):(Ae.y<-Oe||Ve.y<-wt)&&we(!1)},nn=Xt(ye=>ye.setIsStreaming),Lt=Xt(ye=>ye.setIsWaitingForUser),rn=Xt(ye=>ye.setActiveForm);v.useEffect(()=>(nn(y==="streaming"),()=>nn(!1)),[y,nn]),v.useEffect(()=>(Lt(O),()=>Lt(!1)),[O,Lt]),v.useEffect(()=>(rn(o.activeForm),()=>rn(null)),[o.activeForm,rn]);const ei=Xt(ye=>ye.showShortcutChips),[Fn]=Im(),{data:Cn}=RK(Fn),Ti=v.useMemo(()=>(Cn==null?void 0:Cn.commands)??[],[Cn]),{data:ti}=jle(Fn),ni=v.useMemo(()=>{if(!(ti!=null&&ti.files))return[];const ye=[],He=new Set;for(const Ae of ti.files){const Ve=Ae.lastIndexOf("/"),mt=Ve>=0?Ae.slice(0,Ve+1):"",Qe=Ve>=0?Ae.slice(Ve+1):Ae;ye.push({path:Ae,filename:Qe,directory:mt,isDirectory:!1});const st=Ae.split("/");for(let kt=1;kt<st.length;kt++){const Ft=st.slice(0,kt).join("/")+"/";He.has(Ft)||(He.add(Ft),ye.push({path:Ft,filename:st[kt-1]+"/",directory:kt>1?st.slice(0,kt-1).join("/")+"/":"",isDirectory:!0}))}}return ye},[ti]),rt=LK({commands:Ti,input:m,cursorPos:H}),xt=PK({fileEntries:ni,input:m,cursorPos:H});function ce(ye,He){if(xt.detectFileTrigger(ye,He)){rt.setShowCommands(!1);return}if(rt.detectCommandTrigger(ye,He)){xt.setShowFiles(!1);return}xt.setShowFiles(!1),rt.setShowCommands(!1)}function Te(ye){p(ye),ce(ye,H||ye.length)}const Ue=v.useCallback(ye=>{$(ye),ce(m,ye)},[m]);function Ze(ye){const He=rt.handleCommandSelect(ye);p(He)}function ht(ye){const He=xt.handleFileSelect(ye);p(He.newValue),He.newCursorPos!==void 0&&$(He.newCursorPos)}const Dn=v.useCallback(()=>{xt.showFiles?xt.handleArrowDown():rt.handleArrowDown()},[xt.showFiles,xt.handleArrowDown,rt.handleArrowDown]),Mn=v.useCallback(()=>{xt.showFiles?xt.handleArrowUp():rt.handleArrowUp()},[xt.showFiles,xt.handleArrowUp,rt.handleArrowUp]),un=v.useCallback(()=>{if(xt.showFiles){const ye=xt.handleKeyboardSelect();ye&&(p(ye.newValue),ye.newCursorPos!==void 0&&$(ye.newCursorPos))}else if(rt.showCommands){const ye=rt.handleKeyboardSelect();ye&&p(ye)}},[xt.showFiles,rt.showCommands]),qt=v.useCallback(ye=>{const He=m.match(/(^|\s)([/@])([\w./:-]*)$/);let Ae;if(He){const Ve=He[2],mt=He[3],Qe=(He.index??0)+He[1].length;if(Ve===ye&&!mt){const st=m.slice(0,Qe);Ae=st.endsWith(" ")&&Qe>0?st.slice(0,-1):st,p(Ae),xt.setShowFiles(!1),rt.setShowCommands(!1),requestAnimationFrame(()=>{var kt;return(kt=s.current)==null?void 0:kt.focusAt(Ae.length)});return}Ae=m.slice(0,Qe)+ye}else m.length>0&&!m.endsWith(" ")?Ae=m+" "+ye:Ae=m+ye;p(Ae),ce(Ae,Ae.length),requestAnimationFrame(()=>{var Ve;return(Ve=s.current)==null?void 0:Ve.focusAt(Ae.length)})},[m,p]),wn=rt.showCommands||xt.showFiles,St=xt.showFiles&&xt.filteredFiles.length>0?`file-item-${xt.fileSelectedIndex}`:rt.showCommands&&rt.filteredCommands.length>0?`command-item-${rt.selectedIndex}`:void 0;return b.jsxs("div",{className:"flex h-full flex-col",children:[b.jsxs("div",{className:"relative min-h-0 flex-1",children:[w?b.jsx("div",{className:"flex h-full items-center justify-center",children:b.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 text-sm",children:[b.jsxs("div",{className:"flex gap-1",children:[b.jsx("span",{className:"bg-muted-foreground h-2 w-2 rounded-full",style:{animation:"typing-dot 1.4s ease-in-out infinite",animationDelay:"0s"}}),b.jsx("span",{className:"bg-muted-foreground h-2 w-2 rounded-full",style:{animation:"typing-dot 1.4s ease-in-out infinite",animationDelay:"0.2s"}}),b.jsx("span",{className:"bg-muted-foreground h-2 w-2 rounded-full",style:{animation:"typing-dot 1.4s ease-in-out infinite",animationDelay:"0.4s"}})]}),"Loading conversation..."]})}):f.length===0?b.jsx("div",{className:"flex h-full items-center justify-center",children:b.jsxs("div",{className:"text-center",children:[b.jsx("p",{className:"text-muted-foreground text-base",children:"Start a conversation"}),b.jsx("p",{className:"text-muted-foreground/60 mt-2 text-sm",children:"Type a message below to begin"})]})}):b.jsx(Rle,{ref:r,messages:f,sessionId:e,status:y,isTextStreaming:M,onScrollStateChange:de,streamStartTime:k,estimatedTokens:R,permissionMode:z,isWaitingForUser:O,waitingType:D??void 0,activeToolCallId:(P==null?void 0:P.toolCallId)??null,onToolRef:W,focusedOptionIndex:K}),b.jsx(Sn,{children:q&&!ne&&b.jsx(dt.button,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2},onClick:xe,className:"bg-foreground text-background hover:bg-foreground/90 absolute bottom-16 left-1/2 z-10 -translate-x-1/2 cursor-pointer rounded-full px-3 py-1.5 text-xs font-medium shadow-sm transition-colors",role:"status","aria-live":"polite",children:"New messages"})}),b.jsx(Sn,{children:!ne&&f.length>0&&!w&&b.jsx(dt.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{duration:.15},onClick:xe,className:"bg-background absolute right-4 bottom-4 rounded-full border p-2 shadow-sm transition-shadow hover:shadow-md","aria-label":"Scroll to bottom",children:b.jsx(CR,{className:"size-(--size-icon-md)"})})})]}),b.jsx(Mle,{celebration:l.activeCelebration,onComplete:l.clearCelebration}),b.jsx(Dle,{tasks:o.tasks,activeForm:o.activeForm,isCollapsed:o.isCollapsed,onToggleCollapse:o.toggleCollapse,celebratingTaskId:l.celebratingTaskId,onCelebrationComplete:l.clearCelebration}),E&&b.jsx("div",{className:"mx-4 mb-2 rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-400",children:E}),b.jsxs("div",{className:"chat-input-container relative border-t p-4",children:[b.jsxs(Sn,{children:[rt.showCommands&&b.jsx(Ile,{filteredCommands:rt.filteredCommands,selectedIndex:rt.selectedIndex,onSelect:Ze}),xt.showFiles&&b.jsx(Ple,{filteredFiles:xt.filteredFiles,selectedIndex:xt.fileSelectedIndex,onSelect:ht})]}),b.jsx(Ole,{ref:s,value:m,onChange:Te,onSubmit:g,isLoading:y==="streaming",sessionBusy:S,onStop:A,onEscape:()=>{rt.setShowCommands(!1),xt.setShowFiles(!1)},onClear:()=>{p(""),rt.setShowCommands(!1),xt.setShowFiles(!1)},isPaletteOpen:wn,onArrowUp:Mn,onArrowDown:Dn,onCommandSelect:un,activeDescendantId:St,onCursorChange:Ue}),Ee&&b.jsxs(b.Fragment,{children:[b.jsx(dt.div,{animate:Se?{y:[0,8,0]}:void 0,transition:Se?{duration:1.2,repeat:2}:void 0,children:b.jsx(Ule,{collapsed:he,onToggle:()=>we(ye=>!ye)})}),b.jsx(Sn,{children:Se&&b.jsx(dt.p,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:_e,className:"text-muted-foreground cursor-pointer text-center text-xs",children:"Swipe to collapse"})}),b.jsx(Sn,{initial:!1,children:!he&&b.jsxs(dt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{type:"spring",stiffness:300,damping:30},className:"overflow-hidden",drag:"y",dragConstraints:{top:0,bottom:0},dragElastic:.2,onDragEnd:Re,style:{touchAction:"pan-y"},children:[ei&&b.jsx(j3,{onChipClick:qt}),b.jsx(B3,{sessionId:e,sessionStatus:_,isStreaming:y==="streaming"})]})})]}),!Ee&&b.jsxs(b.Fragment,{children:[b.jsx(Sn,{children:ei&&b.jsx(j3,{onChipClick:qt})}),b.jsx(B3,{sessionId:e,sessionStatus:_,isStreaming:y==="streaming"})]})]})]})}function nue({transformContent:e,embedded:t}={}){const{sidebarOpen:n,setSidebarOpen:r,toggleSidebar:s}=Xt(),[o]=_f(),l=_o(),u=v.useRef(null);fj();const[d]=Im(),f=Xt(g=>g.isStreaming),m=Xt(g=>g.activeForm),p=Xt(g=>g.isWaitingForUser);return ej({cwd:t?null:d,isStreaming:f}),tj({cwd:t?null:d,activeForm:m,isStreaming:f,isWaitingForUser:p}),v.useEffect(()=>{if(!(t||l)||!n)return;const y=t?u.current:document;if(!y)return;const E=S=>{S.key==="Escape"&&r(!1)};return y.addEventListener("keydown",E),()=>y.removeEventListener("keydown",E)},[t,l,n,r]),t?b.jsx(Fw,{reducedMotion:"user",children:b.jsxs("div",{ref:u,className:"bg-background text-foreground relative flex h-full flex-col",children:[b.jsx(nA,{sessionId:o}),b.jsxs("div",{className:"relative flex-1 overflow-hidden",children:[b.jsx(Sn,{children:n&&b.jsxs(b.Fragment,{children:[b.jsx(dt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-40 bg-black/40",onClick:()=>r(!1),"aria-label":"Close sidebar"}),b.jsx(dt.div,{initial:{x:-320},animate:{x:0},exit:{x:-320},transition:{duration:.2,ease:[0,0,.2,1]},className:"bg-background absolute top-0 left-0 z-50 h-full w-80 overflow-y-auto border-r",children:b.jsx(X1,{})})]})}),b.jsx(Sn,{children:!n&&b.jsx(dt.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.15,ease:[0,0,.2,1]},onClick:s,className:"bg-background/80 hover:bg-accent absolute top-3 left-3 z-30 rounded-md border p-1.5 shadow-sm backdrop-blur transition-colors duration-150","aria-label":"Open sidebar",children:b.jsx(tA,{className:"size-(--size-icon-md)"})})}),b.jsx("main",{className:"h-full flex-1 overflow-hidden",children:o?b.jsx(U3,{sessionId:o,transformContent:e},o):b.jsx("div",{className:"flex h-full flex-1 items-center justify-center",children:b.jsxs("div",{className:"text-center",children:[b.jsx("p",{className:"text-muted-foreground text-base",children:"New conversation"}),b.jsx("p",{className:"text-muted-foreground/60 mt-2 text-sm",children:"Select a session or start a new one"})]})})})]})]})}):b.jsx(Fw,{reducedMotion:"user",children:b.jsxs("div",{ref:u,className:"bg-background text-foreground flex h-dvh flex-col",children:[b.jsx(nA,{sessionId:o}),b.jsxs("div",{className:"relative flex flex-1 overflow-hidden",children:[b.jsx(Sn,{children:!n&&b.jsx(dt.button,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.15,ease:[0,0,.2,1]},onClick:s,className:"bg-background/80 hover:bg-accent absolute top-3 left-3 z-30 rounded-md border p-1.5 shadow-sm backdrop-blur transition-colors duration-150","aria-label":"Open sidebar",children:b.jsx(tA,{className:"size-(--size-icon-md)"})})}),l?b.jsx(Sn,{children:n&&b.jsxs(b.Fragment,{children:[b.jsx(dt.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 z-40 bg-black/40",onClick:()=>r(!1),"aria-label":"Close sidebar"}),b.jsx(dt.div,{initial:{x:"-90vw"},animate:{x:0},exit:{x:"-90vw"},transition:{duration:.2,ease:[0,0,.2,1]},className:"bg-background fixed top-0 left-0 z-50 h-full w-[90vw] overflow-y-auto border-r",children:b.jsx(X1,{})})]})}):b.jsx(dt.div,{animate:{width:n?320:0},transition:{duration:.2,ease:[0,0,.2,1]},className:"flex-shrink-0 overflow-hidden border-r",children:b.jsx("div",{className:"h-full w-80 overflow-y-auto",children:b.jsx(X1,{})})}),b.jsx("main",{className:"flex-1 overflow-hidden",children:o?b.jsx(U3,{sessionId:o,transformContent:e},o):b.jsx("div",{className:"flex h-full flex-1 items-center justify-center",children:b.jsxs("div",{className:"text-center",children:[b.jsx("p",{className:"text-muted-foreground text-base",children:"New conversation"}),b.jsx("p",{className:"text-muted-foreground/60 mt-2 text-sm",children:"Select a session or start a new one"})]})})})]})]})})}const rue=new QP({defaultOptions:{queries:{staleTime:hi.DEFAULT_STALE_TIME_MS,retry:hi.DEFAULT_RETRY}}}),iue=new R9("/api");AP.createRoot(document.getElementById("root")).render(b.jsx(Ce.StrictMode,{children:b.jsx(O8,{children:b.jsxs(WP,{client:rue,children:[b.jsx(D8,{transport:iue,children:b.jsx(nue,{})}),!1]})})}));const sue=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:J5},Symbol.toStringTag,{value:"Module"}));export{Jr as N,koe as a,Ge as b,due as c,b as j,v as r};